# HG changeset patch # User Pat Downey # Date 1283339703 -3600 # Node ID 987c9837762f83ad3a1905f253c66afc5a8cb665 # Parent 7d48bed6ce0c237047220312e8520d98b140e8a0 Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035 diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/ClientInc/CbsCommon.h --- a/cbs/CbsServer/ClientInc/CbsCommon.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/ClientInc/CbsCommon.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include #include -#include +#include // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/ClientInc/ccbsmessageclientimpl.h --- a/cbs/CbsServer/ClientInc/ccbsmessageclientimpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/ClientInc/ccbsmessageclientimpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include -#include +#include "CCbsMessageClient.h" #include "RCbs.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/ClientSrc/ccbsmessageclient.cpp --- a/cbs/CbsServer/ClientSrc/ccbsmessageclient.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/ClientSrc/ccbsmessageclient.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include +#include "CCbsMessageClient.h" #include "ccbsmessageclientimpl.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/Group/CbsServer.mmp --- a/cbs/CbsServer/Group/CbsServer.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/Group/CbsServer.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -39,7 +39,6 @@ START RESOURCE ../Data/CbsServer.rss HEADER -TARGET CbsServer.rsg TARGETPATH RESOURCE_FILES_DIR LANGUAGE_IDS END diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/McnClientSrc/CCbsMcnListener.cpp --- a/cbs/CbsServer/McnClientSrc/CCbsMcnListener.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/McnClientSrc/CCbsMcnListener.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,9 +19,9 @@ // INCLUDE FILES -#include -#include -#include +#include "CCbsMcnListener.h" +#include "RCbsMcnSession.h" +#include "CMcn.h" #include "CbsLogger.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/McnClientSrc/CMcn.cpp --- a/cbs/CbsServer/McnClientSrc/CMcn.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/McnClientSrc/CMcn.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,12 +17,12 @@ // INCLUDE FILES -#include -#include -#include -#include +#include "CMcn.h" +#include "CCbsMcnListener.h" +#include "MCbsMcnObserver.h" +#include "CbsMcnPanic.h" #include "CbsLogger.h" -#include +#include // CONSTANTS const TInt KReservedSpaceForMcnObservers = 3; diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/McnClientSrc/CMcnTopicArray.cpp --- a/cbs/CbsServer/McnClientSrc/CMcnTopicArray.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/McnClientSrc/CMcnTopicArray.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES -#include +#include "CMcnTopicArray.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/McnClientSrc/CbsMcnPanic.cpp --- a/cbs/CbsServer/McnClientSrc/CbsMcnPanic.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/McnClientSrc/CbsMcnPanic.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include // common header +#include "CbsMcnPanic.h" // common header // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/McnClientSrc/Rcbsmcnsession.cpp --- a/cbs/CbsServer/McnClientSrc/Rcbsmcnsession.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/McnClientSrc/Rcbsmcnsession.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,11 +19,11 @@ // INCLUDE FILES #include "CbsServerConstants.h" -#include -#include -#include -#include -#include +#include "CbsMcnPanic.h" +#include "CMcn.h" +#include "RCbsMcnSession.h" +#include "CCbsMcnListener.h" +#include "CMcnTopicArray.h" #include "CbsLogger.h" // ================= MEMBER FUNCTIONS ======================= diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/McnClientSrc/Rmcnsubsession.cpp --- a/cbs/CbsServer/McnClientSrc/Rmcnsubsession.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/McnClientSrc/Rmcnsubsession.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,11 +18,11 @@ // INCLUDE FILES #include "CbsServerConstants.h" -#include -#include -#include -#include -#include +#include "CbsMcnPanic.h" +#include "RCbsMcnSession.h" +#include "RMcnSubSession.h" +#include "CCbsMcnListener.h" +#include "CMcnTopicArray.h" #include "CbsLogger.h" // ================= MEMBER FUNCTIONS ======================= diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/ServerInc/CCbsMcnSession.h --- a/cbs/CbsServer/ServerInc/CCbsMcnSession.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/ServerInc/CCbsMcnSession.h Wed Sep 01 12:15:03 2010 +0100 @@ -27,7 +27,7 @@ #include #include "CCbsObject.h" #include "MCbsMcnSubscriptionsProvider.h" -#include +#include "CbsMcnCommon.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/ServerInc/CCbsMessage.h --- a/cbs/CbsServer/ServerInc/CCbsMessage.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/ServerInc/CCbsMessage.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ #include #include "CbsReceiverTypes.h" #include "CbsCommon.h" -#include +#include "CbsMcnCommon.h" // CONSTANTS // If this constant is set to iPLMN.iMCC, iPLMN does not contain network info diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/ServerInc/CCbsRecEtel.h --- a/cbs/CbsServer/ServerInc/CCbsRecEtel.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/ServerInc/CCbsRecEtel.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include +#include "CMcn.h" #include "MCbsEtelMessaging.h" /***************************************************** diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/ServerInc/CbsLogger.h --- a/cbs/CbsServer/ServerInc/CbsLogger.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/ServerInc/CbsLogger.h Wed Sep 01 12:15:03 2010 +0100 @@ -15,8 +15,6 @@ * */ - - #ifndef CBSLOGGER_H #define CBSLOGGER_H @@ -30,12 +28,11 @@ #define CBS_LOGGING_METHOD 0 // No logging in UREL builds #else // UDEB BUILD: - #define CBS_LOGGING_METHOD 1 // 0 = No logging, - // 1 = Flogger, - // 2 = RDebug + #define CBS_LOGGING_METHOD 2 // 0 = No logging, + // 1 = Flogger, + // 2 = RDebug #endif //_DEBUG - #if CBS_LOGGING_METHOD > 0 #define CBS_LOGGING_ENABLED // This is for backward compatibility #endif //CBS_LOGGING_METHOD @@ -58,7 +55,6 @@ #endif //CBS_LOGGING_METHOD - /* ----------------------------------------------------------------------------- LOGGING MACROs @@ -67,7 +63,6 @@ ----------------------------------------------------------------------------- */ - #if CBS_LOGGING_METHOD == 1 // Flogger #define CBSLOGTEXT(AAA) /*lint -save -e960 */ { RFileLogger::Write(KCbsLogFolder(),KCbsLogFile(),EFileLoggingModeAppend,AAA); } /*lint -restore */ diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp --- a/cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -40,20 +40,16 @@ #include "CCbsDbImpTopicMessages.h" #include "CCbsDbImpTopicCollection.h" #include "CCbsRecMessage.h" -// <-- QT PHONE START --> -//#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS -//#include // View server access -//#else -//#include -//#endif -//#include // ECellBroadcastNotification -//#include // Soft Notification API -// <-- QT PHONE END --> +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS +#include // View server access +#else +#include +#endif +#include // ECellBroadcastNotification +#include // Soft Notification API #include #include -// <-- QT PHONE START --> -//#include -// <-- QT PHONE END --> +#include #include #include "CbsLogger.h" @@ -64,20 +60,15 @@ // CONSTANTS -// <-- QT PHONE START --> // UID of CBS UI application -//#define KUidCbsUiappDef 0x101F4CD3 -//const TUid KUidCbsUiappApp = { KUidCbsUiappDef }; -// <-- QT PHONE END --> +#define KUidCbsUiappDef 0x101F4CD3 +const TUid KUidCbsUiappApp = { KUidCbsUiappDef }; -// <-- QT PHONE START --> -//const TInt KCbsImmediateMessageIdInt = 313; -//const TUid KCbsImmediateMessageId = { KCbsImmediateMessageIdInt }; -// <-- QT PHONE END --> +const TInt KCbsImmediateMessageIdInt = 313; +const TUid KCbsImmediateMessageId = { KCbsImmediateMessageIdInt }; -// <-- QT PHONE START --> -//const TInt KCbsMessageTone = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h -// <-- QT PHONE END --> +const TInt KCbsMessageTone = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h + // DATA TYPES // CbsUi application view ID's enum TCbsUiViewIds @@ -332,11 +323,7 @@ { CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::ConstructL()"); - // <-- QT PHONE START --> - /* iVwsSession = CVwsSessionWrapper::NewL(); - */ - // <-- QT PHONE END--> // Array for SIM Topic numbers. This way we know which topics // to delete also from the SIM card (when deleting all topics). @@ -377,11 +364,7 @@ CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::~CCbsReceiverHelper()"); delete iSimTopics; - // <-- QT PHONE START --> - /* delete iVwsSession; - */ - // <-- QT PHONE END--> CBSLOGSTRING("CBSSERVER: <<< CCbsReceiverHelper::~CCbsReceiverHelper()"); } @@ -850,10 +833,8 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -void CCbsReceiverHelper::LaunchMessageSoftNotificationL( const TBool /*aPlayTone*/ ) +void CCbsReceiverHelper::LaunchMessageSoftNotificationL( const TBool aPlayTone ) { - // <-- QT PHONE START --> - /* TInt numberOfHotMsgs( 0 ); numberOfHotMsgs = iDatabase.TopicListL().UnreadHotmarkedMessageCount(); @@ -868,8 +849,6 @@ notifier->SetNotificationCountL( ECellBroadcastNotification, numberOfHotMsgs ); CleanupStack::PopAndDestroy( notifier ); - */ - // <-- QT PHONE END--> } // ----------------------------------------------------------------------------- @@ -879,18 +858,14 @@ // ----------------------------------------------------------------------------- // void CCbsReceiverHelper::LaunchMessageImmediateDisplay( - const TCbsDbMessage& /*aMessage*/ ) + const TCbsDbMessage& aMessage ) { - // <-- QT PHONE START --> - /* TUid uiViewUid( TUid::Uid( ECbsUiMsgViewId ) ); TVwsViewId id( KUidCbsUiappApp, uiViewUid ); TPckgBuf pckg( aMessage.iHandle ); // Ignore result value. iVwsSession->CreateActivateViewEvent( id, KCbsImmediateMessageId, pckg ); - */ - // <-- QT PHONE END--> } // ----------------------------------------------------------------------------- @@ -913,13 +888,9 @@ // void CCbsReceiverHelper::PlayCbsTone() { - // <-- QT PHONE START --> - /* RProperty::Define( KPSUidNcnList, KNcnPlayAlertTone, RProperty::EInt, ECapability_None , ECapabilityWriteDeviceData ); RProperty::Set( KPSUidNcnList, KNcnPlayAlertTone, KCbsMessageTone ); - */ - // <-- QT PHONE END--> } // ================= OTHER EXPORTED FUNCTIONS ============== diff -r 7d48bed6ce0c -r 987c9837762f cbs/CbsServer/conf/cbsserver.confml Binary file cbs/CbsServer/conf/cbsserver.confml has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/AIF/CbsUiAppAif.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/AIF/CbsUiAppAif.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,52 @@ +/* +* Copyright (c) 2002 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: This file contains all the resources for the module. +* +* +*/ + + +// INCLUDES + +#include +#include "CbsUiId.h" + + + +// RESOURCE DEFINITIONS + +/* +----------------------------------------------------------------------------- + + AIF_DATA + + Standard Symbian OS application information structure. + +----------------------------------------------------------------------------- +*/ +RESOURCE AIF_DATA + { + // App UID + app_uid=KUidCbsUiappDef; + + // Number of icons + num_icons=2; + + // Application capabilities + embeddability=KAppNotEmbeddable; + + hidden = KAppIsHidden; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/CbsUiApp_caption.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/CbsUiApp_caption.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,40 @@ +/* +* Copyright (c) 2002 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: +* This file contains all the resources for the CbsUiApp.app +* +* +*/ + + +// RESOURCE IDENTIFIER +NAME CBSC // from CBS Caption + +// INCLUDES + +#include +#include + + +// RESOURCE DEFINITIONS + + +RESOURCE CAPTION_DATA + { + caption = qtn_cb_title_cbs; + shortcaption = qtn_cb_title_grid; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/CbsUiApp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/CbsUiApp_reg.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,35 @@ +/* +* Copyright (c) 2004 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: Resource file for cbs ui application. +* +*/ + + +#include +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x101F4CD3 + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "Cbsuiapp"; + localisable_resource_file = APP_RESOURCE_DIR"\\CBSUIAPP"; + localisable_resource_id = R_CBSUIAPP_LOCALISABLE_APP_INFO; + hidden = KAppIsHidden; + embeddability=KAppNotEmbeddable; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/Cbsuiapp.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/Cbsuiapp.hrh Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,89 @@ +/* +* Copyright (c) 2002 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: +* Enumerations for commands, control and view id's. +* +* +*/ + + + + +#ifndef CBSUIAPP_HRH +#define CBSUIAPP_HRH + +// CONSTANTS +// +enum TCbsUiCommands + { + ECbsUiappCmdSwitchOpen = 1, + ECbsUiappCmdSwitchSubscribe, + ECbsUiappCmdSwitchUnsubscribe, + ECbsUiappCmdSwitchHotmark, + ECbsUiappCmdSwitchUnhotmark, + ECbsUiappCmdSwitchSettings, + ECbsUiappCmdSwitchTopic, + ECbsUiappCmdSwitchAddManually, + ECbsUiappCmdSwitchAddFromIndex, + ECbsUiappCmdSwitchEdit, + ECbsUiappCmdSwitchDelete, + ECbsUiappCmdSwitchDeleteAll, + ECbsUiCmdCopyToClipboard, + ECbsUiappCmdOkKey, + ECbsUiappCmdTopicMenuRead, + ECbsUiappCmdTopicMenuKeep, + ECbsUiappCmdMessageDelete, + ECbsUiappCmdMsgMenuKeep, + ECbsUiappTopicViewReadMessage, + ECbsUiappTopicViewKeepMessage, + ECbsUiappTopicViewCmdGoToPrevTopic, + ECbsUiappTopicViewCmdGoToNextTopic, + ECbsUiappCmdMsgMenuDelete, + ECbsUiappSettingsViewCmdChange, + ECbsUiCmdFindItem, + ECbsUiappCmdTopicMSKRead, + ECbsUiappNullCmd + }; + +// CbsUi Control id's +enum TCbsUiControlIds + { + ECbsUiAddFromIndexDlgLine = 1, + ECbsUiLanguageDlg, + ECbsMemoryFullNote, + ECbsCannotSubscribeErrorNote, + ECbsMessageKeptNote, + ECbsMessageCopiedNote, + ECbsChangeNumberErrorNote, + ECbsLowMemoryErrorNote, + ENewTopicAddedDlg + }; + +// CbsUi application view ID's +enum TCbsUiViewIds + { + /// Names list view + ECbsUiTopicViewId = 1, + ECbsUiTopicListViewId, + ECbsUiListAppColumnViewId, + ECbsUiMsgViewId, + ECbsUiAddFromIndexViewId, + ECbsUiSettingsViewId + }; + +enum { EMaxTopicNumberLength = 3}; + +#endif + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,60 @@ +/* +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* The build information file of Cell Broadcast Service +* +* +*/ + +#include + +PRJ_PLATFORMS +DEFAULT + +// Help exports +#include "../help/group/bld.inf" + +PRJ_EXPORTS +./cbsuiapp_stub.SIS /epoc32/data/z/system/install/cbsuiapp_stub.sis + +../rom/CbsUiApp.iby CORE_MW_LAYER_IBY_EXPORT_PATH(CbsUiApp.iby) + +../rom/CbsUiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(CbsUiResources.iby) + +../loc/cbsuiapp.loc MW_LAYER_LOC_EXPORT_PATH(cbsuiapp.loc) + +PRJ_EXTENSIONS +START EXTENSION s60/mifconv + OPTION TARGETFILE cbsuiapp.mif + OPTION HEADERFILE cbsuiapp.mbg + OPTION SOURCEFILE iconlist.txt +END + +PRJ_EXTENSIONS +START EXTENSION s60/mifconv + OPTION TARGETFILE cbsuiapp_aif.mif + OPTION SOURCES -c8,8 qgn_menu_cb +END + +PRJ_MMPFILES +//gnumakefile cbsui_icons_scalable_dc.mk +//gnumakefile cbsui_icons_aif_scalable_dc.mk +../Group/cbsuiApp.mmp + + +PRJ_TESTMMPFILES +//../tsrc/CbsUiCVTTest.mmp + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsuiApp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsuiApp.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2002-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: +* This is project specification file for the cbsuiapp.app +* +* +*/ + +#include +#include + +TARGET cbsuiApp.exe +EPOCSTACKSIZE 0x5000 +TARGETTYPE exe + +UID 0x100039CE 0x101F4CD3 + +VENDORID VID_DEFAULT +CAPABILITY CAP_APPLICATION NetworkControl + + +SOURCEPATH ../UiSrc + +SOURCE CCbsUiappAppUi.cpp +SOURCE CCbsUiappApplication.cpp +SOURCE CCbsUiappDocument.cpp +SOURCE CCbsUiTopicListView.cpp +SOURCE CCbsUiTopicListViewContainer.cpp +SOURCE CCbsUiTopicView.cpp +SOURCE CCbsUiTopicViewContainer.cpp +SOURCE ccbsuisettingsviewcontainer.cpp +SOURCE CCbsUiMsgView.cpp +SOURCE CCbsUiMsgViewContainer.cpp +SOURCE CCbsUiAddFromIndexDialog.cpp +SOURCE CCbsUiSettingsMonitor.cpp +SOURCE CCbsUiTopicListMonitor.cpp +SOURCE CCbsUiSettingsView.cpp +SOURCE CCbsUiListQueryDialog.cpp +SOURCE CCbsUiLanguageSettingPage.cpp +SOURCE CCbsUiEditTopicDlg.cpp +SOURCE CbsUiUtility.cpp +SOURCE CbsUiPanic.cpp +SOURCE ccbsuiviewfactory.cpp +SOURCE RCbsUi.cpp + + +START RESOURCE ../Group/cbsuiApp.rss +TARGETPATH APP_RESOURCE_DIR +HEADER +LANGUAGE_IDS +END // RESOURCE + +START RESOURCE ../Group/CbsUiApp_reg.rss +DEPENDS cbsuiapp.rsg +TARGETPATH /private/10003a3f/apps +END // RESOURCE + +USERINCLUDE . ../UiInc ../AIF +SYSTEMINCLUDE ../../../inc +USERINCLUDE ../loc + +// app layer used due to xSymbian header relocation +APP_LAYER_SYSTEMINCLUDE + +LIBRARY bafl.lib +LIBRARY euser.lib +LIBRARY apparc.lib +LIBRARY cone.lib +LIBRARY eikcore.lib +LIBRARY eikcoctl.lib +LIBRARY eikctl.lib +LIBRARY avkon.lib +LIBRARY cbsclient.lib +LIBRARY eikdlg.lib +LIBRARY etext.lib +LIBRARY commonui.lib +LIBRARY commonengine.lib +LIBRARY EGUL.LIB +LIBRARY FORM.LIB +LIBRARY hlplch.lib // Help application +LIBRARY FeatMgr.lib +LIBRARY aknnotify.lib // Soft notifications +LIBRARY sysutil.lib // FFS critical level check +LIBRARY AknSkins.lib // Skins support +library efsrv.lib // TParse +LIBRARY centralrepository.lib +LIBRARY cdlengine.lib +LIBRARY AknLayout2Scalable.lib +LIBRARY gdi.lib + + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsuiApp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsuiApp.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1482 @@ +/* +* Copyright (c) 2002-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: Resource file for cbs ui application. +* +* +*/ + + +// RESOURCE IDENTIFIER +NAME LIST + + +// INCLUDES +#include +#include +#include +#include +#include +#include +#include +#include +#include // AVKON_ICON_FILE( Path to avkon.mbm file ) +#include +#include "Cbsuiapp.hrh" +#include + + +#define cbs_image_library "Z:\\resource\\apps\\cbsuiapp.mbm" + + + +// --------------------------------------------------------- +// +// Standard resource file signature +// +// --------------------------------------------------------- +// +RESOURCE RSS_SIGNATURE { } + +// --------------------------------------------------------- +// +// App caption and default filename +// +// --------------------------------------------------------- +// +RESOURCE TBUF + { + buf = "Cbsuiapp"; + } + +// --------------------------------------------------------- +// +// App information +// +// --------------------------------------------------------- +// +RESOURCE EIK_APP_INFO + { + } + + +//---------------------------------------------------- +// +// r_cbsuiapp_localisable_app_info +// Localisable app info +// +//---------------------------------------------------- +// +RESOURCE LOCALISABLE_APP_INFO r_cbsuiapp_localisable_app_info + { + short_caption = qtn_cb_title_grid; + caption_and_icon = + CAPTION_AND_ICON_INFO + { + caption = qtn_cb_title_cbs; +#ifdef __SCALABLE_ICONS + number_of_icons = 1; + icon_file = "Z:\\resource\\apps\\CBSUIAPP_aif.mif"; +#else // !__SCALABLE_ICONS + number_of_icons = 2; + icon_file = "Z:\\resource\\apps\\CBSUIAPP_aif.mbm"; +#endif // __SCALABLE_ICONS + }; + } + + + + +// RESOURCE DEFINITIONS +// --------------------------------------------------------- +// +// r_cbsui_msgview +// Message view. +// +// --------------------------------------------------------- +// +RESOURCE AVKON_VIEW r_cbsui_msgview + { + menubar = r_cbsui_msgview_menubar; + cba = r_cbs_softkeys_options_back__contextoptions; + } + + +// --------------------------------------------------------- +// +// r_cbsui_msgview_menubar +// Message view menu bar definition. +// +// --------------------------------------------------------- +// +RESOURCE MENU_BAR r_cbsui_msgview_menubar + { + titles = + { + MENU_TITLE + { + menu_pane = r_cbsui_msgview_menu; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_msgview_menu +// Message view menu. +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_cbsui_msgview_menu + { + items = + { + MENU_ITEM + { + command = ECbsUiappCmdMsgMenuKeep; + txt = qtn_cb_cmd_keep_topic; + }, + MENU_ITEM + { + command = ECbsUiappCmdMsgMenuDelete; + txt = qtn_cb_cmd_del_msg; + }, + MENU_ITEM + { + command = ECbsUiCmdCopyToClipboard; + txt = qtn_cb_cmd_copy_clip; + }, + MENU_ITEM + { + command = EAknCmdHelp; + txt = qtn_options_help; + }, + MENU_ITEM + { + command = EAknCmdExit; + txt = qtn_cb_cmd_exit; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_topicview +// Topic view. +// +// --------------------------------------------------------- +// +RESOURCE AVKON_VIEW r_cbsui_topicview + { + menubar = r_cbsui_topicview_menubar; + cba = r_cbs_softkeys_options_back__open; + } + + +// --------------------------------------------------------- +// +// r_cbsui_topicview_menubar +// Topic view menu bar. +// +// --------------------------------------------------------- +// +RESOURCE MENU_BAR r_cbsui_topicview_menubar + { + titles= + { + MENU_TITLE + { + menu_pane = r_cbsui_topicview_menu; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_topicview_menu +// Topic view menu. +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_cbsui_topicview_menu + { + items= + { + MENU_ITEM + { + command = ECbsUiappCmdTopicMenuRead; + txt=qtn_cb_cmd_msg_open; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdTopicMenuKeep; + txt=qtn_cb_cmd_keep_topic; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdMessageDelete; + txt=qtn_cb_cmd_del_msg; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = EAknCmdHelp; + txt = qtn_options_help; + }, + MENU_ITEM + { + command = EAknCmdExit; + txt=qtn_cb_cmd_exit; + } + }; + } + +// --------------------------------------------------------- +// +// r_cbs_softkeys_options_exit__open +// Topic list view softkeys. +// +// --------------------------------------------------------- +// + +RESOURCE CBA r_cbs_softkeys_options_exit__open + { + flags = 0; + buttons = + { + CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;}, + CBA_BUTTON {id=EAknSoftkeyExit; txt= text_softkey_exit;}, + CBA_BUTTON {id=ECbsUiappCmdSwitchOpen; txt=qtn_msk_open;} + }; + } + +// --------------------------------------------------------- +// +// r_cbs_softkeys_options_back__open +// Topic view softkeys. +// +// --------------------------------------------------------- +// + +RESOURCE CBA r_cbs_softkeys_options_back__open + { + flags = 0; + buttons = + { + CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;}, + CBA_BUTTON {id=EAknSoftkeyBack; txt= text_softkey_back;}, + CBA_BUTTON {id=ECbsUiappCmdTopicMSKRead; txt=qtn_msk_open;} + }; + } + +// --------------------------------------------------------- +// +// r_cbs_softkeys_options_back__contextoptions +// Message view context sensitive softkeys. +// +// --------------------------------------------------------- +// + +RESOURCE CBA r_cbs_softkeys_options_back__contextoptions + { + flags = 0; + buttons = + { + CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;}, + CBA_BUTTON {id=EAknSoftkeyBack; txt= text_softkey_back;}, + CBA_BUTTON {id=EAknSoftkeyContextOptions; txt=text_softkey_option;} + }; + } + +// --------------------------------------------------------- +// +// r_cbs_softkeys_options_back__change +// Settings view softkeys. +// +// --------------------------------------------------------- +// + +RESOURCE CBA r_cbs_softkeys_options_back__change + { + flags = 0; + buttons = + { + CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;}, + CBA_BUTTON {id=EAknSoftkeyBack; txt= text_softkey_back;}, + CBA_BUTTON {id=EAknSoftkeyChange; txt=qtn_msk_change;} + }; + } + +// --------------------------------------------------------- +// +// r_cbsui_topiclistview +// Topic list view. +// +// --------------------------------------------------------- +// +RESOURCE AVKON_VIEW r_cbsui_topiclistview + { + menubar = r_cbsui_topiclistview_menubar; + cba = r_cbs_softkeys_options_exit__open; + } + + +// --------------------------------------------------------- +// +// r_cbsui_topiclistview_menubar +// Topic list view menu bar. +// +// --------------------------------------------------------- +// +RESOURCE MENU_BAR r_cbsui_topiclistview_menubar + { + titles= + { + MENU_TITLE + { + menu_pane = r_cbsui_topiclistview_menu; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_topiclistview_menu +// Topic list view menu. +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_cbsui_topiclistview_menu + { + items= + { + MENU_ITEM + { + command = ECbsUiappCmdSwitchOpen; + txt=qtn_cb_cmd_open; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchSubscribe; + txt=qtn_cb_cmd_subscribe; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchUnsubscribe; + txt=qtn_cb_cmd_unsubscribe; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchHotmark; + txt=qtn_cb_cmd_hotmark; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchUnhotmark; + txt=qtn_cb_cmd_unhotmark; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchTopic; + cascade = r_cbsui_topic_menu; + txt = qtn_cb_cmd_topic; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchSettings; + txt=qtn_cb_cmd_settings; + }, + MENU_ITEM + { + command = EAknCmdHelp; + txt = qtn_options_help; + }, + MENU_ITEM + { + command = EAknCmdExit; + txt = qtn_cb_cmd_exit; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_topic_menu +// Topic sub menu. +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_cbsui_topic_menu + { + items= + { + MENU_ITEM + { + command = ECbsUiappCmdSwitchAddManually; + txt = qtn_cb_topic_add_man; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchAddFromIndex; + txt = qtn_cb_topic_add_f_index; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchEdit; + txt = qtn_cb_topic_edit; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchDelete; + txt = qtn_cb_topic_delete; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdSwitchDeleteAll; + txt = qtn_cb_topic_delete_all; + } + }; + } + + +// --------------------------------------------------------- +// +// r_delete_topic_confirmation_query +// Query for topic deletion. +// +// --------------------------------------------------------- +// +RESOURCE DIALOG r_delete_topic_confirmation_query + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_YES_NO; + + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + label = qtn_cb_query_delete_topic; + }; + } + }; + } + + +// --------------------------------------------------------- +// +// r_delete_msg_confirmation_query +// Query for message deletion. +// +// --------------------------------------------------------- +// +RESOURCE DIALOG r_delete_msg_confirmation_query + { + flags = EGeneralQueryFlags; + + buttons = R_AVKON_SOFTKEYS_YES_NO; + + items= + { + DLG_LINE + { + type=EAknCtQuery; + id=EGeneralQuery; + control= AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationQueryLayout; + label = qtn_cb_note_delete_msg; + }; + } + }; + } + + +// --------------------------------------------------------- +// +// r_delete_all_topics_confirmation_query +// Query for all topics deletion. +// +// --------------------------------------------------------- +// +RESOURCE DIALOG r_delete_all_topics_confirmation_query + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_YES_NO; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + label = qtn_cb_query_delete_all_topic; + }; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbs_add_from_index_dialog +// Add from index dialog. +// +// --------------------------------------------------------- +// +RESOURCE DIALOG r_cbs_add_from_index_dialog + { + flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | + EEikDialogFlagFillAppClientRect | + EEikDialogFlagCbaButtons | EEikDialogFlagWait; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL__MARK; + items = + { + DLG_LINE + { + id = ECbsUiAddFromIndexDlgLine; + type = EAknCtSingleGraphicListBox; + itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys; + control = LISTBOX + { + flags = EAknListBoxMultiselectionList | + EAknListBoxStylusMultiselectionList; + height = 5; + }; + } + }; + } + + +// --------------------------------------------------------- +// +// r_qtn_cb_title_cbs +// Text for cbs title pane. +// +// --------------------------------------------------------- +// +RESOURCE TITLE_PANE r_qtn_cb_title_cbs + { + txt = qtn_cb_title_cbs; + } + + +// --------------------------------------------------------- +// +// r_qtn_cb_title_add_topics +// Title pane for add from index dialog. +// +// --------------------------------------------------------- +// +RESOURCE TITLE_PANE r_qtn_cb_title_add_topics + { + txt = qtn_cb_title_addtopics; + } + + +// --------------------------------------------------------- +// +// r_qtn_cb_ad_sel_top +// In add from index dialog. (Select topics...) +// +// --------------------------------------------------------- +// +RESOURCE NAVI_DECORATOR r_qtn_cb_ad_sel_top + { + type = ENaviDecoratorLabel; + control = NAVI_LABEL + { + txt = qtn_cb_ad_sel_top; + }; + } + + +// --------------------------------------------------------- +// +// r_cb_tl_no_new_messages +// Text No new messages. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_cb_tl_no_new_messages + { + buf = qtn_cb_tl_no_new_messages; + } + + +// --------------------------------------------------------- +// +// r_cb_tl_one_new_message +// Text One new message. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_cb_tl_one_new_message + { + buf = qtn_cb_tl_one_new_message; + } + + +// --------------------------------------------------------- +// +// r_cb_tl_new_messages +// Text ?N new messages. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_cb_tl_new_messages + { + buf = qtn_cb_tl_new_messages; + } + +/******* NOTES ******/ + + +// --------------------------------------------------------- +// +// r_text_note_msg_to_clip +// Note text. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_note_msg_to_clip + { + buf = qtn_cb_note_msg_to_clip; + } + + +// --------------------------------------------------------- +// +// r_text_note_number_error +// Note text. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_note_number_error + { + buf = qtn_cb_note_change_number; + } + + +// --------------------------------------------------------- +// +// r_text_note_memory_full_error +// Note text. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_note_memory_full_error + { + buf = qtn_cb_note_mem_full_del_msg; + } + + +// --------------------------------------------------------- +// +// r_text_note_cannot_subscribe_error +// Note text. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_note_cannot_subscribe_error + { + buf = qtn_cb_note_can_not_subs; + } + + +// --------------------------------------------------------- +// +// r_text_note_msg_kept +// Note text. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_note_msg_kept + { + buf = qtn_logs_info_msg_kept; + } + + +// --------------------------------------------------------- +// +// r_text_note_new_topic_added +// Note text. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_note_new_topic_added + { + buf = qtn_cb_note_new_to_added; + } + +/******* NOTES END ******/ + + + +// --------------------------------------------------------- +// +// r_edit_topic_query +// Dialog for editing topic. +// +// --------------------------------------------------------- +// +RESOURCE DIALOG r_edit_topic_query + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtMultilineQuery; + id = EMultilineFirstLine; + control = AVKON_DATA_QUERY + { + layout = EMultiDataFirstEdwinAllowEmpty; + label = qtn_cb_litext_name; + control = EDWIN + { + flags = 0; + width = 5; + lines = 1; + maxlength = 20; + }; + }; + }, + DLG_LINE + { + type = EAknCtMultilineQuery; + id = EMultilineSecondLine; + control = AVKON_DATA_QUERY + { + layout = EMultiDataSecondEdwin; + label = qtn_cb_litext_number; + control = EDWIN + { + flags = 0; + avkon_flags = EAknEditorFlagSupressShiftMenu; + width = 5; + lines = 1; + maxlength = EMaxTopicNumberLength; + allowed_input_modes = EAknEditorNumericInputMode; + default_input_mode = EAknEditorNumericInputMode; + numeric_keymap = EAknEditorPlainNumberModeKeymap; + }; + }; + } + }; + } + + +// --------------------------------------------------------- +// +// r_msg_reader +// Resource definition for message reading component. +// +// --------------------------------------------------------- +// +RESOURCE RTXTED r_msg_reader + { + width = 176; + height = 142; // 144 for whole window + numlines = 7; + + flags = EEikEdwinNoHorizScrolling | EEikEdwinNoAutoSelection | + EEikEdwinWidthInPixels | EEikEdwinInclusiveSizeFixed; + } + + +// --------------------------------------------------------- +// +// r_plural_topic_added +// Topic count information +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_plural_topic_added + { + buf = qtn_cb_note_new_tos_added; + } + + + +// --------------------------------------------------------- +// +// r_checkbox_icons +// Array for check box icons +// +// --------------------------------------------------------- +// +RESOURCE AKN_ICON_ARRAY r_checkbox_icons + { + bmpfile = AVKON_ICON_FILE; + icons = + { + AKN_ICON + { + iconId = EMbmAvkonQgn_indi_checkbox_on; + maskId = EMbmAvkonQgn_indi_checkbox_on_mask; + }, + AKN_ICON + { + iconId = EMbmAvkonQgn_indi_checkbox_off; + maskId = EMbmAvkonQgn_indi_checkbox_off_mask; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbs_image_library +// Locations to the cbs image library. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_cbs_image_library + { + buf = cbs_image_library; + } + + +// --------------------------------------------------------- +// +// r_cbsui_msg_keep_and_delete_context_menubar +// Context menu bar for delete and keep. +// +// --------------------------------------------------------- +// +RESOURCE MENU_BAR r_cbsui_msg_keep_and_delete_context_menubar + { + titles= + { + MENU_TITLE + { + menu_pane = r_cbsui_msg_keep_and_delete_context_menu; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_msg_keep_and_delete_context_menu +// Context menu for keep and delete. +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_cbsui_msg_keep_and_delete_context_menu + { + items= + { + MENU_ITEM + { + command = ECbsUiappCmdMsgMenuKeep; + txt = qtn_cb_cmd_keep_topic; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = ECbsUiappCmdMsgMenuDelete; + txt = qtn_cb_cmd_del_msg; + flags = EEikMenuItemSpecific; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_msg_delete_context_menubar +// Context menu bar for delete. +// +// --------------------------------------------------------- +// +RESOURCE MENU_BAR r_cbsui_msg_delete_context_menubar + { + titles = + { + MENU_TITLE + { + menu_pane = r_cbsui_msg_delete_context_menu; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_msg_delete_context_menu +// Context menu pane for delete. +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_cbsui_msg_delete_context_menu + { + items= + { + MENU_ITEM + { + command = ECbsUiappCmdMsgMenuDelete; + txt = qtn_cb_cmd_del_msg; + flags = EEikMenuItemSpecific; + } + }; + } + + +/** +* Settings view. +*/ + + +// --------------------------------------------------------- +// +// r_cbsui_settingsview +// Settings view. +// +// --------------------------------------------------------- +// +RESOURCE AVKON_VIEW r_cbsui_settingsview + { + menubar = r_cbsui_settingsview_menubar; + cba = r_cbs_softkeys_options_back__change; + } + + + +// --------------------------------------------------------- +// +// r_cbsui_settingsview_menubar +// Settings view. +// +// --------------------------------------------------------- +// +RESOURCE MENU_BAR r_cbsui_settingsview_menubar + { + titles = + { + MENU_TITLE + { + menu_pane = r_cbsui_settingsview_file_menu; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbsui_settingsview_file_menu +// Settings view. +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_cbsui_settingsview_file_menu + { + items= + { + MENU_ITEM + { + command = ECbsUiappSettingsViewCmdChange; + txt = qtn_mce_settings_change; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { + command = EAknCmdHelp; + txt = qtn_options_help; + }, + MENU_ITEM + { + command = EAknCmdExit; + txt = qtn_mce_settings_exit; + } + }; + } + + +// --------------------------------------------------------- +// +// cbs_long_array +// Array for LONG items. +// +// --------------------------------------------------------- +// + +STRUCT CBS_LONG_ARRAY + { + LONG elements[]; + } + + +// --------------------------------------------------------- +// +// r_cbs_date_format_array +// Array for date and time formats, which are added +// to the end of each CBS message and in this order. +// --------------------------------------------------------- +// +RESOURCE CBS_LONG_ARRAY r_cbs_date_format_array + { + elements = + { + R_QTN_DATE_USUAL, + R_QTN_TIME_USUAL + }; + } + + +// --------------------------------------------------------- +// +// r_text_reception +// Text reception on. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_reception + { + buf = qtn_mce_settings_cb_reception; + } + + +// --------------------------------------------------------- +// +// r_text_topic_detection +// Text Topic detection. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_topic_detection + { + buf = qtn_mce_settings_cb_topic; + } + + +// --------------------------------------------------------- +// +// r_text_reception_on +// Text reception on. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_reception_on + { + buf = " \t"qtn_mce_settings_cb_reception"\t\t"qtn_mce_settings_cb_re_on; + } + + +// --------------------------------------------------------- +// +// r_text_reception_off +// Text reception off. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_reception_off + { + buf = " \t"qtn_mce_settings_cb_reception"\t\t"qtn_mce_settings_cb_re_off; + } + + +// --------------------------------------------------------- +// +// r_text_detection_on +// Text detection on. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_detection_on + { + buf = " \t"qtn_mce_settings_cb_topic"\t\t"qtn_mce_settings_cb_topic_detection_on; + } + + +// --------------------------------------------------------- +// +// r_text_detection_off +// Text detection off. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_detection_off + { + buf = " \t"qtn_mce_settings_cb_topic"\t\t"qtn_mce_settings_cb_topic_detection_off; + } + + +// --------------------------------------------------------- +// +// r_text_language +// Text language. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_language + { + buf = " \t"qtn_mce_settings_cb_language"\t\t"; + } + + +// --------------------------------------------------------- +// +// r_text_language_all +// Text Language all. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_language_all + { + buf = " \t"qtn_mce_settings_cb_language"\t\t"qtn_mce_settings_cb_all; + } + + +// --------------------------------------------------------- +// +// r_text_language_selected +// Text language selected. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_language_selected + { + buf = " \t"qtn_mce_settings_cb_language"\t\t"qtn_mce_settings_cb_selected; + } + + +// --------------------------------------------------------- +// +// r_text_language_other +// Text Language Other. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_language_other + { + buf = " \t"qtn_mce_settings_cb_language"\t\t"qtn_mce_settings_cb_other; + } + + + + +// --------------------------------------------------------- +// +// r_listbox_language +// List box for languages. +// +// --------------------------------------------------------- +// +RESOURCE LISTBOX r_listbox_language + { + flags = EEikListBoxMultipleSelection; + } + + +// --------------------------------------------------------- +// +// r_language_setting_page +// Dialog for the All and Selected values. +// +// --------------------------------------------------------- +// +RESOURCE AVKON_SETTING_PAGE r_language_setting_page + { + label = qtn_mce_settings_cb_language; + softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL; + type = EAknSetListBox; + editor_resource_id = r_listbox_language; + } + + +// --------------------------------------------------------- +// +// r_on_off_setting_page +// Dialog for the All, Selected and Other. +// +// --------------------------------------------------------- +// +RESOURCE AVKON_SETTING_PAGE r_on_off_setting_page + { + label = qtn_mce_settings_cb_reception; + softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL; + type = EAknSetListBox; + editor_resource_id = r_listbox_language; + } + + + +// --------------------------------------------------------- +// +// r_language_multiselection_list_query +// Resource structure for CCbsUiListQueryDialog. +// +// --------------------------------------------------------- +// +RESOURCE AVKON_MULTISELECTION_LIST_QUERY r_language_multiselection_list_query + { + softkeys = R_AVKON_SOFTKEYS_OK_CANCEL__MARK; + + items = + { + AVKON_MULTISELECTION_LIST_QUERY_DLG_LINE + { + control = AVKON_LIST_QUERY_CONTROL + { + listtype = EAknCtSingleGraphicPopupMenuListBox; + listbox = AVKON_MULTISELECTION_LIST_QUERY_LIST + { + flags = EAknListBoxMultiselectionList | EAknListBoxPointerMultiselectionList; + array_id = r_cbs_languages_array; + }; + heading = qtn_mce_settings_cb_quest_langu; + }; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbs_languages_array +// Array for languages. +// +// --------------------------------------------------------- +// +RESOURCE ARRAY r_cbs_languages_array + { + items = + { + LBUF + { + txt = "1\t" qtn_mce_settings_cb_german; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_english; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_italian; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_french; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_spanish; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_dutch; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_swedish; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_danish; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_portuguese; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_finnish; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_norwegian; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_greek; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_turkish; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_hungarian; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_polish; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_czech; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_hebrew; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_arabic; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_russian; + }, + LBUF + { + txt = "1\t" qtn_mce_settings_cb_icelandic; + } + }; + } + + + +// --------------------------------------------------------- +// +// r_cbs_language_setting_page_array +// Array for languages. +// +// --------------------------------------------------------- +// +RESOURCE ARRAY r_cbs_language_setting_page_array + { + items = + { + LBUF + { + txt = qtn_mce_settings_cb_all; + }, + LBUF + { + txt = qtn_mce_settings_cb_selected; + }, + LBUF + { + txt = qtn_mce_settings_cb_other; + } + }; + } + + +// --------------------------------------------------------- +// +// r_cbs_on_off_array +// Array for on and off values. +// +// --------------------------------------------------------- +// +RESOURCE ARRAY r_cbs_on_off_array + { + items = + { + LBUF + { + txt = qtn_mce_settings_cb_re_on; + }, + LBUF + { + txt = qtn_mce_settings_cb_re_off; + } + }; + } + + + +// --------------------------------------------------------- +// +// r_cbs_topic_detection_on_off_array +// Array for topic detection on and off values. +// +// --------------------------------------------------------- +// +RESOURCE ARRAY r_cbs_topic_detection_on_off_array + { + items = + { + LBUF + { + txt = qtn_mce_settings_cb_topic_detection_on; + }, + LBUF + { + txt = qtn_mce_settings_cb_topic_detection_off; + } + }; + } + + + +// --------------------------------------------------------- +// +// r_message_location_in_topic +// Text in navi pane in message view. +// +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_message_location_in_topic + { + buf = qtn_cb_msg_message; + } + + + +// --------------------------------------------------------- +// +// r_qtn_offline_not_possible +// Error note text when offline mode is on and user try +// to set reception on. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_offline_not_possible + { + buf = qtn_offline_not_possible; + } + + +// --------------------------------------------------------- +// +// r_qtn_offline_not_possible_sap +// The note that is shown when the user attempts to connect +// the network when in SIM Access Profile mode. +// +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_offline_not_possible_sap + { + buf = qtn_offline_not_possible_sap; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsui_icons_aif_bitmaps.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsui_icons_aif_bitmaps.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,53 @@ +# +# Copyright (c) 2003 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: +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z +else +ZDIR=\epoc32\data\z +endif + + +TARGETDIR=$(ZDIR)\system\apps\cbsuiapp +ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp_aif.mbm + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + + +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c8,8 qgn_menu_cb_cxt.bmp \ + /c8,8 qgn_menu_cb_lst.bmp + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsui_icons_aif_bitmaps_dc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsui_icons_aif_bitmaps_dc.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,69 @@ +# +# Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z +else +ZDIR=\epoc32\data\z +endif + +# ---------------------------------------------------------------------------- +# Configure these +# ---------------------------------------------------------------------------- + +TARGETDIR=$(ZDIR)\resource\apps +ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp_aif.mbm + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# Configure these. +# +# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- + +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c8,8 qgn_menu_cb_cxt.bmp \ + /c8,8 qgn_menu_cb_lst.bmp + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing + \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsui_icons_aif_scalable.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsui_icons_aif_scalable.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,52 @@ +# +# Copyright (c) 2003 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: +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z +else +ZDIR=\epoc32\data\z +endif + + +TARGETDIR=$(ZDIR)\system\apps\cbsuiapp +ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp_aif.mif + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + + +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c8,8 qgn_menu_cb.svg + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsui_icons_aif_scalable_dc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsui_icons_aif_scalable_dc.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,68 @@ +# +# Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z +else +ZDIR=\epoc32\data\z +endif + +# ---------------------------------------------------------------------------- +# Configure these +# ---------------------------------------------------------------------------- + +TARGETDIR=$(ZDIR)\resource\apps +ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp_aif.mif + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# Configure these. +# +# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- + +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c8,8 qgn_menu_cb.svg + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing + \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsui_icons_bitmaps.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsui_icons_bitmaps.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,69 @@ +# +# Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Icon makefile for CBSUi application# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) + ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z +else + ZDIR=\epoc32\data\z +endif + +# ---------------------------------------------------------------------------- +# Configure these +# ---------------------------------------------------------------------------- + +TARGETDIR=$(ZDIR)\system\data +HEADERDIR=\epoc32\include +ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp.mif +HEADERFILENAME=$(HEADERDIR)\cbsuiapp.mbg + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# CBSUi icons +# ---------------------------------------------------------------------------- + +RESOURCE : + mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ + /c8,1 qgn_indi_cb_hot_add.bmp \ + /c8,1 qgn_indi_cb_kept_add.bmp \ + /c8,8 qgn_menu_cb_2_cxt.bmp \ + /c8,8 qgn_menu_cb_cxt.bmp \ + /c8,1 qgn_prop_cb_msg.bmp \ + /c8,1 qgn_prop_cb_msg_unread.bmp \ + /c8,1 qgn_prop_cb_subs.bmp \ + /c8,1 qgn_prop_cb_subs_unread.bmp \ + /c8,1 qgn_prop_cb_unsubs.bmp \ + /c8,1 qgn_prop_cb_unsubs_unread.bmp + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(HEADERFILENAME)&& \ + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsui_icons_bitmaps_dc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsui_icons_bitmaps_dc.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,82 @@ +# +# Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z +else +ZDIR=\epoc32\data\z +endif + +# ---------------------------------------------------------------------------- +# Configure these +# ---------------------------------------------------------------------------- + +TARGETDIR=$(ZDIR)\resource\apps +ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp.mif + +HEADERDIR=\epoc32\include +HEADERFILENAME=$(HEADERDIR)\cbsuiapp.mbg + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# Configure these. +# +# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2, \s60\bitmaps. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- + +RESOURCE : + mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ + /c8,1 qgn_indi_cb_hot_add.bmp \ + /c8,1 qgn_indi_cb_kept_add.bmp \ + /c8,8 qgn_menu_cb_2_cxt.bmp \ + /c8,8 qgn_menu_cb_cxt.bmp \ + /c8,1 qgn_prop_cb_msg.bmp \ + /c8,1 qgn_prop_cb_msg_unread.bmp \ + /c8,1 qgn_prop_cb_subs.bmp \ + /c8,1 qgn_prop_cb_subs_unread.bmp \ + /c8,1 qgn_prop_cb_unsubs.bmp \ + /c8,1 qgn_prop_cb_unsubs_unread.bmp + + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(HEADERFILENAME)&& \ + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing + \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsui_icons_scalable.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsui_icons_scalable.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,69 @@ +# +# Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: Icon makefile for CBSUi application# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) + ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z +else + ZDIR=\epoc32\data\z +endif + +# ---------------------------------------------------------------------------- +# Configure these +# ---------------------------------------------------------------------------- + +TARGETDIR=$(ZDIR)\system\data +HEADERDIR=\epoc32\include +ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp.mif +HEADERFILENAME=$(HEADERDIR)\cbsuiapp.mbg + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# CBSUi icons +# ---------------------------------------------------------------------------- + +RESOURCE : + mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ + /c8,1 qgn_indi_cb_hot_add.bmp \ + /c8,1 qgn_indi_cb_kept_add.bmp \ + /c8,8 qgn_menu_cb_2.svg \ + /c8,8 qgn_menu_cb.svg \ + /c8,1 qgn_prop_cb_msg.bmp \ + /c8,1 qgn_prop_cb_msg_unread.bmp \ + /c8,1 qgn_prop_cb_subs.bmp \ + /c8,1 qgn_prop_cb_subs_unread.bmp \ + /c8,1 qgn_prop_cb_unsubs.bmp \ + /c8,1 qgn_prop_cb_unsubs_unread.bmp + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(HEADERFILENAME)&& \ + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsui_icons_scalable_dc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsui_icons_scalable_dc.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,81 @@ +# +# Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z +else +ZDIR=\epoc32\data\z +endif + +# ---------------------------------------------------------------------------- +# Configure these +# ---------------------------------------------------------------------------- + +TARGETDIR=$(ZDIR)\resource\apps +ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp.mif + +HEADERDIR=\epoc32\include +HEADERFILENAME=$(HEADERDIR)\cbsuiapp.mbg + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# Configure these. +# +# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2, \s60\bitmaps. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- + +RESOURCE : + mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ + /c8,1 qgn_indi_cb_hot_add.bmp \ + /c8,1 qgn_indi_cb_kept_add.bmp \ + /c8,8 qgn_menu_cb_2.svg \ + /c8,8 qgn_menu_cb.svg \ + /c8,1 qgn_prop_cb_msg.bmp \ + /c8,1 qgn_prop_cb_msg_unread.bmp \ + /c8,1 qgn_prop_cb_subs.bmp \ + /c8,1 qgn_prop_cb_subs_unread.bmp \ + /c8,1 qgn_prop_cb_unsubs.bmp \ + /c8,1 qgn_prop_cb_unsubs_unread.bmp + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(HEADERFILENAME)&& \ + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing + \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsuiapp.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsuiapp.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,33 @@ +; +; 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: +; +; Languages +&EN + +; Header +#{"CbsUI patch"},(0x101F4CD3),10,1,0,TYPE=PU + +; Localised Vendor name +%{"Nokia"} + +; Unique Vendor name +:"Nokia" + +;Files +"\epoc32\release\armv5\urel\cbsuiapp.exe"-"!:\sys\bin\cbsuiapp.exe" +"\epoc32\data\z\resource\apps\cbsuiapp.rsc"-"!:\resource\apps\cbsuiapp.rsc" +"\epoc32\data\z\resource\apps\cbsuiapp_aif.mif"-"!:\resource\apps\cbsuiapp_aif.mif" +"\epoc32\data\z\resource\apps\cbsuiapp.mif"-"!:\resource\apps\cbsuiapp.mif" +"\epoc32\data\z\private\10003a3f\apps\cbsuiapp_reg.rsc"-"!:\private\10003a3f\import\apps\cbsuiapp_reg.rsc" diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsuiapp_stub.SIS Binary file cbs/cbsui/Group/cbsuiapp_stub.SIS has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/cbsuiapp_stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/cbsuiapp_stub.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,33 @@ +; +; 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: +; +; Languages +&EN + +; Header +#{"CbsUI"}, (0x101F4CD3), 1, 0, 0, TYPE=SA + +; Localised Vendor name +%{"Nokia"} + +; Unique Vendor name +:"Nokia" + +;Files +""-"z:\sys\bin\cbsuiapp.exe" +""-"z:\resource\apps\cbsuiapp.rsc" +""-"z:\resource\apps\cbsuiapp_aif.mif" +""-"z:\resource\apps\cbsuiapp.mif" +""-"z:\private\10003a3f\import\apps\cbsuiapp_reg.rsc" diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/Group/iconlist.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/Group/iconlist.txt Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,10 @@ +-c8,1 qgn_indi_cb_hot_add +-c8,1 qgn_indi_cb_kept_add +-c8,8 qgn_menu_cb_2 +-c8,8 qgn_menu_cb +-c8,1 qgn_prop_cb_msg +-c8,1 qgn_prop_cb_msg_unread +-c8,1 qgn_prop_cb_subs +-c8,1 qgn_prop_cb_subs_unread +-c8,1 qgn_prop_cb_unsubs +-c8,1 qgn_prop_cb_unsubs_unread \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUIMsgView.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUIMsgView.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,362 @@ +/* +* Copyright (c) 2002 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: +* Class for viewing messages. +* +* +*/ + + +#ifndef __CBSMSGVIEW_H +#define __CBSMSGVIEW_H + +// INCLUDES +#include +#include +#include +#include "MCbsUiTopicMonitorObserver.h" +#include "MSaveMessageController.h" +#include "CbsUiDebug.h" + + +// FORWARD DECLARATIONS +class CCbsUiTopicView; +class CCbsUiMsgViewContainer; +class CAknNavigationDecorator; +class CFindItemMenu; +class MCbs; +class CAknNavigationControlContainer; + +// CLASS DECLARATION +/** +* It is the class for viewing messages. +*/ +class CCbsUiMsgView : public CAknView, + public MCbsUiTopicMonitorObserver, + public MSaveMessageController, + public MAknNaviDecoratorObserver + { + public: // Constructors and destructor + + /** + * Destructor. + */ + ~CCbsUiMsgView(); + + /** + * Two-phased constructor. + * + * @param aServer Reference to cbs server. + */ + static CCbsUiMsgView* NewL( MCbs& aServer ); + + private: // From MEikMenuObserver + + /* + * Adds find item and checks weather delete, keep or both of + * them should be removed. + * + * @param aResourceId resource ID for identifying the menu pane being + * initialised. + * @param aMenuPane the in-memory representation of the menu pane. + */ + void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); + + private: // From MAknNaviDecoratorObserver + + /** + * Method for handling touch events on navigator (navi pane) + * + * @param aEventID Id of the event. + */ + void HandleNaviDecoratorEventL( TInt aEventID ); + + public: // From MEikCommandObserver + + /** + * Closes context menu if it exists. + * + * @param aCommandId Command id, which has been pressed. + */ + void ProcessCommandL( TInt aCommandId ); + + public: // From CAknView + + /** + * Returns view id. + * + * @return View ID. + */ + TUid Id() const; + + /** + * Handles the command. + * + * @param aCommand menu command which user has selected from + * option menu + */ + void HandleCommandL( TInt aCommand ); + + /** + * Activates the message view. Actiovation depends on the message. + * Three variations are: normal, immediate and + * soft notification messages. + * + * @param aPrevViewId Previous view id. + * @param aCustomMessageId With this different mechanism of activations + * are used. Immediate message uses + * KCbsImmediateMessageIdInt and normal message + * uses KCbsUiCustomMessageId. If the message id + * differ from these, the message is activated + * by soft notification + * @param aCustomMessage Message content. + */ + void DoActivateL( + const TVwsViewId& aPrevViewId, + TUid aCustomMessageId, + const TDesC8& aCustomMessage ); + + /** + * Deactivates the view and destroys needed objects. + */ + void DoDeactivate(); + + public: // From MSaveMessageController, these are called from + // CbsUiUtility + + /** + * Saves a message (the saved message won't be deleted to make + * room for new messages). + * + * Return codes: + * KErrNone Message is saved. + * KErrGeneral Message not saved -- total maximum of saved + * messages reached. + * KErrNotFound Message not saved -- no message associated + * with the given handle. + * KErrDiskFull Message not saved -- FFS out of space. + * + * @param aHandle Handle to the message to be saved. + * @return Return code. + */ + TInt SaveMessage( const TCbsMessageHandle& aHandle ); + + public: + + /** + * Sets the message information to navi pane. e.g. Message 1/3. + */ + void UpdateNaviPaneL(); + + /** + * When called, next message is displayed + */ + void MoveToNextMessageL(); + + /** + * When called, previous message is displayed + */ + void MoveToPreviousMessageL(); + + /** + * Topic list or topic messages are changed. + * + * @param aEvent reason for event + * @param aTopicNumber topic number, which caused the event + */ + void TopicListChangedL( + TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber ); + + /** + * Handle changes in container when rect changes. + * Update message and set new rect to container. + */ + void HandleRectChangeInContainerL(); + + private: // Data structures + + enum TMsgViewSetHandle + { + EToNext, + EToPrevious + }; + + private: // New functions + + /** + * Creates a find item dialog and pass a message to + * it and gives the search case, what to look. + * + * @param aCommand search case + */ + void DoSearchL( TInt aCommand ); + + /** + * Removes and destroys the context menu. + */ + void CloseContextMenu(); + + /** + * Launch the context menu. + */ + void LaunchContextMenuL(); + + /** + * Deletes a old message. + */ + void DeleteOldMessage(); + + /** + * Loads a message from topic view. + * + * @return error code if Loading of message has been leaved and catched. + */ + TInt DoLoadMessageL(); + + /** + * Activates topic view with defined topic number and message handle. + * + * @param aTopicNumber which topic the message belongs + * @param aHandle which message handle is activating topic view. + */ + void ActivateTopicViewL( + TCbsTopicNumber aTopicNumber, TCbsMessageHandle aHandle); + + /** + * Sets current message handle to aMessageHandle. + * + * @param aMessageHandle message handle + */ + void SetCurrentMessageHandle( const TDesC8& aMessageHandle ); + + /** + * Loads current message buffer. + */ + void LoadMessageL(); + + /** + * Adds date and time to a aMessage. + * + * @param aTime A time when message was received. + * @param aMessage Address of actual pointer variable. So after + * reallocation real message content is also changed. + * @param aResourceArrayId Used resource array for date and time format. + */ + void AddDateAndTimeL( + const TInt64 aTime, HBufC** aMessage, TUint aResourceArrayId ) const; + + /** + * Returns topic number of current message. + * + * @return current topic number + */ + TCbsTopicNumber CurrentTopicNumber() const; + + /** + * Gets message position in topic where th aHandle belongs. + * + * @param aHandle message handle + * @param aPosition It will contain the message position in topic. + * @param aTotal It will contain the total message count in topic, + * @return error code + */ + TInt GetMessagePosition( + TCbsMessageHandle aHandle, TInt& aPosition, TInt& aTotal ); + + /** + * Sets aHandle to previous or next according to aTo + * if possible. + * + * @param aTo sets aHandle to prev or next + * @return ETrue if aHandle has been set. + */ + TBool SetHandleTo( TCbsMessageHandle& aHandle, TMsgViewSetHandle aTo ); + + /** + * Deletes a message according to a aHandle. + * + * @param aHandle handle to be deleted. + * @return ETrue if message was deleted + */ + TBool DeleteMessageL( TCbsMessageHandle aHandle ); + + /** + * Activates topic list view. + */ + void ActivateTopicListViewL() const; + + /** + * Sets current message to newest hot marked message or + * activates the topic list view. + * + * @return ETrue if new view is launched + */ + TBool HandleSoftNotificationL(); + + private: + + /** + * C++ constructor. + * + * @param aServer Reference to cbs server. + */ + CCbsUiMsgView( MCbs& aServer ); + + /** + * Two-phased constructor. + */ + void ConstructL(); + + private: // Data + + // message buffer + HBufC* iMessage; + + // Container class + CCbsUiMsgViewContainer* iContainer; + + // Navi pane variables + CAknNavigationControlContainer* iNaviContainer; + + // NaviPaneDecorator + CAknNavigationDecorator* iDecoratedLabel; + + // NaviPaneDecorator + CAknNavigationDecorator* iPreviousDecoratedLabel; + + // Find item common component + CFindItemMenu* iFindItemMenu; + + // Context sensitive menu, which appears when pushed ok key + CEikMenuBar* iContextMenu; + + // To get a topic count and messages inside + // a topic. + MCbs& iServer; + + // Tells if the message is class 0. + TBool iIsClass0; + + // Current message handle + TCbsMessageHandle iCurrentHandle; + + // True if launched from the other application. + TBool iFromOtherApplication; + + }; + +#endif //__CBSMSGVIEW_H + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUIMsgViewContainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUIMsgViewContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,245 @@ +/* +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsUiMsgViewContainer class. +* +* +*/ + + +#ifndef __CCBSUIMSGVIEWCONTAINER_H +#define __CCBSUIMSGVIEWCONTAINER_H + +// INCLUDES +#include + + +// FORWARD DECLARATIONS +class CCbsUiMsgView; +class CEikRichTextEditor; +class CRichText; +class CCbsUiMsgView; +class CEikButtonGroupContainer; +class CEikScrollBarFrame; +class CAknsBasicBackgroundControlContext; + +// CLASS DECLARATION +/** +* It is the container class viewing messages. +*/ +class CCbsUiMsgViewContainer : public CCoeControl, + public MEikScrollBarObserver + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * + * @param aMsgView Referenceo to message view. + * @param aRect Rectangle, which container can use. + */ + static CCbsUiMsgViewContainer* NewL( + CCbsUiMsgView& aMsgView, + const TRect& aRect ); + + /** + * Destructor. + */ + ~CCbsUiMsgViewContainer(); + + public: // From CCoeControl + + /** + * Returns the numbers of components. + * + * @return Number of components in the container + */ + TInt CountComponentControls() const; + + /** + * Returns a component. + * + * @param aIndex component index which is required + * @return required component + */ + CCoeControl* ComponentControl( TInt aIndex ) const; + + /** + * Sets new rectangle to the editor. + */ + void SizeChanged(); + + /** + * Handles a needed key events. + * + * @param aKeyEvent what kind of key produced this event + * @param aType Which kind of action produced this event + * @return EKeyWasConsumed + */ + TKeyResponse OfferKeyEventL( + const TKeyEvent& aKeyEvent, TEventCode aType ); + + /** + * Gets the control's help context. + * + * @param aContext The control's help context + */ + void GetHelpContext(TCoeHelpContext& aContext) const; + + public: // New functions + + /** + * Gets new message from messag view and sets the editor. + */ + void UpdateMessageL( const TDesC& aMessage ); + + /** + * Returns the text in Rich Text editor. + * + * @return the text + */ + CRichText* GetEditor() const; + + /** + * Copies the message to clipboard. + */ + void CopyToClipboardL() const; + + /** + * From CCoeControl Receives notification on resource changes + * @param aType type of the resource change + */ + void HandleResourceChange( TInt aType ); + + /** + * From MEikScrollBarObserver Receives and handles + * scroll bar events + * @param aScrollBar A pointer to scrollbar which created the event + * @param aEventType The event occured on the scroll bar + */ + void HandleScrollEventL( CEikScrollBar* aScrollBar, TEikScrollEvent aEventType ); + + private: // New functions + + /** + * Sets the viewing component to read only mode + * + * @param aReadOnly value to set to + */ + void SetReadOnly( TBool aReadOnly ); + + /** + * Sets the contents of viewing component + * + * @param aBuf A new content for editor. + */ + void SetData16L( const TDesC& aBuf ); + + /** + * Sets the contents of viewing component + * + * @param aText Text to be inserted. + */ + void SetDataContentL( CRichText& aText ); + + /** + * Created a new editor. + * + * @return Component for viewing + */ + CEikRichTextEditor* CreateEditorL() const; + + /** + * Clears the area between CEikRichTextEditor and Client regtangle. + * + * @param aRect Outer rect. + */ + void Draw( const TRect& aRect ) const; + + /** + * Initializes a variables, which are needed to create + * scroll indicator. Has to be called every time the + * content of the message has changed. + */ + void InitializeMessageInfoL(); + + /** + * Creates scroll bar indicator. + */ + void CreateScrollBarFrameL(); + + /** + * Updates the scroll indicator based on the iCurrentScreen and + * information, which has been set in the InitializeMessageInfoL() + */ + void UpdateScrollIndicatorL() const; + + /** + * Updates the current screen position. + * + * @param aIncrease direction where to modify current screen + */ + void UpdateCurrentScreen( TBool aIncrease ); + + /** + * Scrolls message up. + */ + void ScrollMessageUpL(); + + /** + * Scrolls message down. + */ + void ScrollMessageDownL(); + + private: + + /** + * Constructor. + * + * @param aListView reference to the msg view. + */ + CCbsUiMsgViewContainer( CCbsUiMsgView& aListView ); + + /** + * Two-phased constructor. + * + * @param aRect Rect to be used by this container. + */ + void ConstructL( const TRect& aRect ); + + private: // Data + + // It is the view class + CCbsUiMsgView& iMsgView; + + // It is the component for viewing message + CEikRichTextEditor* iEditor; + + // ScrollBarFrame + CEikScrollBarFrame* iSBFrame; + + // How many screens the message contains. + TInt iNumberOfScreens; + + // Current message screen. It is updated every time + // the page is changed. + TInt iCurrentScreen; + + CAknsBasicBackgroundControlContext* iBackGroundControlContext; + + }; + + +#endif // __CCBSUIMSGVIEWCONTAINER_H + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiAddFromIndexDialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiAddFromIndexDialog.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,134 @@ +/* +* 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: +* Dialog which shows topics, which are not yet +* in the topic list view. Enables topics adding manually. +* +* +*/ + + +#ifndef __CCBSADDFROMINDEXDIALOG_H +#define __CCBSADDFROMINDEXDIALOG_H + +// INCLUDES +#include +#include +#include "CbsUiConstants.h" + + +// FORWARD DECLARATIONS +class MCbs; +class CEikColumnListBox; +class CAknNavigationDecorator; + + +// CLASS DECLARATION + + +/** +* Class CCbsUiAddFromIndexDialog is used to add topics. Topics +* are shown in listbox. User can select topics which will be added. +*/ +class CCbsUiAddFromIndexDialog: public CAknDialog + { + public: // Constructors and destructor + + /** + * C++ constructor. + * + * @param aServer Reference to cbs server. + */ + CCbsUiAddFromIndexDialog( MCbs& aServer ); + + /** + * Destructor. + */ + virtual ~CCbsUiAddFromIndexDialog(); + + private: // From CEikDialog + + /** + * Creates the controls, which are shown in this dialog. + */ + void PreLayoutDynInitL(); + + /** + * Checks if the user has selected the ok softkey. In that case, + * the marked topics are send to AddTopicL member function. + * + * @param aKeycode pressed key code + * @return ETrue, to close the dialog + */ + TBool OkToExitL( TInt aKeycode ); + + private: // New functions + + /** + * Parses IndexNumber from TopicInfo. + * + * @param aTopicInfo Topic information + * @param aIndexNumber the pared index number + * @return none + */ + void GetIndexNumber( + const TCbsTopicInfo& aTopicInfo , + TBuf& aIndexNumber) const; + + /** + * Adds a Topic to the server. + * + * @param aTopicInfo Topic information + * @return error code + */ + TInt AddTopicL( const TCbsTopicInfo aTopicInfo ); + + /** + * Sets the icons to the listbox. + */ + void SetIconsL() const; + + /** + * Sets the topics to the listbox. Set Topic reads topic informations + * from cbsserver. + */ + void SetTopicsL(); + + /** + * Creates a title pane. + */ + void CreateAddFromIndexTitlePaneL() const; + + private: // Data + + // List of handles + typedef CArrayFixFlat< TCbsTopicInfo > TCbsTopicInfoHandleList; + + // pointer to a handle list + TCbsTopicInfoHandleList* iHandles; + + // Server + MCbs& iServer; + + // ListBox + CEikColumnListBox* iListBox; + + /// Own: Navi pane control + CAknNavigationDecorator* iNaviDecorator; + }; + +#endif // __CCBSADDFROMINDEXDIALOG_H + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiConfirmationNote.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiConfirmationNote.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,70 @@ +/* +* Copyright (c) 2002 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: +* Shows global confirmation note and instance of this class +* has to be a member variable. +* +* +*/ + + +#ifndef __CCbsUiConfirmationNote_h +#define __CCbsUiConfirmationNote_h + +// INCLUDES +#include + + +// FORWARD DECLARATIONS +class CAknGlobalConfirmationQuery; + +// CLASS DECLARATION + +class CCbsUiConfirmationNote : public CBase + { + public: // Constructor and destructor + + /** + * Constructor. Prohibited to make a instance. + */ + CCbsUiConfirmationNote(); + + /** + * Destructor. + */ + virtual ~CCbsUiConfirmationNote(); + + public: // New functions + + /** + * Shows global confirmation note, not enough memory... + */ + void ShowGlobalConfirmationNoteL( CCoeEnv& aCoeEnv ); + + private: + + // Own: Confirmation query + CAknGlobalConfirmationQuery* iGlobalConfirmationQuery; + + // Forward declaration + class CGlobalConfirmationQueryObserver; + + // Own: Confirmation query observer + CGlobalConfirmationQueryObserver* iConfQueryObserver; + + }; + +#endif // __CCbsUiConfirmationNote_h + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiEditTopicDlg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiEditTopicDlg.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,133 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsUiEditTopicDlg class. +* +* +*/ + + +#ifndef __CBS_UI_TOPIC_QUERY_H +#define __CBS_UI_TOPIC_QUERY_H + +// INCLUDES +#include // CAknMultiLineDataQueryDialog + + +// FORWARD DECLARATIONS +class CCbsUiTopicListView; + + +// CLASS DECLARATION + +/** +* Class CCbsUiEditTopicDlg implements a dialog for +* Edit and Add topics. +*/ +class CCbsUiEditTopicDlg : public CAknMultiLineDataQueryDialog + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * + * @param aDataText topic name + * @param aDataText2 topic number + * @param aTopicListView for adding a topic + * @param aType EFalse is Edit and ETrue is Add query + */ + static CCbsUiEditTopicDlg* NewL( + TDes& aDataText, + TDes& aDataText2, + CCbsUiTopicListView& aTopicListView, + TBool aType); + + /** + * Destructor. + */ + virtual ~CCbsUiEditTopicDlg(); + + public: // From CAknNoteDialog + + /** + * Adds or over writes topic. On error shows a error note. + * + * @param aButtonId button which has been selected + */ + TBool OkToExitL( TInt aButtonId ); + + // From CeikDialog + /** + * Handles changes required when switching to a specified line. + * + * @param aControlId The Id of the control being switched to. + */ + void LineChangedL( TInt aControlId ); + + /** + * Handles a change to the control's resources. + * @param aType A message UID value. + */ + void HandleResourceChange( TInt aType ); + + + protected: // From CAknMultiLineDataQueryDialog + + /** + * Changes left soft key to visible if number line is valid + */ + void UpdateLeftSoftKeyL(); + + private: // New functions + + /** + * Sets cursor in the end of number line. + */ + void SetCursorAndFocusL(); + + private: + + /** + * C++ constructor. + * + * @param aTopicListView for adding a topic + * @param aType EFalse is Edit and ETrue is Add query + */ + CCbsUiEditTopicDlg( + CCbsUiTopicListView& aTopicListView, + TBool aType ); + + /** + * Symbian OS constructor + * + * @param aDataText topic name + * @param aDataText2 topic number + */ + void ConstructL( TDes& aDataText, TDes& aDataText2 ); + + private: // Data + + // to add or change a topic + CCbsUiTopicListView& iTopicListView; + + // EFalse is Edit query and ETrue is Add query + const TBool iType; + + // iUpdateLeftSoftKeyFirstTime is used when update first time Left soft key method. + TBool iUpdateLeftSoftKeyFirstTime; + + }; + +#endif // __CBS_UI_TOPIC_QUERY_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiLanguageSettingPage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiLanguageSettingPage.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,122 @@ +/* +* Copyright (c) 2002 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: +* Shows which of the language setting has been selected, +* All, Selected or Other. +* +* +*/ + + +#ifndef __CBS_UI_LANGUAGE_SETTING_PAGE_H +#define __CBS_UI_LANGUAGE_SETTING_PAGE_H + +// INCLUDES +#include // CAknRadioButtonSettingPage +#include + + +// FORWARD DECLARATIONS +class MCbs; + +// CLASS DECLARATION + +/** +* This settings page is popped up if a user selects a language setting +* from the SettingsView. +*/ +class CCbsUiLanguageSettingPage : public CAknRadioButtonSettingPage + { + public: // Constructor + + /** + * C++ constructor. + * + * @param aRerourceID Resource id. + * @param aCurrentSelectionIndex item to be selected + * @param aItemArray array of items + * @param aServer to update this level selections + */ + CCbsUiLanguageSettingPage( + TInt aResourceID, + TInt& aCurrentSelectionIndex, + CDesCArrayFlat* aItemArray, + MCbs& aServer ); + + + protected: // From CEikDialog + + /** + * Sets the selected languages into the server. + * + * @param aAccept selected key + */ + TBool OkToExitL( TBool aAccept ); + + protected: // From CCoeControl + + /* + * Launches a CCbsUiLanguageDlg if EKeyOk is pressed and the focus + * is on the selected. + * + * @param aKeyEvent what kind of key produced this event + * @param aType Which kind of action produced this event + */ + TKeyResponse OfferKeyEventL( + const TKeyEvent& aKeyEvent, TEventCode aType ); + + private: // New functions + + /** + * Gets languages from the server and marks selected languages to + * aIndexArray. + * + * @param aIndexArray indexes of selected languages + * @param aLanguages it will contain selected languages from the server + */ + void GetLanguagesL( CArrayFix& aIndexArray, TCbsDbLanguages& aLanguages ); + + /** + * Launches the language dialog. + */ + void LaunchLanguageDialogL(); + + /** + * Sets selected languages into server according to aIndexArray. + * + * @param aIndexArray contains selected languages + * @param aLanguages Contains information about previously selected + * languages. + */ + void SetLanguagesL( CArrayFix& aIndexArray, TCbsDbLanguages& aLanguages ); + + private: // Data + + // The server. This class doesn't own this. + MCbs& iServer; + + // Current selection index + TInt& iSelectionIndex; + + // To update the selection + CDesCArrayFlat& iArray; + + // it should be possible to launch language dialog only once + TInt iCurrentLaunchingId; + + }; + +#endif // __CBS_UI_LANGUAGE_SETTING_PAGE_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiListQueryDialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiListQueryDialog.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,71 @@ +/* +* Copyright (c) 2002 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: +* This is a dialog which is used to shows different language options in the +* settings view +* +* +*/ + + +#ifndef __CCbsUiListQueryDialog_h +#define __CCbsUiListQueryDialog_h + +// INCLUDES +#include + + +// CLASS DECLARATION + +/** +* This is a dialog, which can be initialized with selected items. +*/ +class CCbsUiListQueryDialog : public CAknListQueryDialog + { + public: // Constructors and destructor + + /** + * C++ constructor. + * + * @param aIndexArray Sets selection indexes and will contain + * user changed indexes. + */ + CCbsUiListQueryDialog( CArrayFix& aIndexArray ); + + private: // From CEikDialog + + /** + * Sets selection indexes to list box. + */ + void PostLayoutDynInitL(); + + /** + * If the user has pushed Ok, the dialog Stores the selected + * values in to the server. + * + * @param aKeyCode key code + * @return ETrue if dialog is closed + */ + TBool OkToExitL( TInt aKeycode ); + + private: // Data + + // contains selected indexes + CArrayFix& iIndexArray; + + }; + +#endif // __CCbsUiListQueryDialog_h + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiSettingsDialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiSettingsDialog.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,57 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsUisettingsDialog class. +* +* +*/ + + +#ifndef __CCBSUISETTINGSDIALOG_H +#define __CCBSUISETTINGSDIALOG_H + +// INCLUDES +#include +#include +#include +#include +#include + + + +// CLASS DECLARATION +/** +* It is the container class viewing messages. +*/ + +class CCbsUiSettingsDialog : public CEikDialog, MEikListBoxObserver + { +public: + ~CCbsUiSettingsDialog(); + CCbsUiSettingsDialog( RCbs* aServer ); + +private: + TBool OkToExitL(TInt aButtonId); + void PreLayoutDynInitL(); + void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType ); + void HandleListViewActionL( CEikListBox* aListBox ); + +private: + CEikListBox* iInbox; + RCbs* iServer; + + }; + +#endif // __CCBSUISETTINGSDIALOG_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiSettingsMonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiSettingsMonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,110 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsUiSettingsMonitor class. +* +* +*/ + + +#ifndef CCBSUISETTINGSMONITOR_H +#define CCBSUISETTINGSMONITOR_H + +// INCLUDES +#include + +#include + + +// FORWARD DECLARATIONS +class MCbs; +class CCbsUiappAppUi; +class MCbsUiSettingsObserver; + +// CLASS DEFINITIONS + + +/** +* Server notifies this class if settings are changed. +* +*/ +class CCbsUiSettingsMonitor : public CActive + { + public: // New functions + /** + * Create an instance of the class. + * + * @param aServer cbs server + * @param aObserver settings observer + */ + static CCbsUiSettingsMonitor* NewL( + MCbs& aServer , MCbsUiSettingsObserver& aObserver ); + + /** + * Destructor. + */ + ~CCbsUiSettingsMonitor(); + + public: // From CActive + + /** + * It is called when server notifies. + */ + void RunL(); + + /** + * Cancels the request. + */ + void DoCancel(); + + private: // New functions + + /** + * Issues the request.. + */ + void IssueRequest(); + + private: + + /** + * Constructor. + * + * @param aServer cbs server + */ + CCbsUiSettingsMonitor( + MCbs& aServer, MCbsUiSettingsObserver& aObserver ); + + /** + * Finalizes the construction. + */ + void ConstructL(); + + private: // Data + + // ETrue if request is continued. + TBool iContinue; + + // Server subsession for settings + MCbs& iServer; + + // Event which is registered to server + TCbsSettingsEvent iEvent; + + // Observer who is interested about settings changes. + MCbsUiSettingsObserver& iObserver; + }; + +#endif // CCBSUISETTINGSMONITOR_H + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiSettingsView.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiSettingsView.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,194 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsSettingsView class. +* +* +*/ + + +#ifndef __CBSSETTINGSVIEW_H +#define __CBSSETTINGSVIEW_H + +// INCLUDES +#include // MAknSettingPageObserver +#include +#include +#include "MCbsUiSettingsObserver.h" + + + +// FORWARD DECLARATIONS +class CCbsUiSettingsViewContainer; +class CLanguageViewContainer; +class CAknSettingPage; +class MCbs; +class CCbsUiLanguageSettingPage; +class CAknNavigationDecorator; +class CCbsUiSettingsMonitor; + + +// CLASS DECLARATION + +/** +* This class is used from messenge center. +* With settings view cbs-settings +*/ +class CCbsUiSettingsView : public CAknView, + public MCbsUiSettingsObserver + { + public: // Constructors and destructor + + /** + * C++ constructor. + * + * @param aServer cbs server + */ + CCbsUiSettingsView( MCbs& aServer ); + + /** + * Two-phased constructor. + * + * @param aServer cbs server + */ + static CCbsUiSettingsView* NewL( MCbs& aServer ); + + /** + * Destructor. + */ + ~CCbsUiSettingsView(); + + public: // From CAknView + + /** + * Returns the ID of this view. + * + * @return ID + */ + TUid Id() const; + + /** + * Handles commands from options menu + * + * @param aCommand Command user has selected from options menu + */ + void HandleCommandL( TInt aCommand ); + + /** + * WindowServer calls when the wiev is activated + * + * @param aPrevViewId Previous view id. + * @param aCustomMessageId message id + * @param aCustomMessage message content + */ + void DoActivateL( const TVwsViewId& aPrevViewId, + TUid aCustomMessageId, + const TDesC8& aCustomMessage ); + + /** + * WindowServer calls when the wiev is deactivated + */ + void DoDeactivate(); + + public: // New functions + + /** + * Called when navigation pane needs be updated + */ + void UpdateNaviPaneL(); + + /** + * If there has come any changes to settings, then + * this function will be called. + */ + void UpdateSettingsL(); + + /** + * Sets the context pane icon. State can reception on or + * off. + */ + void UpdateContextPaneL(); + + /** + * Sets title pane text. + */ + void UpdateTitlePaneL() const; + + public: // From MCbsUiSettingsObserver + + /** + * Settings monitor calls this function when settings has been + * changed. + * + * @param aEvent What kind of event caused the settings change + */ + void SettingsChangedL( TCbsSettingsEvent aEvent ); + + /** + * Handle changes in container when rect changes. + */ + void HandleRectChangeInContainer(); + + private: // MEikMenuObserver + + /** + * Delete help menu item if help is not in use + * + * @param aResourceId resource id of the menu + * @param aMenuPane used to modify menu dynamically + */ + void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); + + private: // New functions + + /** + * Activates topic list view. + */ + void ActivateTopicListViewL() const; + + private: + + /** + * By default Symbian OS constructor is private. + */ + void ConstructL(); + + private: // Data + + // Pointer to the container class + CCbsUiSettingsViewContainer* iContainer; + + // NaviPane + CAknNavigationDecorator* iDecoratedLabel; + + // Reference to the server session. It's owned by uiappappui + MCbs& iServer; + + // Previous application and view which has louch this view + TVwsViewId iPrevViewId; + + // True if launched from the other application. + TBool iFromOtherApplication; + + // Own: Where the images are located. + HBufC* iImageLibrary; + + // Settings Monitor + CCbsUiSettingsMonitor* iSettingsMonitor; + + }; + +#endif // __CBSSETTINGSVIEW_H + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiTopicListMonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiTopicListMonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,118 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsUiTopicListMonitor class. +* +* +*/ + + +#ifndef CCBSUITOPICLISTMONITOR_H +#define CCBSUITOPICLISTMONITOR_H + +// INCLUDES +#include +#include + + +// FORWARD DECLARATIONS +class MCbs; +class MCbsUiTopicMonitorObserver; + +// CLASS DEFINITIONS + + +/** +* Monitors topic related events. +*/ +class CCbsUiTopicListMonitor : public CActive + { + public: // New functions + + /** + * Create an instance of the class. + * + * @param aServer cbs server + */ + static CCbsUiTopicListMonitor* NewL( MCbs& aServer ); + + /** + * Destructor. + */ + ~CCbsUiTopicListMonitor(); + + /** + * Issues the request. + */ + void IssueRequest(); + + public: // From CActive + + /** + * It is called when server notifies. + */ + void RunL(); + + /** + * Cancels the request. + */ + void DoCancel(); + + public: // New functions + + /** + * Adds a observer to this monitor. + * + * @param aObserver Observer to be added. + */ + void AddObserverL( MCbsUiTopicMonitorObserver* aObserver ); + + private: + + typedef CArrayFixFlat + TCbsUiMonitorObservers; + + /** + * Constructor. + * + * @param aServer cbs server + */ + CCbsUiTopicListMonitor( MCbs& aServer ); + + /** + * Finalizes the construction. + */ + void ConstructL(); + + private: // Data + + // ETrue if request is active. + TBool iContinue; + + // To issue the request. + MCbs& iServer; + + // Observers who are interested in topic changes. + // Monitor doesn't own the observers. + TCbsUiMonitorObservers* iObservers; + + // Which topic handle the event is conserning. + TCbsTopicNumber iTopicNumber; + + // What kind of event has been. + TCbsTopicListEvent iEvent; + }; + +#endif // CCBSUITOPICLISTMONITOR_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiTopicListView.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiTopicListView.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,429 @@ +/* +* Copyright (c) 2002 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: +* This is the application main view. Shows all the topics which +* has been received and their status: subscribed, hotmarked, new messages +* +* +*/ + + +#ifndef __CCBSTOPICLISTVIEW_H +#define __CCBSTOPICLISTVIEW_H + +// INCLUDES +#include +#include +#include "MCbsUiTopicMonitorObserver.h" +#include "CbsUiDebug.h" + +// CONSTANTS +const TInt KNumberOfStandardTopics = 17; + + +// FORWARD DECLARATIONS + +class CSelectionList; +class CListBoxNumbers; +class CCbsUiTopicListViewContainer; +class MCbs; +class CAknNavigationDecorator; +class CAknNavigationControlContainer; + +// CLASS DECLARATION + +/** +* This is the application main view. Shows all the topics which +* has been received and their status: subscribed, hotmarked, new messages +* +*/ +class CCbsUiTopicListView : public CAknView, + public MCbsUiTopicMonitorObserver + { + private: // Data declaration + + enum TTopicListViewFocusState + { + ESetFocusToCurrentHandle, + ESetFocusToFirstItem, + ESetFocusToNewestItem, + ENoFocusUpdate + }; + + public: // Constructors and destructor + + /** + * Creates an instance of the class. + * + * @param aServer It is the server. + * @return It returns a pointer to the created class. + */ + static CCbsUiTopicListView* NewL( MCbs& aServer ); + + /** + * Destructor. + */ + virtual ~CCbsUiTopicListView(); + + public: // New functions + + /** + * Calls the server to add or change a topic. Which is called + * depends on the type of the dialog. + * + * @param aType is it a edit or add query. True is add query + * @param aNumber topic number to add or change + * @param aName topic name to add or change + * @return error code if something goes wrong + */ + TInt EditTopic( + TBool aType, + TCbsTopicNumber aNumber, + const TCbsTopicName aName ); + + /** + * Adds a topic with specified number and name. + * + * @param aNumber It is the number of the topic. + * @param aName It is the name of the topic. + * @return a error code if the addition fails + */ + TInt AddTopic( + const TCbsTopicNumber& aNumber, + const TCbsTopicName& aName ); + + /** + * Marks topic which is focused. This should be called only when + * the Options menu is created and when the Ok (selection) key + * has been pressed. Focus behaviour is based on this. + */ + void MarkCurrentHandle(); + + public: // From MCbsUiTopicMonitorObserver + + /** + * Topic list or topic messages are changed. + * + * @param aEvent reason for event + * @param aTopicNumber Topic number, which caused the event + */ + void TopicListChangedL( + TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber ); + + public: // from CAknView + + /** + * Returns the identifier of the view. + * + * @return It returns the identifier. + */ + TUid Id() const; + + /** + * Handles the options menu commands. + * + * @param aCommand command to be executed + */ + void HandleCommandL( TInt aCommand ); + + public: // New function + /** + * Handle changes in container when rect changes. + */ + void HandleRectChangeInContainer(); + + private: // from CAknView + + /** + * Activates the view. + * + * @param aPrevViewId + * @param aCustomMessageId + */ + void DoActivateL( + const TVwsViewId& aPrevViewId, + TUid aCustomMessageId, + const TDesC8& aCustomMessage ); + + /** + * Deactivates the view. + */ + void DoDeactivate(); + + /** + * Checks new topic count, if it has been changed after + * application switch. + */ + void ViewActivatedL( + const TVwsViewId& aPrevViewId, + TUid aCustomMessageId,const + TDesC8& aCustomMessage ); + + void ViewDeactivated(); + + private: // MEikMenuObserver + + /** + * Sets the menu items according to the state of the topic, which + * is focused on. Used when options menu is opened. Marks also + * a current topic handle. + * + * @param aResourceId resource id of the menu + * @param aMenuPane used to modify menu dynamically + */ + void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); + + private: // New functions + + /** + * Sets current topic number according to aTopicNumber. + * + * @param aTopicNumber contains current topic number. + */ + void SetCurrentTopicNumber( const TDesC8& aTopicNumber ); + + /** + * Sets current topic number according to aTopicNumber. + * + * @param aTopicNumber new current topic number. + */ + void SetCurrentTopicNumber( const TCbsTopicNumber aTopicNumber ); + + /** + * Updates the topics information. + */ + void ReloadTopicsL(); + + /** + * Prepares container for reloading. + */ + void PrepareReloading(); + + /** + * Reloads topics from the server. + */ + void ReloadL(); + + /** + * Ends reloading. + */ + void EndReloadingL(); + + /** + * Sets focus after reload. Should be called after ReloadTopicsL(). + * + * @param aFocusState focus is set according to this + */ + void SetFocusAfterReload( TTopicListViewFocusState aFocusState ); + + /** + * Sets focus to aIndex. + * + * @param aIndex new focused index + */ + void SetFocusToTopic( TInt aIndex ); + + /** + * Updates the focus according to Selection Service after deletion. + * + * @param aDeletedTopic Calculates the new focus according to deleted + * topic. + */ + void UpdateCurrentTopicAfterDeletion( TCbsTopicNumber aDeletedTopic ); + + /** + * Returns the total amount of topics. + * + * @return It is the amount of topics. + */ + TInt TotalTopics() const; + + /** + * Requests the view to move to the previous topic. + */ + void MoveToPreviousTopic(); + + /** + * Writes a CBS to title pane. + */ + void UpdateTitlePaneL() const; + + /** + * Writes to navi pane a right message: + * No new messages + * One new message + * %N new messages + */ + void UpdateNaviPaneL(); + + /** + * Gets resouce id for text to be displayed. + * + * @param aUnreadMessages Number of unread messages. + * @return resource id for text + */ + TInt GetInfoResourceId( TInt aUnreadMessages ) const; + + /** + * Creates a new decorated label to navi pane. + * + * @param aResourceId text resource id. + * @param aUnreadMessages number of unread messages + */ + void CreateNewLabelL( TInt aResourceId, TInt aUnreadMessages ); + + /** + * Launches an edit or add topic query dialog. + * + * @param aType type of the query. + * ETrue is add and EFalse is edit query. + * @param aTopicName name of the topic + * @param aTopicNumber number of the topic + */ + void ShowTopicQueryL( + TBool aType, + TDes& aTopicName, + TDes& aTopicNumber ); + + /** + * Launchs the edit topic query with the right parameters. + */ + void ShowEditTopicQueryL(); + + /** + * Checks if there has come new topics while this function was + * last called. Shows a note how many new topics has been added, + * since last been in TopicListView. + */ + void CheckNewTopicCountL(); + + /** + * Returns the new topics count from server. + * + * @return new topic count + */ + TInt GetNewTopicsCount(); + + /** + * Changes the topic name and number to the specified. + * + * @param aHandle It is the handle to the topic. + * @param aNumber It is the new number of the topic. + * @param aName It is the name of the topic. + * @return error code in case fail + */ + TInt UpdateTopic( + const TCbsTopicNumber& aOldNumber, + const TCbsTopicNumber& aNumber, + const TCbsTopicName& aName ); + + /** + * Finds topic index by topic number. + * + * @param aIndex it will contain the topic index + * @param aTopicNumber topic number + * @return KErrNone if no errors + */ + TInt FindTopicIndexByNumber( + TInt& aIndex, + const TCbsTopicNumber& aTopicNumber ); + + /** + * Activates the topic view. + */ + void ActivateTopicViewL() const; + + /** + * Activates settings view. + */ + void ActivateSettingsViewL() const; + + /** + * Activates a add from index dialog. + */ + void ActivateAddFromIndexViewL(); + + /** + * Activates an idle object to show an information note. + * Used in call back function. + * + * @param aNewTopics count of new topics + * @return always KErrNone + */ + static TInt ActivateBackgroundNoteL( TAny* aNewTopics ); + + private: + + /** + * It is type for topic handles array. + */ + typedef CArrayFixFlat< TCbsTopicNumber > TCbsUiTopicNumberList; + + /** + * Constructor. + * + * @param aServer connection to the server + */ + CCbsUiTopicListView(MCbs& aServer); + + /** + * Finalizes the construction. + * + * Note that it is assumed that the server exists for the life + * time of the class. + */ + void ConstructL(); + + private: // Data + + // It is the control for the view. + CCbsUiTopicListViewContainer* iContainer; + + // It is the label in status pane. + CAknNavigationDecorator* iDecoratedLabel; + + // Pointer to server session. Owned by UiApp + MCbs& iServer; + + // It is the array that contains the topic numbers. + TCbsUiTopicNumberList* iTopicNumberList; + + // Handle that is focused. + TCbsTopicNumber iCurrentTopicNumber; + + // For updating information about messages to navi pane. + CAknNavigationControlContainer* iNaviPane; + + // iFocusState is set in HandleCommandL and focus is set in + // TopicListChangedL. + TTopicListViewFocusState iFocusState; + + // To see wheather it is needed to update navi pane. + // if ETrue: navi pane is not updated + TBool iAddFromIndexDialogIsActive; + + // for showing background note + CIdle* iBackgroundNote; + + // Count of new topics. + TInt iNewTopicsCount; + + + }; + + +#endif // __CCBSTOPICLISTVIEW_H + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiTopicListViewContainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiTopicListViewContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,268 @@ +/* +* Copyright (c) 2002 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: +* TopicListViewContainer owns the list box which shows +* topics. +* +* +*/ + + + +#ifndef __CCBSUITOPICLISTVIEWCONTAINER_H +#define __CCBSUITOPICLISTVIEWCONTAINER_H + +// INCLUDES +#include +#include +#include // CAknIconArray + +// CONSTANTS +const TInt KTopicNumberLength = 3; + + +// FORWARD DECLARATIONS + +class CCbsUiTopicListView; +class CEikColumnListBox; + + + +// CLASS DECLARATION + +/** +* TopicListView container class +* +*/ +class CCbsUiTopicListViewContainer : public CCoeControl, + public MEikListBoxObserver + { + + public: // Constructors and destructor + + /** + * Two-phased constructor. + * + * @param aListView to update view + * @param aRect rectangle for which container can use + */ + static CCbsUiTopicListViewContainer* NewL( + CCbsUiTopicListView& aListView, + const TRect& aRect ); + + /** + * Destructor. + */ + virtual ~CCbsUiTopicListViewContainer(); + + public: // New functions + + /** + * Resests the array of list box. This should be called when + * before ReloadOfferTopic. + */ + void ReloadStarts() const; + + /** + * Adds topic information to the topic. + * + * @param aTopic for setting name and topic number to the list box + */ + void ReloadOfferTopicL( const TCbsTopic& aTopic ) const; + + /** + * Handles a list box item addition. This should be called + * when reload is done. + */ + void ReloadEndsL(); + + /** + * Returns current position, i.e. Current listbox item. + * + * @return currentposition + */ + TInt CurrentPosition() const; + + /** + * Sets the current item index in the list box. + * + * @param aItemIndex new focused item index + */ + void SetCurrentItemIndex( TInt aItemIndex ) const; + + public: // From CCoeControl + + /** + * Returns the count of components. + * + * @return number of components + */ + TInt CountComponentControls() const; + + /** + * Returns a component. + * + * @param aIndex component index to return + * @return requested component + */ + CCoeControl* ComponentControl( TInt aIndex ) const; + + /** + * Sets a new size to the list box. + */ + void SizeChanged(); + + /** + * Informs that the focus is changed. + * @param aDrawNow Contains the value that was passed to it by SetFocus() + */ + void FocusChanged( TDrawNow aDrawNow ); + + /** + * Handles a needed key events. + * + * @param aKeyEvent what kind of key produced this event + * @param aType Which kind of action produced this event + * @return EKeyWasConsumed or EKeyWasNotConsumed + */ + TKeyResponse OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ); + + /** + * Gets the control's help context. + * + * @param aContext The control's help context + */ + void GetHelpContext( TCoeHelpContext& aContext ) const; + + public: + /** + * + */ + void HandleResourceChange( TInt aType ); + + public: // From MEikListBoxObserver + + /** + * Handles list box events, + * + * @param aEventType The event identifier. + */ + void HandleListBoxEventL( CEikListBox* /*aListBox*/, + TListBoxEvent aEventType ); + + private: // New functions + + /** + * Indicates, which icon to use: + * '0' = subscribed and there are no messages + * '1' = subscribed and there are messages + * '2' = not subscribed and there are no messages + * '3' = not subscribed, but are messages + * + * @param aTopic to check the topic status + * @return char which indicates, which icon to use. + */ + TChar GetStatus( const TCbsTopic& aTopic ) const; + + /** + * Sets topic index to given buffer. + * + * @param aTopic a topic, from which will be used topic number + * @param aIndexNumber buffer to be filled with topic number + */ + void GetIndexNumber( + const TCbsTopic& aTopic, TBuf& aIndexNumber ) const; + + private: + + /** + * Constructor. + * + * @param aListView to update view + */ + CCbsUiTopicListViewContainer(CCbsUiTopicListView& aListView); + + /** + * Symbian OS constructor. + * + * @param aRect size of client area + */ + void ConstructL(const TRect& aRect); + + /** + * LoadIconsL + * + * Loads icons to CAknIconArray and set this iconarray + * to list iListBox(CEikColumnListBox) + */ + void LoadIconsL(); + + /** + * Append icon to icon array. + * + * @param aId Icon id + * @param aIcons Icon array + * @param aIconFileWithPath Icon file name with path + * @param aIconGraphicsIndex Picture index. + * @param aIconGraphicsMaskIndex Mask index. + * @param aColorIcon Is icon colored + */ + void AddIconL( TAknsItemID aId, CAknIconArray* aIcons, + const TDesC& aIconFileWithPath, + TInt aIconGraphicsIndex, + TInt aIconGraphicsMaskIndex, + TBool aColorIcon = EFalse ); + + + /** + * Change bitmaps when skin changes. + */ + void SkinBitmapChangesL( ); + + /** + * Construct icon + * + * @param aColourIcon Is icon a colour icon + * @param aInstance Current skin instance + * @param aID Icon ID + * @param aFilename Icon file name with path + * @param aFileBitmapId ID of the bitmap in the file + * @param aFileMaskId ID of the mask in the file + * + * @return The constructed icon + */ + CGulIcon* ConstructIconL( TBool& aColourIcon, + MAknsSkinInstance* aInstance, + const TAknsItemID& aID, + const TDesC& aFilename, + const TInt aFileBitmapId, + const TInt aFileMaskId ); + + private: // Data + + // Reference to TopicListView. + CCbsUiTopicListView& iListView; + + // For data to be shown in the view. + CEikColumnListBox* iListBox; + + }; + + +#endif // __CCBSUITOPICLISTVIEWCONTAINER_H + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiTopicView.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiTopicView.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,391 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsUiTopicView class. +* +* +*/ + + +#ifndef __CCBSUITOPICVIEW_H +#define __CCBSUITOPICVIEW_H + +// INCLUDES +#include +#include +#include +#include "MCbsUiTopicMonitorObserver.h" +#include "MSaveMessageController.h" +#include "CbsUiDebug.h" + + +// FORWARD DECLARATIONS + +class CCbsUiTopicViewContainer; +class MCbs; +class CAknNavigationDecorator; +class CAknNavigationControlContainer; + +// CLASS DEFINITIONS + +/** +* For showing message in one topic. +*/ +class CCbsUiTopicView : public CAknView, + public MCbsUiTopicMonitorObserver, + public MSaveMessageController, + public MAknNaviDecoratorObserver + { + private: // Data declaration + + enum TTopicViewFocusState + { + ESetFocusToCurrentHandle, + ESetFocusToFirstItem, + ESetFocusToNewestMessage, + ENoFocusUpdate + }; + + public: // Constructors and destructor + + /** + * Creates instance of the class. + * + * @param aServer reference to the server + * @return It is the created instance. + */ + static CCbsUiTopicView* NewL( MCbs& aServer ); + + /** + * Destructor. + */ + ~CCbsUiTopicView(); + + public: // New functions + + /** + * Marks the current handle. This should be called only when + * the Options menu is created and when the Ok (selection) key + * has been pressed. + */ + void MarkCurrentlyFocusedHandle(); + + /** + * Handle changes in container when rect changes. + */ + void HandleRectChangeInContainer(); + + public: // From MCbsUiTopicMonitorObserver + + /** + * Topic list or topic messages are changed. + * + * @param aEvent reason for event + * @param aTopicNumber Topic number, which caused the event + */ + void TopicListChangedL( + TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber ); + + public: // From MSaveMessageController + + /** + * Saves a message (the saved message won't be deleted to make + * room for new messages). + * + * Return codes: + * KErrNone Message is saved. + * KErrGeneral Message not saved -- total maximum of saved + * messages reached. + * KErrNotFound Message not saved -- no message associated + * with the given handle. + * KErrDiskFull Message not saved -- FFS out of space. + * + * @param aHandle Handle to the message to be saved. + * @return Return code. + */ + TInt SaveMessage( const TCbsMessageHandle& aHandle ); + + private: // from MEikMenuObserver + + /** + * Sets the options menu according to the current message. + * + * @param aResouceId Id of the resouce. + * @param aMenuPane Pointer to the menu pane. + */ + void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); + + /** + * Overrides MEikMenuObserver function SetEmphasis. Default + * implementation has been copied here. + * + * Checks if the menu pane is showing. If the menu pane is not + * showing, message is unlocked, because it has been locked when + * the menu pane was created. + * + * @param aMenuControl pointer to the menu control + * @param aEmphasis ETrue if menu is showing; otherwise EFalse + */ + void SetEmphasis( CCoeControl* aMenuControl,TBool aEmphasis ); + + public: // from CAknView + + /** + * Returns the view id. + */ + TUid Id() const; + + /** + * To catch which command is selected before menu pane is closed. + * + * @param aCommand command to be processed + */ + void ProcessCommandL( TInt aCommand ); + + /** + * Processes the command. + * + * @param aCommand It is the command to be processed. + */ + void HandleCommandL( TInt aCommand ); + + protected: // from CAknView + + /** + * Activates the view. + * + * @param aPrevViewId previous view id + * @param aCustomMessageId id of the custom message + * @param aCustomMessage message data + */ + void DoActivateL( + const TVwsViewId& aPrevViewId, + TUid aCustomMessageId, const TDesC8& aCustomMessage ); + + /** + * Deactivates the view. + */ + void DoDeactivate(); + + private: // New functions + + /** + * Sets focus to message, according to aIndex. + * + * @param aIndex Index of the focused message. + */ + void SetFocusToMessage( TInt aIndex ); + + /** + * Reloads the messages. + */ + void ReloadMessagesL(); + + /** + * Return the total amount of messages. ("loaded"). + * + * @return total amount of messages + */ + TInt TotalMessages() const; + + /** + * Locks the message in the server. Only one message can locked + * at same time. When new message is locked, old message is unlocked. + * + * @param aHandle Message handle to be locked. + */ + TInt LockMessage( TCbsMessageHandle aHandle ); + + /** + * Unlocks the message from the server. + */ + void UnLockMessage(); + + /** + * Updates the status pane. + */ + void UpdateTitlePaneL( const TCbsTopic& aTopic ) const; + + /** + * Updates the title pane. + */ + void UpdateNaviPaneL( const TCbsTopic& aTopic ); + + /** + * Shows the message in a dialog. + */ + void ShowMessageL(); + + /** + * Finds message index by handle. + * + * @param aIndex it will contain the topic index + * @param aMessageHandle handle to the message + * @return KErrNone if handle exists + */ + TInt FindMessageIndexByHandle( + TInt& aIndex, + const TCbsMessageHandle& aMessageHandle ); + + /** + * Loads all message titles from the server in one topic and offers + * those to the container. + * + * @param aTopicNumber Message headers will be loaded from this topic. + */ + void LoadAllMessageTitlesL( TCbsTopicNumber aTopicNumber ); + + /** + * Prepares container for reloading. + */ + void PrepareReloading(); + + /** + * Sets focus in the list box according to current topic number. + * It also set the focus according to the view focus state. + * + * @param aFocusState indicates where to put the focus + */ + void SetFocusAfterReloading( TTopicViewFocusState aFocusState ); + + /** + * Sets a new current handle according to aDeletedHandle. + * + * @param aDeletedHandle A handle to message which has been deleted. + */ + void SetNewCurrentHandle( TCbsMessageHandle aDeletedHandle ); + + /** + * Sets current topic number according to aToPrev + * + * @param aToPrev Sets current topic number to previous if ETrue + */ + void SetCurrentTopicNumber( TBool aToPrev ); + + /** + * Sets current topic number to aTopicNumberDes. It is used in + * view activation. + * + * @param aTopicNumberDes new current topic number + */ + void SetCurrentTopicNumberAndMessageHandle( const TDesC8& aTopicNumberDes ); + + /** + * Activates message view with the aMsgHandle. + * + * @param aMsgHandle A message handle to be activeted. + */ + void ActivateMsgViewL( TCbsMessageHandle aMsgHandle ) const; + + /** + * Activates topic list view with topic number. + * + * @param aTopicNumber sets the topic number in topic list view. + */ + void ActivateTopicListViewL( TCbsTopicNumber aTopicNumber ) const; + + /** + * Checks if it is possible to move to previous, next + * or both directions. + * + * @param aToPrevious ETrue if it is possible to move to previous topic + * @param aToNext ETrue if it is possible to move to next topic + * @param error code + */ + TInt CheckIfCanMove( TBool& aToPrevious, TBool& aToNext ); + + /** + * Activates the list box after changes. List box is owned by + * the container. + */ + void ActivateListBoxL(); + + /** + * Set the middle soft key text. + * + * @param aResourceId Resource to be read (text label) + * @param aCommandId Command ID for MSK command + */ + void SetMiddleSoftKeyLabelL( const TInt aResourceId, const TInt aCommandId ); + + /** + * Removes MSK command mappings. + */ + void RemoveCommandFromMSK(); + + private: + + /** + * It defines the type for message handle lists. + */ + typedef CArrayFixFlat< TCbsMessageHandle > TCbsUiMessageHandleList; + + /** + * Constructor. + * + * @param aServer reference to the server + * @param aApplication reference to the application + */ + CCbsUiTopicView( MCbs& aServer ); + + /** + * Finalizes the construction. + */ + void ConstructL(); + + private: // From MAknNaviDecoratorObserver + + /** + * Method for handling touch events on navigator (navi pane) + * + * @param aEventID Id of the event. + */ + void HandleNaviDecoratorEventL( TInt aEventID ); + + private: // Data + + // container to the CCbsUiTopicView + CCbsUiTopicViewContainer* iContainer; + + // navi pane variables + CAknNavigationControlContainer* iNaviContainer; + + // navi pane + CAknNavigationDecorator* iDecoratedLabel; + + // navi pane + CAknNavigationDecorator* iPreviousDecoratedLabel; + + // reference to server + MCbs& iServer; + + // array for message handles + TCbsUiMessageHandleList* iHandles; + + // handle to a message, which is focused on. + TCbsMessageHandle iCurrentHandle; + + // Topic number, which this view is currently handling. + TCbsTopicNumber iCurrentTopicNumber; + + // If this is ETrue, message can be unlocked and there fore + // deleted. It is set EFalse in ProcessCommandL, ETrue + // in DoActivateL and in HandleCommandL. + TBool iCanUnlock; + + }; + + +#endif // __CCBSUITOPICVIEW_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiTopicViewContainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiTopicViewContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,250 @@ +/* +* Copyright (c) 2002 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: +* CCbsUiTopicViewContainer is container for CCbsUiTopicView. +* It has one control, a list box, which is showing information +* about messages in one topic. +* +* +*/ + + +#ifndef CCBSUITOPICVIEWCONTAINER_H +#define CCBSUITOPICVIEWCONTAINER_H + +// INCLUDES +#include // CAknIconArray +#include +#include +#include + + +// FORWARD DECLARATIONS + +class CSelectionList; +class CEikColumnListBox; +class CListBoxNumbers; +class CFbsBitmap; +class CCbsUiTopicView; + + +// CLASS DEFINITIONS + +/** +* Container for CCbsUiTopicView. +*/ +class CCbsUiTopicViewContainer : public CCoeControl, + public MEikListBoxObserver + { + public: // Constructors and destructor + + /** + * Creates an instance of the class. + * + * @param aTopicView For handling key events. + * @param aRect An area ment for container. + */ + static CCbsUiTopicViewContainer* NewL( + CCbsUiTopicView& aTopicView, + const TRect& aRect ); + + /** + * Destructor. + */ + ~CCbsUiTopicViewContainer(); + + public: // New functions + + /** + * Resets list box items. This should be called before ReloadOfferL. + */ + void ReloadStarts() const; + + /** + * During reloading offers the view a single message and the + * beginning of it. + * + * Note that the text part must be less than 100 characters + * (Well, there is only room for 20 characters, I suppose). + * + * @param aMessage It is the message. + * @param aBuffer It is the beginning of the contents. + */ + void ReloadOfferL( const TCbsMessage& aMessage, const TDesC& aBuffer ) const; + + /** + * Handles a list box item addition. This should be called + * when reload is done. + */ + void ReloadEndsL(); + + /** + * Returns the current position. + * + * @return Current position in the list. + */ + TInt CurrentPosition() const; + + /** + * Sets current item index and draws. + * + * @param aItemIndex index to be focused + */ + void SetCurrentItemIndex( TInt aItemIndex ) const; + + /** + * Returns the list box + * + * @return list box + */ + CEikColumnListBox* GetListBox(); + + public: // from CCoeControl + + /** + * Return the amount of controls. + * + * @return amount of controls. + */ + TInt CountComponentControls() const; + + /** + * Return a control. + * + * @param aIndex It is the index to the control. + * @return It returns the control. + */ + CCoeControl* ComponentControl( TInt aIndex ) const; + + /** + * Sets a new size to the list box. + */ + void SizeChanged(); + + /** + * Informs that the focus is changed. + * @param aDrawNow Contains the value that was passed to it by SetFocus() + */ + void FocusChanged( TDrawNow aDrawNow ); + + /** + * Offers a key to the view for handling. + * + * @param aKeyEvent what kind of key produced this event + * @param aType Which kind of action produced this event + * @return It tells whether the view consumed the keypress or not. + */ + TKeyResponse OfferKeyEventL( + const TKeyEvent& aKeyEvent, TEventCode aType ); + + /** + * Gets the control's help context. + * + * @param aContext The control's help context + */ + void GetHelpContext( TCoeHelpContext& aContext ) const; + + public: + /** + * + */ + void HandleResourceChange( TInt aType ); + + public: // From MEikListBoxObserver + + /** + * Handles list box events. + * + * @param aEventType The event identifier. + */ + void HandleListBoxEventL( CEikListBox* /*aListBox*/, + TListBoxEvent aEventType ); + + private: + + /** + * Constructor. + * + * @param aTopicView It is the topic view. + */ + CCbsUiTopicViewContainer( CCbsUiTopicView& aTopicView ); + + /** + * Finalizes the construction. + * + * @param aRect It is the client rectangle. + */ + void ConstructL( const TRect& aRect ); + + /** + * LoadIconsL + * + * Loads icons to CAknIconArray and set this iconarray + * to list iListBox(CEikColumnListBox) + */ + void LoadIconsL(); + + /** + * Append icon to icon array. + * + * @param aId Icon id + * @param aIcons Icon array + * @param aIconFileWithPath Icon file name with path + * @param aIconGraphicsIndex Picture index. + * @param aIconGraphicsMaskIndex Mask index. + */ + void AddIconL( TAknsItemID aId, CAknIconArray* aIcons, + const TDesC& aIconFileWithPath, + TInt aIconGraphicsIndex, + TInt aIconGraphicsMaskIndex, + TBool aColorIcon = EFalse ); + + /** + * Change bitmaps when skin changes. + */ + void SkinBitmapChangesL( ); + + /** + * Construct icon + * + * @param aColourIcon Is icon a colour icon + * @param aInstance Current skin instance + * @param aID Icon ID + * @param aFilename Icon file name with path + * @param aFileBitmapId ID of the bitmap in the file + * @param aFileMaskId ID of the mask in the file + * + * @return The constructed icon + */ + CGulIcon* ConstructIconL( TBool& aColourIcon, + MAknsSkinInstance* aInstance, + const TAknsItemID& aID, + const TDesC& aFilename, + const TInt aFileBitmapId, + const TInt aFileMaskId ); + + private: // Data + + // It is the listbox. + CEikColumnListBox* iListBox; + + // For handling some key pressures and for marking a current + // topic handle. + CCbsUiTopicView& iTopicView; + + }; + +#endif // CCBSUITOPICVIEWCONTAINER_H + + // End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiViewFactory.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiViewFactory.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,106 @@ +/* +* Copyright (c) 2002 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: +* Works as a mediator to different views +* +* +*/ + + +#ifndef CCBS_UI_VIEW_FACTORY_H +#define CCBS_UI_VIEW_FACTORY_H + +// INCLUDES +#include +#include + + +// FORWARD DECLARATIONS +class MCbs; +class CCbsUiTopicListView; +class CCbsUiTopicView; +class CCbsUiMsgView; +class CCbsUiTopicListMonitor; +class CCbsUiSettingsView; +class CAknView; +class CCbsUiTopicListMonitor; + +// CLASS DECLARATION + + +/** +* For creating views in cbsui. +* +*/ +class CCbsUiViewFactory : public CBase + { + public: // Constructors and destructor + + /** + * C++ constructor. + */ + CCbsUiViewFactory( + MCbs& aServer, CCbsUiTopicListMonitor& aTopicMonitor ); + + /** + * Destructor. + */ + virtual ~CCbsUiViewFactory(); + + public: // New functions + + /** + * Returns pointer to topic list view and keeps a reference + * to that object. + * + * @return created view + */ + CAknView* CreateTopicListViewLC(); + + /** + * Returns pointer to topioc view and keeps a reference + * to that object. + * + * @return created view + */ + CAknView* CreateTopicViewLC(); + + /** + * Returns pointer to msg view and keeps a reference + * to that object. + * + * @return created view + */ + CAknView* CreateMsgViewLC(); + + /** + * Returns pointer to settings view and keeps a reference + * to that object. + * + * @return created view + */ + CAknView* CreateSettingsViewLC(); + + private: // Data + + // Ref: + CCbsUiTopicListMonitor& iTopicMonitor; + + // Ref: + MCbs& iServer; + }; + +#endif // CCBS_UI_VIEW_FACTORY_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiappAppUi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiappAppUi.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,96 @@ +/* +* Copyright (c) 2002 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: +* User Interface class. +* +* +*/ + + +#ifndef __CBSUIAPPAPPUI_H +#define __CBSUIAPPAPPUI_H + +// INCLUDES +#include // CAknViewAppUi + + +// FORWARD DECLARATIONS +class CCbsUiTopicListMonitor; +class MCbs; + +// CLASS DECLARATION + +/** +* It is the application user interface. Creates all the views and +* handles their activation. +*/ +class CCbsUiappAppUi : public CAknViewAppUi + { + + public: // Constructors and destructor + + /** + * C++ constructor. + */ + CCbsUiappAppUi(MCbs& aServer); + + /** + * Destructor. + */ + virtual ~CCbsUiappAppUi(); + + public: // From CEikAppUi + + /** + * Update context icon when parameter aType is KAknsMessageSkinChange + */ + void HandleResourceChangeL( TInt aType ); + + private: // From CEikAppUi + + /** + * Handles common commands. + * + * @param aCommand It is command to be processed. + */ + void HandleCommandL( TInt aCommand ); + + private: + + /** + * By default Symbian OS constructor is private. + */ + void ConstructL(); + + /** + * Checks the SIM status + * @return TInt, value of sim state + */ + TInt CheckSimStateL(); + + private: // Data + + // Ref: It is the connection to the server. + MCbs& iServer; + + // TopicListMonitor + CCbsUiTopicListMonitor* iTopicListMonitor; + + }; + + +#endif // __CBSUIAPP_H + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiappApplication.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiappApplication.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,52 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* The application class. +* +* +*/ + + +#ifndef __CBSUIAPPAPPLICATION_H +#define __CBSUIAPPAPPLICATION_H + +// INCLUDES +#include + + +// CLASS DECLARATION + + +/** +* The Application class +*/ +class CCbsUiappApplication : public CAknApplication + { + private: // Functions from base classes + + /** + * From CApaApplication + */ + CApaDocument* CreateDocumentL(); + + /** + * From CApaApplication. + */ + TUid AppDllUid() const; + }; + + +#endif // __CBSUIAPPAPPLICATION_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiappDocument.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiappDocument.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsUiappDocument class. +* +* +*/ + + +#ifndef __CBSUIAPPDOCUMENT_H +#define __CBSUIAPPDOCUMENT_H + +// INCLUDES +#include + + +// FORWARD DECLARATIONS +class MCbs; + +// CLASS DECLARATION + +/** +* The Document class +*/ +class CCbsUiappDocument : public CEikDocument + { + public: // Constructors and destructor + + /** + * Returns new instance of CbsUiDocument. + * + * @param aApp application + * @return new instance of CbsUiDocument + */ + static CCbsUiappDocument* NewL( CEikApplication& aApp ); + + /** + * Destructor. + */ + ~CCbsUiappDocument(); + + public: // From CEikDocument + + /** + * Stop doc file being created + * @param aDoOpen not used + * @param aFilename not used + * @param aFs not used + * @return NULL + */ + inline CFileStore* OpenFileL( TBool /*aDoOpen*/, + const TDesC& /*aFilename*/, + RFs& /*aFs*/); + + /** + * Since 3.0 + * Stop doc file being created + * @param aFileStore not used + * @param aFile not used + */ + inline void OpenFileL( CFileStore*& /*aFileStore*/, RFile& /*aFile*/ ); + + private: // Constructors + + /** + * C++ default constructor. + * + * @param aApp application + */ + CCbsUiappDocument( CEikApplication& aApp ); + + /** + * Symbian OS constructor. + */ + void ConstructL(); + + private: // Functions from base classes + + /** + * From CEikDocument + * Creates and returns an instance of CBSUI application + * + * @return an instance of CBSUI application + */ + CEikAppUi* CreateAppUiL(); + + private: // Data + + // Own: For creating connection to the server + MCbs* iServer; + }; + + +#include "CCbsUiappDocument.inl" + +#endif // __CBSUIAPPDOCUMENT_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CCbsUiappDocument.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CCbsUiappDocument.inl Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,47 @@ +/* +* Copyright (c) 2002 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: Inline implementation of CCbsUiappDocument class. +* +* +*/ + + + +// --------------------------------------------------------- +// CCbsUiappDocument::OpenFileL +// +// Stop doc file being created +// +// --------------------------------------------------------- +// +CFileStore* CCbsUiappDocument::OpenFileL( TBool /*aDoOpen*/, + const TDesC& /*aFilename*/, + RFs& /*aFs*/) + { + return NULL; + } + + +// --------------------------------------------------------- +// CCbsUiappDocument::OpenFileL +// +// Stop doc file being created +// +// --------------------------------------------------------- +// +void CCbsUiappDocument::OpenFileL( CFileStore*& /*aFileStore*/, RFile& /*aFile*/ ) + { + } + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CbsUiConstants.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CbsUiConstants.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,80 @@ +/* +* Copyright (c) 2002 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: +* Contains constants which are used in CBSUI application. +* +* +*/ + + +#ifndef __CBS_UI_CONSTANTS_H +#define __CBS_UI_CONSTANTS_H + +// INCLUDES +#include "Cbsuiapp.hrh" + + +// CONSTANTS +const TInt KCbsUiCustomMessageIdInt = 11; +const TUid KCbsUiCustomMessageId = { KCbsUiCustomMessageIdInt }; + // When message view is launched by other + // application its message id is 0, this + // just has to differ from the other + // applications message id. + +// When view is launched with this id it knows to set the focus to id, +// which is passed as parameter to DoActivateL. +const TUid KSetFocusToId = { 12 }; + +// activates view to its current id. +const TUid KSetFocusToCurrentId = { 13 }; + +// How many digits there are in topic number +const TInt KTopicNumberWidth = EMaxTopicNumberLength; + +const TInt KNumberOfTemporaryMessages = 3; + +// Error value used in Cbs ui. +const TInt KCbsErrValue = -1; + +// This kind of topic number cannot exists +const TInt KCbsInvalidTopicNumber = 22000; + +// max message title length +const TInt KMaxMessageTitleLength = 40; + + +// DATA TYPES +enum { EMinTopicNumber = 0, EMaxTopicNumber = 999 }; + +enum TCbsUiLanguageSelectionIndex + { + ECbsUiAll = 0, + ECbsUiSelected = 1, + ECbsUiOther = 2 + }; + +// for activating topic view with right state +struct TCbsUiTopicActivationPckg + { + // current topic number + TCbsTopicNumber iTopicNumber; + + // current message handle + TCbsMessageHandle iMessageHandle; + }; + +#endif // __CBS_UI_CONSTANTS_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CbsUiDebug.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CbsUiDebug.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,46 @@ +/* +* Copyright (c) 2002 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: +* Provides macros for testing. +* +* +*/ + + +#ifndef CBS_UI_DEBUG_H +#define CBS_UI_DEBUG_H + + +//////////////////////////// +// MEMORY TEST MACRO // + + +#ifdef _DEBUG +#define __CBSUI_DEBUG +#endif // _DEBUG + +#ifdef __CBSUI_DEBUG + #define __CBSUI_ASSERT(condition, function) \ + __ASSERT_DEBUG(condition, function) + #define __CBSUI_ASSERT_E(condition, error) \ + __ASSERT_DEBUG(condition, CbsUiPanic(error) ) +#else + #define __CBSUI_ASSERT(condition, function) + #define __CBSUI_ASSERT_E(condition, error) +#endif //__CBSUI_DEBUG + + +#endif // CBS_UI_DEBUG_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CbsUiId.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CbsUiId.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,29 @@ +/* +* Copyright (c) 2002 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: +* Contains applications uid. +* +* +*/ + + +#ifndef __CBS_UI_ID_H +#define __CBS_UI_ID_H + +// MACROS +#define KUidCbsUiappDef 0x101F4CD3 + +#endif // __CBS_UI_ID_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CbsUiPanic.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CbsUiPanic.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2002 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: +* Contains the panic function for CbsUiApp. +* +* +*/ + + +#ifndef __CBS_UI_PANIC_H +#define __CBS_UI_PANIC_H + +// INCLUDES +#include + + +// DATA TYPES +enum TCbsUiPanic + { + ECbsUiError = 0, // not used at the moment + EStatusPaneError = 1, // if status pane is null + EStatusOrTitlePaneError = 2, // if status or title pane is null + ENaviPaneError = 3, // if navi pane is null + ENaviDecoratorError = 4, // navi decorator null error + EListBoxInDialogError = 5, // list box creation error + ETopicHandleError = 6, // handles creation error + EServerCreationFailedError = 7, // server creation failed + EServerNullError = 8, // server null error + EListBoxNullError = 9, // list box null error + EMenuPaneNullError = 10, // menu pane null error + EFindItemNullError = 11, // find item null error + ETopicCountError = 12, // error when counting new topics + EContainerNullError = 13, // container null error + EMessageListNullError = 14, // not used at the moment + EMessageContentsError = 15, // message content is not valid + EListBoxAlreadyExistsError = 16, // list box already exists error + EEditorNullError = 17, // editor null error + ETopicNumberError = 18, // topic number is invalid + EEditorCreationError = 19, // not used at the moment + EWrongViewIdError = 20, // not used at the moment + EContextMenuAlreadeyExists = 21, // not used at the moment + EErrEditTopicDlgOkToExit = 22, // null pointer error in edit + // dialog + EErrMsgContents = 23, // not used at the moment + EErrNotAMsgHandle = 24, // invalid message handle + EErrNotANumber = 25, // converting a descriptor + // to number error + EErrScrollIndicatorAllreadyExists = 26, // scroll indicator allready + // exists + EErrAlgorithm = 27, // not used at them moment + EErrIndexOutOfBounds = 28, // index out of bounds error + EErrMsgNotFound = 29, // message not found error + EErrMsgHandleNotFound = 30, // message handle not found error + EErrNoSuchMessageHandle = 31, // not used at the moment + EErrTopicsCountError = 32, // topics count error + EErrBadIndex = 33, // bad index error + EErrWrongNotify = 34, // not used + EErrTopicNotFound = 35, // topic not found error + EErrBadHandle = 36, // not used + EErrMsgReadError = 37, // message read error + EErrNullPointer = 38, // null pointer + EErrBadSelection = 39, // selection error + EErrAllocation = 40, // not used + EErrInvalidValue = 41, // invalid value error + EErrNotATopicNumber = 42, // invalid topic number + EErrServerDisconnected = 43, // server not connected error + EErrAllreadyExists = 44, // trying to creat item, which is + // allready created + EErrInvalidEvent = 45, // invalid event + EErrBadLength = 46, // descriptor too big + EErrEmptyDesc = 47, // empty descriptor error + EErrMsgImbalance = 48, // message postion is invalid + EErrMsgNotExists = 49, // not used + EErrTopicNumberNotFound = 50, // topic number not found + EErrNotAValidObserver = 51, // not used + EErrServerError = 52 // not used + }; + +// FUNCTION PROTOTYPES +GLDEF_C void CbsUiPanic( TCbsUiPanic aPanic ); + +#endif // __CBS_UI_PANIC_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/CbsUiUtility.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/CbsUiUtility.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,110 @@ +/* +* Copyright (c) 2002 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: +* Provides different utility functions for CBSUI. +* +* +*/ + + +#ifndef __CBS_UI_CLEANUP_HANDLER_H +#define __CBS_UI_CLEANUP_HANDLER_H + +// INCLUDES +#include // CAknNoteDialog + + +// FORWARD DECLARATIONS +class MSaveMessageController; +class MCbs; + + +// CLASS DECLARATION + +/** +* Offers utility functions for CBSUI. +* +*/ +class CbsUiUtility + { + + public: // New functions + + /** + * Shows confirmation note with text accordingly to aResourceId. + * + * @param aResourceId resource id + * @param aWaitingDialog if ETrue dialog waits before continues + */ + LOCAL_C void ShowConfirmationNoteL( + const TInt aResourceId, TBool aWaitingDialog = EFalse ); + + /** + * Shows error note with text accordingly to aResourceId. + * + * @param aResourceId resource id + */ + LOCAL_C void ShowErrorNoteL( const TInt aResourceId ); + + /** + * Shows warning note with text accordingly to aResourceId. + * + * @param aResourceId resource id + */ + LOCAL_C void ShowWarningNoteL( const TInt aResourceId ); + + /** + * Shows a note accordingly to parameters. + * + * @param aResource note resource id + * @param aTimeout duration + * @param aTone sound + */ + LOCAL_C void ShowNoteL( const TInt aResource, + const CAknNoteDialog::TTimeout aTimeout, + const CAknNoteDialog::TTone aTone ); + + /** + * Returns a new navigation pane. Remember to delete a memory area! + * + * @return new empty decorated label + */ + LOCAL_C CAknNavigationDecorator* CreateEmptyNavigationPaneL(); + + /** + * Returns ETrue if message is saved + * + * @param aHandle message to be checked + * @param aServer is needed to get information + * @return ETrue if current message is saved + */ + LOCAL_C TBool IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer ); + + /** + * Saves the message and shows a error message in case + * something went wrong. + * + * @param aHandle message to be saved + * @param aSaver saves the message and shows global error note if needed + * @return Error code + */ + LOCAL_C TInt SaveCurrentMessageL( + const TCbsMessageHandle aHandle, + MSaveMessageController& aSaver ); + + }; + +#endif // __CBS_UI_CLEANUP_HANDLER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/MCbs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/MCbs.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,558 @@ +/* +* Copyright (c) 2002 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: +* Interface for cbs client. +* +* +*/ + + +#ifndef __MCbs_h +#define __MCbs_h + +// INCLUDES +#include + +/** +* Interface MCbs is used to change real client server +* connection to some test stub implementation. +*/ +class MCbs + { + public: + + /** + * Destructor. + */ + virtual ~MCbs() {} + + /** + * Creates connection to the server. + * + * Note that the method must be called before calling any other + * methods. The method returns an error code and, therefore, + * the caller is responsible of checking that everything went just + * fine. + * + * @return Error code. + */ + virtual TInt Connect() = 0; + + /** + * Closes the session to the server. + */ + virtual void Close() = 0; + + /** + * Returns the version of CbsClient. + * + * CbsServer and CbsClient must be of same version. + * + * @return Returns the version of CbsClient. + */ + virtual TVersion Version() const = 0; + + // === Settings-related methods + + /** + * Returns the reception status in aStatus, which is ETrue if the reception is + * on. Otherwise it is EFalse. + * + * @param aStatus The method returns the reception status in this parameter. + */ + virtual void GetReceptionStatus( TBool& aStatus ) = 0; + + /** + * Changes the reception status to aStatus. + * + * @param aStatus It contains the new reception status. + * @return Error code. + */ + virtual TInt SetReceptionStatus( TBool aStatus ) = 0; + + /** + * Returns the topic detection status in aStatus, which is ETrue if the detection + * is on. Otherwise it is EFalse. + * + * @param aStatus The method returns the topic detection status in this parameter. + */ + virtual void GetTopicDetectionStatus( TBool& aStatus ) = 0; + + /** + * Changes the topic detection status to aStatus. + * + * @param aStatus It contains the new topic detection status. + * @return Error code. + */ + virtual TInt SetTopicDetectionStatus( TBool aStatus ) = 0; + + /** + * Returns the preferred languages in aLanguages. + * + * @param aLanguages The method returns the languages in this parameter. + */ + virtual void GetLanguages( TCbsSettingsLanguages& aLanguages ) = 0; + + /** + * Changes the preferred languages to aLanguages. + * + * @param aLanguages It contains the new preferred languages. + * @return Error code. + */ + virtual TInt SetLanguages( const TCbsSettingsLanguages& aLanguages ) = 0; + + /** + * Requests the server to notify the client whenever any settings will be + * changed. + * + * Note that for each subsession only one this kind of request can be pending. Each + * client is responsible of assuring this. + * + * @param aStatus It is the variable that the server will modify whenever an event occurs. + * @param aEvent The server will store the type of occurred event to this variable. + */ + virtual void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent ) = 0; + + /** + * Cancels the request to notify the client. + */ + virtual void NotifySettingsChangedCancel() = 0; + + // === Topic Collection-related methods + + /** + * Resets the iterator. Must be called prior any call to HasNextTopic() + * or NextTopic()! + */ + virtual void StartCollectionBrowsing() = 0; + + /** + * Returns ETrue, if there is a topic not accessed with NextTopic() + * + * @return ETrue, if there is a topic. EFalse if the end of the collection + * has been reached. + */ + virtual TBool HasNextCollectionTopic() = 0; + + /** + * Returns the next topic in the topic collection skipping all topics with + * a topic number matching a topic already listed in the current topic list. + * This function will return KErrNotFound if the collection is tried to + * access beyond the end of the list. Otherwise the error code will be + * the same returned by GetTopicInfo(). + * + * @param aInfo The topic information will be stored here. + * @return The error code. KErrNotFound if there are no topics left. + */ + virtual TInt NextCollectionTopic( TCbsTopicInfo& aInfo ) = 0; + + // === Topic list-related methods + + /** + * Returns the total amount of topics the topic list contains. + * + * @param aCount It will contain the total amount of topics. + */ + virtual void GetTopicCount( TInt& aCount ) = 0; + + /** + * Returns information about a topic from the topic list. + * + * Return values: + * KErrArgument Topic was not found. + * + * Rest of return values indicate a file error. + * + * @param aIndex It is the index to the topic. + * @param aTopic It will contain the topic information. + * @return Error code. + */ + virtual TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic ) = 0; + + /** + * Finds the topic by the given number. + * + * Return values: + * KErrNone Topic returned in parameter aTopic. + * KErrNotFound Topic was not found. + * + * @param aNumber Number of the topic + * @param aTopic Return: contains the topic information + * @return Error code + */ + virtual TInt FindTopicByNumber( TCbsTopicNumber aNumber, + TCbsTopic& aTopic ) = 0; + + /** + * Deletes an existing topic. + * + * @param aNumber Number of the topic to be deleted + * @return Error code + */ + virtual TInt DeleteTopic( TCbsTopicNumber aNumber ) = 0; + + /** + * Delete all topics. + * + * @return Error code. + */ + virtual TInt DeleteAllTopics() = 0; + + /** + * Adds a new topic. The handle assigned to the topic will be returned + * in aTopic. + * + * Return values: + * KErrNone Topic was successfully added. + * KErrAlreadyExists A topic of the same number already exists in DB + * KErrArgument Topic number given was not in a proper range. + * KErrDiskFull Topic not added - FFS out of space + * + * Note that the number of the new topic must be unused. + * + * @param aTopic Contains the information of the new topic. + * On return, aTopic also contains the topic + * handle. + * @return Error code. + */ + virtual TInt AddTopic( TCbsTopic& aTopic ) = 0; + + /** + * Changes the name and number of the existing topic. + * + * Note that the changing fails in case there is another topic with + * the new topic number. It also fails if the topic is protected. + * + * Return values: + * KErrNone Topic name and number successfully changed. + * KErrDiskFull Topic information not changed - FFS out of space + * + * @param aOldNumber Number of the topic to be changed + * @param aNewNumber Number to be given for the topic + * @param aName Name to be given for the topic + * @return Error code + */ + virtual TInt ChangeTopicNameAndNumber( + TCbsTopicNumber aOldNumber, + TCbsTopicNumber aNewNumber, + const TCbsTopicName& aName ) = 0; + + /** + * Changes topic subscription status. + * + * @param aNumber Number of the topic + * @param aNewStatus New subscription status + * @return Error code + */ + virtual TInt ChangeTopicSubscriptionStatus( + TCbsTopicNumber aNumber, TBool aNewStatus ) = 0; + + /** + * Changes topic hotmark status. + * + * @param aNumber Number of the topic + * @param aNewStatus New hotmark status + * @return Error code + */ + virtual TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber, + TBool aNewStatus ) = 0; + + /** + * Requests the server to notify the client whenever an event occurs + * that changes the information of the topics. + * + * Note that the client may select what kind of events it is + * interested in. Note also that there can be at most one pending + * request per instance of the class. + * + * @param aStatus The variable that the server will modify + * whenever an event occurs. + * @param aRequested Events the client is interested in + * @param aEvent Indicates the variable that will contain the + * type of event that occured. + * @param aNumber Indicates the variable that will contain the + * topic number that was changed in event. + */ + virtual void NotifyOnTopicListEvent( + TRequestStatus& aStatus, + const TInt aRequested, + TCbsTopicListEvent& aEvent, + TCbsTopicNumber& aNumber ) = 0; + + /** + * Cancels the pending notify request. + */ + virtual void NotifyOnTopicListEventCancel() = 0; + + /** + * Returns the number of topics added since last GetNewTopicsCount() + * by the topic detection feature. + * + * @param aCount It will contain the amount of new topics. + * @return TInt Result code. + */ + virtual TInt GetNewTopicsCount( TInt& aCount ) = 0; + + /** + * Returns the number of the topic which was last added + * to topic list. + * + * Note: if a topic list cache is maintained by the client + * (as CBS UI application does), this function has to + * be called BEFORE calling GetTopicCount() and GetTopic() + * to make sure that no topic is added in between + * GetTopic() and GetLatestTopicHandle() calls. If this + * happens, GetLatestTopicHandle() will return a handle + * to a topic that is not cached client-side. + * + * Return codes: + * KErrNone aNumber is a valid topic number. + * KErrNotFound No topic added since server start, + * aNumber is not valid. + * + * @param aNumber Returns: number of the topic last added + * @return Result code + */ + virtual TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber ) = 0; + + /** + * Returns the total amount of unread messages. + * + * @param aCount Return: number of unread messages + */ + virtual void GetUnreadMessageCount( TInt& aCount ) = 0; + + /** + * Returns the handle to the latest hotmarked message that has been + * received after the system has started up. + * + * @param aMessage Handle to the message + */ + virtual void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage ) = 0; + + /** + * Returns the number of unread messages in hotmarked topics. + * + * This function is to used by the client when deciding whether + * the message or topic list view should be opened to display + * a hotmarked message(s). + * + * @return Number of unread hotmarked messages + */ + virtual TInt NumberOfUnreadHotmarkedMessages() = 0; + + /** + * Returns the numbers of topics that precede and succeed the given + * topic in server-side topic list. + * + * If the given topic is the first topic in list, aPosition has + * ECbsHead bit up. If the given topic is the last topic in list, + * aPosition has ECbsTail bit up. + * + * Return code values: + * KErrNone aPrevTopicNumber, aNextTopicNumber and aPosition + * contain valid values. + * KErrNotFound aCurrentTopicNumber specified a topic that was not + * on topic list. + * + * @param aCurrentTopicNumber Number that specifies the topic + * whose surroundings are returned + * @param aPrevTopicNumber Returns: number of topic preceding + * the given topic + * @param aNextTopicNumber Returns: number of topic succeeding + * the given topic + * @param aPosition Returns: position of current + * topic in list. + * @return Result code + */ + virtual TInt GetNextAndPrevTopicNumber( + const TCbsTopicNumber& aCurrentTopicNumber, + TCbsTopicNumber& aPrevTopicNumber, + TCbsTopicNumber& aNextTopicNumber, + TInt& aPosition ) = 0; + + // === Topic Messages-related methods + + /** + * Returns the total amount of messages the topic contains. + * + * Return codes: + * KErrNotFound Invalid handle. + * KErrNone aCount contains the number of messages + * in topic + * + * @param aNumber Number of the topic. + * @param aCount Number of messages in given topic. + * @return Result code + */ + virtual TInt GetMessageCount( TCbsTopicNumber aNumber, + TInt& aCount ) = 0; + + /** + * Returns message information. + * + * Return codes: + * KErrNotFound Topic or message not found. + * KErrNone aMessage contains the message information. + * + * @param aNumber Number of the topic + * @param aIndex Index to the message in topic. + * @param aMessage Returns: the message information + * @return Error code + */ + virtual TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex, + TCbsMessage& aMessage ) = 0; + + /** + * Finds a message by given handle. + * + * @param aHandle Handle to the message. + * @param aMessage Return: contains the message information. + * @return Error code. + */ + virtual TInt FindMessageByHandle( + const TCbsMessageHandle& aHandle, + TCbsMessage& aMessage ) = 0; + + /** + * Returns the index of a message with given handle in topic. + * + * Result code KErrNotFound indicates that no message was found with + * the given handle. + * + * @param aHandle Handle of the message + * @param aIndex Return: index of the message in message topic + * @return Result code + */ + virtual TInt GetMessageIndexByHandle( + const TCbsMessageHandle& aHandle, TInt& aIndex ) = 0; + + /** + * Deletes an existing message. + * + * Note that it does not care a lot about the status of the message. + * + * Please check also the description of LockMessage(). + * + * @param aHandle It is handle to the message. + * @return Error code. + */ + virtual TInt DeleteMessage( const TCbsMessageHandle& aHandle ) = 0; + + /** + * Saves a message (the saved message won't be deleted to make + * room for new messages). + * + * Return codes: + * KErrNone Message is saved. + * KErrGeneral Message not saved -- total maximum of saved + * messages reached. + * KErrNotFound Message not saved -- no message associated + * with the given handle. + * KErrDiskFull Message not saved -- FFS out of space. + * + * @param aHandle Handle to the message to be saved. + * @return Return code. + */ + virtual TInt SaveMessage( const TCbsMessageHandle& aHandle ) = 0; + + /** + * Locks the message. + * + * Note that a single topic messages subsession can have at most one locked + * message. + * + * Message can be unlocked by trying to lock a null message. Locked message + * will also be automatically unlocked when subsession is closed. If a message + * is locked, then it will not be deleted from the database. Thus, deleting a + * message or trying to delete a topic that contains such a message will fail. + * + * Locking a message does not prevent to save the message nor read the message. + * + * @param aHandle It is handle to the message to be locked. + * @return Error code. + */ + virtual TInt LockMessage( const TCbsMessageHandle& aHandle ) = 0; + + /** + * Sets the message as read. + * + * @param aHandle It is handle to the message to be set read. + */ + virtual TInt ReadMessage( const TCbsMessageHandle& aHandle ) = 0; + + /** + * Returns the message contents. + * + * @param aHandle It is handle to the message. + * @param aBuffer It will contain the contents (as much as it fits). + * @return Error code. + */ + virtual TInt GetMessageContents( + const TCbsMessageHandle& aHandle, + TDes& aBuffer ) = 0; + + /** + * Returns the handles of messages that precede and succeed the + * given message in server-side list of topic messages. + * + * Topic is resolved from the given message handle + * + * If the given handle specifies the first message in topic, + * aPosition has ECbsHead bit up. If the given handle specifies + * the last message in topic, aPosition has ECbsTail bit up. + * + * Return code values: + * KErrNone aPrevMsgHandle, aNextMsgHandle and aPosition + * contain valid values. + * KErrNotFound aCurrentMsgHandle specified a message that was not + * found. + * + * @param aCurrentMsgHandle Handle that specifies the message + * whose surroundings are returned + * @param aPrevMsgHandle Returns: handle of message + * preceding the given message + * @param aNextMsgHandle Returns: handle of message + * succeeding the given topic + * @param aPosition Returns: position of current topic + * in list + * @return Result code + */ + virtual TInt GetNextAndPrevMessageHandle( + const TCbsMessageHandle& aCurrentMsgHandle, + TCbsMessageHandle& aPrevMsgHandle, + TCbsMessageHandle& aNextMsgHandle, + TInt& aPosition ) = 0; + + // Other methods + + /** + * Returns ETrue if CbsServer session has been established. + * + * @return ETrue, if session open. + */ + virtual TBool Connected() const = 0; + + /** + * Forces the server to shut down. + * + * NOTE: Shutdown not fully implemented in CbsServer yet. + */ + virtual void Shutdown() const = 0; + + }; + +#endif // __MCbs_h + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/MCbsUiSettingsObserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/MCbsUiSettingsObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,50 @@ +/* +* Copyright (c) 2002 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: +* Observes settings monitor. +* +* +*/ + + +#ifndef CBS_UI_SETTINGS_OBSERVER_H +#define CBS_UI_SETTINGS_OBSERVER_H + + + +// CLASS DECLARATION + + +/** +* Observes settings monitor. +* +*/ +class MCbsUiSettingsObserver + { + public: + + /** + * Settings monitor calls this function when settings has been + * changed. + * + * @param aEvent What kind of event caused the settings change + */ + virtual void SettingsChangedL( TCbsSettingsEvent aEvent ) = 0; + + }; + +#endif // CBS_UI_SETTINGS_OBSERVER_H + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/MCbsUiTopicMonitorObserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/MCbsUiTopicMonitorObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,52 @@ +/* +* Copyright (c) 2002 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: +* Observes topic monitor. +* +* +*/ + + +#ifndef CBS_UI_TOPIC_MONITOR_OBSERVER_H +#define CBS_UI_TOPIC_MONITOR_OBSERVER_H + +// INCLUDES +#include + + + +// CLASS DECLARATION + +/** +* Observes topic monitor. +* +*/ +class MCbsUiTopicMonitorObserver + { + public: + + /** + * Topic list or topic messages are changed. + * + * @param aEvent reason for event + * @param aTopicNumber Topic number, which caused the event + */ + virtual void TopicListChangedL( + TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber ) = 0; + + }; + +#endif // CBS_UI_TOPIC_MONITOR_OBSERVER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/MSaveMessageController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/MSaveMessageController.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,58 @@ +/* +* Copyright (c) 2002 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: +* Declares functions needed to save message. +* +* +*/ + + +#ifndef __MSaveMessageController_h +#define __MSaveMessageController_h + +// INCLUDES +#include + + + +// CLASS DECLARATION + +/** +* Helper class for saving message. +*/ +class MSaveMessageController + { + public: // New functions + + /** + * Saves a message (the saved message won't be deleted to make + * room for new messages). + * + * Return codes: + * KErrNone Message is saved. + * KErrGeneral Message not saved -- total maximum of saved + * messages reached. + * KErrNotFound Message not saved -- no message associated + * with the given handle. + * KErrDiskFull Message not saved -- FFS out of space. + * + * @param aHandle Handle to the message to be saved. + * @return Return code. + */ + virtual TInt SaveMessage( const TCbsMessageHandle& aHandle ) = 0; + }; + +#endif // __MSaveMessageController_h + +// END OF FILE diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/RCbsUi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/RCbsUi.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,138 @@ +/* +* Copyright (c) 2002 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: +* Interface for CBS Client +* +*/ + + +#ifndef __RCbsUi_h +#define __RCbsUi_h + +// INCLUDE FILES +#include +#include +#include + +#include "MCbs.h" + + +// CLASS DECLARATION + +/** +* Delecates calls to RCbs. +*/ +class RCbsUi : public MCbs + { + public: // Constructor and destructor + + /** + * Constructor. + */ + RCbsUi(); + + /** + * Destructor. + */ + ~RCbsUi(); + + public: // From MCbs + + TInt Connect(); + void Close(); + TVersion Version() const; + + // === Settings-related methods + void GetReceptionStatus( TBool& aStatus ); + TInt SetReceptionStatus( TBool aStatus ); + void GetTopicDetectionStatus( TBool& aStatus ); + TInt SetTopicDetectionStatus( TBool aStatus ); + void GetLanguages( TCbsSettingsLanguages& aLanguages ); + TInt SetLanguages( const TCbsSettingsLanguages& aLanguages ); + void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent ); + void NotifySettingsChangedCancel(); + + // === Topic Collection-related methods + void StartCollectionBrowsing(); + TBool HasNextCollectionTopic(); + TInt NextCollectionTopic( TCbsTopicInfo& aInfo ); + + // === Topic list-related methods + void GetTopicCount( TInt& aCount ); + TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic ); + TInt FindTopicByNumber( TCbsTopicNumber aNumber, TCbsTopic& aTopic ); + TInt DeleteTopic( TCbsTopicNumber aNumber ); + TInt DeleteAllTopics(); + TInt AddTopic( TCbsTopic& aTopic ); + TInt ChangeTopicNameAndNumber( + TCbsTopicNumber aOldNumber, + TCbsTopicNumber aNewNumber, + const TCbsTopicName& aName ); + TInt ChangeTopicSubscriptionStatus( + TCbsTopicNumber aNumber, TBool aNewStatus ); + TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber, + TBool aNewStatus ); + void NotifyOnTopicListEvent( + TRequestStatus& aStatus, + const TInt aRequested, + TCbsTopicListEvent& aEvent, + TCbsTopicNumber& aNumber ); + void NotifyOnTopicListEventCancel(); + TInt GetNewTopicsCount( TInt& aCount ); + TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber ); + void GetUnreadMessageCount( TInt& aCount ); + void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage ); + TInt NumberOfUnreadHotmarkedMessages(); + TInt GetNextAndPrevTopicNumber( + const TCbsTopicNumber& aCurrentTopicNumber, + TCbsTopicNumber& aPrevTopicNumber, + TCbsTopicNumber& aNextTopicNumber, + TInt& aPosition ); + + // === Topic Messages-related methods + TInt GetMessageCount( TCbsTopicNumber aNumber, TInt& aCount ); + TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex, + TCbsMessage& aMessage ); + TInt FindMessageByHandle( + const TCbsMessageHandle& aHandle, + TCbsMessage& aMessage ); + TInt GetMessageIndexByHandle( + const TCbsMessageHandle& aHandle, TInt& aIndex ); + TInt DeleteMessage( const TCbsMessageHandle& aHandle ); + TInt SaveMessage( const TCbsMessageHandle& aHandle ); + TInt LockMessage( const TCbsMessageHandle& aHandle ); + TInt ReadMessage( const TCbsMessageHandle& aHandle ); + TInt GetMessageContents( + const TCbsMessageHandle& aHandle, + TDes& aBuffer ); + TInt GetNextAndPrevMessageHandle( + const TCbsMessageHandle& aCurrentMsgHandle, + TCbsMessageHandle& aPrevMsgHandle, + TCbsMessageHandle& aNextMsgHandle, + TInt& aPosition ); + + // Other methods + TBool Connected() const; + void Shutdown() const; + + private: // Data + + // Real cbs client + RCbs iServer; + + }; + +#endif // __RCbsUi_h + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiInc/ccbsuisettingsviewcontainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiInc/ccbsuisettingsviewcontainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,283 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for the CCbsUiSettingsViewContainer class. +* +* +*/ + + +#ifndef __CCBSUISETTINGSVIEWCONTAINER_H +#define __CCBSUISETTINGSVIEWCONTAINER_H + +// INCLUDES +#include +#include +#include // MEikListBoxObserver +#include +#include "CbsUiConstants.h" + + +// FORWARD DECLARATIONS +class CCbsUiMsgView; +class MCbs; +class CCbsUiSettingsView; +class CAknSettingStyleListBox; +class CSelectionItemList; + +// CLASS DECLARATION + +/** +* Container for settings view components. +* +*/ +class CCbsUiSettingsViewContainer : public CCoeControl, + public MEikListBoxObserver + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * + * @param aView settings view + * @param aRect containers area + * @param aServer cbs server + */ + static CCbsUiSettingsViewContainer* NewL( CCbsUiSettingsView& aView, + const TRect& aRect, + MCbs& aServer ); + + /** + * Destructor. + */ + ~CCbsUiSettingsViewContainer(); + + public: // From CCoeControl + + /** + * Returns the numbers of components. + * + * @return Number of components in the container + */ + TInt CountComponentControls() const; + + /** + * Returns a component. + * + * @param aIndex component index which is required + * @return required component + */ + CCoeControl* ComponentControl( TInt aIndex ) const; + + /** + * Sets a new size to list box. + */ + void SizeChanged(); + + /** + * Informs that the focus is changed. + * @param aDrawNow Contains the value that was passed to it by SetFocus() + */ + void FocusChanged( TDrawNow aDrawNow ); + + /** + * Offers key event to list box. + * + * @param aKeyEvent what kind of key produced this event + * @param aType Which kind of action produced this event + * @return EKeyWasConsumed + */ + TKeyResponse OfferKeyEventL( + const TKeyEvent& aKeyEvent, TEventCode aType ); + + /** + * Gets the control's help context. + * + * @param aContext The control's help context + */ + void GetHelpContext( TCoeHelpContext& aContext ) const; + + /** + * Handles a change to the control's resources. + * @param aType A message UID value. + */ + void HandleResourceChange( TInt aType ); + + public: // New functions + + /** + * Changes the value which the user has pushed and asks + * server to save that value. If the user has choosed the + * language item the language page will show up. Calls + * private HandleListViewActionL. + * + * @param aLaunchedFromOptionMenu if ETrue pop_up_setting_item + * will be launhed + * @return EKeyWasConsumed + */ + TKeyResponse HandleListViewActionL( TBool aLaunchedFromOptionMenu ); + + /** + * Offers public interface to update all settings. + * Is needed if operator changes some values during in settings view. + */ + void UpdateSettingsL(); + + /** + * Sets focus to first item in settings list box. Needed, because + * sometimes view is not activated correctly. + */ + void SetFocusToFirstItem() const; + + protected: // From MEikListBoxObsever + + /** + * Handles list box events. + * + * @param aListBox the originating list box + * @param aEventType a code for the event. + */ + void HandleListBoxEventL( CEikListBox* aListBox, + TListBoxEvent aEventType ); + + private: // New functions + + /** + * With this settings view can update the text in the + * list box for language item. This can only be called from + * GetSettingsL! + */ + void SetLanguageSelectionL( CDesCArray& aItemArray ); + + /** + * Creates a list box. + */ + void CreateListBoxL(); + + /** + * Gets the settings of reception, language and detection from the + * sserver and sets these values to list box. + */ + void GetSettingsL(); + + /** + * Changes the value which the user has pushed and asks + * server to save that value. If the user has choosed the + * language item the language page will show up. + * + * @param aListBox changes are focused on this list box + * @param aLaunchedFromOptionMenu if ETrue pop_up_setting_item + * will be launhed + * @return EKeyWasConsumed + */ + TKeyResponse HandleListViewActionL( + const CEikListBox* aListBox, TBool aLaunchedFromOptionMenu ); + + /** + * Launches a dialog for On and Off setting items. + * + * @param aValue it will contain selected value in dialog + * @param aUpdate if aValue has changed in dialog + * @param aResouceId setting text resource id + */ + void LaunchDialogOnOffL( + const TBool& aValue, TBool& aUpdate, TInt aResouceId ) const; + + /** + * Launches a topic detection dialog for On and Off setting items. + * + * @param aValue it will contain selected value in dialog + * @param aUpdate if aValue has changed in dialog + * @param aResouceId setting text resource id + */ + void LaunchTopicDetectionDialogOnOffL( + const TBool& aValue, TBool& aUpdate, TInt aResouceId ) const; + + /** + * Prepares the language setting page with the values stored in + * the server. + */ + void PrepareLanguageSettingPageL(); + + /** + * Returns selected item in settings page. + * + * @return selected item + */ + TCbsUiLanguageSelectionIndex GetSelected(); + + /** + * Launchs language setting page with aItems. + * + * @param aItems items in language setting page. + * @param aCurrentSelectionIndex item to be selected + */ + void LaunchLanguageSettingPageL( + CDesCArrayFlat& aItems, TInt& aCurrentSelectionIndex ); + + /** + * Sets items to a aItemList from resource array. + * + * @param aResourceId resource array + * @param aItemList list to be filled + */ + void AddItemsToListL( + TInt aResourceId, + CDesCArrayFlat& aItemList ) const; + + private: + + /** + * C++ constructor. + * + * @param aView settings view + * @param aServer cbs server + */ + CCbsUiSettingsViewContainer( CCbsUiSettingsView& aView, + MCbs& aServer ); + + /** + * Symbian OS default constructor. + */ + void ConstructL( const TRect& aRect ); + + + /** + * Checks if phone is in offline mode or not + * @return ETrue if phone is in offline mode + * Otherwise EFalse. + */ + TBool IsPhoneOfflineL() const; + + + private: // Data + + // List box object in dialog. + CAknSettingStyleListBox* iListBox; + + // For setting mop parent + CCbsUiSettingsView& iView; + + // With the help of server it is possible to set and get + // setting information. + MCbs& iServer; + + // If ofline feature is supported then this is ETrue. + TBool iOfflineFeatureSupported; + + }; + + +#endif //__CCBSUISETTINGSVIEWCONTAINER_H + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiAddFromIndexDialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiAddFromIndexDialog.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,321 @@ +/* +* Copyright (c) 2002 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: Dialog which shows topics, which are not yet in +* the topic list view. Enables topics adding manually. +* +* +*/ + + +// INCLUDES +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "CCbsUiAddFromIndexDialog.h" +#include "Cbsuiapp.hrh" +#include "CbsUiPanic.h" +#include "MCbs.h" + +// CONSTANTS +const TInt KAssumedAverageOfItems = 5; +const TInt KNumberOfIconsInAddFromIndexDialog = 4; +_LIT(KCbsIconListSeparator, "1\t"); +_LIT(KCbsColumnListSeparator, " "); + +// if the aTopicInfo.iNumber is shorter than KWidth, +// this character will be used to fill empty spaces. +const TUint KZeroFill = '0'; + + + + +// ================= MEMBER FUNCTIONS ======================= +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiAddFromIndexDialog::CCbsUiAddFromIndexDialog( MCbs& aServer ) : +iServer(aServer) + { + } + +// Destructor +CCbsUiAddFromIndexDialog::~CCbsUiAddFromIndexDialog() + { + delete iHandles; + delete iNaviDecorator; + } + +//----------------------------------------------------------------------------- +// +// CCbsUiAddFromIndexDialog::PreLayoutDynInitL() +// +// Sets the choices to controls in AddFromIndexdialog +// +//----------------------------------------------------------------------------- +void CCbsUiAddFromIndexDialog::PreLayoutDynInitL() + { + CEikDialog::PreLayoutDynInitL(); + + CAknNavigationControlContainer* naviPane = + STATIC_CAST( CAknNavigationControlContainer*, + iEikonEnv->AppUiFactory()->StatusPane()->ControlL( + TUid::Uid( EEikStatusPaneUidNavi) ) ); + + __ASSERT_DEBUG( naviPane, CbsUiPanic( ENaviPaneError ) ); + + TResourceReader reader; + iCoeEnv->CreateResourceReaderLC( reader, R_QTN_CB_AD_SEL_TOP ); + + delete iNaviDecorator; + iNaviDecorator = NULL; + + iNaviDecorator = naviPane-> + ConstructNavigationDecoratorFromResourceL( reader ); + + __ASSERT_DEBUG( iNaviDecorator, CbsUiPanic( ENaviDecoratorError ) ); + + naviPane->PushL( *iNaviDecorator ); + CleanupStack::PopAndDestroy(); + + iListBox = STATIC_CAST( + CAknSingleGraphicStyleListBox*, Control(ECbsUiAddFromIndexDlgLine) ); + + __ASSERT_DEBUG( iListBox, CbsUiPanic( EListBoxInDialogError ) ); + + SetIconsL(); + SetTopicsL(); + + // Scrollbar + iListBox->CreateScrollBarFrameL(ETrue); + iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto); + + // order has to be this; otherwise on error add from index title pane + // remains. + CreateAddFromIndexTitlePaneL(); + + MEikAppUiFactory* appUiFactory = iEikonEnv->AppUiFactory(); + TRect rect = appUiFactory->ClientRect(); + iListBox->SetRect( rect ); + } + +//----------------------------------------------------------------------------- +// +// CCbsUiAddFromIndexDialog::OkToExitL() +// +// Handles keyevents. In case "Softkey OK" it +// add selected topics using member function addtopic +// +//----------------------------------------------------------------------------- +TBool CCbsUiAddFromIndexDialog::OkToExitL( TInt aKeycode ) + { + TBool result( EFalse ); + switch ( aKeycode ) + { + case EAknSoftkeyOk: + { + const CListBoxView::CSelectionIndexArray* selArray = + iListBox->SelectionIndexes(); + + if ( selArray ) + { + // Initialize the marked contact id array using selArray + TInt count( selArray->Count() ); + TInt ret( KErrNone ); + for ( TInt i = 0; i < count && ret == KErrNone; ++i ) + { + const TInt selIndex( (*selArray)[i] ); + ret = AddTopicL( iHandles->At(selIndex) ); + } + } + // Ok to exit, dialog is also removed from the stack + result = ETrue; + iEikonEnv->RemoveFromStack( this ); + break; + } + // If Mark or Unmark is pressed, the dialog must not exit. + // Dialog must also stay in stack. + case EAknSoftkeyMark: + case EAknSoftkeyUnmark: + { + result = EFalse; + break; + } + default: + break; + } + + return result; + } + + +//----------------------------------------------------------------------------- +// +// CCbsUiAddFromIndexDialog::GetIndexNumber() +// +// Parses Indexnumber from topic info. Is used by +// SetTopics-member function. +// +//----------------------------------------------------------------------------- +void CCbsUiAddFromIndexDialog::GetIndexNumber( const TCbsTopicInfo& aTopicInfo , + TBuf& aIndexNumber ) const + { + TBuf ind; + ind.AppendNum( TInt(aTopicInfo.iNumber) ); + aIndexNumber.Justify(ind , KTopicNumberWidth, ERight, KZeroFill); + } + +//----------------------------------------------------------------------------- +// +// CCbsUiAddFromIndexDialog::AddTopicL() +// +// +// +//----------------------------------------------------------------------------- +TInt CCbsUiAddFromIndexDialog::AddTopicL( const TCbsTopicInfo aTopicInfo ) + { + TCbsTopic topic; + + topic.iHotmarked = EFalse; + topic.iName = aTopicInfo.iName; + topic.iNumber = aTopicInfo.iNumber; + topic.iProtected = EFalse; + topic.iSavedMessages = 0; + topic.iUnreadMessages = 0; + topic.iSubscribed = 0; + + TInt ret( iServer.AddTopic(topic) ); + + switch ( ret ) + { + case KErrNone: + // ok, do nothing + break; + case KErrAlreadyExists: // same handling + case KErrArgument: // same handling + // after this error still tryes to append other items if exists + ret = KErrNone; + break; + default: + User::LeaveIfError(ret); + break; + } + + return ret; + } + +//----------------------------------------------------------------------------- +// +// CCbsUiAddFromIndexDialog::SetIconsL() +// +// Sets the multiselction box-images. +// +//----------------------------------------------------------------------------- +void CCbsUiAddFromIndexDialog::SetIconsL() const + { + CAknIconArray* icons = new (ELeave) + CAknIconArray(KNumberOfIconsInAddFromIndexDialog); + + CleanupStack::PushL(icons); + icons->ConstructFromResourceL(R_CHECKBOX_ICONS); + CleanupStack::Pop(); // icons + + iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons); + } + +//----------------------------------------------------------------------------- +// +// CCbsUiAddFromIndexDialog::SetTopicsL() +// +// +//----------------------------------------------------------------------------- +void CCbsUiAddFromIndexDialog::SetTopicsL() + { + TCbsTopicInfo topicinfo; + + iServer.StartCollectionBrowsing(); + + iHandles = new (ELeave) TCbsTopicInfoHandleList(KAssumedAverageOfItems); + + __ASSERT_DEBUG( iHandles, CbsUiPanic( ETopicHandleError ) ); + + iHandles->Reset(); + TInt err(KErrNone); + + while( iServer.HasNextCollectionTopic() && err == KErrNone ) + { + err = iServer.NextCollectionTopic(topicinfo); + if ( err == KErrNone ) + { + MDesCArray* itemList = iListBox->Model()->ItemTextArray(); + CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList); + + TBuf index; + GetIndexNumber( topicinfo, index ); + + HBufC* buffer = HBufC::NewMaxLC( + KCbsIconListSeparator().Length() + index.Length() + + KCbsColumnListSeparator().Length() + topicinfo.iName.Length() ); + + TPtr ptr = buffer->Des(); + + ptr = KCbsIconListSeparator; + ptr.Append(index); + ptr.Append(KCbsColumnListSeparator); + ptr.Append(topicinfo.iName); + + itemArray->AppendL(*buffer); + iHandles->AppendL(topicinfo); + CleanupStack::PopAndDestroy(); // buffer + } + } + + iListBox->HandleItemAdditionL(); + if ( iListBox->Model()->NumberOfItems() == 0 ) + { + // No warning, but we can close the dialog + User::Leave(KErrNone); + } + } + +//----------------------------------------------------------------------------- +// +// CCbsUiAddFromIndexDialog::CreateAddFromIndexTitlePaneL() +// +// +//----------------------------------------------------------------------------- +void CCbsUiAddFromIndexDialog::CreateAddFromIndexTitlePaneL() const + { + CEikStatusPane* sp = STATIC_CAST( CAknAppUi*, CEikonEnv::Static()-> + EikAppUi() )->StatusPane(); + + CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, sp-> + ControlL( TUid::Uid(EEikStatusPaneUidTitle) )); + + __ASSERT_DEBUG( sp && title, CbsUiPanic( EStatusOrTitlePaneError ) ); + + TResourceReader titlereader; + iCoeEnv->CreateResourceReaderLC( titlereader, R_QTN_CB_TITLE_ADD_TOPICS ); + title->SetFromResourceL( titlereader ); + CleanupStack::PopAndDestroy(); // resource title + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiConfirmationNote.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiConfirmationNote.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2002 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: +* Implementation for CCbsUiConfirmationNote. +* +* +*/ + + +// INCLUDES +#include +#include +#include +#include "CCbsUiConfirmationNote.h" + + +// MODULE DATA STRUCTURES + +/** + * Global Confirmation query observer. Doesn't do anything. + */ +class CCbsUiConfirmationNote::CGlobalConfirmationQueryObserver : + public CActive + { + public: // constructor + + inline CGlobalConfirmationQueryObserver() : CActive(EPriorityIdle) + { + } + + inline ~CGlobalConfirmationQueryObserver() + { + Cancel(); + } + + inline void ConstructL() + { + CActiveScheduler::Add(this); + SetActive(); + } + + public: // from CActive + + void DoCancel() + { + } + + void RunL() + { + Cancel(); + } + }; + +// ================= MEMBER FUNCTIONS ======================= + +CCbsUiConfirmationNote::CCbsUiConfirmationNote() + { + } + +CCbsUiConfirmationNote::~CCbsUiConfirmationNote() + { + delete iConfQueryObserver; + delete iGlobalConfirmationQuery; + } + + +// --------------------------------------------------------- +// CCbsUiConfirmationNote::ShowGlobalConfirmationNoteL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CCbsUiConfirmationNote::ShowGlobalConfirmationNoteL( CCoeEnv& aCoeEnv ) + { + // create active object + CGlobalConfirmationQueryObserver* observer = + new (ELeave) CGlobalConfirmationQueryObserver(); + + if (iConfQueryObserver) + { + delete iConfQueryObserver; + iConfQueryObserver = NULL; + } + iConfQueryObserver = observer; + iConfQueryObserver->ConstructL(); + + // show critical level note + CAknGlobalConfirmationQuery* dlg = CAknGlobalConfirmationQuery::NewL(); + if (iGlobalConfirmationQuery) + { + delete iGlobalConfirmationQuery; + iGlobalConfirmationQuery = NULL; + } + iGlobalConfirmationQuery = dlg; + + HBufC* noteText = StringLoader::LoadLC( + R_TEXT_NOTE_NOT_ENOUGH_MEMORY, &aCoeEnv); + + iGlobalConfirmationQuery->ShowConfirmationQueryL( + iConfQueryObserver->iStatus, + *noteText, + R_AVKON_SOFTKEYS_OK_EMPTY); + + CleanupStack::PopAndDestroy(noteText); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiEditTopicDlg.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiEditTopicDlg.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,216 @@ +/* +* Copyright (c) 2002 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: +* Implementation of CCbsUiEditTopicDlg. +* +* +*/ + + +// INCLUDES +#include // EMultilineFirstLine, EMultilineSecondLine +#include // Layout_Meta_Data::IsLandscapeOrientation() +#include // AknTextUtils +#include +#include +#include +#include // KEikDynamicLayoutVariantSwitch +#include "Cbsuiapp.hrh" +#include "CCbsUiEditTopicDlg.h" +#include "CCbsUiTopicListView.h" +#include "CbsUiPanic.h" +#include "CbsUiUtility.h" + + +//CONSTANTS +_LIT(KDummyString,""); + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiEditTopicDlg::CCbsUiEditTopicDlg( CCbsUiTopicListView& aTopicListView, + TBool aType ) + : +CAknMultiLineDataQueryDialog(ENoTone), +iTopicListView(aTopicListView), +iType(aType) + { + } + +// --------------------------------------------------------- +// CCbsUiEditTopicDlg::ConstructL +// +// --------------------------------------------------------- +// +void CCbsUiEditTopicDlg::ConstructL( TDes& aDataText, TDes& aDataText2 ) + { + SetDataL(aDataText, aDataText2); + iUpdateLeftSoftKeyFirstTime = ETrue; + } + +// --------------------------------------------------------- +// CCbsUiEditTopicDlg::NewL +// +// --------------------------------------------------------- +// +CCbsUiEditTopicDlg* CCbsUiEditTopicDlg::NewL( TDes& aDataText, TDes& aDataText2, + CCbsUiTopicListView& aTopicListView, TBool aType ) + { + CCbsUiEditTopicDlg* self = + new (ELeave) CCbsUiEditTopicDlg(aTopicListView, aType); + CleanupStack::PushL(self); + self->ConstructL(aDataText, aDataText2); + CleanupStack::Pop(); // self + + return self; + } + +// Destructor +CCbsUiEditTopicDlg::~CCbsUiEditTopicDlg() + { + } + +// --------------------------------------------------------- +// CCbsUiEditTopicDlg::OkToExitL +// +// --------------------------------------------------------- +// +TBool CCbsUiEditTopicDlg::OkToExitL( TInt aButtonId ) + { + // just to update the values + TBool okToExit( CAknMultiLineDataQueryDialog::OkToExitL( aButtonId ) ); + if ( okToExit ) + { + TBuf dummy( KDummyString ); + TBuf topicNumberStr; + topicNumberStr = SecondData( dummy ); + AknTextUtils::ConvertDigitsTo( topicNumberStr, EDigitTypeWestern ); + TLex lex( topicNumberStr ); + TCbsTopicNumber tn; + + // No need to panic! + User::LeaveIfError( lex.Val( tn, EDecimal ) ); + + TCbsTopicName topicName; + + topicName.Append( FirstData( dummy ) ); + + TInt ret( KErrGeneral ); // just to differ from KErrNone + + ret = iTopicListView.EditTopic( iType, tn, topicName ); + + switch ( ret ) + { + case KErrDiskFull: + User::Leave( KErrDiskFull ); + break; + case KErrNone: + // do nothing + break; + default: + // shows the error note and the dialog is not closed + CbsUiUtility::ShowErrorNoteL( R_TEXT_NOTE_NUMBER_ERROR ); + okToExit = EFalse; + SetCursorAndFocusL(); + break; + } + } + + return okToExit; + } + + +// --------------------------------------------------------- +// CCbsUiEditTopicDlg::LineChangedL +// +// --------------------------------------------------------- +// +void CCbsUiEditTopicDlg::LineChangedL( TInt /*aControlId*/ ) + { + UpdateLeftSoftKeyL(); + } + + +// ---------------------------------------------------- +// CCbsUiEditTopicDlg::HandleResourceChange +// +// ---------------------------------------------------- +void CCbsUiEditTopicDlg::HandleResourceChange( TInt aType ) + { + CAknMultiLineDataQueryDialog::HandleResourceChange( aType ); + + if( aType == KEikDynamicLayoutVariantSwitch ) + { + TRAPD( ignore, UpdateLeftSoftKeyL( ) ); + if( ignore ) + { + ignore = KErrNone; //Prevent ARMV5 compilation varning + } + } + } + + +// --------------------------------------------------------- +// CCbsUiEditTopicDlg::UpdateLeftSoftKeyL +// Note: iUpdateLeftSoftKeyFirstTime must use because when we +// go to UpdateLeftSoftKeyL() method first time then IdOfFocusControl() +// method doesn't work ok yet. +// --------------------------------------------------------- +// +void CCbsUiEditTopicDlg::UpdateLeftSoftKeyL() + { + if( ( Layout_Meta_Data::IsLandscapeOrientation() ) && + ( ( IdOfFocusControl() == EMultilineFirstLine) || iUpdateLeftSoftKeyFirstTime ) ) + { + MakeLeftSoftkeyVisible( ETrue ); + } + else + { + TBuf buf; + SecondControl()->GetText( buf ); + AknTextUtils::ConvertDigitsTo( buf, EDigitTypeWestern ); + TLex lex( buf ); + TInt topicNumber( -1 ); + if ( lex.Val( topicNumber ) == KErrNone ) + { + MakeLeftSoftkeyVisible( ETrue ); + } + else + { + MakeLeftSoftkeyVisible( EFalse ); + } + } + iUpdateLeftSoftKeyFirstTime = EFalse; + } + +// --------------------------------------------------------- +// CCbsUiEditTopicDlg::SetCursorAndFocusL +// +// --------------------------------------------------------- +// +void CCbsUiEditTopicDlg::SetCursorAndFocusL() + { + TryChangeFocusToL(EMultilineSecondLine); + CAknQueryControl* control = + STATIC_CAST( CAknQueryControl*, + Control(EMultilineSecondLine) ); + CEikEdwin* edwin = STATIC_CAST( + CEikEdwin*, control->ControlByLayoutOrNull(EDataLayout) ); + edwin->SetSelectionL( control->GetTextLength(),0 ); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiLanguageSettingPage.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiLanguageSettingPage.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,239 @@ +/* +* Copyright (c) 2002 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: +* Implementation of CCbsUiLanguageSettingPage. +* +* +*/ + + +// INCLUDES +#include +#include +#include "CCbsUiLanguageSettingPage.h" +#include "CCbsUiListQueryDialog.h" +#include "CbsUiPanic.h" +#include "CbsUiConstants.h" +#include "MCbs.h" + + + +// CONSTANTS +const TInt KFirstLaunch = 1; +const TInt KAverageReceivedLanguages = 4; + + + +// ================= MEMBER FUNCTIONS ======================= + + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiLanguageSettingPage::CCbsUiLanguageSettingPage( + TInt aResourceID, + TInt& aCurrentSelectionIndex, + CDesCArrayFlat* aItemArray, + MCbs& aServer ) + : + CAknRadioButtonSettingPage(aResourceID, aCurrentSelectionIndex, aItemArray), + iServer(aServer), + iSelectionIndex(aCurrentSelectionIndex), + iArray(*aItemArray) + { + } + +// --------------------------------------------------------- +// CCbsUiLanguageSettingPage::OkToExitL +// +// (other iItems were commented in a header). +// --------------------------------------------------------- +// +TBool CCbsUiLanguageSettingPage::OkToExitL( TBool aAccept ) + { + __ASSERT_DEBUG( &iServer, CbsUiPanic(EServerNullError) ); + + // if ok key has been pushed, then this level options + // settings will be made + if ( aAccept ) + { + TCbsDbLanguages lang; + iServer.GetLanguages(lang); + + switch ( iSelectionIndex ) + { + case ECbsUiAll: + lang.iLanguages[ECbsAll] = ETrue; + lang.iLanguages[ECbsOther] = EFalse; + break; + case ECbsUiSelected: + // don't set languages after this, allready set in language dlg + LaunchLanguageDialogL(); + break; + case ECbsUiOther: + lang.iLanguages[ECbsAll] = EFalse; + lang.iLanguages[ECbsOther] = ETrue; + break; + default: + __ASSERT_DEBUG( 0, CbsUiPanic(EErrInvalidValue) ); + break; + } + + if ( iSelectionIndex == ECbsUiAll || iSelectionIndex == ECbsUiOther ) + { + User::LeaveIfError( iServer.SetLanguages(lang) ); + } + } + + + return ETrue; + } + + +// --------------------------------------------------------- +// CCbsUiLanguageSettingPage::OfferKeyEventL +// +// (other iItems were commented in a header). +// --------------------------------------------------------- +// +TKeyResponse CCbsUiLanguageSettingPage::OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + __ASSERT_DEBUG( ListBoxControl(), CbsUiPanic(EListBoxNullError) ); + + switch ( aKeyEvent.iCode ) + { + case EKeyOK: + LaunchLanguageDialogL(); + break; + default: + break; + } + + return CAknSettingPage::OfferKeyEventL( aKeyEvent, aType ); + } + +// --------------------------------------------------------- +// CCbsUiLanguageSettingPage::GetLanguagesL +// +// (other iItems were commented in a header). +// --------------------------------------------------------- +// +void CCbsUiLanguageSettingPage::GetLanguagesL( + CArrayFix& aIndexArray, TCbsDbLanguages& aLanguages ) + { + iServer.GetLanguages(aLanguages); + + for ( TInt j(0); j < ECbsOther; j++ ) + { + if ( aLanguages.iLanguages[j] ) + { + aIndexArray.AppendL(j); + } + } + } + +// --------------------------------------------------------- +// CCbsUiLanguageSettingPage::LaunchLanguageDialogL +// +// (other iItems were commented in a header). +// --------------------------------------------------------- +// +void CCbsUiLanguageSettingPage::LaunchLanguageDialogL() + { + iCurrentLaunchingId++; + + if ( iCurrentLaunchingId == KFirstLaunch ) + { + if ( ListBoxControl()->CurrentItemIndex() == ECbsUiSelected ) + { + CArrayFixFlat* indexArray = + new (ELeave) CArrayFixFlat(KAverageReceivedLanguages); + CleanupStack::PushL(indexArray); + + TCbsDbLanguages languages; + GetLanguagesL(*indexArray, languages); + + CCbsUiListQueryDialog* dlg = new (ELeave) + CCbsUiListQueryDialog(*indexArray); + TInt ret( dlg->ExecuteLD(R_LANGUAGE_MULTISELECTION_LIST_QUERY) ); + + if( ret ) + { + SetLanguagesL(*indexArray, languages); + } + else + { + iCurrentLaunchingId--; + User::Leave( KErrNone ); + } + + CleanupStack::PopAndDestroy(); // indexArray; + } + } + } + +// --------------------------------------------------------- +// CCbsUiLanguageSettingPage::SetLanguagesL +// +// (other iItems were commented in a header). +// --------------------------------------------------------- +// +void CCbsUiLanguageSettingPage::SetLanguagesL( + CArrayFix& aIndexArray, TCbsDbLanguages& aLanguages ) + { + // just clearing the language selection before setting them + for ( TInt i(0); i < ECbsOther; i++ ) + { + aLanguages.iLanguages[i] = EFalse; + } + + // set the values which are chosen + if ( &aIndexArray ) + { + TInt count( aIndexArray.Count() ); + + for (TInt i(0); i < count; i++) + { + TInt selectedIndex( aIndexArray.At(i) ); + __ASSERT_DEBUG( selectedIndex < ECbsOther, + CbsUiPanic(EErrIndexOutOfBounds) ); + aLanguages.iLanguages[selectedIndex] = ETrue; + } + + TBool languageSelected( count > 0 ); + if ( languageSelected ) + { + aLanguages.iLanguages[ECbsAll] = EFalse; + aLanguages.iLanguages[ECbsOther] = EFalse; + } + else + { + // The user can clear the languages and then previously + // defined value will be selected. + // If other has not been previously selected, then + // all has to be selected + if ( !aLanguages.iLanguages[ECbsOther] ) + { + aLanguages.iLanguages[ECbsAll] = ETrue; + } + } + + User::LeaveIfError( iServer.SetLanguages( aLanguages ) ); + } + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiListQueryDialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiListQueryDialog.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,83 @@ +/* +* Copyright (c) 2002 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: +* Implementation of CCbsUiListQueryDialog +* +* +*/ + + +// INCLUDES +#include // CEikColumnListBox +#include // MEikAppUiFactory +#include // CAknSingleGraphicStyleListBox +#include // CGulIcon +#include // CColumnListBoxData +#include // CAknNavigationDecorator +#include // CAknTitlePane +#include // TResourceReader +#include +#include +#include "CCbsUiListQueryDialog.h" +#include "CbsUiPanic.h" +#include "MCbs.h" + + + + + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ constructor can NOT contain any code, that +// might leave. +// +CCbsUiListQueryDialog::CCbsUiListQueryDialog( + CArrayFix& aIndexArray ) : + CAknListQueryDialog( &aIndexArray ), + iIndexArray( aIndexArray ) + { + } + +// --------------------------------------------------------- +// CCbsUiListQueryDialog::PostLayoutDynInitL +// +// +// --------------------------------------------------------- +// +void CCbsUiListQueryDialog::PostLayoutDynInitL() + { + CAknListQueryDialog::PostLayoutDynInitL(); + ListBox()->SetSelectionIndexesL( &iIndexArray ); + } + +// --------------------------------------------------------- +// CCbsUiListQueryDialog::OkToExitL +// +// +// --------------------------------------------------------- +// +TBool CCbsUiListQueryDialog::OkToExitL( TInt aKeyCode ) + { + if ( aKeyCode == EEikBidOk ) + { + iIndexArray.Reset(); + } + + return CAknListQueryDialog::OkToExitL( aKeyCode ); + } + + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiMsgView.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiMsgView.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1030 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Implementation of CCbsUiMsgView. +* +* +*/ + + + +// INCLUDES +#include //AknTextUtils +#include // for feature flags +#include // for feature manager +#include +#include +#include +#include +#include +#include // CRichText +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "CCbsUIMsgView.h" +#include "Cbsuiapp.hrh" +#include "CCbsUIMsgViewContainer.h" +#include "CbsUiPanic.h" +#include "CbsUiConstants.h" +#include "CbsUiUtility.h" +#include "CbsUiDebug.h" +#include "MCbs.h" +#include "CbsUiId.h" //KUidCbsUiappDef + + + +// CONSTANTS + +static const TUid KUidCbsUiappApp = { KUidCbsUiappDef }; +const TInt KCbsImmediateMessageIdInt = 313; +const TInt KMaxAssumedDateTimeLength = 30; + +_LIT(KSpace, " "); +_LIT(KLineBreak, "\n"); +const TInt KMaxSeparatorLenght = 5; +const TInt KOneHotMarkedMessage = 1; + + + + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. + +CCbsUiMsgView::CCbsUiMsgView( MCbs& aServer ) +: +iServer( aServer ) + { + } + +// Symbian OS default constructor can leave. +void CCbsUiMsgView::ConstructL() + { + BaseConstructL( R_CBSUI_MSGVIEW ); + iFindItemMenu = CFindItemMenu::NewL( ECbsUiCmdFindItem ); + iFromOtherApplication = EFalse; + + CEikStatusPane* statusPane = StatusPane(); + + iNaviContainer = + STATIC_CAST( CAknNavigationControlContainer*, statusPane-> + ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); + + } + +// Two-phased constructor. +CCbsUiMsgView* CCbsUiMsgView::NewL( MCbs& aServer ) + { + CCbsUiMsgView* self = new (ELeave) CCbsUiMsgView( aServer ); + + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// Destructor +CCbsUiMsgView::~CCbsUiMsgView() + { + CloseContextMenu(); + + if ( iContainer ) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + } + + delete iContainer; + delete iFindItemMenu; + + if ( iNaviContainer && iDecoratedLabel ) + { + iNaviContainer->Pop ( iDecoratedLabel ); + delete iDecoratedLabel; + } + iDecoratedLabel = NULL; + + if ( iNaviContainer && iPreviousDecoratedLabel ) + { + iNaviContainer->Pop ( iPreviousDecoratedLabel ); + delete iPreviousDecoratedLabel; + } + iPreviousDecoratedLabel = NULL; + + delete iMessage; + } + +// --------------------------------------------------------- +// CCbsUiMsgView::HandleNaviDecoratorEventL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::HandleNaviDecoratorEventL( TInt aEventID ) + { + + switch ( aEventID ) + { + // Left arrow tapped from the navi pane + case MAknNaviDecoratorObserver::EAknNaviDecoratorEventLeftTabArrow: + { + if( AknLayoutUtils::LayoutMirrored() ) + { + MoveToNextMessageL(); + } + else + { + MoveToPreviousMessageL(); + } + break; + } + // Right arrow tapped from the navi pane + case MAknNaviDecoratorObserver::EAknNaviDecoratorEventRightTabArrow: + { + if( AknLayoutUtils::LayoutMirrored() ) + { + MoveToPreviousMessageL(); + } + else + { + MoveToNextMessageL(); + } + break; + } + default: + { + break; + } + } + + } + +// --------------------------------------------------------- +// CCbsUiMsgView::DynInitMenuPaneL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::DynInitMenuPaneL( TInt aResourceId, + CEikMenuPane* aMenuPane ) + { + __ASSERT_DEBUG( aMenuPane, CbsUiPanic( EMenuPaneNullError ) ); + __ASSERT_DEBUG( iFindItemMenu, CbsUiPanic( EFindItemNullError ) ); + + switch ( aResourceId ) + { + case R_CBSUI_MSGVIEW_MENU: + { + iFindItemMenu->DisplayFindItemMenuItemL( + *aMenuPane, + ECbsUiappCmdMsgMenuDelete ); + + if ( CbsUiUtility::IsSavedL(iCurrentHandle, iServer) ) + { + aMenuPane->DeleteMenuItem( ECbsUiappCmdMsgMenuKeep ); + } + if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) + { + aMenuPane->DeleteMenuItem( EAknCmdHelp ); + } + break; + } + case R_FINDITEMMENU_MENU: + { + iFindItemMenu->DisplayFindItemCascadeMenuL( *aMenuPane ); + break; + } + default: + break; + } + } + +// --------------------------------------------------------- +// CCbsUiMsgView::ProcessCommandL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::ProcessCommandL( TInt aCommand ) + { + if ( iContextMenu ) + { + iContextMenu->StopDisplayingMenuBar(); + CloseContextMenu(); + } + + // Context sensitive menu should be opened when MSK pressed + switch ( aCommand ) + { + case EAknSoftkeyContextOptions: + HandleCommandL( EAknSoftkeyContextOptions ); + break; + default: + break; + } + // Call base class + CAknView::ProcessCommandL( aCommand ); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::Id +// +// +// --------------------------------------------------------- +// +TUid CCbsUiMsgView::Id() const + { + return TUid::Uid( ECbsUiMsgViewId ); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::MoveToNextMessage +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::MoveToNextMessageL() + { + // if a message is class 0, then changing the message + // content is not allowed. + if ( iIsClass0 ) + { + return; + } + + if ( SetHandleTo(iCurrentHandle, EToNext) ) + { + DoLoadMessageL(); + } + + } + +// --------------------------------------------------------- +// CCbsUiMsgView::MoveToPreviousMessage +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::MoveToPreviousMessageL() + { + // if a message is class 0, then changing the message + // content is not allowed. + if ( iIsClass0 ) + { + return; + } + + if ( SetHandleTo(iCurrentHandle, EToPrevious) ) + { + DoLoadMessageL(); + } + } + +// --------------------------------------------------------- +// CCbsUiMsgView::HandleCommandL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::HandleCommandL( TInt aCommand ) + { + if ( iFindItemMenu && iFindItemMenu->CommandIsValidL( aCommand ) ) + { + DoSearchL( aCommand ); + } + + TBool exit(EFalse); // program exits if true + + switch ( aCommand ) + { + case EAknSoftkeyBack: + { + ActivateTopicViewL( CurrentTopicNumber(), iCurrentHandle ); + break; + } + case ECbsUiappCmdMsgMenuKeep: + { + if ( CbsUiUtility::SaveCurrentMessageL(iCurrentHandle, *this) == + KErrNone && iIsClass0 ) + { + exit = ETrue; + + // show modal note + CbsUiUtility::ShowConfirmationNoteL( + R_TEXT_NOTE_MSG_KEPT, ETrue); + } + break; + } + case ECbsUiCmdCopyToClipboard: + { + iContainer->CopyToClipboardL(); + CbsUiUtility::ShowConfirmationNoteL(R_TEXT_NOTE_MSG_TO_CLIP); + break; + } + case ECbsUiappCmdMsgMenuDelete: + { + if ( DeleteMessageL(iCurrentHandle) && iIsClass0 ) + { + exit = ETrue; + } + break; + } + case EAknSoftkeyContextOptions: + case ECbsUiappCmdOkKey: + { + LaunchContextMenuL(); + break; + } + case EAknCmdHelp: + AppUi()->HandleCommandL(aCommand); + break; + case EAknSoftkeyExit: // let it run through + case EAknCmdExit: + { + if ( !iFromOtherApplication ) + { + // if it has been CBSUI then do this + ActivateTopicListViewL(); + } + else + { + exit = ETrue; + } + iFromOtherApplication = EFalse; + break; + } + default: + break; + } + + if ( exit ) + { + STATIC_CAST( + MEikCommandObserver*, AppUi() )->ProcessCommandL(EAknCmdExit); + } + } + +// --------------------------------------------------------- +// CCbsUiMsgView::DoActivateL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::DoActivateL( const TVwsViewId& aPrevViewId, + TUid aCustomMessageId, + const TDesC8& aCustomMessage ) + { + iIsClass0 = EFalse; + TBool topicListViewActivated(EFalse); + + switch ( aCustomMessageId.iUid ) + { + case KCbsUiCustomMessageIdInt: + iFromOtherApplication = EFalse; + Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK); + SetCurrentMessageHandle(aCustomMessage); + break; + case KCbsImmediateMessageIdInt: + if ( aPrevViewId.iAppUid != KUidCbsUiappApp ) + { + iFromOtherApplication = ETrue; + } + SetCurrentMessageHandle(aCustomMessage); + Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_EXIT); + Cba()->DrawDeferred(); + iIsClass0 = ETrue; + break; + default: // this should be soft notification + iFromOtherApplication = EFalse; + Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK); + topicListViewActivated = HandleSoftNotificationL(); + break; + } + + if ( !topicListViewActivated ) + { + if ( !iContainer ) + { + iContainer = CCbsUiMsgViewContainer::NewL(*this, ClientRect()); + AppUi()->AddToViewStackL(*this, iContainer); + } + + TInt err( DoLoadMessageL() ); + + // if it is class 0 message and some error occurs + if ( err != KErrNone && iIsClass0 ) + { + User::Leave(err); + } + + if ( iMessage ) + { + iContainer->ActivateL(); + } + else + { + // some error occured + ActivateTopicViewL( CurrentTopicNumber(), iCurrentHandle ); + } + } + } + +// --------------------------------------------------------- +// CCbsUiMsgView::DoDeactivate() +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::DoDeactivate() + { + iServer.LockMessage(NULL); + + CloseContextMenu(); + if ( iContainer ) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + delete iContainer; + iContainer = NULL; + } + + delete iDecoratedLabel; + iDecoratedLabel = NULL; + + DeleteOldMessage(); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::UpdateNaviPaneL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::UpdateNaviPaneL() + { + + TInt currentPosition( KCbsErrValue ); + TInt totalMessages( KCbsErrValue ); + + TInt err ( + GetMessagePosition( iCurrentHandle, currentPosition, totalMessages ) ); + + TBool prev( currentPosition != 0 ); + TBool next( ( currentPosition + 1 ) < totalMessages ); + + // If a message is class 0, then the navipane is empty + if ( iIsClass0 || err != KErrNone ) + { + // Delete the existed label before creating a new one + // in case of memory leak + CAknNavigationDecorator* oldLabel = iDecoratedLabel; + iDecoratedLabel = CbsUiUtility::CreateEmptyNavigationPaneL(); + delete oldLabel; + return; + } + + // Create a new decorator + CArrayFixFlat* array = new( ELeave ) CArrayFixFlat( 2 ); + CleanupStack::PushL( array ); + array->AppendL( currentPosition + 1 ); + array->AppendL( totalMessages ); + HBufC* messageLocationInTopic = StringLoader::LoadL( R_MESSAGE_LOCATION_IN_TOPIC, *array, iCoeEnv ); + CleanupStack::PopAndDestroy(); // array + CleanupStack::PushL( messageLocationInTopic ); + + CAknNavigationDecorator* newDecoratedLabel = iNaviContainer->CreateNavigationLabelL( *messageLocationInTopic ); + CleanupStack::PopAndDestroy(); // messageLocationInTopic + + CleanupStack::PushL( newDecoratedLabel ); + + // Set new decorator on top of navi pane's decorator stack + // ( topmost decorator is the one to show ) + iNaviContainer->PushL( *newDecoratedLabel ); + + // Remove previous decorator from decorator stack and delete it + if ( iPreviousDecoratedLabel ) + { + iNaviContainer->Pop( iPreviousDecoratedLabel ); + delete iPreviousDecoratedLabel; + iPreviousDecoratedLabel = NULL; + } + + // Update decorator pointers to new ones + iPreviousDecoratedLabel = iDecoratedLabel; + iDecoratedLabel = newDecoratedLabel; + + __ASSERT_DEBUG( iDecoratedLabel, CbsUiPanic( EErrNullPointer ) ); + + // Set observer for navi pane + iDecoratedLabel->SetNaviDecoratorObserver( this ); + + CleanupStack::Pop( newDecoratedLabel ); + + iDecoratedLabel->MakeScrollButtonVisible( ETrue ); + + if( AknLayoutUtils::LayoutMirrored() ) + { + iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ELeftButton, !next ); + iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ERightButton, !prev ); + } + else + { + iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ELeftButton, !prev ); + iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ERightButton, !next ); + } + + } + + +// --------------------------------------------------------- +// CCbsUiMsgView::SaveMessage +// +// +// --------------------------------------------------------- +// +TInt CCbsUiMsgView::SaveMessage( const TCbsMessageHandle& aHandle ) + { + return iServer.SaveMessage(aHandle); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::DoSearchL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::DoSearchL( TInt aCommand ) + { + CFindItemDialog* dialog = CFindItemDialog::NewL( + iContainer->GetEditor()->Read(0), + iFindItemMenu->SearchCase(aCommand) ); + dialog->ExecuteLD(); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::TopicListChangedL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::TopicListChangedL( TCbsTopicListEvent /*aEvent*/, TCbsTopicNumber aTopicNumber ) + { + if ( iContainer && (CurrentTopicNumber() == aTopicNumber) ) + { + UpdateNaviPaneL(); + } + } + + + +// --------------------------------------------------------- +// CCbsUiMsgView::HandleRectChangeInContainerL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::HandleRectChangeInContainerL() + { + if ( iContainer ) + { + iContainer->SetRect( ClientRect() ); + iContainer->UpdateMessageL( *iMessage ); + } + + } + +// --------------------------------------------------------- +// CCbsUiMsgView::CloseContextMenu +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::CloseContextMenu() + { + if ( iContextMenu ) + { + AppUi()->RemoveFromViewStack(*this, iContextMenu); + delete iContextMenu; + iContextMenu = NULL; + } + } + +// --------------------------------------------------------- +// CCbsUiMsgView::LaunchContextMenuL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::LaunchContextMenuL() + { + TInt rssName = R_CBSUI_MSG_KEEP_AND_DELETE_CONTEXT_MENUBAR; + + if ( CbsUiUtility::IsSavedL(iCurrentHandle, iServer) ) + { + rssName = R_CBSUI_MSG_DELETE_CONTEXT_MENUBAR; + } + + CloseContextMenu(); + + __ASSERT_DEBUG( !iContextMenu, CbsUiPanic(EErrAllreadyExists) ); + + iContextMenu = new (ELeave) CEikMenuBar; + iContextMenu->ConstructL( + this, + 0, + rssName ); + + // Set type to context sensitive + iContextMenu->SetMenuType( CEikMenuBar::EMenuContext ); + + AppUi()->AddToViewStackL( + *this, + iContextMenu, + ECoeStackPriorityMenu, + ECoeStackFlagRefusesFocus ); + + iContextMenu->TryDisplayMenuBarL(); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::DeleteOldMessage +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::DeleteOldMessage() + { + delete iMessage; + iMessage = NULL; + } + +// --------------------------------------------------------- +// CCbsUiMsgView::DoLoadMessageL +// +// +// --------------------------------------------------------- +// +TInt CCbsUiMsgView::DoLoadMessageL() + { + TRAPD( err, LoadMessageL() ); + + switch ( err ) + { + case KErrNotFound: + { + // If the message cannot be found + // it is not necessary to do anything. + // It is just showing some other message (current). + break; + } + case KErrNone: + { + // normal case + __ASSERT_DEBUG( iMessage, CbsUiPanic(EErrNullPointer) ); + iContainer->UpdateMessageL(*iMessage); + // navi pane has to be updated in all cases; expect when leave + UpdateNaviPaneL(); + Cba()->SetCommandSetL( R_CBS_SOFTKEYS_OPTIONS_BACK__CONTEXTOPTIONS ); + break; + } + default: + User::Leave( err ); + break; + } + + return err; + } + +// --------------------------------------------------------- +// CCbsUiMsgView::ActivateTopicViewL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::ActivateTopicViewL( TCbsTopicNumber aTopicNumber, TCbsMessageHandle aHandle ) + { + TPckgBuf message; + message().iTopicNumber = aTopicNumber; + message().iMessageHandle = aHandle; + + AppUi()->ActivateLocalViewL( + TUid::Uid(ECbsUiTopicViewId), KSetFocusToId, message ); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::SetCurrentMessageHandle +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::SetCurrentMessageHandle( const TDesC8& aMessageHandle ) + { + TPckgBuf pckgMessageHandle; + pckgMessageHandle.Copy(aMessageHandle); + iCurrentHandle = pckgMessageHandle(); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::LoadMessageL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::LoadMessageL() + { + User::LeaveIfError( iServer.LockMessage(iCurrentHandle) ); + + TCbsMessage message; + TInt err( iServer.FindMessageByHandle(iCurrentHandle, message) ); + __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) ); + User::LeaveIfError(err); + + // mark the message as read + err = iServer.ReadMessage(iCurrentHandle); + User::LeaveIfError(err); + + DeleteOldMessage(); + iMessage = HBufC::NewMaxL(message.iLength); + TPtr messageContent = iMessage->Des(); + + err = iServer.GetMessageContents(iCurrentHandle, messageContent); + + __CBSUI_ASSERT( err == KErrNone, + CbsUiPanic(EMessageContentsError) ); + + if ( err != KErrNone ) + { + DeleteOldMessage(); + User::Leave(err); + } + + AddDateAndTimeL( + message.iDateTime, + &iMessage, // address of pointer variable + R_CBS_DATE_FORMAT_ARRAY ); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::AddDateAndTime +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::AddDateAndTimeL( const TInt64 aTime, HBufC** aMessage, TUint aResourceArrayId ) const + { + __ASSERT_DEBUG( aTime >= 0, CbsUiPanic(EErrInvalidValue) ); + __ASSERT_DEBUG( *aMessage, CbsUiPanic(EErrNullPointer) ); + __ASSERT_DEBUG( (*aMessage)->Length() > 0, CbsUiPanic(EErrEmptyDesc) ); + __ASSERT_DEBUG( aResourceArrayId > 0, CbsUiPanic(EErrInvalidValue) ); + + HBufC* timeBuffer = HBufC::NewMaxLC( KMaxAssumedDateTimeLength ); + TInt bufLen( 0 ); + TTime time( aTime ); + + // change universal time to local time + TLocale locale; + time += locale.UniversalTimeOffset(); + + TPtr des = timeBuffer->Des(); + TInt length( ( *aMessage )->Length() ); + + // for adding date and time to message + TResourceReader reader; + iCoeEnv->CreateResourceReaderLC( reader, aResourceArrayId ); + TInt count( reader.ReadInt16() ); + + TBuf separator( KLineBreak ); + TInt separatorsLength( KLineBreak().Length() + KSpace().Length() ); + + for ( TInt i( 0 ); i < count; i++ ) + { + TUint resourceId( reader.ReadUint32() ); + + HBufC* format = iCoeEnv->AllocReadResourceLC( resourceId ); + + time.FormatL( des, *format ); + AknTextUtils::DisplayTextLanguageSpecificNumberConversion( des ); + + if ( i > 0 ) + { + separator = KSpace; + } + + bufLen += timeBuffer->Length(); + (*aMessage) = (*aMessage)->ReAllocL( + length + bufLen + separatorsLength ); + + // have to get a new pointer after reallocation + TPtr ptr2 = ( *aMessage )->Des(); + ptr2.Append( separator ); + ptr2.Append( *timeBuffer ); + + CleanupStack::PopAndDestroy(); // format + } + + CleanupStack::PopAndDestroy( 2 ); // timeBuffer, reader + } + +// --------------------------------------------------------- +// CCbsUiMsgView::CurrentTopicNumber +// +// +// --------------------------------------------------------- +// +TCbsTopicNumber CCbsUiMsgView::CurrentTopicNumber() const + { + return STATIC_CAST( TCbsTopicNumber, (iCurrentHandle >> 16) & 0xFFFF ); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::GetMessagePosition +// +// +// --------------------------------------------------------- +// +TInt CCbsUiMsgView::GetMessagePosition( TCbsMessageHandle aHandle, TInt& aPosition, TInt& aTotal ) + { + TInt err( iServer.GetMessageIndexByHandle(aHandle, aPosition) ); + + __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) ); + __CBSUI_ASSERT( aPosition != KCbsErrValue, CbsUiPanic(EErrInvalidValue) ); + + if ( err == KErrNone ) + { + err = iServer.GetMessageCount( CurrentTopicNumber(), aTotal ); + } + + __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) ); + __CBSUI_ASSERT( aPosition + 1 <= aTotal, CbsUiPanic(EErrMsgImbalance) ); + + return err; + } + +// --------------------------------------------------------- +// CCbsUiMsgView::SetHandleTo +// +// +// --------------------------------------------------------- +// +TBool CCbsUiMsgView::SetHandleTo( TCbsMessageHandle& aHandle, TMsgViewSetHandle aTo ) + { + TCbsMessageHandle prev; + TCbsMessageHandle next; + TInt position(KCbsErrValue); + TBool result(EFalse); + + TInt err( iServer.GetNextAndPrevMessageHandle( + aHandle, prev, next, position) ); + + if ( err == KErrNone ) + { + __ASSERT_DEBUG( + position >= 0 && position <= (ECbsTail | ECbsHead), + CbsUiPanic(EErrInvalidValue) ); + + switch ( aTo ) + { + case EToPrevious: + // if position is head it cannot go thru + if ( (position & ECbsHead) == 0 ) + { + aHandle = prev; + result = ETrue; + } + break; + case EToNext: + // if position is tail it cannot go thru + if ( (position & ECbsTail) == 0 ) + { + aHandle = next; + result = ETrue; + } + break; + default: + __ASSERT_DEBUG(0, CbsUiPanic(EErrInvalidValue)); + break; + } + } + + return result; + } + +// --------------------------------------------------------- +// CCbsUiMsgView::DeleteMessageL +// +// +// --------------------------------------------------------- +// +TBool CCbsUiMsgView::DeleteMessageL( TCbsMessageHandle aHandle ) + { + TBool result(EFalse); + + CAknQueryDialog* dlg = CAknQueryDialog::NewL(); + + if ( dlg->ExecuteLD(R_DELETE_MSG_CONFIRMATION_QUERY) ) + { + TCbsMessageHandle handleToBeFocused(aHandle); + + if ( !SetHandleTo(handleToBeFocused, EToNext) ) + { + if ( !SetHandleTo(handleToBeFocused, EToPrevious) ) + { + // next or previous could not be set, 0 will unlock message + handleToBeFocused = 0; + } + } + + // Unlock message to be deleted and lock next message before delete + __ASSERT_DEBUG(handleToBeFocused != aHandle, + CbsUiPanic(EErrInvalidValue)); + + iServer.LockMessage(handleToBeFocused); + iServer.DeleteMessage(aHandle); + + // free handleToBeFocused message + if ( handleToBeFocused != 0) + { + iServer.LockMessage(NULL); + } + + // Topic number is still the same even if the message is + // deleted. + ActivateTopicViewL( CurrentTopicNumber(), handleToBeFocused ); + result = ETrue; + } + + return result; + } + +// --------------------------------------------------------- +// CCbsUiMsgView::ActivateTopicListViewL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgView::ActivateTopicListViewL() const + { + AppUi()->ActivateLocalViewL( TUid::Uid(ECbsUiTopicListViewId) ); + } + +// --------------------------------------------------------- +// CCbsUiMsgView::HandleSoftNotification +// +// +// --------------------------------------------------------- +// +TBool CCbsUiMsgView::HandleSoftNotificationL() + { + TCbsTopic topic; + TInt err; + TBool result( EFalse ); + TInt count( iServer.NumberOfUnreadHotmarkedMessages() ); + __ASSERT_DEBUG( + count >= KOneHotMarkedMessage, CbsUiPanic(EErrInvalidValue) ); + + switch ( count ) + { + case KOneHotMarkedMessage: + iServer.GetHotmarkedMessageHandle( iCurrentHandle ); + err = iServer.FindTopicByNumber( CurrentTopicNumber(), topic ); + if ( err == KErrNone ) + { + //Update Title pane + CEikStatusPane* sp = StatusPane(); + CAknTitlePane* title = + STATIC_CAST(CAknTitlePane*, sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle) ) ); + title->SetTextL( topic.iName ); + } + break; + default: // Many hot marked messages + ActivateTopicListViewL(); + result = ETrue; + break; + } + + return result; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiMsgViewContainer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiMsgViewContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,754 @@ +/* +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of CCbsUiMsgViewContainer class. +* +* +*/ + + +// INCLUDES +#include // for feature flags +#include +#include // enum TAknLayoutId +#include // for iAvkonEnv +#include // AknLayoutUtils +#include // FFS critical level check +#include +#include +#include +#include +#include +#include +#include // Multiline_Message_writing_texts_Line_3 +#include // TAknLayoutScalableParameterLimits +#include // list_single_mce_message_pane_ParamLimits().iRows +#include // KEikDynamicLayoutVariantSwitch +#include // KAknsMessageSkinChange +#include +#include // CAknsBasicBackgroundControlContext +#include // MAknsSkinInstance +#include // AknsDrawUtils +#include +#include "CbsUiId.h" +#include +#include "CCbsUIMsgViewContainer.h" +#include "CCbsUIMsgView.h" +#include "Cbsuiapp.hrh" +#include "CbsUiPanic.h" +#include + + + +// LOCAL CONSTANTS AND MACROS +const TInt KEditorNumOfLines = 7; +const TInt KFirstScreen = 0; +const TInt KOneScreen = 1; +const TInt KMsgNumberOfControls = 1; +const TInt KMsgControlIndexEditor = 0; + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +CCbsUiMsgViewContainer::CCbsUiMsgViewContainer( CCbsUiMsgView& aMsgView ) +: iMsgView(aMsgView) + { + } + +// Symbian OS default constructor can leave. +void CCbsUiMsgViewContainer::ConstructL( const TRect& aRect ) + { + CreateWindowL(); + SetMopParent(&iMsgView); + + iEditor = CreateEditorL(); + SetReadOnly(ETrue); + + SetRect(aRect); + + // for Skin Support, Create background control context: + iBackGroundControlContext = CAknsBasicBackgroundControlContext::NewL( + KAknsIIDQsnBgAreaMain, // Default mainpane skinning + Rect(), // Layout to the entire client rect + EFalse ); + if ( iBackGroundControlContext ) + { + iEditor->SetSkinBackgroundControlContextL( iBackGroundControlContext ); + } + } + + +// Two-phased constructor. +CCbsUiMsgViewContainer* CCbsUiMsgViewContainer::NewL( CCbsUiMsgView& aMsgView, + const TRect& aRect ) + { + CCbsUiMsgViewContainer* self = new (ELeave) + CCbsUiMsgViewContainer(aMsgView); + + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +// Destructor +CCbsUiMsgViewContainer::~CCbsUiMsgViewContainer() + { + delete iBackGroundControlContext; + delete iEditor; + delete iSBFrame; + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::CountComponentControls +// +// +// --------------------------------------------------------- +// +TInt CCbsUiMsgViewContainer::CountComponentControls() const + { + TInt countScrollBarComponents( 0 ); + if ( iSBFrame ) + { + countScrollBarComponents = iSBFrame->CountComponentControls(); + } + return KMsgNumberOfControls + countScrollBarComponents; + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::ComponentControl +// +// +// --------------------------------------------------------- +// +CCoeControl* CCbsUiMsgViewContainer::ComponentControl( TInt aIndex ) const + { + CCoeControl* control = NULL; + + TInt countScrollBarComponents( 0 ); + if ( iSBFrame ) + { + countScrollBarComponents = iSBFrame->CountComponentControls(); + } + + switch ( aIndex ) + { + case KMsgControlIndexEditor: + control = iEditor; + break; + default: + if ( iSBFrame + && aIndex >= KMsgNumberOfControls + && aIndex < countScrollBarComponents + KMsgNumberOfControls ) + { + control = iSBFrame->ComponentControl( aIndex - KMsgNumberOfControls ); + } + else + { + control = NULL; + } + break; + } + return control; + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::OfferKeyEventL +// +// +// --------------------------------------------------------- +// +TKeyResponse CCbsUiMsgViewContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode /*aType*/ ) + { + __ASSERT_DEBUG( iEditor, CbsUiPanic(EEditorNullError) ); + + switch ( aKeyEvent.iCode ) + { + case EKeyLeftArrow: + { + if( AknLayoutUtils::LayoutMirrored() ) + { + iMsgView.MoveToNextMessageL(); + } + else + { + iMsgView.MoveToPreviousMessageL(); + } + break; + } + case EKeyRightArrow: + { + if( AknLayoutUtils::LayoutMirrored() ) + { + iMsgView.MoveToPreviousMessageL(); + } + else + { + iMsgView.MoveToNextMessageL(); + } + break; + } + case EKeyUpArrow : + { + ScrollMessageUpL(); + break; + } + case EKeyDownArrow: + { + ScrollMessageDownL(); + break; + } + case EKeyOK: + { + iMsgView.ProcessCommandL( ECbsUiappCmdOkKey ); + break; + } + case EKeyBackspace: + { + iMsgView.ProcessCommandL( ECbsUiappCmdMsgMenuDelete ); + break; + } + default: + { + break; + } + } + + return EKeyWasConsumed; + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::UpdateMessageL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::UpdateMessageL( const TDesC& aMessage ) + { + SetData16L(aMessage); + + InitializeMessageInfoL(); + + CreateScrollBarFrameL(); + UpdateScrollIndicatorL(); + + iEditor->DrawNow(); + } + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::SizeChanged +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::SizeChanged() + { + if ( iEditor ) + { + TRAPD( ignore, iEditor->SelectAllL() ); // This is needed before calling layoutedwin! + if( ignore ) + { + ignore = KErrNone; //Prevent ARMV5 compilation varning + } + if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) + { + TAknLayoutScalableParameterLimits scalbleParamLimits; + scalbleParamLimits = AknLayoutScalable_Apps::list_single_mce_message_pane_ParamLimits(); + AknLayoutUtils::LayoutEdwin( iEditor, Rect(), AppLayout::Multiline_Message_writing_texts_Line_3(scalbleParamLimits.LastRow() ) ); + } + else + { + AknLayoutUtils::LayoutEdwin( iEditor, Rect(), AppLayout::Multiline_Message_writing_texts_Line_3( KEditorNumOfLines ) ); + } + if ( iBackGroundControlContext ) + { + TRAPD( ignore, iEditor->SetSkinBackgroundControlContextL( iBackGroundControlContext ) ); + if( ignore ) + { + ignore = KErrNone; //Prevent ARMV5 compilation varning + } + } + iEditor->DrawNow(); + } + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewConctainer::CreateEditorL +// +// +// --------------------------------------------------------- +// +CEikRichTextEditor* CCbsUiMsgViewContainer::CreateEditorL() const + { + TResourceReader reader; + iCoeEnv->CreateResourceReaderLC(reader, R_MSG_READER); + + CEikRichTextEditor* editor = new (ELeave) CEikRichTextEditor; + CleanupStack::PushL( editor ); + editor->SetContainerWindowL(*this); + editor->ConstructFromResourceL( reader ); + CleanupStack::Pop(); // editor + CleanupStack::PopAndDestroy(); // reader + + __ASSERT_DEBUG( editor, CbsUiPanic(EEditorNullError) ); + + return editor; + } + +// --------------------------------------------------------- +// CCbsUiMsgViewConctainer::Draw +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::Draw( const TRect& aRect ) const + { + CWindowGc& aGc = SystemGc(); + + // for clearing gap between editor and the view rect + if ( IsReadyToDraw() ) + { + aGc.SetBrushColor( AKN_LAF_COLOR (0) ); + DrawUtils::ClearBetweenRects( aGc, aRect, iEditor->Rect() ); + if ( iBackGroundControlContext ) + {//Draw the skin background + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + AknsDrawUtils::Background( skin, iBackGroundControlContext, this, aGc, aRect ); + } + } + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::InitializeMessageInfoL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::InitializeMessageInfoL() + { + + iEditor->TextLayout()->SetAmountToFormat( CTextLayout::EFFormatAllText ); + + iEditor->CreateTextViewL(); + iEditor->NotifyNewFormatL(); + TInt numberOfLines = iEditor->TextLayout()->NumFormattedLines(); + + if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) + { + TInt linesInScreen; + TAknLayoutScalableParameterLimits scalbleParamLimits; + scalbleParamLimits = AknLayoutScalable_Apps::list_single_mce_message_pane_ParamLimits(); + linesInScreen = scalbleParamLimits.LastRow(); + iNumberOfScreens = ( numberOfLines - 1 ) / linesInScreen + 1; + } + else + { + iNumberOfScreens = ( numberOfLines - 1 ) / KEditorNumOfLines + 1; + } + + iCurrentScreen = KFirstScreen; + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::CreateScrollBarFrameL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::CreateScrollBarFrameL() + { + if ( !iSBFrame ) + { + iSBFrame = new (ELeave) CEikScrollBarFrame( iEditor, this, ETrue ); + } + + CAknAppUiBase* appUi = static_cast( iEikonEnv->EikAppUi() ); + if ( AknLayoutUtils::DefaultScrollBarType( appUi ) == CEikScrollBarFrame::EDoubleSpan ) + { + // For EDoubleSpan type scrollbar + iSBFrame->CreateDoubleSpanScrollBarsL( EFalse, EFalse ); // non-window owning scrollbar + iSBFrame->SetTypeOfVScrollBar( CEikScrollBarFrame::EDoubleSpan ); + iSBFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto ); + TAknWindowLineLayout scrollPane = AknLayoutScalable_Apps::scroll_pane_cp017().LayoutLine(); + AknLayoutUtils::LayoutVerticalScrollBar( iSBFrame, Rect(), scrollPane ); + } + else + { + // For EArrowHead type scrollbar + iSBFrame->SetTypeOfVScrollBar( CEikScrollBarFrame::EArrowHead ); + iSBFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto ); + } + ActivateL(); + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::UpdateScrollIndicatorL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::UpdateScrollIndicatorL() const + { + if ( !iSBFrame ) + { + return; + } + + + TEikScrollBarModel hSbarModel; + TEikScrollBarModel vSbarModel; + vSbarModel.iThumbSpan = 1; + + vSbarModel.iThumbPosition = iCurrentScreen; // where is the position + // how many items + // if there is only one screen we don't need scroll bars (= 0) + + if ( iNumberOfScreens == KOneScreen ) + { + vSbarModel.iScrollSpan = 0; + iSBFrame->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, + CEikScrollBarFrame::EOff ); + } + else + { + vSbarModel.iScrollSpan = iNumberOfScreens; + iSBFrame->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, + CEikScrollBarFrame::EAuto ); + } + + if ( iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan ) + { + // For EDoubleSpan type scrollbar + TAknDoubleSpanScrollBarModel hDsSbarModel( hSbarModel ); + TAknDoubleSpanScrollBarModel vDsSbarModel( vSbarModel ); + + TEikScrollBarFrameLayout layout; + layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant; + TRect inclusiveRect( Rect( ) ); // We need to have two of these variables + TRect clientRect( Rect( ) ); + + iSBFrame->TileL( &hDsSbarModel, &vDsSbarModel, clientRect, inclusiveRect, layout ); + iSBFrame->SetVFocusPosToThumbPos( vSbarModel.iThumbPosition ); + } + else + { + iSBFrame->Tile( &vSbarModel ); + iSBFrame->SetVFocusPosToThumbPos( vSbarModel.iThumbPosition ); + } + iSBFrame->DrawScrollBarsNow(); + + } + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::UpdateCurrentScreen +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::UpdateCurrentScreen( TBool aIncrease ) + { + if ( aIncrease ) + { + if ( iCurrentScreen < iNumberOfScreens - 1 ) + { + iCurrentScreen++; + } + } + else + { + if ( iCurrentScreen > KFirstScreen ) + { + iCurrentScreen--; + } + } + + } + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::SetReadOnly +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::SetReadOnly( TBool aReadOnly ) + { + __ASSERT_DEBUG(iEditor, CbsUiPanic(EErrNullPointer) ); + iEditor->SetReadOnly(aReadOnly); + } + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::SetDataContentL +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::SetDataContentL( CRichText& aText ) + { + iEditor->SetDocumentContentL(aText); + iEditor->SelectAllL(); // This is needed before calling layoutedwin! + + + if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) + { + TAknLayoutScalableParameterLimits scalbleParamLimits; + scalbleParamLimits = AknLayoutScalable_Apps::list_single_mce_message_pane_ParamLimits(); + AknLayoutUtils::LayoutEdwin( iEditor, Rect(), AppLayout::Multiline_Message_writing_texts_Line_3(scalbleParamLimits.LastRow() ) ); + } + else + { + AknLayoutUtils::LayoutEdwin( iEditor, Rect(), AppLayout::Multiline_Message_writing_texts_Line_3( KEditorNumOfLines ) ); + } + } + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::SetData16L +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::SetData16L( const TDesC& aBuf ) + { + __ASSERT_DEBUG(aBuf.Length() > 0, CbsUiPanic(EErrInvalidValue) ); + + CParaFormatLayer* globalParaLayer = CParaFormatLayer::NewL(); + CleanupStack::PushL(globalParaLayer); + + CCharFormatLayer* globalCharLayer = NULL; + TRgb textColor; + + TCharFormat charFormat; + TCharFormatMask formatMask; + + ( reinterpret_cast< CGlobalText* >( iEditor->Text() ) ) + ->GetCharFormat( charFormat, formatMask, 0, 0 ); + + TInt error = AknsUtils::GetCachedColor( + AknsUtils::SkinInstance(), + textColor, + KAknsIIDQsnTextColors, + EAknsCIQsnTextColorsCG6 ); + + if ( error != KErrNone ) + { + textColor = KRgbBlack; + } + + charFormat.iFontPresentation.iTextColor = textColor; + formatMask.SetAll(); + + globalCharLayer = CCharFormatLayer::NewL( charFormat, formatMask ); + CleanupStack::PushL( globalCharLayer ); + + CRichText* richText = CRichText::NewL( globalParaLayer, globalCharLayer ); + CleanupStack::PushL( richText ); + + TInt length( aBuf.Size() / 2 ); + + for (TInt i = 0; i < length; i++) + { + if ( aBuf[i] == EKeyLineFeed ) + { + richText->InsertL( i, CEditableText::EParagraphDelimiter ); + } + else + { + richText->InsertL( i, aBuf[i] ); + } + } + + SetDataContentL( *richText ); + + iEditor->SetCharFormatLayer( globalCharLayer ); + + CleanupStack::PopAndDestroy(); // richText + CleanupStack::Pop(); // globalCharLayer + CleanupStack::PopAndDestroy(); // globalParaLayer + } + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::GetEditor +// +// +// --------------------------------------------------------- +// +CRichText* CCbsUiMsgViewContainer::GetEditor() const + { + __ASSERT_DEBUG(iEditor->RichText()->LdDocumentLength() > 0, + CbsUiPanic(EErrInvalidValue) ); + + return iEditor->RichText(); + } + + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::CopyToClipboard +// +// +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::CopyToClipboardL() const + { + TInt msgLength; + + msgLength = iEditor->TextLength(); + if ( SysUtil::FFSSpaceBelowCriticalLevelL( &iCoeEnv->FsSession(), 2 * msgLength ) ) + { + User::Leave( KErrDiskFull ); + } + + CPlainText* plainText = CPlainText::NewL(); + + CleanupStack::PushL(plainText); + plainText->InsertL( 0, iEditor->RichText()->Read(0) ); + plainText->ConvertAllFieldsToText(); + + CClipboard* cb = CClipboard::NewForWritingLC( iCoeEnv->FsSession() ); + plainText->CopyToStoreL( + cb->Store(), + cb->StreamDictionary(), + 0, + plainText->DocumentLength() ); + + cb->CommitL(); + CleanupStack::PopAndDestroy(2); //cb, plainText + } + + +// ---------------------------------------------------- +// CCbsUiMsgViewContainer::HandleResourceChange +// +// +// ---------------------------------------------------- +void CCbsUiMsgViewContainer::HandleResourceChange( TInt aType ) + { + CCoeControl::HandleResourceChange( aType ); + if( aType == KEikDynamicLayoutVariantSwitch ) + { + TRAPD( ignore, iMsgView.HandleRectChangeInContainerL() ); + if ( iBackGroundControlContext ) + { + iBackGroundControlContext->SetRect( Rect() ); + } + + if( ignore ) + { + ignore = KErrNone; //Prevent ARMV5 compilation varning + } + } + else + { + if( ( aType == KAknsMessageSkinChange ) && ( iBackGroundControlContext ) ) + { + TRAPD( ignore, iEditor->SetSkinBackgroundControlContextL( iBackGroundControlContext ) ); + if( ignore ) + { + ignore = KErrNone; //Prevent ARMV5 compilation varning + } + } + } + + } + + +// ---------------------------------------------------- +// CCbsUiMsgViewContainer::HandleScrollEventL +// ---------------------------------------------------- +void CCbsUiMsgViewContainer::HandleScrollEventL( CEikScrollBar* aScrollBar, + TEikScrollEvent aEventType ) + { + switch( aEventType ) + { + case EEikScrollUp: + case EEikScrollPageUp: + { + ScrollMessageUpL(); + break; + } + case EEikScrollDown: + case EEikScrollPageDown: + { + ScrollMessageDownL(); + break; + } + case EEikScrollThumbDragVert: + { + if( aScrollBar->ThumbPosition() > iCurrentScreen ) + { + ScrollMessageDownL(); + } + else if ( aScrollBar->ThumbPosition() < iCurrentScreen ) + { + ScrollMessageUpL(); + } + break; + } + default: + break; + } + } + +// ---------------------------------------------------- +// CCbsUiMsgViewContainer::ScrollMessageUpL +// ---------------------------------------------------- +void CCbsUiMsgViewContainer::ScrollMessageUpL() + { + if( iCurrentScreen > 0 ) + { + iEditor->MoveDisplayL( TCursorPosition::EFPageUp ); + iEditor->MoveDisplayL( TCursorPosition::EFLineUp ); + UpdateCurrentScreen( EFalse ); + UpdateScrollIndicatorL(); + } + } + +// ---------------------------------------------------- +// CCbsUiMsgViewContainer::ScrollMessageDownL +// ---------------------------------------------------- +void CCbsUiMsgViewContainer::ScrollMessageDownL() + { + if( iCurrentScreen < iNumberOfScreens-1 ) + { + iEditor->MoveDisplayL( TCursorPosition::EFPageDown ); + iEditor->MoveDisplayL( TCursorPosition::EFLineDown ); + UpdateCurrentScreen( ETrue ); + UpdateScrollIndicatorL(); + } + } + +// --------------------------------------------------------- +// CCbsUiMsgViewContainer::GetHelpContext +// +// Gets the control's help context. +// --------------------------------------------------------- +// +void CCbsUiMsgViewContainer::GetHelpContext( TCoeHelpContext& aContext ) const + { + aContext.iMajor = TUid::Uid(KUidCbsUiappDef); + aContext.iContext = KCBS_HLP_MSG; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiSettingsMonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiSettingsMonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,123 @@ +/* +* Copyright (c) 2002 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: Implementation of CCbsUiSettingsMonitor class. +* +* +*/ + + +// INCLUDES +#include "MCbs.h" +#include "CCbsUiSettingsMonitor.h" +#include "CbsUiPanic.h" +#include "MCbsUiSettingsObserver.h" + + + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +CCbsUiSettingsMonitor::CCbsUiSettingsMonitor( + MCbs& aServer, + MCbsUiSettingsObserver& aObserver ) + : + CActive(EPriorityStandard), + iContinue(ETrue), + iServer(aServer), + iObserver(aObserver) + { + } + +// Symbian OS default constructor can leave. +void CCbsUiSettingsMonitor::ConstructL( ) + { + CActiveScheduler::Add( this ); + IssueRequest(); + } + +// Two-phased constructor. +CCbsUiSettingsMonitor* CCbsUiSettingsMonitor::NewL( + MCbs& aServer, MCbsUiSettingsObserver& aObserver ) + { + CCbsUiSettingsMonitor* self = new (ELeave) CCbsUiSettingsMonitor( + aServer, aObserver); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + + return self; + } + +// Destructor +CCbsUiSettingsMonitor::~CCbsUiSettingsMonitor() + { + iContinue = EFalse; + Cancel(); + } + + +// --------------------------------------------------------- +// CCbsUiSettingsMonitor::IssueRequest +// +// This metor issues request +// --------------------------------------------------------- +// +void CCbsUiSettingsMonitor::IssueRequest() + { + if ( iContinue ) + { + SetActive(); + iServer.NotifySettingsChanged( iStatus, iEvent ); + } + } + + +// --------------------------------------------------------- +// CCbsUiSettingsMonitor::RunL +// +// calls SettingsChanged method on application class +// --------------------------------------------------------- +// +void CCbsUiSettingsMonitor::RunL() + { + iObserver.SettingsChangedL(iEvent); // Doesn't inform the reason!! + + __ASSERT_DEBUG( iEvent == ECbsModifiedReceptionStatus || + iEvent == ECbsModifiedTopicDetectionStatus || + iEvent == ECbsModifiedLanguages, + CbsUiPanic(EErrInvalidEvent) ); + + if ( iContinue ) + { + IssueRequest(); + } + } + + +// --------------------------------------------------------- +// CCbsUiSettingsMonitor::DoCancel +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsMonitor::DoCancel() + { + iContinue = EFalse; + iServer.NotifySettingsChangedCancel(); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiSettingsView.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiSettingsView.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,393 @@ +/* +* Copyright (c) 2002-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: Implementation of CCbsUiSettingsView class. +* +* +*/ + + +// INCLUDES +#include // CreateIconL +#include // KAknsIIDQgnMenuCbCxt, KAknsIIDQgnMenuCb2Cxt +#include // for feature flags +#include // for feature manager +#include +#include +#include +#include +#include +#include +#include +#include +#include "CCbsUiSettingsView.h" +#include "ccbsuisettingsviewcontainer.h" +#include "Cbsuiapp.hrh" +#include "CCbsUiappApplication.h" +#include "CbsUiId.h" +#include "CbsUiUtility.h" +#include "CbsUiPanic.h" +#include "CCbsUiSettingsMonitor.h" +#include "CbsUiConstants.h" +#include "MCbs.h" + + + +// CONSTANTS +static const TUid KUidCbsUiappApp = { KUidCbsUiappDef }; + + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ constructor +CCbsUiSettingsView::CCbsUiSettingsView( MCbs& aServer ) +: iServer(aServer) + { + } + +// Symbian OS default constructor can leave. +void CCbsUiSettingsView::ConstructL() + { + BaseConstructL(R_CBSUI_SETTINGSVIEW); + iImageLibrary = iCoeEnv->AllocReadResourceL(R_CBS_IMAGE_LIBRARY); + iSettingsMonitor = CCbsUiSettingsMonitor::NewL(iServer, *this); + } + +// Two-phased constructor. +CCbsUiSettingsView* CCbsUiSettingsView::NewL( MCbs& aServer ) + { + CCbsUiSettingsView* self = new (ELeave) CCbsUiSettingsView( aServer ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// Destructor +CCbsUiSettingsView::~CCbsUiSettingsView() + { + if (iContainer) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + + // Destroy the control container + delete iContainer; + } + + delete iDecoratedLabel; + delete iImageLibrary; + delete iSettingsMonitor; + } + +// --------------------------------------------------------- +// CCbsUiSettingsView::Id +// +// +// --------------------------------------------------------- +// +TUid CCbsUiSettingsView::Id() const + { + return TUid::Uid( ECbsUiSettingsViewId ); + } + +// --------------------------------------------------------- +// CCbsUiSettingsView::HandleCommandL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsView::HandleCommandL( TInt aCommand ) + { + switch ( aCommand ) + { + case EAknSoftkeyBack: + { + // if it has been CBS then do this + if ( !iFromOtherApplication ) + { + ActivateTopicListViewL(); + } + else + { + AppUi()->ProcessCommandL( EAknCmdExit ); + } + break; + } + case EAknSoftkeyChange: + { + iContainer->HandleListViewActionL( EFalse ); + break; + } + case ECbsUiappSettingsViewCmdChange: + { + iContainer->HandleListViewActionL( ETrue ); + break; + } + case EAknCmdHelp: + AppUi()->HandleCommandL( aCommand ); + break; + case EAknCmdExit: + { + AppUi()->ProcessCommandL( EAknCmdExit ); + break; + } + default: + break; + } + } + +// --------------------------------------------------------- +// CCbsUiSettingsView::DoActivateL +// +// Creates container, and calls updatenavipaneL() +// --------------------------------------------------------- +// +void CCbsUiSettingsView::DoActivateL( const TVwsViewId& aPrevViewId, + TUid /*aCustomMessageId*/, + const TDesC8& /*aCustomMessage*/ ) + { + __ASSERT_DEBUG( &aPrevViewId, CbsUiPanic(EErrNullPointer) ); + iPrevViewId = aPrevViewId; + + if ( iPrevViewId.iAppUid != KUidCbsUiappApp ) + { + iFromOtherApplication = ETrue; + } + else + { + iFromOtherApplication = EFalse; + } + + if ( !iContainer ) + { + iContainer = CCbsUiSettingsViewContainer::NewL( + *this, + ClientRect(), + iServer ); + AppUi()->AddToViewStackL( *this, iContainer ); + } + else + { + iContainer->SetFocusToFirstItem(); + } + + iContainer->ActivateL(); + + UpdateNaviPaneL(); + UpdateTitlePaneL(); + + } + +// --------------------------------------------------------- +// CCbsUiSettingsView::DoDeactivate +// +// Deletes container and decorated labels +// --------------------------------------------------------- +// +void CCbsUiSettingsView::DoDeactivate() + { + if ( iContainer ) + { + // Remove view and its control from the view stack + AppUi()->RemoveFromViewStack( *this, iContainer ); + // Destroy the container control + delete iContainer; + iContainer = NULL; + } + + delete iDecoratedLabel; + iDecoratedLabel = NULL; + } + +// --------------------------------------------------------- +// CCbsUiSettingsView::UpdateNaviPaneL +// +// Must be implemented +// --------------------------------------------------------- +// +void CCbsUiSettingsView::UpdateNaviPaneL() + { + __ASSERT_DEBUG( !iDecoratedLabel, CbsUiPanic(EErrAllreadyExists) ); + + delete iDecoratedLabel; + iDecoratedLabel = NULL; + + iDecoratedLabel = CbsUiUtility::CreateEmptyNavigationPaneL(); + } + +// --------------------------------------------------------- +// CCbsUiSettingsView::UpdateSettingsL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsView::UpdateSettingsL() + { + if ( iContainer ) + { + iContainer->UpdateSettingsL(); + } + } + +// --------------------------------------------------------- +// CCbsUiSettingsView::UpdateContextPaneL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsView::UpdateContextPaneL() + { + __ASSERT_DEBUG( iImageLibrary, CbsUiPanic(EErrNullPointer) ); + + CEikStatusPane* sp = StatusPane(); + + __ASSERT_DEBUG( sp, CbsUiPanic( EStatusPaneError ) ); + + TBool reception; + iServer.GetReceptionStatus( reception ); + + CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, sp-> + ControlL( TUid::Uid(EEikStatusPaneUidTitle) )); + + __ASSERT_DEBUG( title, CbsUiPanic(EErrNullPointer) ); + + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + + if (reception) + { + CFbsBitmap* bmp = NULL; + CFbsBitmap* maskbmp = NULL; +#ifdef __SCALABLE_ICONS + AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCbCxt, bmp, + maskbmp, *iImageLibrary, EMbmCbsuiappQgn_menu_cb, + EMbmCbsuiappQgn_menu_cb_mask ); +#else + AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCbCxt, bmp, + maskbmp, *iImageLibrary, EMbmCbsuiappQgn_menu_cb_cxt, + EMbmCbsuiappQgn_menu_cb_cxt_mask ); +#endif //__SCALABLE_ICONS + title->SetSmallPicture(bmp, maskbmp, ETrue); + } + else + { + CFbsBitmap* bmp = NULL; + CFbsBitmap* maskbmp = NULL; +#ifdef __SCALABLE_ICONS + AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCb2Cxt, bmp, + maskbmp, *iImageLibrary, EMbmCbsuiappQgn_menu_cb_2, + EMbmCbsuiappQgn_menu_cb_2_mask); +#else + AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCb2Cxt, bmp, + maskbmp, *iImageLibrary, EMbmCbsuiappQgn_menu_cb_2_cxt, + EMbmCbsuiappQgn_menu_cb_2_cxt_mask); +#endif //__SCALABLE_ICONS + title->SetSmallPicture(bmp, maskbmp, ETrue); + } + + } + +// --------------------------------------------------------- +// CCbsUiSettingsView::SettingsChangedL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsView::SettingsChangedL( TCbsSettingsEvent aEvent ) + { + if ( aEvent == ECbsModifiedLanguages ) + { + UpdateSettingsL(); + } + UpdateContextPaneL(); + } + + +// --------------------------------------------------------- +// CCbsUiSettingsView::HandleRectChangeInContainer +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsView::HandleRectChangeInContainer() + { + if ( iContainer ) + { + iContainer->SetRect( ClientRect() ); + } + } + + +// --------------------------------------------------------- +// CCbsUiSettingsView::DynInitMenuPaneL +// +// Delete help menu item if help is not in use +// +// --------------------------------------------------------- +// +void CCbsUiSettingsView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) + { + switch ( aResourceId ) + { + case R_CBSUI_SETTINGSVIEW_FILE_MENU: + { + if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) + { + aMenuPane->DeleteMenuItem( EAknCmdHelp ); + } + break; + } + default: + break; + } + } + + +// --------------------------------------------------------- +// CCbsUiSettingsView::ActivateTopicListViewL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsView::ActivateTopicListViewL() const + { + TPckgBuf pckgDummy(KCbsInvalidTopicNumber); + + AppUi()->ActivateLocalViewL( + TUid::Uid(ECbsUiTopicListViewId), + KSetFocusToCurrentId, + pckgDummy); + } + + +// --------------------------------------------------------- +// CCbsUiTopicListView::UpdateTitlePaneL +// +// --------------------------------------------------------- +// +void CCbsUiSettingsView::UpdateTitlePaneL() const + { + CEikStatusPane *sp = StatusPane(); + CAknTitlePane *title = STATIC_CAST( CAknTitlePane*, sp-> + ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); + + __ASSERT_DEBUG( sp && title, CbsUiPanic( EStatusOrTitlePaneError ) ); + + TResourceReader titleReader; + iCoeEnv->CreateResourceReaderLC( titleReader, R_QTN_CB_TITLE_CBS ); + title->SetFromResourceL( titleReader ); + CleanupStack::PopAndDestroy(); // titleReader + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiTopicListMonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiTopicListMonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,147 @@ +/* +* Copyright (c) 2002 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: +* Implementaion of CCbsUiTopicListMonitor. +* +* +*/ + + +// INCLUDES +#include "MCbs.h" +#include "CCbsUiTopicListMonitor.h" +#include "MCbsUiTopicMonitorObserver.h" +#include "CbsUiPanic.h" +#include "CbsUiConstants.h" + + + +// CONSTANTS +const TInt KNumberOfObservers = 3; + + + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiTopicListMonitor::CCbsUiTopicListMonitor( MCbs& aServer ) + : CActive(EPriorityStandard), iContinue(ETrue), iServer(aServer) + { + } + +// Symbian OS default constructor can leave +void CCbsUiTopicListMonitor::ConstructL( ) + { + CActiveScheduler::Add(this); + IssueRequest(); + + iObservers = new (ELeave) TCbsUiMonitorObservers(KNumberOfObservers); + } + + +// Two-phased constructor. +CCbsUiTopicListMonitor* CCbsUiTopicListMonitor::NewL( MCbs& aServer ) + { + CCbsUiTopicListMonitor* self = + new (ELeave) CCbsUiTopicListMonitor(aServer); + + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + + return self; + } + + +// Destructor +CCbsUiTopicListMonitor::~CCbsUiTopicListMonitor() + { + delete iObservers; + Cancel(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListMonitor::IssueRequest() +// +// +// --------------------------------------------------------- +void CCbsUiTopicListMonitor::IssueRequest() + { + if ( iContinue ) + { + SetActive(); + + iServer.NotifyOnTopicListEvent( + iStatus, ECbsTopicAllEvents, iEvent, iTopicNumber ); + } + } + + +// --------------------------------------------------------- +// CCbsUiTopicListMonitor::RunL +// +// +// --------------------------------------------------------- +void CCbsUiTopicListMonitor::RunL() + + { + if ( iObservers->Count() > 0 ) + { + for ( TInt i(0); i < iObservers->Count(); i++ ) + { + iObservers->At(i)->TopicListChangedL(iEvent, iTopicNumber); + } + } + + __ASSERT_DEBUG( + (iEvent & ECbsTopicAllEvents), CbsUiPanic(EErrInvalidEvent) ); + + if ( iContinue ) + { + IssueRequest(); + } + } + + +// --------------------------------------------------------- +// CCbsUiTopicListMonitor::DoCancel +// +// +// --------------------------------------------------------- +void CCbsUiTopicListMonitor::DoCancel() + { + iContinue = EFalse; + + iServer.NotifyOnTopicListEventCancel(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListMonitor::AddObserverL +// +// +// --------------------------------------------------------- +void CCbsUiTopicListMonitor::AddObserverL( + MCbsUiTopicMonitorObserver* aObserver ) + { + __ASSERT_DEBUG( iObservers, CbsUiPanic(EErrNullPointer) ); + __ASSERT_DEBUG( aObserver, CbsUiPanic(EErrNullPointer) ); + + iObservers->AppendL(aObserver); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiTopicListView.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiTopicListView.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1071 @@ +/* +* Copyright (c) 2002 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: +* Implementation of CCbsUiTopicLIstView class. +* +* +*/ + + +// INCLUDES +#include // AknTextUtils +#include // for feature flags +#include // for feature manager +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "MCbs.h" +#include "CCbsUiTopicListView.h" +#include "CCbsUiTopicListViewContainer.h" +#include "CCbsUiEditTopicDlg.h" +#include "Cbsuiapp.hrh" +#include "CbsUiPanic.h" +#include "CbsUiConstants.h" +#include "CCbsUiAddFromIndexDialog.h" +#include "CbsUiDebug.h" +#include // ECellBroadcastNotification +#include // Soft Notification API + + +// CONSTANTS +const TInt KTopicNameLenght = 20; +const TInt KCountOfAllTopics = 1000; +const TInt KIndexTopic = 0; +const TInt KTwoTopics = 2; + +// MODULE DATA STRUCTURES +enum TMessageCounts { EManyNewMessages = -1, ENoNewMessages = 0, EOneNewMessage = 1 }; + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiTopicListView::CCbsUiTopicListView( MCbs& aServer ) : iServer( aServer ), iFocusState( ENoFocusUpdate ) + { + } + +// Symbian OS default constructor can leave. +void CCbsUiTopicListView::ConstructL() + { + BaseConstructL(R_CBSUI_TOPICLISTVIEW); + iTopicNumberList = new (ELeave) TCbsUiTopicNumberList(KNumberOfStandardTopics); + CEikStatusPane* statusPane = StatusPane(); + iNaviPane = STATIC_CAST( CAknNavigationControlContainer*, statusPane-> + ControlL( TUid::Uid(EEikStatusPaneUidNavi) ) ); + __ASSERT_DEBUG( iNaviPane, CbsUiPanic(ENaviPaneError) ); + } + +// Two-phased constructor. +CCbsUiTopicListView* CCbsUiTopicListView::NewL( MCbs& aServer ) + { + CCbsUiTopicListView* self = new (ELeave) CCbsUiTopicListView(aServer); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// Destructor +CCbsUiTopicListView::~CCbsUiTopicListView() + { + if ( iContainer ) + { + AppUi()->RemoveFromViewStack(*this, iContainer); + } + delete iContainer; + delete iDecoratedLabel; + delete iTopicNumberList; + delete iBackgroundNote; + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::ReloadTopicsL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::ReloadTopicsL() + { + __ASSERT_DEBUG( iTopicNumberList, CbsUiPanic(ETopicHandleError) ); + PrepareReloading(); + ReloadL(); + EndReloadingL(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::PrepareReloading +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::PrepareReloading() + { + if ( iContainer ) + { + iContainer->ReloadStarts(); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::ReloadL +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::ReloadL() + { + iTopicNumberList->Reset(); + + TInt count(0); + iServer.GetTopicCount(count); + __ASSERT_DEBUG( count >= 0, CbsUiPanic(ETopicCountError) ); + + TCbsTopic topic; + + for ( TInt index(0); index < count; index++ ) + { + // First, get the topic. + TInt rr( iServer.GetTopic(index, topic) ); + __CBSUI_ASSERT( rr == KErrNone, CbsUiPanic(EErrTopicNotFound) ); + + if ( rr == KErrNone ) + { + // Offer the topic to the view. + if ( iContainer ) + { + iContainer->ReloadOfferTopicL(topic); + } + + // And append to the handles list. + iTopicNumberList->AppendL(topic.iNumber); + } + } + } + +void CCbsUiTopicListView::EndReloadingL() + { + iContainer->ReloadEndsL(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::SetFocusAfterReload +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::SetFocusAfterReload( TTopicListViewFocusState aFocusState ) + { + if ( aFocusState == ENoFocusUpdate ) + { + return; + } + + // if the focus need to be changed + TInt focusedItem(KCbsErrValue); + + TBool setFocusToFirstItem( + (aFocusState == ESetFocusToFirstItem) || + (FindTopicIndexByNumber(focusedItem, iCurrentTopicNumber) != KErrNone) + ); + + if ( setFocusToFirstItem ) + { + // If there is some error let's try to put focus to first item + focusedItem = 0; + } + + __ASSERT_DEBUG( focusedItem != KCbsErrValue, CbsUiPanic(EErrInvalidValue) ); + + SetFocusToTopic(focusedItem); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::SetFocusToTopic +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::SetFocusToTopic( TInt aIndex ) + { + if ( iTopicNumberList->Count() <= 0) + { + return; + } + + __ASSERT_DEBUG( aIndex >= 0 && aIndex < iTopicNumberList->Count(), + CbsUiPanic(EErrIndexOutOfBounds) ); + + if (iContainer) + { + // first one in the list is the newest + iContainer->SetCurrentItemIndex(aIndex); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::UpdateCurrentTopicAfterDeletion +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::UpdateCurrentTopicAfterDeletion( TCbsTopicNumber aDeletedTopic ) + { + + TInt topicPosition(-1); + TInt err( FindTopicIndexByNumber(topicPosition, aDeletedTopic) ); + + TBool isLastTopic( + ( (topicPosition + 1) == TotalTopics() ) && + (topicPosition >= 0) + ); + + if ( isLastTopic ) + { + // then previous topic should be focused after deletion + topicPosition--; + } + else + { + // then the next topic will be focused after deletion + topicPosition++; + } + + // if there is some error lets put the focus to the first item + if ( topicPosition >= TotalTopics() || + topicPosition < 0 || + err != KErrNone ) + { + topicPosition = 0; + } + + __ASSERT_DEBUG( err == KErrNone, CbsUiPanic(EErrMsgNotFound) ); + + iCurrentTopicNumber = iTopicNumberList->At(topicPosition); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::TotalTopics +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListView::TotalTopics() const + { + __ASSERT_DEBUG( iTopicNumberList->Count() >= 0, CbsUiPanic(EErrTopicsCountError) ); + return iTopicNumberList->Count(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::UpdateTitlePaneL +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::UpdateTitlePaneL() const + { + CEikStatusPane *sp = StatusPane(); + CAknTitlePane *title = STATIC_CAST(CAknTitlePane*, sp-> + ControlL( TUid::Uid(EEikStatusPaneUidTitle) ) ); + + __ASSERT_DEBUG( sp && title, CbsUiPanic(EStatusOrTitlePaneError) ); + + TResourceReader titleReader; + iCoeEnv->CreateResourceReaderLC(titleReader, R_QTN_CB_TITLE_CBS); + title->SetFromResourceL(titleReader); + CleanupStack::PopAndDestroy(); // titleReader + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::UpdateNaviPaneL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::UpdateNaviPaneL() + { + + if ( iAddFromIndexDialogIsActive ) + { + // No need to update navi pane + return; + } + + // let's keep a address of the previous + // label so it is possible to delete + // it, after the new label has been created. + CAknNavigationDecorator* oldLabel = iDecoratedLabel; + + TInt unreadMessages(0); + iServer.GetUnreadMessageCount(unreadMessages); + + CreateNewLabelL( GetInfoResourceId(unreadMessages), unreadMessages ); + + // Old label has to be deleted and + // the final label is destroyed in the destructor. + if ( oldLabel ) + { + delete oldLabel; + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::GetInfoResourceId +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListView::GetInfoResourceId( TInt aUnreadMessages ) const + { + __ASSERT_DEBUG( aUnreadMessages >= 0, CbsUiPanic(EErrInvalidValue) ); + + TInt result(EManyNewMessages); + + switch ( aUnreadMessages ) + { + case ENoNewMessages: + result = R_CB_TL_NO_NEW_MESSAGES; + break; + case EOneNewMessage: + result = R_CB_TL_ONE_NEW_MESSAGE; + break; + default: + break; + } + + return result; + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::CreateNewLabelL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::CreateNewLabelL( TInt aResourceId, TInt aUnreadMessages ) + { + __ASSERT_DEBUG( + aResourceId == EManyNewMessages || + aResourceId == R_CB_TL_NO_NEW_MESSAGES || + aResourceId == R_CB_TL_ONE_NEW_MESSAGE, + CbsUiPanic(EErrInvalidValue) ); + + HBufC* stringHolder = NULL; + + if ( aResourceId == EManyNewMessages ) + { + stringHolder = StringLoader::LoadLC( + R_CB_TL_NEW_MESSAGES, aUnreadMessages); + } + else + { + stringHolder = iCoeEnv->AllocReadResourceLC(aResourceId); + } + + __ASSERT_DEBUG( stringHolder, CbsUiPanic(EErrNullPointer) ); + if ( stringHolder ) + { + iDecoratedLabel = iNaviPane->CreateNavigationLabelL(*stringHolder); + CleanupStack::PopAndDestroy(); // stringholder + } + + __ASSERT_DEBUG( iDecoratedLabel, CbsUiPanic(EErrNullPointer) ); + iNaviPane->PushL(*iDecoratedLabel); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::ShowTopicQueryL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::ShowTopicQueryL( TBool aType, + TDes& aTopicName, + TDes& aTopicNumber ) + { + CCbsUiEditTopicDlg* dlg = CCbsUiEditTopicDlg::NewL( + aTopicName, aTopicNumber, *this, aType ); + dlg->ExecuteLD( R_EDIT_TOPIC_QUERY ); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::ShowEditTopicQueryL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::ShowEditTopicQueryL() + { + TCbsTopic topic; + TInt err( iServer.FindTopicByNumber( iCurrentTopicNumber, topic ) ); + + if ( err != KErrNone ) + { + User::Leave( KErrNone ); + } + + TBuf number; + number.AppendNum( TInt( topic.iNumber ) ); + AknTextUtils::DisplayTextLanguageSpecificNumberConversion( number ); + ShowTopicQueryL( EFalse, topic.iName, number ); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::EditTopic +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListView::EditTopic( TBool aType, + TCbsTopicNumber aNumber, + const TCbsTopicName aName ) + { + TInt ret( KErrGeneral ); + + if ( aType ) // add query + { + ret = AddTopic(aNumber, aName); + } + else // edit query + { + ret = UpdateTopic( iCurrentTopicNumber, aNumber, aName ); + if( ret == KErrNone ) + { + iCurrentTopicNumber = aNumber; + } + } + + return ret; + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::CheckNewTopicCountL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::CheckNewTopicCountL() + { + iNewTopicsCount = GetNewTopicsCount(); + + __CBSUI_ASSERT( iNewTopicsCount >= 0, CbsUiPanic(EErrInvalidValue) ); + + if ( iNewTopicsCount > ENoNewMessages ) + { + if ( !iBackgroundNote ) + { + iBackgroundNote = CIdle::NewL(CActive::EPriorityIdle); + } + + TCallBack cb(ActivateBackgroundNoteL, this); + iBackgroundNote->Start(cb); + } + + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::GetNewTopicsCount +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListView::GetNewTopicsCount() + { + TInt newTopics(KCbsErrValue); + if ( iServer.Connected() ) + { +#ifdef _DEBUG + TInt ret = +#endif + iServer.GetNewTopicsCount(newTopics); + + __CBSUI_ASSERT( ret == KErrNone, CbsUiPanic(EErrTopicsCountError) ); + } + + return newTopics; + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::MarkCurrentHandle +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::MarkCurrentHandle() + { + TInt index( iContainer->CurrentPosition() ); + + if ( index >= 0 && iTopicNumberList->Count() > index ) + { + iCurrentTopicNumber = iTopicNumberList->At( index ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::TopicListChangedL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::TopicListChangedL( TCbsTopicListEvent /*aEvent*/, TCbsTopicNumber /*aTopicNumber*/ ) + { + if ( iContainer ) + { + ReloadTopicsL(); + UpdateNaviPaneL(); + SetFocusAfterReload(iFocusState); + iFocusState = ENoFocusUpdate; + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::HandleCommandL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::HandleCommandL( TInt aCommandId ) + { + + switch ( aCommandId ) + { + case ECbsUiappCmdSwitchOpen: + { + // To open a right topic + MarkCurrentHandle(); + ActivateTopicViewL(); + break; + } + case ECbsUiappCmdSwitchSubscribe: + { + // Change subscription status + User::LeaveIfError( + iServer.ChangeTopicSubscriptionStatus( + iCurrentTopicNumber, ETrue ) ); + + iFocusState = ESetFocusToCurrentHandle; + break; + } + case ECbsUiappCmdSwitchUnsubscribe: + { + // Change subscription status + User::LeaveIfError( + iServer.ChangeTopicSubscriptionStatus( + iCurrentTopicNumber, EFalse )); + iFocusState = ESetFocusToCurrentHandle; + break; + } + case ECbsUiappCmdSwitchHotmark: // Implementation is almost the same with + // ECbsUiappCmdSwitchHotmark and + // ECbsUiappCmdSwitchUnhotmark. + case ECbsUiappCmdSwitchUnhotmark: + { + // Requires refresh + TBool hot(EFalse); + + if ( aCommandId == ECbsUiappCmdSwitchHotmark ) + { + hot = ETrue; + TInt focusedItemIndex; + if(FindTopicIndexByNumber(focusedItemIndex, iCurrentTopicNumber) == KErrNone) + { + TCbsTopic topic; + // First, get the topic. + TInt rr( iServer.GetTopic(focusedItemIndex, topic) ); + if ( rr == KErrNone ) + { + if ( !topic.iSubscribed ) + { + // Change subscription status to subscribed + User::LeaveIfError(iServer.ChangeTopicSubscriptionStatus( + iCurrentTopicNumber, ETrue )) ; + } + } + } + } + + User::LeaveIfError(iServer.ChangeTopicHotmarkStatus(iCurrentTopicNumber, hot)); + iFocusState = ESetFocusToCurrentHandle; + break; + } + case ECbsUiappCmdSwitchSettings: + { + ActivateSettingsViewL(); + break; + } + // Topic sub menu pop up window commands. + case ECbsUiappCmdSwitchAddManually: + { + TBuf name; + TBuf number; + + ShowTopicQueryL( ETrue, name, number ); + AknTextUtils::ConvertDigitsTo( number, EDigitTypeWestern ); + + TInt topicNumber(KCbsErrValue); + if ( number.Length() > 0 ) + { + TLex lex(number); + TInt err( lex.Val(topicNumber) ); + + if ( err == KErrNone ) + { + SetCurrentTopicNumber( (TCbsTopicNumber) topicNumber ); + } + __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrNotANumber) ); + } + + iFocusState = ESetFocusToCurrentHandle; + break; + } + case ECbsUiappCmdSwitchAddFromIndex: + { +#ifdef _DEBUG + GetNewTopicsCount(); // just to reset +#endif + // topic detection need to shut down when + // add from index dialog is shown. + TBool topicDetection; + iServer.GetTopicDetectionStatus(topicDetection); + + if ( topicDetection ) + { + User::LeaveIfError( iServer.SetTopicDetectionStatus(EFalse) ); + } + + iAddFromIndexDialogIsActive = ETrue; + ActivateAddFromIndexViewL(); + + __ASSERT_DEBUG(GetNewTopicsCount() == 0, CbsUiPanic(ETopicCountError) ); + + iAddFromIndexDialogIsActive = EFalse; + UpdateTitlePaneL(); + UpdateNaviPaneL(); + + if ( topicDetection ) + { + User::LeaveIfError( iServer.SetTopicDetectionStatus(topicDetection) ); + } + + iFocusState = ESetFocusToCurrentHandle; + break; + } + case ECbsUiappCmdSwitchEdit: + { + ShowEditTopicQueryL(); + iFocusState = ESetFocusToCurrentHandle; + break; + } + case ECbsUiappCmdSwitchDelete: + { + if ( iCurrentTopicNumber != KIndexTopic ) + { + CAknQueryDialog* dlg = CAknQueryDialog::NewL(); + + if ( dlg->ExecuteLD(R_DELETE_TOPIC_CONFIRMATION_QUERY) ) + { + TInt unreadHotmarkedMessages; + User::LeaveIfError( + iServer.DeleteTopic(iCurrentTopicNumber) ); + UpdateCurrentTopicAfterDeletion(iCurrentTopicNumber); + unreadHotmarkedMessages = iServer.NumberOfUnreadHotmarkedMessages(); + if( unreadHotmarkedMessages <= 0 ) + { + CAknSoftNotifier* notifier = CAknSoftNotifier::NewLC(); + notifier->CancelSoftNotificationL( ECellBroadcastNotification); + CleanupStack::PopAndDestroy( notifier ); + } + } + iFocusState = ESetFocusToCurrentHandle; + } + break; + } + case ECbsUiappCmdSwitchDeleteAll: + { + TInt queryOk; + CAknQueryDialog* dlg = CAknQueryDialog::NewL(); + queryOk= dlg->ExecuteLD(R_DELETE_ALL_TOPICS_CONFIRMATION_QUERY ); + + if( queryOk ) + { + User::LeaveIfError( iServer.DeleteAllTopics() ); + CAknSoftNotifier* notifier = CAknSoftNotifier::NewLC(); // on CS + notifier->CancelSoftNotificationL( ECellBroadcastNotification); + CleanupStack::PopAndDestroy( notifier ); + } + iFocusState = ESetFocusToCurrentHandle; + break; + } + case EAknCmdHelp: + AppUi()->HandleCommandL(aCommandId); + break; + case EAknSoftkeyExit: // same functionality + case EAknCmdExit: + { + ( (MEikCommandObserver*)AppUi() )->ProcessCommandL(EAknCmdExit); + break; + } + default: + break; + } + } + + + +// --------------------------------------------------------- +// CCbsUiTopicListView::HandleRectChangeInContainer +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::HandleRectChangeInContainer() + { + if ( iContainer ) + { + iContainer->SetRect( ClientRect() ); + } + } + + + + +// --------------------------------------------------------- +// CCbsUiTopicListView::DoActivateL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, + TUid aCustomMessageId, + const TDesC8& aCustomMessage ) + { + if ( !iContainer ) + { + iContainer = CCbsUiTopicListViewContainer::NewL( *this, ClientRect() ); + AppUi()->AddToViewStackL( *this, iContainer ); + } + + TTopicListViewFocusState focus = ESetFocusToFirstItem; + + if ( aCustomMessageId == KSetFocusToId ) + { + focus = ESetFocusToCurrentHandle; + SetCurrentTopicNumber(aCustomMessage); + } + else if ( aCustomMessageId == KSetFocusToCurrentId ) + { + focus = ESetFocusToCurrentHandle; + } + else + { + focus = ESetFocusToFirstItem; + } + + ReloadTopicsL(); + SetFocusAfterReload(focus); + UpdateTitlePaneL(); + UpdateNaviPaneL(); + iContainer->ActivateL(); + } + + +// --------------------------------------------------------- +// CCbsUiTopicListView::AddTopic +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListView::AddTopic( const TCbsTopicNumber& aNumber, const TCbsTopicName& aName ) + { + __ASSERT_DEBUG( &aName, CbsUiPanic(EErrNullPointer) ); + + TCbsTopic topic; + topic.iHotmarked = EFalse; + topic.iName = aName; + topic.iNumber = aNumber; + topic.iProtected = EFalse; + topic.iSavedMessages = 0; + topic.iUnreadMessages = 0; + topic.iSubscribed = 0; + return iServer.AddTopic( topic ); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::UpdateTopic +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListView::UpdateTopic( const TCbsTopicNumber& aOldNumber, + const TCbsTopicNumber& aNumber, + const TCbsTopicName& aName ) + { + __ASSERT_DEBUG( &aName, CbsUiPanic(EErrNullPointer) ); + return iServer.ChangeTopicNameAndNumber( aOldNumber, aNumber, aName ); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::DoDeactivate +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::DoDeactivate() + { + if ( iContainer ) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + } + delete iContainer; + iContainer = NULL; + } + +void CCbsUiTopicListView::ViewActivatedL( + const TVwsViewId& aPrevViewId, + TUid aCustomMessageId,const + TDesC8& aCustomMessage) + { + CheckNewTopicCountL(); + CAknView::ViewActivatedL(aPrevViewId, aCustomMessageId, aCustomMessage); + } + +void CCbsUiTopicListView::ViewDeactivated() + { + // just to update + GetNewTopicsCount(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::DynInitMenuPaneL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::DynInitMenuPaneL( TInt aResourceId, + CEikMenuPane* aMenuPane ) + { + __ASSERT_DEBUG( aMenuPane, CbsUiPanic( EMenuPaneNullError ) ); + + TCbsTopic topic; + TInt ret( iServer.GetTopic(iContainer->CurrentPosition() , topic) ); + + // If topic doesn't exists it is better to leave and close the + // menu. + User::LeaveIfError(ret); + + if ( aResourceId == R_CBSUI_TOPICLISTVIEW_MENU ) + { + MarkCurrentHandle(); // to freeze a selected item + + // If topic is subscribed,.. + if ( topic.iSubscribed ) + { + // then remove subscribed item. + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchSubscribe ); + } + else + { + // otherwise remove unsubscribed item. + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchUnsubscribe ); + } + + // And the same for hotmark/unhotmark. + if ( topic.iHotmarked ) + { + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchHotmark ); + } + else + { + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchUnhotmark ); + } + + if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) + { + aMenuPane->DeleteMenuItem( EAknCmdHelp ); + } + } + else if ( aResourceId == R_CBSUI_TOPIC_MENU ) + { + TInt topics; + topics = iTopicNumberList->Count(); + + // If there is no room for topics, then remove add manually. + if ( topics >= KCountOfAllTopics ) + { + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchAddManually ); + } + + // If only index topic in topic list then "Delete all" menuitem is not shown + if ( topics < KTwoTopics ) + { + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchDeleteAll ); + } + + // Protected topic can not be edited or deleted. + if ( topic.iProtected ) + { + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchEdit ); + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchDelete ); + } + + // Check if there are Index message received. + iServer.StartCollectionBrowsing(); + + if( !iServer.HasNextCollectionTopic() ) + { + aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchAddFromIndex ); + } + } + else + { + //Does nothing + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::SetCurrentTopicNumber +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::SetCurrentTopicNumber( const TDesC8& aTopicNumber ) + { + TPckgBuf pckgTopicNumber; + pckgTopicNumber.Copy(aTopicNumber); + iCurrentTopicNumber = pckgTopicNumber(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::SetCurrentTopicNumber +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::SetCurrentTopicNumber( const TCbsTopicNumber aTopicNumber) + { + iCurrentTopicNumber = aTopicNumber; + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::Id +// +// +// --------------------------------------------------------- +// +TUid CCbsUiTopicListView::Id() const + { + return TUid::Uid( ECbsUiTopicListViewId ); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::FindTopicIndexByNumber +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListView::FindTopicIndexByNumber( TInt& aIndex, + const TCbsTopicNumber& aTopicNumber ) + { + TInt ret(KErrGeneral); + + for ( TInt i(0); i < iTopicNumberList->Count() && ret != KErrNone; i++ ) + { + if ( iTopicNumberList->At(i) == aTopicNumber ) + { + ret = KErrNone; + aIndex = i; + } + } + return ret; + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::ActivateTopicViewL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::ActivateTopicViewL() const + { + TPckgBuf message( iCurrentTopicNumber ); + + AppUi()->ActivateLocalViewL( + TUid::Uid(ECbsUiTopicViewId), KCbsUiCustomMessageId, message ); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::ActivateSettingsViewL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::ActivateSettingsViewL() const + { + AppUi()->ActivateLocalViewL( TUid::Uid(ECbsUiSettingsViewId) ); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::ActivateAddFromIndexViewL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListView::ActivateAddFromIndexViewL() + { + CCbsUiAddFromIndexDialog* dialog = + new ( ELeave ) CCbsUiAddFromIndexDialog( iServer ); + + dialog->ExecuteLD(R_CBS_ADD_FROM_INDEX_DIALOG); + } + +// --------------------------------------------------------- +// CCbsUiTopicListView::ActivateBackgroundNote +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListView::ActivateBackgroundNoteL( TAny* aTopicList ) + { + __ASSERT_DEBUG( aTopicList, CbsUiPanic(EErrNullPointer) ); + TInt newTopics( STATIC_CAST(CCbsUiTopicListView*, aTopicList)->iNewTopicsCount ); + + if ( newTopics > ENoNewMessages ) + { + HBufC* stringHolder = NULL; + if ( newTopics > EOneNewMessage ) + { + stringHolder = StringLoader::LoadLC( + R_PLURAL_TOPIC_ADDED, newTopics ); + } + else + { + stringHolder = STATIC_CAST(CCbsUiTopicListView*, aTopicList)-> + iCoeEnv->AllocReadResourceLC( + R_TEXT_NOTE_NEW_TOPIC_ADDED ); + } + + CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote; + note->ExecuteLD(*stringHolder); + + CleanupStack::PopAndDestroy(); // stringholder + } + + return KErrNone; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiTopicListViewContainer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiTopicListViewContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,617 @@ +/* +* 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: +* TopicListViewContainer owns the list box which shows topics. +* +*/ + + +// INCLUDES +#include // CAknContextPane +#include // TMbmCbsuiapp +#include // KAknsMessageSkinChange +#include // CreateIconL, SkinInstance +#include // AknTextUtils +#include // KEikDynamicLayoutVariantSwitch +#include +#include +#include +#include +#include +#include // KDC_RESOURCE_FILES_DIR +#include +#include "CbsUiId.h" +#include +#include "CCbsUiTopicListViewContainer.h" +#include "CCbsUiTopicListView.h" +#include "Cbsuiapp.hrh" +#include "CbsUiUtility.h" +#include "CbsUiPanic.h" +#include "CbsUiConstants.h" + + +// CONSTANTS +_LIT(KDirAndCbsUiAppMbmFile,"z:cbsuiapp.mbm"); +_LIT(KItemSeparator1, "\t "); +_LIT(KItemSeparator2, "\t4"); +const TInt KSizeOfStatus = 1; +const TInt KCountOfSeparator1 = 2; +const TInt KNumberOfIconsInTopicListContainer = 5; +const TUint KZeroFill = '0'; +const TUint KSubscribedAndNoMessages = '0'; +const TUint KSubscribedAndMessages = '1'; +const TUint KNotSubscribedAndNoMessages = '2'; +const TUint KNotSubscribedButMessagesExists = '3'; + + +//DATA TYPES +enum TopicListViewIconArrayIndexes + { + ECbsPropCbSubs = 0, + ECbsPropCbSubsUnread, + ECbsPropCbUnsubs, + ECbsPropCbUnsubsUnread, + ECbsIndiCbHotAdd + }; + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// + +CCbsUiTopicListViewContainer::CCbsUiTopicListViewContainer( CCbsUiTopicListView& aListView ) + : iListView( aListView ) + { + } + +// Symbian OS default constructor can leave. +void CCbsUiTopicListViewContainer::ConstructL( const TRect& aRect ) + { + CreateWindowL(); + + SetMopParent(&iListView); + + iListBox = new(ELeave) CAknSingleGraphicHeadingStyleListBox; + iListBox->SetContainerWindowL(*this); + + iListBox->ConstructL( this, EEikListBoxMultipleSelection ); + + CDesCArrayFlat* array = + new (ELeave) CDesCArrayFlat(KNumberOfStandardTopics); + + // changing the owner, shouldn't leave + iListBox->Model()->SetItemTextArray( array ); + + iListBox->CreateScrollBarFrameL( ETrue ); + iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, + CEikScrollBarFrame::EAuto ); + iListBox->SetListBoxObserver( this ); + + SetRect( aRect ); + LoadIconsL(); + } + +// Two-phased constructor. +CCbsUiTopicListViewContainer* CCbsUiTopicListViewContainer::NewL( CCbsUiTopicListView& aListView, + const TRect& aRect ) + { + CCbsUiTopicListViewContainer* self = + new (ELeave) CCbsUiTopicListViewContainer( aListView ); + + CleanupStack::PushL( self ); + self->ConstructL( aRect ); + CleanupStack::Pop(); + + return self; + } + +// Destructor +CCbsUiTopicListViewContainer::~CCbsUiTopicListViewContainer() + { + delete iListBox; + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::ReloadStarts +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::ReloadStarts() const + { + MDesCArray* itemList = iListBox->Model()->ItemTextArray(); + CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList); + + itemArray->Reset(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::CountComponentControls +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListViewContainer::CountComponentControls() const + { + return 1; + } + +// --------------------------------------------------------- +// +// +// +// --------------------------------------------------------- +// +CCoeControl* CCbsUiTopicListViewContainer::ComponentControl( TInt /*aIndex*/ ) const + { + return iListBox; + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::OfferKeyEventL +// +// +// --------------------------------------------------------- +// +TKeyResponse CCbsUiTopicListViewContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + TKeyResponse result = EKeyWasNotConsumed; + + switch ( aKeyEvent.iCode ) + { + case EKeyEnter: // To support qwert keyboard + case EKeyOK: + // to open a right topic + iListView.MarkCurrentHandle(); + iListView.ProcessCommandL(ECbsUiappCmdSwitchOpen); + result = EKeyWasConsumed; + break; + case EKeyBackspace: + iListView.MarkCurrentHandle(); + iListView.ProcessCommandL(ECbsUiappCmdSwitchDelete); + result = EKeyWasConsumed; + break; + default: + result = iListBox->OfferKeyEventL(aKeyEvent, aType); + break; + } + + return result; + } + + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::SetCurrentItemIndex +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::SetCurrentItemIndex( TInt aItemIndex ) const + { + + MDesCArray* itemList = iListBox->Model()->ItemTextArray(); + CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList); + + TInt count( itemArray->MdcaCount() ); + + __ASSERT_DEBUG( + aItemIndex >= EMinTopicNumber && + aItemIndex <= EMaxTopicNumber, + CbsUiPanic( EErrBadIndex ) ); + + if ( aItemIndex < count && aItemIndex >= EMinTopicNumber ) + { + iListBox->SetCurrentItemIndexAndDraw( aItemIndex ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::ReloadOfferTopicL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::ReloadOfferTopicL( const TCbsTopic& aTopic ) const + { + + MDesCArray* itemList = iListBox->Model()->ItemTextArray(); + CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList); + + TBuf ch; + ch.Append( GetStatus(aTopic) ); + TBuf index; + GetIndexNumber(aTopic, index); + AknTextUtils::DisplayTextLanguageSpecificNumberConversion( index ); + + HBufC* buffer = HBufC::NewLC( + aTopic.iName.Length() + KItemSeparator1().Length() * + KCountOfSeparator1 + KItemSeparator2().Length() + + index.Length() + ch.Length() ); + + TPtr ptr = buffer->Des(); + ptr = ch; + ptr.Append(KItemSeparator1); + ptr.Append(index); + ptr.Append(KItemSeparator1); + ptr.Append(aTopic.iName); + + if ( aTopic.iHotmarked ) + { + ptr.Append(KItemSeparator2); + } + + itemArray->AppendL(*buffer); + CleanupStack::PopAndDestroy(); // buffer + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::ReloadEndsL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::ReloadEndsL() + { + iListBox->HandleItemAdditionL(); + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::CurrentPosition +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicListViewContainer::CurrentPosition() const + { + TInt result(KCbsErrValue); + + if ( iListBox ) + { + result = iListBox->CurrentItemIndex(); + } + + return result; + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::GetStatus +// +// Informs which icon to use. +// --------------------------------------------------------- +// +TChar CCbsUiTopicListViewContainer::GetStatus( const TCbsTopic& aTopic ) const + { + + TChar retVal(KSubscribedAndNoMessages); + + + if ( aTopic.iSubscribed ) + { + if ( aTopic.iUnreadMessages == 0 ) + { + retVal = KSubscribedAndNoMessages; + } + else + { + retVal = KSubscribedAndMessages; + } + } + else + { + if ( aTopic.iUnreadMessages == 0 ) + { + retVal = KNotSubscribedAndNoMessages; + } + else + { + retVal = KNotSubscribedButMessagesExists; + } + } + + return retVal; + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::GetIndexNumber +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::GetIndexNumber( const TCbsTopic& aTopic , + TBuf& aIndexNumber ) const + { + TBuf ind; + + __ASSERT_DEBUG( aIndexNumber.MaxSize() >= KTopicNumberLength, + CbsUiPanic(EErrBadLength) ); + + ind.AppendNum( TInt(aTopic.iNumber) ); + aIndexNumber.Justify(ind , KTopicNumberLength, ERight, KZeroFill); + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::SizeChanged +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::SizeChanged() + { + if (iListBox) + { + iListBox->SetRect( Rect() ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::FocusChanged +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::FocusChanged( TDrawNow aDrawNow ) + { + CCoeControl::FocusChanged( aDrawNow ); + if( iListBox ) + { + iListBox->SetFocus( IsFocused(), aDrawNow ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::GetHelpContext +// +// Gets the control's help context. +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::GetHelpContext(TCoeHelpContext& aContext) const + { + aContext.iMajor = TUid::Uid(KUidCbsUiappDef); + aContext.iContext = KCBS_HLP_MAIN; + } + + + +// ---------------------------------------------------- +// CCbsUiTopicListViewContainer::HandleResourceChange +// +// ---------------------------------------------------- +void CCbsUiTopicListViewContainer::HandleResourceChange( TInt aType ) + { + CCoeControl::HandleResourceChange( aType ); + + if( aType == KEikDynamicLayoutVariantSwitch ) + { + iListView.HandleRectChangeInContainer(); + } + + if( aType == KAknsMessageSkinChange ) + { + // change skin bitmap + TRAPD( ignore, SkinBitmapChangesL( ) ); + if( ignore ) + { + ignore = KErrNone; //Prevent ARMV5 compilation varning + } + } + } + +// ---------------------------------------------------- +// CCbsUiTopicListViewContainer::HandleListBoxEventL +// +// ---------------------------------------------------- +void CCbsUiTopicListViewContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/, + TListBoxEvent aEventType ) + { + switch ( aEventType ) + { + case EEventItemSingleClicked: + { + TKeyEvent keyEvent; + keyEvent.iCode = EKeyOK; + OfferKeyEventL( keyEvent, EEventKey ); + break; + } + default: + break; + } + } + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::LoadIconsL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::LoadIconsL() + { + CAknIconArray* icons = + new (ELeave) CAknIconArray(KNumberOfIconsInTopicListContainer); + CleanupStack::PushL(icons); + + TParse parse; + parse.Set(KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL); + TFileName mbmFileAndPathName(parse.FullName()); + + // First icon & mask. + AddIconL( KAknsIIDQgnPropCbSubs, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_subs, + EMbmCbsuiappQgn_prop_cb_subs_mask ); + + // Second icon & mask. + AddIconL( KAknsIIDQgnPropCbSubsUnread, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_subs_unread, + EMbmCbsuiappQgn_prop_cb_subs_unread_mask ); + + // Third icon & mask. + AddIconL( KAknsIIDQgnPropCbUnsubs, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_unsubs, + EMbmCbsuiappQgn_prop_cb_unsubs_mask ); + + // Fourth icon & mask. + AddIconL( KAknsIIDQgnPropCbUnsubsUnread, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_unsubs_unread, + EMbmCbsuiappQgn_prop_cb_unsubs_unread_mask ); + + // Fifth icon & mask. + AddIconL( KAknsIIDQgnIndiCbHotAdd, icons, mbmFileAndPathName, EMbmCbsuiappQgn_indi_cb_hot_add, + EMbmCbsuiappQgn_indi_cb_hot_add_mask, ETrue ); + + CleanupStack::Pop(); // icons + + iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons ); + } + + +// --------------------------------------------------------- +// CCbsUiTopicListViewContainer::AddIconL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicListViewContainer::AddIconL( + TAknsItemID aId, + CAknIconArray* aIcons, + const TDesC& aIconFileWithPath, + TInt aIconGraphicsIndex, + TInt aIconGraphicsMaskIndex, + TBool aColorIcon ) + { + // icon & mask. + MAknsSkinInstance* skins = AknsUtils::SkinInstance(); + + // COnstruct the icon and append it to icon array + CGulIcon* icon = ConstructIconL( aColorIcon, skins, aId, + aIconFileWithPath, aIconGraphicsIndex, aIconGraphicsMaskIndex ); + CleanupStack::PushL( icon ); + aIcons->AppendL( icon ); + CleanupStack::Pop( ); // icon + } + +// ---------------------------------------------------- +// CCbsUiTopicListViewContainer::SkinBitmapChangesL +// ---------------------------------------------------- +void CCbsUiTopicListViewContainer::SkinBitmapChangesL() + { + CArrayPtr *icons = 0; + icons = iListBox->ItemDrawer()->ColumnData()->IconArray(); + + TAknsItemID id; + id.iMajor = 0; + id.iMinor = 0; + + TInt count = icons->Count(); + TInt bitmapIndex = 0; + TInt bitmapMaskIndex = 0; + TBool colourIcon( EFalse ); + + // Change list icons + MAknsSkinInstance* skins = AknsUtils::SkinInstance(); + for ( TInt cc=count; --cc>=0; ) + { + switch( cc ) + { + case ECbsPropCbSubs: + bitmapIndex = EMbmCbsuiappQgn_prop_cb_subs; + bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_subs_mask; + id = KAknsIIDQgnPropCbSubs; + break; + case ECbsPropCbSubsUnread: + bitmapIndex = EMbmCbsuiappQgn_prop_cb_subs_unread; + bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_subs_unread_mask; + id = KAknsIIDQgnPropCbSubsUnread; + break; + case ECbsPropCbUnsubs: + bitmapIndex = EMbmCbsuiappQgn_prop_cb_unsubs; + bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_unsubs_mask; + id = KAknsIIDQgnPropCbUnsubs; + break; + case ECbsPropCbUnsubsUnread: + bitmapIndex = EMbmCbsuiappQgn_prop_cb_unsubs_unread; + bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_unsubs_unread_mask; + id = KAknsIIDQgnPropCbUnsubsUnread; + break; + case ECbsIndiCbHotAdd: + bitmapIndex = EMbmCbsuiappQgn_indi_cb_hot_add; + bitmapMaskIndex = EMbmCbsuiappQgn_indi_cb_hot_add_mask; + id = KAknsIIDQgnIndiCbHotAdd; + colourIcon = ETrue; + break; + default: + bitmapIndex = EMbmCbsuiappQgn_prop_cb_unsubs_unread; + bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_unsubs_unread_mask; + id = KAknsIIDQgnPropCbUnsubsUnread; + break; + } + + // icon & mask + TParse parse; + parse.Set( KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL ); + TFileName mbmFileAndPathName( parse.FullName() ); + + CGulIcon* icon = ConstructIconL( colourIcon, skins, id, + mbmFileAndPathName, bitmapIndex, bitmapMaskIndex ); + + CleanupStack::PushL( icon ); + CGulIcon* iconToBeDelete = icons->At( cc ); + icons->At( cc ) = icon; + delete iconToBeDelete; + iconToBeDelete = NULL; + + CleanupStack::Pop(); // icon + + colourIcon = EFalse; + } + } + + +// ---------------------------------------------------- +// CCbsUiTopicListViewContainer::ConstructIconL +// ---------------------------------------------------- +CGulIcon* CCbsUiTopicListViewContainer::ConstructIconL( + TBool& aColourIcon, + MAknsSkinInstance* aSkins, + const TAknsItemID& aID, + const TDesC& aFilename, + const TInt aFileBitmapId, + const TInt aFileMaskId ) + { + // icon & mask + CFbsBitmap* bitmap; + CFbsBitmap* mask; + + if ( aColourIcon ) + { + AknsUtils::CreateColorIconL( + aSkins, + aID, + KAknsIIDQsnIconColors, + EAknsCIQsnIconColorsCG13, // Check the used color group - this is usually correct group for D-column stuff + bitmap, + mask, + aFilename, + aFileBitmapId, + aFileMaskId , + KRgbBlack ); // This is default color used, if the color skinning fails, or there is no color defined. + } + else + { + AknsUtils::CreateIconL( aSkins, aID, bitmap, + mask, aFilename, aFileBitmapId, + aFileMaskId ); + } + + CGulIcon* icon = CGulIcon::NewL( bitmap, mask ); + return icon; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiTopicView.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiTopicView.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1009 @@ +/* +* Copyright (c) 2002 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: +* Implementation of CCbsUiTopicView. +* +* +*/ + + +// INCLUDES +#include // AknTextUtils +#include // for feature flags +#include // for feature manager +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // TResourceReader +#include +#include +#include "CCbsUiTopicView.h" +#include "CCbsUiTopicViewContainer.h" +#include "Cbsuiapp.hrh" +#include "CbsUiPanic.h" +#include "CbsUiUtility.h" +#include "CbsUiConstants.h" +#include "CbsUiDebug.h" +#include "MCbs.h" +#include +#include +#include + + + +// CONSTANTS +const TUint KZeroFill = '0'; +const TUint KCbsMSKControlID = 3; + + +// MODULE DATA STRUCTURES + +// buffer to be used to unpack action information +typedef TPckgBuf TTopicNumberBuf; + +// index for setting the focus +enum TTopicViewFocusIndexes + { + EFirstMessage = 0 + }; + + + +//============================================================================= +// MEMBER FUNCTIONS +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiTopicView::CCbsUiTopicView( MCbs& aServer ) +: iServer( aServer ) + { + } + +// --------------------------------------------------------- +// CCbsUiTopicView::ConstructL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::ConstructL() + { + BaseConstructL( R_CBSUI_TOPICVIEW ); + + // Create array for handles. + iHandles = new (ELeave) TCbsUiMessageHandleList( + KNumberOfTemporaryMessages); + + CEikStatusPane* sp = StatusPane(); + + iNaviContainer = + STATIC_CAST( CAknNavigationControlContainer*, sp-> + ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); + } + + +// Two-phased constructor. +CCbsUiTopicView* CCbsUiTopicView::NewL( MCbs& aServer ) + { + __ASSERT_DEBUG( &aServer, CbsUiPanic(EErrNullPointer) ); + + // Normal two phase construction. + CCbsUiTopicView* self = + new (ELeave) CCbsUiTopicView(aServer); + + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + + return self; + } + +// Destructor +CCbsUiTopicView::~CCbsUiTopicView() + { + if ( iContainer ) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + } + + delete iContainer; + delete iHandles; + + if ( iNaviContainer && iDecoratedLabel ) + { + iNaviContainer->Pop ( iDecoratedLabel ); + delete iDecoratedLabel; + } + iDecoratedLabel = NULL; + + if ( iNaviContainer && iPreviousDecoratedLabel ) + { + iNaviContainer->Pop ( iPreviousDecoratedLabel ); + delete iPreviousDecoratedLabel; + } + iPreviousDecoratedLabel = NULL; + } + +// --------------------------------------------------------- +// CCbsUiTopicView::ReloadMessagesL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::ReloadMessagesL() + { + TCbsTopic topic; + TInt err( iServer.FindTopicByNumber(iCurrentTopicNumber, topic) ); + + if ( err != KErrNone ) + { + ActivateTopicListViewL(iCurrentTopicNumber); + return; + } + + UpdateTitlePaneL(topic); + UpdateNaviPaneL(topic); + + PrepareReloading(); + LoadAllMessageTitlesL(iCurrentTopicNumber); + ActivateListBoxL(); + + // Set the MSK according to message count + if ( !iHandles->Count() ) + { + RemoveCommandFromMSK(); + SetMiddleSoftKeyLabelL( R_TEXT_SOFTKEY_EMPTY, ECbsUiappNullCmd ); + } + else + { + RemoveCommandFromMSK(); + SetMiddleSoftKeyLabelL( R_QTN_MSK_OPEN, ECbsUiappCmdTopicMSKRead ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::TotalMessages +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicView::TotalMessages() const + { + return iHandles->Count(); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::UpdateTitlePaneL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::UpdateTitlePaneL( const TCbsTopic& aTopic ) const + { + CEikStatusPane* sp = StatusPane(); + CAknTitlePane* title = + STATIC_CAST( + CAknTitlePane*, sp->ControlL( TUid::Uid(EEikStatusPaneUidTitle) ) ); + + __ASSERT_DEBUG( sp && title, CbsUiPanic(EStatusOrTitlePaneError) ); + + title->SetTextL(aTopic.iName); + + } + +// --------------------------------------------------------- +// CCbsUiTopicView::UpdateNaviPaneL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::UpdateNaviPaneL( const TCbsTopic& aTopic ) + { + TBool next( EFalse ); + TBool previous( EFalse ); + TInt err( CheckIfCanMove( previous, next ) ); + + if ( err != KErrNone ) + { + iDecoratedLabel = CbsUiUtility::CreateEmptyNavigationPaneL(); + return; + } + + TBuf number; + TBuf buffer; + + buffer.AppendNum( TInt( aTopic.iNumber ) ); + number.Justify( buffer, EMaxTopicNumberLength, ERight, KZeroFill ); + AknTextUtils::DisplayTextLanguageSpecificNumberConversion( number ); + + // Create a new decorator + CAknNavigationDecorator* newDecoratedLabel = + iNaviContainer->CreateNavigationLabelL ( number ); + CleanupStack::PushL( newDecoratedLabel ); + + // Set new decorator on top of navi pane's decorator stack + // (topmost decorator is the one to show) + iNaviContainer->PushL( *newDecoratedLabel ); + + // remove previous decorator from decorator stack and delete it + if ( iPreviousDecoratedLabel ) + { + iNaviContainer->Pop( iPreviousDecoratedLabel ); + delete iPreviousDecoratedLabel; + iPreviousDecoratedLabel = NULL; + } + + // update decorator pointers to new ones + iPreviousDecoratedLabel = iDecoratedLabel; + iDecoratedLabel = newDecoratedLabel; + + // set observer for navi pane + iDecoratedLabel->SetNaviDecoratorObserver( this ); + + CleanupStack::Pop( newDecoratedLabel ); + + iDecoratedLabel->MakeScrollButtonVisible( ETrue ); + + if( AknLayoutUtils::LayoutMirrored() ) + { + // Should be arrows. + iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ELeftButton, !next ); + // And these should also be arrows. + iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ERightButton, !previous ); + } + else + { + // Should be arrows. + iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ELeftButton, !previous ); + // And these should also be arrows. + iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ERightButton, !next ); + } + + } + +// --------------------------------------------------------- +// CCbsUiTopicView::MarkCurrentlyFocusedHandle +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::MarkCurrentlyFocusedHandle() + { + if ( iContainer->CurrentPosition() >= 0 && + TotalMessages() > iContainer->CurrentPosition() ) + { + iCurrentHandle = iHandles->At( iContainer->CurrentPosition() ); + } + } + + +// --------------------------------------------------------- +// CCbsUiTopicView::HandleRectChangeInContainer +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::HandleRectChangeInContainer() + { + if ( iContainer ) + { + iContainer->SetRect( ClientRect() ); + } + } + + +// --------------------------------------------------------- +// CCbsUiTopicView::SetFocusToMessage +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::SetFocusToMessage( TInt aIndex ) + { + if ( iContainer && TotalMessages() > 0 ) + { + __ASSERT_DEBUG( aIndex >= 0 && aIndex < TotalMessages(), + CbsUiPanic(EErrIndexOutOfBounds) ); + // first one in the list is the newest + iContainer->SetCurrentItemIndex(aIndex); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::TopicListChangedL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::TopicListChangedL( TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber ) + + { + if ( iContainer && iCurrentTopicNumber == aTopicNumber ) + { + if ( aEvent == ECbsTopicReceivedNewMessage ) + { + ReloadMessagesL(); + } + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::SaveMessage +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicView::SaveMessage( const TCbsMessageHandle& aHandle ) + { + return iServer.SaveMessage( aHandle ); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::LockMessage +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicView::LockMessage( TCbsMessageHandle aHandle ) + { + return iServer.LockMessage(aHandle); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::UnLockMessage +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::UnLockMessage() + { + if ( iServer.Connected() ) + { + iServer.LockMessage(NULL); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::ShowMessageL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::ShowMessageL() + { + if ( TotalMessages() == 0 ) + { + return; + } + + User::LeaveIfError( LockMessage(iCurrentHandle) ); + + ActivateMsgViewL(iCurrentHandle); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::DynInitMenuPaneL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::DynInitMenuPaneL( TInt aResourceId, + CEikMenuPane* aMenuPane ) + { + __ASSERT_DEBUG( aMenuPane, CbsUiPanic(EMenuPaneNullError) ); + __ASSERT_DEBUG( aResourceId >= 0, CbsUiPanic( EErrInvalidValue) ); + if ( aResourceId == R_CBSUI_TOPICVIEW_MENU ) + { + if ( TotalMessages() > 0 ) + { + // for using a right message + MarkCurrentlyFocusedHandle(); + + // Lock message that it is not deleted automatically. + // If error, close the menu pane + User::LeaveIfError( LockMessage(iCurrentHandle) ); + + if( CbsUiUtility::IsSavedL(iCurrentHandle, iServer) ) + { + aMenuPane->DeleteMenuItem(ECbsUiappCmdTopicMenuKeep); + } + } + else + { + // If no messages, then not possible to do anything.. + aMenuPane->DeleteMenuItem(ECbsUiappCmdTopicMenuRead); + aMenuPane->DeleteMenuItem(ECbsUiappCmdTopicMenuKeep); + aMenuPane->DeleteMenuItem(ECbsUiappCmdMessageDelete); + } + if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) + { + aMenuPane->DeleteMenuItem( EAknCmdHelp ); + } + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::SetEmphasis +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::SetEmphasis( CCoeControl* aMenuControl,TBool aEmphasis ) + { + __ASSERT_DEBUG( aMenuControl, CbsUiPanic(EErrNullPointer) ); + CAknView::SetEmphasis(aMenuControl, aEmphasis); + + // Checks if the menu pane is showing. + if ( !aEmphasis && iCanUnlock ) + { + // Has to be unlocked, because otherwise message could stay as locked + // and could not be deleted automatically by the server. + UnLockMessage(); + } + } + + +// --------------------------------------------------------- +// CCbsUiTopicView::ProcessCommandL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::ProcessCommandL( TInt aCommand ) + { + switch ( aCommand ) + { + case ECbsUiappCmdTopicMenuRead: // same operation + case ECbsUiappCmdTopicMSKRead: + case ECbsUiappCmdTopicMenuKeep: // cannot unlock current message + case ECbsUiappCmdMessageDelete: + iCanUnlock = EFalse; // prevents SetEmphasis to unlock message + break; + default: + break; + }; + + CAknView::ProcessCommandL(aCommand); + + switch ( aCommand ) + { + case ECbsUiappCmdTopicMenuKeep: // same operation + case ECbsUiappCmdMessageDelete: + // Have to unlock message, because in error situation + // message would be locked after these two operations. + UnLockMessage(); + break; + default: + break; + }; + } + +// --------------------------------------------------------- +// CCbsUiTopicView::HandleCommandL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::HandleCommandL( TInt aCommandId ) + { + TTopicViewFocusState focusState = ENoFocusUpdate; + + switch (aCommandId) + { + case EAknSoftkeyBack: + { + ActivateTopicListViewL(iCurrentTopicNumber); + break; + } + // MSK + case ECbsUiappCmdTopicMSKRead: + case ECbsUiappCmdTopicMenuRead: + { + // to open a right message + MarkCurrentlyFocusedHandle(); + if ( TotalMessages() > 0 ) + { + ShowMessageL(); + } + break; + } + case ECbsUiappCmdTopicMenuKeep: + { + CbsUiUtility::SaveCurrentMessageL(iCurrentHandle, *this); + focusState = ESetFocusToCurrentHandle; + break; + } + case ECbsUiappCmdMessageDelete: + { + if ( TotalMessages() > 0 ) + { + CAknQueryDialog* dlg = CAknQueryDialog::NewL(); + + if ( dlg->ExecuteLD(R_DELETE_MSG_CONFIRMATION_QUERY) ) + { + // Unlock the message, so that it could be deleted + UnLockMessage(); + + if ( iServer.DeleteMessage(iCurrentHandle) == KErrNone ) + { + SetNewCurrentHandle(iCurrentHandle); + } + } + focusState = ESetFocusToCurrentHandle; + } + break; + } + case ECbsUiappTopicViewCmdGoToPrevTopic: + { + TBool toPrevious(ETrue); + SetCurrentTopicNumber(toPrevious); + focusState = ESetFocusToFirstItem; + break; + } + case ECbsUiappTopicViewCmdGoToNextTopic: + { + TBool toPrevious(EFalse); + SetCurrentTopicNumber(toPrevious); + focusState = ESetFocusToFirstItem; + break; + } + case EAknCmdHelp: + AppUi()->HandleCommandL(aCommandId); + break; + case EAknCmdExit: + { + ( (MEikCommandObserver*)AppUi() )-> + ProcessCommandL(EAknCmdExit); + break; + } + default: + { + break; + } + } + + if ( focusState != ENoFocusUpdate ) + { + ReloadMessagesL(); + SetFocusAfterReloading(focusState); + } + + } + +// --------------------------------------------------------- +// CCbsUiTopicView::DoActivateL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, + TUid aCustomMessageId, + const TDesC8& aCustomMessage ) + { + iCanUnlock = ETrue; + if ( !iContainer ) + { + iContainer = CCbsUiTopicViewContainer::NewL(*this, ClientRect()); + AppUi()->AddToViewStackL( *this, iContainer ); + } + + SetCurrentTopicNumberAndMessageHandle(aCustomMessage); + + ReloadMessagesL(); + + TTopicViewFocusState focus(ESetFocusToFirstItem); + if ( aCustomMessageId == KSetFocusToId ) + { + focus = ESetFocusToCurrentHandle; + } + + SetFocusAfterReloading(focus); + + // if the list box focus is changed, then container should be activetd + // after ReloadMessagesL + iContainer->ActivateL(); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::DoDeactivate +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::DoDeactivate() + { + if (iContainer) + { + AppUi()->RemoveFromViewStack(*this, iContainer); + delete iContainer; + iContainer = NULL; + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::Id +// +// +// --------------------------------------------------------- +// +TUid CCbsUiTopicView::Id() const + { + return TUid::Uid( ECbsUiTopicViewId ); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::FindMessageIndexByHandle +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicView::FindMessageIndexByHandle( TInt& aIndex, + const TCbsMessageHandle& aMsgHandle ) + { + __ASSERT_DEBUG( &aIndex, CbsUiPanic(EErrNullPointer) ); + + TInt ret(KErrGeneral); + + for ( TInt i(0); i < TotalMessages() && ret != KErrNone; i++ ) + { + if ( iHandles->At(i) == aMsgHandle ) + { + ret = KErrNone; + aIndex = i; + } + } + + return ret; + } + +// --------------------------------------------------------- +// CCbsUiTopicView::LoadAllMessageTitlesL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::LoadAllMessageTitlesL( TCbsTopicNumber aTopicNumber ) + { + TBuf buffer; + TCbsMessage message; + iHandles->Reset(); + + // Then take the total amount of messages in the topic. + TInt count(0); + User::LeaveIfError( iServer.GetMessageCount(aTopicNumber, count) ); + + for ( TInt index(0); index < count; index++ ) + { + if ( iServer.GetMessage(aTopicNumber, index, message) == KErrNone ) + { + if ( iContainer ) + { + // Add contents. + TInt err = + iServer.GetMessageContents(message.iHandle, buffer); + + __CBSUI_ASSERT( + err == KErrNone, CbsUiPanic(EMessageContentsError) ); + User::LeaveIfError(err); + + iContainer->ReloadOfferL(message, buffer); + } + + iHandles->AppendL(message.iHandle); + } + + buffer.Zero(); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::PrepareReloading +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::PrepareReloading() + { + if ( iContainer ) + { + iContainer->ReloadStarts(); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::SetFocusAfterReloading +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::SetFocusAfterReloading( TTopicViewFocusState aFocusState ) + { + TInt focusedItem(KCbsErrValue); + + // has to find index from the ui side, because in the + // server side the index could be an other. + TBool setFocusToFirstItem( + (aFocusState == ESetFocusToFirstItem) || + (aFocusState == ESetFocusToNewestMessage) || + (FindMessageIndexByHandle(focusedItem, iCurrentHandle) != KErrNone) + ); + + if ( setFocusToFirstItem ) + { + focusedItem = EFirstMessage; + } + + __ASSERT_DEBUG( + focusedItem != KCbsErrValue, CbsUiPanic(EErrInvalidValue) ); + + SetFocusToMessage(focusedItem); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::SetNewCurrentHandle +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::SetNewCurrentHandle( TCbsMessageHandle aDeletedHandle ) + { + + TInt messagePosition(KCbsErrValue); + TInt err( FindMessageIndexByHandle(messagePosition, aDeletedHandle) ); + + TBool isLastMessage = + ( (messagePosition + 1) == TotalMessages() ) && + (messagePosition >= 0); + + if ( isLastMessage ) + { + // then previous handle should be focused after deletion + messagePosition--; + } + else + { + // then the next handle will be focused after deletion + messagePosition++; + } + + if ( messagePosition >= TotalMessages() || + messagePosition < 0 || + err != KErrNone ) + { + messagePosition = 0; + } + + __ASSERT_DEBUG( err == KErrNone, CbsUiPanic(EErrMsgNotFound) ); + + iCurrentHandle = iHandles->At(messagePosition); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::SetCurrentTopicNumber +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::SetCurrentTopicNumber( TBool aToPrev ) + { + TCbsTopicNumber prev; + TCbsTopicNumber next; + TInt position; + + TInt err( iServer.GetNextAndPrevTopicNumber( + iCurrentTopicNumber, prev, next, position) ); + + if ( err == KErrNone ) // handle exists + { + if ( aToPrev ) + { + if ( position != ECbsHead ) + { + iCurrentTopicNumber = prev; + } + } + else + { + if ( position != ECbsTail ) + { + iCurrentTopicNumber = next; + } + } + } + else + { + __CBSUI_ASSERT( 0, CbsUiPanic(EErrTopicNumberNotFound) ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::SetCurrentTopicNumberAndMessageHandle +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::SetCurrentTopicNumberAndMessageHandle( const TDesC8& aTopicNumberDes ) + { + TTopicNumberBuf aTopicNumberBuf; + aTopicNumberBuf.Copy(aTopicNumberDes); + iCurrentTopicNumber = aTopicNumberBuf().iTopicNumber; + iCurrentHandle = aTopicNumberBuf().iMessageHandle; + } + +// --------------------------------------------------------- +// CCbsUiTopicView::ActivateMsgViewL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::ActivateMsgViewL( TCbsMessageHandle aMsgHandle ) const + { + TPckgBuf pckgMessageHandle(aMsgHandle); + + AppUi()->ActivateLocalViewL( + TUid::Uid(ECbsUiMsgViewId), KCbsUiCustomMessageId, pckgMessageHandle); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::ActivateTopicListViewL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::ActivateTopicListViewL( TCbsTopicNumber aTopicNumber ) const + { + TPckgBuf pckgTopicNumber(aTopicNumber); + + AppUi()->ActivateLocalViewL( + TUid::Uid(ECbsUiTopicListViewId), KSetFocusToId, pckgTopicNumber); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::CheckIfCanMove +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicView::CheckIfCanMove( TBool& aToPrevious, TBool& aToNext ) + { + TCbsTopicNumber prevDummy; // not used + TCbsTopicNumber nextDummy; + TInt position; + + TInt err( iServer.GetNextAndPrevTopicNumber( + iCurrentTopicNumber, prevDummy, nextDummy, position) ); + + __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrTopicNumberNotFound) ); + __CBSUI_ASSERT( + position >= 0 && position <= (ECbsTail | ECbsHead), + CbsUiPanic(EErrInvalidValue) ); + + aToPrevious = EFalse; + aToNext = EFalse; + + if ( err == KErrNone ) + { + if ( !position ) // topic in both sides + { + aToPrevious = ETrue; + aToNext = ETrue; + } + else if ( position == ECbsTail ) + { + aToPrevious = ETrue; + } + else if ( position == ECbsHead ) + { + aToNext = ETrue; + } + else + { + //Does nothing + } + } + + return err; + } + +// --------------------------------------------------------- +// CCbsUiTopicView::ActivateListBoxL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::ActivateListBoxL() + { + iContainer->ReloadEndsL(); + } + +// --------------------------------------------------------- +// CCbsUiTopicView::SetMiddleSoftKeyLabelL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::SetMiddleSoftKeyLabelL( + const TInt aResourceId, const TInt aCommandId ) + { + CEikButtonGroupContainer* cbaGroup = Cba(); + if ( cbaGroup ) + { + HBufC* mskText = StringLoader::LoadLC( aResourceId ); + TPtr mskPtr = mskText->Des(); + cbaGroup->AddCommandToStackL( + KCbsMSKControlID, + aCommandId, + mskPtr ); + CleanupStack::PopAndDestroy( mskText ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::RemoveCommandFromMSK +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::RemoveCommandFromMSK() + { + if ( Cba() ) + { + Cba()->RemoveCommandFromStack( KCbsMSKControlID, ECbsUiappCmdTopicMSKRead ); + Cba()->RemoveCommandFromStack( KCbsMSKControlID, ECbsUiappNullCmd ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicView::HandleNaviDecoratorEventL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicView::HandleNaviDecoratorEventL( TInt aEventID ) + { + TTopicViewFocusState focusState = ENoFocusUpdate; + + switch ( aEventID ) + { + case MAknNaviDecoratorObserver::EAknNaviDecoratorEventLeftTabArrow: + { + SetCurrentTopicNumber( ETrue ); + focusState = ESetFocusToFirstItem; + break; + } + case MAknNaviDecoratorObserver::EAknNaviDecoratorEventRightTabArrow: + { + SetCurrentTopicNumber( EFalse ); + focusState = ESetFocusToFirstItem; + break; + } + default: + { + break; + } + } + + if ( focusState != ENoFocusUpdate ) + { + ReloadMessagesL(); + SetFocusAfterReloading( focusState ); + } + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiTopicViewContainer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiTopicViewContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,605 @@ +/* +* Copyright (c) 2002-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: CCbsUiTopicViewContainer is container for CCbsUiTopicView. +* It has one control, a list box, which is showing information +* about messages in one topic. +* +* +*/ + + +// INCLUDES +#include // KAknsMessageSkinChange +#include // TMbmCbsuiapp +#include // CreateIconL, SkinInstance +#include // CAknContextPane +#include // AknLayoutUtils +#include // KEikDynamicLayoutVariantSwitch +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDC_RESOURCE_FILES_DIR +#include +#include "CbsUiId.h" +#include +#include "Cbsuiapp.hrh" +#include "CCbsUiTopicViewContainer.h" +#include "CCbsUiTopicView.h" +#include "CbsUiUtility.h" +#include "CbsUiPanic.h" +#include "CbsUiConstants.h" + + +// CONSTANTS +_LIT(KDirAndCbsUiAppMbmFile,"z:cbsuiapp.mbm"); +_LIT(KSeparator1, "1\t"); +_LIT(KSeparator2, "0\t"); +_LIT(KSeparator3, "\t2"); + +const TInt KNumberOfIconsInTopicViewcontainer = 6; + + +//DATA TYPES +enum TopicViewIconArrayIndexes + { + ECbsPropCbMsgUnread = 0, + ECbsPropCbMsg, + ECbsIndiCbKeptAdd + }; + + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiTopicViewContainer::CCbsUiTopicViewContainer( CCbsUiTopicView& aTopicView ) + : iTopicView( aTopicView ) + { + } + +// Symbian OS default constructor can leave. +void CCbsUiTopicViewContainer::ConstructL( const TRect& aRect ) + { + CreateWindowL(); + SetMopParent(&iTopicView); + + iListBox = new (ELeave) CAknSingleGraphicStyleListBox; + iListBox->SetContainerWindowL(*this); + iListBox->ConstructL(this, EEikListBoxMultipleSelection); + iListBox->CreateScrollBarFrameL( ETrue ); + iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, + CEikScrollBarFrame::EAuto ); + + CDesCArrayFlat* array = + new (ELeave) CDesCArrayFlat( KNumberOfTemporaryMessages ); + + // changing the owner, shouldn't leave + iListBox->Model()->SetItemTextArray(array); + iListBox->SetListBoxObserver( this ); + + SetRect(aRect); + LoadIconsL(); + } + +// Two-phased constructor. +CCbsUiTopicViewContainer* CCbsUiTopicViewContainer::NewL( CCbsUiTopicView& aTopicView, const TRect& aRect ) + { + CCbsUiTopicViewContainer* self = + new (ELeave) CCbsUiTopicViewContainer(aTopicView); + + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +// Destructor +CCbsUiTopicViewContainer::~CCbsUiTopicViewContainer() + { + delete iListBox; + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::ReloadStarts +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::ReloadStarts() const + { + MDesCArray* itemList = iListBox->Model()->ItemTextArray(); + CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList); + itemArray->Reset(); + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::ReloadOfferL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::ReloadOfferL( const TCbsMessage& aMessage, const TDesC& aBuffer ) const + { + MDesCArray* itemList = iListBox->Model()->ItemTextArray(); + CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList); + + TInt titleLength( (aBuffer.Length() > KMaxMessageTitleLength ) ? + KMaxMessageTitleLength : aBuffer.Length() ); + + HBufC* buffer = HBufC::NewMaxLC( titleLength + KSeparator1().Length() + KSeparator2().Length() + + KSeparator3().Length() ); + + TPtr ptr = buffer->Des(); + + // First column icon. + if ( aMessage.iRead ) + { + ptr = KSeparator1; + } + else + { + ptr = KSeparator2; + } + + for ( TInt index(0); index < titleLength; index++ ) + { + TChar character = aBuffer[index]; + + // if character is line break, then stop + if ( character == EKeyLineFeed + || character == EKeyEnter ) + { + break; + } + + ptr.Append( character ); + } + + // And finally saved icon. + if ( aMessage.iPermanent ) + { + ptr.Append(KSeparator3); + } + + // Finally append! + itemArray->AppendL(*buffer); + CleanupStack::PopAndDestroy(); // buffer + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::ReloadEndsL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::ReloadEndsL() + { + // Inform listbox that some items has been added. + iListBox->HandleItemAdditionL(); + // check if listbox has any item. if numberOfItems == 0 + // then disable scrollbars + if ( iListBox->Model()->NumberOfItems() == 0 ) + { + iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, + CEikScrollBarFrame::EOff ); + } + else + { + iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, + CEikScrollBarFrame::EAuto ); + } + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::CurrentPosition +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicViewContainer::CurrentPosition() const + { + return iListBox->CurrentItemIndex(); + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::SetCurrentItemIndex +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::SetCurrentItemIndex( TInt aItemIndex ) const + { + __ASSERT_DEBUG( aItemIndex >= 0, CbsUiPanic(EErrInvalidValue) ); + + MDesCArray* itemList = iListBox->Model()->ItemTextArray(); + CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList); + + TInt count( itemArray->MdcaCount() ); + + if ( count > aItemIndex && count >= 0 ) + { + iListBox->SetCurrentItemIndexAndDraw(aItemIndex); + } + } + +// ---------------------------------------------------- +// CCbsUiTopicViewContainer::HandleListBoxEventL +// +// ---------------------------------------------------- +void CCbsUiTopicViewContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/, + TListBoxEvent aEventType ) + { + switch ( aEventType ) + { + case EEventItemSingleClicked: + { + TKeyEvent keyEvent; + keyEvent.iCode = EKeyOK; + OfferKeyEventL( keyEvent, EEventKey ); + break; + } + default: + break; + } + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::GetListBox +// +// +// --------------------------------------------------------- +// +CEikColumnListBox* CCbsUiTopicViewContainer::GetListBox() + { + return iListBox; + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::CountComponentControls +// +// +// --------------------------------------------------------- +// +TInt CCbsUiTopicViewContainer::CountComponentControls() const + { + return 1; + } + +// --------------------------------------------------------- +// +// +// +// --------------------------------------------------------- +// +CCoeControl* CCbsUiTopicViewContainer::ComponentControl( TInt /*aIndex*/ ) const + { + return iListBox; + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::OfferKeyEventL +// +// +// --------------------------------------------------------- +// +TKeyResponse CCbsUiTopicViewContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ) + { + TKeyResponse result = EKeyWasNotConsumed; + + switch (aKeyEvent.iCode) + { + case EKeyLeftArrow: + { + if( AknLayoutUtils::LayoutMirrored() ) + { + // Go to next topic. + iTopicView.ProcessCommandL( ECbsUiappTopicViewCmdGoToNextTopic ); + } + else + { + // Go to previous topic. + iTopicView.ProcessCommandL( ECbsUiappTopicViewCmdGoToPrevTopic ); + } + result = EKeyWasConsumed; + break; + } + case EKeyRightArrow: + { + if( AknLayoutUtils::LayoutMirrored() ) + { + // Go to previous topic. + iTopicView.ProcessCommandL( ECbsUiappTopicViewCmdGoToPrevTopic ); + } + else + { + // Go to next topic. + iTopicView.ProcessCommandL( ECbsUiappTopicViewCmdGoToNextTopic ); + } + result = EKeyWasConsumed; + break; + } + case EKeyEnter: + case EKeyOK: + { + // to open a right message + iTopicView.MarkCurrentlyFocusedHandle(); + iTopicView.ProcessCommandL( ECbsUiappCmdTopicMenuRead ); + result = EKeyWasConsumed; + break; + } + case EKeyBackspace: + { + iTopicView.MarkCurrentlyFocusedHandle(); + iTopicView.ProcessCommandL( ECbsUiappCmdMessageDelete ); + result = EKeyWasConsumed; + break; + } + default: + { + result = iListBox->OfferKeyEventL( aKeyEvent, aType ); + break; + } + } + + return result; + } + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::SizeChanged +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::SizeChanged() + { + if (iListBox) + { + iListBox->SetRect( Rect() ); + } + } + + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::FocusChanged +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::FocusChanged( TDrawNow aDrawNow ) + { + CCoeControl::FocusChanged( aDrawNow ); + if( iListBox ) + { + iListBox->SetFocus( IsFocused(), aDrawNow ); + } + } + + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::GetHelpContext +// +// Gets the control's help context. +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::GetHelpContext( TCoeHelpContext& aContext ) const + { + aContext.iMajor = TUid::Uid(KUidCbsUiappDef); + aContext.iContext = KCBS_HLP_TOPIC_VIEW; + } + + +// ---------------------------------------------------- +// CCbsUiTopicViewContainer::HandleResourceChange +// +// +// ---------------------------------------------------- +void CCbsUiTopicViewContainer::HandleResourceChange( TInt aType ) + { + CCoeControl::HandleResourceChange( aType ); + + if( aType == KEikDynamicLayoutVariantSwitch ) + { + iTopicView.HandleRectChangeInContainer(); + } + + if( aType == KAknsMessageSkinChange ) + { + // change skin bitmap + TRAPD( ignore, SkinBitmapChangesL( ) ); + if( ignore ) + { + ignore = KErrNone; //This prevent only ARMV5 varnings!! + } + } + } + + + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::LoadIconsL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::LoadIconsL() + { + CAknIconArray* icons = new (ELeave) CAknIconArray(KNumberOfIconsInTopicViewcontainer); + CleanupStack::PushL(icons); + + TParse parse; + parse.Set(KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL); + TFileName mbmFileAndPathName(parse.FullName()); + + // First icon & mask. + AddIconL( KAknsIIDQgnPropCbMsgUnread, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_msg_unread, + EMbmCbsuiappQgn_prop_cb_msg_unread_mask ); + + // Second icon & mask. + AddIconL( KAknsIIDQgnPropCbMsg, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_msg, + EMbmCbsuiappQgn_prop_cb_msg_mask ); + + // Third icon & mask. + AddIconL( KAknsIIDQgnIndiCbKeptAdd, icons, mbmFileAndPathName, EMbmCbsuiappQgn_indi_cb_kept_add, + EMbmCbsuiappQgn_indi_cb_kept_add_mask, ETrue ); + + CleanupStack::Pop(); // icons + + iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons ); + } + + +// --------------------------------------------------------- +// CCbsUiTopicViewContainer::AddIconL +// +// +// --------------------------------------------------------- +// +void CCbsUiTopicViewContainer::AddIconL( + TAknsItemID aId, + CAknIconArray* aIcons, + const TDesC& aIconFileWithPath, + TInt aIconGraphicsIndex, + TInt aIconGraphicsMaskIndex, + TBool aColorIcon ) + { + // icon & mask. + MAknsSkinInstance* skins = AknsUtils::SkinInstance(); + + // COnstruct the icon and append it to icon array + CGulIcon* icon = ConstructIconL( aColorIcon, skins, aId, + aIconFileWithPath, aIconGraphicsIndex, aIconGraphicsMaskIndex ); + CleanupStack::PushL( icon ); + aIcons->AppendL( icon ); + CleanupStack::Pop( ); // icon + } + + + +// ---------------------------------------------------- +// CCbsUiTopicViewContainer::SkinBitmapChangesL +// ---------------------------------------------------- +void CCbsUiTopicViewContainer::SkinBitmapChangesL() + { + CArrayPtr *icons = 0; + icons = iListBox->ItemDrawer()->ColumnData()->IconArray(); + TAknsItemID id; + id.iMajor = 0; + id.iMinor = 0; + TInt count = icons->Count(); + TInt bitmapIndex = 0; + TInt bitmapMaskIndex = 0; + + //change list icons + MAknsSkinInstance* skins = AknsUtils::SkinInstance(); + for ( TInt cc=count; --cc>=0; ) + { + switch( cc ) + { + case ECbsPropCbMsgUnread: + bitmapIndex = EMbmCbsuiappQgn_prop_cb_msg_unread; + bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_msg_unread_mask; + id = KAknsIIDQgnPropCbMsgUnread; + break; + case ECbsPropCbMsg: + bitmapIndex = EMbmCbsuiappQgn_prop_cb_msg; + bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_msg_mask; + id = KAknsIIDQgnPropCbMsg; + break; + case ECbsIndiCbKeptAdd: + bitmapIndex = EMbmCbsuiappQgn_indi_cb_kept_add; + bitmapMaskIndex = EMbmCbsuiappQgn_indi_cb_kept_add_mask; + id = KAknsIIDQgnIndiCbKeptAdd; + break; + default: + bitmapIndex = EMbmCbsuiappQgn_prop_cb_msg_unread; + bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_msg_unread_mask; + id = KAknsIIDQgnPropCbMsgUnread; + break; + } + + CFbsBitmap* bitmap; + CFbsBitmap* mask; + TParse parse; + parse.Set(KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL); + TFileName mbmFileAndPathName(parse.FullName()); + AknsUtils::CreateIconL( skins, id, bitmap, + mask, mbmFileAndPathName, bitmapIndex, bitmapMaskIndex ); + + CGulIcon* icon = CGulIcon::NewL( bitmap, mask ); + + CleanupStack::PushL( icon ); + CGulIcon* iconToBeDelete = icons->At( cc ); + icons->At( cc ) = icon; + delete iconToBeDelete; + iconToBeDelete = NULL; + + CleanupStack::Pop(); // icon + + } + } + + +// ---------------------------------------------------- +// CCbsUiTopicViewContainer::ConstructIconL +// ---------------------------------------------------- +CGulIcon* CCbsUiTopicViewContainer::ConstructIconL( + TBool& aColourIcon, + MAknsSkinInstance* aSkins, + const TAknsItemID& aID, + const TDesC& aFilename, + const TInt aFileBitmapId, + const TInt aFileMaskId ) + { + // icon & mask + CFbsBitmap* bitmap; + CFbsBitmap* mask; + + if ( aColourIcon ) + { + AknsUtils::CreateColorIconL( + aSkins, + aID, + KAknsIIDQsnIconColors, + EAknsCIQsnIconColorsCG13, // Check the used color group - this is usually correct group for D-column stuff + bitmap, + mask, + aFilename, + aFileBitmapId, + aFileMaskId , + KRgbBlack ); // This is default color used, if the color skinning fails, or there is no color defined. + } + else + { + AknsUtils::CreateIconL( aSkins, aID, bitmap, + mask, aFilename, aFileBitmapId, + aFileMaskId ); + } + + CGulIcon* icon = CGulIcon::NewL( bitmap, mask ); + return icon; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiappAppUi.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiappAppUi.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,212 @@ +/* +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Implements the User Interface class. +* +* +*/ + + +// INCLUDES +#include // KFeatureIdBtSap +#include // RProperty +#include // Property values +#include // FeatureManager +#include // KAknsMessageSkinChange +#include // CreateIconL, SkinInstance +#include // TMbmCbsuiapp +#include +#include // ELongTimeout +#include +#include +#include +#include // KPSUidBluetoothSapConnectionState, KBTSapConnectionState +#include // KDC_RESOURCE_FILES_DIR +#include // R_QTN_OFFLINE_NOT_POSSIBLE_SAP +#include "CCbsUiappAppUi.h" +#include "CCbsUiTopicListMonitor.h" +#include "CbsUiPanic.h" +#include "CCbsUiViewFactory.h" +#include "MCbs.h" + + +// CONSTANTS +_LIT(KDirAndCbsUiAppMbmFile,"z:cbsuiapp.mbm"); + + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. + +CCbsUiappAppUi::CCbsUiappAppUi( MCbs& aServer ) : iServer( aServer ) + { + } + +// Destructor +CCbsUiappAppUi::~CCbsUiappAppUi() + { + delete iTopicListMonitor; + FeatureManager::UnInitializeLib(); + } + +// ---------------------------------------------------- +// CCbsUiappAppUi::HandleResourceChangeL +// +// +// ---------------------------------------------------- +void CCbsUiappAppUi::HandleResourceChangeL( TInt aType ) + { + CAknViewAppUi::HandleResourceChangeL( aType ); + + if( aType == KAknsMessageSkinChange ) + { + // change application icon dynamically + TBool reception; + CEikStatusPane *sp = ( (CAknAppUi*)CEikonEnv::Static()->EikAppUi() )->StatusPane(); + CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, sp-> + ControlL( TUid::Uid(EEikStatusPaneUidTitle) )); + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + iServer.GetReceptionStatus( reception ); + + TParse parse; + parse.Set( KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL ); + TFileName mbmFileAndPathName(parse.FullName()); + + if (reception) + { + + CFbsBitmap* bmp = NULL; + CFbsBitmap* maskbmp = NULL; +#ifdef __SCALABLE_ICONS + AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCbCxt, bmp, + maskbmp, mbmFileAndPathName, EMbmCbsuiappQgn_menu_cb, + EMbmCbsuiappQgn_menu_cb_mask ); +#else + AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCbCxt, bmp, + maskbmp, mbmFileAndPathName, EMbmCbsuiappQgn_menu_cb_cxt, + EMbmCbsuiappQgn_menu_cb_cxt_mask ); +#endif //__SCALABLE_ICONS + title->SetSmallPicture(bmp, maskbmp, ETrue); + } + else + { + CFbsBitmap* bmp = NULL; + CFbsBitmap* maskbmp = NULL; +#ifdef __SCALABLE_ICONS + AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCb2Cxt, bmp, + maskbmp, mbmFileAndPathName, EMbmCbsuiappQgn_menu_cb_2, + EMbmCbsuiappQgn_menu_cb_2_mask); +#else + AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCb2Cxt, bmp, + maskbmp, mbmFileAndPathName, EMbmCbsuiappQgn_menu_cb_2_cxt, + EMbmCbsuiappQgn_menu_cb_2_cxt_mask); +#endif //__SCALABLE_ICONS + title->SetSmallPicture(bmp, maskbmp, ETrue); + } + } + } + + + +// Symbian OS default constructor can leave. +void CCbsUiappAppUi::ConstructL() + { + BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible ); + + FeatureManager::InitializeLibL(); + if ( FeatureManager::FeatureSupported( KFeatureIdBtSap ) ) + { + TInt simStatus; + simStatus = CheckSimStateL(); + if ( EBTSapNotConnected != simStatus ) + { + HBufC* text = iCoeEnv->AllocReadResourceLC( R_QTN_OFFLINE_NOT_POSSIBLE_SAP ); + CAknInformationNote* note = new( ELeave ) CAknInformationNote( ETrue ); + note->SetTimeout( CAknNoteDialog::ELongTimeout ); + note->ExecuteLD( *text ); + CleanupStack::PopAndDestroy( ); //text + User::Leave( KErrGeneral ); + } + } + + __ASSERT_DEBUG( &iServer, CbsUiPanic(EServerCreationFailedError) ); + __ASSERT_DEBUG( iServer.Connected(), CbsUiPanic(EErrServerDisconnected) ); + + iTopicListMonitor = CCbsUiTopicListMonitor::NewL(iServer); + + CCbsUiViewFactory* viewFactory = new (ELeave) CCbsUiViewFactory( + iServer, *iTopicListMonitor); + CleanupStack::PushL(viewFactory); + + AddViewL( viewFactory->CreateTopicListViewLC() ); + CleanupStack::Pop(); // view + + AddViewL( viewFactory->CreateTopicViewLC() ); + CleanupStack::Pop(); // view + + AddViewL( viewFactory->CreateMsgViewLC() ); + CleanupStack::Pop(); // view + + AddViewL( viewFactory->CreateSettingsViewLC() ); + CleanupStack::Pop(); // view + + CleanupStack::PopAndDestroy(); // viewFactory + } + +// --------------------------------------------------------- +// CCbsUiappAppUi::HandleCommandL +// +// +// --------------------------------------------------------- +// +void CCbsUiappAppUi::HandleCommandL( TInt aCommand ) + { + switch ( aCommand ) + { + case EAknCmdHelp: + { + HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppHelpContextL()); + break; + } + case EAknCmdExit: + case EEikCmdExit: + Exit(); + break; + default: + break; + } + } + + +// --------------------------------------------------------- +// CCbsUiappAppUi::CheckSimStateL +// +// +// --------------------------------------------------------- +TInt CCbsUiappAppUi::CheckSimStateL() + { + TInt btSapState( EBTSapNotConnected ); + TInt err = RProperty::Get( KPSUidBluetoothSapConnectionState, + KBTSapConnectionState, + btSapState ); + if ( err ) + { + btSapState = EBTSapNotConnected; + } + return btSapState; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiappApplication.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiappApplication.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,74 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Implements the application class. +* +* +*/ + + +// INCLUDES +#include +#include "CCbsUiappApplication.h" +#include "CCbsUiappDocument.h" +#include "CbsUiId.h" + + + +// CONSTANTS +static const TUid KUidCbsUiappApp = { KUidCbsUiappDef }; + + + + +// ================= MEMBER FUNCTIONS ======================= + + +// --------------------------------------------------------- +// CCbsUiappApplication::AppDllUid +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +TUid CCbsUiappApplication::AppDllUid() const + { + return KUidCbsUiappApp; + } + +// --------------------------------------------------------- +// CCbsUiappApplication::CreateDocumentL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +CApaDocument* CCbsUiappApplication::CreateDocumentL() + { + return CCbsUiappDocument::NewL(*this); + } + +// ================= OTHER EXPORTED FUNCTIONS ============== + + +LOCAL_C CApaApplication* NewApplication() + { + return new CCbsUiappApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CCbsUiappDocument.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CCbsUiappDocument.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2002 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: Implementation of the CCbsUiappDocument class. +* +* +*/ + + + +// INCLUDES +#include +#include "CCbsUiappDocument.h" +#include "CCbsUiappAppUi.h" +#include "RCbsUi.h" + + + +// ================= MEMBER FUNCTIONS ======================= +// + +CCbsUiappDocument::CCbsUiappDocument( CEikApplication& aApp ) : + CEikDocument(aApp) + { + } + +void CCbsUiappDocument::ConstructL() + { + iServer = new (ELeave) RCbsUi; + // Create connection to the server. + User::LeaveIfError( iServer->Connect() ); + } + +CCbsUiappDocument* CCbsUiappDocument::NewL( CEikApplication& aApp ) + { + CCbsUiappDocument* self = new( ELeave ) CCbsUiappDocument( aApp ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); // self + return self; + } + +CCbsUiappDocument::~CCbsUiappDocument() + { + delete iServer; + } + +CEikAppUi* CCbsUiappDocument::CreateAppUiL() + { + return new (ELeave) CCbsUiappAppUi( *iServer ); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CbsUiPanic.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CbsUiPanic.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2002 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: +* Implementation of CbsUiPanic +* +* +*/ + + +// INCLUDES +#include +#include "CbsUiPanic.h" + + +// CONSTANTS +_LIT( KCbsUiName, "CbsUiApp" ); + + + +// ================= OTHER EXPORTED FUNCTIONS ============== + +// +// --------------------------------------------------------- +// CbsUiPanic +// +// +GLDEF_C void CbsUiPanic( TCbsUiPanic aPanic ) + { + User::Panic( KCbsUiName, aPanic ); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/CbsUiUtility.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/CbsUiUtility.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,171 @@ +/* +* Copyright (c) 2002 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: +* Implementation of CbsUiClenaupHandler +* +* +*/ + + +// INCLUDES +#include +#include +#include +#include +#include +#include +#include +#include "CbsUiUtility.h" +#include "CbsUiPanic.h" +#include "MSaveMessageController.h" +#include "CbsUiDebug.h" +#include "MCbs.h" + + + +// =================== MEMBER FUNCTIONS ==================== + + +// --------------------------------------------------------- +// CbsUiUtility::ShowConfirmationNoteL +// +// +// --------------------------------------------------------- +// +void CbsUiUtility::ShowConfirmationNoteL( + const TInt aResourceId, TBool aWaitingDialog ) + { + HBufC* text = CCoeEnv::Static()->AllocReadResourceLC(aResourceId); + CAknConfirmationNote* note = + new (ELeave) CAknConfirmationNote(aWaitingDialog); + note->ExecuteLD(*text); + CleanupStack::PopAndDestroy(text); + } + +// --------------------------------------------------------- +// CbsUiUtility::ShowErrorNoteL +// +// +// --------------------------------------------------------- +// +void CbsUiUtility::ShowErrorNoteL( const TInt aResourceId ) + { + HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId ); + CAknErrorNote* note = new (ELeave) CAknErrorNote; + note->ExecuteLD( *text ); + CleanupStack::PopAndDestroy( text ); + } + +// --------------------------------------------------------- +// CbsUiUtility::ShowWarningNoteL +// +// +// --------------------------------------------------------- +// +void CbsUiUtility::ShowWarningNoteL( const TInt aResourceId ) + { + HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId ); + CAknWarningNote* note = new (ELeave) CAknWarningNote; + note->ExecuteLD( *text ); + CleanupStack::PopAndDestroy( text ); + } + +// --------------------------------------------------------- +// CbsUiUtility::CreateEmptyNavigationPaneL +// +// +// --------------------------------------------------------- +// +CAknNavigationDecorator* CbsUiUtility::CreateEmptyNavigationPaneL() + { + CEikStatusPane* statusPane = + STATIC_CAST( CAknAppUi*, + CEikonEnv::Static()->EikAppUi() )->StatusPane(); + + CAknNavigationControlContainer* naviContainer = + STATIC_CAST( CAknNavigationControlContainer*, statusPane-> + ControlL(TUid::Uid(EEikStatusPaneUidNavi)) ); + + CAknNavigationDecorator* decorator; + decorator = naviContainer->CreateNavigationLabelL(); + + naviContainer->PushL(*decorator); + + return decorator; + } + +// --------------------------------------------------------- +// CbsUiUtility::IsSavedL +// +// +// --------------------------------------------------------- +// +TBool CbsUiUtility::IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer ) + { + __ASSERT_DEBUG(&aServer, CbsUiPanic(EErrNullPointer) ); + __ASSERT_DEBUG(aServer.Connected(), CbsUiPanic(EErrServerDisconnected) ); + + TCbsMessage message; + + TInt ret = aServer.FindMessageByHandle(aHandle, message); + + __CBSUI_ASSERT( ret == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) ); + + User::LeaveIfError(ret); + TBool saved(EFalse); + + if ( message.iPermanent ) + { + saved = ETrue; + } + + return saved; + } + +// --------------------------------------------------------- +// CbsUiUtility::SaveCurrentMessageL +// +// +// --------------------------------------------------------- +// +TInt CbsUiUtility::SaveCurrentMessageL( + const TCbsMessageHandle aHandle, MSaveMessageController& aSaver ) + { + __ASSERT_DEBUG(&aSaver, CbsUiPanic(EErrNullPointer) ); + + TInt resultCode( aSaver.SaveMessage(aHandle) ); + + switch ( resultCode ) + { + case KErrDiskFull: + { + User::Leave( KErrDiskFull ); + break; + } + case KErrNone: // Normal case + { + // do nothing + break; + } + default: + { + CbsUiUtility::ShowErrorNoteL(R_TEXT_NOTE_MEMORY_FULL_ERROR); + break; + } + } + + return resultCode; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/RCbsUi.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/RCbsUi.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,310 @@ +/* +* Copyright (c) 2002 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: +* RCbsUi calls directly real cbs client, which handles +* the actual calls to server. +* +*/ + + +// INCLUDES +#include "RCbsUi.h" +#include + + +// ================= MEMBER FUNCTIONS ======================= + +RCbsUi::RCbsUi() + { + } + +RCbsUi::~RCbsUi() + { + } + +TInt RCbsUi::Connect() + { + return iServer.Connect(); + } + +void RCbsUi::Close() + { + iServer.Close(); + } + +TVersion RCbsUi::Version() const + { + return iServer.Version(); + } + +// Settings-related methods +void RCbsUi::GetReceptionStatus( + TBool& aStatus ) + { + iServer.GetReceptionStatus( aStatus ); + } + +TInt RCbsUi::SetReceptionStatus( + TBool aStatus ) + { + return iServer.SetReceptionStatus( aStatus ); + } + +void RCbsUi::GetTopicDetectionStatus( + TBool& aStatus ) + { + iServer.GetTopicDetectionStatus( aStatus ); + } + +TInt RCbsUi::SetTopicDetectionStatus( + TBool aStatus ) + { + return iServer.SetTopicDetectionStatus(aStatus); + } + +void RCbsUi::GetLanguages( + TCbsSettingsLanguages& aLanguages ) + { + iServer.GetLanguages(aLanguages); + } + +TInt RCbsUi::SetLanguages( + const TCbsSettingsLanguages& aLanguages ) + { + return iServer.SetLanguages(aLanguages); + } + +void RCbsUi::NotifySettingsChanged( + TRequestStatus& aStatus, + TCbsSettingsEvent& aEvent ) + { + iServer.NotifySettingsChanged( aStatus, aEvent ); + } + +void RCbsUi::NotifySettingsChangedCancel() + { + iServer.NotifySettingsChangedCancel(); + } + +// Topic Collection -related methods +void RCbsUi::StartCollectionBrowsing() + { + iServer.StartCollectionBrowsing(); + } + +TBool RCbsUi::HasNextCollectionTopic() + { + return iServer.HasNextCollectionTopic(); + } + +TInt RCbsUi::NextCollectionTopic( + TCbsTopicInfo& aInfo ) + { + return iServer.NextCollectionTopic(aInfo); + } + +// Topic List-related methods +void RCbsUi::GetTopicCount( + TInt& aCount ) + { + iServer.GetTopicCount(aCount); + } + +TInt RCbsUi::GetTopic( + const TInt aIndex, + TCbsTopic& aTopic ) + { + return iServer.GetTopic(aIndex, aTopic); + } + +TInt RCbsUi::FindTopicByNumber( + TCbsTopicNumber aNumber, + TCbsTopic& aTopic ) + { + return iServer.FindTopicByNumber( aNumber, aTopic ); + } + +TInt RCbsUi::DeleteTopic( + TCbsTopicNumber aNumber ) + { + return iServer.DeleteTopic(aNumber); + } + +TInt RCbsUi::DeleteAllTopics() + { + return iServer.DeleteAllTopics(); + } + +TInt RCbsUi::AddTopic( + TCbsTopic& aTopic ) + { + return iServer.AddTopic(aTopic); + } + +TInt RCbsUi::ChangeTopicNameAndNumber( + TCbsTopicNumber aOldNumber, + TCbsTopicNumber aNewNumber, + const TCbsTopicName& aName ) + { + return iServer.ChangeTopicNameAndNumber(aOldNumber, aNewNumber, aName); + } + +TInt RCbsUi::ChangeTopicSubscriptionStatus( + TCbsTopicNumber aNumber, + TBool aNewStatus ) + { + return iServer.ChangeTopicSubscriptionStatus( aNumber, aNewStatus ); + } + +TInt RCbsUi::ChangeTopicHotmarkStatus( + TCbsTopicNumber aNumber, + TBool aNewStatus ) + { + return iServer.ChangeTopicHotmarkStatus( aNumber, aNewStatus ); + } + +void RCbsUi::NotifyOnTopicListEvent( + TRequestStatus& aStatus, + const TInt aRequested, + TCbsTopicListEvent& aEvent, + TCbsTopicNumber& aNumber ) + { + iServer.NotifyOnTopicListEvent(aStatus, aRequested, aEvent, aNumber); + } + +void RCbsUi::NotifyOnTopicListEventCancel() + { + iServer.NotifyOnTopicListEventCancel(); + } + +TInt RCbsUi::GetNewTopicsCount( + TInt& aCount ) + { + return iServer.GetNewTopicsCount(aCount); + } + +TInt RCbsUi::GetLatestTopicNumber( TCbsTopicNumber& aNumber ) + { + return iServer.GetLatestTopicNumber(aNumber); + } + +void RCbsUi::GetUnreadMessageCount( + TInt& aCount ) + { + iServer.GetUnreadMessageCount(aCount); + } + +void RCbsUi::GetHotmarkedMessageHandle( + TCbsMessageHandle& aMessage ) + { + iServer.GetHotmarkedMessageHandle(aMessage); + } + +TInt RCbsUi::NumberOfUnreadHotmarkedMessages() + { + return iServer.NumberOfUnreadHotmarkedMessages(); + } + +TInt RCbsUi::GetNextAndPrevTopicNumber( + const TCbsTopicNumber& aCurrentTopicNumber, + TCbsTopicNumber& aPrevTopicNumber, + TCbsTopicNumber& aNextTopicNumber, + TInt& aPosition ) + { + return iServer.GetNextAndPrevTopicNumber( + aCurrentTopicNumber, aPrevTopicNumber, aNextTopicNumber, aPosition); + } + + +// Topic Messages-related methods +TInt RCbsUi::GetMessageCount( + TCbsTopicNumber aNumber, + TInt& aCount ) + { + return iServer.GetMessageCount(aNumber, aCount); + } + +TInt RCbsUi::GetMessage( + TCbsTopicNumber aNumber, + TInt aIndex, + TCbsMessage& aMessage ) + { + return iServer.GetMessage(aNumber, aIndex, aMessage); + } + +TInt RCbsUi::FindMessageByHandle( + const TCbsMessageHandle& aHandle, + TCbsMessage& aMessage ) + { + return iServer.FindMessageByHandle(aHandle, aMessage); + } + +TInt RCbsUi::GetMessageIndexByHandle( + const TCbsMessageHandle& aHandle, TInt& aIndex ) + { + return iServer.GetMessageIndexByHandle(aHandle, aIndex); + } + +TInt RCbsUi::DeleteMessage( + const TCbsMessageHandle& aHandle ) + { + return iServer.DeleteMessage(aHandle); + } + +TInt RCbsUi::SaveMessage( + const TCbsMessageHandle& aHandle ) + { + return iServer.SaveMessage(aHandle); + } + +TInt RCbsUi::LockMessage( + const TCbsMessageHandle& aHandle ) + { + return iServer.LockMessage(aHandle); + } + +TInt RCbsUi::ReadMessage( + const TCbsMessageHandle& aHandle ) + { + return iServer.ReadMessage(aHandle); + } + +TInt RCbsUi::GetMessageContents( + const TCbsMessageHandle& aHandle, + TDes& aBuffer ) + { + return iServer.GetMessageContents(aHandle, aBuffer); + } + +TInt RCbsUi::GetNextAndPrevMessageHandle( + const TCbsMessageHandle& aCurrentMsgHandle, + TCbsMessageHandle& aPrevMsgHandle, + TCbsMessageHandle& aNextMsgHandle, + TInt& aPosition ) + { + return iServer.GetNextAndPrevMessageHandle( + aCurrentMsgHandle, aPrevMsgHandle, aNextMsgHandle, aPosition); + } + +TBool RCbsUi::Connected() const + { + return iServer.Connected(); + } + +void RCbsUi::Shutdown() const + { + iServer.Shutdown(); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/ccbsuisettingsviewcontainer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/ccbsuisettingsviewcontainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,683 @@ +/* +* Copyright (c) 2002-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: +* Implementation of CCbsUiSettingsViewContainer. +* +* +*/ + + +// INCLUDES +#include // For feature flags +#include // FeatureManager +#include // CAknErrorNote +#include +#include +#include +#include +#include +#include // CRepository +#include // KCRUidCoreApplicationUIs, TCoreAppUIsNetworkConnectionAllowed +#include "CbsUiId.h" +#include +#include // KEikDynamicLayoutVariantSwitch +#include "MCbs.h" +#include "ccbsuisettingsviewcontainer.h" +#include "CCbsUiSettingsView.h" +#include "CbsUiConstants.h" +#include "CCbsUiLanguageSettingPage.h" +#include "CbsUiPanic.h" + + + +// CONSTANTS + +// exact number of items in selection list +const TInt KNumberOfItemsInSelectionPage = 3; + +// There should be only one item in the list box before, which +// is reception. +const TInt KPreciseNumberOfItemsBeforeLanguage = 1; +const TInt KNumberOfOnOfItems = 2; + + + + +// MODULE DATA STRUCTURES +enum TCbsUiSettingValues { EReception, ELanguage, ETopicDetection }; + +// to select right item in setting_items_with_two_available_values +enum TCbsUiSettingOnOff + { + ESettingOn = 0, + ESettingOff + }; + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiSettingsViewContainer::CCbsUiSettingsViewContainer( + CCbsUiSettingsView& aView, + MCbs& aServer ) + : iView( aView ), iServer( aServer ) + { + } + +// Symbian OS default constructor can leave. +void CCbsUiSettingsViewContainer::ConstructL( const TRect& aRect ) + { + CreateWindowL(); + SetMopParent(&iView); + CreateListBoxL(); + SetRect( aRect ); + + // Prepare FeatureManager, read values to members and uninitialize FeatureManager + FeatureManager::InitializeLibL(); + iOfflineFeatureSupported = FeatureManager::FeatureSupported( KFeatureIdOfflineMode ); + } + +// Two-phased constructor. +CCbsUiSettingsViewContainer* CCbsUiSettingsViewContainer::NewL( + CCbsUiSettingsView& aView, + const TRect& aRect, + MCbs& aServer ) + { + CCbsUiSettingsViewContainer* self = + new (ELeave) CCbsUiSettingsViewContainer(aView, aServer); + + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + + return self; + } + +// Destructor +CCbsUiSettingsViewContainer::~CCbsUiSettingsViewContainer() + { + delete iListBox; + FeatureManager::UnInitializeLib(); + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::CountComponentControls +// +// +// --------------------------------------------------------- +// +TInt CCbsUiSettingsViewContainer::CountComponentControls() const + { + return 1; + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::ComponentControl +// +// +// --------------------------------------------------------- +// +CCoeControl* CCbsUiSettingsViewContainer::ComponentControl( TInt aIndex ) const + { + CCoeControl* control = NULL; + + switch ( aIndex ) + { + case 0: + control = iListBox; + break; + default: + break; + } + + return control; + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::OfferKeyEventL +// +// +// --------------------------------------------------------- +// +TKeyResponse CCbsUiSettingsViewContainer::OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + return iListBox->OfferKeyEventL( aKeyEvent, aType ); + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::SizeChanged +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::SizeChanged() + { + iListBox->SetRect( Rect() ); + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::FocusChanged +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::FocusChanged( TDrawNow aDrawNow ) + { + CCoeControl::FocusChanged( aDrawNow ); + if( iListBox ) + { + iListBox->SetFocus( IsFocused(), aDrawNow ); + } + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::CreateListBoxL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::CreateListBoxL() + { + iListBox = new (ELeave) CAknSettingStyleListBox; + iListBox->SetContainerWindowL( *this ); + iListBox->ConstructL( this, EAknListBoxSelectionListWithShortcuts ); + iListBox->SetListBoxObserver( this ); + iListBox->CreateScrollBarFrameL( ETrue ); + iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, + CEikScrollBarFrame::EAuto ); + GetSettingsL(); + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::GetSettingsL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::GetSettingsL() + { + __ASSERT_DEBUG( iListBox, CbsUiPanic(EListBoxNullError) ); + + MDesCArray* itemList = + STATIC_CAST(CEikFormattedCellListBox*, + iListBox)->Model()->ItemTextArray(); + + CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList); + + itemArray->Reset(); + + TBool status; + iServer.GetReceptionStatus(status); + + TInt resourceId(R_TEXT_RECEPTION_ON); + + if ( !status ) + { + resourceId = R_TEXT_RECEPTION_OFF; + } + + HBufC* reception = iCoeEnv->AllocReadResourceLC(resourceId); + itemArray->AppendL(*reception); + CleanupStack::PopAndDestroy(); // reception + + // This must be here, don't move; otherwise order + // is different in the list box. + SetLanguageSelectionL(*itemArray); + + iServer.GetTopicDetectionStatus(status); + resourceId = R_TEXT_DETECTION_ON; + + if ( !status ) + { + resourceId = R_TEXT_DETECTION_OFF; + } + + HBufC* detection = iCoeEnv->AllocReadResourceLC(resourceId); + + itemArray->AppendL(*detection); + CleanupStack::PopAndDestroy(); // detection + + iListBox->HandleItemAdditionL(); + + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::PrepareLanguageSettingPageL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::PrepareLanguageSettingPageL() + { + + CDesCArrayFlat* items = + new (ELeave) CDesCArrayFlat(KNumberOfItemsInSelectionPage); + CleanupStack::PushL(items); + + AddItemsToListL( + R_CBS_LANGUAGE_SETTING_PAGE_ARRAY, *items); + + TInt selected( GetSelected() ); + + LaunchLanguageSettingPageL(*items, selected); + + CleanupStack::PopAndDestroy(); // items + + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::GetSelected +// +// +// --------------------------------------------------------- +// +TCbsUiLanguageSelectionIndex CCbsUiSettingsViewContainer::GetSelected() + { + TCbsDbLanguages dbLanguages; + iServer.GetLanguages(dbLanguages); + + TCbsUiLanguageSelectionIndex result(ECbsUiSelected); + + if ( dbLanguages.iLanguages[ECbsAll] ) + { + result = ECbsUiAll; + } + else if ( dbLanguages.iLanguages[ECbsOther] ) + { + result = ECbsUiOther; + } + else + { + result = ECbsUiSelected; + } + + return result; + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::LaunchLanguageSettingPageL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::LaunchLanguageSettingPageL( + CDesCArrayFlat& aItems, TInt& aCurrentSelectionIndex ) + { + __ASSERT_DEBUG( + aCurrentSelectionIndex >= ECbsUiAll && + aCurrentSelectionIndex <= ECbsUiOther, + CbsUiPanic(EErrIndexOutOfBounds) ); + __ASSERT_DEBUG( aItems.Count() == 3, CbsUiPanic(EErrInvalidValue) ); + + CCbsUiLanguageSettingPage* languagePage = + new (ELeave) CCbsUiLanguageSettingPage( + R_LANGUAGE_SETTING_PAGE, aCurrentSelectionIndex, + &aItems, iServer); + + languagePage->ExecuteLD(CAknSettingPage::EUpdateWhenChanged); + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::AddItemsToListL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::AddItemsToListL( + TInt aResourceId, + CDesCArrayFlat& aItemList ) const + { + __ASSERT_DEBUG(aResourceId >= 0, CbsUiPanic(EErrInvalidValue) ); + __ASSERT_DEBUG( aItemList.MdcaCount() == 0, CbsUiPanic(EErrInvalidValue) ); + + TResourceReader reader; + iCoeEnv->CreateResourceReaderLC(reader, aResourceId); + TInt count( reader.ReadInt16() ); + + for ( TInt i(0); i < count; i++ ) + { + HBufC* selectableItem = reader.ReadHBufCL(); + + CleanupStack::PushL(selectableItem); + aItemList.AppendL(*selectableItem); + CleanupStack::PopAndDestroy(); // selectableItem + } + + CleanupStack::PopAndDestroy(); // reader + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::HandleListViewActionL +// +// +// --------------------------------------------------------- +// +TKeyResponse CCbsUiSettingsViewContainer::HandleListViewActionL( + const CEikListBox* aListBox, TBool aLaunchedFromOptionMenu ) + { + __ASSERT_DEBUG( aListBox, CbsUiPanic(EErrNullPointer) ); + + switch ( aListBox->CurrentItemIndex() ) + { + case EReception: + { + if ( IsPhoneOfflineL() ) + { + // If is in offline mode, don't set reception on or off(Only error note) + HBufC* text = iCoeEnv->AllocReadResourceLC( R_QTN_OFFLINE_NOT_POSSIBLE ); + CAknErrorNote* note = new (ELeave) CAknErrorNote( ETrue ); + note->ExecuteLD( *text ); + CleanupStack::PopAndDestroy( ); //text + } + else + { + TBool reception; + TBool update(ETrue); // if value need to be updated + iServer.GetReceptionStatus(reception); + if ( aLaunchedFromOptionMenu ) + { + LaunchDialogOnOffL(reception, update, R_TEXT_RECEPTION); + } + if ( update ) + { + if ( !reception ) + { + // Reception is off. -> Set reception On + User::LeaveIfError( iServer.SetReceptionStatus( ETrue ) ); + } + else + { + // Reception is On. -> Set reception Off + User::LeaveIfError( iServer.SetReceptionStatus( EFalse ) ); + } + } + } + break; + } + case ELanguage: + { + PrepareLanguageSettingPageL(); + break; + } + case ETopicDetection: + { + TBool detection; + TBool update(ETrue); + + iServer.GetTopicDetectionStatus(detection); + + if ( aLaunchedFromOptionMenu ) + { + LaunchTopicDetectionDialogOnOffL(detection, update, R_TEXT_TOPIC_DETECTION); + } + + if ( update ) + { + User::LeaveIfError( iServer.SetTopicDetectionStatus(!detection) ); + } + break; + } + default: + break; + } + + GetSettingsL(); + + return EKeyWasConsumed; + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::LaunchDialogOnOffL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::LaunchDialogOnOffL( + const TBool& aValue, TBool& aUpdate, TInt aResourceId ) const + { + TInt selected( aValue ? ESettingOn : ESettingOff ); + + CDesCArrayFlat* items = + new (ELeave) CDesCArrayFlat(KNumberOfOnOfItems); + CleanupStack::PushL(items); + + AddItemsToListL(R_CBS_ON_OFF_ARRAY, *items); + + HBufC* settingText = iCoeEnv->AllocReadResourceL(aResourceId); + CleanupStack::PushL(settingText); + + CAknRadioButtonSettingPage* dlg = + new (ELeave) CAknRadioButtonSettingPage( + R_ON_OFF_SETTING_PAGE, selected, items); + + CleanupStack::PushL(dlg); + dlg->SetSettingTextL(*settingText); + CleanupStack::Pop(); // dlg + + dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged); + + CleanupStack::PopAndDestroy(); // settingText + + TBool valueNotChanged( + selected == (aValue ? ESettingOn : ESettingOff) ); + if ( valueNotChanged ) + { + aUpdate = EFalse; + } + + CleanupStack::PopAndDestroy(); // items + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::LaunchTopicDetectionDialogOnOffL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::LaunchTopicDetectionDialogOnOffL( + const TBool& aValue, TBool& aUpdate, TInt aResourceId ) const + { + TInt selected( aValue ? ESettingOn : ESettingOff ); + + CDesCArrayFlat* items = + new (ELeave) CDesCArrayFlat(KNumberOfOnOfItems); + CleanupStack::PushL(items); + + AddItemsToListL(R_CBS_TOPIC_DETECTION_ON_OFF_ARRAY, *items); + + HBufC* settingText = iCoeEnv->AllocReadResourceL(aResourceId); + CleanupStack::PushL(settingText); + + CAknRadioButtonSettingPage* dlg = + new (ELeave) CAknRadioButtonSettingPage( + R_ON_OFF_SETTING_PAGE, selected, items); + + CleanupStack::PushL(dlg); + dlg->SetSettingTextL(*settingText); + CleanupStack::Pop(); // dlg + + dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged); + + CleanupStack::PopAndDestroy(); // settingText + + TBool valueNotChanged( + selected == (aValue ? ESettingOn : ESettingOff) ); + if ( valueNotChanged ) + { + aUpdate = EFalse; + } + + CleanupStack::PopAndDestroy(); // items + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::HandleListViewActiontL +// +// +// --------------------------------------------------------- +// +TKeyResponse CCbsUiSettingsViewContainer::HandleListViewActionL( + TBool aLaunchedFromOptionMenu ) + { + if ( iListBox ) + { + return HandleListViewActionL(iListBox, aLaunchedFromOptionMenu); + } + return EKeyWasNotConsumed; + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::UpdateSettingsL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::UpdateSettingsL() + { + GetSettingsL(); + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::SetFocusToFirstItem +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::SetFocusToFirstItem() const + { + __ASSERT_DEBUG( iListBox, CbsUiPanic(EErrNullPointer) ); + iListBox->SetCurrentItemIndexAndDraw(0); + } + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::HandleListBoxEventL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::HandleListBoxEventL( + CEikListBox* aListBox, + TListBoxEvent aEventType ) + { + if ( EEventEnterKeyPressed == aEventType + || EEventItemSingleClicked == aEventType ) + { + HandleListViewActionL(aListBox, EFalse); + } + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::SetLanguageSelectionL +// +// +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::SetLanguageSelectionL( + CDesCArray& aItemArray ) + { + TInt count( aItemArray.MdcaCount() ); + + __ASSERT_ALWAYS( count == KPreciseNumberOfItemsBeforeLanguage, + CbsUiPanic(EErrIndexOutOfBounds) ); + + if ( count == KPreciseNumberOfItemsBeforeLanguage ) + { + TInt textId(R_TEXT_LANGUAGE_ALL); + + switch ( GetSelected() ) + { + case ECbsUiAll: + // do nothing + break; + case ECbsUiSelected: + textId = R_TEXT_LANGUAGE_SELECTED; + break; + case ECbsUiOther: + textId = R_TEXT_LANGUAGE_OTHER; + break; + default: + break; + } + + HBufC* language = iCoeEnv->AllocReadResourceLC(textId); + aItemArray.AppendL(*language); + + CleanupStack::PopAndDestroy(); // language + } + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::GetHelpContext +// +// Gets the control's help context. +// --------------------------------------------------------- +// +void CCbsUiSettingsViewContainer::GetHelpContext( + TCoeHelpContext& aContext ) const + { + aContext.iMajor = TUid::Uid(0x100058C5); // Messaging MCE UID + aContext.iContext = KMCE_HLP_SETTINGS_CB; + } + + +// ---------------------------------------------------- +// CCbsUiSettingsViewContainer::HandleResourceChange +// +// ---------------------------------------------------- +void CCbsUiSettingsViewContainer::HandleResourceChange( TInt aType ) + { + CCoeControl::HandleResourceChange( aType ); + + if( aType == KEikDynamicLayoutVariantSwitch ) + { + iView.HandleRectChangeInContainer(); + } + } + + +// --------------------------------------------------------- +// CCbsUiSettingsViewContainer::IsPhoneOfflineL +// +// Checks if phone is in offline mode or not. +// Return ETrue if phone is in offline mode. +// Return EFalse if phone is not in offline mode. +// --------------------------------------------------------- +// +TBool CCbsUiSettingsViewContainer::IsPhoneOfflineL() const + { + if ( iOfflineFeatureSupported ) + { + CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs ); + TInt connAllowed = 1; + repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed ); + CleanupStack::PopAndDestroy(); // repository + if ( !connAllowed ) + { + return ETrue; + } + } + return EFalse; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/UiSrc/ccbsuiviewfactory.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/UiSrc/ccbsuiviewfactory.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2002 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: +* Implementation of CCbsUiViewFactory. +* +* +*/ + + +// INCLUDES +#include "CCbsUiViewFactory.h" +#include "CCbsUiSettingsView.h" +#include "CCbsUiTopicListView.h" +#include "CCbsUiTopicView.h" +#include "CCbsUIMsgView.h" +#include "CCbsUiTopicListMonitor.h" +#include "CCbsUiSettingsMonitor.h" +#include "CbsUiPanic.h" + + + + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CCbsUiViewFactory::CCbsUiViewFactory( + MCbs& aServer, CCbsUiTopicListMonitor& aTopicMonitor ) : + iTopicMonitor( aTopicMonitor ), + iServer( aServer ) + { + } + +// Destructor +CCbsUiViewFactory::~CCbsUiViewFactory() + { + } + +// --------------------------------------------------------- +// CCbsUiViewFactory::CreateTopicListViewLC +// +// +// --------------------------------------------------------- +// +CAknView* CCbsUiViewFactory::CreateTopicListViewLC() + { + CCbsUiTopicListView* view = CCbsUiTopicListView::NewL( iServer ); + CleanupStack::PushL( view ); + iTopicMonitor.AddObserverL( view ); + return view; + } + +// --------------------------------------------------------- +// CCbsUiViewFactory::CreateTopicViewLC +// +// +// --------------------------------------------------------- +// +CAknView* CCbsUiViewFactory::CreateTopicViewLC() + { + CCbsUiTopicView* view = CCbsUiTopicView::NewL( iServer ); + CleanupStack::PushL( view ); + iTopicMonitor.AddObserverL( view ); + return view; + } + +// --------------------------------------------------------- +// CCbsUiViewFactory::CreateMsgViewLC +// +// +// --------------------------------------------------------- +// +CAknView* CCbsUiViewFactory::CreateMsgViewLC() + { + CCbsUiMsgView* view = CCbsUiMsgView::NewL( iServer ); + CleanupStack::PushL( view ); + iTopicMonitor.AddObserverL( view ); + return view; + } + +// --------------------------------------------------------- +// CCbsUiViewFactory::CreateSettingsViewLC +// +// +// --------------------------------------------------------- +// +CAknView* CCbsUiViewFactory::CreateSettingsViewLC() + { + CCbsUiSettingsView* view = CCbsUiSettingsView::NewL( iServer ); + CleanupStack::PushL( view ); + view->UpdateContextPaneL(); + return view; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/cbsui.pro --- a/cbs/cbsui/cbsui.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = app -TARGET = cbsui -DEPENDPATH += . -INCLUDEPATH += . - -CONFIG += hb -MOC_DIR = moc - -ICON = resources/icons/qgn_menu_cb.svg - -symbian: -{ - TARGET.CAPABILITY = CAP_APPLICATION - TARGET.UID3 = 0x101F4CD3 - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \ - ../../inc \ - $$MOC_DIR - LIBS += -lcbsclient \ - -lflogger - - BLD_INF_RULES.prj_exports += "rom/cbsui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cbsui.iby)" \ - "rom/cbsuiresources.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cbsuiresources.iby)" \ - "rom/cbsui_stub.sis /epoc32/data/z/system/install/cbsui_stub.sis" - -} - - -# Input -HEADERS += inc/cbslog.h \ - inc/cbsuimainwindow.h \ - inc/cbsuitopiclistview.h \ - inc/cbsuitopicview.h \ - inc/cbsuiviewmanager.h \ - inc/ccbsuisettingsmonitor.h \ - inc/ccbsuitopiclistmonitor.h \ - inc/mcbs.h \ - inc/mcbsuisettingsobserver.h \ - inc/mcbsuitopicmonitorobserver.h \ - inc/msavemessagecontroller.h \ - inc/rcbsui.h -SOURCES += src/cbsuimainwindow.cpp \ - src/cbsuitopiclistview.cpp \ - src/cbsuitopicview.cpp \ - src/cbsuiviewmanager.cpp \ - src/ccbsuitopiclistmonitor.cpp \ - src/main.cpp \ - src/rcbsui.cpp - -RESOURCES += resources/cbs_app.qrc - diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/help/data/xhtml.zip Binary file cbs/cbsui/help/data/xhtml.zip has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/help/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/help/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,26 @@ +/* +* 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: +* Export help related files. +* +*/ + +#include +PRJ_EXPORTS +:zip ../data/xhtml.zip /epoc32/data/z/resource/ overwrite +:zip ../data/xhtml.zip /epoc32/winscw/c/resource/ overwrite + +../inc/cbs.hlp.hrh MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/cbs.hlp.hrh) +../rom/cbsuihelps_variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(cbsuihelps_variant.iby) diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/help/inc/cbs.hlp.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/help/inc/cbs.hlp.hrh Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,29 @@ +/* +* 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: +* +*/ + +// +// cbs.hlp.hrh generated by CSXHelp Utilities. +// + +#ifndef __CBS_HLP_HRH__ +#define __CBS_HLP_HRH__ + +_LIT(KCBS_HLP_TOPIC_VIEW, "CBS_HLP_TOPIC_VIEW"); // +_LIT(KCBS_HLP_MAIN, "CBS_HLP_MAIN"); // +_LIT(KCBS_HLP_MSG, "CBS_HLP_MSG"); // + +#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/help/rom/cbsuihelps_variant.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/help/rom/cbsuihelps_variant.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,28 @@ +/* +* 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 __CBSUIHELPS_VARIANT_IBY__ +#define __CBSUIHELPS_VARIANT_IBY__ + +#if defined(FF_S60_HELPS_IN_USE) && defined(__CELL_BROADCAST) + data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CD3\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CD3\contents.zip) + data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CD3\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CD3\index.xml) + data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CD3\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CD3\keywords.xml) + data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CD3\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CD3\meta.xml) +#endif + +#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/cbslog.h --- a/cbs/cbsui/inc/cbslog.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* 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: Offers logging facility through flogger -* -*/ - - -#ifndef CBSLOG_H -#define CBSLOG_H - -// LOGGING LEVELS -const TInt SIMPLE( 1 ); -const TInt NORMAL( 2 ); -const TInt DETAILED( 3 ); - -#include -#include // For RDebug - -#define ENABLE_CBS_LOGGING - - -#ifdef ENABLE_CBS_LOGGING - - // - // DEFINE THE LOGGING LEVEL HERE: SIMPLE, NORMAL, DETAILED - // - #define LOGGING_LEVEL NORMAL - - // CONSTANTS - _LIT( KLogDir, "cbs" ); - _LIT( KLogFile, "cbsui_qt.txt" ); - - // This warning is disabled: conditinal expression is constant. - - // - // USE THIS MACRO FOR LOGGING. THE LEVEL OF LOGGING CAN BE - // SIMPLE, NORMAL, DETAILED - // - #ifdef LOG - #undef LOG - #endif - - #define LOG( LEVEL, TEXT ) \ - { \ - if ( LEVEL <= LOGGING_LEVEL ) \ - { \ - _LIT( KText, TEXT ); \ - RFileLogger::Write( \ - KLogDir, \ - KLogFile, \ - EFileLoggingModeAppend, \ - KText ); \ - RDebug::Print( KText ); \ - } \ - } - - #ifdef LOG2 - #undef LOG2 - #endif - - #define LOG2( LEVEL, TEXT, VARIABLE ) \ - { \ - if ( LEVEL <= LOGGING_LEVEL ) \ - { \ - _LIT( KText, TEXT ); \ - RFileLogger::WriteFormat( \ - KLogDir, \ - KLogFile, \ - EFileLoggingModeAppend, \ - TRefByValue( KText() ), VARIABLE ); \ - RDebug::Print( KText, VARIABLE ); \ - } \ - } - - #ifdef LOG3 - #undef LOG3 - #endif - - #define LOG3( LEVEL, TEXT, VARIABLE1, VARIABLE2 ) \ - { \ - if ( LEVEL <= LOGGING_LEVEL ) \ - { \ - _LIT( KText, TEXT ); \ - RFileLogger::WriteFormat( \ - KLogDir, \ - KLogFile, \ - EFileLoggingModeAppend, \ - TRefByValue( KText() ), VARIABLE1, VARIABLE2 ); \ - RDebug::Print( KText, VARIABLE1, VARIABLE2 ); \ - } \ - } - -#else // ENABLE_CBS_LOGGING - - #define LOG( LEVEL, TEXT ) - - #define LOG2( LEVEL, TEXT, VARIABLE1 ) - - #define LOG3( LEVEL, TEXT, VARIABLE1, VARIABLE2 ) - -#endif // ENABLE_CBS_LOGGING - -#endif // CBSLOG_H diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/cbsuiconstants.h --- a/cbs/cbsui/inc/cbsuiconstants.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* 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: -* Contains constants which are used in CBSUI application. -* -* -*/ - - -#ifndef __CBS_UI_CONSTANTS_H -#define __CBS_UI_CONSTANTS_H - -// INCLUDES - -// CONSTANTS -const TInt KCbsUiCustomMessageIdInt = 11; -const TUid KCbsUiCustomMessageId = { KCbsUiCustomMessageIdInt }; - // When message view is launched by other - // application its message id is 0, this - // just has to differ from the other - // applications message id. - -// When view is launched with this id it knows to set the focus to id, -// which is passed as parameter to DoActivateL. -const TUid KSetFocusToId = { 12 }; - -// activates view to its current id. -const TUid KSetFocusToCurrentId = { 13 }; - -// How many digits there are in topic number -const TInt KTopicNumberWidth = 3; //EMaxTopicNumberLength; - -const TInt KNumberOfTemporaryMessages = 3; - -// Error value used in Cbs ui. -const TInt KCbsErrValue = -1; - -// This kind of topic number cannot exists -const TInt KCbsInvalidTopicNumber = 22000; - -// Max message title length -const TInt KMaxMessageTitleLength = 40; - -// Max topic name length -const TInt KMaxTopicNameLength = 80; - -// DATA TYPES -enum { EMinTopicNumber = 0, EMaxTopicNumber = 999 }; - -enum TCbsUiLanguageSelectionIndex - { - ECbsUiAll = 0, - ECbsUiSelected = 1, - ECbsUiOther = 2 - }; - -// for activating topic view with right state -struct TCbsUiTopicActivationPckg - { - // current topic number - TCbsTopicNumber iTopicNumber; - - // current message handle - TCbsMessageHandle iMessageHandle; - }; - -#endif // __CBS_UI_CONSTANTS_H - diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/cbsuidebug.h --- a/cbs/cbsui/inc/cbsuidebug.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* 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: -* Provides macros for testing. -* -* -*/ - - -#ifndef CBSUIDEBUG_H -#define CBSUIDEBUG_H - - -//////////////////////////// -// MEMORY TEST MACRO // - - -#ifdef _DEBUG -#define _CBSUI_DEBUG -#endif // _DEBUG - -#ifdef _CBSUI_DEBUG - #define _CBSUI_ASSERT(condition, function) \ - _ASSERT_DEBUG(condition, function) - #define _CBSUI_ASSERT_E(condition, error) \ - _ASSERT_DEBUG(condition, CbsUiPanic(error) ) -#else - #define _CBSUI_ASSERT(condition, function) - #define _CBSUI_ASSERT_E(condition, error) -#endif //_CBSUI_DEBUG - - -#endif // CBSUIDEBUG_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/cbsuimainwindow.h --- a/cbs/cbsui/inc/cbsuimainwindow.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef CBSUIMAINWINDOW_H -#define CBSUIMAINWINDOW_H - -#include - -class HbMainWindow; -class MCbs; -class CbsUiViewManager; - -class CbsUiMainWindow : public HbMainWindow -{ -public: - CbsUiMainWindow(); - virtual ~CbsUiMainWindow(); - -private: - /* - * Own - */ - MCbs *mServer; - /* - * Own - */ - CbsUiViewManager *mViewManager; -}; - -#endif /* CBSUIMAINWINDOW_H */ diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/cbsuitopiclistview.h --- a/cbs/cbsui/inc/cbsuitopiclistview.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,301 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef CBSUITOPICLISTVIEW_H -#define CBSUITOPICLISTVIEW_H - -#include -#include -#include - -#include "mcbsuitopicmonitorobserver.h" - -// CONSTANTS -const TInt KNumberOfStandardTopics = 17; //TODO what's this - -class HbListWidget; -class HbAction; -class CCbsUiTopicListMonitor; -class CbsUiViewManager; -class MCbs; -class HbInputDialog; -class HbListWidgetItem; -class QPointF; - -typedef CArrayFixFlat< TCbsTopicNumber > TCbsUiTopicNumberList; - -class CbsUiTopicListView: public HbView, - public MCbsUiTopicMonitorObserver -{ - Q_OBJECT -public: - /** - * Constructor - */ - CbsUiTopicListView(); - - /** - * Destructor - */ - ~CbsUiTopicListView(); - - /** - * Init. - * - * @param server MCbs reference from CbsUiMainWindow - * @param viewManager CbsUiViewManager reference from CbsUiMainWindow - */ - void init(MCbs &server, CbsUiViewManager &viewManager); - -public: // from MCbsUiTopicMonitorObserver - /** - * Topic list or topic messages are changed. - * - * @param aEvent reason for event - * @param aTopicNumber Topic number, which caused the event - */ - virtual void TopicListChangedL(TCbsTopicListEvent aEvent, - TCbsTopicNumber aTopicNumber); - -private slots: - - /** - * Connect with left toolbar - */ - void toggleReception(); - - /** - * Connect with popup menu hotmark action - */ - void toggleHotmark(); - - /** - * Connect with popup menu Subscription action - */ - void toggleSubscription(); - - /** - * Connect with add topic toolbar - */ - void addTopic(); - - /** - * Connect with popup menu delete action - */ - void deleteTopic(); - - /** - * Connect with popup menu edit action - */ - void editTopic(); - - /** - * Connect with short press - * - * @param item selection item - */ - void showTopicSelectionView(HbListWidgetItem *item); - - /** - * showTopicView - * - * @param item selection item - */ - void showTopicView(HbListWidgetItem *item); - - /** - * showTopicIndexMenu(000) - * - * @param item selection item - * @param coords availalbe menu show position - */ - void showTopicIndexMenu(HbListWidgetItem *item, QPointF coords); - - /** - * ShowTopicsMenu(1-999) - * - * @param item selection item - * @param coords availalbe menu show position - */ - void showTopicsMenu(HbListWidgetItem *item, QPointF coords); - - /** - * Connect with add / edit popup dialog to en/dis able OK button - */ - void updateQueryAction(QString text); - -private: - - /** - * createComponents - */ - void createComponents(); - - /** - * Reload topic index data and update topic index widget. (000) - */ - void reloadTopicIndex(); - - /** - * Reload topics data and update topics widget (1-999) - */ - void reloadTopics(); - - /** - * Update given item - * - * @param item selection item - * @param topic selection topic - */ - void updateItem(HbListWidgetItem &item, const TCbsTopic &topic); - - /** - * UpdateItemIcon - * - * @param item selection item - * @param topic selection topic - */ - void updateItemIcon(HbListWidgetItem &item, const TCbsTopic &topic); - - /** - * updateItemText - * - * @param item selection item - * @param topic selection topic - */ - void updateItemText(HbListWidgetItem &item, const TCbsTopic &topic); - - /** - * Update current item by mTopicRow - * - * @param topic selection topic - */ - void updateCurrentItem(const TCbsTopic &topic); - - /** - * UpdateCurrentItemIcon, (un)subcribe and (un)hotmark - * - * @param topic selection topic - */ - void updateCurrentItemIcon(const TCbsTopic &topic); - - /** - * UpdateCurrentItemText - * - * @param topic selection topic - */ - void updateCurrentItemText(const TCbsTopic &topic); - - /** - * ShowPopupMenu - * - * @param topic selection topic - * @param coords availalbe menu show position - */ - void showPopupMenu(const TCbsTopic &topic, QPointF coords); - - /** - * Show current topic query dialog - * (edit/add current topic number or name) - * - * @param topic selection topic - * @param isAddTopic check if add or edit mode - */ - bool showTopicQuery(TCbsTopic &topic, const bool isAddTopic); - - /** - * Show topic number in use popup when edit topic - */ - void showNumberInUsePopup(); - -private: // Data - /** - * Not own, from CbsUiMainWindow - */ - MCbs *mServer; - /** - * Not own, from CbsUiMainWindow - */ - CbsUiViewManager *mViewManager; - - int mTopicRow; - - /** - * Not own, load from docml - */ - HbListWidget *mTopicIndexWidget; - - /** - * Not own, load from docml - */ - HbListWidget *mTopicsWidget; - - /** - * Not own, load from docml - */ - HbAction *mReceptionButton; - - /** - * Not own, load from docml - */ - HbAction *mOpenAction; - - /** - * Not own, load from docml - */ - HbAction *mSubscibeAction; - - /** - * Not own, load from docml - */ - HbAction *mUnSubscibeAction; - - /** - * Not own, load from docml - */ - HbAction *mHotmarkAction; - - /** - * Not own, load from docml - */ - HbAction *mUnHotmarkAction; - - /** - * Not own, load from docml - */ - HbAction *mEditAction; - - /** - * Not own, load from docml - */ - HbAction *mDeleteAction; - - //Monitors changes in topic list (Symbian). - CCbsUiTopicListMonitor *mMonitor; - - /** - * Own, for add / edit topic - */ - HbInputDialog *mTopicQuery; - - /** - * Own - */ - TCbsUiTopicNumberList *mTopicNumberList; -}; - -#endif // CBSUITOPICLISTVIEW_H diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/cbsuitopicview.h --- a/cbs/cbsui/inc/cbsuitopicview.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef CBSUITOPICVIEW_H -#define CBSUITOPICVIEW_H - -#include -#include -#include -#include "mcbsuitopicmonitorobserver.h" - -class HbListWidget; -class MCbs; -class CbsUiViewManager; - -class CbsUiTopicView : public HbView, - public MCbsUiTopicMonitorObserver -{ - Q_OBJECT - -public: - - /** - * Constructor - */ - CbsUiTopicView(); - - /** - * Destructor - */ - ~CbsUiTopicView(); - - /** - * Constructor - * @param server The handler of connecting to Cbs server. - * @param viewManager CbsUiViewManager. - */ - void init(MCbs &server, CbsUiViewManager &viewManager); - -public: // From MCbsUiTopicMonitorObserver - /** - * Topic list or topic messages are changed. - * - * @param aEvent reason for event - * @param aTopicNumber Topic number, which caused the event - */ - virtual void TopicListChangedL(TCbsTopicListEvent aEvent, - TCbsTopicNumber aTopicNumber); - - /** - * Reload Messages - * - * @param topicNumber topic number - */ - void reloadMessages(TCbsTopicNumber topicNumber); - -private: - /** - * It defines the type for message handle lists. - */ - //typedef CArrayFixFlat< TCbsMessageHandle > TCbsUiMessageHandleList; - - void createComponents(); - void addMessage(const TCbsMessage &message, const QString &msgName); - -private: // Data - // Not own - MCbs *mServer; - - // Not own - CbsUiViewManager *mViewManager; - - // Own - HbListWidget *mTopic; - - //TCbsUiMessageHandleList* mMsgHandles; - TCbsTopicNumber mCurrentTopicNumber; - - // Previous Message(not own) - HbAction *mPrevious; - - //Previous Message(not own) - HbAction *mBack; -}; - -#endif // CBSUITOPICVIEW_H diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/cbsuiutility.h --- a/cbs/cbsui/inc/cbsuiutility.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* 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: -* Provides different utility functions for CBSUI. -* -*/ - - -#ifndef CBSUIUTILITY_H -#define CBSUIUTILITY_H - -// INCLUDES - -// FORWARD DECLARATIONS -class MSaveMessageController; -class MCbs; - - -// CLASS DECLARATION - -/** -* Offers utility functions for CBSUI. -* -*/ -class CbsUiUtility - { - - public: // New functions - - /** - * Shows confirmation note with text accordingly to aResourceId. - * - * @param aResourceId resource id - * @param aWaitingDialog if ETrue dialog waits before continues - */ - LOCAL_C void ShowConfirmationNoteL( - const TInt aResourceId, TBool aWaitingDialog = EFalse ); - - /** - * Shows error note with text accordingly to aResourceId. - * - * @param aResourceId resource id - */ - LOCAL_C void ShowErrorNoteL( const TInt aResourceId ); - - /** - * Shows warning note with text accordingly to aResourceId. - * - * @param aResourceId resource id - */ - LOCAL_C void ShowWarningNoteL( const TInt aResourceId ); - - /** - * Shows a note accordingly to parameters. - * - * @param aResource note resource id - * @param aTimeout duration - * @param aTone sound - */ - /*LOCAL_C void ShowNoteL( const TInt aResource, - const CAknNoteDialog::TTimeout aTimeout, - const CAknNoteDialog::TTone aTone );*/ - - /** - * Returns a new navigation pane. Remember to delete a memory area! - * - * @return new empty decorated label - */ - //LOCAL_C CAknNavigationDecorator* CreateEmptyNavigationPaneL(); - - /** - * Returns ETrue if message is saved - * - * @param aHandle message to be checked - * @param aServer is needed to get information - * @return ETrue if current message is saved - */ - LOCAL_C TBool IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer ); - - /** - * Saves the message and shows a error message in case - * something went wrong. - * - * @param aHandle message to be saved - * @param aSaver saves the message and shows global error note if needed - * @return Error code - */ - LOCAL_C TInt SaveCurrentMessageL( - const TCbsMessageHandle aHandle, - MSaveMessageController& aSaver ); - - }; - -#endif // CBSUIUTILITY_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/cbsuiviewmanager.h --- a/cbs/cbsui/inc/cbsuiviewmanager.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef CBSUIVIEWMANAGER_H -#define CBSUIVIEWMANAGER_H - -#include -#include -#include - -class HbMainWindow; -class MCbs; -class CCbsUiTopicListMonitor; -class CbsUiTopicListView; -class CbsUiTopicView; -class HbAction; - - -// Here we create custom document loader to be able to use own classes in XML. -class CbsUiDocumentLoader : public HbDocumentLoader -{ -public: - virtual QObject *createObject(const QString &type, const QString &name); -}; - -class CbsUiViewManager : public QObject -{ - Q_OBJECT -public: - - /** - * Constructor - * - * @param window The mainwindow of qt mode. - * @param server The handler of connecting to Cbs server. - */ - CbsUiViewManager(HbMainWindow *window, MCbs &server); - - /** - * Destructor - */ - ~CbsUiViewManager(); - - /** - * Get handler of CbsUiDocumentLoader - * - * @return The handler of CbsUiDocumentLoader. - */ - CbsUiDocumentLoader* xmlLoader() { return mLoader; }; - -public slots: - - /** - * Activate the currenct view as Topic view - * - * @param topicNumber The currenct topic number. - */ - void activateTopicView(TCbsTopicNumber topicNumber); - - /** - * Activate the currenct view as Topic list view - */ - void activateMainView(); - -private: - - /** - * Not Own, from CbsUiMainWindow - */ - HbMainWindow *mMainWindow; - - /** - * Own - */ - CCbsUiTopicListMonitor *mTopicMonitor; - - /** - * Not own, reference of MCbs - */ - MCbs &mServer; - - /** - * Own but don't delete. Deleted via mObjects - */ - CbsUiTopicListView *mTopicListView; - - /** - * Own but don't delete. Deleted via mObjects - */ - CbsUiTopicView *mTopicView; - - /** - * Own - */ - CbsUiDocumentLoader *mLoader; - - /** - * objects load from XML. Needs to be deleted once application exits - */ - QList mObjects; - - /** - * Own but don't delete. Deleted via mObjects - */ - HbAction *mSoftKeyBackAction; - - /** - * Own but don't delete. Deleted via mObjects - */ - HbAction *mSoftKeyExitAction; - -}; - -#endif // CBSUIVIEWMANAGER_H - -// End of file - diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/ccbsuisettingsmonitor.h --- a/cbs/cbsui/inc/ccbsuisettingsmonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* 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: -* -*/ - - -#ifndef CCBSUISETTINGSMONITOR_H -#define CCBSUISETTINGSMONITOR_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATIONS -class MCbs; -class CCbsUiappAppUi; -class MCbsUiSettingsObserver; - -// CLASS DEFINITIONS - - -/** -* Server notifies this class if settings are changed. -* -*/ -class CCbsUiSettingsMonitor : public CActive - { - public: // New functions - /** - * Create an instance of the class. - * - * @param aServer cbs server - * @param aObserver settings observer - */ - static CCbsUiSettingsMonitor* NewL( - MCbs& aServer , MCbsUiSettingsObserver& aObserver ); - - /** - * Destructor. - */ - ~CCbsUiSettingsMonitor(); - - public: // From CActive - - /** - * It is called when server notifies. - */ - void RunL(); - - /** - * Cancels the request. - */ - void DoCancel(); - - private: // New functions - - /** - * Issues the request.. - */ - void IssueRequest(); - - private: - - /** - * Constructor. - * - * @param aServer cbs server - */ - CCbsUiSettingsMonitor( - MCbs& aServer, MCbsUiSettingsObserver& aObserver ); - - /** - * Finalizes the construction. - */ - void ConstructL(); - - private: // Data - - // ETrue if request is continued. - TBool iContinue; - - // Server subsession for settings - MCbs& iServer; - - // Event which is registered to server - TCbsSettingsEvent iEvent; - - // Observer who is interested about settings changes. - MCbsUiSettingsObserver& iObserver; - }; - -#endif // CCBSUISETTINGSMONITOR_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/ccbsuitopiclistmonitor.h --- a/cbs/cbsui/inc/ccbsuitopiclistmonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* 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: -* -*/ - - -#ifndef CCBSUITOPICLISTMONITOR_H -#define CCBSUITOPICLISTMONITOR_H - -// INCLUDES -#include -#include - - -// FORWARD DECLARATIONS -class MCbs; -class MCbsUiTopicMonitorObserver; - -// CLASS DEFINITIONS - - -/** -* Monitors topic related events. -*/ -class CCbsUiTopicListMonitor : public CActive - { - public: // New functions - - /** - * Create an instance of the class. - * - * @param aServer cbs server - */ - static CCbsUiTopicListMonitor* NewL( MCbs& aServer ); - - /** - * Destructor. - */ - ~CCbsUiTopicListMonitor(); - - /** - * Issues the request. - */ - void IssueRequest(); - - public: // From CActive - - /** - * It is called when server notifies. - */ - void RunL(); - - /** - * Cancels the request. - */ - void DoCancel(); - - public: // New functions - - /** - * Adds a observer to this monitor. - * - * @param aObserver Observer to be added. - */ - void AddObserverL( MCbsUiTopicMonitorObserver* aObserver ); - - private: - - typedef CArrayFixFlat - TCbsUiMonitorObservers; - - /** - * Constructor. - * - * @param aServer cbs server - */ - CCbsUiTopicListMonitor( MCbs& aServer ); - - /** - * Finalizes the construction. - */ - void ConstructL(); - - private: // Data - - // ETrue if request is active. - TBool iContinue; - - // To issue the request. - MCbs& iServer; - - // Observers who are interested in topic changes. - // Monitor doesn't own the observers. - TCbsUiMonitorObservers* iObservers; - - // Which topic handle the event is conserning. - TCbsTopicNumber iTopicNumber; - - // What kind of event has been. - TCbsTopicListEvent iEvent; - }; - -#endif // CCBSUITOPICLISTMONITOR_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/mcbs.h --- a/cbs/cbsui/inc/mcbs.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,557 +0,0 @@ -/* -* 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: -* Interface for cbs client. -* -*/ - - -#ifndef MCBS_H -#define MCBS_H - -// INCLUDES -#include - -/** -* Interface MCbs is used to change real client server -* connection to some test stub implementation. -*/ -class MCbs - { - public: - - /** - * Destructor. - */ - virtual ~MCbs() {} - - /** - * Creates connection to the server. - * - * Note that the method must be called before calling any other - * methods. The method returns an error code and, therefore, - * the caller is responsible of checking that everything went just - * fine. - * - * @return Error code. - */ - virtual TInt Connect() = 0; - - /** - * Closes the session to the server. - */ - virtual void Close() = 0; - - /** - * Returns the version of CbsClient. - * - * CbsServer and CbsClient must be of same version. - * - * @return Returns the version of CbsClient. - */ - virtual TVersion Version() const = 0; - - // === Settings-related methods - - /** - * Returns the reception status in aStatus, which is ETrue if the reception is - * on. Otherwise it is EFalse. - * - * @param aStatus The method returns the reception status in this parameter. - */ - virtual void GetReceptionStatus( TBool& aStatus ) = 0; - - /** - * Changes the reception status to aStatus. - * - * @param aStatus It contains the new reception status. - * @return Error code. - */ - virtual TInt SetReceptionStatus( TBool aStatus ) = 0; - - /** - * Returns the topic detection status in aStatus, which is ETrue if the detection - * is on. Otherwise it is EFalse. - * - * @param aStatus The method returns the topic detection status in this parameter. - */ - virtual void GetTopicDetectionStatus( TBool& aStatus ) = 0; - - /** - * Changes the topic detection status to aStatus. - * - * @param aStatus It contains the new topic detection status. - * @return Error code. - */ - virtual TInt SetTopicDetectionStatus( TBool aStatus ) = 0; - - /** - * Returns the preferred languages in aLanguages. - * - * @param aLanguages The method returns the languages in this parameter. - */ - virtual void GetLanguages( TCbsSettingsLanguages& aLanguages ) = 0; - - /** - * Changes the preferred languages to aLanguages. - * - * @param aLanguages It contains the new preferred languages. - * @return Error code. - */ - virtual TInt SetLanguages( const TCbsSettingsLanguages& aLanguages ) = 0; - - /** - * Requests the server to notify the client whenever any settings will be - * changed. - * - * Note that for each subsession only one this kind of request can be pending. Each - * client is responsible of assuring this. - * - * @param aStatus It is the variable that the server will modify whenever an event occurs. - * @param aEvent The server will store the type of occurred event to this variable. - */ - virtual void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent ) = 0; - - /** - * Cancels the request to notify the client. - */ - virtual void NotifySettingsChangedCancel() = 0; - - // === Topic Collection-related methods - - /** - * Resets the iterator. Must be called prior any call to HasNextTopic() - * or NextTopic()! - */ - virtual void StartCollectionBrowsing() = 0; - - /** - * Returns ETrue, if there is a topic not accessed with NextTopic() - * - * @return ETrue, if there is a topic. EFalse if the end of the collection - * has been reached. - */ - virtual TBool HasNextCollectionTopic() = 0; - - /** - * Returns the next topic in the topic collection skipping all topics with - * a topic number matching a topic already listed in the current topic list. - * This function will return KErrNotFound if the collection is tried to - * access beyond the end of the list. Otherwise the error code will be - * the same returned by GetTopicInfo(). - * - * @param aInfo The topic information will be stored here. - * @return The error code. KErrNotFound if there are no topics left. - */ - virtual TInt NextCollectionTopic( TCbsTopicInfo& aInfo ) = 0; - - // === Topic list-related methods - - /** - * Returns the total amount of topics the topic list contains. - * - * @param aCount It will contain the total amount of topics. - */ - virtual void GetTopicCount( TInt& aCount ) = 0; - - /** - * Returns information about a topic from the topic list. - * - * Return values: - * KErrArgument Topic was not found. - * - * Rest of return values indicate a file error. - * - * @param aIndex It is the index to the topic. - * @param aTopic It will contain the topic information. - * @return Error code. - */ - virtual TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic ) = 0; - - /** - * Finds the topic by the given number. - * - * Return values: - * KErrNone Topic returned in parameter aTopic. - * KErrNotFound Topic was not found. - * - * @param aNumber Number of the topic - * @param aTopic Return: contains the topic information - * @return Error code - */ - virtual TInt FindTopicByNumber( TCbsTopicNumber aNumber, - TCbsTopic& aTopic ) = 0; - - /** - * Deletes an existing topic. - * - * @param aNumber Number of the topic to be deleted - * @return Error code - */ - virtual TInt DeleteTopic( TCbsTopicNumber aNumber ) = 0; - - /** - * Delete all topics. - * - * @return Error code. - */ - virtual TInt DeleteAllTopics() = 0; - - /** - * Adds a new topic. The handle assigned to the topic will be returned - * in aTopic. - * - * Return values: - * KErrNone Topic was successfully added. - * KErrAlreadyExists A topic of the same number already exists in DB - * KErrArgument Topic number given was not in a proper range. - * KErrDiskFull Topic not added - FFS out of space - * - * Note that the number of the new topic must be unused. - * - * @param aTopic Contains the information of the new topic. - * On return, aTopic also contains the topic - * handle. - * @return Error code. - */ - virtual TInt AddTopic( TCbsTopic& aTopic ) = 0; - - /** - * Changes the name and number of the existing topic. - * - * Note that the changing fails in case there is another topic with - * the new topic number. It also fails if the topic is protected. - * - * Return values: - * KErrNone Topic name and number successfully changed. - * KErrDiskFull Topic information not changed - FFS out of space - * - * @param aOldNumber Number of the topic to be changed - * @param aNewNumber Number to be given for the topic - * @param aName Name to be given for the topic - * @return Error code - */ - virtual TInt ChangeTopicNameAndNumber( - TCbsTopicNumber aOldNumber, - TCbsTopicNumber aNewNumber, - const TCbsTopicName& aName ) = 0; - - /** - * Changes topic subscription status. - * - * @param aNumber Number of the topic - * @param aNewStatus New subscription status - * @return Error code - */ - virtual TInt ChangeTopicSubscriptionStatus( - TCbsTopicNumber aNumber, TBool aNewStatus ) = 0; - - /** - * Changes topic hotmark status. - * - * @param aNumber Number of the topic - * @param aNewStatus New hotmark status - * @return Error code - */ - virtual TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber, - TBool aNewStatus ) = 0; - - /** - * Requests the server to notify the client whenever an event occurs - * that changes the information of the topics. - * - * Note that the client may select what kind of events it is - * interested in. Note also that there can be at most one pending - * request per instance of the class. - * - * @param aStatus The variable that the server will modify - * whenever an event occurs. - * @param aRequested Events the client is interested in - * @param aEvent Indicates the variable that will contain the - * type of event that occured. - * @param aNumber Indicates the variable that will contain the - * topic number that was changed in event. - */ - virtual void NotifyOnTopicListEvent( - TRequestStatus& aStatus, - const TInt aRequested, - TCbsTopicListEvent& aEvent, - TCbsTopicNumber& aNumber ) = 0; - - /** - * Cancels the pending notify request. - */ - virtual void NotifyOnTopicListEventCancel() = 0; - - /** - * Returns the number of topics added since last GetNewTopicsCount() - * by the topic detection feature. - * - * @param aCount It will contain the amount of new topics. - * @return TInt Result code. - */ - virtual TInt GetNewTopicsCount( TInt& aCount ) = 0; - - /** - * Returns the number of the topic which was last added - * to topic list. - * - * Note: if a topic list cache is maintained by the client - * (as CBS UI application does), this function has to - * be called BEFORE calling GetTopicCount() and GetTopic() - * to make sure that no topic is added in between - * GetTopic() and GetLatestTopicHandle() calls. If this - * happens, GetLatestTopicHandle() will return a handle - * to a topic that is not cached client-side. - * - * Return codes: - * KErrNone aNumber is a valid topic number. - * KErrNotFound No topic added since server start, - * aNumber is not valid. - * - * @param aNumber Returns: number of the topic last added - * @return Result code - */ - virtual TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber ) = 0; - - /** - * Returns the total amount of unread messages. - * - * @param aCount Return: number of unread messages - */ - virtual void GetUnreadMessageCount( TInt& aCount ) = 0; - - /** - * Returns the handle to the latest hotmarked message that has been - * received after the system has started up. - * - * @param aMessage Handle to the message - */ - virtual void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage ) = 0; - - /** - * Returns the number of unread messages in hotmarked topics. - * - * This function is to used by the client when deciding whether - * the message or topic list view should be opened to display - * a hotmarked message(s). - * - * @return Number of unread hotmarked messages - */ - virtual TInt NumberOfUnreadHotmarkedMessages() = 0; - - /** - * Returns the numbers of topics that precede and succeed the given - * topic in server-side topic list. - * - * If the given topic is the first topic in list, aPosition has - * ECbsHead bit up. If the given topic is the last topic in list, - * aPosition has ECbsTail bit up. - * - * Return code values: - * KErrNone aPrevTopicNumber, aNextTopicNumber and aPosition - * contain valid values. - * KErrNotFound aCurrentTopicNumber specified a topic that was not - * on topic list. - * - * @param aCurrentTopicNumber Number that specifies the topic - * whose surroundings are returned - * @param aPrevTopicNumber Returns: number of topic preceding - * the given topic - * @param aNextTopicNumber Returns: number of topic succeeding - * the given topic - * @param aPosition Returns: position of current - * topic in list. - * @return Result code - */ - virtual TInt GetNextAndPrevTopicNumber( - const TCbsTopicNumber& aCurrentTopicNumber, - TCbsTopicNumber& aPrevTopicNumber, - TCbsTopicNumber& aNextTopicNumber, - TInt& aPosition ) = 0; - - // === Topic Messages-related methods - - /** - * Returns the total amount of messages the topic contains. - * - * Return codes: - * KErrNotFound Invalid handle. - * KErrNone aCount contains the number of messages - * in topic - * - * @param aNumber Number of the topic. - * @param aCount Number of messages in given topic. - * @return Result code - */ - virtual TInt GetMessageCount( TCbsTopicNumber aNumber, - TInt& aCount ) = 0; - - /** - * Returns message information. - * - * Return codes: - * KErrNotFound Topic or message not found. - * KErrNone aMessage contains the message information. - * - * @param aNumber Number of the topic - * @param aIndex Index to the message in topic. - * @param aMessage Returns: the message information - * @return Error code - */ - virtual TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex, - TCbsMessage& aMessage ) = 0; - - /** - * Finds a message by given handle. - * - * @param aHandle Handle to the message. - * @param aMessage Return: contains the message information. - * @return Error code. - */ - virtual TInt FindMessageByHandle( - const TCbsMessageHandle& aHandle, - TCbsMessage& aMessage ) = 0; - - /** - * Returns the index of a message with given handle in topic. - * - * Result code KErrNotFound indicates that no message was found with - * the given handle. - * - * @param aHandle Handle of the message - * @param aIndex Return: index of the message in message topic - * @return Result code - */ - virtual TInt GetMessageIndexByHandle( - const TCbsMessageHandle& aHandle, TInt& aIndex ) = 0; - - /** - * Deletes an existing message. - * - * Note that it does not care a lot about the status of the message. - * - * Please check also the description of LockMessage(). - * - * @param aHandle It is handle to the message. - * @return Error code. - */ - virtual TInt DeleteMessage( const TCbsMessageHandle& aHandle ) = 0; - - /** - * Saves a message (the saved message won't be deleted to make - * room for new messages). - * - * Return codes: - * KErrNone Message is saved. - * KErrGeneral Message not saved -- total maximum of saved - * messages reached. - * KErrNotFound Message not saved -- no message associated - * with the given handle. - * KErrDiskFull Message not saved -- FFS out of space. - * - * @param aHandle Handle to the message to be saved. - * @return Return code. - */ - virtual TInt SaveMessage( const TCbsMessageHandle& aHandle ) = 0; - - /** - * Locks the message. - * - * Note that a single topic messages subsession can have at most one locked - * message. - * - * Message can be unlocked by trying to lock a null message. Locked message - * will also be automatically unlocked when subsession is closed. If a message - * is locked, then it will not be deleted from the database. Thus, deleting a - * message or trying to delete a topic that contains such a message will fail. - * - * Locking a message does not prevent to save the message nor read the message. - * - * @param aHandle It is handle to the message to be locked. - * @return Error code. - */ - virtual TInt LockMessage( const TCbsMessageHandle& aHandle ) = 0; - - /** - * Sets the message as read. - * - * @param aHandle It is handle to the message to be set read. - */ - virtual TInt ReadMessage( const TCbsMessageHandle& aHandle ) = 0; - - /** - * Returns the message contents. - * - * @param aHandle It is handle to the message. - * @param aBuffer It will contain the contents (as much as it fits). - * @return Error code. - */ - virtual TInt GetMessageContents( - const TCbsMessageHandle& aHandle, - TDes& aBuffer ) = 0; - - /** - * Returns the handles of messages that precede and succeed the - * given message in server-side list of topic messages. - * - * Topic is resolved from the given message handle - * - * If the given handle specifies the first message in topic, - * aPosition has ECbsHead bit up. If the given handle specifies - * the last message in topic, aPosition has ECbsTail bit up. - * - * Return code values: - * KErrNone aPrevMsgHandle, aNextMsgHandle and aPosition - * contain valid values. - * KErrNotFound aCurrentMsgHandle specified a message that was not - * found. - * - * @param aCurrentMsgHandle Handle that specifies the message - * whose surroundings are returned - * @param aPrevMsgHandle Returns: handle of message - * preceding the given message - * @param aNextMsgHandle Returns: handle of message - * succeeding the given topic - * @param aPosition Returns: position of current topic - * in list - * @return Result code - */ - virtual TInt GetNextAndPrevMessageHandle( - const TCbsMessageHandle& aCurrentMsgHandle, - TCbsMessageHandle& aPrevMsgHandle, - TCbsMessageHandle& aNextMsgHandle, - TInt& aPosition ) = 0; - - // Other methods - - /** - * Returns ETrue if CbsServer session has been established. - * - * @return ETrue, if session open. - */ - virtual TBool Connected() const = 0; - - /** - * Forces the server to shut down. - * - * NOTE: Shutdown not fully implemented in CbsServer yet. - */ - virtual void Shutdown() const = 0; - - }; - -#endif // MCBS_H - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/mcbsuisettingsobserver.h --- a/cbs/cbsui/inc/mcbsuisettingsobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* 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: -* Observes settings monitor. -* -*/ - - -#ifndef CBSUISETTINGSOBSERVER_H -#define CBSUISETTINGSOBSERVER_H - - - -// CLASS DECLARATION - - -/** -* Observes settings monitor. -* -*/ -class MCbsUiSettingsObserver - { - public: - - /** - * Settings monitor calls this function when settings has been - * changed. - * - * @param aEvent What kind of event caused the settings change - */ - virtual void SettingsChangedL( TCbsSettingsEvent aEvent ) = 0; - - }; - -#endif // CBSUISETTINGSOBSERVER_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/mcbsuitopicmonitorobserver.h --- a/cbs/cbsui/inc/mcbsuitopicmonitorobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* 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: -* Observes topic monitor. -* -*/ - - -#ifndef CBS_UI_TOPIC_MONITOR_OBSERVER_H -#define CBS_UI_TOPIC_MONITOR_OBSERVER_H - -// INCLUDES -#include - - - -// CLASS DECLARATION - -/** -* Observes topic monitor. -* -*/ -class MCbsUiTopicMonitorObserver - { - public: - - /** - * Topic list or topic messages are changed. - * - * @param aEvent reason for event - * @param aTopicNumber Topic number, which caused the event - */ - virtual void TopicListChangedL( - TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber ) = 0; - - }; - -#endif // CBS_UI_TOPIC_MONITOR_OBSERVER_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/msavemessagecontroller.h --- a/cbs/cbsui/inc/msavemessagecontroller.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* 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: -* Declares functions needed to save message. -* -*/ - - -#ifndef MSAVEMESSAGECONTROLLER_H -#define MSAVEMESSAGECONTROLLER_H - -// INCLUDES -#include - - - -// CLASS DECLARATION - -/** -* Helper class for saving message. -*/ -class MSaveMessageController - { - public: // New functions - - /** - * Saves a message (the saved message won't be deleted to make - * room for new messages). - * - * Return codes: - * KErrNone Message is saved. - * KErrGeneral Message not saved -- total maximum of saved - * messages reached. - * KErrNotFound Message not saved -- no message associated - * with the given handle. - * KErrDiskFull Message not saved -- FFS out of space. - * - * @param aHandle Handle to the message to be saved. - * @return Return code. - */ - virtual TInt SaveMessage( const TCbsMessageHandle& aHandle ) = 0; - }; - -#endif // MSAVEMESSAGECONTROLLER_H - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/inc/rcbsui.h --- a/cbs/cbsui/inc/rcbsui.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* 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: -* -*/ - - -#ifndef RCBSUI_H -#define RCBSUI_H - -// INCLUDE FILES -#include -#include -#include - -#include "mcbs.h" - - -// CLASS DECLARATION - -/** -* Delecates calls to RCbs. -*/ -class RCbsUi : public MCbs - { - public: // Constructor and destructor - - /** - * Constructor. - */ - RCbsUi(); - - /** - * Destructor. - */ - ~RCbsUi(); - - public: // From MCbs - - TInt Connect(); - void Close(); - TVersion Version() const; - - // === Settings-related methods - void GetReceptionStatus( TBool& aStatus ); - TInt SetReceptionStatus( TBool aStatus ); - void GetTopicDetectionStatus( TBool& aStatus ); - TInt SetTopicDetectionStatus( TBool aStatus ); - void GetLanguages( TCbsSettingsLanguages& aLanguages ); - TInt SetLanguages( const TCbsSettingsLanguages& aLanguages ); - void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent ); - void NotifySettingsChangedCancel(); - - // === Topic Collection-related methods - void StartCollectionBrowsing(); - TBool HasNextCollectionTopic(); - TInt NextCollectionTopic( TCbsTopicInfo& aInfo ); - - // === Topic list-related methods - void GetTopicCount( TInt& aCount ); - TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic ); - TInt FindTopicByNumber( TCbsTopicNumber aNumber, TCbsTopic& aTopic ); - TInt DeleteTopic( TCbsTopicNumber aNumber ); - TInt DeleteAllTopics(); - TInt AddTopic( TCbsTopic& aTopic ); - TInt ChangeTopicNameAndNumber( - TCbsTopicNumber aOldNumber, - TCbsTopicNumber aNewNumber, - const TCbsTopicName& aName ); - TInt ChangeTopicSubscriptionStatus( - TCbsTopicNumber aNumber, TBool aNewStatus ); - TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber, - TBool aNewStatus ); - void NotifyOnTopicListEvent( - TRequestStatus& aStatus, - const TInt aRequested, - TCbsTopicListEvent& aEvent, - TCbsTopicNumber& aNumber ); - void NotifyOnTopicListEventCancel(); - TInt GetNewTopicsCount( TInt& aCount ); - TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber ); - void GetUnreadMessageCount( TInt& aCount ); - void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage ); - TInt NumberOfUnreadHotmarkedMessages(); - TInt GetNextAndPrevTopicNumber( - const TCbsTopicNumber& aCurrentTopicNumber, - TCbsTopicNumber& aPrevTopicNumber, - TCbsTopicNumber& aNextTopicNumber, - TInt& aPosition ); - - // === Topic Messages-related methods - TInt GetMessageCount( TCbsTopicNumber aNumber, TInt& aCount ); - TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex, - TCbsMessage& aMessage ); - TInt FindMessageByHandle( - const TCbsMessageHandle& aHandle, - TCbsMessage& aMessage ); - TInt GetMessageIndexByHandle( - const TCbsMessageHandle& aHandle, TInt& aIndex ); - TInt DeleteMessage( const TCbsMessageHandle& aHandle ); - TInt SaveMessage( const TCbsMessageHandle& aHandle ); - TInt LockMessage( const TCbsMessageHandle& aHandle ); - TInt ReadMessage( const TCbsMessageHandle& aHandle ); - TInt GetMessageContents( - const TCbsMessageHandle& aHandle, - TDes& aBuffer ); - TInt GetNextAndPrevMessageHandle( - const TCbsMessageHandle& aCurrentMsgHandle, - TCbsMessageHandle& aPrevMsgHandle, - TCbsMessageHandle& aNextMsgHandle, - TInt& aPosition ); - - // Other methods - TBool Connected() const; - void Shutdown() const; - - private: // Data - - // Real cbs client - RCbs iServer; - - }; - -#endif // RCBSUI_H - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/loc/cbsuiapp.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/loc/cbsuiapp.loc Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,343 @@ +/* +* Copyright (c) 2002 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: +* This file contains the localised strings for CBS. +* +* +*/ + + +// LOCALISATION STRINGS + +// d: Text in Delete topic confirmation query +// l: popup_note_window +#define qtn_cb_query_delete_topic "Do you want to delete topic?" + +// d: Text in Delete topics confirmation query +// l: popup_note_window +#define qtn_cb_query_delete_all_topic "Do you want to delete all topics?" + +// d: Mememory full error note +// d: is shown to the user when the amount of the kept messages exceeds the reserved amount +// l: popup_note_window +#define qtn_cb_note_mem_full_del_msg "Reserved space is full. Delete messages before keeping more!" + +// d: Title pane text, in topic list view +// l: title_pane_t2/opt12 +#define qtn_cb_title_cbs "CBS" + +// d: Caption string for AIF file (short) +// l: cell_app_pane_t1 +// +#define qtn_cb_title_grid "CBS" + +// d: Title pane text, in add topic from index view +// l: title_pane_t2/opt12 +#define qtn_cb_title_addtopics "Add Topics" + +// d: Navi pane text, in add topic from index view +// l: navi_text_pane_t1 +#define qtn_cb_ad_sel_top "Select topics (help hints)" + +// d: Navi Pane text, used in topic list view +// l: navi_text_pane_t1 +#define qtn_cb_tl_one_new_message "One new message" + +// d: Navi Pane text, used in topic list view +// l: navi_text_pane_t1 +#define qtn_cb_tl_no_new_messages "No new messages" + +// d: Navi Pane text, used in topic list view +// d: There are %N - new messages +// l: navi_text_pane_t1 +#define qtn_cb_tl_new_messages "%N new messages" + +// d: Command in options menu in CBS. +// d: Opens currently selected item. +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_open "Open" + +// d: Command in options menu in CBS. Topic list view +// d: Subscribes selected topic +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_subscribe "Subscribe" + +// d: Command in options menu in CBS. Topic list view +// d: UnSubscribes selected topic +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_unsubscribe "UnSubscribe" + +// d: Command in options menu in CBS. Topic list view +// d: Hotmarks selected topic +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_hotmark "Hotmark" + +// d: Command in options menu in CBS. Topic list view +// d: UnHotmarks selected topic +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_unhotmark "Unhotmark" + +// d: Command in options menu in CBS. TopicListView +// d: Opens settings view +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_settings "Settings" + +// d: Command in options list in CBS view msg. topic view +// d: Saves message. +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_keep_topic "Keep" + +// d: Command in options list in CBS view msg. topic view +// d: Deletes message. +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_del_msg "Delete" + +// d: Command in options list in CBS message view. +// d: show find item sub menu +// l: list_single_pane_t1_cp2 +//#define qtn_find_item "Find Item" + +// d: Command in options list in CBS message view. +// d: Copies the message to clipboard. +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_copy_clip "Copy to clipboard" + +// d: Command in options list in CBS. +// d: Closes cbs application. +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_exit "Exit" + +// d: Command in options menu in CBS. Topic list view +// d: Opens "topic" submenu +// l: list_single_pane_t1_cp2/opt3 +#define qtn_cb_cmd_topic "Topic" + +// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view +// d: Opens dialog for manual topic adding +// l: list_single_popup_submenu_pane_t1 +#define qtn_cb_topic_add_man "Add manually" + +// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view +// d: Opens dialog for adding topic from index. +// l: list_single_popup_submenu_pane_t1 +#define qtn_cb_topic_add_f_index "Add from index" + +// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view +// d: Opens dialog for editing topic. +// l: list_single_popup_submenu_pane_t1 +#define qtn_cb_topic_edit "Edit" + +// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view +// d: Deletes selected topic. +// l: list_single_popup_submenu_pane_t1 +#define qtn_cb_topic_delete "Delete" + +// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view +// d: Deletes all topics. +// l: list_single_popup_submenu_pane_t1 +#define qtn_cb_topic_delete_all "Delete all" + +// d: Command in options menu in CBS. topic view +// d: Opens currently selected Message. +// l: list_single_pane_t1_cp2 +#define qtn_cb_cmd_msg_open "Open" + +// d: Defines whether cell broadcasts are received or not. +// d: This is shown in the Settings view. +// l: list_setting_pane_t1 +#define qtn_mce_settings_cb_reception "Reception" + +// d: Defines language(s) of received messages. +// d: This is shown in the Settings view. +// l: list_setting_pane_t1 +#define qtn_mce_settings_cb_language "Language" + +// d: Defines if all messages are received (Off) or only wanted ones (On). +// d: This is shown in the Settings view. +// l: list_setting_pane_t1 +#define qtn_mce_settings_cb_topic "Topic detection" + +// d: Value of reception. +// d: This is shown in the Settings view. +// l: list_set_graphic_pane_t1 +#define qtn_mce_settings_cb_re_on "On" + +// d: Value of reception. +// d: This is shown in the Settings view. +// l: list_set_graphic_pane_t1 +#define qtn_mce_settings_cb_re_off "Off" + +// d: Value of topic detection. +// d: This is shown in the Settings view. +// l: list_set_graphic_pane_t1 +#define qtn_mce_settings_cb_topic_detection_on "On" + +// d: Value of topic detection. +// d: This is shown in the Settings view. +// l: list_set_graphic_pane_t1 +#define qtn_mce_settings_cb_topic_detection_off "Off" + +// d: One new topic added confirmation note +// l: popup_note_window +#define qtn_cb_note_new_to_added "New topic added!" + +// d: N new topic added confirmation note +// l: popup_note_window +#define qtn_cb_note_new_tos_added "%N New topics added!" + +// d: Name field in the edit topic query +// l: popup_query_data_code_window/opt2 +#define qtn_cb_litext_name "Name" + +// d: Number field in the edit topic query +// l: popup_query_data_code_window/opt2 +#define qtn_cb_litext_number "Number" + +// d: An error note text, which is shown if the user adds +// d: an already existing number. +// l: popup_note_window +#define qtn_cb_note_change_number "The topic number is already in use. Enter another number" + +// d: Information note to the user when he has copied the CBS message to +// d: clipboard. +// l: popup_note_window +#define qtn_cb_note_msg_to_clip "Message copied to clipboard!" + +// d: Used in message viewer, while reading the message. Text example: "Message 2/3" +// l: navi_text_pane_t1 +#define qtn_cb_msg_message "Message %0N/%1N" + +// d: If the SIM card max number topics are subscribed, then this error text will be shown +// l: popup_note_window +#define qtn_cb_note_can_not_subs "Can not subscribe more topics!" + +// d: In message view if the user selects delete from the options menu or the +// d: context sensitive menu, this confirmation note will be shown. +// l: popup_note_window +#define qtn_cb_note_delete_msg "Delete message?" + +// language settings + +// d: Language setting for all the languages. +// l: list_set_graphic_pane_t1 +#define qtn_mce_settings_cb_all "All" + +// d: Language setting for selected languages. +// l: list_set_graphic_pane_t1 +#define qtn_mce_settings_cb_selected "Selected" + +// d: Language setting for other languages. +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_other "Other" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_german "German" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_english "English" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_italian "Italian" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_french "French" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_spanish "Spanish" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_dutch "Dutch" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_swedish "Swedish" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_danish "Danish" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_portuguese "Portuguese" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_finnish "Finnish" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_norwegian "Norwegian" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_greek "Greek" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_turkish "Turkish" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_hungarian "Hungarian" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_polish "Polish" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_czech "Czech" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_hebrew "Hebrew" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_arabic "Arabic" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_russian "Russian" + +// d: Language value +// l: list_single_graphic_heading_pane_t1 +#define qtn_mce_settings_cb_icelandic "Icelandic" + +// d: This note will show up when user has saved the message +// l: popup_note_window +#define qtn_logs_info_msg_kept "Message is kept" + +// d: Used in settings menu to change value. +// l: list_single_pane_t1_cp2 +#define qtn_mce_settings_change "Change" + +// d: Used in settings menu to exit the application. +// l: list_single_pane_t1_cp2 +#define qtn_mce_settings_exit "Exit" + +// d: Used in language selection list. +// d: Notice that this is a heading pane in the main pane +// d: and not in the pop up window. This has been agreed to be the id. +// l: heading_pane_t1 +#define qtn_mce_settings_cb_quest_langu "Select languages:" + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/cbs_app.docml --- a/cbs/cbsui/resources/cbs_app.docml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/cbs_app.qrc --- a/cbs/cbsui/resources/cbs_app.qrc Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - cbs_app.docml - cbs_topic_view.docml - - - icons/hotmark2.png - icons/save.png - icons/sub2.png - icons/empty.png - icons/qgn_menu_cb.svg - - - cbsui_en.qm - - diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/cbs_topic_view.docml --- a/cbs/cbsui/resources/cbs_topic_view.docml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/cbsui_en.qm --- a/cbs/cbsui/resources/cbsui_en.qm Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -<¸dÊÍ!¿`¡½ÝB²å \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/cbsui_en.ts --- a/cbs/cbsui/resources/cbsui_en.ts Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ - - - - - - - Unhotmark - Unhotmark - - - - - False - - - - Topics - Topics - - - - - False - - - - Not available - Not available - - - - - False - - - - Topic number: - Topic number: - - - - - False - - - - Edit - Edit - - - - - False - - - - Delete - Delete - - - - - False - - - - Hotmark - Hotmark - - - - - False - - - - Unsubscribe - Unsubscribe - - - - - False - - - - Help - Help - - - - - False - - - - 000 Topic Index - 000 Topic Index - - - - - False - - - - Settings - Settings - - - - - False - - - - Deactivate reception - Deactivate reception - - - - - False - - - - Subscribe - Subscribe - - - - - False - - - - Add topic - Add topic - - - - - False - - - - Topic name: - Topic name: - - - - - False - - - - Exit - Exit - - - - - False - - - - No messages - No messages - - - - - False - - - - Activate reception - Activate reception - - - - - False - - - - Open - Open - - - - - False - - - - Delete topic - Delete topic - - - - - False - - - - Cell broadcast - Cell broadcast - - - - - False - - - diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/cbsui_text_map.xls Binary file cbs/cbsui/resources/cbsui_text_map.xls has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/icons/empty.png Binary file cbs/cbsui/resources/icons/empty.png has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/icons/hotmark2.png Binary file cbs/cbsui/resources/icons/hotmark2.png has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/icons/qgn_menu_cb.svg --- a/cbs/cbsui/resources/icons/qgn_menu_cb.svg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/icons/qgn_menu_cb_2.svg --- a/cbs/cbsui/resources/icons/qgn_menu_cb_2.svg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/icons/save.png Binary file cbs/cbsui/resources/icons/save.png has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/resources/icons/sub2.png Binary file cbs/cbsui/resources/icons/sub2.png has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/rom/CbsUiApp.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/rom/CbsUiApp.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,34 @@ +/* +* Copyright (c) 2004 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: IBY file for cbsui application +* +*/ + +#ifndef __CBSUIAPP_IBY__ +#define __CBSUIAPP_IBY__ + +#ifdef __CELL_BROADCAST + +S60_APP_EXE(CbsUiApp) +SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,CbsUiApp) +S60_APP_AIF_ICONS(CbsUiApp) +S60_APP_AIF_RSC(CbsUiApp) + +// Enabler for eclipsing ROM binaries +data=ZSYSTEM\install\cbsuiapp_stub.sis system\install\cbsuiapp_stub.sis +data=ZPRIVATE\10003a3f\apps\cbsuiapp_reg.rsc private\10003a3f\import\apps\cbsuiapp_reg.rsc + +#endif + +#endif diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/rom/CbsUiResources.iby --- a/cbs/cbsui/rom/CbsUiResources.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/cbsui/rom/CbsUiResources.iby Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2004 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" @@ -11,18 +11,19 @@ * * Contributors: * -* Description: CBS resources rom build file +* Description: IBY file for cbsui application * */ +#ifndef __CBS_RESOURCES_IBY__ +#define __CBS_RESOURCES_IBY__ -#ifndef __CBSUI_RESOURCES_IBY__ -#define __CBSUI_RESOURCES_IBY__ +//Resource file(s) for CBSUI application (Cbsui.iby) #ifdef __CELL_BROADCAST -data=DATAZ_\resource\apps\cbsui.rsc S60_APP_RESOURCE(cbsui.rsc) +S60_APP_RESOURCE(CbsUiApp) -#endif // __CELL_BROADCAST +#endif //__CELL_BROADCAST -#endif // __CBSUI_RESOURCES_IBY__ +#endif //__CBS_RESOURCES_IBY__ \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/rom/cbsui.iby --- a/cbs/cbsui/rom/cbsui.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* 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: CBS rom build file -* -*/ - - -#ifndef __CBSUI_IBY__ -#define __CBSUI_IBY__ - -#ifdef __CELL_BROADCAST - -file=ABI_DIR\BUILD_DIR\cbsui.exe SHARED_LIB_DIR\cbsui.exe -data=ZSYSTEM\install\cbsui_stub.sis system\install\cbsui_stub.sis -data=ZPRIVATE\10003a3f\import\apps\cbsui_reg.rsc private\10003a3f\import\apps\cbsui_reg.rsc - -#endif // __CELL_BROADCAST - -#endif // __CBSUI_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/rom/cbsui_stub.pkg --- a/cbs/cbsui/rom/cbsui_stub.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -; -; 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: For packing cbs application stub. -; -; Languages -&EN - -; Header -#{"cbsui"}, (0x101F4CD3), 1, 0, 0, TYPE=SA - -; Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -; Files -""-"z:\sys\bin\cbsui.exe" -""-"z:\resource\apps\cbsui.rsc" -""-"z:\private\10003a3f\import\apps\cbsui_reg.rsc" diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/rom/cbsui_stub.sis Binary file cbs/cbsui/rom/cbsui_stub.sis has changed diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/sis/cbsui.pkg --- a/cbs/cbsui/sis/cbsui.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -; -; 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: For packing cbs application stub. -; -; Languages -&EN - -; Header -#{"cbsui"}, (0x101F4CD3), 10, 1, 0, TYPE=PU - -; Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -;Supports Series 60 v 5.0 -[0x1028315F], 0, 0, 0, {"Series60ProductID"} - -; Files -"\epoc32\RELEASE\armv5\UREL\cbsui.exe"-"c:\sys\bin\cbsui.exe" -"\epoc32\data\z\resource\apps\cbsui.rsc"-"c:\resource\apps\cbsui.rsc" -"\epoc32\data\z\private\10003a3f\import\apps\cbsui_reg.rsc"-"c:\private\10003a3f\import\apps\cbsui_reg.rsc" \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/cbsuimainwindow.cpp --- a/cbs/cbsui/src/cbsuimainwindow.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* 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: -* -*/ - -#include "rcbsui.h" -#include "cbsuiviewmanager.h" -#include "cbslog.h" - -#include "cbsuimainwindow.h" - -// ======== MEMBER FUNCTIONS ================================================== - -// ---------------------------------------------------------------------------- -// CbsUiMainWindow::CbsUiMainWindow -// ---------------------------------------------------------------------------- -// -CbsUiMainWindow::CbsUiMainWindow() -{ - LOG(NORMAL,"CBSUI: CbsUiMainWindow::CbsUiMainWindow IN"); - // Create connection to the server. SYMBIAN/S60 CODE - mServer = new RCbsUi; - if ( mServer ) { - // Connect Cbs Server - int result = mServer->Connect(); - LOG2(NORMAL,"CBSUI: CbsUiMainWindow::CbsUiMainWindow \ - connect server %d", result); - // Construct the view manager. - mViewManager = new CbsUiViewManager(this, *mServer); - } - LOG(NORMAL,"CBSUI: CbsUiMainWindow::CbsUiMainWindow OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiMainWindow::~CbsUiMainWindow -// ---------------------------------------------------------------------------- -// -CbsUiMainWindow::~CbsUiMainWindow() -{ - LOG(NORMAL,"CBSUI: CbsUiMainWindow::~CbsUiMainWindow IN"); - mServer->Close(); - delete mServer; - LOG(NORMAL,"CBSUI: CbsUiMainWindow::~CbsUiMainWindow OUT"); -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/cbsuitopiclistview.cpp --- a/cbs/cbsui/src/cbsuitopiclistview.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,896 +0,0 @@ -/* -* 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: -* -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "cbsuitopiclistview.h" -#include "cbsuiviewmanager.h" -#include "rcbsui.h" -#include "cbslog.h" -#include "cbsuiconstants.h" -#include "ccbsuitopiclistmonitor.h" - -// DocML usage -const char *T_TOPIC_LIST = "t:ListWidget"; -const char *T_TOPICINDEX = "t:topicIndex"; -// other items (for decoration) -const char *T_LABEL = "t:label"; - -const char *T_TOGGLE_RECEPTION = "t:toggle_reception"; -const char *T_ADD_TOPIC = "t:add_topic"; - -// Options menu -const char *T_EXIT = "t:exit"; - -const char *T_OPEN = "t:open"; -const char *T_SUBSCRIBE = "t:subscribe"; -const char *T_UNSUBSCRIBE = "t:unsubscribe"; -const char *T_HOTMARK = "t:hotmark"; -const char *T_UNHOTMARK = "t:unhotmark"; -const char *T_DELETE = "t:delete"; -const char *T_EDIT = "t:edit"; - -// ======== MEMBER FUNCTIONS ================================================== - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::CbsUiTopicListView -// ---------------------------------------------------------------------------- -CbsUiTopicListView::CbsUiTopicListView() - : HbView(), - mServer(NULL), - mViewManager(NULL), - mTopicRow(-1), - mTopicIndexWidget(NULL), - mTopicsWidget(NULL), - mReceptionButton(NULL), - mOpenAction(NULL), - mSubscibeAction(NULL), - mUnSubscibeAction(NULL), - mHotmarkAction(NULL), - mUnHotmarkAction(NULL), - mEditAction(NULL), - mDeleteAction(NULL), - mMonitor(NULL), - mTopicQuery(NULL), - mTopicNumberList(NULL) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::CbsUiTopicListView IN"); - mTopicNumberList = new TCbsUiTopicNumberList(KNumberOfStandardTopics); - QT_TRAP_THROWING(mTopicNumberList->AppendL(0)); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::CbsUiTopicListView OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::~CbsUiTopicListView -// ---------------------------------------------------------------------------- -CbsUiTopicListView::~CbsUiTopicListView() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::~CbsUiTopicListView IN"); - delete mTopicNumberList; - LOG(NORMAL,"CBSUI: CbsUiTopicListView::~CbsUiTopicListView OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::init -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::init(MCbs &server, - CbsUiViewManager &viewManager) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::init IN"); - mViewManager = &viewManager; - LOG(NORMAL,"CBSUI: CbsUiTopicListView::init 1"); - mServer = &server; - LOG(NORMAL,"CBSUI: CbsUiTopicListView::init 2"); - // First get pointers to UI components - createComponents(); - - // Update reception status to UI - TBool status; //Symbian variable.. - mServer->GetReceptionStatus(status); - if (status) { - LOG(NORMAL,"CBSUI: CbsUiTopicListView::init reception ON"); - mReceptionButton->setText(hbTrId("txt_cbs_deactivate")); - } else { - LOG(NORMAL,"CBSUI: CbsUiTopicListView::init reception OFF"); - mReceptionButton->setText(hbTrId("txt_cbs_activate")); - } - - // Update Topic index and Topics - reloadTopicIndex(); - reloadTopics(); - - // Symbian code, leave etc to be handled. - // QT_TRAP_THROWING( mMonitor = CCbsUiTopicListMonitor::NewL( *mServer ) ); - // mMonitor->AddObserverL( this ); - // Longpress in topic list, this is needed always - bool ret(false); - - // conntect topic index list widget operation - ret = connect(mTopicIndexWidget, - SIGNAL(longPressed(HbListWidgetItem *, QPointF)), - this, SLOT(showTopicIndexMenu(HbListWidgetItem *, QPointF))); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect \ - TopicIndex long press %d", ret); - - ret = connect(mTopicIndexWidget, SIGNAL(activated(HbListWidgetItem *)), - this, SLOT(showTopicSelectionView(HbListWidgetItem *))); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect \ - TopicIndex short press %d", ret); - - // conntect topics list widget operation - ret = connect(mTopicsWidget, - SIGNAL(longPressed(HbListWidgetItem*, QPointF)), - this, SLOT(showTopicsMenu(HbListWidgetItem *, QPointF))); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect\ - Topics long press %d", ret); - - ret = connect(mTopicsWidget, SIGNAL(activated(HbListWidgetItem *)), - this, SLOT(showTopicView(HbListWidgetItem *))); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect \ - topics short press %d", ret); - - // connect reception action - ret = connect(mReceptionButton, SIGNAL(triggered(bool)), - this, SLOT(toggleReception())); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect reception %d", ret); - - // Open - mOpenAction = qobject_cast( - mViewManager->xmlLoader()->findObject(T_OPEN)); - ret = connect(mOpenAction, SIGNAL(triggered()), - this, SLOT(showTopicView())); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init open %d", ret) - - // Subscribe - mSubscibeAction = qobject_cast( - mViewManager->xmlLoader()->findObject(T_SUBSCRIBE)); - ret = connect(mSubscibeAction, SIGNAL(triggered()), - this, SLOT(toggleSubscription())); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init subscribe %d", ret) - - // UnSubscribe - mUnSubscibeAction = qobject_cast( - mViewManager->xmlLoader()->findObject(T_UNSUBSCRIBE)); - ret = connect(mUnSubscibeAction, SIGNAL(triggered()), - this, SLOT(toggleSubscription())); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init subscribe %d", ret) - - // Hotmark - mHotmarkAction = qobject_cast( - mViewManager->xmlLoader()->findObject(T_HOTMARK)); - ret = connect(mHotmarkAction, SIGNAL(triggered()), - this, SLOT(toggleHotmark())); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init hotmark %d", ret) - - // UnHotmark - mUnHotmarkAction = qobject_cast( - mViewManager->xmlLoader()->findObject(T_UNHOTMARK)); - ret = connect(mUnHotmarkAction, SIGNAL(triggered()), - this, SLOT(toggleHotmark())); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init hotmark %d", ret) - - // Edit - mEditAction = qobject_cast( - mViewManager->xmlLoader()->findObject(T_EDIT)); - ret = connect(mEditAction, SIGNAL(triggered()) , - this, SLOT(editTopic())); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init edit %d", ret) - - // Delete - mDeleteAction = qobject_cast( - mViewManager->xmlLoader()->findObject(T_DELETE)); - ret = connect(mDeleteAction, SIGNAL(triggered()), - this, SLOT(deleteTopic())); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init delete %d", ret) - - LOG(NORMAL,"CBSUI: CbsUiTopicListView::init OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::TopicListChangedL -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::TopicListChangedL(TCbsTopicListEvent /*aEvent*/, - TCbsTopicNumber /*aTopicNumber*/ ) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::TopicListChangedL IN"); - reloadTopicIndex(); - reloadTopics(); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::TopicListChangedL OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::createComponents -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::createComponents() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents IN"); - // The topic index widget - mTopicIndexWidget = qobject_cast( - mViewManager->xmlLoader()->findWidget(T_TOPICINDEX)); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\ - mTopicIndexWidget=%d", mTopicIndexWidget) - - // The topic list widget - mTopicsWidget = qobject_cast( - mViewManager->xmlLoader()->findWidget(T_TOPIC_LIST)); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\ - mTopicsWidget=%d", mTopicsWidget) - - // Button for changing reception status - mReceptionButton = qobject_cast( - mViewManager->xmlLoader()->findObject(T_TOGGLE_RECEPTION)); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\ - mReceptionButton=%d", mReceptionButton) - - // Connect signals of DocML objects - HbAction *addTopic = qobject_cast( - mViewManager->xmlLoader()->findObject(T_ADD_TOPIC)); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\ - addTopic=%d", addTopic) - connect(addTopic, SIGNAL(triggered(bool)), this, SLOT(addTopic())); - - HbAction *exit = qobject_cast( - mViewManager->xmlLoader()->findObject(T_EXIT)); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\ - exit=%d", exit) - connect(exit, SIGNAL(triggered(bool)), mViewManager, SLOT(close())); - - LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents OUT") -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::reloadTopicIndex -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::reloadTopicIndex() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopicIndex IN") - if (mTopicIndexWidget && mTopicNumberList) { - LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopicIndex reload") - HbListWidgetItem *item = new HbListWidgetItem(); - - TCbsTopic topic; - mServer->GetTopic(0, topic); - mTopicNumberList->At(0) = 0; - - updateItem(*item, topic); - mTopicIndexWidget->clear(); - mTopicIndexWidget->addItem(item); - - // Connect signal to indicate topic selection - connect(mTopicIndexWidget, SIGNAL(activated(HbListWidgetItem *)), - this, SLOT(showTopicSelectionView(HbListWidgetItem *))); - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopicIndex OUT") -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::reloadTopics -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::reloadTopics() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopics IN"); - if (mTopicNumberList && mTopicsWidget) { - int count(0); - mServer->GetTopicCount(count); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopics total count %d", - count); - // Reset first - mTopicNumberList->Reset(); - QT_TRAP_THROWING(mTopicNumberList->AppendL(0)); - mTopicsWidget->clear(); - - // Add updated topics one by one - for (int i = 1; i < count; i++) { - TCbsTopic topic; - mServer->GetTopic(i, topic); - QT_TRAP_THROWING(mTopicNumberList->AppendL(topic.iNumber)); - HbListWidgetItem *item = new HbListWidgetItem(); - updateItem(*item, topic); - mTopicsWidget->addItem(item); - - // Connect signal to indicate topic selection - connect(mTopicsWidget, SIGNAL(activated(HbListWidgetItem *)), - this, SLOT(showTopicView(HbListWidgetItem *))); - } - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopics OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::showTopicSelectionView -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::showTopicSelectionView(HbListWidgetItem */*item*/) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicSelectionView IN"); - mTopicRow = 0; - if (mTopicNumberList) { - TInt messages(0); - mServer->GetMessageCount(0, messages); - if (messages) { - // TODO: show topic selection view - } - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicSelectionView OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::showTopicView -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::showTopicView(HbListWidgetItem *item) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::topicSelection IN"); - mTopicRow = mTopicsWidget->row(item)+1; - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::topicSelection index=%d", - mTopicRow); - if (mTopicNumberList) { - TCbsTopicNumber selectTopic(mTopicNumberList->At(mTopicRow)); - TInt messages(0); - mServer->GetMessageCount(selectTopic, messages); - if (messages) { - // it will be reopened - // mViewManager->activateTopicView(selectTopic); - } - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::topicSelection OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::addTopic -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::addTopic() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::addTopic IN"); - // Handle not OK cases, KErrAlreadyExists, KErrArgument, KErrDiskFull - // Todo: Add from index if it is available - TCbsTopic topic; - if (showTopicQuery(topic, true) && - KErrNone == mServer->AddTopic(topic)) { - reloadTopics(); - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::addTopic OUT"); -} - - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::editTopic -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::editTopic() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::editTopic IN"); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::editTopic mTopicRow=%d", mTopicRow) - TInt count(0); - mServer->GetTopicCount(count); - if (mTopicRow > 0 && mTopicRow < count) { - // Get topic we need to edit - TCbsTopic topic; - mServer->GetTopic(mTopicRow, topic); - TCbsTopicNumber oldTopicNumber = topic.iNumber; - TCbsTopicNumber newTopicNumber(EMaxTopicNumber); - TCbsTopicName newTopicName; - if (showTopicQuery(topic, false)) { - newTopicNumber = topic.iNumber; - newTopicName = topic.iName; - } - TInt err = mServer->ChangeTopicNameAndNumber(oldTopicNumber, - newTopicNumber, newTopicName); - if (KErrNone == err) { - reloadTopics(); - } - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::editTopic OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::deleteTopic -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::deleteTopic() - { - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::deleteTopic IN row %d", mTopicRow); - TInt count(0); - mServer->GetTopicCount(count); - if (mTopicRow > 0 && mTopicRow < count) { - // user confirmation - HbMessageBox *box = new HbMessageBox(hbTrId("txt_cbs_delete_topic"), - HbMessageBox::MessageTypeQuestion); - HbAction *action = box->exec(); - if (action == box->primaryAction()) { - TCbsTopicNumber selectTopic(mTopicNumberList->At(mTopicRow)); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::deleteTopic topic number %d", - selectTopic); - if (KErrNone == mServer->DeleteTopic(selectTopic)) { - reloadTopics(); - } - } - delete box; - box = NULL; - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::deleteTopic OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::toggleReception -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::toggleReception() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::ToggleReception IN"); - TBool status; //Symbian variable.. - mServer->GetReceptionStatus(status); - - if (status) { - // Deactivate reception and switch the text on UI - LOG(NORMAL,"CBSUI: CbsUiTopicListView::ToggleReception 1->0"); - mServer->SetReceptionStatus(EFalse); - - mReceptionButton->setText( hbTrId("txt_cbs_activate") ); - } else { - LOG(NORMAL,"CBSUI: CbsUiTopicListView::ToggleReception 0->1"); - // Activate reception and switch the text on UI - mServer->SetReceptionStatus(ETrue); - mReceptionButton->setText(hbTrId("txt_cbs_deactivate")); - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::ToggleReception OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::toggleHotmark -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::toggleHotmark() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark IN") - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark\ - mTopicRow %d", mTopicRow); - TInt count(0); - mServer->GetTopicCount(count); - if (mTopicRow >= 0 && mTopicRow < count) { - // Update data - TCbsTopic topic; - mServer->GetTopic(mTopicRow, topic); - LOG3(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark\ - before toggle hormark (S,H)=(%d,%d)", - topic.iSubscribed, topic.iHotmarked); - - if (topic.iHotmarked) { - mServer->ChangeTopicHotmarkStatus(topic.iNumber, EFalse); - mServer->ChangeTopicSubscriptionStatus(topic.iNumber, ETrue); - topic.iHotmarked = EFalse; - topic.iSubscribed = ETrue; - } else { - if (topic.iSubscribed){ - mServer->ChangeTopicHotmarkStatus(topic.iNumber, ETrue); - topic.iHotmarked = ETrue; - } else { - mServer->ChangeTopicHotmarkStatus(topic.iNumber, ETrue); - mServer->ChangeTopicSubscriptionStatus(topic.iNumber, ETrue); - topic.iHotmarked = ETrue; - topic.iSubscribed = ETrue; - } - } - LOG3(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark\ - after toggle hotmark (S,H)=(%d,%d)", - topic.iSubscribed, topic.iHotmarked); - // Update icon - updateCurrentItemIcon(topic); - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark OUT") -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::toggleSubscription -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::toggleSubscription() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubsciption IN") - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubsciption mTopicRow=%d", - mTopicRow) - TInt count(0); - mServer->GetTopicCount(count); - if (mTopicRow >= 0 && mTopicRow < count) { - TCbsTopic topic; - mServer->GetTopic(mTopicRow, topic); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubsciption\ - topic number %d", topic.iNumber); - LOG3(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubscription\ - before toggle subscibe (S,H)=(%d,%d)", - topic.iSubscribed, topic.iHotmarked); - - if (topic.iSubscribed) { - if (topic.iHotmarked) { - mServer->ChangeTopicHotmarkStatus(topic.iNumber, EFalse); - topic.iHotmarked = EFalse; - } - mServer->ChangeTopicSubscriptionStatus(topic.iNumber, EFalse); - topic.iSubscribed = EFalse; - } else { - mServer->ChangeTopicSubscriptionStatus(topic.iNumber, ETrue); - topic.iSubscribed = ETrue; - } - LOG3(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubscription\ - after toggle subscibe (S,H)=(%d,%d)", - topic.iSubscribed, topic.iHotmarked); - // Update icon - updateCurrentItemIcon(topic); - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubsciption OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::showTopicIndexMenu -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::showTopicIndexMenu(HbListWidgetItem *item, QPointF coords) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicIndexMenu IN"); - Q_UNUSED(item); - mTopicRow = 0; - TCbsTopic topic; - mServer->GetTopic(0, topic); - LOG3(NORMAL,"CBSUI: CbsUiTopicListView::showTopicIndexMenu (row %d: %d)", - mTopicRow, topic.iNumber); - showPopupMenu(topic, coords); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicIndexMenu OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::showTopicsMenu -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::showTopicsMenu(HbListWidgetItem *item, QPointF coords) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicsMenu IN"); - mTopicRow = mTopicsWidget->row(item)+1; - TCbsTopic topic; - mServer->GetTopic(mTopicRow, topic); - LOG3(NORMAL,"CBSUI: CbsUiTopicListView::showTopicsMenu (row %d: %d)", - mTopicRow, topic.iNumber); - showPopupMenu(topic, coords); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicsMenu OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::showPopupMenu -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::showPopupMenu(const TCbsTopic &topic, QPointF coords) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showPopupMenu IN"); - HbMenu *contextMenu = new HbMenu(); - contextMenu->setTimeout(HbPopup::NoTimeout); - contextMenu->setDismissPolicy(HbPopup::TapOutside); - - TInt messageCount(0); - mServer->GetMessageCount(topic.iNumber, messageCount); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showPopupMenu\ - messageCount=%d", messageCount) - - // Open - if (topic.iNumber && messageCount) { - contextMenu->addAction(mOpenAction); - } - // Subscribe / UnSubscribe - if (topic.iSubscribed) { - contextMenu->addAction(mUnSubscibeAction); - } else { - contextMenu->addAction(mSubscibeAction); - } - // Hotmark / UnHotmark - if (topic.iHotmarked) { - contextMenu->addAction(mUnHotmarkAction); - } else { - contextMenu->addAction(mHotmarkAction); - } - // Edit & Delete - if (topic.iNumber) { - contextMenu->addAction(mEditAction); - contextMenu->addAction(mDeleteAction); - } - - // Show context sensitive menu. - contextMenu->exec(coords); - contextMenu->clearActions(); - delete contextMenu; - contextMenu = NULL; - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showPopupMenu OUT") -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::updateQueryAction -// ---------------------------------------------------------------------------- -// -void CbsUiTopicListView::updateQueryAction( QString text ) -{ - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateQueryAction IN" ) - LOG2(NORMAL, "SATAPP: CbsUiTopicListView::updateQueryAction text=%s", - text.utf16()) - if (mTopicQuery && text.length() > 0) { - mTopicQuery->primaryAction()->setEnabled(true); - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateQueryAction enable OK") - } - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateQueryAction OUT" ) -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::updateItem -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::updateItem(HbListWidgetItem &item, - const TCbsTopic &topic) -{ - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateItem IN" ) - updateItemText(item, topic); - updateItemIcon(item, topic); - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateItem OUT" ) -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::updateItemIcon -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::updateItemIcon(HbListWidgetItem &item, - const TCbsTopic &topic) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon IN"); - // TODO: what is the correct way to handle graphics (SVG?) - - if (topic.iSubscribed) { - if (topic.iHotmarked) { - item.setDecorationIcon(HbIcon(":/icons/icons/hotmark2.png")); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon Hotmarked"); - } else { - item.setDecorationIcon(HbIcon(":/icons/icons/sub2.png")); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon Subscribed"); - } - } else { - // No icon if not subscribted: - // List item without an icon is alligned on left (looks bad) - // temporary solution is to use empty icon - item.setDecorationIcon(HbIcon(":/icons/icons/empty.png")); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon Empty"); - } - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::updateItemText -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::updateItemText(HbListWidgetItem &item, - const TCbsTopic &topic) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemText IN"); - QString txtL1; - QString txtL2; - if (0 == topic.iNumber) { - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemText topic index"); - txtL1 = hbTrId("txt_cbs_000_topic_index"); - txtL2 = hbTrId("txt_cbs_not_available"); - } else { - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemText topics"); - txtL1 = QVariant(topic.iNumber).toString(); - txtL2 = hbTrId("txt_cbs_no_messages"); - // instert zeros to topic number in case 2 or 1 digit topic number. - switch (txtL1.length()) { - case 1: - { - txtL1.insert(0, "0"); - txtL1.insert(0, "0"); - break; - } - case 2: - { - txtL1.insert(0, "0"); - break; - } - default: - { - break; - } - // do nothing - } - - txtL1.append(' '); // a space - QString name = QString::fromUtf16(topic.iName.Ptr(), topic.iName.Length()); - txtL1.append(name); - if (topic.iUnreadMessages) { - txtL1.append(" ("); // space + ( - txtL1.append(QVariant(topic.iUnreadMessages).toString()); - txtL1.append(')'); // closing ) - } - // Update the status of topic - TInt numberOfMessages(0); - mServer->GetMessageCount(topic.iNumber, numberOfMessages); - if (numberOfMessages) { - TCbsMessage message; - TBuf buffer; // symbian code - // take the last message, not sure is this correct - TInt err = mServer->GetMessage(topic.iNumber, - numberOfMessages - 1, message); - if (KErrNone == err) { - err = mServer->GetMessageContents(message.iHandle, buffer); - txtL2 = QString::fromUtf16(buffer.Ptr(), buffer.Length()); - // TODO: timestamp and second text line - } - } - } - item.setText(txtL1); - item.setSecondaryText(txtL2); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemText OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::updateCurrentItem -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::updateCurrentItem(const TCbsTopic &topic) -{ - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItem IN" ) - LOG2(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItem row=%d", - mTopicRow) - updateCurrentItemIcon(topic); - updateCurrentItemText(topic); - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItem OUT" ) -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::updateCurrentItemIcon -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::updateCurrentItemIcon(const TCbsTopic &topic) -{ - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemIcon IN" ) - LOG2(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemIcon row=%d", - mTopicRow) - HbListWidgetItem *list = NULL; - if (0 == mTopicRow) { - list = mTopicIndexWidget->item(0); - } else { - list = mTopicsWidget->item(mTopicRow - 1); - } - updateItemIcon(*list, topic); - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemIcon OUT" ) -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::updateCurrentItemText -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::updateCurrentItemText(const TCbsTopic &topic) -{ - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemText IN" ) - LOG2(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemText row=%d", - mTopicRow) - HbListWidgetItem *list = NULL; - if (0 == mTopicRow) { - list = mTopicIndexWidget->item(0); - } else { - list = mTopicsWidget->item(mTopicRow - 1); - } - updateItemText(*list, topic); - LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemText OUT" ) -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::showTopicQuery -// ---------------------------------------------------------------------------- -bool CbsUiTopicListView::showTopicQuery(TCbsTopic &topic, const bool isAddTopic) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery IN"); - bool ret = false; // user didn't click OK - // Compose dialog - mTopicQuery = new HbInputDialog(); - mTopicQuery->setSecondRowVisible(true); - // Name - mTopicQuery->setInputMode(HbInputDialog::TextInput, 0); - mTopicQuery->lineEdit(0)->setMaxLength(KMaxTopicNameLength); - QString name = QString::fromUtf16(topic.iName.Ptr(), topic.iName.Length()); - if (name.length()) { - mTopicQuery->setTextValue(QVariant(name), 0); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery old name %s", - name.utf16()); - } - - // Number - mTopicQuery->setInputMode(HbInputDialog::IntInput, 1); - mTopicQuery->lineEdit(1)->setMaxLength(3); - int number = topic.iNumber; - if (number){ - mTopicQuery->setTextValue(QVariant(number), 1); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery old number%d", number); - } - - mTopicQuery->setPromptText(hbTrId("txt_cbs_topic_name"), 0); - mTopicQuery->setPromptText(hbTrId("txt_cbs_topic_number"), 1); - - // Disable OK button if invalid topic number input - HbAction *perimaryAction = mTopicQuery->primaryAction(); - perimaryAction->setEnabled(false); - connect(mTopicQuery->lineEdit(1), SIGNAL(textChanged(QString)), - this, SLOT( updateQueryAction(QString))); - - // Add validation for topic number (1-999) - HbValidator *val =new HbValidator; - QRegExp r("\\d{1,3}"); // from 1 to 3 digits - val->setMasterValidator(new QRegExpValidator(r,0)); - val->addField(new QIntValidator(1,999,0),""); - mTopicQuery->setValidator(val, 1); - - // Show the dialog - HbAction *action = mTopicQuery->exec(); - - // Fatch name and number from dialog - name = mTopicQuery->value(0).toString(); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery name=%s ", name.utf16()); - number = mTopicQuery->value(1).toString().toInt(); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery number=%d ", number); - bool isNumberExist(false); - if (isAddTopic) { - int count(0); - mServer->GetTopicCount(count); - LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery topic total count %d", - count); - // Check if there is a toipc number same as number which user add - for (int i = 1; i < count; i++) { - TCbsTopic currentTopic; - mServer->GetTopic(i, currentTopic); - if (currentTopic.iNumber == number) { - isNumberExist = true; - break; - } - } - } - - // check that a topic number was entered and ok pressed - // name is optional - if (action == mTopicQuery->primaryAction()) { - if ( isNumberExist || !number){ - // 000 topic and exist number topic can't be edited - showNumberInUsePopup(); - showTopicQuery( topic, isAddTopic); - } else { - ret = true; - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery OK") - topic.iNumber = number; - topic.iSubscribed = ETrue; - topic.iHotmarked = EFalse; - if (name.length()) { - topic.iName = name.utf16(); - } - } - } - delete mTopicQuery; - mTopicQuery = NULL; - - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery OUT"); - return ret; -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicListView::showNumberInUsePopup -// ---------------------------------------------------------------------------- -void CbsUiTopicListView::showNumberInUsePopup() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showNumberInUsePopup IN"); - HbMessageBox *inUsedPopup = new HbMessageBox(HbMessageBox::MessageTypeWarning); - inUsedPopup->setText(tr("topic number already in use ")); - inUsedPopup->exec(); - delete inUsedPopup; - inUsedPopup = NULL; - LOG(NORMAL,"CBSUI: CbsUiTopicListView::showNumberInUsePopup OUT"); -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/cbsuitopicview.cpp --- a/cbs/cbsui/src/cbsuitopicview.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +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 "cbsuitopicview.h" -#include "cbsuiviewmanager.h" -#include "rcbsui.h" -#include "cbslog.h" -#include "cbsuiconstants.h" - -const char *T_TITLE = "listWidget2"; -const char *T_PREVIOUS= "action"; -const char *T_BACK= "action_2"; - -// ======== MEMBER FUNCTIONS ================================================== - -// ---------------------------------------------------------------------------- -// CbsUiTopicView::CbsUiTopicView -// ---------------------------------------------------------------------------- -CbsUiTopicView::CbsUiTopicView() - : HbView(), - mServer(NULL), - mViewManager(NULL), - mTopic(NULL), - mCurrentTopicNumber(NULL) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicView::CbsUiTopicView IN"); - - LOG(NORMAL,"CBSUI: CbsUiTopicView::CbsUiTopicView OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicView::~CbsUiTopicView -// ---------------------------------------------------------------------------- -CbsUiTopicView::~CbsUiTopicView() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicView::~CbsUiTopicView IN"); - LOG(NORMAL,"CBSUI: CbsUiTopicView::~CbsUiTopicView OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicView::init -// ---------------------------------------------------------------------------- -void CbsUiTopicView::init(MCbs &server, CbsUiViewManager &viewManager) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicView::init IN"); - mViewManager = &viewManager; - mServer = &server; - createComponents(); - LOG(NORMAL,"CBSUI: CbsUiTopicView::init OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicView::TopicListChangedL -// ---------------------------------------------------------------------------- -void CbsUiTopicView::TopicListChangedL(TCbsTopicListEvent /*aEvent*/, - TCbsTopicNumber /*aTopicNumber*/) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicView::TopicListChangedL IN"); - /*if (mTopic && - mCurrentTopicNumber == aTopicNumber && - ECbsTopicReceivedNewMessage == aEvent) { - reloadMessages(aTopicNumber); - } */ - LOG(NORMAL,"CBSUI: CbsUiTopicView::TopicListChangedL OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicView::createComponents -// ---------------------------------------------------------------------------- -void CbsUiTopicView::createComponents() -{ - LOG(NORMAL,"CBSUI: CbsUiTopicView::createComponents IN"); - - mTopic = qobject_cast( - mViewManager->xmlLoader()->findWidget(T_TITLE)); - LOG2(NORMAL,"CBSUI: CbsUiTopicView::createComponents mTopic=%d", mTopic); - - // Previous Action - mPrevious = qobject_cast( - mViewManager->xmlLoader()->findObject(T_PREVIOUS)); - - if (!mPrevious) { - LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\ - mPrevious faild"); - } - - // Back Action - mBack = qobject_cast( - mViewManager->xmlLoader()->findObject(T_BACK)); - - if (!mBack) { - LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\ - mBack faild"); - } else { - connect(mBack, SIGNAL(triggered(bool)), mViewManager, SLOT(activateMainView())); - LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\ - mBack successfully"); - } - - LOG(NORMAL,"CBSUI: CbsUiTopicView::createComponents OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicView::reloadMessages -// ---------------------------------------------------------------------------- -void CbsUiTopicView::reloadMessages(TCbsTopicNumber topicNumber) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicView::reloadMessages IN"); - mCurrentTopicNumber = topicNumber; - // Update topic details - HbListWidgetItem* listItem = new HbListWidgetItem(); - TCbsTopic topic; - - mServer->GetTopic(mCurrentTopicNumber, topic); - - // Clear first - mTopic->clear(); - QString name = QString::fromUtf16(topic.iName.Ptr(), topic.iName.Length()); - QString numberAndName = QVariant(topic.iNumber).toString(); - // instert zeros to topic number in case 2 or 1 digit topic number. - switch (numberAndName.length()) { - case 1: - { - numberAndName.insert(0, "0"); - numberAndName.insert(0, "0"); - break; - } - case 2: - { - numberAndName.insert(0, "0"); - break; - } - default:{} - // do nothing - } - - listItem->setText(numberAndName); - //updateStatusIcon(*listItem, topic); - mTopic->addItem(listItem); - listItem = NULL; - LOG(NORMAL,"CBSUI: CbsUiTopicView::reloadMessages OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiTopicView::addMessage -// ---------------------------------------------------------------------------- -void CbsUiTopicView::addMessage(const TCbsMessage& /*message*/, - const QString& /*msgName*/) -{ - LOG(NORMAL,"CBSUI: CbsUiTopicView::addMessage IN"); - LOG(NORMAL,"CBSUI: CbsUiTopicView::addMessage OUT"); -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/cbsuiutility.cpp --- a/cbs/cbsui/src/cbsuiutility.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -/* -* Copyright (c) 2002 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: -* Implementation of CbsUiClenaupHandler -* -* -*/ - - -// INCLUDES -#include "CbsUiUtility.h" -#include "MSaveMessageController.h" -#include "CbsUiDebug.h" -#include "MCbs.h" - - - -// =================== MEMBER FUNCTIONS ==================== - - -// --------------------------------------------------------- -// CbsUiUtility::ShowConfirmationNoteL -// -// -// --------------------------------------------------------- -// -void CbsUiUtility::ShowConfirmationNoteL( - const TInt aResourceId, TBool aWaitingDialog ) - { - /*HBufC* text = CCoeEnv::Static()->AllocReadResourceLC(aResourceId); - CAknConfirmationNote* note = - new (ELeave) CAknConfirmationNote(aWaitingDialog); - note->ExecuteLD(*text); - CleanupStack::PopAndDestroy(text);*/ - } - -// --------------------------------------------------------- -// CbsUiUtility::ShowErrorNoteL -// -// -// --------------------------------------------------------- -// -void CbsUiUtility::ShowErrorNoteL( const TInt aResourceId ) - { - /*HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId ); - CAknErrorNote* note = new (ELeave) CAknErrorNote; - note->ExecuteLD( *text ); - CleanupStack::PopAndDestroy( text );*/ - } - -// --------------------------------------------------------- -// CbsUiUtility::ShowWarningNoteL -// -// -// --------------------------------------------------------- -// -void CbsUiUtility::ShowWarningNoteL( const TInt aResourceId ) - { - /* HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId ); - CAknWarningNote* note = new (ELeave) CAknWarningNote; - note->ExecuteLD( *text ); - CleanupStack::PopAndDestroy( text );*/ - } - -// --------------------------------------------------------- -// CbsUiUtility::CreateEmptyNavigationPaneL -// -// -// --------------------------------------------------------- -// -/*CAknNavigationDecorator* CbsUiUtility::CreateEmptyNavigationPaneL() - { - CEikStatusPane* statusPane = - STATIC_CAST( CAknAppUi*, - CEikonEnv::Static()->EikAppUi() )->StatusPane(); - - CAknNavigationControlContainer* naviContainer = - STATIC_CAST( CAknNavigationControlContainer*, statusPane-> - ControlL(TUid::Uid(EEikStatusPaneUidNavi)) ); - - CAknNavigationDecorator* decorator; - decorator = naviContainer->CreateNavigationLabelL(); - - naviContainer->PushL(*decorator); - - return decorator; - }*/ - -// --------------------------------------------------------- -// CbsUiUtility::IsSavedL -// -// -// --------------------------------------------------------- -// -TBool CbsUiUtility::IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer ) - { - /*__ASSERT_DEBUG(&aServer, CbsUiPanic(EErrNullPointer) ); - __ASSERT_DEBUG(aServer.Connected(), CbsUiPanic(EErrServerDisconnected) ); - - TCbsMessage message; - - TInt ret = aServer.FindMessageByHandle(aHandle, message); - - __CBSUI_ASSERT( ret == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) ); - - User::LeaveIfError(ret); - TBool saved(EFalse); - - if ( message.iPermanent ) - { - saved = ETrue; - } - */ - return EFalse; //saved; - } - -// --------------------------------------------------------- -// CbsUiUtility::SaveCurrentMessageL -// -// -// --------------------------------------------------------- -// -TInt CbsUiUtility::SaveCurrentMessageL( - const TCbsMessageHandle aHandle, MSaveMessageController& aSaver ) - { - /* __ASSERT_DEBUG(&aSaver, CbsUiPanic(EErrNullPointer) ); - - TInt resultCode( aSaver.SaveMessage(aHandle) ); - - switch ( resultCode ) - { - case KErrDiskFull: - { - User::Leave( KErrDiskFull ); - break; - } - case KErrNone: // Normal case - { - // do nothing - break; - } - default: - { - //CbsUiUtility::ShowErrorNoteL(R_TEXT_NOTE_MEMORY_FULL_ERROR); - break; - } - } */ - - return 0; //resultCode; - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/cbsuiviewmanager.cpp --- a/cbs/cbsui/src/cbsuiviewmanager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* 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: -* -*/ - -#include -#include -#include -#include - -#include "cbsuiviewmanager.h" -#include "cbsuitopiclistview.h" -#include "cbsuitopicview.h" -#include "mcbs.h" -#include "cbslog.h" - -const char *CBS_APP_XML = ":/xml/cbs_app.docml"; -const char *CBS_TOPIC_VIEW_XML = ":/xml/cbs_topic_view.docml"; -const char *CBS_MAIN_VIEW = "t:view"; -const char *CBS_TOPIC_VIEW ="t:view2"; - -// ======== MEMBER FUNCTIONS ================================================== -// ---------------------------------------------------------------------------- -// CbsUiViewManager::CbsUiViewManager -// ---------------------------------------------------------------------------- -// -CbsUiViewManager::CbsUiViewManager(HbMainWindow *window, MCbs &server) - :mMainWindow(window), - mServer(server), - mTopicListView(NULL), - mTopicView(NULL), - mLoader(NULL), - mSoftKeyBackAction(NULL), - mSoftKeyExitAction(NULL) -{ - LOG(NORMAL,"CBSUI: CbsUiViewManager::CbsUiViewManager IN"); - - // SYMBIAN CODE: - //mTopicMonitor = CCbsUiTopicListMonitor::NewL(mServer); not in use at the moment - - bool ok = false; - mLoader = new CbsUiDocumentLoader(); - // ownership of the objects are transferred to caller - mObjects = mLoader->load(CBS_APP_XML, &ok); - if (ok) { - activateMainView(); - } else { - LOG(NORMAL,"CBSUI: CbsUiViewManager::CbsUiViewManager DocML failure!"); - } - - LOG(NORMAL,"CBSUI: CbsUiViewManager::CbsUiViewManager OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiViewManager::~CbsUiViewManager -// ---------------------------------------------------------------------------- -// -CbsUiViewManager::~CbsUiViewManager() -{ - LOG(NORMAL,"CBSUI: CbsUiViewManager::~CbsUiViewManager IN"); - //delete mTopicMonitor; not in use at the moment - delete mLoader; - // delete all objects created from DocML. - while (!mObjects.isEmpty()) { - LOG(NORMAL,"CBSUI: CbsUiViewManager::~CbsUiViewManager deleting..."); - delete mObjects.takeFirst(); - } - LOG(NORMAL,"CBSUI: CbsUiViewManager::~CbsUiViewManager OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiViewManager::activateTopicView -// ---------------------------------------------------------------------------- -// -void CbsUiViewManager::activateTopicView(TCbsTopicNumber topicNumber) -{ - LOG(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView IN"); - if (!mTopicView) { - bool ok = false; - // ownership of the objects are transferred to caller - mObjects += mLoader->load(CBS_TOPIC_VIEW_XML, &ok); - if (ok) { - mTopicView = - qobject_cast(mLoader->findWidget(CBS_TOPIC_VIEW)); - mTopicView->init(mServer, *this); - } else { - LOG(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView DocML failure!"); - } - } - - if (mTopicView != mMainWindow->currentView()) { - if (!mSoftKeyBackAction) { - mSoftKeyBackAction = new HbAction(Hb::BackAction,mTopicView); - LOG2(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView \ - mSoftKeyBackAction==%d", mSoftKeyBackAction); - } - - mTopicView->reloadMessages(topicNumber); - mMainWindow->addSoftKeyAction(Hb::SecondarySoftKey,mSoftKeyBackAction); - bool ret = connect(mSoftKeyBackAction, SIGNAL(triggered()), - this, SLOT(activateMainView())); - HbView* view = mMainWindow->currentView(); - mMainWindow->removeView(view); - // just temp implement - mTopicListView = 0; - mMainWindow->addView(mTopicView); - LOG2(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView\ - mTopicView=%d", mTopicView); - } - LOG(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiViewManager::activateMainView -// ---------------------------------------------------------------------------- -// -void CbsUiViewManager::activateMainView() -{ - LOG(NORMAL,"CBSUI: CbsUiViewManager::activateMainView IN"); - if (!mTopicListView) { - // First time called - mTopicListView = qobject_cast - (mLoader->findWidget(CBS_MAIN_VIEW)); - mTopicListView->init(mServer, *this); - // Connect signal to change view - bool ret = connect(mTopicListView, - SIGNAL(topicSelected(TCbsTopicNumber)), this, - SLOT(activateTopicView(TCbsTopicNumber))); - LOG2(NORMAL,"CBSUI: CbsUiViewManager::activateMainView ret=%d", ret); - } else { - HbView *view = mMainWindow->currentView(); - mMainWindow->removeView(view); - // just temp implement - mTopicView = 0; - } - - if (!mSoftKeyExitAction) { - mSoftKeyExitAction = new HbAction(Hb::QuitAction, mTopicListView); - LOG(NORMAL,"CBSUI: CbsUiViewManager::activateMainView add quit action"); - } - if ( mSoftKeyBackAction ) { - mMainWindow->removeSoftKeyAction(Hb::SecondarySoftKey, mSoftKeyBackAction); - mSoftKeyBackAction = 0; - LOG(NORMAL,"CBSUI: CbsUiViewManager::activateMainView remove back action"); - } - - mMainWindow->addSoftKeyAction(Hb::SecondarySoftKey,mSoftKeyExitAction); - bool ret = connect(mSoftKeyExitAction, SIGNAL(triggered()), - mMainWindow, SLOT(close())); - LOG2(NORMAL,"CBSUI: CbsUiViewManager::activateMainView connect exit=%d", ret); - mMainWindow->addView(mTopicListView); - mMainWindow->setCurrentView(mTopicListView); - LOG(NORMAL,"CBSUI: CbsUiViewManager::activateMainView OUT"); -} - -// ---------------------------------------------------------------------------- -// CbsUiDocumentLoader::createObject -// For DocML usage: -// ---------------------------------------------------------------------------- -// -QObject *CbsUiDocumentLoader::createObject( - const QString& type, const QString &name) -{ - LOG(NORMAL,"CBSUI: CbsUiViewManager::createObject IN"); - if (type == CbsUiTopicListView::staticMetaObject.className()) { - QObject *object = new CbsUiTopicListView; - object->setObjectName(name); - LOG(NORMAL,"CBSUI: CbsUiViewManager::createObject:CbsUiTopicListView OUT"); - return object; - } else if (type == CbsUiTopicView::staticMetaObject.className()) { - QObject *object = new CbsUiTopicView; - object->setObjectName(name); - LOG(NORMAL,"CBSUI: CbsUiViewManager::createObject:CbsUiTopicView OUT"); - return object; - } - LOG2(NORMAL,"CBSUI: CbsUiViewManager::createObject: \ - object name = %s",name.utf16()); - return HbDocumentLoader::createObject(type, name); -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/ccbsuisettingsmonitor.cpp --- a/cbs/cbsui/src/ccbsuisettingsmonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -* 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: -* -*/ - - -// INCLUDES -#include "MCbs.h" -#include "CCbsUiSettingsMonitor.h" -//#include "CbsUiPanic.h" -#include "MCbsUiSettingsObserver.h" - - - - -// ================= MEMBER FUNCTIONS ======================= - -// ---------------------------------------------------------------------------- -// CCbsUiSettingsMonitor::CCbsUiSettingsMonitor -// C++ default constructor can NOT contain any code, that -// might leave. -// ---------------------------------------------------------------------------- -// -CCbsUiSettingsMonitor::CCbsUiSettingsMonitor( - MCbs& aServer, - MCbsUiSettingsObserver& aObserver ) - : - CActive(EPriorityStandard), - iContinue(ETrue), - iServer(aServer), - iObserver(aObserver) - { - } - -// ---------------------------------------------------------------------------- -// CCbsUiSettingsMonitor::ConstructL -// Symbian OS default constructor can leave. -// ---------------------------------------------------------------------------- -// -void CCbsUiSettingsMonitor::ConstructL( ) - { - CActiveScheduler::Add( this ); - IssueRequest(); - } - -// ---------------------------------------------------------------------------- -// CCbsUiSettingsMonitor::NewL -// Two-phased constructor. -// ---------------------------------------------------------------------------- -// -CCbsUiSettingsMonitor* CCbsUiSettingsMonitor::NewL( - MCbs& aServer, MCbsUiSettingsObserver& aObserver ) - { - CCbsUiSettingsMonitor* self = new (ELeave) CCbsUiSettingsMonitor( - aServer, aObserver); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - return self; - } - - -// ---------------------------------------------------------------------------- -// CbsUiViewManager::activateMainView -// Destructor -// ---------------------------------------------------------------------------- -// -CCbsUiSettingsMonitor::~CCbsUiSettingsMonitor() - { - iContinue = EFalse; - Cancel(); - } - - -// ---------------------------------------------------------------------------- -// CCbsUiSettingsMonitor::IssueRequest -// -// This metor issues request -// ---------------------------------------------------------------------------- -// -void CCbsUiSettingsMonitor::IssueRequest() - { - if ( iContinue ) - { - SetActive(); - iServer.NotifySettingsChanged( iStatus, iEvent ); - } - } - -// ---------------------------------------------------------------------------- -// CCbsUiSettingsMonitor::RunL -// -// calls SettingsChanged method on application class -// ---------------------------------------------------------------------------- -// -void CCbsUiSettingsMonitor::RunL() - { - iObserver.SettingsChangedL(iEvent); // Doesn't inform the reason!! - - /* __ASSERT_DEBUG( iEvent == ECbsModifiedReceptionStatus || - iEvent == ECbsModifiedTopicDetectionStatus || - iEvent == ECbsModifiedLanguages, - CbsUiPanic(EErrInvalidEvent) ); -*/ - if ( iContinue ) - { - IssueRequest(); - } - } - - -// ---------------------------------------------------------------------------- -// CCbsUiSettingsMonitor::DoCancel -// -// ---------------------------------------------------------------------------- -// -void CCbsUiSettingsMonitor::DoCancel() - { - iContinue = EFalse; - iServer.NotifySettingsChangedCancel(); - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/ccbsuitopiclistmonitor.cpp --- a/cbs/cbsui/src/ccbsuitopiclistmonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* 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: -* -*/ - - -// INCLUDES -#include -#include "mcbs.h" -#include "ccbsuitopiclistmonitor.h" -#include "mcbsuitopicmonitorobserver.h" -#include "cbsuiconstants.h" - - - -// CONSTANTS -const TInt KNumberOfObservers = 3; - - - -// ================= MEMBER FUNCTIONS ======================= - -// ---------------------------------------------------------------------------- -// CCbsUiSettingsMonitor::CCbsUiSettingsMonitor -// C++ default constructor can NOT contain any code, that -// might leave. -// ---------------------------------------------------------------------------- -// -CCbsUiTopicListMonitor::CCbsUiTopicListMonitor( MCbs& aServer ) - : CActive(EPriorityStandard), iContinue(ETrue), iServer(aServer) - { - } - - -// ---------------------------------------------------------------------------- -// CCbsUiTopicListMonitor::ConstructL -// Symbian OS default constructor can leave -// ---------------------------------------------------------------------------- -// -void CCbsUiTopicListMonitor::ConstructL( ) - { - CActiveScheduler::Add(this); - IssueRequest(); - - iObservers = new (ELeave) TCbsUiMonitorObservers(KNumberOfObservers); - } - -// ---------------------------------------------------------------------------- -// CCbsUiTopicListMonitor::NewL -// Two-phased constructor. -// ---------------------------------------------------------------------------- -// -CCbsUiTopicListMonitor* CCbsUiTopicListMonitor::NewL( MCbs& aServer ) - { - CCbsUiTopicListMonitor* self = - new (ELeave) CCbsUiTopicListMonitor(aServer); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - return self; - } - - - -// ---------------------------------------------------------------------------- -// CCbsUiTopicListMonitor::~CCbsUiTopicListMonitor -// Destructor -// ---------------------------------------------------------------------------- -// -CCbsUiTopicListMonitor::~CCbsUiTopicListMonitor() - { - delete iObservers; - Cancel(); - } - -// ---------------------------------------------------------------------------- -// CCbsUiTopicListMonitor::IssueRequest() -// -// -// ---------------------------------------------------------------------------- -// -void CCbsUiTopicListMonitor::IssueRequest() - { - if ( iContinue ) - { - SetActive(); - - iServer.NotifyOnTopicListEvent( - iStatus, ECbsTopicAllEvents, iEvent, iTopicNumber ); - } - } - -// ---------------------------------------------------------------------------- -// CCbsUiTopicListMonitor::RunL -// -// -// ---------------------------------------------------------------------------- -// -void CCbsUiTopicListMonitor::RunL() - - { - if ( iObservers->Count() > 0 ) - { - for ( TInt i(0); i < iObservers->Count(); i++ ) - { - iObservers->At(i)->TopicListChangedL(iEvent, iTopicNumber); - } - } - // TODO: Panics.. - //__ASSERT_DEBUG( - // (iEvent & ECbsTopicAllEvents), CbsUiPanic(EErrInvalidEvent) ); - - if ( iContinue ) - { - IssueRequest(); - } - } - -// ---------------------------------------------------------------------------- -// CCbsUiTopicListMonitor::DoCancel -// -// -// ---------------------------------------------------------------------------- -// -void CCbsUiTopicListMonitor::DoCancel() - { - iContinue = EFalse; - - iServer.NotifyOnTopicListEventCancel(); - } - -// ---------------------------------------------------------------------------- -// CCbsUiTopicListMonitor::AddObserverL -// -// -// ---------------------------------------------------------------------------- -// -void CCbsUiTopicListMonitor::AddObserverL( - MCbsUiTopicMonitorObserver* aObserver ) - { - /* __ASSERT_DEBUG( iObservers, CbsUiPanic(EErrNullPointer) ); - __ASSERT_DEBUG( aObserver, CbsUiPanic(EErrNullPointer) ); -*/ - iObservers->AppendL(aObserver); - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/main.cpp --- a/cbs/cbsui/src/main.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* 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: -* -*/ -#include -#include - -#include -#include - -#include "cbsuimainwindow.h" -#include "cbslog.h" - -int main(int argc, char *argv[]) -{ - LOG(NORMAL,"CBSUI: main IN"); - - // Initialization - HbApplication app(argc, argv); - - QTranslator translator; - bool ok = translator.load(":/translations/cbsui_en"); - LOG2(NORMAL, "CBSUI: main, translation %d (1=OK, 0=fail)", ok ) - app.installTranslator(&translator); - - // Main window widget. - // Includes decorators such as signal strength and battery life indicator. - CbsUiMainWindow mainWindow; - #ifndef __WINSCW - LOG(NORMAL,"CBSUI: main set LANDSCAPE mode"); - hbInstance->setOrientation(Qt::Horizontal); - #endif - mainWindow.show(); - LOG(NORMAL,"CBSUI: main mainwindow show over"); - // Enter event loop - int result = app.exec(); - LOG2(NORMAL,"CBSUI: main exit %d", result); - return result; -} diff -r 7d48bed6ce0c -r 987c9837762f cbs/cbsui/src/rcbsui.cpp --- a/cbs/cbsui/src/rcbsui.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,311 +0,0 @@ -/* -* Copyright (c) 2002 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: -* RCbsUi calls directly real cbs client, which handles -* the actual calls to server. -* -*/ - - -// INCLUDES -#include -#include "rcbsui.h" -#include - - -// ================= MEMBER FUNCTIONS ======================= - -RCbsUi::RCbsUi() - { - } - -RCbsUi::~RCbsUi() - { - } - -TInt RCbsUi::Connect() - { - return iServer.Connect(); - } - -void RCbsUi::Close() - { - iServer.Close(); - } - -TVersion RCbsUi::Version() const - { - return iServer.Version(); - } - -// Settings-related methods -void RCbsUi::GetReceptionStatus( - TBool& aStatus ) - { - iServer.GetReceptionStatus( aStatus ); - } - -TInt RCbsUi::SetReceptionStatus( - TBool aStatus ) - { - return iServer.SetReceptionStatus( aStatus ); - } - -void RCbsUi::GetTopicDetectionStatus( - TBool& aStatus ) - { - iServer.GetTopicDetectionStatus( aStatus ); - } - -TInt RCbsUi::SetTopicDetectionStatus( - TBool aStatus ) - { - return iServer.SetTopicDetectionStatus(aStatus); - } - -void RCbsUi::GetLanguages( - TCbsSettingsLanguages& aLanguages ) - { - iServer.GetLanguages(aLanguages); - } - -TInt RCbsUi::SetLanguages( - const TCbsSettingsLanguages& aLanguages ) - { - return iServer.SetLanguages(aLanguages); - } - -void RCbsUi::NotifySettingsChanged( - TRequestStatus& aStatus, - TCbsSettingsEvent& aEvent ) - { - iServer.NotifySettingsChanged( aStatus, aEvent ); - } - -void RCbsUi::NotifySettingsChangedCancel() - { - iServer.NotifySettingsChangedCancel(); - } - -// Topic Collection -related methods -void RCbsUi::StartCollectionBrowsing() - { - iServer.StartCollectionBrowsing(); - } - -TBool RCbsUi::HasNextCollectionTopic() - { - return iServer.HasNextCollectionTopic(); - } - -TInt RCbsUi::NextCollectionTopic( - TCbsTopicInfo& aInfo ) - { - return iServer.NextCollectionTopic(aInfo); - } - -// Topic List-related methods -void RCbsUi::GetTopicCount( - TInt& aCount ) - { - iServer.GetTopicCount(aCount); - } - -TInt RCbsUi::GetTopic( - const TInt aIndex, - TCbsTopic& aTopic ) - { - return iServer.GetTopic(aIndex, aTopic); - } - -TInt RCbsUi::FindTopicByNumber( - TCbsTopicNumber aNumber, - TCbsTopic& aTopic ) - { - return iServer.FindTopicByNumber( aNumber, aTopic ); - } - -TInt RCbsUi::DeleteTopic( - TCbsTopicNumber aNumber ) - { - return iServer.DeleteTopic(aNumber); - } - -TInt RCbsUi::DeleteAllTopics() - { - return iServer.DeleteAllTopics(); - } - -TInt RCbsUi::AddTopic( - TCbsTopic& aTopic ) - { - return iServer.AddTopic(aTopic); - } - -TInt RCbsUi::ChangeTopicNameAndNumber( - TCbsTopicNumber aOldNumber, - TCbsTopicNumber aNewNumber, - const TCbsTopicName& aName ) - { - return iServer.ChangeTopicNameAndNumber(aOldNumber, aNewNumber, aName); - } - -TInt RCbsUi::ChangeTopicSubscriptionStatus( - TCbsTopicNumber aNumber, - TBool aNewStatus ) - { - return iServer.ChangeTopicSubscriptionStatus( aNumber, aNewStatus ); - } - -TInt RCbsUi::ChangeTopicHotmarkStatus( - TCbsTopicNumber aNumber, - TBool aNewStatus ) - { - return iServer.ChangeTopicHotmarkStatus( aNumber, aNewStatus ); - } - -void RCbsUi::NotifyOnTopicListEvent( - TRequestStatus& aStatus, - const TInt aRequested, - TCbsTopicListEvent& aEvent, - TCbsTopicNumber& aNumber ) - { - iServer.NotifyOnTopicListEvent(aStatus, aRequested, aEvent, aNumber); - } - -void RCbsUi::NotifyOnTopicListEventCancel() - { - iServer.NotifyOnTopicListEventCancel(); - } - -TInt RCbsUi::GetNewTopicsCount( - TInt& aCount ) - { - return iServer.GetNewTopicsCount(aCount); - } - -TInt RCbsUi::GetLatestTopicNumber( TCbsTopicNumber& aNumber ) - { - return iServer.GetLatestTopicNumber(aNumber); - } - -void RCbsUi::GetUnreadMessageCount( - TInt& aCount ) - { - iServer.GetUnreadMessageCount(aCount); - } - -void RCbsUi::GetHotmarkedMessageHandle( - TCbsMessageHandle& aMessage ) - { - iServer.GetHotmarkedMessageHandle(aMessage); - } - -TInt RCbsUi::NumberOfUnreadHotmarkedMessages() - { - return iServer.NumberOfUnreadHotmarkedMessages(); - } - -TInt RCbsUi::GetNextAndPrevTopicNumber( - const TCbsTopicNumber& aCurrentTopicNumber, - TCbsTopicNumber& aPrevTopicNumber, - TCbsTopicNumber& aNextTopicNumber, - TInt& aPosition ) - { - return iServer.GetNextAndPrevTopicNumber( - aCurrentTopicNumber, aPrevTopicNumber, aNextTopicNumber, aPosition); - } - - -// Topic Messages-related methods -TInt RCbsUi::GetMessageCount( - TCbsTopicNumber aNumber, - TInt& aCount ) - { - return iServer.GetMessageCount(aNumber, aCount); - } - -TInt RCbsUi::GetMessage( - TCbsTopicNumber aNumber, - TInt aIndex, - TCbsMessage& aMessage ) - { - return iServer.GetMessage(aNumber, aIndex, aMessage); - } - -TInt RCbsUi::FindMessageByHandle( - const TCbsMessageHandle& aHandle, - TCbsMessage& aMessage ) - { - return iServer.FindMessageByHandle(aHandle, aMessage); - } - -TInt RCbsUi::GetMessageIndexByHandle( - const TCbsMessageHandle& aHandle, TInt& aIndex ) - { - return iServer.GetMessageIndexByHandle(aHandle, aIndex); - } - -TInt RCbsUi::DeleteMessage( - const TCbsMessageHandle& aHandle ) - { - return iServer.DeleteMessage(aHandle); - } - -TInt RCbsUi::SaveMessage( - const TCbsMessageHandle& aHandle ) - { - return iServer.SaveMessage(aHandle); - } - -TInt RCbsUi::LockMessage( - const TCbsMessageHandle& aHandle ) - { - return iServer.LockMessage(aHandle); - } - -TInt RCbsUi::ReadMessage( - const TCbsMessageHandle& aHandle ) - { - return iServer.ReadMessage(aHandle); - } - -TInt RCbsUi::GetMessageContents( - const TCbsMessageHandle& aHandle, - TDes& aBuffer ) - { - return iServer.GetMessageContents(aHandle, aBuffer); - } - -TInt RCbsUi::GetNextAndPrevMessageHandle( - const TCbsMessageHandle& aCurrentMsgHandle, - TCbsMessageHandle& aPrevMsgHandle, - TCbsMessageHandle& aNextMsgHandle, - TInt& aPosition ) - { - return iServer.GetNextAndPrevMessageHandle( - aCurrentMsgHandle, aPrevMsgHandle, aNextMsgHandle, aPosition); - } - -TBool RCbsUi::Connected() const - { - return iServer.Connected(); - } - -void RCbsUi::Shutdown() const - { - iServer.Shutdown(); - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cbs/group/bld.inf --- a/cbs/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/cbs/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -16,7 +16,8 @@ */ -#include "../cbsserver/Group/bld.inf" +#include "../CbsServer/Group/bld.inf" +#include "../cbsui/Group/bld.inf" -// End of File +// End of File \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Group/Psui.mmp --- a/cellular/PsetNotesUi/Group/Psui.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Group/Psui.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -25,22 +25,22 @@ TARGETTYPE dll UID 0x1000008d 0x100059C6 -SOURCEPATH ../src -SOURCE psuibarringobs.cpp -SOURCE psuiwaitingobs.cpp -SOURCE psuidivertobs.cpp -SOURCE psuinotemaster.cpp -SOURCE psuiresourceloader.cpp -SOURCE psuicontainer.cpp -SOURCE psuicliobserver.cpp -SOURCE psuivariationproxy.cpp +SOURCEPATH ../Src +SOURCE PsuiBarringObs.cpp +SOURCE PsuiWaitingObs.cpp +SOURCE PsuiDivertObs.cpp +SOURCE PsuiNoteMaster.cpp +SOURCE PsuiResourceLoader.cpp +SOURCE PsuiContainer.cpp +SOURCE PsuiCliObserver.cpp +SOURCE PsuiVariationProxy.cpp #ifdef RD_PHONE_NG -SOURCE psuiquerydialog.cpp +SOURCE PsuiQueryDialog.cpp #endif // RD_PHONE_NG -SOURCE psuireqobserver.cpp -SOURCE psuinotecontroller.cpp +SOURCE PsuiReqObserver.cpp +SOURCE PsuiNoteController.cpp -START RESOURCE ../data/psui.rss +START RESOURCE ../Data/Psui.rss HEADER TARGETPATH RESOURCE_FILES_DIR // Language definition @@ -50,7 +50,7 @@ SYSTEMINCLUDE ../../../inc -USERINCLUDE . ../inc +USERINCLUDE . ../Inc MW_LAYER_SYSTEMINCLUDE LIBRARY bafl.lib @@ -61,10 +61,10 @@ LIBRARY avkon.lib LIBRARY commonengine.lib LIBRARY etelmm.lib -LIBRARY featmgr.lib +LIBRARY featmgr.lib LIBRARY numbergrouping.lib LIBRARY servicerequest.lib -LIBRARY centralrepository.lib +LIBRARY centralrepository.lib #ifdef RD_PHONE_NG LIBRARY eikdlg.lib LIBRARY eikcore.lib diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Group/bld.inf --- a/cellular/PsetNotesUi/Group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -22,15 +22,15 @@ DEFAULT PRJ_MMPFILES -../group/psui.mmp +../Group/Psui.mmp PRJ_EXPORTS -../inc/psuiresourceloader.h |../../../inc/psuiresourceloader.h -../data/psui_stub.sis /epoc32/data/z/system/install/psui_stub.sis +../Inc/PsuiResourceLoader.h |../../../inc/psuiresourceloader.h +../Data/psui_stub.SIS /epoc32/data/z/system/install/psui_stub.sis // IBY Files -../rom/psui.iby CORE_APP_LAYER_IBY_EXPORT_PATH(psui.iby) -../rom/psuiresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(psuiresources.iby) +../Rom/Psui.iby CORE_APP_LAYER_IBY_EXPORT_PATH(Psui.iby) +../Rom/PsuiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(PsuiResources.iby) // LOC files ../loc/psui.loc MW_LAYER_LOC_EXPORT_PATH(psui.loc) diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Inc/PsuiNoteController.h --- a/cellular/PsetNotesUi/Inc/PsuiNoteController.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Inc/PsuiNoteController.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include "psuinotemaster.h" +#include "PsuiNoteMaster.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Inc/PsuiNoteMaster.h --- a/cellular/PsetNotesUi/Inc/PsuiNoteMaster.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Inc/PsuiNoteMaster.h Wed Sep 01 12:15:03 2010 +0100 @@ -25,9 +25,9 @@ // INCLUDES #include #include -#include "psuiconstants.h" -#include "psuiinternalconstants.h" -#include "psetcalldiverting.h" +#include "PsuiConstants.h" +#include "PsuiInternalConstants.h" +#include "PsetCallDiverting.h" // FORWARD DECLARATIONS class MPsetCallWaiting; @@ -176,7 +176,7 @@ private: //new - void AppendCFNumber( TDes& aString, const TDesC& aNumber); + void AppendCFNumber( TDes& aString, const TDesC& aNumber); void CreateListBoxL( TCFType aCFType, CAknSinglePopupMenuStyleListBox* aList ); diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Inc/PsuiQueryDialog.h --- a/cellular/PsetNotesUi/Inc/PsuiQueryDialog.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Inc/PsuiQueryDialog.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #define CPSUIQUERYDIALOG_H // INCLUDES -#include +#include NONSHARABLE_CLASS ( CPsuiQueryDialog ) : public CAknQueryDialog { diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Inc/PsuiReqObserver.h --- a/cellular/PsetNotesUi/Inc/PsuiReqObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Inc/PsuiReqObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include "psuinotemaster.h" +#include "PsuiNoteMaster.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Inc/PsuiVariationProxy.h --- a/cellular/PsetNotesUi/Inc/PsuiVariationProxy.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Inc/PsuiVariationProxy.h Wed Sep 01 12:15:03 2010 +0100 @@ -12,9 +12,9 @@ * Contributors: * * Description: -* CPsuiVariationProxy class is proxy class for -* central repository variation -* (Call waiting/distinguish between not provisioned and not activated). +* CPsuiVariationProxy class is proxy class for +* central repository variation +* (Call waiting/distinguish between not provisioned and not activated). * * */ @@ -42,39 +42,39 @@ { public: //constructor & destructor - /* Symbian OS 2-phase Constructor. */ - static CPSuiVariationProxy* NewL(); - - /* Destructor */ - ~CPSuiVariationProxy(); - + /* Symbian OS 2-phase Constructor. */ + static CPSuiVariationProxy* NewL(); + + /* Destructor */ + ~CPSuiVariationProxy(); + public: - /** + /** * Check from member variable 'iFeatures' is the requested feature active. - * - * @param aFeature is uid for used central repository variable. - * @return returns TBool type ETrue/EFalse is current feature enabled or not - */ - - TBool FeatureEnabled( TUint aFeature ) const; + * + * @param aFeature is uid for used central repository variable. + * @return returns TBool type ETrue/EFalse is current feature enabled or not + */ + + TBool FeatureEnabled( TUint aFeature ) const; private: - - /** + + /** * Constructor - * - * Open CenRep, read data into 'iFeatures' and close CenRep - * - */ - void ConstructL(); - + * + * Open CenRep, read data into 'iFeatures' and close CenRep + * + */ + void ConstructL(); + private: - /* Default constructor */ - CPSuiVariationProxy(); + /* Default constructor */ + CPSuiVariationProxy(); private: - // Saves cen rep data. Readed in ConstructL() - TInt iFeatures; - + // Saves cen rep data. Readed in ConstructL() + TInt iFeatures; + }; #endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiBarringObs.cpp --- a/cellular/PsetNotesUi/Src/PsuiBarringObs.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiBarringObs.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,13 +17,13 @@ // INCLUDE FILES -#include -#include +#include +#include #include #include -#include "psuiinternalconstants.h" -#include "psuinotecontroller.h" +#include "PsuiInternalConstants.h" +#include "PsuiNoteController.h" // MEMBER FUNCTIONS // --------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiCliObserver.cpp --- a/cellular/PsetNotesUi/Src/PsuiCliObserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiCliObserver.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,13 +17,13 @@ // INCLUDE FILES -#include +#include #include #include -#include "psuicliobserver.h" -#include "psuicontainer.h" -#include "psuinotecontroller.h" +#include "PsuiCliObserver.h" +#include "PsuiContainer.h" +#include "PsuiNoteController.h" // MEMBER FUNCTIONS diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiContainer.cpp --- a/cellular/PsetNotesUi/Src/PsuiContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ //INCLUDES -#include +#include -#include "psuiresourceloader.h" +#include "PsuiResourceLoader.h" // --------------------------------------------------------------------------- // Symbian OS two-phased constructor. diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiDivertObs.cpp --- a/cellular/PsetNotesUi/Src/PsuiDivertObs.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiDivertObs.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,13 +17,13 @@ // INCLUDE FILES -#include +#include #include #include -#include +#include #include -#include "psuinotecontroller.h" +#include "PsuiNoteController.h" // --------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiNoteController.cpp --- a/cellular/PsetNotesUi/Src/PsuiNoteController.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiNoteController.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,8 +17,8 @@ // INCLUDE FILES -#include "psuinotecontroller.h" -#include "psuiinternalconstants.h" +#include "PsuiNoteController.h" +#include "PsuiInternalConstants.h" // ================= MEMBER FUNCTIONS ======================= @@ -74,7 +74,7 @@ // void CPsuiNoteController::ShowNoteL( TPsuiNoteTypes aType, TInt aResourceID ) { - iNote->ShowNoteL( aType, aResourceID ); + iNote->ShowNoteL( aType, aResourceID ); } // --------------------------------------------------------- @@ -83,7 +83,7 @@ // void CPsuiNoteController::ShowBscListL( TInt aResourceHeading, TUint8 aBsc[KPSUIMaxBscNumber] ) { - iNote->ShowBscListL( aResourceHeading, aBsc ); + iNote->ShowBscListL( aResourceHeading, aBsc ); } // --------------------------------------------------------- @@ -92,7 +92,7 @@ // TInt CPsuiNoteController::SetErrorNoteResourceID ( const TInt aErrorCode ) { - return iNote->SetErrorNoteResourceID( aErrorCode ); + return iNote->SetErrorNoteResourceID( aErrorCode ); } // --------------------------------------------------------- @@ -101,9 +101,9 @@ // void CPsuiNoteController::RemoveNotesL() { - delete iNote; - iNote = NULL; - iNote = CPsuiNoteMaster::NewL(); + delete iNote; + iNote = NULL; + iNote = CPsuiNoteMaster::NewL(); } // --------------------------------------------------------- @@ -112,7 +112,7 @@ // void CPsuiNoteController::KillStaticNoteL() { - iNote->KillStaticNoteL(); + iNote->KillStaticNoteL(); } // --------------------------------------------------------- @@ -124,7 +124,7 @@ MPsetCli* aCliEngine ) { iNote->SetEngineContacts( aWaitingEngine, aBarringEngine, - aDivertEngine, aCliEngine ); + aDivertEngine, aCliEngine ); } // --------------------------------------------------------- @@ -135,7 +135,7 @@ CMobilePhoneCFList& aList, TCFType aCFType, TInt& aIndex ) { return iNote->ShowBscCFListL( aResourceHeading, aList, - aCFType, aIndex ); + aCFType, aIndex ); } // --------------------------------------------------------- @@ -145,7 +145,7 @@ void CPsuiNoteController::ShowCfInfoL( TCFType& aCFType, const RMobilePhone::TMobilePhoneCFInfoEntryV1& aSetting ) { - iNote->ShowCfInfoL( aCFType, aSetting ); + iNote->ShowCfInfoL( aCFType, aSetting ); } // End of File diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiNoteMaster.cpp --- a/cellular/PsetNotesUi/Src/PsuiNoteMaster.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiNoteMaster.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,26 +17,26 @@ // INCLUDE FILES -#include +#include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include #include -#include +#include -#include "psuiinternalconstants.h" -#include "psuinotemaster.h" -#include "psuireqobserver.h" -#include "psuiquerydialog.h" +#include "PsuiInternalConstants.h" +#include "PsuiNoteMaster.h" +#include "PsuiReqObserver.h" +#include "PsuiQueryDialog.h" #include -#include +#include // MACROS #ifdef _DEBUG @@ -130,11 +130,11 @@ { if ( aResourceID < 0 ) { - if ( aType == EPsuiWaitingNote ) - { - iRequesting = ETrue; - iServiceRequest->StartL( KNullDesC ); - } + if ( aType == EPsuiWaitingNote ) + { + iRequesting = ETrue; + iServiceRequest->StartL( KNullDesC ); + } return; } @@ -295,7 +295,7 @@ } // Get base text and set phone number into it. - // Note that two characters are reserved for LRM markers. + // Note that two characters are reserved for LRM markers. TBuf string; StringLoader::Load( string, R_TO_NUMBER ); string.Append( KPSUIListDivider ); @@ -305,14 +305,14 @@ CRepository* repository = CRepository::NewL( KCRUidNumberGrouping ); pngErr = repository->Get( KNumberGrouping, pngSupported ); delete repository; - + if ( KErrNone == pngErr && pngSupported != 0 ) { CPNGNumberGrouping* numberGrouping = CPNGNumberGrouping::NewL( KPSUIMaxPSUIItemLength ); CleanupStack::PushL( numberGrouping ); - //Check that number fits (with or w/o number formatting). + //Check that number fits (with or w/o number formatting). if ( (aSetting.iNumber.iTelNumber.Length() + 2) <= numberGrouping->MaxDisplayLength() ) { numberGrouping->Set( aSetting.iNumber.iTelNumber ); @@ -354,10 +354,10 @@ iQuery = CPsuiQueryDialog::NewL( CAknQueryDialog::ENoTone ); TInt command( iQuery->ExecuteLD( R_CONFIRMATION_QUERY, string ) ); if( command == EKeyNo ) - { - // End -key was pressed so don't relaunch previous query - aCFType = EPsuiNoCF; - } + { + // End -key was pressed so don't relaunch previous query + aCFType = EPsuiNoCF; + } iQuery = NULL; } @@ -570,11 +570,11 @@ // CPsuiNoteMaster::AppendCFNumber // --------------------------------------------------------------------------- void CPsuiNoteMaster::AppendCFNumber( TDes& aString, const TDesC& aNumber ) - { - aString.Append( KLRMarker ); - aString.Append( aNumber ); - aString.Append( KLRMarker ); - } + { + aString.Append( KLRMarker ); + aString.Append( aNumber ); + aString.Append( KLRMarker ); + } // --------------------------------------------------------------------------- // CPsuiNoteMaster::SetBsGroupLC // --------------------------------------------------------------------------- @@ -587,7 +587,7 @@ string = StringLoader::LoadLC( R_BS_ALPHA_0 ); break; case 10: - string = StringLoader::LoadLC( R_BS_ALPHA_10 ); + string = StringLoader::LoadLC( R_BS_ALPHA_10 ); break; case 11: string = StringLoader::LoadLC( R_BS_ALPHA_11 ); diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiQueryDialog.cpp --- a/cellular/PsetNotesUi/Src/PsuiQueryDialog.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiQueryDialog.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include "psuiquerydialog.h" +#include "PsuiQueryDialog.h" // ================= MEMBER FUNCTIONS ======================= @@ -25,7 +25,7 @@ // might leave. // CPsuiQueryDialog::CPsuiQueryDialog( CAknQueryDialog::TTone aTone ) : - CAknQueryDialog( aTone ) + CAknQueryDialog( aTone ) { } @@ -53,14 +53,21 @@ TKeyResponse CPsuiQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ) { - if ( ( aKeyEvent.iScanCode == EStdKeyNo || aKeyEvent.iCode == EKeyNo ) && - aType == EEventKeyUp ) - { - // End -key was pressed, so exit this query dialog - TryExitL( EKeyNo ); - } + const TBool noKeyReleased = + ( aKeyEvent.iScanCode == EStdKeyNo || aKeyEvent.iCode == EKeyNo ) && + aType == EEventKeyUp; + const TBool escPressed = aKeyEvent.iCode == EKeyEscape; + + // AknDialogShutter sends esc keys so dismiss dialog + if ( noKeyReleased || escPressed ) + { + // End -key was pressed, so exit this query dialog + TryExitL( EKeyNo ); + RDebug::Printf("PSETNOTESUI: exiting dialog"); + return EKeyWasConsumed; + } - return EKeyWasNotConsumed; + return EKeyWasNotConsumed; } // --------------------------------------------------------------------------- @@ -69,7 +76,7 @@ // TBool CPsuiQueryDialog::OkToExitL( TInt /*aCommand*/ ) { - // Dismiss query + // Dismiss query return ETrue; } diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiReqObserver.cpp --- a/cellular/PsetNotesUi/Src/PsuiReqObserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiReqObserver.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include +#include -#include "psuireqobserver.h" +#include "PsuiReqObserver.h" // MACROS diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiResourceLoader.cpp --- a/cellular/PsetNotesUi/Src/PsuiResourceLoader.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiResourceLoader.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES #include -#include +#include -#include "psuiresourceloader.h" +#include "PsuiResourceLoader.h" // CONSTANTS _LIT( KPsuiResourceFileNameAndPath, "Z:\\resource\\Psui.rsc" ); diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiVariationProxy.cpp --- a/cellular/PsetNotesUi/Src/PsuiVariationProxy.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiVariationProxy.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,40 +17,40 @@ */ -#include "psuivariationproxy.h" +#include "PsuiVariationProxy.h" #include -#include +#include CPSuiVariationProxy::CPSuiVariationProxy() - { - } - + { + } + CPSuiVariationProxy::~CPSuiVariationProxy() - { - } - + { + } + CPSuiVariationProxy* CPSuiVariationProxy::NewL() - { - CPSuiVariationProxy* self = new ( ELeave ) CPSuiVariationProxy(); + { + CPSuiVariationProxy* self = new ( ELeave ) CPSuiVariationProxy(); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); return self; - } - + } + void CPSuiVariationProxy::ConstructL() - { - TInt setting = 0; - CRepository* centralRepository = CRepository::NewLC( KCRUidPhoneSettings ); - centralRepository->Get( KPSetCallWaiting, setting ); - if( setting ) - { - iFeatures |= KCallWaitingDistiquishNotProvisioned; - } - CleanupStack::PopAndDestroy( centralRepository ); - } - + { + TInt setting = 0; + CRepository* centralRepository = CRepository::NewLC( KCRUidPhoneSettings ); + centralRepository->Get( KPSetCallWaiting, setting ); + if( setting ) + { + iFeatures |= KCallWaitingDistiquishNotProvisioned; + } + CleanupStack::PopAndDestroy( centralRepository ); + } + TBool CPSuiVariationProxy::FeatureEnabled( TUint aFeature ) const - { - return aFeature&iFeatures; - } + { + return aFeature&iFeatures; + } diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/Src/PsuiWaitingObs.cpp --- a/cellular/PsetNotesUi/Src/PsuiWaitingObs.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/Src/PsuiWaitingObs.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,13 +17,13 @@ // INCLUDE FILES -#include -#include +#include +#include #include -#include "psuiinternalconstants.h" -#include "psuinotecontroller.h" -#include "psuivariationproxy.h" +#include "PsuiInternalConstants.h" +#include "PsuiNoteController.h" +#include "PsuiVariationProxy.h" // MEMBER FUNCTIONS // --------------------------------------------------------------------------- @@ -110,7 +110,7 @@ TUint8 aBsc[KPSUIMaxBscNumber] ) { - if ( iCallWaitingDistinguishEnabled && aStatus == MPsetCallWaiting::EStatusNotProvisioned ) + if ( iCallWaitingDistinguishEnabled && aStatus == MPsetCallWaiting::EStatusNotProvisioned ) { CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote, R_CW_NOT_PROVISIONED_NOTE ); @@ -123,30 +123,30 @@ else { if( iCallWaitingDistinguishEnabled ) - { - - //show only "CW active" even if the bsc list is present. - //This change is to fix the error ENYI-6DYFKZ - CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote, + { + + //show only "CW active" even if the bsc list is present. + //This change is to fix the error ENYI-6DYFKZ + CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote, R_CW_ACTIVE_NO_BSC_NOTE ); - } + } else - { - - //if no bsc-list present, show only "CW active" - if ( aBsc[0] == KPSUINoBscGroup ) - { - CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote, + { + + //if no bsc-list present, show only "CW active" + if ( aBsc[0] == KPSUINoBscGroup ) + { + CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote, R_CW_ACTIVE_NO_BSC_NOTE ); - } - else - { + } + else + { - CPsuiNoteController::InstanceL()->ShowBscListL( + CPsuiNoteController::InstanceL()->ShowBscListL( R_CW_STATUS_HEADING, aBsc ); - } - } + } + } } } diff -r 7d48bed6ce0c -r 987c9837762f cellular/PsetNotesUi/tsrc/public/basic/Src/T_PSetNotesUi.cpp --- a/cellular/PsetNotesUi/tsrc/public/basic/Src/T_PSetNotesUi.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/PsetNotesUi/tsrc/public/basic/Src/T_PSetNotesUi.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // EXTERNAL INCLUDES #include #include -#include +#include // INTERNAL INCLUDES diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/Logger/SSSettingsLogger.h --- a/cellular/SSSettings/Logger/SSSettingsLogger.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/Logger/SSSettingsLogger.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #ifndef SSSETTINGSLOGGER_H #define SSSETTINGSLOGGER_H -#include "sssettingsloggingconf.h" +#include "SSSettingsLoggingConf.h" #include #include #include diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/group/SSSettings.mmp --- a/cellular/SSSettings/group/SSSettings.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/group/SSSettings.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -16,37 +16,37 @@ */ #include -#include "../logger/sssettingsloggingconf.h" +#include "../Logger/SSSettingsLoggingConf.h" TARGET sssettings.dll TARGETTYPE dll UID 0x1000008d 0x10005A01 -VENDORID VID_DEFAULT +VENDORID VID_DEFAULT // Capability assignment. CAPABILITY CAP_GENERAL_DLL sourcepath ../src -SOURCE rsssettings.cpp -SOURCE csssettingsnotifier.cpp -SOURCE csssettingsalsnotifier.cpp -SOURCE rcustomerserviceprofilecache.cpp -SOURCE csssettingsrefreshcontainer.cpp -SOURCE csssettingsrefreshhandler.cpp -SOURCE csssettingsactiveobject.cpp +SOURCE RSSSettings.cpp +SOURCE CSSSettingsNotifier.cpp +SOURCE CSSSettingsAlsNotifier.cpp +SOURCE RCustomerServiceProfileCache.cpp +SOURCE CSSSettingsRefreshContainer.cpp +SOURCE CSSSettingsRefreshHandler.cpp +SOURCE CSSSettingsActiveObject.cpp USERINCLUDE ../inc -USERINCLUDE ../logger +USERINCLUDE ../Logger SYSTEMINCLUDE ../inc MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../../inc +SYSTEMINCLUDE ../../../inc LIBRARY euser.lib -LIBRARY etel.lib // etel connection -LIBRARY customapi.lib // custom etel api +LIBRARY etel.lib // ETel connection +LIBRARY customapi.lib // Custom ETel API LIBRARY etelmm.lib LIBRARY featmgr.lib LIBRARY satclient.lib diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/group/bld.inf --- a/cellular/SSSettings/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -23,15 +23,15 @@ PRJ_EXPORTS -../inc/csssettingsrefreshcontainer.h |../../../inc/csssettingsrefreshcontainer.h -../inc/msssettingsrefreshhandler.h |../../../inc/msssettingsrefreshhandler.h +../inc/CSSSettingsRefreshContainer.h |../../../inc/csssettingsrefreshcontainer.h +../inc/MSSSettingsRefreshHandler.h |../../../inc/MSSSettingsRefreshHandler.h -../group/sssettings_stub.sis /epoc32/data/z/system/install/sssettings_stub.sis +../group/SSSettings_stub.SIS /epoc32/data/z/system/install/sssettings_stub.sis // IBY files -../rom/sssettings.iby CORE_APP_LAYER_IBY_EXPORT_PATH(sssettings.iby) +../rom/SSSettings.iby CORE_APP_LAYER_IBY_EXPORT_PATH(SSSettings.iby) PRJ_MMPFILES -../group/sssettings.mmp +../group/SSSettings.mmp //End of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/inc/CSSSettingsAlsNotifier.h --- a/cellular/SSSettings/inc/CSSSettingsAlsNotifier.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/inc/CSSSettingsAlsNotifier.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,8 +23,8 @@ #include #include -#include "rsssettings.h" -#include "csssettingsactiveobject.h" +#include "RSSSettings.h" +#include "CSSSettingsActiveObject.h" // FORWARD DECLARATIONS class RMmCustomAPI; diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/inc/CSSSettingsNotifier.h --- a/cellular/SSSettings/inc/CSSSettingsNotifier.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/inc/CSSSettingsNotifier.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include "rsssettings.h" -#include "csssettingsactiveobject.h" +#include "RSSSettings.h" +#include "CSSSettingsActiveObject.h" // FORWARD DECLARATIONS class CSSSettingsAlsNotifier; diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/inc/CSSSettingsRefreshContainer.h --- a/cellular/SSSettings/inc/CSSSettingsRefreshContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/inc/CSSSettingsRefreshContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/inc/CSSSettingsRefreshHandler.h --- a/cellular/SSSettings/inc/CSSSettingsRefreshHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/inc/CSSSettingsRefreshHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,15 +22,15 @@ // INCLUDES -#include +#include #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include -#include "csssettingsactiveobject.h" +#include "CSSSettingsActiveObject.h" // DATA TYPES @@ -78,16 +78,16 @@ /** * @see MSSSettingsRefreshHandler::NotifyFileChangeL. - */ - void NotifyFileChangeL( + */ + void NotifyFileChangeL( MSSSettingsRefreshObserver& aObserver, TSatElementaryFiles aObservedFiles, TSatRefreshType aObservedRefreshType ); - /** + /** * @see MSSSettingsRefreshHandler::CancelNotify. - */ - void CancelNotify(); + */ + void CancelNotify(); /** * @see MSSSettingsRefreshHandler::ChangedCspTable. @@ -99,17 +99,17 @@ public: // Functions from base classes - /** + /** * @see MSatRefreshObserver::AllowRefresh */ TBool AllowRefresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ); - /** + /** * @see MSatRefreshObserver::Refresh */ - void Refresh( + void Refresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ); diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/inc/MSSSettingsRefreshHandler.h --- a/cellular/SSSettings/inc/MSSSettingsRefreshHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/inc/MSSSettingsRefreshHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES -#include +#include #include @@ -43,25 +43,25 @@ public: // New functions /** - * Start the waiting for refresh events. + * Start the waiting for refresh events. * * @param aObserver The observer to handle refresh events. * @param aObservedFile The file change to be observed. * @param aObservedRefreshType The refresh type(s) to be observed. - */ - virtual void NotifyFileChangeL( + */ + virtual void NotifyFileChangeL( MSSSettingsRefreshObserver& aObserver, TSatElementaryFiles aObservedFile, TSatRefreshType aObservedRefreshType ) = 0; - /** - * Cancel the notification started in NotifyFileChangeL. + /** + * Cancel the notification started in NotifyFileChangeL. * * @param aObserver The observer whose notify to be canceled. * @param aObservedFile The file change to be canceled. * @param aObservedRefreshType The refresh type to be canceled. - */ - virtual void CancelNotify() = 0; + */ + virtual void CancelNotify() = 0; /** * Get the changed CSP information after Refresh. diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/rom/SSSettings.iby --- a/cellular/SSSettings/rom/SSSettings.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/rom/SSSettings.iby Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ #ifndef __SSSETTINGS_IBY__ #define __SSSETTINGS_IBY__ -file=ABI_DIR\BUILD_DIR\sssettings.dll SHARED_LIB_DIR\sssettings.dll -data=ZSYSTEM\install\sssettings_stub.sis System\Install\sssettings_stub.sis +file=ABI_DIR\BUILD_DIR\SSSettings.dll SHARED_LIB_DIR\sssettings.dll +data=ZSYSTEM\install\sssettings_stub.SIS System\Install\sssettings_stub.SIS #endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/src/CSSSettingsActiveObject.cpp --- a/cellular/SSSettings/src/CSSSettingsActiveObject.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/src/CSSSettingsActiveObject.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include "csssettingsactiveobject.h" +#include "CSSSettingsActiveObject.h" #include diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/src/CSSSettingsAlsNotifier.cpp --- a/cellular/SSSettings/src/CSSSettingsAlsNotifier.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/src/CSSSettingsAlsNotifier.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,14 +20,14 @@ // INCLUDE FILES #include #include -#include -#include // sssettings pub&sub keys. -#include // sssettings centrep keys. -#include +#include +#include // SSSettings Pub&Sub keys. +#include // SSSettings CentRep keys. +#include -#include "csssettingsalsnotifier.h" -#include "csssettingsactiveobject.h" -#include "sssettingslogger.h" +#include "CSSSettingsAlsNotifier.h" +#include "CSSSettingsActiveObject.h" +#include "SSSettingsLogger.h" // ================= MEMBER FUNCTIONS ======================= // ----------------------------------------------------------------------------- @@ -488,7 +488,7 @@ if ( error == KErrNone ) { // Make sure that SIM state is OK otherwise parameters coming from SIM are mess. - if ( simState ==ESimUsable ) + if ( simState ==ESimUsable ) { // Get Als support from Product Profile. error = CheckAlsSupportInProductProfile( iPPSupportAls ); @@ -514,30 +514,30 @@ // Open connection RCustomerServiceProfileCache. RCustomerServiceProfileCache alsProfileCache; - error = alsProfileCache.Open(); - if ( error != KErrNone ) - { - return error; - } - + error = alsProfileCache.Open(); + if ( error != KErrNone ) + { + return error; + } + // Get ALS CSP bit from cache. - iAlsCSPError = alsProfileCache.CspCPHSTeleservices( params ); - - if ( iAlsCSPError == KErrNone || iAlsCSPError == KErrNotSupported ) - { - // Checks CSP ALS support. - iAlsCSPSupport = CheckIfAlsCSPSupported( params ); - } - // If ETEL/TSY responses with error KErrNotReady/KErrServerBusy then CSP value is not correct one - // and iAlsStatusChecked is set to EFalse. - else if ( iAlsCSPError == KErrNotReady || iAlsCSPError == KErrServerBusy ) - { - iAlsStatusChecked = EFalse; - alsProfileCache.Close(); - return iAlsCSPError; - } - // Close connection RCustomerServiceProfileCache. - alsProfileCache.Close(); + iAlsCSPError = alsProfileCache.CspCPHSTeleservices( params ); + + if ( iAlsCSPError == KErrNone || iAlsCSPError == KErrNotSupported ) + { + // Checks CSP ALS support. + iAlsCSPSupport = CheckIfAlsCSPSupported( params ); + } + // If ETEL/TSY responses with error KErrNotReady/KErrServerBusy then CSP value is not correct one + // and iAlsStatusChecked is set to EFalse. + else if ( iAlsCSPError == KErrNotReady || iAlsCSPError == KErrServerBusy ) + { + iAlsStatusChecked = EFalse; + alsProfileCache.Close(); + return iAlsCSPError; + } + // Close connection RCustomerServiceProfileCache. + alsProfileCache.Close(); // Save PP and SIM als values to P&S. if ( savePPSimAls ) @@ -577,11 +577,11 @@ TBool CSSSettingsAlsNotifier::CheckIfAlsCSPSupported( const RMobilePhone::TCspCPHSTeleservices aContainer ) const { - TBool supported(EFalse); + TBool supported(EFalse); if ( ( aContainer & RMobilePhone::KCspALS ) != 0 ) - { - supported = ETrue; + { + supported = ETrue; } return supported; } @@ -664,9 +664,9 @@ if ( error == KErrNone ) { error = RProperty::Set( - KPSUidSSConfig, - KSettingsPPSupportsALS, - iPPSupportAls ); + KPSUidSSConfig, + KSettingsPPSupportsALS, + iPPSupportAls ); } if ( error != KErrNone ) diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/src/CSSSettingsNotifier.cpp --- a/cellular/SSSettings/src/CSSSettingsNotifier.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/src/CSSSettingsNotifier.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,12 +19,12 @@ // INCLUDE FILES #include #include -#include +#include -#include "csssettingsnotifier.h" -#include "msssettingsobserver.h" -#include "csssettingsalsnotifier.h" -#include "sssettingslogger.h" +#include "CSSSettingsNotifier.h" +#include "MSSSettingsObserver.h" +#include "CSSSettingsAlsNotifier.h" +#include "SSSettingsLogger.h" // DATA TYPES @@ -111,10 +111,10 @@ CSSSettingsNotifier::~CSSSettingsNotifier() { Cancel(); - if( iCenRepAlsNotifyHandler ) - { + if( iCenRepAlsNotifyHandler ) + { iCenRepAlsNotifyHandler->StopListening(); - } + } if( iCenRepClirNotifyHandler ) { diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/src/CSSSettingsRefreshContainer.cpp --- a/cellular/SSSettings/src/CSSSettingsRefreshContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/src/CSSSettingsRefreshContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include -#include "csssettingsrefreshhandler.h" +#include +#include "CSSSettingsRefreshHandler.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/src/CSSSettingsRefreshHandler.cpp --- a/cellular/SSSettings/src/CSSSettingsRefreshHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/src/CSSSettingsRefreshHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,13 +19,13 @@ // INCLUDE FILES #include -#include -#include // bt sap central repository key. +#include +#include // BT SAP Central Repository key. #include -#include "csssettingsrefreshhandler.h" -#include "sssettingslogger.h" -#include "csssettingsactiveobject.h" +#include "CSSSettingsRefreshHandler.h" +#include "SSSettingsLogger.h" +#include "CSSSettingsActiveObject.h" // ============================= LOCAL FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/src/RCustomerServiceProfileCache.cpp --- a/cellular/SSSettings/src/RCustomerServiceProfileCache.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/src/RCustomerServiceProfileCache.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,13 +19,13 @@ // INCLUDE FILES #include // for feature definitions #include -#include +#include #include #include #include -#include "rcustomerserviceprofilecache.h" -#include "sssettingslogger.h" +#include "RCustomerServiceProfileCache.h" +#include "SSSettingsLogger.h" // CONSTANTS #define KSSSettingsTSYName KMmTsyModuleName @@ -80,8 +80,8 @@ // Constructor // ----------------------------------------------------------------------------- EXPORT_C RCustomerServiceProfileCache::RCustomerServiceProfileCache() + :iData( NULL ),iOldCspFile(NULL) { - iData = NULL; } // ----------------------------------------------------------------------------- @@ -119,6 +119,8 @@ __SSSLOGSTRING("[SSS]--> RCustomerServiceProfileCache::Close"); if ( iData == NULL ) { + delete iOldCspFile; + iOldCspFile = NULL; return; } @@ -460,7 +462,12 @@ } User::LeaveIfError( CspCacheDoOpenEtelConnection( iData->iEtel, iData->iPhone ) ); - + + if( iOldCspFile ) + { + delete iOldCspFile; + iOldCspFile = NULL; + } // Create and reset old CSP file variable. iOldCspFile = new ( ELeave ) RMobilePhone::TMobilePhoneCspFileV1; DoResetOldCspFile(); @@ -495,34 +502,34 @@ error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache1, value ); } else if ( error == KErrNotFound && aGroup == ESsCspGroup2 ) - { - error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache2, value ); - } + { + error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache2, value ); + } if ( error == KErrNone ) { if ( value != KCspCacheNoFile ) - { - __SSSLOGSTRING("[SSS] ---> GetCustomerServiceProfile"); - TRequestStatus status; - // GetCustomerServiceProfile status returns KErrNotFound if CSP product profile is OFF. - iData->iPhone.GetCustomerServiceProfile( - status , - iData->iCspFilePckg ); - User::WaitForRequest( status ); - error = status.Int(); - __SSSLOGSTRING1("[SSS] <--- GetCustomerServiceProfile: error: %d", error); - - if (( error == KErrNotReady ) || ( error == KErrServerBusy )) - { - return error; - } - } + { + __SSSLOGSTRING("[SSS] ---> GetCustomerServiceProfile"); + TRequestStatus status; + // GetCustomerServiceProfile status returns KErrNotFound if CSP product profile is OFF. + iData->iPhone.GetCustomerServiceProfile( + status , + iData->iCspFilePckg ); + User::WaitForRequest( status ); + error = status.Int(); + __SSSLOGSTRING1("[SSS] <--- GetCustomerServiceProfile: error: %d", error); + + if (( error == KErrNotReady ) || ( error == KErrServerBusy )) + { + return error; + } + } else // CSP has been read return value, if value is KCspCacheNoFile then return KErrNotSupported. - { - __SSSLOGSTRING("[SSS] CSP file cannot be found from SIM"); - return KErrNotSupported; - } + { + __SSSLOGSTRING("[SSS] CSP file cannot be found from SIM"); + return KErrNotSupported; + } if ( error == KErrNone ) { @@ -558,7 +565,7 @@ } else { - value = KCspCacheNoFile; + value = KCspCacheNoFile; error = KErrNotSupported; } } @@ -578,10 +585,10 @@ } // Do not set error if defError is KErrNone. If Define/Set failed then error value is set. - if ( defError != KErrNone ) - { - error = defError; - } + if ( defError != KErrNone ) + { + error = defError; + } } __SSSLOGSTRING1("[SSS] RCustomerServiceProfileCache::DoGetValues: error: %d", error); diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/src/RSSSettings.cpp --- a/cellular/SSSettings/src/RSSSettings.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/src/RSSSettings.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -23,18 +23,18 @@ #include #include #include -#include +#include #include -#include // central repository -#include // settings central repository keys. +#include // Central repository +#include // Settings Central Repository keys. #include #include -#include "rsssettings.h" -#include "msssettingsobserver.h" -#include "csssettingsnotifier.h" -#include "csssettingsalsnotifier.h" -#include "sssettingslogger.h" +#include "RSSSettings.h" +#include "MSSSettingsObserver.h" +#include "CSSSettingsNotifier.h" +#include "CSSSettingsAlsNotifier.h" +#include "SSSettingsLogger.h" // CONSTANTS _LIT( KPanicCat, "SSSettings" ); @@ -500,6 +500,10 @@ TInt error(KErrNone); TInt value(0); + if ( error != KErrNone ) + { + return error; + } // If Get fails, we try to save the default data. switch ( aSetting ) @@ -702,41 +706,41 @@ __SSSLOGSTRING1("[SSS] RSSSettings::IsALSSupported alsCSPError value: %d", aAlsCspError ); // When PP ALS is on and used SIM card suppports CSP ALS then alsCSPSupport returns EFALSE and alsCSPError KErrNotSupported but ALS functionality - // needs to be shown therefore KErrNone is returned. + // needs to be shown therefore KErrNone is returned. if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == FALSE && aAlsCspError == KErrNotSupported ) { error = KErrNone; - } + } else if ( aPpAlsValue && aSimAlsValue && aAlsCspSupport == FALSE ) - { - error = KErrNone; - } + { + error = KErrNone; + } else if ( aPpAlsValue && aSimAlsValue && aAlsCspSupport == TRUE ) { - error = KErrNone; - } + error = KErrNone; + } else if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == FALSE ) - { - error = KErrNone; - } + { + error = KErrNone; + } else if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == TRUE ) - { - error = KErrNone; - } + { + error = KErrNone; + } else if ( !aPpAlsValue && aSimAlsValue && aAlsCspSupport == TRUE ) - { - error = KErrNone; - } + { + error = KErrNone; + } else if ( !aPpAlsValue && aSimAlsValue && aAlsCspSupport == FALSE ) - { - error = KErrNotSupported; - } + { + error = KErrNotSupported; + } else if ( !aPpAlsValue && !aSimAlsValue && aAlsCspSupport == TRUE ) - { - error = KErrNone; - } - - return error; + { + error = KErrNone; + } + + return error; } // --------------------------------------------------------- @@ -756,6 +760,10 @@ Panic( SSSettingsPanicInvalidRequest ) ); TInt error(KErrNone); + if ( error != KErrNone ) + { + return error; + } switch ( aSetting ) { diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/tsrc/public/basic/EunitTest/Group/bld.inf --- a/cellular/SSSettings/tsrc/public/basic/EunitTest/Group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/tsrc/public/basic/EunitTest/Group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -29,6 +29,6 @@ PRJ_MMPFILES PRJ_TESTMMPFILES -../group/MT_SSSettings.mmp +../Group/MT_SSSettings.mmp // End of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/tsrc/public/basic/EunitTest/MT_SSSettings/MT_SSSettings.cpp --- a/cellular/SSSettings/tsrc/public/basic/EunitTest/MT_SSSettings/MT_SSSettings.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/tsrc/public/basic/EunitTest/MT_SSSettings/MT_SSSettings.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // EXTERNAL INCLUDES #include #include -#include -#include +#include +#include #include // INTERNAL INCLUDES diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/tsrc/public/basic/EunitTest/MT_SSSettings/MT_SSSettings.h --- a/cellular/SSSettings/tsrc/public/basic/EunitTest/MT_SSSettings/MT_SSSettings.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/tsrc/public/basic/EunitTest/MT_SSSettings/MT_SSSettings.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff -r 7d48bed6ce0c -r 987c9837762f cellular/SSSettings/tsrc/public/basic/group/bld.inf --- a/cellular/SSSettings/tsrc/public/basic/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/SSSettings/tsrc/public/basic/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -15,7 +15,7 @@ * */ -#include "../EunitTest/group/bld.inf" +#include "../EunitTest/Group/bld.inf" // End of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/ServiceRequest/data/ServiceRequest.rss --- a/cellular/ServiceRequest/data/ServiceRequest.rss Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/ServiceRequest/data/ServiceRequest.rss Wed Sep 01 12:15:03 2010 +0100 @@ -29,7 +29,7 @@ #include #include -#include "servicerequest.hrh" +#include "ServiceRequest.hrh" RESOURCE RSS_SIGNATURE { } diff -r 7d48bed6ce0c -r 987c9837762f cellular/ServiceRequest/group/ServiceRequest.mmp --- a/cellular/ServiceRequest/group/ServiceRequest.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/ServiceRequest/group/ServiceRequest.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -25,11 +25,11 @@ TARGETTYPE DLL UID 0x1000008d 0x10005A3D -SOURCEPATH ../src -SOURCE cservicerequest.cpp +SOURCEPATH ../src +SOURCE CServiceRequest.cpp // Resource files -START RESOURCE ../data/servicerequest.rss +START RESOURCE ../data/ServiceRequest.rss TARGETPATH RESOURCE_FILES_DIR HEADER LANGUAGE_IDS @@ -41,7 +41,7 @@ MW_LAYER_SYSTEMINCLUDE -LIBRARY euser.lib cone.lib avkon.lib commonengine.lib +LIBRARY euser.lib cone.lib avkon.lib commonengine.lib LIBRARY aknnotify.lib // End of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/ServiceRequest/group/bld.inf --- a/cellular/ServiceRequest/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/ServiceRequest/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -21,14 +21,14 @@ DEFAULT PRJ_EXPORTS -../inc/cservicerequest.h |../../../inc/cservicerequest.h -../inc/mservicerequestobserver.h |../../../inc/mservicerequestobserver.h -../data/servicerequest_stub.sis /epoc32/data/z/system/install/servicerequest_stub.sis +../inc/CServiceRequest.h |../../../inc/cservicerequest.h +../inc/MServiceRequestObserver.h |../../../inc/mservicerequestobserver.h +../data/servicerequest_stub.SIS /epoc32/data/z/system/install/servicerequest_stub.sis ../rom/servicerequest.iby CORE_APP_LAYER_IBY_EXPORT_PATH(servicerequest.iby) -../rom/servicerequestresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(servicerequestresources.iby) +../rom/servicerequestResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(servicerequestResources.iby) PRJ_MMPFILES -../group/servicerequest.mmp +../group/ServiceRequest.mmp // End of File diff -r 7d48bed6ce0c -r 987c9837762f cellular/ServiceRequest/inc/CServiceRequest.h --- a/cellular/ServiceRequest/inc/CServiceRequest.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/ServiceRequest/inc/CServiceRequest.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include #include -#include +#include // FORWARD DECLARATIONS class MServiceRequestObserver; diff -r 7d48bed6ce0c -r 987c9837762f cellular/ServiceRequest/inc/ServiceRequest.hrh --- a/cellular/ServiceRequest/inc/ServiceRequest.hrh Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/ServiceRequest/inc/ServiceRequest.hrh Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ enum TSerqNotes { ESerqRequestingNote = 1 - }; + }; #endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/ServiceRequest/rom/servicerequest.iby --- a/cellular/ServiceRequest/rom/servicerequest.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/ServiceRequest/rom/servicerequest.iby Wed Sep 01 12:15:03 2010 +0100 @@ -19,8 +19,8 @@ #ifndef __SERVICEREQUEST_IBY__ #define __SERVICEREQUEST_IBY__ -file=ABI_DIR\BUILD_DIR\servicerequest.dll SHARED_LIB_DIR\servicerequest.dll +file=ABI_DIR\BUILD_DIR\SERVICEREQUEST.DLL SHARED_LIB_DIR\SERVICEREQUEST.DLL -data=ZSYSTEM\install\servicerequest_stub.sis System\Install\servicerequest_stub.sis +data=ZSYSTEM\install\Servicerequest_stub.sis System\Install\Servicerequest_stub.sis #endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/ServiceRequest/rom/servicerequestResources.iby --- a/cellular/ServiceRequest/rom/servicerequestResources.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/ServiceRequest/rom/servicerequestResources.iby Wed Sep 01 12:15:03 2010 +0100 @@ -19,6 +19,6 @@ #ifndef __SERVICEREQUESTRESOURCES_IBY__ #define __SERVICEREQUESTRESOURCES_IBY__ -data=DATAZ_\RESOURCE_FILES_DIR\SERVICEREQUEST.rsc RESOURCE_FILES_DIR\SERVICEREQUEST.rsc +data=DATAZ_\RESOURCE_FILES_DIR\SERVICEREQUEST.rsc RESOURCE_FILES_DIR\SERVICEREQUEST.rsc #endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/ServiceRequest/src/CServiceRequest.cpp --- a/cellular/ServiceRequest/src/CServiceRequest.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/ServiceRequest/src/CServiceRequest.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,16 +18,16 @@ // INCLUDE FILES -#include "cservicerequest.h" -#include "mservicerequestobserver.h" -#include +#include "CServiceRequest.h" +#include "MServiceRequestObserver.h" +#include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff -r 7d48bed6ce0c -r 987c9837762f cellular/group/bld.inf --- a/cellular/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -17,8 +17,8 @@ #include "../telephonysettings/group/bld.inf" -#include "../sssettings/group/bld.inf" -#include "../psetnotesui/group/bld.inf" -#include "../servicerequest/group/bld.inf" +#include "../SSSettings/group/bld.inf" +#include "../PsetNotesUi/Group/bld.inf" +#include "../ServiceRequest/group/bld.inf" // End of File \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/bwins/psuinotesu.def --- a/cellular/psuinotes/bwins/psuinotesu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -EXPORTS - ?qt_metacall@PsUiUtils@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int PsUiUtils::qt_metacall(enum QMetaObject::Call, int, void * *) - ?getStaticMetaObject@PsUiNotes@@SAABUQMetaObject@@XZ @ 2 NONAME ; struct QMetaObject const & PsUiNotes::getStaticMetaObject(void) - ?tr@PsUiWaitingNoteHandler@@SA?AVQString@@PBD0H@Z @ 3 NONAME ; class QString PsUiWaitingNoteHandler::tr(char const *, char const *, int) - ?tr@PsUiSettingsWrapper@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString PsUiSettingsWrapper::tr(char const *, char const *) - ?qt_metacast@PsUiNotes@@UAEPAXPBD@Z @ 5 NONAME ; void * PsUiNotes::qt_metacast(char const *) - ?qt_metacall@PsUiSettingsWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6 NONAME ; int PsUiSettingsWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?metaObject@PsUiUtils@@UBEPBUQMetaObject@@XZ @ 7 NONAME ; struct QMetaObject const * PsUiUtils::metaObject(void) const - ?passwordQueryCompleted@PsUiNotes@@IAEXVQString@@_N@Z @ 8 NONAME ; void PsUiNotes::passwordQueryCompleted(class QString, bool) - ?handleProgressNoteCanceled@PsUiNotes@@AAEXXZ @ 9 NONAME ; void PsUiNotes::handleProgressNoteCanceled(void) - ?errorCodeTextMapping@PsUiUtils@@SA_NHAAVQString@@@Z @ 10 NONAME ; bool PsUiUtils::errorCodeTextMapping(int, class QString &) - ?showNotificationDialog@PsUiNotes@@QAEXABVQString@@@Z @ 11 NONAME ; void PsUiNotes::showNotificationDialog(class QString const &) - ??1PsUiDivertNoteHandler@@UAE@XZ @ 12 NONAME ; PsUiDivertNoteHandler::~PsUiDivertNoteHandler(void) - ?qt_metacall@PsUiNotes@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13 NONAME ; int PsUiNotes::qt_metacall(enum QMetaObject::Call, int, void * *) - ?handleDivertingError@PsUiDivertNoteHandler@@QAEXH@Z @ 14 NONAME ; void PsUiDivertNoteHandler::handleDivertingError(int) - ??0PsUiNotes@@AAE@XZ @ 15 NONAME ; PsUiNotes::PsUiNotes(void) - ?showPasswordQueryDialog@PsUiNotes@@QAEXABVQString@@ABVQValidator@@H@Z @ 16 NONAME ; void PsUiNotes::showPasswordQueryDialog(class QString const &, class QValidator const &, int) - ?trUtf8@PsUiNotes@@SA?AVQString@@PBD0@Z @ 17 NONAME ; class QString PsUiNotes::trUtf8(char const *, char const *) - ?getStaticMetaObject@PsUiUtils@@SAABUQMetaObject@@XZ @ 18 NONAME ; struct QMetaObject const & PsUiUtils::getStaticMetaObject(void) - ?readCenrepValue@PsUiSettingsWrapper@@ABE?AVQVariant@@JK@Z @ 19 NONAME ; class QVariant PsUiSettingsWrapper::readCenrepValue(long, unsigned long) const - ?getStaticMetaObject@PsUiDivertNoteHandler@@SAABUQMetaObject@@XZ @ 20 NONAME ; struct QMetaObject const & PsUiDivertNoteHandler::getStaticMetaObject(void) - ?isFeatureCallWaitingDistiquishNotProvisionedEnabled@PsUiSettingsWrapper@@QAE_NXZ @ 21 NONAME ; bool PsUiSettingsWrapper::isFeatureCallWaitingDistiquishNotProvisionedEnabled(void) - ??1PsUiWaitingNoteHandler@@UAE@XZ @ 22 NONAME ; PsUiWaitingNoteHandler::~PsUiWaitingNoteHandler(void) - ?formatPhoneNumber@PsUiNotes@@ABE?AVQString@@V2@@Z @ 23 NONAME ; class QString PsUiNotes::formatPhoneNumber(class QString) const - ?passwordTextChanged@PsUiNotes@@AAEXXZ @ 24 NONAME ; void PsUiNotes::passwordTextChanged(void) - ?tr@PsUiNotes@@SA?AVQString@@PBD0@Z @ 25 NONAME ; class QString PsUiNotes::tr(char const *, char const *) - ??0PsUiSettingsWrapper@@QAE@PAVQObject@@@Z @ 26 NONAME ; PsUiSettingsWrapper::PsUiSettingsWrapper(class QObject *) - ?staticMetaObject@PsUiLocalisation@@2UQMetaObject@@B @ 27 NONAME ; struct QMetaObject const PsUiLocalisation::staticMetaObject - ??1PsUiSettingsWrapper@@UAE@XZ @ 28 NONAME ; PsUiSettingsWrapper::~PsUiSettingsWrapper(void) - ?getStaticMetaObject@PsUiWaitingNoteHandler@@SAABUQMetaObject@@XZ @ 29 NONAME ; struct QMetaObject const & PsUiWaitingNoteHandler::getStaticMetaObject(void) - ?getStaticMetaObject@PsUiSettingsWrapper@@SAABUQMetaObject@@XZ @ 30 NONAME ; struct QMetaObject const & PsUiSettingsWrapper::getStaticMetaObject(void) - ?trUtf8@PsUiUtils@@SA?AVQString@@PBD0@Z @ 31 NONAME ; class QString PsUiUtils::trUtf8(char const *, char const *) - ?qt_metacast@PsUiWaitingNoteHandler@@UAEPAXPBD@Z @ 32 NONAME ; void * PsUiWaitingNoteHandler::qt_metacast(char const *) - ?finishedPasswordQueryDialog@PsUiNotes@@QAEXPAVHbAction@@@Z @ 33 NONAME ; void PsUiNotes::finishedPasswordQueryDialog(class HbAction *) - ?handleDivertingStatus@PsUiDivertNoteHandler@@QAEXAAV?$QList@PAVPSCallDivertingStatus@@@@_N@Z @ 34 NONAME ; void PsUiDivertNoteHandler::handleDivertingStatus(class QList &, bool) - ??0PsUiWaitingNoteHandler@@QAE@AAVPSetCallWaitingWrapper@@@Z @ 35 NONAME ; PsUiWaitingNoteHandler::PsUiWaitingNoteHandler(class PSetCallWaitingWrapper &) - ?trUtf8@PsUiSettingsWrapper@@SA?AVQString@@PBD0H@Z @ 36 NONAME ; class QString PsUiSettingsWrapper::trUtf8(char const *, char const *, int) - ?tr@PsUiSettingsWrapper@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString PsUiSettingsWrapper::tr(char const *, char const *, int) - ?cancelNote@PsUiNotes@@QAEXH@Z @ 38 NONAME ; void PsUiNotes::cancelNote(int) - ?tr@PsUiLocalisation@@SA?AVQString@@PBD0H@Z @ 39 NONAME ; class QString PsUiLocalisation::tr(char const *, char const *, int) - ?removeTranslators@PsUiLocalisation@@QAEXXZ @ 40 NONAME ; void PsUiLocalisation::removeTranslators(void) - ?tr@PsUiUtils@@SA?AVQString@@PBD0@Z @ 41 NONAME ; class QString PsUiUtils::tr(char const *, char const *) - ?qt_metacast@PsUiSettingsWrapper@@UAEPAXPBD@Z @ 42 NONAME ; void * PsUiSettingsWrapper::qt_metacast(char const *) - ?tr@PsUiDivertNoteHandler@@SA?AVQString@@PBD0@Z @ 43 NONAME ; class QString PsUiDivertNoteHandler::tr(char const *, char const *) - ??0PsUiLocalisation@@QAE@PAVQObject@@@Z @ 44 NONAME ; PsUiLocalisation::PsUiLocalisation(class QObject *) - ??1PsUiLocalisation@@UAE@XZ @ 45 NONAME ; PsUiLocalisation::~PsUiLocalisation(void) - ?trUtf8@PsUiWaitingNoteHandler@@SA?AVQString@@PBD0H@Z @ 46 NONAME ; class QString PsUiWaitingNoteHandler::trUtf8(char const *, char const *, int) - ?noteShowing@PsUiNotes@@QAE_NXZ @ 47 NONAME ; bool PsUiNotes::noteShowing(void) - ??_EPsUiWaitingNoteHandler@@UAE@I@Z @ 48 NONAME ; PsUiWaitingNoteHandler::~PsUiWaitingNoteHandler(unsigned int) - ?trUtf8@PsUiNotes@@SA?AVQString@@PBD0H@Z @ 49 NONAME ; class QString PsUiNotes::trUtf8(char const *, char const *, int) - ?trUtf8@PsUiDivertNoteHandler@@SA?AVQString@@PBD0@Z @ 50 NONAME ; class QString PsUiDivertNoteHandler::trUtf8(char const *, char const *) - ?handleCFRequesting@PsUiDivertNoteHandler@@QAEX_N0@Z @ 51 NONAME ; void PsUiDivertNoteHandler::handleCFRequesting(bool, bool) - ?metaObject@PsUiLocalisation@@UBEPBUQMetaObject@@XZ @ 52 NONAME ; struct QMetaObject const * PsUiLocalisation::metaObject(void) const - ?trUtf8@PsUiDivertNoteHandler@@SA?AVQString@@PBD0H@Z @ 53 NONAME ; class QString PsUiDivertNoteHandler::trUtf8(char const *, char const *, int) - ??_EPsUiLocalisation@@UAE@I@Z @ 54 NONAME ; PsUiLocalisation::~PsUiLocalisation(unsigned int) - ?handleCallWaitingGetStatus@PsUiWaitingNoteHandler@@QAEXW4PsCallWaitingStatus@PSetCallWaitingWrapper@@ABV?$QList@E@@@Z @ 55 NONAME ; void PsUiWaitingNoteHandler::handleCallWaitingGetStatus(enum PSetCallWaitingWrapper::PsCallWaitingStatus, class QList const &) - ?formatActiveDivertsNoteText@PsUiNotes@@AAEXABV?$QList@PAVPSCallDivertingStatus@@@@AAVQString@@@Z @ 56 NONAME ; void PsUiNotes::formatActiveDivertsNoteText(class QList const &, class QString &) - ?instance@PsUiNotes@@SAPAV1@XZ @ 57 NONAME ; class PsUiNotes * PsUiNotes::instance(void) - ?staticMetaObject@PsUiDivertNoteHandler@@2UQMetaObject@@B @ 58 NONAME ; struct QMetaObject const PsUiDivertNoteHandler::staticMetaObject - ?staticMetaObject@PsUiUtils@@2UQMetaObject@@B @ 59 NONAME ; struct QMetaObject const PsUiUtils::staticMetaObject - ?qt_metacast@PsUiLocalisation@@UAEPAXPBD@Z @ 60 NONAME ; void * PsUiLocalisation::qt_metacast(char const *) - ?handleCallWaitingError@PsUiWaitingNoteHandler@@QAEXH@Z @ 61 NONAME ; void PsUiWaitingNoteHandler::handleCallWaitingError(int) - ?progressNoteCanceled@PsUiNotes@@IAEXXZ @ 62 NONAME ; void PsUiNotes::progressNoteCanceled(void) - ?launchNextNoteIfReady@PsUiNotes@@AAEXXZ @ 63 NONAME ; void PsUiNotes::launchNextNoteIfReady(void) - ?qt_metacast@PsUiUtils@@UAEPAXPBD@Z @ 64 NONAME ; void * PsUiUtils::qt_metacast(char const *) - ?trUtf8@PsUiWaitingNoteHandler@@SA?AVQString@@PBD0@Z @ 65 NONAME ; class QString PsUiWaitingNoteHandler::trUtf8(char const *, char const *) - ?tr@PsUiDivertNoteHandler@@SA?AVQString@@PBD0H@Z @ 66 NONAME ; class QString PsUiDivertNoteHandler::tr(char const *, char const *, int) - ?staticMetaObject@PsUiSettingsWrapper@@2UQMetaObject@@B @ 67 NONAME ; struct QMetaObject const PsUiSettingsWrapper::staticMetaObject - ?staticMetaObject@PsUiNotes@@2UQMetaObject@@B @ 68 NONAME ; struct QMetaObject const PsUiNotes::staticMetaObject - ?tr@PsUiLocalisation@@SA?AVQString@@PBD0@Z @ 69 NONAME ; class QString PsUiLocalisation::tr(char const *, char const *) - ??_EPsUiSettingsWrapper@@UAE@I@Z @ 70 NONAME ; PsUiSettingsWrapper::~PsUiSettingsWrapper(unsigned int) - ?getStaticMetaObject@PsUiLocalisation@@SAABUQMetaObject@@XZ @ 71 NONAME ; struct QMetaObject const & PsUiLocalisation::getStaticMetaObject(void) - ?showCallDivertDetails@PsUiNotes@@QAEXABV?$QList@PAVPSCallDivertingStatus@@@@@Z @ 72 NONAME ; void PsUiNotes::showCallDivertDetails(class QList const &) - ?trUtf8@PsUiUtils@@SA?AVQString@@PBD0H@Z @ 73 NONAME ; class QString PsUiUtils::trUtf8(char const *, char const *, int) - ??1PsUiNotes@@EAE@XZ @ 74 NONAME ; PsUiNotes::~PsUiNotes(void) - ?qt_metacall@PsUiDivertNoteHandler@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 75 NONAME ; int PsUiDivertNoteHandler::qt_metacall(enum QMetaObject::Call, int, void * *) - ?qt_metacast@PsUiDivertNoteHandler@@UAEPAXPBD@Z @ 76 NONAME ; void * PsUiDivertNoteHandler::qt_metacast(char const *) - ?trUtf8@PsUiLocalisation@@SA?AVQString@@PBD0H@Z @ 77 NONAME ; class QString PsUiLocalisation::trUtf8(char const *, char const *, int) - ?trUtf8@PsUiSettingsWrapper@@SA?AVQString@@PBD0@Z @ 78 NONAME ; class QString PsUiSettingsWrapper::trUtf8(char const *, char const *) - ?staticMetaObject@PsUiWaitingNoteHandler@@2UQMetaObject@@B @ 79 NONAME ; struct QMetaObject const PsUiWaitingNoteHandler::staticMetaObject - ?handleCallWaitingRequesting@PsUiWaitingNoteHandler@@QAEX_N0@Z @ 80 NONAME ; void PsUiWaitingNoteHandler::handleCallWaitingRequesting(bool, bool) - ?tr@PsUiNotes@@SA?AVQString@@PBD0H@Z @ 81 NONAME ; class QString PsUiNotes::tr(char const *, char const *, int) - ?metaObject@PsUiWaitingNoteHandler@@UBEPBUQMetaObject@@XZ @ 82 NONAME ; struct QMetaObject const * PsUiWaitingNoteHandler::metaObject(void) const - ?tr@PsUiWaitingNoteHandler@@SA?AVQString@@PBD0@Z @ 83 NONAME ; class QString PsUiWaitingNoteHandler::tr(char const *, char const *) - ?showGlobalNotificationDialog@PsUiNotes@@QAEXABVQString@@@Z @ 84 NONAME ; void PsUiNotes::showGlobalNotificationDialog(class QString const &) - ?qt_metacall@PsUiWaitingNoteHandler@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 85 NONAME ; int PsUiWaitingNoteHandler::qt_metacall(enum QMetaObject::Call, int, void * *) - ?activeNoteAboutToClose@PsUiNotes@@AAEXXZ @ 86 NONAME ; void PsUiNotes::activeNoteAboutToClose(void) - ??_EPsUiNotes@@UAE@I@Z @ 87 NONAME ; PsUiNotes::~PsUiNotes(unsigned int) - ?metaObject@PsUiSettingsWrapper@@UBEPBUQMetaObject@@XZ @ 88 NONAME ; struct QMetaObject const * PsUiSettingsWrapper::metaObject(void) const - ?metaObject@PsUiNotes@@UBEPBUQMetaObject@@XZ @ 89 NONAME ; struct QMetaObject const * PsUiNotes::metaObject(void) const - ??0PsUiDivertNoteHandler@@QAE@AAVPSetCallDivertingWrapper@@@Z @ 90 NONAME ; PsUiDivertNoteHandler::PsUiDivertNoteHandler(class PSetCallDivertingWrapper &) - ?showGlobalNote@PsUiNotes@@QAEXAAHABVQString@@W4MessageBoxType@HbMessageBox@@@Z @ 91 NONAME ; void PsUiNotes::showGlobalNote(int &, class QString const &, enum HbMessageBox::MessageBoxType) - ?handleDivertingChanged@PsUiDivertNoteHandler@@QAEXABVPSCallDivertingCommand@@_N@Z @ 92 NONAME ; void PsUiDivertNoteHandler::handleDivertingChanged(class PSCallDivertingCommand const &, bool) - ?showGlobalProgressNote@PsUiNotes@@QAEXAAHABVQString@@@Z @ 93 NONAME ; void PsUiNotes::showGlobalProgressNote(int &, class QString const &) - ?handleCallWaitingChanged@PsUiWaitingNoteHandler@@QAEXW4PsCallWaitingCommand@PSetCallWaitingWrapper@@H@Z @ 94 NONAME ; void PsUiWaitingNoteHandler::handleCallWaitingChanged(enum PSetCallWaitingWrapper::PsCallWaitingCommand, int) - ??_EPsUiDivertNoteHandler@@UAE@I@Z @ 95 NONAME ; PsUiDivertNoteHandler::~PsUiDivertNoteHandler(unsigned int) - ?qt_metacall@PsUiLocalisation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 96 NONAME ; int PsUiLocalisation::qt_metacall(enum QMetaObject::Call, int, void * *) - ?installTranslator@PsUiLocalisation@@QAE_NW4TranslationFileId@1@@Z @ 97 NONAME ; bool PsUiLocalisation::installTranslator(enum PsUiLocalisation::TranslationFileId) - ?showGlobalErrorNote@PsUiNotes@@QAEXAAHH@Z @ 98 NONAME ; void PsUiNotes::showGlobalErrorNote(int &, int) - ?isPhoneOffline@PsUiSettingsWrapper@@QBE_NXZ @ 99 NONAME ; bool PsUiSettingsWrapper::isPhoneOffline(void) const - ?metaObject@PsUiDivertNoteHandler@@UBEPBUQMetaObject@@XZ @ 100 NONAME ; struct QMetaObject const * PsUiDivertNoteHandler::metaObject(void) const - ?trUtf8@PsUiLocalisation@@SA?AVQString@@PBD0@Z @ 101 NONAME ; class QString PsUiLocalisation::trUtf8(char const *, char const *) - ?tr@PsUiUtils@@SA?AVQString@@PBD0H@Z @ 102 NONAME ; class QString PsUiUtils::tr(char const *, char const *, int) - ?numberGroupingSupported@PsUiSettingsWrapper@@QBE_NXZ @ 103 NONAME ; bool PsUiSettingsWrapper::numberGroupingSupported(void) const - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/eabi/psuinotesu.def --- a/cellular/psuinotes/eabi/psuinotesu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -EXPORTS - _ZN16PsUiLocalisation11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME - _ZN16PsUiLocalisation11qt_metacastEPKc @ 2 NONAME - _ZN16PsUiLocalisation16staticMetaObjectE @ 3 NONAME DATA 16 - _ZN16PsUiLocalisation17installTranslatorENS_17TranslationFileIdE @ 4 NONAME - _ZN16PsUiLocalisation17removeTranslatorsEv @ 5 NONAME - _ZN16PsUiLocalisation19getStaticMetaObjectEv @ 6 NONAME - _ZN16PsUiLocalisationC1EP7QObject @ 7 NONAME - _ZN16PsUiLocalisationC2EP7QObject @ 8 NONAME - _ZN16PsUiLocalisationD0Ev @ 9 NONAME - _ZN16PsUiLocalisationD1Ev @ 10 NONAME - _ZN16PsUiLocalisationD2Ev @ 11 NONAME - _ZN19PsUiSettingsWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 12 NONAME - _ZN19PsUiSettingsWrapper11qt_metacastEPKc @ 13 NONAME - _ZN19PsUiSettingsWrapper16staticMetaObjectE @ 14 NONAME DATA 16 - _ZN19PsUiSettingsWrapper19getStaticMetaObjectEv @ 15 NONAME - _ZN19PsUiSettingsWrapper51isFeatureCallWaitingDistiquishNotProvisionedEnabledEv @ 16 NONAME - _ZN19PsUiSettingsWrapperC1EP7QObject @ 17 NONAME - _ZN19PsUiSettingsWrapperC2EP7QObject @ 18 NONAME - _ZN19PsUiSettingsWrapperD0Ev @ 19 NONAME - _ZN19PsUiSettingsWrapperD1Ev @ 20 NONAME - _ZN19PsUiSettingsWrapperD2Ev @ 21 NONAME - _ZN21PsUiDivertNoteHandler11qt_metacallEN11QMetaObject4CallEiPPv @ 22 NONAME - _ZN21PsUiDivertNoteHandler11qt_metacastEPKc @ 23 NONAME - _ZN21PsUiDivertNoteHandler16staticMetaObjectE @ 24 NONAME DATA 16 - _ZN21PsUiDivertNoteHandler18handleCFRequestingEbb @ 25 NONAME - _ZN21PsUiDivertNoteHandler19getStaticMetaObjectEv @ 26 NONAME - _ZN21PsUiDivertNoteHandler20handleDivertingErrorEi @ 27 NONAME - _ZN21PsUiDivertNoteHandler21handleDivertingStatusER5QListIP21PSCallDivertingStatusEb @ 28 NONAME - _ZN21PsUiDivertNoteHandler22handleDivertingChangedERK22PSCallDivertingCommandb @ 29 NONAME - _ZN21PsUiDivertNoteHandlerC1ER24PSetCallDivertingWrapper @ 30 NONAME - _ZN21PsUiDivertNoteHandlerC2ER24PSetCallDivertingWrapper @ 31 NONAME - _ZN21PsUiDivertNoteHandlerD0Ev @ 32 NONAME - _ZN21PsUiDivertNoteHandlerD1Ev @ 33 NONAME - _ZN21PsUiDivertNoteHandlerD2Ev @ 34 NONAME - _ZN22PsUiWaitingNoteHandler11qt_metacallEN11QMetaObject4CallEiPPv @ 35 NONAME - _ZN22PsUiWaitingNoteHandler11qt_metacastEPKc @ 36 NONAME - _ZN22PsUiWaitingNoteHandler16staticMetaObjectE @ 37 NONAME DATA 16 - _ZN22PsUiWaitingNoteHandler19getStaticMetaObjectEv @ 38 NONAME - _ZN22PsUiWaitingNoteHandler22handleCallWaitingErrorEi @ 39 NONAME - _ZN22PsUiWaitingNoteHandler24handleCallWaitingChangedEN22PSetCallWaitingWrapper20PsCallWaitingCommandEi @ 40 NONAME - _ZN22PsUiWaitingNoteHandler26handleCallWaitingGetStatusEN22PSetCallWaitingWrapper19PsCallWaitingStatusERK5QListIhE @ 41 NONAME - _ZN22PsUiWaitingNoteHandler27handleCallWaitingRequestingEbb @ 42 NONAME - _ZN22PsUiWaitingNoteHandlerC1ER22PSetCallWaitingWrapper @ 43 NONAME - _ZN22PsUiWaitingNoteHandlerC2ER22PSetCallWaitingWrapper @ 44 NONAME - _ZN22PsUiWaitingNoteHandlerD0Ev @ 45 NONAME - _ZN22PsUiWaitingNoteHandlerD1Ev @ 46 NONAME - _ZN22PsUiWaitingNoteHandlerD2Ev @ 47 NONAME - _ZN9PsUiNotes10cancelNoteEi @ 48 NONAME - _ZN9PsUiNotes11noteShowingEv @ 49 NONAME - _ZN9PsUiNotes11qt_metacallEN11QMetaObject4CallEiPPv @ 50 NONAME - _ZN9PsUiNotes11qt_metacastEPKc @ 51 NONAME - _ZN9PsUiNotes14showGlobalNoteERiRK7QStringN12HbMessageBox14MessageBoxTypeE @ 52 NONAME - _ZN9PsUiNotes16staticMetaObjectE @ 53 NONAME DATA 16 - _ZN9PsUiNotes19getStaticMetaObjectEv @ 54 NONAME - _ZN9PsUiNotes19passwordTextChangedEv @ 55 NONAME - _ZN9PsUiNotes19showGlobalErrorNoteERii @ 56 NONAME - _ZN9PsUiNotes20progressNoteCanceledEv @ 57 NONAME - _ZN9PsUiNotes21launchNextNoteIfReadyEv @ 58 NONAME - _ZN9PsUiNotes21showCallDivertDetailsERK5QListIP21PSCallDivertingStatusE @ 59 NONAME - _ZN9PsUiNotes22activeNoteAboutToCloseEv @ 60 NONAME - _ZN9PsUiNotes22passwordQueryCompletedE7QStringb @ 61 NONAME - _ZN9PsUiNotes22showGlobalProgressNoteERiRK7QString @ 62 NONAME - _ZN9PsUiNotes22showNotificationDialogERK7QString @ 63 NONAME - _ZN9PsUiNotes23showPasswordQueryDialogERK7QStringRK10QValidatori @ 64 NONAME - _ZN9PsUiNotes26handleProgressNoteCanceledEv @ 65 NONAME - _ZN9PsUiNotes27finishedPasswordQueryDialogEP8HbAction @ 66 NONAME - _ZN9PsUiNotes27formatActiveDivertsNoteTextERK5QListIP21PSCallDivertingStatusER7QString @ 67 NONAME - _ZN9PsUiNotes28showGlobalNotificationDialogERK7QString @ 68 NONAME - _ZN9PsUiNotes8instanceEv @ 69 NONAME - _ZN9PsUiNotesC1Ev @ 70 NONAME - _ZN9PsUiNotesC2Ev @ 71 NONAME - _ZN9PsUiNotesD0Ev @ 72 NONAME - _ZN9PsUiNotesD1Ev @ 73 NONAME - _ZN9PsUiNotesD2Ev @ 74 NONAME - _ZN9PsUiUtils11qt_metacallEN11QMetaObject4CallEiPPv @ 75 NONAME - _ZN9PsUiUtils11qt_metacastEPKc @ 76 NONAME - _ZN9PsUiUtils16staticMetaObjectE @ 77 NONAME DATA 16 - _ZN9PsUiUtils19getStaticMetaObjectEv @ 78 NONAME - _ZN9PsUiUtils20errorCodeTextMappingEiR7QString @ 79 NONAME - _ZNK16PsUiLocalisation10metaObjectEv @ 80 NONAME - _ZNK19PsUiSettingsWrapper10metaObjectEv @ 81 NONAME - _ZNK19PsUiSettingsWrapper14isPhoneOfflineEv @ 82 NONAME - _ZNK19PsUiSettingsWrapper15readCenrepValueElm @ 83 NONAME - _ZNK19PsUiSettingsWrapper23numberGroupingSupportedEv @ 84 NONAME - _ZNK21PsUiDivertNoteHandler10metaObjectEv @ 85 NONAME - _ZNK22PsUiWaitingNoteHandler10metaObjectEv @ 86 NONAME - _ZNK9PsUiNotes10metaObjectEv @ 87 NONAME - _ZNK9PsUiNotes17formatPhoneNumberE7QString @ 88 NONAME - _ZNK9PsUiUtils10metaObjectEv @ 89 NONAME - _ZTI16PsUiLocalisation @ 90 NONAME - _ZTI19PsUiSettingsWrapper @ 91 NONAME - _ZTI21PsUiDivertNoteHandler @ 92 NONAME - _ZTI22PsUiWaitingNoteHandler @ 93 NONAME - _ZTI9PsUiNotes @ 94 NONAME - _ZTI9PsUiUtils @ 95 NONAME - _ZTV16PsUiLocalisation @ 96 NONAME - _ZTV19PsUiSettingsWrapper @ 97 NONAME - _ZTV21PsUiDivertNoteHandler @ 98 NONAME - _ZTV22PsUiWaitingNoteHandler @ 99 NONAME - _ZTV9PsUiNotes @ 100 NONAME - _ZTV9PsUiUtils @ 101 NONAME - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/inc/psuilogging.h --- a/cellular/psuinotes/inc/psuilogging.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +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 PSUILOGGING_H -#define PSUILOGGING_H - -#include - - -/*! - Define MSG_OUTPUT_RDEBUG - for enabling RDebug prints in development tracing. - Shouldn't be used in release code. - */ -#undef MSG_OUTPUT_RDEBUG - -#ifdef MSG_OUTPUT_RDEBUG -#ifdef Q_OS_SYMBIAN -#include - -static void PsUiNotesMsgOutput(QtMsgType type, const char *msg) -{ - switch (type) { - - case QtDebugMsg: - RDebug::Printf("PsUiNotes Debug: %s\n", msg); - break; - case QtWarningMsg: - RDebug::Printf("PsUiNotes Warning: %s\n", msg); - break; - case QtCriticalMsg: - RDebug::Printf("PsUiNotes Critical: %s\n", msg); - break; - case QtFatalMsg: - RDebug::Printf("PsUiNotes Fatal: %s\n", msg); - abort(); - break; - default: - break; - } -} - - #define INSTALL_TRACE_MSG_HANDLER qInstallMsgHandler(PsUiNotesMsgOutput) - #define UNINSTALL_TRACE_MSG_HANDLER qInstallMsgHandler(0) -#else //Q_OS_SYMBIAN - #define INSTALL_TRACE_MSG_HANDLER - #define UNINSTALL_TRACE_MSG_HANDLER -#endif -#else - #define INSTALL_TRACE_MSG_HANDLER - #define UNINSTALL_TRACE_MSG_HANDLER -#endif //MSG_OUTPUT_RDEBUG - -/*! - Debug macros - */ -#define DPRINT qDebug() << __PRETTY_FUNCTION__ -#define DWARNING qWarning() << __PRETTY_FUNCTION__ - -#endif // PSUILOGGING_H - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/inc/psuiutils.h --- a/cellular/psuinotes/inc/psuiutils.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +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 PSUIUTILS_H -#define PSUIUTILS_H - -#include - -#ifdef BUILD_PSUINOTES -#define PSUINOTES_EXPORT Q_DECL_EXPORT -#else -#define PSUINOTES_EXPORT Q_DECL_IMPORT -#endif - -class XQSettingsManager; - -/*! - \class PsUiUtils - \brief The static functionality. - */ -class PSUINOTES_EXPORT PsUiUtils : public QObject -{ - Q_OBJECT - -public: - /*! - Error code text conversion - */ - static bool errorCodeTextMapping(const int errorcode, QString &errorText); - -}; - -/*! - \class SettingsWrapper - \brief Wraps central repository and P&S dependency. - */ -class PSUINOTES_EXPORT PsUiSettingsWrapper : public QObject -{ - Q_OBJECT -public: - PsUiSettingsWrapper(QObject *parent = NULL); - ~PsUiSettingsWrapper(); -public: - - /*! - Call waiting distiquish not provisioned support - */ - bool isFeatureCallWaitingDistiquishNotProvisionedEnabled(); - - /*! - Checks if phone is in offline mode or not. - Return true if phone is in offline mode. - Return false if phone is not in offline mode. - */ - bool isPhoneOffline() const; - - /*! - Number grouping support - */ - bool numberGroupingSupported() const; - -private: - /*! - Read cenrep value. - */ - QVariant readCenrepValue( const long int uid, const unsigned long int key) const; - -private: // Data - // Own - XQSettingsManager* m_Settings; -}; - - -#endif // PSUIUTILS_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/psuinotes.pro --- a/cellular/psuinotes/psuinotes.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# Initial Contributors: -# Nokia Corporation - initial contribution. -# Contributors: -# Description: -TEMPLATE = lib -TARGET = psuinotes -CONFIG += hb -MOC_DIR = moc -TRANSLATIONS = telephone_cp.ts -INCLUDEPATH += inc -SOURCEPATH += src - -# Input -HEADERS += ../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuidivertnotehandler.h \ - ../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuiwaitingnotehandler.h \ - ../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuinotes.h \ - ../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuilocalisation.h \ - inc/psuiutils.h -SOURCES += src/psuidivertnotehandler.cpp \ - src/psuiwaitingnotehandler.cpp \ - src/psuinotes.cpp \ - src/psuilocalisation.cpp \ - src/psuiutils.cpp -DEFINES += BUILD_PSUINOTES -symbian: { - load(data_caging_paths) - - LIBS += -lxqsysinfo \ - -lxqsettingsmanager \ - - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - TARGET.EPOCALLOWDLLDATA = 1 - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.UID3 = 0X200315B9 - - defFiles = \ - "$${LITERAL_HASH}ifdef WINS" \ - "DEFFILE bwins/psuinotes.def" \ - "$${LITERAL_HASH}else" \ - "DEFFILE eabi/psuinotes.def" \ - "$${LITERAL_HASH}endif" - MMP_RULES += defFiles - - # For sis file - dllfile.sources = $${TARGET}.dll - dllfile.path = $$SHARED_LIB_DIR - DEPLOYMENT += dllfile - - BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "./rom/psuinotes.iby CORE_MW_LAYER_IBY_EXPORT_PATH(psuinotes.iby)" -} else: { - INCLUDEPATH += ../../../../../mw/phonesrv/phonesrv_plat/phone_settings_api/inc - INCLUDEPATH += ../../../../../mw/gsprofilesrv/controlpanel/controlpanel_plat/inc - DESTDIR = c:\hb\lib - DLLDESTDIR = c:\hb\bin -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/rom/psuinotes.iby --- a/cellular/psuinotes/rom/psuinotes.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +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 __PSETNOTESUI2_IBY__ -#define __PSETNOTESUI2_IBY__ - -#include - -file=ABI_DIR/BUILD_DIR/psuinotes.dll SHARED_LIB_DIR/psuinotes.dll - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/src/psuidivertnotehandler.cpp --- a/cellular/psuinotes/src/psuidivertnotehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +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 "psuinotes.h" -#include "psuidivertnotehandler.h" -#include "psuilogging.h" - -/*! - PsUiDivertNoteHandler::PsUiDivertNoteHandler - */ -PsUiDivertNoteHandler::PsUiDivertNoteHandler(PSetCallDivertingWrapper& callDivertingWrapper) : - m_callDivertingWrapper(callDivertingWrapper) -{ - DPRINT << ": IN"; - - QObject::connect( - &m_callDivertingWrapper, - SIGNAL(handleDivertingChanged(const PSCallDivertingCommand&,bool)), - this, - SLOT(handleDivertingChanged(const PSCallDivertingCommand&,bool))); - QObject::connect( - &m_callDivertingWrapper, - SIGNAL(handleDivertingStatus(QList&, bool)), - this, - SLOT(handleDivertingStatus(QList&, bool))); - QObject::connect( - &m_callDivertingWrapper, - SIGNAL(handleDivertingError(int)), - this, - SLOT(handleDivertingError(int))); - QObject::connect( - &m_callDivertingWrapper, - SIGNAL(handleCFRequesting(bool,bool)), - this, - SLOT(handleCFRequesting(bool,bool))); - DPRINT << ": OUT"; -} - -/*! - PsUiDivertNoteHandler::~PsUiDivertNoteHandler - */ -PsUiDivertNoteHandler::~PsUiDivertNoteHandler() -{ -} - -/*! - PsUiDivertNoteHandler::handleDivertingChanged - */ -void PsUiDivertNoteHandler::handleDivertingChanged( - const PSCallDivertingCommand& aSetting, - bool aPlural) -{ - DPRINT << ": IN"; - switch ( aSetting.iStatus ) { - case DivertingStatusActive: - if (aPlural) { - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("txt_phone_info_diverts_activated")); - } else { - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("txt_phone_info_divert_activated")); - } - break; - case DivertingStatusNotRegistered: - case DivertingStatusInactive: - if (aPlural) { - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("txt_phone_info_diverts_deactivated")); - } else { - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("txt_phone_info_divert_deactivated")); - } - break; - case DivertingStatusNotProvisioned: - case DivertingStatusUnknown: - default: - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("txt_phone_info_request_not_completed")); - } - DPRINT << ": OUT"; -} - -/*! - PsUiDivertNoteHandler::handleDivertingStatus - */ -void PsUiDivertNoteHandler::handleDivertingStatus( - QList& divertList, - bool plural) -{ - DPRINT << ": IN"; - Q_UNUSED(plural); - - PsUiNotes::instance()->showCallDivertDetails(divertList); - DPRINT << ": OUT"; -} - -/*! - PsUiDivertNoteHandler::handleDivertingError - */ -void PsUiDivertNoteHandler::handleDivertingError(int aReason) -{ - DPRINT << ": IN"; - // Cancel previous note - PsUiNotes::instance()->cancelNote(m_activeNoteId); - // Show error note - PsUiNotes::instance()->showGlobalErrorNote(m_activeNoteId, aReason); - DPRINT << ": OUT"; -} - -/*! - PsUiDivertNoteHandler::handleCFRequesting - */ -void PsUiDivertNoteHandler::handleCFRequesting(bool ongoing, bool interrupted) -{ - DPRINT << ": IN"; - if (interrupted) { - PsUiNotes::instance()->cancelNote(m_activeProgressNoteId); - PsUiNotes::instance()->cancelNote(m_activeNoteId); - } else { - if (ongoing) { - PsUiNotes::instance()->showGlobalProgressNote( - m_activeProgressNoteId, hbTrId("txt_phone_info_requesting")); - } else { - PsUiNotes::instance()->cancelNote(m_activeProgressNoteId); - } - } - DPRINT << ": OUT"; -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/src/psuilocalisation.cpp --- a/cellular/psuinotes/src/psuilocalisation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +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 "psuilocalisation.h" -#include "psuilogging.h" -#include -#include -#include - - -// Constant definitions -const char *TS_FILE_TELEPHONE_CP = "telephone_cp"; -const char *TS_FILE_COMMON = "common"; - -/*! - \class PsUiLocalisation - \brief Localisation utility class for - Telephony control panel plugins. - - Use installTranslator function for installing - needed translation files. - - Takes ownership of the created QTranslator objects - and destroys them when PsUiLocalisation - object is destructed. -*/ - - -/*! - PsUiLocalisation::PsUiLocalisation() - */ -PsUiLocalisation::PsUiLocalisation(QObject *parent) - :QObject(parent) -{ - DPRINT; -} - - -/*! - PsUiLocalisation::~PsUiLocalisation() -*/ -PsUiLocalisation::~PsUiLocalisation() -{ - DPRINT << ":IN"; - removeTranslators(); - DPRINT << ":OUT"; -} - - -/*! - PsUiLocalisation::installTranslator() -*/ -bool PsUiLocalisation::installTranslator( - TranslationFileId translationFileId) -{ - DPRINT << ": IN"; - - QString lang = QLocale::system().name(); - QString path = "z:/resource/qt/translations/"; - bool translatorLoaded(false); - - QString fileName; - switch (translationFileId) { - case TranslationFileTelephoneCp: - fileName = TS_FILE_TELEPHONE_CP; - break; - case TranslationFileCommon: - fileName = TS_FILE_COMMON; - break; - default: - DWARNING << ": Unknown enum value!"; - break; - } - - if (!fileName.isEmpty()) { - QTranslator* translator = new QTranslator; - translatorLoaded = translator->load( - path + fileName + "_" + lang); - if (translatorLoaded) { - m_translators.append(translator); - qApp->installTranslator(translator); - DPRINT << ": translator installed: " << fileName; - } else { - delete translator; - translator = NULL; - DWARNING << ": Translator not loaded!"; - } - } - - DPRINT << ": OUT"; - return translatorLoaded; -} - - -/*! - PsUiLocalisation::removeTranslators() -*/ -void PsUiLocalisation::removeTranslators() -{ - DPRINT << ": IN"; - - foreach (QTranslator *translator, m_translators) { - qApp->removeTranslator(translator); - } - qDeleteAll(m_translators); - m_translators.clear(); - - DPRINT << ": OUT"; -} - - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/src/psuinotes.cpp --- a/cellular/psuinotes/src/psuinotes.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,544 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "psuinotes.h" -#include "psuiutils.h" -#include "psuilogging.h" -#include "psuilocalisation.h" - -/*! - PsUiNotes::instance. - */ -PsUiNotes* PsUiNotes::instance() -{ - DPRINT << ": IN"; - - static PsUiNotes theInstance; - - DPRINT << ", instance address: " << reinterpret_cast(&theInstance); - return &theInstance; -} - -/*! - PsUiNotes::PsUiNotes. - */ -PsUiNotes::PsUiNotes(): - QObject(NULL), - m_notesQueue(NULL), - m_isNoteShowingOngoing(false), - m_passwordDialog(NULL), - m_passwordValidator(NULL) - { - DPRINT << ": IN"; - - m_notesQueue = new QQueue(); - - m_psuiSettings = new PsUiSettingsWrapper(); - - // Localization file loading - m_localisation = new PsUiLocalisation(this); - - // Install required translations - m_localisation->installTranslator( - PsUiLocalisation:: - TranslationFileCommon); - m_localisation->installTranslator( - PsUiLocalisation:: - TranslationFileTelephoneCp); - DPRINT << ": OUT"; - } - -/*! - PsUiNotes::~PsUiNotes. - */ -PsUiNotes::~PsUiNotes() -{ - DPRINT << ": IN"; - - delete m_localisation; - - qDeleteAll(*m_notesQueue); - - delete m_psuiSettings; - - delete m_notesQueue; - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::showGlobalProgressNote. - */ -void PsUiNotes::showGlobalProgressNote( - int ¬eId, const QString& text) -{ - DPRINT << ": IN"; - - HbDeviceProgressDialog *note = - new HbDeviceProgressDialog(HbProgressDialog::WaitDialog, this); - note->setText(text); - - if(hbTrId("txt_common_info_requesting") == text){ - QAction *action = new QAction(hbTrId("txt_common_button_hide"), note); - note->setAction(action, HbDeviceProgressDialog::CancelButtonRole ); - } - - noteId = reinterpret_cast(note); - DPRINT << ", NOTEID: " << noteId; - QObject::connect( - note, SIGNAL(aboutToClose()), - this, SLOT(activeNoteAboutToClose())); - QObject::connect( - note, SIGNAL(cancelled()), - this, SLOT(handleProgressNoteCanceled())); - m_notesQueue->enqueue(note); - launchNextNoteIfReady(); - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::showGlobalNote. - */ -void PsUiNotes::showGlobalNote(int ¬eId, const QString& text, - HbMessageBox::MessageBoxType messageBoxType) -{ - DPRINT << ": IN"; - - HbDeviceMessageBox *note - = new HbDeviceMessageBox(text, messageBoxType, this); - if (messageBoxType == HbMessageBox::MessageTypeQuestion || - messageBoxType == HbMessageBox::MessageTypeInformation) { - note->setTimeout(HbPopup::ConfirmationNoteTimeout); - } - else { - note->setTimeout(0); - } - noteId = reinterpret_cast(note); - DPRINT << ", NOTEID: " << noteId; - - QObject::connect( - note, SIGNAL(aboutToClose()), - this, SLOT(activeNoteAboutToClose())); - - m_notesQueue->enqueue(note); - launchNextNoteIfReady(); - - DPRINT << ": OUT"; -} - - -/*! - PsUiNotes::cancelNote. - */ -void PsUiNotes::cancelNote(int noteId) -{ - DPRINT << ": IN"; - - if (!m_notesQueue->isEmpty()) { - QObject *note = m_notesQueue->head(); - if(note == reinterpret_cast(noteId)) { - int index = m_notesQueue->indexOf(reinterpret_cast(noteId)); - Q_ASSERT(-1 < index); - QObject *note = m_notesQueue->at(index); - DPRINT << ": NOTEID: " << noteId; - if (qobject_cast(note)) { - static_cast(note)->close(); - } else if (qobject_cast(note)) { - static_cast(note)->close(); - } else { - DPRINT << ", UNKNOWN NOTE"; - Q_ASSERT(false); - } - } - else { - DPRINT << ": remove from queue, noteId: " << noteId; - m_notesQueue->removeOne(reinterpret_cast(noteId)); - } - } - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::noteShowing. - */ -bool PsUiNotes::noteShowing() -{ - return !m_notesQueue->isEmpty(); -} - -/*! - PsUiNotes::showGlobalErrorNote. - */ -void PsUiNotes::showGlobalErrorNote(int ¬eId, int errorcode) -{ - DPRINT << ": IN"; - - QString errorText = ""; - PsUiUtils::errorCodeTextMapping(errorcode, errorText); - - HbDeviceMessageBox *note - = new HbDeviceMessageBox(errorText, HbMessageBox::MessageTypeWarning, this); - note->setTimeout(0); - noteId = reinterpret_cast(note); - DPRINT << ", NOTEID: " << noteId; - QObject::connect( - note, SIGNAL(aboutToClose()), - this, SLOT(activeNoteAboutToClose())); - m_notesQueue->enqueue(note); - launchNextNoteIfReady(); - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::showCallDivertDetails. - */ -void PsUiNotes::showCallDivertDetails( - const QList &divertingStatusList) -{ - DPRINT << ": IN"; - - DPRINT << ": Status " << divertingStatusList.first()->iStatus; - DPRINT << ": ServiceGroup " << divertingStatusList.first()->iServiceGroup; - - QString status; - QString content; - - switch( divertingStatusList.first()->iStatus ) - { - case DivertingStatusActive: - formatActiveDivertsNoteText(divertingStatusList,content); - break; - case DivertingStatusInactive: - case DivertingStatusNotRegistered: - status.append(hbTrId("txt_phone_dpopinfo_divert_not_active")); - break; - case DivertingStatusNotProvisioned: - status.append(hbTrId("txt_phone_info_not_allowed")); - break; - case DivertingStatusUnknown: - default: - status.append(hbTrId("txt_phone_info_request_not_completed")); - break; - } - if (divertingStatusList.first()->iStatus != DivertingStatusActive) { - showGlobalNotificationDialog(status); - } - else { - HbDeviceMessageBox * note = - new HbDeviceMessageBox(content, HbMessageBox::MessageTypeQuestion, this); - note->setIconVisible(EFalse); - note->setTimeout(0); - HbAction *backAction = - new HbAction(hbTrId("txt_common_button_close_singledialog") ); - note->setAction(backAction, HbDeviceMessageBox::AcceptButtonRole ); - note->setAction(NULL, HbDeviceMessageBox::RejectButtonRole); - - QObject::connect( - note, SIGNAL(aboutToClose()), - this, SLOT(activeNoteAboutToClose())); - - m_notesQueue->enqueue(note); - launchNextNoteIfReady(); - } - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::showPasswordQueryDialog. - */ -void PsUiNotes::showPasswordQueryDialog( - const QString &title, - const QValidator &validator, - int maxPasswordLength) -{ - DPRINT << ": IN"; - - QScopedPointer passwordDialog(new HbInputDialog()); - - // configure editor so that only digits can be inputted - passwordDialog->setPromptText(title); - passwordDialog->setEchoMode(HbLineEdit::Password); - passwordDialog->setInputMethodHints(Qt::ImhDigitsOnly); - passwordDialog->actions().at(0)->setEnabled(false); - - HbLineEdit *hbLineEdit = passwordDialog->lineEdit(); - hbLineEdit->setMaxLength(maxPasswordLength); - - HbEditorInterface editorInterface(hbLineEdit); - editorInterface.setMode(HbInputModeNumeric); - editorInterface.setInputConstraints(HbEditorConstraintFixedInputMode); - editorInterface.setFilter(HbDigitsOnlyFilter::instance()); - - m_passwordValidator = &validator; - - connect( - hbLineEdit, SIGNAL(contentsChanged()), - this, SLOT(passwordTextChanged())); - - passwordDialog->open(this, SLOT(finishedPasswordQueryDialog(HbAction*))); - if(m_passwordDialog) { - m_passwordDialog->deleteLater(); - m_passwordDialog = NULL; - } - m_passwordDialog = passwordDialog.take(); - m_passwordDialog->setParent(this); - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::finishedPasswordQueryDialog. - */ -void PsUiNotes::finishedPasswordQueryDialog(HbAction* action) -{ - bool ok; - QString password; - if(m_passwordDialog) { - if (action == m_passwordDialog->actions().at(1)) { - ok = false; - } else { - ok = true; - password = m_passwordDialog->value().toString(); - } - - disconnect( - m_passwordDialog->lineEdit(), SIGNAL(contentsChanged()), - this, SLOT(passwordTextChanged())); - - m_passwordDialog->deleteLater(); - m_passwordDialog = NULL; - m_passwordValidator = NULL; - - emit passwordQueryCompleted(password, ok); - } -} - -/*! - PsUiNotes::formatPhoneNumber. - Formats phone number according to locale specific rules. - */ -QString PsUiNotes::formatPhoneNumber(QString number) const -{ - DPRINT << ": IN"; - - QString formattedNumber = number; - - if (m_psuiSettings->numberGroupingSupported() == true) { - //TODO: utilize HbNumberGrouping API when available - } - - // TODO: digit conversion e.g. into arabic-indic -// HbExtendedLocale locale = HbExtendedLocale::system(); -// HbStringUtil::convertDigitsTo(formattedNumber, ArabicIndicDigit); - - DPRINT << ": OUT"; - - return formattedNumber; -} - -/*! - PsUiNotes::launchNextNoteIfReady. - */ -void PsUiNotes::launchNextNoteIfReady() -{ - DPRINT << ": IN"; - - if (m_notesQueue->isEmpty()) { - DPRINT << ", QUEUE EMPTY"; - return; - } - if (!m_isNoteShowingOngoing) { - m_isNoteShowingOngoing = true; - // note is left in the queue so that it can be cancelled at request - QObject *note = m_notesQueue->head(); - DPRINT << ", note: " << reinterpret_cast(note); - if (qobject_cast(note)) { - DPRINT << ", show HbDeviceProgressDialog"; - static_cast(note)->show(); - } else if (qobject_cast(note)) { - DPRINT << ", show HbDeviceMessageBox"; - static_cast(note)->show(); - } else { - DPRINT << ", UNKNOWN NOTE"; - Q_ASSERT(false); - } - } else { - DPRINT << ", BUSY"; - } - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::handleActiveDiverts - */ -void PsUiNotes::formatActiveDivertsNoteText( - const QList &divertingStatusList, - QString &text) -{ - text.append(hbTrId("Active for:") + "\n\n"); //txt_phone_title_active_for - - int entries = divertingStatusList.count(); - DPRINT << ": entries " << entries; - bool dataSet = false; - bool voiceSet = false; - for (int i = 0; entries > i; i++) { - PSCallDivertingStatus *entry = divertingStatusList.at(i); - - if (((entry->iServiceGroup & ServiceGroupVoice) && !voiceSet ) || - ((entry->iServiceGroup & ServiceGroupData)) && !dataSet) { - if ((entry->iServiceGroup & ServiceGroupVoice) && !voiceSet) { - voiceSet = true; - text.append(hbTrId("Voice calls") + "\n"); //txt_phone_info_voice_calls - - } - else if ((entry->iServiceGroup & ServiceGroupData) && !dataSet) { - dataSet = true; - text.append(hbTrId("Video calls") + "\n"); //txt_phone_info_video_calls - } - - QString phoneNumber = formatPhoneNumber(divertingStatusList.at(i)->iNumber); - text.append(hbTrId("To number:\n%L1").arg(phoneNumber) +"\n"); //txt_phone_info_to_numbernl1 - if (0 < entry->iTimeout) { - text.append(hbTrId("Delay time:\n%L1 seconds"). - arg(entry->iTimeout) +"\n\n"); // txt_phone_info_delay_timenln_seconds - } - else { - text.append("\n"); - } - - } - } - // Convert plain text to html - text = Qt::convertFromPlainText(text); -} - -/*! - PsUiNotes::activeNoteAboutToClose. - */ -void PsUiNotes::activeNoteAboutToClose() -{ - DPRINT << ": IN"; - - if (m_isNoteShowingOngoing) { - m_isNoteShowingOngoing = false; - QObject* note(NULL); - if (!m_notesQueue->isEmpty()) { - note = m_notesQueue->dequeue(); - } - if(note) { - launchNextNoteIfReady(); - note->disconnect(this); - DPRINT << ", delete note: " << reinterpret_cast(note); - HbDeviceProgressDialog *pNote = - qobject_cast(note); - note->deleteLater(); - } - } - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::handleProgressNoteCanceled(). - */ -void PsUiNotes::handleProgressNoteCanceled() -{ - DPRINT << ": IN"; - - emit progressNoteCanceled(); - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::passwordTextChanged(). - */ -void PsUiNotes::passwordTextChanged() -{ - DPRINT << ": IN"; - Q_ASSERT(m_passwordDialog && m_passwordValidator); - - HbLineEdit *hbLineEdit = m_passwordDialog->lineEdit(); - int position = 0; - QString password = hbLineEdit->text(); - bool isPasswordValid = - (QValidator::Acceptable == m_passwordValidator->validate( - password, position)); - m_passwordDialog->actions().at(0)->setEnabled(isPasswordValid); - - DPRINT << ": OUT"; -} - - -/*! - PsUiNotes::showNotificationDialog. - */ -void PsUiNotes::showNotificationDialog(const QString& text) -{ - DPRINT << ": IN"; - - HbNotificationDialog *notifDialog = new HbNotificationDialog(); - - notifDialog->setDismissPolicy(HbPopup::TapAnywhere); - notifDialog->setAttribute(Qt::WA_DeleteOnClose, true); - notifDialog->setText(text); - notifDialog->show(); - - DPRINT << ": OUT"; -} - -/*! - PsUiNotes::showGlobalNotificationDialog - */ -void PsUiNotes::showGlobalNotificationDialog(const QString& text) -{ - DPRINT << ": IN"; - - HbDeviceNotificationDialog notifDialog; - - notifDialog.setText(text); - notifDialog.show(); - - DPRINT << ": OUT"; -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/src/psuiutils.cpp --- a/cellular/psuinotes/src/psuiutils.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +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 - -#include -#include "psuiutils.h" -#include "psuilogging.h" - -/*! - PsUiTools::errorCodeTextMapping. - */ -bool PsUiUtils::errorCodeTextMapping(const int errorcode, QString &errorText) -{ - DPRINT; - errorText.clear(); - bool errorTextFound(true); - - switch(errorcode){ - case KErrGsmSSSubscriptionViolation: - errorText = hbTrId("txt_phone_info_barring_operation_not_successful"); - break; - case KErrGsmSSUnknownSubscriber: - case KErrGsmSSAbsentSubscriber: - case KErrGsmSSIllegalOperation: - case KErrGsmSSIllegalSubscriber: - case KErrGsmSSIllegalEquipment: - case KErrGsmSSCallBarred: - case KErrGsmSSDataMissing: - errorText = hbTrId("txt_phone_info_not_allowed"); - break; - case KErrGsmSSIncompatibility: - errorText = hbTrId("txt_phone_info_conflict_error"); - break; - case KErrGsmSSSystemFailure: - errorText = hbTrId("txt_phone_info_result_unknown"); - break; - case KErrGsmSSUnexpectedDataValue: - case KErrGsmSSResourcesUnavailable: - errorText = hbTrId("txt_phone_info_request_rejected"); - break; - case KErrGsmSSNegativePasswordCheck: - case KErrGsmSSPasswordRegistrationFailure: - errorText = hbTrId("Password error"); - break; - case KErrGsmSSPasswordAttemptsViolation: - errorText = hbTrId("txt_phone_info_barring_password_blocked"); - break; - case KErrGsmSMSNoNetworkService: - case KErrGsmNoService: - errorText = hbTrId("No network coverage"); - break; - case KErrSsActivationDataLost: - errorText = hbTrId("Check network services"); - break; - case KErrGsmOfflineOpNotAllowed: - if(XQSysInfo::isSupported(KFeatureIdOfflineMode)){ - XQSettingsManager *xqsettingsManager = new XQSettingsManager(); - XQSettingsKey key(XQSettingsKey::TargetPublishAndSubscribe, - KPSUidBluetoothSapConnectionState.iUid, - KBTSapConnectionState); - QVariant startupValue = xqsettingsManager->readItemValue(key); - int value = startupValue.toInt(); - delete xqsettingsManager; - xqsettingsManager = NULL; - if (value == EBTSapConnected){ - errorText = hbTrId("Operation not possible in SIM access profile mode"); - } else { - errorText = hbTrId("Operation not possible in Off-line mode"); - } - } else { - errorText = hbTrId("txt_phone_info_request_not_completed"); - } - - break; - case KErrGsmSSUnknownAlphabet: - errorText = hbTrId("txt_phone_info_invalid_phone_number"); - break; - default: - errorText = hbTrId("txt_phone_info_request_not_completed"); - break; - } - - return errorTextFound; -} - -PsUiSettingsWrapper::PsUiSettingsWrapper(QObject *parent): - QObject(parent) -{ - m_Settings = new XQSettingsManager(); -} - -PsUiSettingsWrapper::~PsUiSettingsWrapper() -{ - delete m_Settings; -} - -bool PsUiSettingsWrapper::isFeatureCallWaitingDistiquishNotProvisionedEnabled() -{ - bool enabled = readCenrepValue(KCRUidPhoneSettings.iUid, KPSetCallWaiting).toBool(); - DPRINT << "enabled: " << enabled; - return enabled; -} - -bool PsUiSettingsWrapper::isPhoneOffline() const -{ - bool offLinesupport(false); - if (XQSysInfo::isSupported(KFeatureIdOfflineMode)) { - offLinesupport = !readCenrepValue( - KCRUidCoreApplicationUIs.iUid, - KCoreAppUIsNetworkConnectionAllowed).toBool(); - } - return offLinesupport; -} - -QVariant PsUiSettingsWrapper::readCenrepValue( - const long int uid, const unsigned long int key) const -{ - XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); - QVariant ret = m_Settings->readItemValue(settingsKey); - DPRINT << "ret: " << ret; - return ret; -} - -bool PsUiSettingsWrapper::numberGroupingSupported() const - { - return readCenrepValue(KCRUidNumberGrouping.iUid, KNumberGrouping).toBool(); - } - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/src/psuiwaitingnotehandler.cpp --- a/cellular/psuinotes/src/psuiwaitingnotehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,168 +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 "psuinotes.h" -#include "psuiwaitingnotehandler.h" -#include "psuiutils.h" -#include "psuilogging.h" - -/*! - PsUiWaitingNoteHandler::PsUiWaitingNoteHandler - */ -PsUiWaitingNoteHandler::PsUiWaitingNoteHandler(PSetCallWaitingWrapper& callWaitingWrapper) : - m_callWaitingWrapper(callWaitingWrapper) -{ - DPRINT << ": IN"; - - m_settingsWrapper = new PsUiSettingsWrapper(); - - QObject::connect( - &m_callWaitingWrapper, - SIGNAL(handleCallWaitingGetStatus( - PSetCallWaitingWrapper::PsCallWaitingStatus, const QList &)), - this, - SLOT(handleCallWaitingGetStatus( - PSetCallWaitingWrapper::PsCallWaitingStatus, const QList &))); - QObject::connect( - &m_callWaitingWrapper, - SIGNAL(handleCallWaitingChanged(PSetCallWaitingWrapper::PsCallWaitingCommand, int)), - this, - SLOT(handleCallWaitingChanged(PSetCallWaitingWrapper::PsCallWaitingCommand, int))); - QObject::connect( - &m_callWaitingWrapper, - SIGNAL(handleCallWaitingRequesting( bool, bool )), - this, - SLOT(handleCallWaitingRequesting( bool, bool ))); - QObject::connect( - &m_callWaitingWrapper, - SIGNAL(handleCallWaitingError( int )), - this, - SLOT(handleCallWaitingError( int ))); - - DPRINT << ": OUT"; -} - -/*! - PsUiWaitingNoteHandler::~PsUiWaitingNoteHandler - */ -PsUiWaitingNoteHandler::~PsUiWaitingNoteHandler() -{ - DPRINT << ": IN"; - delete m_settingsWrapper; - DPRINT << ": OUT"; -} - -/*! - PsUiWaitingNoteHandler::handleCallWaitingGetStatus - */ -void PsUiWaitingNoteHandler::handleCallWaitingGetStatus( - PSetCallWaitingWrapper::PsCallWaitingStatus status, - const QList &basicServiceGroupIds) -{ - DPRINT << ": IN"; - DPRINT << ": IN status: " << status; - Q_UNUSED(basicServiceGroupIds); - - PsUiNotes::instance()->cancelNote(m_activeNoteId); - - if (PSetCallWaitingWrapper::StatusNotProvisioned == status && - m_settingsWrapper->isFeatureCallWaitingDistiquishNotProvisionedEnabled()) { - DPRINT << ": not provisioned"; - PsUiNotes::instance()->showGlobalNotificationDialog(hbTrId("txt_phone_info_request_not_completed")); - } - - else if (PSetCallWaitingWrapper::StatusActive == status) { - DPRINT << ": status active"; - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("Call waiting active")); //txt_phone_dpopinfo_call_waiting_active - } - else { - DPRINT << ": status not active"; - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("Call waiting not active")); //txt_phone_dpopinfo_call_waiting_not_active - } - - DPRINT << ": OUT"; -} - -/*! - PsUiWaitingNoteHandler::handleCallWaitingChanged - */ -void PsUiWaitingNoteHandler::handleCallWaitingChanged( - PSetCallWaitingWrapper::PsCallWaitingCommand setting, - int result ) -{ - DPRINT << ": IN"; - PsUiNotes::instance()->cancelNote(m_activeNoteId); - if (result) { - PsUiNotes::instance()->showGlobalNote(m_activeNoteId, - hbTrId("txt_phone_info_request_not_confirmed"), - HbMessageBox::MessageTypeWarning); - } else { - switch (setting){ - case PSetCallWaitingWrapper::ActivateCallWaiting: - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("txt_phone_info_call_waiting_activated")); - break; - case PSetCallWaitingWrapper::DeactivateCallWaiting: - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("txt_phone_info_call_waiting_deactivated")); - break; - default: - PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("txt_phone_info_result_unknown")); - break; - } - } - - DPRINT << ": OUT"; -} - -/*! - PsUiWaitingNoteHandler::handleCallWaitingRequesting - */ -void PsUiWaitingNoteHandler::handleCallWaitingRequesting( bool ongoing, bool interrupted ) -{ - DPRINT << ": IN"; - DPRINT << "ongoing:" << ongoing << ", interrupted:" << interrupted; - - if (ongoing) { - PsUiNotes::instance()->showGlobalProgressNote(m_activeNoteId, hbTrId("txt_common_info_requesting")); - } - - if (interrupted) { - PsUiNotes::instance()->cancelNote(m_activeNoteId); - } - - - DPRINT << ": OUT"; -} - -/*! - PsUiWaitingNoteHandler::handleCallWaitingError - */ -void PsUiWaitingNoteHandler::handleCallWaitingError( int error ) -{ - DPRINT << ": IN"; - DPRINT << "errorCode:" << error; - PsUiNotes::instance()->cancelNote(m_activeNoteId); - PsUiNotes::instance()->showGlobalErrorNote(m_activeNoteId, error); - - DPRINT << ": OUT"; -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_hbglobal.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_hbglobal.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +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 "hbglobal.h" - -// ============================ MEMBER FUNCTIONS =============================== - -QString hbTrId(const char *id, int n) -{ - SMC_MOCK_METHOD2( QString, const char *, id, int, n ) -} \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_psetcalldivertingwrapper.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_psetcalldivertingwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +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 "psetcalldivertingwrapper.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::PSetCallDivertingWrapper -// ----------------------------------------------------------------------------- -// -PSetCallDivertingWrapper::PSetCallDivertingWrapper( - CPsetContainer & psetContainer, - QObject * parent ) - //: - //QObject( /*psetContainer, parent*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::~PSetCallDivertingWrapper -// ----------------------------------------------------------------------------- -// -PSetCallDivertingWrapper::~PSetCallDivertingWrapper( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::setCallDiverting -// ----------------------------------------------------------------------------- -// -int PSetCallDivertingWrapper::setCallDiverting( - PSCallDivertingCommand & aSetting, - int aBasicServiceGroup ) - { - SMC_MOCK_METHOD2( int, PSCallDivertingCommand &, aSetting, - int, aBasicServiceGroup ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::getCallDivertingStatus -// ----------------------------------------------------------------------------- -// -void PSetCallDivertingWrapper::getCallDivertingStatus( - const PsServiceGroup aServiceGroup, - const PsCallDivertingCondition aCondition, - int aBsc ) - { - int iDummy = aServiceGroup; - SMC_MOCK_METHOD3( void, int, iDummy, - const PsCallDivertingCondition, aCondition, - int, aBsc ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::cancelProcess -// ----------------------------------------------------------------------------- -// -void PSetCallDivertingWrapper::cancelProcess( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::getDefaultNumbers -// ----------------------------------------------------------------------------- -// -void PSetCallDivertingWrapper::getDefaultNumbers( - QStringList & aDefNumbers ) - { - QStringList list; - list << "0401234567" << "0501234567" << "0451234567"; - aDefNumbers = list; - - SMC_MOCK_METHOD1( void, QStringList &, aDefNumbers ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::setNewDefaultNumber -// ----------------------------------------------------------------------------- -// -void PSetCallDivertingWrapper::setNewDefaultNumber( - QString aNumber ) - { - SMC_MOCK_METHOD1( void, QString, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::getVoiceMailBoxNumber -// ----------------------------------------------------------------------------- -// -int PSetCallDivertingWrapper::getVoiceMailBoxNumber( - QString & aNumber, - PsService aService ) - { - SMC_MOCK_METHOD2( int, QString &, aNumber, - PsService, aService ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::queryVoiceMailBoxNumber -// ----------------------------------------------------------------------------- -// -int PSetCallDivertingWrapper::queryVoiceMailBoxNumber( - QString & aNumber, - PsService aService ) - { - SMC_MOCK_METHOD2( int, QString &, aNumber, - PsService, aService ) - } - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_psetcallwaitingwrapper.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_psetcallwaitingwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +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 "psetcallwaitingwrapper.h" -#include "psetcallwaitingwrapper_p.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::PSetCallWaitingWrapper -// ----------------------------------------------------------------------------- -// -PSetCallWaitingWrapper::PSetCallWaitingWrapper( - CPsetContainer & psetContainer, - QObject * parent ) : QObject( parent ) - { - Q_UNUSED(psetContainer); - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::~PSetCallWaitingWrapper -// ----------------------------------------------------------------------------- -// -PSetCallWaitingWrapper::~PSetCallWaitingWrapper( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::setCallWaiting -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapper::setCallWaiting( - PsCallWaitingCommand aSetting, - int aBasicServiceGroup ) - { - SMC_MOCK_METHOD2( void, PsCallWaitingCommand, aSetting, - int, aBasicServiceGroup ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::getCallWaitingStatus -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapper::getCallWaitingStatus( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::cancelProcess -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapper::cancelProcess( ) - { - SMC_MOCK_METHOD0( void ) - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_psetcallwaitingwrapper_p.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_psetcallwaitingwrapper_p.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /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: -* -*/ -#include -#include -#include -#include -#include -#include "psetcallwaitingwrapper_p.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapperPrivate::PSetCallWaitingWrapperPrivate -// ----------------------------------------------------------------------------- -// -PSetCallWaitingWrapperPrivate::PSetCallWaitingWrapperPrivate( - PSetCallWaitingWrapper & owner ) - : m_Owner(owner) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapperPrivate::~PSetCallWaitingWrapperPrivate -// ----------------------------------------------------------------------------- -// -PSetCallWaitingWrapperPrivate::~PSetCallWaitingWrapperPrivate( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapperPrivate::HandleCallWaitingGetStatusL -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapperPrivate::HandleCallWaitingGetStatusL( - const MPsetCallWaiting::TGetCallWaitingStatus aStatus, - TUint8 aBsc[KPSetNumberOfBsc]) - { - Q_UNUSED(aStatus) - Q_UNUSED(aBsc) - // TODO: make compile - // SMC_MOCK_METHOD2( void, const MPsetCallWaiting::TGetCallWaitingStatus, aStatus, - // TUint8[KPSetNumberOfBsc], aBsc) - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapperPrivate::HandleCallWaitingChangedL -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapperPrivate::HandleCallWaitingChangedL( - const MPsetCallWaiting::TSetCallWaiting aSetting, - const TInt aResult ) - { - SMC_MOCK_METHOD2( void, const MPsetCallWaiting::TSetCallWaiting, aSetting, - const TInt, aResult ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapperPrivate::HandleCWRequestingL -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapperPrivate::HandleCWRequestingL( - TBool aOngoing, - TBool aInterrupted ) - { - SMC_MOCK_METHOD2( void, TBool, aOngoing, - TBool, aInterrupted ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapperPrivate::HandleCWErrorL -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapperPrivate::HandleCWErrorL( - TInt aReason ) - { - SMC_MOCK_METHOD1( void, TInt, aReason ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapperPrivate::SetEngineContact -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapperPrivate::SetEngineContact( - MPsetCallWaiting & aEngineContact ) - { - SMC_MOCK_METHOD1( void, MPsetCallWaiting &, aEngineContact ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_psuilocalisation.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_psuilocalisation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +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 "psuilocalisation.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PsUiLocalisation::PsUiLocalisation -// ----------------------------------------------------------------------------- -// -PsUiLocalisation::PsUiLocalisation( - QObject * parent ) - //: - //QObject( /*parent*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// PsUiLocalisation::~PsUiLocalisation -// ----------------------------------------------------------------------------- -// -PsUiLocalisation::~PsUiLocalisation( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PsUiLocalisation::installTranslator -// ----------------------------------------------------------------------------- -// -bool PsUiLocalisation::installTranslator( - TranslationFileId translationFileId ) - { - SMC_MOCK_METHOD1( bool, TranslationFileId, translationFileId ) - } - - -// ----------------------------------------------------------------------------- -// PsUiLocalisation::removeTranslators -// ----------------------------------------------------------------------------- -// -void PsUiLocalisation::removeTranslators( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_psuinotes.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_psuinotes.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,205 +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 "psuinotes.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PsUiNotes::PsUiNotes -// ----------------------------------------------------------------------------- -// -PsUiNotes::PsUiNotes( ) - //: - //QObject( /**/ ) - { - - } - -// ----------------------------------------------------------------------------- -// PsUiNotes::PsUiNotes -// ----------------------------------------------------------------------------- -// -PsUiNotes::~PsUiNotes( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::instance -// ----------------------------------------------------------------------------- -// -PsUiNotes * PsUiNotes::instance( ) - { - SMC_MOCK_METHOD0( PsUiNotes * ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::showGlobalProgressNote -// ----------------------------------------------------------------------------- -// -void PsUiNotes::showGlobalProgressNote( - int & noteId, - const QString & text ) - { - SMC_MOCK_METHOD2( void, int &, noteId, - const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::showGlobalNote -// ----------------------------------------------------------------------------- -// -void PsUiNotes::showGlobalNote( - int & noteId, - const QString & text, - HbMessageBox::MessageBoxType noteType ) - { - SMC_MOCK_METHOD3( void, int &, noteId, - const QString &, text, - HbMessageBox::MessageBoxType, noteType ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::showGlobalErrorNote -// ----------------------------------------------------------------------------- -// -void PsUiNotes::showGlobalErrorNote( - int & noteId, - int errorCode ) - { - SMC_MOCK_METHOD2( void, int &, noteId, - int, errorCode ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::showCallDivertDetails -// ----------------------------------------------------------------------------- -// -void PsUiNotes::showCallDivertDetails( - const QList & divertingStatusList ) - { - SMC_MOCK_METHOD1( void, const QList &, divertingStatusList ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::showPasswordQueryDialog -// ----------------------------------------------------------------------------- -// -void PsUiNotes::showPasswordQueryDialog( - const QString & title, - const QValidator & validator, - int maxPasswordLength ) - { - SMC_MOCK_METHOD3( void, const QString &, title, - const QValidator &, validator, - int, maxPasswordLength ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::cancelNote -// ----------------------------------------------------------------------------- -// -void PsUiNotes::cancelNote( - int noteId ) - { - SMC_MOCK_METHOD1( void, int, noteId ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::noteShowing -// ----------------------------------------------------------------------------- -// -bool PsUiNotes::noteShowing( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::finishedPasswordQueryDialog -// ----------------------------------------------------------------------------- -// -void PsUiNotes::finishedPasswordQueryDialog( - HbAction * action2 ) - { - SMC_MOCK_METHOD1( void, HbAction *, action2 ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::showNotificationDialog -// ----------------------------------------------------------------------------- -// -void PsUiNotes::showNotificationDialog( - const QString & text ) - { - SMC_MOCK_METHOD1( void, const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// PsUiNotes::showGlobalNotificationDialog -// ----------------------------------------------------------------------------- -// -void PsUiNotes::showGlobalNotificationDialog( - const QString & text ) - { - SMC_MOCK_METHOD1( void, const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// CpPhoneNotes::activeNoteAboutToClose -// ----------------------------------------------------------------------------- -// -void PsUiNotes::activeNoteAboutToClose() -{ - SMC_MOCK_METHOD0( void ) -} - - -// ----------------------------------------------------------------------------- -// CpPhoneNotes::handleProgressNoteCanceled -// ----------------------------------------------------------------------------- -// -void PsUiNotes::handleProgressNoteCanceled() -{ - SMC_MOCK_METHOD0( void ) -} - - -// ----------------------------------------------------------------------------- -// CpPhoneNotes::passwordTextChanged -// ----------------------------------------------------------------------------- -// -void PsUiNotes::passwordTextChanged() -{ - SMC_MOCK_METHOD0( void ) -} - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_psuiutils.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_psuiutils.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +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 "psuiutils.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PsUiUtils::errorCodeTextMapping -// ----------------------------------------------------------------------------- -// -bool PsUiUtils::errorCodeTextMapping( - const int errorcode, - QString & errorText ) - { - SMC_MOCK_METHOD2( bool, const int, errorcode, - QString &, errorText ) - } - - -// ----------------------------------------------------------------------------- -// PsUiSettingsWrapper::PsUiSettingsWrapper -// ----------------------------------------------------------------------------- -// -PsUiSettingsWrapper::PsUiSettingsWrapper( - QObject * parent ) - //: - //QObject( /*parent*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// PsUiSettingsWrapper::~PsUiSettingsWrapper -// ----------------------------------------------------------------------------- -// -PsUiSettingsWrapper::~PsUiSettingsWrapper( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PsUiSettingsWrapper::isFeatureCallWaitingDistiquishNotProvisionedEnabled -// ----------------------------------------------------------------------------- -// -bool PsUiSettingsWrapper::isFeatureCallWaitingDistiquishNotProvisionedEnabled( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// PsUiSettingsWrapper::isPhoneOffline -// ----------------------------------------------------------------------------- -// -bool PsUiSettingsWrapper::isPhoneOffline( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// PsUiSettingsWrapper::numberGroupingSupported -// ----------------------------------------------------------------------------- -// -bool PsUiSettingsWrapper::numberGroupingSupported( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_qobject.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_qobject.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,557 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// QObjectUserData::~QObjectUserData -// ----------------------------------------------------------------------------- -// -QObjectUserData::~QObjectUserData( ) - { - - } - - -// ----------------------------------------------------------------------------- -// QObjectData::~QObjectData -// ----------------------------------------------------------------------------- -// -QObjectData::~QObjectData( ) - { - - } - -#ifdef QT3_SUPPORT -// ----------------------------------------------------------------------------- -// QObject::QObject -// ----------------------------------------------------------------------------- -// -QT3_SUPPORT_CONSTRUCTOR QObject::QObject( - QObject * parent, - const char * name ) - { - - } -#endif - -// ----------------------------------------------------------------------------- -// QObject::~QObject -// ----------------------------------------------------------------------------- -// -QObject::~QObject( ) - { - - } - - -// ----------------------------------------------------------------------------- -// QObject::event -// ----------------------------------------------------------------------------- -// -bool QObject::event( - QEvent * ) - { - // SMC_MOCK_METHOD1( bool, QEvent, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::eventFilter -// ----------------------------------------------------------------------------- -// -bool QObject::eventFilter( - QObject *, - QEvent * ) - { - // SMC_MOCK_METHOD2( bool, QObject, *, -// QEvent, * ) - } - -#ifdef qdoc -// ----------------------------------------------------------------------------- -// QObject::tr -// ----------------------------------------------------------------------------- -// -QString QObject::tr( - const char * sourceText, - const char * comment, - int n ) - { - SMC_MOCK_METHOD3( QString, const char *, sourceText, - const char *, comment, - int, n ) - } - - -// ----------------------------------------------------------------------------- -// QObject::trUtf8 -// ----------------------------------------------------------------------------- -// -QString QObject::trUtf8( - const char * sourceText, - const char * comment, - int n ) - { - SMC_MOCK_METHOD3( QString, const char *, sourceText, - const char *, comment, - int, n ) - } - - -// ----------------------------------------------------------------------------- -// QObject::metaObject -// ----------------------------------------------------------------------------- -// -const QMetaObject * QObject::metaObject( ) const - { - // SMC_MOCK_METHOD0( const QMetaObject * ) - } - -#endif -#ifdef QT_NO_TRANSLATION -// ----------------------------------------------------------------------------- -// QObject::tr -// ----------------------------------------------------------------------------- -// -QString QObject::tr( - const char * sourceText, - const char * ) - { - SMC_MOCK_METHOD2( QString, const char *, sourceText, - const char, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::tr -// ----------------------------------------------------------------------------- -// -QString QObject::tr( - const char * sourceText, - const char * ) - { - SMC_MOCK_METHOD2( QString, const char *, sourceText, - const char, * ) - } -#ifndef QT_NO_TEXTCODEC - -// ----------------------------------------------------------------------------- -// QObject::trUtf8 -// ----------------------------------------------------------------------------- -// -QString QObject::trUtf8( - const char * sourceText, - const char * ) - { - SMC_MOCK_METHOD2( QString, const char *, sourceText, - const char, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::trUtf8 -// ----------------------------------------------------------------------------- -// -QString QObject::trUtf8( - const char * sourceText, - const char * ) - { - SMC_MOCK_METHOD2( QString, const char *, sourceText, - const char, * ) - } -#endif -#endif //QT_NO_TRANSLATION - -// ----------------------------------------------------------------------------- -// QObject::objectName -// ----------------------------------------------------------------------------- -// -QString QObject::objectName( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QObject::setObjectName -// ----------------------------------------------------------------------------- -// -void QObject::setObjectName( - const QString & name ) - { - SMC_MOCK_METHOD1( void, const QString &, name ) - } - - -// ----------------------------------------------------------------------------- -// QObject::blockSignals -// ----------------------------------------------------------------------------- -// -bool QObject::blockSignals( - bool b ) - { - SMC_MOCK_METHOD1( bool, bool, b ) - } - - -// ----------------------------------------------------------------------------- -// QObject::thread -// ----------------------------------------------------------------------------- -// -QThread * QObject::thread( ) const - { -// SMC_MOCK_METHOD0( QThread * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::moveToThread -// ----------------------------------------------------------------------------- -// -void QObject::moveToThread( - QThread * thread ) - { - // SMC_MOCK_METHOD1( void, QThread *, thread ) - } - - -// ----------------------------------------------------------------------------- -// QObject::startTimer -// ----------------------------------------------------------------------------- -// -int QObject::startTimer( - int interval ) - { - SMC_MOCK_METHOD1( int, int, interval ) - } - - -// ----------------------------------------------------------------------------- -// QObject::killTimer -// ----------------------------------------------------------------------------- -// -void QObject::killTimer( - int id ) - { - SMC_MOCK_METHOD1( void, int, id ) - } - -#ifdef QT3_SUPPORT -// ----------------------------------------------------------------------------- -// QObject::child -// ----------------------------------------------------------------------------- -// -QT3_SUPPORT QObject * QObject::child( - const char * objName, - const char * inheritsClass, - bool recursiveSearch ) const - { - SMC_MOCK_METHOD3( QT3_SUPPORT QObject *, const char *, objName, - const char *, inheritsClass, - bool, recursiveSearch ) - } - - -// ----------------------------------------------------------------------------- -// QObject::queryList -// ----------------------------------------------------------------------------- -// -QT3_SUPPORT QObjectList QObject::queryList( - const char * inheritsClass, - const char * objName, - bool regexpMatch, - bool recursiveSearch ) const - { - SMC_MOCK_METHOD4( QT3_SUPPORT QObjectList, const char *, inheritsClass, - const char *, objName, - bool, regexpMatch, - bool, recursiveSearch ) - } -#endif - -// ----------------------------------------------------------------------------- -// QObject::setParent -// ----------------------------------------------------------------------------- -// -void QObject::setParent( - QObject * ) - { - // SMC_MOCK_METHOD1( void, QObject, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::installEventFilter -// ----------------------------------------------------------------------------- -// -void QObject::installEventFilter( - QObject * ) - { - // SMC_MOCK_METHOD1( void, QObject, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::removeEventFilter -// ----------------------------------------------------------------------------- -// -void QObject::removeEventFilter( - QObject * ) - { - // SMC_MOCK_METHOD1( void, QObject, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::connect -// ----------------------------------------------------------------------------- -// -bool QObject::connect( - const QObject * sender, - const char * signal, - const QObject * receiver, - const char * member, - Qt::ConnectionType ConnectionType ) - { - SMC_MOCK_METHOD5( bool, const QObject *, sender, - const char *, signal, - const QObject *, receiver, - const char *, member, - Qt::ConnectionType, ConnectionType ) - } - - -// ----------------------------------------------------------------------------- -// QObject::disconnect -// ----------------------------------------------------------------------------- -// -bool QObject::disconnect( - const QObject * sender, - const char * signal, - const QObject * receiver, - const char * member ) - { -// SMC_MOCK_METHOD4( bool, const QObject *, sender, -// const char *, signal, -// const QObject *, receiver, -// const char *, member ) - } - - -// ----------------------------------------------------------------------------- -// QObject::dumpObjectTree -// ----------------------------------------------------------------------------- -// -void QObject::dumpObjectTree( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// QObject::dumpObjectInfo -// ----------------------------------------------------------------------------- -// -void QObject::dumpObjectInfo( ) - { - SMC_MOCK_METHOD0( void ) - } - -#ifndef QT_NO_PROPERTIES -// ----------------------------------------------------------------------------- -// QObject::setProperty -// ----------------------------------------------------------------------------- -// -bool QObject::setProperty( - const char * name, - const QVariant & value ) - { -// SMC_MOCK_METHOD2( bool, const char *, name, -// const QVariant &, value ) - } - - -// ----------------------------------------------------------------------------- -// QObject::property -// ----------------------------------------------------------------------------- -// -QVariant QObject::property( - const char * name ) const - { -// SMC_MOCK_METHOD1( QVariant, const char *, name ) - } - - -// ----------------------------------------------------------------------------- -// QObject::dynamicPropertyNames -// ----------------------------------------------------------------------------- -// -QList QObject::dynamicPropertyNames( ) const - { -// SMC_MOCK_METHOD0( QList ) - } -#endif // QT_NO_PROPERTIES -#ifndef QT_NO_USERDATA -// ----------------------------------------------------------------------------- -// QObject::registerUserData -// ----------------------------------------------------------------------------- -// -uint QObject::registerUserData( ) - { - SMC_MOCK_METHOD0( uint ) - } - - -// ----------------------------------------------------------------------------- -// QObject::setUserData -// ----------------------------------------------------------------------------- -// -void QObject::setUserData( - uint id, - QObjectUserData * data ) - { -// SMC_MOCK_METHOD2( void, uint, id, -// QObjectUserData *, data ) - } - - -// ----------------------------------------------------------------------------- -// QObject::userData -// ----------------------------------------------------------------------------- -// -QObjectUserData * QObject::userData( - uint id ) const - { -// SMC_MOCK_METHOD1( QObjectUserData *, uint, id ) - } -#endif // QT_NO_USERDATA - -// ----------------------------------------------------------------------------- -// QObject::destroyed -// ----------------------------------------------------------------------------- -// -/* -Q_SIGNALS : void QObject::destroyed( - QObject * ) - { - SMC_MOCK_METHOD1( Q_SIGNALS : void, QObject, * ) - }*/ - - -// ----------------------------------------------------------------------------- -// QObject::deleteLater -// ----------------------------------------------------------------------------- -// -void QObject::deleteLater( ) - { - // SMC_MOCK_METHOD0( Q_SLOTS : void ) - } - - -// ----------------------------------------------------------------------------- -// QObject::sender -// ----------------------------------------------------------------------------- -// -QObject * QObject::sender( ) const - { - // SMC_MOCK_METHOD0( QObject * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::receivers -// ----------------------------------------------------------------------------- -// -int QObject::receivers( - const char * signal ) const - { - SMC_MOCK_METHOD1( int, const char *, signal ) - } - - -// ----------------------------------------------------------------------------- -// QObject::timerEvent -// ----------------------------------------------------------------------------- -// -void QObject::timerEvent( - QTimerEvent * ) - { - // SMC_MOCK_METHOD1( void, QTimerEvent, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::childEvent -// ----------------------------------------------------------------------------- -// -void QObject::childEvent( - QChildEvent * ) - { - // SMC_MOCK_METHOD1( void, QChildEvent, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::customEvent -// ----------------------------------------------------------------------------- -// -void QObject::customEvent( - QEvent * ) - { - // SMC_MOCK_METHOD1( void, QEvent, * ) - } - - -// ----------------------------------------------------------------------------- -// QObject::connectNotify -// ----------------------------------------------------------------------------- -// -void QObject::connectNotify( - const char * signal ) - { - // SMC_MOCK_METHOD1( void, const char *, signal ) - } - - -// ----------------------------------------------------------------------------- -// QObject::disconnectNotify -// ----------------------------------------------------------------------------- -// -void QObject::disconnectNotify( - const char * signal ) - { - // SMC_MOCK_METHOD1( void, const char *, signal ) - } - - -// ----------------------------------------------------------------------------- -// QObject::QObject -// ----------------------------------------------------------------------------- -// -QObject::QObject( - QObjectPrivate & dd, - QObject * parent ) - { - - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_qtranslator.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_qtranslator.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +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 "qtranslator.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// QTranslator::QTranslator -// ----------------------------------------------------------------------------- -// -QTranslator::QTranslator( - QObject * parent ) - : - QObject( parent ) - { - - } - - -// ----------------------------------------------------------------------------- -// QTranslator::~QTranslator -// ----------------------------------------------------------------------------- -// -QTranslator::~QTranslator( ) - { - if (QCoreApplication::instance()) - { - QCoreApplication::removeTranslator(this); - } - } - - -// ----------------------------------------------------------------------------- -// QTranslator::translate -// ----------------------------------------------------------------------------- -// -QString QTranslator::translate( - const char * aContext, - const char * sourceText, - const char * disambiguation ) const - { - SMC_MOCK_METHOD3( QString, const char *, aContext, - const char *, sourceText, - const char *, disambiguation ) - } - - -// ----------------------------------------------------------------------------- -// QTranslator::translate -// ----------------------------------------------------------------------------- -// -QString QTranslator::translate( - const char * aContext, - const char * sourceText, - const char * disambiguation, - int n ) const - { - SMC_MOCK_METHOD4( QString, const char *, aContext, - const char *, sourceText, - const char *, disambiguation, - int, n ) - } - - -// ----------------------------------------------------------------------------- -// QTranslator::isEmpty -// ----------------------------------------------------------------------------- -// -bool QTranslator::isEmpty( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// QTranslator::load -// ----------------------------------------------------------------------------- -// -bool QTranslator::load( - const QString & filename, - const QString & directory, - const QString & search_delimiters, - const QString & suffix ) - { - SMC_MOCK_METHOD4( bool, const QString &, filename, - const QString &, directory, - const QString &, search_delimiters, - const QString &, suffix ) - } - - -// ----------------------------------------------------------------------------- -// QTranslator::load -// ----------------------------------------------------------------------------- -// -bool QTranslator::load( - const uchar * data, - int len ) - { - SMC_MOCK_METHOD2( bool, const uchar *, data, - int, len ) - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_xqsettingskey.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_xqsettingskey.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +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 "xqsettingskey.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQSettingsKey::XQSettingsKey -// ----------------------------------------------------------------------------- -// -XQSettingsKey::XQSettingsKey( - XQSettingsKey::Target target, - long int uid, - unsigned long int key ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQSettingsKey::~XQSettingsKey -// ----------------------------------------------------------------------------- -// -XQSettingsKey::~XQSettingsKey( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQSettingsKey::target -// ----------------------------------------------------------------------------- -// -XQSettingsKey::Target XQSettingsKey::target( ) const - { - - XQSettingsKey::Target variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSettingsKey::uid -// ----------------------------------------------------------------------------- -// -long int XQSettingsKey::uid( ) const - { - - return 0; - } - - -// ----------------------------------------------------------------------------- -// XQSettingsKey::key -// ----------------------------------------------------------------------------- -// -unsigned long int XQSettingsKey::key( ) const - { - - return 0; - } - - -// ----------------------------------------------------------------------------- -// XQPublishAndSubscribeSettingsKey::XQPublishAndSubscribeSettingsKey -// ----------------------------------------------------------------------------- -// -XQPublishAndSubscribeSettingsKey::XQPublishAndSubscribeSettingsKey( - long int categoryUid, - unsigned long int key ) : - XQSettingsKey( XQSettingsKey::TargetPublishAndSubscribe, categoryUid, key ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQPublishAndSubscribeSettingsKey::~XQPublishAndSubscribeSettingsKey -// ----------------------------------------------------------------------------- -// -XQPublishAndSubscribeSettingsKey::~XQPublishAndSubscribeSettingsKey( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey -// ----------------------------------------------------------------------------- -// -XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey( - long int repositoryUid, - unsigned long int key ) : - XQSettingsKey( XQSettingsKey::TargetCentralRepository, repositoryUid, key ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey -// ----------------------------------------------------------------------------- -// -XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey( ) - { - - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_xqsettingsmanager.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_xqsettingsmanager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +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 "xqsettingsmanager.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQSettingsManager::XQSettingsManager -// ----------------------------------------------------------------------------- -// -XQSettingsManager::XQSettingsManager( - QObject * parent ) - : QObject( parent ) - { - - } - -// ----------------------------------------------------------------------------- -// XQSettingsManager::~XQSettingsManager -// ----------------------------------------------------------------------------- -// -XQSettingsManager::~XQSettingsManager( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::readItemValue -// ----------------------------------------------------------------------------- -// -QVariant XQSettingsManager::readItemValue( - const XQSettingsKey & key, - XQSettingsManager::Type type ) - { - SMC_MOCK_METHOD2( QVariant, const XQSettingsKey &, key, XQSettingsManager::Type, type ) - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::writeItemValue -// ----------------------------------------------------------------------------- -// -bool XQSettingsManager::writeItemValue( - const XQSettingsKey & key, - const QVariant & value ) - { - SMC_MOCK_METHOD2( bool, const XQSettingsKey &, key, const QVariant &, value ) - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::startMonitoring -// ----------------------------------------------------------------------------- -// -bool XQSettingsManager::startMonitoring( - const XQSettingsKey & key, - XQSettingsManager::Type type ) - { - Q_UNUSED( key ) - Q_UNUSED( type ) - bool variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::stopMonitoring -// ----------------------------------------------------------------------------- -// -bool XQSettingsManager::stopMonitoring( - const XQSettingsKey & key ) - { - Q_UNUSED( key ) - bool variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::error -// ----------------------------------------------------------------------------- -// -XQSettingsManager::Error XQSettingsManager::error( ) const - { - - XQSettingsManager::Error variable; - return variable; - } - - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/mocks/mock_xqsysinfo.cpp --- a/cellular/psuinotes/tsrc/mocks/mock_xqsysinfo.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +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 "xqsysinfo.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQSysInfo::XQSysInfo -// ----------------------------------------------------------------------------- -// -XQSysInfo::XQSysInfo( - QObject * parent ) - //: - //QObject( /*parent*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::~XQSysInfo -// ----------------------------------------------------------------------------- -// -XQSysInfo::~XQSysInfo( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::currentLanguage -// ----------------------------------------------------------------------------- -// -XQSysInfo::Language XQSysInfo::currentLanguage( ) const - { - - XQSysInfo::Language variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::imei -// ----------------------------------------------------------------------------- -// -QString XQSysInfo::imei( ) const - { - - QString variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::model -// ----------------------------------------------------------------------------- -// -QString XQSysInfo::model( ) const - { - - QString variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::manufacturer -// ----------------------------------------------------------------------------- -// -QString XQSysInfo::manufacturer( ) const - { - - QString variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::softwareVersion -// ----------------------------------------------------------------------------- -// -QString XQSysInfo::softwareVersion( ) const - { - - QString variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::batteryLevel -// ----------------------------------------------------------------------------- -// -uint XQSysInfo::batteryLevel( ) const - { - - return 0; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::imsi -// ----------------------------------------------------------------------------- -// -QString XQSysInfo::imsi( ) const - { - - QString variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::signalStrength -// ----------------------------------------------------------------------------- -// -int XQSysInfo::signalStrength( ) const - { - - return 0; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::diskSpace -// ----------------------------------------------------------------------------- -// -qlonglong XQSysInfo::diskSpace( - XQSysInfo::Drive drive ) const - { - Q_UNUSED( drive ) - qlonglong variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::isDiskSpaceCritical -// ----------------------------------------------------------------------------- -// -bool XQSysInfo::isDiskSpaceCritical( - XQSysInfo::Drive drive ) const - { - Q_UNUSED( drive ) - bool variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::isNetwork -// ----------------------------------------------------------------------------- -// -bool XQSysInfo::isNetwork( ) const - { - - bool variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::memory -// ----------------------------------------------------------------------------- -// -int XQSysInfo::memory( ) const - { - - return 0; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::browserVersion -// ----------------------------------------------------------------------------- -// -QString XQSysInfo::browserVersion( ) const - { - - QString variable; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::isSupported -// ----------------------------------------------------------------------------- -// -bool XQSysInfo::isSupported( - int featureId ) - { - SMC_MOCK_METHOD1( bool, int, featureId ) - } - - -// ----------------------------------------------------------------------------- -// XQSysInfo::error -// ----------------------------------------------------------------------------- -// -XQSysInfo::Error XQSysInfo::error( ) const - { - - XQSysInfo::Error variable; - return variable; - } - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/run_auto_tests_qt.bat --- a/cellular/psuinotes/tsrc/run_auto_tests_qt.bat Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -@echo off -setlocal -goto :startup - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function DEFAULT -:: -:: Modify this function -:: - TESTED_SRC can be changed to match tested code. -:: Specifies path from testcode group directory to -:: tested code -:: - Add test directories to be runned -:: ie. "call :build ut_projectdirectory" or use -:: "for /f %%a in ('dir /b ut_*') do call :build %%a" -:: which compiles, instruments and runs all test directories -:: starting with "ut_". -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:DEFAULT -set TESTED_SRC=..\..\src\*.cpp - -for /f %%a in ('dir /b ut_*') do call :build %%a -if [%DOMODULESTESTS%] EQU [TRUE] ( -for /f %%a in ('dir /b mt_*') do call :build %%a -) - -call :finish -goto :END - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function STARTUP -:: -:: Initializing script -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:STARTUP - -set BUILDTESTS=TRUE -set RUNTESTS=TRUE -set INSTRUMENT=TRUE -set REMOVEINSTRUMENT=TRUE -set DOMODULESTESTS=TRUE -set SBS_CALL=sbs --config winscw_udeb --keepgoing BUILD -set PATH_TO_DLL=\epoc32\release\winscw\udeb -set PATH_TO_COVERAGE_DATA=\coverage_data -set PATH_TO_RESULT=\test_result - -if not exist %PATH_TO_COVERAGE_DATA% ( -mkdir %PATH_TO_COVERAGE_DATA% -) - -if not exist %PATH_TO_RESULT% ( -mkdir %PATH_TO_RESULT% -) - -if [%1] EQU [] ( goto default ) - -call :%1 -call :%2 -call :%3 -call :%4 -call :%5 -echo Running tests = %RUNTESTS% -echo Instrumenting tests = %INSTRUMENT% -goto default - -:/NOCLEANUP -set REMOVEINSTRUMENT=FALSE -goto end - -:/NORUN -set RUNTESTS=FALSE -set REMOVEINSTRUMENT=FALSE -goto end - -:/NOINSTRUMENT -set INSTRUMENT=FALSE -goto end - -:/NOBUILD -set BUILDTESTS=FALSE -goto end - -:/ONLYUNITTESTS -set DOMODULESTESTS=FALSE -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function FINISH -:: -:: Finishes run_auto_tests.bat -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:FINISH - -if [%RUNTESTS%] EQU [TRUE] ( -call :runtests -) - -if [%INSTRUMENT%] EQU [TRUE] ( -call :calculatecoverage -) - -if [%REMOVEINSTRUMENT%] EQU [TRUE] ( -call :removecoverage -) -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function BUILD -:: param directory -:: -:: builds test from given directory -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:BUILD -setlocal -if [%BUILDTESTS%] EQU [FALSE] ( goto end ) -echo Building %1 -if not exist %1 ( -echo %1 Not found! -goto end -) - -pushd . -call cd %1 -call qmake -call sbs --config winscw_udeb --keepgoing CLEAN -if [%INSTRUMENT%] EQU [TRUE] ( -call ctcwrap -2comp -n %PATH_TO_COVERAGE_DATA%\%1 -i d -C "EXCLUDE=*" -C "NO_EXCLUDE=%TESTED_SRC%" "%SBS_CALL%" -) else ( -call %SBS_CALL% -) - -popd -endlocal -goto end - - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function RUNTESTS -:: -:: NOTE! Function assumes that test binary is named according to test directory. -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:RUNTESTS -echo Running tests -for /f %%a in ('dir /b ut_*') do ( - call %PATH_TO_DLL%\%%a.exe - move \epoc32\winscw\c\data\%%a.log %PATH_TO_RESULT%\%%a.log -) -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function CALCULATECOVERAGE -:: -:: Calculates test coverage. Generates html -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:CALCULATECOVERAGE -echo Calculating coverage -ctcpost %PATH_TO_COVERAGE_DATA%\*.sym -p - | ctcmerge -i - -o profile.txt -call ctc2html -t 70 -i profile.txt -o \coverage_result -nsb -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function REMOVECOVERAGE -:: -:: Removes data from coverage directory -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:REMOVECOVERAGE -echo Removing deleting coverage data -call del %PATH_TO_COVERAGE_DATA%\*.sym -call del %PATH_TO_COVERAGE_DATA%\*.dat -call del profile.txt -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function END -:: -:: Prints done -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:END -echo Done! \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuidivertnotehandler/qtestmains60.h --- a/cellular/psuinotes/tsrc/ut_psuidivertnotehandler/qtestmains60.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +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 QTESTMAINS60 -#define QTESTMAINS60 - -#define QTEST_MAIN_S60(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ -char *new_argv[3]; \ -QCoreApplication app(argc, argv); \ -\ -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(); \ -\ -TestObject tc; \ -return QTest::qExec(&tc, 3, new_argv); \ -} - -#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuidivertnotehandler/ut_psuidivertnotehandler.cpp --- a/cellular/psuinotes/tsrc/ut_psuidivertnotehandler/ut_psuidivertnotehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,195 +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" -/* -* 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 "ut_psuidivertnotehandler.h" -#include "psuidivertnotehandler.h" -#include "psetcalldivertingwrapper.h" -#include "qtestmains60.h" -#include - -class CPsetContainer -{ -public: - CPsetContainer(){}; - ~CPsetContainer(){}; -}; - -/*QString hbTrId(const char *id, int n) -{ - SMC_MOCK_METHOD2( QString, const char *, id, int, n ) -}*/ - - -/*! - UT_psuidivertnotehandler::UT_psuidivertnotehandler - */ -UT_psuidivertnotehandler::UT_psuidivertnotehandler() -{ - -} - -/*! - UT_psuidivertnotehandler::~UT_psuidivertnotehandler - */ -UT_psuidivertnotehandler::~UT_psuidivertnotehandler() -{ - -} - -/*! - UT_psuidivertnotehandler::init - */ -void UT_psuidivertnotehandler::init() -{ - initialize(); -} - -/*! - UT_psuidivertnotehandler::cleanup - */ -void UT_psuidivertnotehandler::cleanup() -{ - reset(); -} - -/*! - UT_psuidivertnotehandler::t_memleak - */ -void UT_psuidivertnotehandler::t_memleak() -{ - -} - -/*! - UT_psuidivertnotehandler::t_construction - */ -void UT_psuidivertnotehandler::t_construction() -{ - expect("QObject::connect").times(4); - CPsetContainer psetContainer; - PSetCallDivertingWrapper *mockDivertWrapper = new PSetCallDivertingWrapper(psetContainer,this); - PsUiDivertNoteHandler *divertHandler = new PsUiDivertNoteHandler(*mockDivertWrapper); - delete divertHandler; - delete mockDivertWrapper; - QVERIFY(verify()); -} - -void UT_psuidivertnotehandler::t_handleDivertingChanged() -{ - CPsetContainer psetContainer; - PSetCallDivertingWrapper *mockDivertWrapper = new PSetCallDivertingWrapper(psetContainer,this); - PsUiDivertNoteHandler *divertHandler = new PsUiDivertNoteHandler(*mockDivertWrapper); - - // Divert activated, plural false - PSCallDivertingCommand testCommand; - testCommand.iStatus = DivertingStatusActive; - expect("PsUiNotes::showGlobalNotificationDialog"); - divertHandler->handleDivertingChanged(testCommand, false); - QVERIFY(verify()); - - // Divert activated, plural true - testCommand.iStatus = DivertingStatusActive; - expect("PsUiNotes::showGlobalNotificationDialog"); - divertHandler->handleDivertingChanged(testCommand, true); - QVERIFY(verify()); - - // Divert deactivated, plural false - testCommand.iStatus = DivertingStatusInactive; - expect("PsUiNotes::showGlobalNotificationDialog"); - divertHandler->handleDivertingChanged(testCommand, false); - QVERIFY(verify()); - - // Divert deactivated, plural true - testCommand.iStatus = DivertingStatusInactive; - expect("PsUiNotes::showGlobalNotificationDialog"); - divertHandler->handleDivertingChanged(testCommand, true); - QVERIFY(verify()); - - // Divert status unknown - testCommand.iStatus = DivertingStatusUnknown; - expect("PsUiNotes::showGlobalNotificationDialog"); - divertHandler->handleDivertingChanged(testCommand, true); - QVERIFY(verify()); - - delete divertHandler; - delete mockDivertWrapper; -} - -void UT_psuidivertnotehandler::t_handleDivertingStatus() -{ - CPsetContainer psetContainer; - PSetCallDivertingWrapper *mockDivertWrapper = new PSetCallDivertingWrapper(psetContainer,this); - PsUiDivertNoteHandler *divertHandler = new PsUiDivertNoteHandler(*mockDivertWrapper); - QList divertList; - - expect("PsUiNotes::showCallDivertDetails").with(divertList); - divertHandler->handleDivertingStatus(divertList,false); - - QVERIFY(verify()); - delete divertHandler; - delete mockDivertWrapper; -} - -void UT_psuidivertnotehandler::t_handleDivertingError() -{ - CPsetContainer psetContainer; - PSetCallDivertingWrapper *mockDivertWrapper = new PSetCallDivertingWrapper(psetContainer,this); - PsUiDivertNoteHandler *divertHandler = new PsUiDivertNoteHandler(*mockDivertWrapper); - int errorCode = -1; - expect("PsUiNotes::cancelNote"); - expect("PsUiNotes::showGlobalErrorNote"); - divertHandler->handleDivertingError(errorCode); - - QVERIFY(verify()); - delete divertHandler; - delete mockDivertWrapper; -} - -void UT_psuidivertnotehandler::t_handleCFRequesting() -{ - CPsetContainer psetContainer; - PSetCallDivertingWrapper *mockDivertWrapper = new PSetCallDivertingWrapper(psetContainer,this); - PsUiDivertNoteHandler *divertHandler = new PsUiDivertNoteHandler(*mockDivertWrapper); - - bool ongoing = true; - bool interrupted = false; - expect("PsUiNotes::showGlobalProgressNote"); - divertHandler->handleCFRequesting(ongoing,interrupted); - QVERIFY(verify()); - - ongoing = false; - interrupted = true; - expect("PsUiNotes::cancelNote").times(2); - divertHandler->handleCFRequesting(ongoing,interrupted); - QVERIFY(verify()); - - ongoing = false; - interrupted = false; - expect("PsUiNotes::cancelNote"); - divertHandler->handleCFRequesting(ongoing,interrupted); - QVERIFY(verify()); - - delete divertHandler; - delete mockDivertWrapper; -} - -QTEST_MAIN_S60(UT_psuidivertnotehandler) diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuidivertnotehandler/ut_psuidivertnotehandler.h --- a/cellular/psuinotes/tsrc/ut_psuidivertnotehandler/ut_psuidivertnotehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +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 UT_PSUIDIVERTNOTEHANDLER_H -#define UT_PSUIDIVERTNOTEHANDLER_H - -#include -#include - -class UT_psuidivertnotehandler : public QObject, MockService -{ - Q_OBJECT - -public: - UT_psuidivertnotehandler(); - ~UT_psuidivertnotehandler(); - -private slots: - void init(); - void cleanup(); - void t_memleak(); - - void t_construction(); - void t_handleDivertingChanged(); - void t_handleDivertingStatus(); - void t_handleDivertingError(); - void t_handleCFRequesting(); - - -private: - -}; - -#endif // UT_PSUIDIVERTNOTEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuidivertnotehandler/ut_psuidivertnotehandler.pro --- a/cellular/psuinotes/tsrc/ut_psuidivertnotehandler/ut_psuidivertnotehandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +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: -# - - -CONFIG += hb qtestlib -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../inc/ -DEFINES += BUILD_PSUINOTES BUILD_PSETWRAPPER - -QT -= gui -QT += testlib - -symbian: { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - LIBS += -lmocklib -lsymbianmock -} - -# test code -HEADERS += ut_psuidivertnotehandler.h -SOURCES += ut_psuidivertnotehandler.cpp - -# code to be tested -HEADERS += ../../../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuidivertnotehandler.h - -SOURCES += ../../src/psuidivertnotehandler.cpp - -# mocks needed for testing -HEADERS += ../../../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuinotes.h \ - ../../../../phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h - -SOURCES += ../mocks/mock_psuinotes.cpp \ - ../mocks/mock_psetcalldivertingwrapper.cpp \ - ../mocks/mock_qobject.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuilocalisation/qtestmains60.h --- a/cellular/psuinotes/tsrc/ut_psuilocalisation/qtestmains60.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +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 QTESTMAINS60 -#define QTESTMAINS60 - -#define QTEST_MAIN_S60(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ -char *new_argv[3]; \ -QCoreApplication app(argc, argv); \ -\ -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(); \ -\ -TestObject tc; \ -return QTest::qExec(&tc, 3, new_argv); \ -} - -#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuilocalisation/ut_psuilocalisation.cpp --- a/cellular/psuinotes/tsrc/ut_psuilocalisation/ut_psuilocalisation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +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 "ut_psuilocalisation.h" -#include "qtestmains60.h" -#include -#define private public -#include "psuilocalisation.h" - -void QCoreApplication::installTranslator(QTranslator * messageFile) -{ - SMC_MOCK_METHOD1( void, QTranslator *, messageFile) -} - -/*! - UT_psuilocalisation::UT_psuilocalisation - */ -UT_psuilocalisation::UT_psuilocalisation() -{ - -} - -/*! - UT_psuilocalisation::~UT_psuilocalisation - */ -UT_psuilocalisation::~UT_psuilocalisation() -{ - -} - -/*! - UT_psuilocalisation::init - */ -void UT_psuilocalisation::init() -{ - initialize(); - - m_psuiLocalisation.reset(new PsUiLocalisation); -} - -/*! - UT_psuilocalisation::cleanup - */ -void UT_psuilocalisation::cleanup() -{ - reset(); - delete m_psuiLocalisation.take(); -} - -/*! - UT_psuilocalisation::t_memleak - */ -void UT_psuilocalisation::t_memleak() -{ - -} - -/*! - UT_psuilocalisation::t_installTranslator - */ -void UT_psuilocalisation::t_installTranslator() -{ - - // Test: successfull load - expect("QTranslator::load"). - returns(true); - expect("QCoreApplication::installTranslator").times(1); - - m_psuiLocalisation->installTranslator( - PsUiLocalisation::TranslationFileCommon); - QVERIFY(m_psuiLocalisation->m_translators.count() == 1); - QVERIFY(verify()); - - // Test: failing load - expect("QTranslator::load"). - returns(false); - expect("QCoreApplication::installTranslator").times(0); - m_psuiLocalisation->installTranslator( - PsUiLocalisation::TranslationFileCommon); - QVERIFY(m_psuiLocalisation->m_translators.count() == 1); - - // Test: Unknown enum value - QVERIFY(verify()); - expect("QCoreApplication::installTranslator").times(0); - m_psuiLocalisation->installTranslator( - (PsUiLocalisation::TranslationFileId)2); - QVERIFY(m_psuiLocalisation->m_translators.count() == 1); - QVERIFY(verify()); - - // Test: telephone_cp translator load - expect("QTranslator::load"). - returns(false); - expect("QCoreApplication::installTranslator").times(0); - m_psuiLocalisation->installTranslator( - PsUiLocalisation::TranslationFileTelephoneCp); - QVERIFY(verify()); - -} - -/*! - UT_psuilocalisation::t_removeTranslators - */ -void UT_psuilocalisation::t_removeTranslators() -{ - expect("QTranslator::load"). - returns(true); - - m_psuiLocalisation->installTranslator( - PsUiLocalisation::TranslationFileCommon); - m_psuiLocalisation->installTranslator( - PsUiLocalisation::TranslationFileTelephoneCp); - - m_psuiLocalisation->removeTranslators(); - QVERIFY(m_psuiLocalisation->m_translators.count() == 0); - QVERIFY(verify()); -} - -QTEST_MAIN_S60(UT_psuilocalisation) diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuilocalisation/ut_psuilocalisation.h --- a/cellular/psuinotes/tsrc/ut_psuilocalisation/ut_psuilocalisation.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +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 UT_PSUILOCALISATION_H -#define UT_PSUILOCALISATION_H - -#include -#include - -class PsUiLocalisation; - -class UT_psuilocalisation : public QObject, MockService -{ - Q_OBJECT - -public: - UT_psuilocalisation(); - ~UT_psuilocalisation(); - -private slots: - void init(); - void cleanup(); - void t_memleak(); - void t_installTranslator(); - void t_removeTranslators(); - -private: - QScopedPointer m_psuiLocalisation; - -}; - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuilocalisation/ut_psuilocalisation.pro --- a/cellular/psuinotes/tsrc/ut_psuilocalisation/ut_psuilocalisation.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -CONFIG += qtestlib -CONFIG += hb -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../inc/ -DEFINES += BUILD_PSUINOTES - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - LIBS += -lmocklib -lsymbianmock -} - -# test code -HEADERS += ut_psuilocalisation.h -SOURCES += ut_psuilocalisation.cpp - -# code to be tested -HEADERS += ../../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuilocalisation.h - -SOURCES += ../../src/psuilocalisation.cpp - -# mocks needed for testing -SOURCES += ../mocks/mock_qtranslator.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuinotes/qtestmains60ui.h --- a/cellular/psuinotes/tsrc/ut_psuinotes/qtestmains60ui.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +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 QTESTMAINS60 -#define QTESTMAINS60 - -#include -#include - -char *new_argv[3]; -HbMainWindow *mainWindow; -#define QTEST_MAIN_S60UI(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ -HbApplication app(argc, argv); \ -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(); \ -\ -TestObject tc; \ -QResource::registerResource("../hbcore.rcc"); \ -mainWindow = new HbMainWindow;\ -mainWindow->show(); \ -int ret = QTest::qExec(&tc, 3, new_argv); \ -delete mainWindow; \ -return ret; \ -} - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuinotes/ut_psuinotes.cpp --- a/cellular/psuinotes/tsrc/ut_psuinotes/ut_psuinotes.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /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 "ut_psuinotes.h" -#include "qtestmains60ui.h" -#include -#include -#include -#include -#define private public -#include "psuinotes.h" - -/*! - UT_PsUiNotes::UT_PsUiNotes - */ -UT_PsUiNotes::UT_PsUiNotes() -{ - PsUiNotes::instance(); -} - -/*! - UT_PsUiNotes::~UT_PsUiNotes - */ -UT_PsUiNotes::~UT_PsUiNotes() -{ - //delete m_psui; -} - -/*! - UT_PsUiNotes::timerEvent - */ -void UT_PsUiNotes::timerEvent( QTimerEvent* event ) -{ - QString currentTest(QTest::currentTestFunction()); - qDebug() << "timerEvent:" << currentTest; - - if (currentTest == "t_showGlobalErrorNote") { - verifyGlobalNote(wantedNoteText); - } - - if (m_noteid1) { - PsUiNotes::instance()->cancelNote(m_noteid1); - m_noteid1 = 0; - } - if (m_noteid2) { - PsUiNotes::instance()->cancelNote(m_noteid2); - m_noteid2 = 0; - } - if (m_noteid3) { - PsUiNotes::instance()->cancelNote(m_noteid3); - m_noteid3 = 0; - } - - if (visibleDialog()) { - visibleDialog()->close(); - QTest::qWait(1); - } - -} - -/*! - UT_PsUiNotes::visibleDialog - */ -HbDialog *UT_PsUiNotes::visibleDialog() -{ - QList items = mainWindow->scene()->items(); - foreach (QGraphicsItem* item, items) { - HbDialog *w = qobject_cast(item->parentWidget()); - if (w && w->isVisible()) { - qDebug() << "visibleDialog: " << w->getStaticMetaObject().className() << - "contentWidget: " << w->contentWidget()->getStaticMetaObject().className(); - return w; - } - } - - return 0; -} - -/*! - UT_PsUiNotes::verifyGlobalNote - */ -void UT_PsUiNotes::verifyGlobalNote( const QString& noteText ) -{ - qDebug() << "verifyGlobalNote:" << noteText; - HbDeviceMessageBox *note=0; - QObject* o=0; - QVERIFY(PsUiNotes::instance()->m_notesQueue->count()); - QVERIFY(o = PsUiNotes::instance()->m_notesQueue->at(0)); - QVERIFY(note = qobject_cast(o)); - QCOMPARE(note->text(), noteText); - note->close(); - QTest::qWait(1); -} - -/*! - UT_PsUiNotes::init - */ -void UT_PsUiNotes::init() -{ - initialize(); - timerid = startTimer(3000); - m_noteid1 = 0; - m_noteid2 = 0; - m_noteid3 = 0; -} - -/*! - UT_PsUiNotes::cleanup - */ -void UT_PsUiNotes::cleanup() -{ - reset(); - if (timerid) { - killTimer(timerid); - timerid = 0; - } -} - -/*! - UT_PsUiNotes::t_memleak - */ -void UT_PsUiNotes::t_memleak() -{ - -} - -/*! - UT_PsUiNotes::t_showNotificationDialog - */ -void UT_PsUiNotes::t_showNotificationDialog() -{ - PsUiNotes::instance()->showNotificationDialog("NotificationDialog"); -} - -/*! - UT_PsUiNotes::t_showProgressNote - */ -void UT_PsUiNotes::t_showProgressNote() -{ - PsUiNotes::instance()->showGlobalProgressNote(m_noteid1, "testshowProgressNote1"); - PsUiNotes::instance()->showGlobalProgressNote(m_noteid2, "testshowProgressNote2"); - QTest::qWait(5000); -} - -/*! - UT_PsUiNotes::t_showGlobalProgressNote - */ -void UT_PsUiNotes::t_showGlobalProgressNote() -{ - PsUiNotes::instance()->showGlobalProgressNote(m_noteid1, "testshowGPN"); - QTest::qWait(5000); - PsUiNotes::instance()->showGlobalProgressNote(m_noteid1, - hbTrId("txt_common_info_requesting")); - QTest::qWait(5000); -} - -/*! - UT_PsUiNotes::t_showGlobalNote - */ -void UT_PsUiNotes::t_showGlobalNote() -{ - PsUiNotes::instance()->showGlobalNote(m_noteid1, "MessageTypeQuestion",HbMessageBox::MessageTypeQuestion ); - PsUiNotes::instance()->showGlobalNote(m_noteid2, "MessageTypeInformation",HbMessageBox::MessageTypeInformation); - PsUiNotes::instance()->showGlobalNote(m_noteid3, "MessageTypeWarning",HbMessageBox::MessageTypeWarning ); - -} - -/*! - UT_PsUiNotes::t_showGlobalErrorNote - */ -void UT_PsUiNotes::t_showGlobalErrorNote() -{ - int errorcode = -1; - wantedNoteText = ""; - expect("PsUiUtils::errorCodeTextMapping").with(errorcode,wantedNoteText).returns(true); - PsUiNotes::instance()->showGlobalErrorNote(m_noteid1, errorcode ); - QVERIFY( verify() ); - -} - - -/*! - UT_PsUiNotes::t_showCallDivertDetails - */ -void UT_PsUiNotes::t_showCallDivertDetails() -{ - expect("PsUiSettingsWrapper::numberGroupingSupported").returns(QVariant(true)); - PSCallDivertingStatus status; - status.iStatus = DivertingStatusActive; - status.iServiceGroup = ServiceGroupVoice; - status.iTimeout = 30; - QList statusList; - statusList.append(&status); - PsUiNotes::instance()->showCallDivertDetails(statusList); - QVERIFY( verify() ); - - expect("PsUiSettingsWrapper::numberGroupingSupported").returns(QVariant(false)); - PsUiNotes::instance()->showCallDivertDetails(statusList); - QVERIFY( verify() ); -} - -/*! - UT_PsUiNotes::t_showPasswordQueryDialog - */ -void UT_PsUiNotes::t_showPasswordQueryDialog() -{ - QString queryTitle("Password query title"); - QString password = ""; - bool okPressed = false; - QRegExp regExpression("\\d{4}"); - QRegExpValidator validator(regExpression, this); - PsUiNotes::instance()->showPasswordQueryDialog( - queryTitle, validator, 5); - -} - -/*! - UT_PsUiNotes::t_cancelNote - */ -void UT_PsUiNotes::t_cancelNote() -{ - PsUiNotes::instance()->cancelNote(m_noteid1); - PsUiNotes::instance()->showGlobalProgressNote(m_noteid1, "testcancelNote"); - PsUiNotes::instance()->noteShowing(); - PsUiNotes::instance()->cancelNote(m_noteid1); - - QTest::qWait(5000); -} - -QTEST_MAIN_S60UI(UT_PsUiNotes) diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuinotes/ut_psuinotes.h --- a/cellular/psuinotes/tsrc/ut_psuinotes/ut_psuinotes.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +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 UT_PSUINOTES_H -#define UT_PSUINOTES_H - -#include -#include -#include -#include - -class HbDialog; - -class UT_PsUiNotes : public QObject, MockService -{ - Q_OBJECT - -public: - UT_PsUiNotes(); - ~UT_PsUiNotes(); - -private: // From QObject - void timerEvent( QTimerEvent* event ); - -private: // Tools - HbDialog *visibleDialog(); - void verifyGlobalNote( const QString& noteText ); - void appendAllEtelServices(QList& list); - void appendService( - QList& list, - RMobilePhone::TMobileService service); - -private slots: - - void init(); - void cleanup(); - - void t_memleak(); - - void t_showProgressNote(); - void t_showGlobalProgressNote(); - void t_showGlobalNote(); - void t_showGlobalErrorNote(); - void t_showCallDivertDetails(); - void t_showPasswordQueryDialog(); - void t_cancelNote(); - void t_showNotificationDialog(); - -private: - int m_noteid1; - int m_noteid2; - int m_noteid3; - int timerid; - QString wantedNoteText; - -}; - -#endif // UT_PSUINOTES_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuinotes/ut_psuinotes.pro --- a/cellular/psuinotes/tsrc/ut_psuinotes/ut_psuinotes.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +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: -# - - -CONFIG += hb qtestlib -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../inc/ -DEFINES += BUILD_PSUINOTES - -QT -= gui -QT += testlib - -symbian: { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - LIBS += -lmocklib -lsymbianmock -} - -# test code -HEADERS += ut_psuinotes.h -SOURCES += ut_psuinotes.cpp - -# code to be tested -HEADERS += ../../../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuinotes.h - -SOURCES += ../../src/psuinotes.cpp - -# mocks needed for testing -HEADERS += ../../../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuilocalisation.h \ - ../../inc/psuiutils.h - -SOURCES += ../mocks/mock_psuilocalisation.cpp \ - ../mocks/mock_psuiutils.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuiutils/qtestmains60.h --- a/cellular/psuinotes/tsrc/ut_psuiutils/qtestmains60.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +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 QTESTMAINS60 -#define QTESTMAINS60 - -#define QTEST_MAIN_S60(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ -char *new_argv[3]; \ -QCoreApplication app(argc, argv); \ -\ -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(); \ -\ -TestObject tc; \ -return QTest::qExec(&tc, 3, new_argv); \ -} - -#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuiutils/ut_psuiutils.cpp --- a/cellular/psuinotes/tsrc/ut_psuiutils/ut_psuiutils.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +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 "ut_psuiutils.h" -#include "qtestmains60.h" -#include -#include -#include -#include -#define private public -#include "psuiutils.h" - -/*! - UT_PsUiUtils::UT_PsUiUtils - */ -UT_PsUiUtils::UT_PsUiUtils() : - mWrapper(NULL) -{ -} - -/*! - UT_PsUiUtils::~UT_PsUiUtils - */ -UT_PsUiUtils::~UT_PsUiUtils() -{ - delete mWrapper; -} - -/*! - UT_PsUiUtils::init - */ -void UT_PsUiUtils::init() -{ - initialize(); - - mWrapper = new PsUiSettingsWrapper(); -} - -/*! - UT_PsUiUtils::cleanup - */ -void UT_PsUiUtils::cleanup() -{ - reset(); -} - -/*! - UT_PsUiUtils::t_memleak - */ -void UT_PsUiUtils::t_memleak() -{ - -} - -/*! - UT_PsUiUtils::t_errorCodeTextMapping - */ -void UT_PsUiUtils::t_errorCodeTextMapping() -{ - QString text = ""; - PsUiUtils::errorCodeTextMapping(KErrGsmSSSubscriptionViolation, text); - QCOMPARE( text, QString( - "txt_phone_info_barring_operation_not_successful")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSUnknownSubscriber, text); - QCOMPARE( text, QString( - "txt_phone_info_not_allowed")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSAbsentSubscriber, text); - QCOMPARE( text, QString( - "txt_phone_info_not_allowed")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSIllegalOperation, text); - QCOMPARE( text, QString( - "txt_phone_info_not_allowed")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSIllegalSubscriber, text); - QCOMPARE( text, QString( - "txt_phone_info_not_allowed")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSIllegalEquipment, text); - QCOMPARE( text, QString( - "txt_phone_info_not_allowed")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSCallBarred, text); - QCOMPARE( text, QString( - "txt_phone_info_not_allowed")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSDataMissing, text); - QCOMPARE( text, QString( - "txt_phone_info_not_allowed")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSIncompatibility, text); - QCOMPARE( text, QString( - "txt_phone_info_conflict_error")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSSystemFailure, text); - QCOMPARE( text, QString( - "txt_phone_info_result_unknown")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSUnexpectedDataValue, text); - QCOMPARE( text, QString( - "txt_phone_info_request_rejected")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSResourcesUnavailable, text); - QCOMPARE( text, QString( - "txt_phone_info_request_rejected")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSNegativePasswordCheck, text); - QCOMPARE( text, QString( - "Password error")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSPasswordRegistrationFailure, text); - QCOMPARE( text, QString( - "Password error")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSPasswordAttemptsViolation, text); - QCOMPARE( text, QString( - "txt_phone_info_barring_password_blocked")); - PsUiUtils::errorCodeTextMapping(KErrGsmSMSNoNetworkService, text); - QCOMPARE( text, QString( - "No network coverage")); - PsUiUtils::errorCodeTextMapping(KErrGsmNoService, text); - QCOMPARE( text, QString( - "No network coverage")); - PsUiUtils::errorCodeTextMapping(KErrSsActivationDataLost, text); - QCOMPARE( text, QString( - "Check network services")); - PsUiUtils::errorCodeTextMapping(KErrGsmSSUnknownAlphabet, text); - QCOMPARE( text, QString("txt_phone_info_invalid_phone_number")); - - expect("XQSysInfo::isSupported").returns(false); - PsUiUtils::errorCodeTextMapping(KErrGsmOfflineOpNotAllowed, text); - QCOMPARE( text, QString( - "txt_phone_info_request_not_completed")); - QVERIFY( verify() ); - - expect("XQSysInfo::isSupported").returns(true); - expect("XQSettingsManager::readItemValue").returns(QVariant(EBTSapConnected)); - PsUiUtils::errorCodeTextMapping(KErrGsmOfflineOpNotAllowed, text); - QCOMPARE( text, QString( - "Operation not possible in SIM access profile mode")); - QVERIFY( verify() ); - - expect("XQSysInfo::isSupported").returns(true); - expect("XQSettingsManager::readItemValue").returns(QVariant(EBTSapNotConnected)); - PsUiUtils::errorCodeTextMapping(KErrGsmOfflineOpNotAllowed, text); - QCOMPARE( text, QString( - "Operation not possible in Off-line mode")); - - PsUiUtils::errorCodeTextMapping(-1, text); - QCOMPARE( text, QString( - "txt_phone_info_request_not_completed")); - - QVERIFY( verify() ); - -} - -/*! - UT_PsUiUtils::::t_isFeatureCallWaitingDistiquishNotProvisionedEnabled - */ -void UT_PsUiUtils::t_isFeatureCallWaitingDistiquishNotProvisionedEnabled() -{ - expect("XQSettingsManager::readItemValue"). - returns(QVariant(1)); - mWrapper->isFeatureCallWaitingDistiquishNotProvisionedEnabled(); - QVERIFY( verify() ); -} - -/*! - UT_PsUiUtils::::t_isPhoneOffline - */ -void UT_PsUiUtils::t_isPhoneOffline() -{ - expect("XQSysInfo::isSupported"); - mWrapper->isPhoneOffline(); - QVERIFY( verify() ); -} - -QTEST_MAIN_S60(UT_PsUiUtils) diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuiutils/ut_psuiutils.h --- a/cellular/psuinotes/tsrc/ut_psuiutils/ut_psuiutils.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +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 UT_PSUIUTILS_H -#define UT_PSUIUTILS_H - -#include -#include - -class PsUiSettingsWrapper; - -class UT_PsUiUtils : public QObject, MockService -{ - Q_OBJECT - -public: - UT_PsUiUtils(); - ~UT_PsUiUtils(); - -private slots: - - void init(); - void cleanup(); - - void t_memleak(); - - void t_errorCodeTextMapping(); - - void t_isFeatureCallWaitingDistiquishNotProvisionedEnabled(); - void t_isPhoneOffline(); - -private: - PsUiSettingsWrapper *mWrapper; - -}; - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuiutils/ut_psuiutils.pro --- a/cellular/psuinotes/tsrc/ut_psuiutils/ut_psuiutils.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +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: -# - -CONFIG += qtestlib -CONFIG += hb -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../inc/ -DEFINES += BUILD_PSUINOTES \ - XQSETTINGSMANAGER_NO_LIBRARY \ - XQSYSINFO_NO_LIBRARY - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - LIBS += -lmocklib -lsymbianmock -} - -# test code -HEADERS += ut_psuiutils.h -SOURCES += ut_psuiutils.cpp - -# code to be tested -HEADERS += ../../inc/psuiutils.h -SOURCES += ../../src/psuiutils.cpp - -#mocks needed for testing -HEADERS += /epoc32/include/platform/mw/xqsettingskey.h \ - /epoc32/include/platform/mw/xqsettingsmanager.h \ - /epoc32/include/platform/mw/xqsysinfo.h - -SOURCES += ../mocks/mock_xqsettingskey.cpp \ - ../mocks/mock_xqsettingsmanager.cpp \ - ../mocks/mock_xqsysinfo.cpp - diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/qtestmains60.h --- a/cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/qtestmains60.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +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 QTESTMAINS60 -#define QTESTMAINS60 - -#define QTEST_MAIN_S60(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ -char *new_argv[3]; \ -QCoreApplication app(argc, argv); \ -\ -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(); \ -\ -TestObject tc; \ -return QTest::qExec(&tc, 3, new_argv); \ -} - -#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/ut_psuiwaitingnotehandler.cpp --- a/cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/ut_psuiwaitingnotehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +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" -/* -* 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 "ut_psuiwaitingnotehandler.h" -#include "psuiwaitingnotehandler.h" -#include "psetcallwaitingwrapper.h" -#include "qtestmains60.h" -#include - -class CPsetContainer -{ -public: - CPsetContainer(){}; - ~CPsetContainer(){}; -}; - -/*! - UT_psuiwaitingnotehandler::UT_psuiwaitingnotehandler - */ -UT_psuiwaitingnotehandler::UT_psuiwaitingnotehandler() -{ - -} - -/*! - UT_psuiwaitingnotehandler::~UT_psuiwaitingnotehandler - */ -UT_psuiwaitingnotehandler::~UT_psuiwaitingnotehandler() -{ - -} - -/*! - UT_psuiwaitingnotehandler::init - */ -void UT_psuiwaitingnotehandler::init() -{ - initialize(); - m_psetContainer = new CPsetContainer(); - m_mockWaitingWrapper = new PSetCallWaitingWrapper(*m_psetContainer,this); - m_waitingHandler = new PsUiWaitingNoteHandler(*m_mockWaitingWrapper); -} - -/*! - UT_psuiwaitingnotehandler::cleanup - */ -void UT_psuiwaitingnotehandler::cleanup() -{ - delete m_waitingHandler; - delete m_mockWaitingWrapper; - delete m_psetContainer; - reset(); -} - -/*! - UT_psuiwaitingnotehandler::t_memleak - */ -void UT_psuiwaitingnotehandler::t_memleak() -{ - -} - -/*! - UT_psuiwaitingnotehandler::t_construction - */ -void UT_psuiwaitingnotehandler::t_construction() -{ - expect("QObject::connect").times(4); - CPsetContainer psetContainer; - PSetCallWaitingWrapper *mockWaitingWrapper = new PSetCallWaitingWrapper(psetContainer,this); - PsUiWaitingNoteHandler *waitingHandler = new PsUiWaitingNoteHandler(*mockWaitingWrapper); - delete waitingHandler; - delete mockWaitingWrapper; - QVERIFY(verify()); -} - -void UT_psuiwaitingnotehandler::t_handleCallWaitingGetStatus() -{ - - PSetCallWaitingWrapper::PsCallWaitingStatus status = - PSetCallWaitingWrapper::StatusNotProvisioned; - QList serviceGroups; - expect("PsUiNotes::cancelNote"); - expect("PsUiSettingsWrapper::isFeatureCallWaitingDistiquishNotProvisionedEnabled").returns(true); - expect("PsUiNotes::showGlobalNotificationDialog"); - m_waitingHandler->handleCallWaitingGetStatus(status,serviceGroups); - QVERIFY(verify()); - - status = PSetCallWaitingWrapper::StatusActive; - expect("PsUiNotes::showGlobalNotificationDialog"); - m_waitingHandler->handleCallWaitingGetStatus(status,serviceGroups); - QVERIFY(verify()); - - status = PSetCallWaitingWrapper::StatusDisabled; - expect("PsUiNotes::showGlobalNotificationDialog"); - m_waitingHandler->handleCallWaitingGetStatus(status,serviceGroups); - QVERIFY(verify()); -} - -void UT_psuiwaitingnotehandler::t_handleCallWaitingChanged() -{ - PSetCallWaitingWrapper::PsCallWaitingCommand setting; - int result; - - setting = PSetCallWaitingWrapper::ActivateCallWaiting; - result = true; - expect("PsUiNotes::showGlobalNote"); - m_waitingHandler->handleCallWaitingChanged(setting,result); - QVERIFY(verify()); - - setting = PSetCallWaitingWrapper::ActivateCallWaiting; - result = false; - expect("PsUiNotes::showGlobalNotificationDialog"); - m_waitingHandler->handleCallWaitingChanged(setting,result); - QVERIFY(verify()); - - setting = PSetCallWaitingWrapper::DeactivateCallWaiting; - result = false; - expect("PsUiNotes::showGlobalNotificationDialog"); - m_waitingHandler->handleCallWaitingChanged(setting,result); - QVERIFY(verify()); - - setting = PSetCallWaitingWrapper::CheckCallWaitingStatus; - result = false; - expect("PsUiNotes::showGlobalNotificationDialog"); - m_waitingHandler->handleCallWaitingChanged(setting,result); - QVERIFY(verify()); -} - -void UT_psuiwaitingnotehandler::t_handleCallWaitingRequesting() -{ - expect("PsUiNotes::showGlobalProgressNote"); - bool ongoing = true; - bool interrupted = false; - m_waitingHandler->handleCallWaitingRequesting(ongoing,interrupted); - QVERIFY(verify()); - - expect("PsUiNotes::cancelNote"); - ongoing = false; - interrupted = true; - m_waitingHandler->handleCallWaitingRequesting(ongoing,interrupted); - - QVERIFY(verify()); -} - -void UT_psuiwaitingnotehandler::t_handleCallWaitingError() -{ - expect("PsUiNotes::cancelNote"); - expect("PsUiNotes::showGlobalErrorNote"); - int error = -1; - m_waitingHandler->handleCallWaitingError(error); - - QVERIFY(verify()); -} - -QTEST_MAIN_S60(UT_psuiwaitingnotehandler) diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/ut_psuiwaitingnotehandler.h --- a/cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/ut_psuiwaitingnotehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +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 UT_PSUIWAITINGNOTEHANDLER_H -#define UT_PSUIWAITINGNOTEHANDLER_H - -#include -#include - -class CPsetContainer; -class PSetCallWaitingWrapper; -class PsUiWaitingNoteHandler; - -class UT_psuiwaitingnotehandler : public QObject, MockService -{ - Q_OBJECT - -public: - UT_psuiwaitingnotehandler(); - ~UT_psuiwaitingnotehandler(); - -private slots: - void init(); - void cleanup(); - void t_memleak(); - - void t_construction(); - void t_handleCallWaitingGetStatus(); - void t_handleCallWaitingChanged(); - void t_handleCallWaitingRequesting(); - void t_handleCallWaitingError(); - - -private: - CPsetContainer *m_psetContainer; - PSetCallWaitingWrapper *m_mockWaitingWrapper; - PsUiWaitingNoteHandler *m_waitingHandler; -}; - -#endif // UT_PSUIWAITINGNOTEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/ut_psuiwaitingnotehandler.pro --- a/cellular/psuinotes/tsrc/ut_psuiwaitingnotehandler/ut_psuiwaitingnotehandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -# -# 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: -# - - -CONFIG += hb qtestlib -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../inc/ -DEFINES += BUILD_PSUINOTES BUILD_PSETWRAPPER - -QT -= gui -QT += testlib - -symbian: { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - LIBS += -lmocklib -lsymbianmock -} - -# test code -HEADERS += ut_psuiwaitingnotehandler.h -SOURCES += ut_psuiwaitingnotehandler.cpp - -# code to be tested -HEADERS += ../../../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuiwaitingnotehandler.h -SOURCES += ../../src/psuiwaitingnotehandler.cpp - -# mocks needed for testing -HEADERS += ../../../../phonesrv_plat/phone_settings_ui_notes_api/inc/psuinotes.h \ - ../../../../phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h \ - ../../../../phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h \ - ../../../telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper_p.h \ - ../../inc/psuiutils.h - -SOURCES += ../mocks/mock_psuinotes.cpp \ - ../mocks/mock_psetcallwaitingwrapper.cpp \ - ../mocks/mock_qobject.cpp \ - ../mocks/mock_psuiutils.cpp \ - ../mocks/mock_psetcallwaitingwrapper_p.cpp \ - ../mocks/mock_psetcalldivertingwrapper.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/bwins/sssettingswrapperu.def --- a/cellular/sssettings/xqbindings/sssettingswrapper/bwins/sssettingswrapperu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - ?qt_metacast@SsSettingsWrapper@@UAEPAXPBD@Z @ 1 NONAME ; void * SsSettingsWrapper::qt_metacast(char const *) - ?metaObject@SsSettingsWrapper@@UBEPBUQMetaObject@@XZ @ 2 NONAME ; struct QMetaObject const * SsSettingsWrapper::metaObject(void) const - ??_ESsSettingsWrapper@@UAE@I@Z @ 3 NONAME ; SsSettingsWrapper::~SsSettingsWrapper(unsigned int) - ??1SsSettingsWrapper@@UAE@XZ @ 4 NONAME ; SsSettingsWrapper::~SsSettingsWrapper(void) - ?get@SsSettingsWrapper@@QAEHW4SsSettingsWrapperSettings@@AAH@Z @ 5 NONAME ; int SsSettingsWrapper::get(enum SsSettingsWrapperSettings, int &) - ?staticMetaObject@SsSettingsWrapper@@2UQMetaObject@@B @ 6 NONAME ; struct QMetaObject const SsSettingsWrapper::staticMetaObject - ?set@SsSettingsWrapper@@QAEHW4SsSettingsWrapperSettings@@H@Z @ 7 NONAME ; int SsSettingsWrapper::set(enum SsSettingsWrapperSettings, int) - ?trUtf8@SsSettingsWrapper@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString SsSettingsWrapper::trUtf8(char const *, char const *) - ?qt_metacall@SsSettingsWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9 NONAME ; int SsSettingsWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?phoneSettingChanged@SsSettingsWrapper@@IAEXW4SsSettingsWrapperSettings@@H@Z @ 10 NONAME ; void SsSettingsWrapper::phoneSettingChanged(enum SsSettingsWrapperSettings, int) - ?tr@SsSettingsWrapper@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString SsSettingsWrapper::tr(char const *, char const *, int) - ?tr@SsSettingsWrapper@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString SsSettingsWrapper::tr(char const *, char const *) - ?trUtf8@SsSettingsWrapper@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString SsSettingsWrapper::trUtf8(char const *, char const *, int) - ??0SsSettingsWrapper@@QAE@PAVQObject@@@Z @ 14 NONAME ; SsSettingsWrapper::SsSettingsWrapper(class QObject *) - ?getStaticMetaObject@SsSettingsWrapper@@SAABUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const & SsSettingsWrapper::getStaticMetaObject(void) - diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/eabi/sssettingswrapperu.def --- a/cellular/sssettings/xqbindings/sssettingswrapper/eabi/sssettingswrapperu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - _ZN17SsSettingsWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME - _ZN17SsSettingsWrapper11qt_metacastEPKc @ 2 NONAME - _ZN17SsSettingsWrapper16staticMetaObjectE @ 3 NONAME DATA 16 - _ZN17SsSettingsWrapper19getStaticMetaObjectEv @ 4 NONAME - _ZN17SsSettingsWrapper19phoneSettingChangedE25SsSettingsWrapperSettingsi @ 5 NONAME - _ZN17SsSettingsWrapper3getE25SsSettingsWrapperSettingsRi @ 6 NONAME - _ZN17SsSettingsWrapper3setE25SsSettingsWrapperSettingsi @ 7 NONAME - _ZN17SsSettingsWrapperC1EP7QObject @ 8 NONAME - _ZN17SsSettingsWrapperC2EP7QObject @ 9 NONAME - _ZN17SsSettingsWrapperD0Ev @ 10 NONAME - _ZN17SsSettingsWrapperD1Ev @ 11 NONAME - _ZN17SsSettingsWrapperD2Ev @ 12 NONAME - _ZNK17SsSettingsWrapper10metaObjectEv @ 13 NONAME - _ZTI17SsSettingsWrapper @ 14 NONAME - _ZTV17SsSettingsWrapper @ 15 NONAME - diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/rom/sssettingswrapper.iby --- a/cellular/sssettings/xqbindings/sssettingswrapper/rom/sssettingswrapper.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +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 __SSSETTINGSWRAPPER_IBY__ -#define __SSSETTINGSWRAPPER_IBY__ - -#include - -file=ABI_DIR\BUILD_DIR\sssettingswrapper.dll SHARED_LIB_DIR\sssettingswrapper.dll - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/src/logging.h --- a/cellular/sssettings/xqbindings/sssettingswrapper/src/logging.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +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 LOGGING_H -#define LOGGING_H - -#include - -#define DPRINT qDebug() << __PRETTY_FUNCTION__ - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/src/sssettingswrapper.cpp --- a/cellular/sssettings/xqbindings/sssettingswrapper/src/sssettingswrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +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 "sssettingswrapper_p.h" -#include "logging.h" - -/*! - SsSettingsWrapper::SsSettingsWrapper - */ -SsSettingsWrapper::SsSettingsWrapper(QObject *parent): - QObject(parent), m_Priv(new SsSettingsWrapperPrivate(*this)) -{ - DPRINT << ": IN"; - - // Initialize RSSSettings - m_ssSettings = new RSSSettings; - int err = m_ssSettings->Open(); - DPRINT << "err: " << err; - // Register for notifications - m_ssSettings->RegisterAll( *m_Priv ); - - DPRINT << ": OUT"; -} - -/*! - SsSettingsWrapper::~SsSettingsWrapper - */ -SsSettingsWrapper::~SsSettingsWrapper() -{ - DPRINT << ": IN"; - - if(m_ssSettings){ - m_ssSettings->Close(); - } - delete m_ssSettings; - delete m_Priv; - - DPRINT << ": OUT"; -} - -/*! - SsSettingsWrapper::get - */ -int SsSettingsWrapper::get(SsSettingsWrapperSettings setting, int &value) -{ - DPRINT << ": IN"; - - int err = m_ssSettings->Get(static_cast(setting), value); - - DPRINT << ": err: " << err; - DPRINT << ": setting: " << setting; - DPRINT << ": value: " << value; - DPRINT << ": OUT" ; - return err; -} - -/*! - SsSettingsWrapper::set - */ -int SsSettingsWrapper::set(SsSettingsWrapperSettings setting, int value) -{ - DPRINT << ": IN"; - - int err = m_ssSettings->Set( static_cast(setting), value ); - - DPRINT << ": err: " << err; - DPRINT << ": setting: " << setting; - DPRINT << ": value: " << value; - DPRINT << ": OUT" ; - return err; -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/src/sssettingswrapper_p.cpp --- a/cellular/sssettings/xqbindings/sssettingswrapper/src/sssettingswrapper_p.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +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 "sssettingswrapper_p.h" -#include "sssettingswrapper.h" -#include "logging.h" -#include - -/*! - SsSettingsWrapperPrivate::SsSettingsWrapperPrivate - */ -SsSettingsWrapperPrivate::SsSettingsWrapperPrivate( SsSettingsWrapper &owner ) : m_Owner(owner) -{ - DPRINT; -} - -/*! - SsSettingsWrapperPrivate::~SsSettingsWrapperPrivate - */ -SsSettingsWrapperPrivate::~SsSettingsWrapperPrivate() -{ - DPRINT; -} - -/*! - SsSettingsWrapperPrivate::PhoneSettingChanged - */ -void SsSettingsWrapperPrivate::PhoneSettingChanged( - TSSSettingsSetting aSetting, - TInt aNewValue ) -{ - DPRINT << ": IN"; - DPRINT << ": aSetting: " << static_cast(aSetting); - DPRINT << ": aNewValue: " << aNewValue; - - emit m_Owner.phoneSettingChanged( - static_cast(aSetting), - static_cast(aNewValue)); - - DPRINT << ": OUT"; -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/src/sssettingswrapper_p.h --- a/cellular/sssettings/xqbindings/sssettingswrapper/src/sssettingswrapper_p.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +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 SSSETTINGSWRAPPER_P_H -#define SSSETTINGSWRAPPER_P_H - -#include -#include - - -class SsSettingsWrapper; - -class SsSettingsWrapperPrivate: public MSSSettingsObserver -{ -public: - SsSettingsWrapperPrivate( SsSettingsWrapper &owner ); - - ~SsSettingsWrapperPrivate(); - -public: // From MSSSettingsObserver: - void PhoneSettingChanged( - TSSSettingsSetting aSetting, - TInt aNewValue ); - -private: // Data: - - SsSettingsWrapper &m_Owner; - -}; - -#endif // SSSETTINGSWRAPPER_P - diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/src/sssettingswrapper_s.cpp --- a/cellular/sssettings/xqbindings/sssettingswrapper/src/sssettingswrapper_s.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +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 "sssettingswrapper.h" -#include "logging.h" - - -SsSettingsWrapper::SsSettingsWrapper(QObject *parent): - QObject(parent) -{ - DPRINT << "DUMMY WRAPPER"; -} - -SsSettingsWrapper::~SsSettingsWrapper() -{ - DPRINT << "DUMMY WRAPPER"; -} - - -int SsSettingsWrapper::get(SsSettingsWrapperSettings setting, int &value) -{ - DPRINT << "DUMMY WRAPPER"; - return 0; -} - -int SsSettingsWrapper::set(SsSettingsWrapperSettings setting, int value) -{ - DPRINT << "DUMMY WRAPPER"; - return 0; -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/sssettingswrapper.pri --- a/cellular/sssettings/xqbindings/sssettingswrapper/sssettingswrapper.pri Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +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: -# - -HEADERS += ../../../../phonesrv_plat/ss_settings_api/inc/sssettingswrapper.h \ - ../../../../phonesrv_plat/ss_settings_api/inc/sssettingswrappertypes.h \ - -symbian: { - SOURCES += ./src/sssettingswrapper.cpp \ - ./src/sssettingswrapper_p.cpp -} -else: { - SOURCES = ./src/sssettingswrapper_s.cpp -} - diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/sssettingswrapper.pro --- a/cellular/sssettings/xqbindings/sssettingswrapper/sssettingswrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = lib -TARGET = -MOC_DIR = moc - -INCLUDEPATH += ../../../../phonesrv_plat/ss_settings_api/inc -SOURCEPATH += src - -# Input -include(sssettingswrapper.pri) - -DEFINES += BUILD_SSSETTINGSWRAPPER - -symbian: { - LIBS += -lsssettings - load(data_caging_paths) - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - - TARGET.EPOCALLOWDLLDATA = 1 - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.UID3 = 0X20029F22 - - defFiles = \ - "$${LITERAL_HASH}ifdef WINS" \ - "DEFFILE bwins/sssettingswrapper.def" \ - "$${LITERAL_HASH}else" \ - "DEFFILE eabi/sssettingswrapper.def" \ - "$${LITERAL_HASH}endif" - MMP_RULES += defFiles - - # For sis file - dllfile.sources = $${TARGET}.dll - dllfile.path = $$SHARED_LIB_DIR - DEPLOYMENT += dllfile - - BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "./rom/sssettingswrapper.iby CORE_MW_LAYER_IBY_EXPORT_PATH(sssettingswrapper.iby)" -} else: { - DESTDIR = c:\hb\lib - DLLDESTDIR = c:\hb\bin -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/tsrc/mocks/mock_rsssettings.cpp --- a/cellular/sssettings/xqbindings/sssettingswrapper/tsrc/mocks/mock_rsssettings.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,189 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// RSSSettings::RSSSettings -// ----------------------------------------------------------------------------- -// -RSSSettings::RSSSettings( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::Close -// ----------------------------------------------------------------------------- -// -void RSSSettings::Close( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::Open -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::Open( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::Open -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::Open( - RTelServer * aTelServer ) - { - SMC_MOCK_METHOD1( TInt, RTelServer *, aTelServer ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::RegisterAll -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::RegisterAll( - MSSSettingsObserver & aObserver ) - { - //SMC_MOCK_METHOD1( TInt, MSSSettingsObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::Register -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::Register( - TSSSettingsSetting aSetting, - MSSSettingsObserver & aObserver ) - { - //SMC_MOCK_METHOD2( TInt, TSSSettingsSetting, aSetting, - // MSSSettingsObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::CancelAll -// ----------------------------------------------------------------------------- -// -void RSSSettings::CancelAll( - MSSSettingsObserver & aObserver ) - { - //SMC_MOCK_METHOD1( void, MSSSettingsObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::Cancel -// ----------------------------------------------------------------------------- -// -void RSSSettings::Cancel( - TSSSettingsSetting aSetting, - MSSSettingsObserver & aObserver ) - { - //SMC_MOCK_METHOD2( void, TSSSettingsSetting, aSetting, - // MSSSettingsObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::Get -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::Get( - TSSSettingsSetting aSetting, - TInt & aValue ) - { - SMC_MOCK_METHOD2( TInt, TSSSettingsSetting, aSetting, - TInt &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::Set -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::Set( - TSSSettingsSetting aSetting, - TInt aValue ) - { - SMC_MOCK_METHOD2( TInt, TSSSettingsSetting, aSetting, - TInt, aValue ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::HandleSIMChanged -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::HandleSIMChanged( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::PreviousCugValue -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::PreviousCugValue( - TInt & aPreviousValue ) - { - SMC_MOCK_METHOD1( TInt, TInt &, aPreviousValue ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::ResetPreviousCugValue -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::ResetPreviousCugValue( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::HandleRefresh -// ----------------------------------------------------------------------------- -// -TInt RSSSettings::HandleRefresh( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RSSSettings::IsValueValidCugIndex -// ----------------------------------------------------------------------------- -// -TBool RSSSettings::IsValueValidCugIndex( - const TInt & aValue ) const - { - SMC_MOCK_METHOD1( TBool, const TInt &, aValue ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/tsrc/run_auto_tests_qt.bat --- a/cellular/sssettings/xqbindings/sssettingswrapper/tsrc/run_auto_tests_qt.bat Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -@echo off -setlocal -goto :startup - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function DEFAULT -:: -:: Modify this function -:: - TESTED_SRC can be changed to match tested code. -:: Specifies path from testcode group directory to -:: tested code -:: - Add test directories to be runned -:: ie. "call :build ut_projectdirectory" or use -:: "for /f %%a in ('dir /b ut_*') do call :build %%a" -:: which compiles, instruments and runs all test directories -:: starting with "ut_". -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:DEFAULT -set TESTED_SRC=..\..\src\* - -for /f %%a in ('dir /b ut_*') do call :build %%a -if [%DOMODULESTESTS%] EQU [TRUE] ( -for /f %%a in ('dir /b mt_*') do call :build %%a -) - -call :finish -goto :END - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function STARTUP -:: -:: Initializing script -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:STARTUP - -set BUILDTESTS=TRUE -set RUNTESTS=TRUE -set INSTRUMENT=TRUE -set REMOVEINSTRUMENT=TRUE -set DOMODULESTESTS=TRUE -set SBS_CALL=sbs --config winscw_udeb --keepgoing BUILD -set PATH_TO_DLL=\epoc32\release\winscw\udeb -set PATH_TO_COVERAGE_DATA=\coverage_data -set PATH_TO_RESULT=\test_result - -if not exist %PATH_TO_COVERAGE_DATA% ( -mkdir %PATH_TO_COVERAGE_DATA% -) - -if not exist %PATH_TO_RESULT% ( -mkdir %PATH_TO_RESULT% -) - -if [%1] EQU [] ( goto default ) - -call :%1 -call :%2 -call :%3 -call :%4 -call :%5 -echo Running tests = %RUNTESTS% -echo Instrumenting tests = %INSTRUMENT% -goto default - -:/NOCLEANUP -set REMOVEINSTRUMENT=FALSE -goto end - -:/NORUN -set RUNTESTS=FALSE -set REMOVEINSTRUMENT=FALSE -goto end - -:/NOINSTRUMENT -set INSTRUMENT=FALSE -goto end - -:/NOBUILD -set BUILDTESTS=FALSE -goto end - -:/ONLYUNITTESTS -set DOMODULESTESTS=FALSE -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function FINISH -:: -:: Finishes run_auto_tests.bat -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:FINISH - -if [%RUNTESTS%] EQU [TRUE] ( -call :runtests -) - -if [%INSTRUMENT%] EQU [TRUE] ( -call :calculatecoverage -) - -if [%REMOVEINSTRUMENT%] EQU [TRUE] ( -call :removecoverage -) -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function BUILD -:: param directory -:: -:: builds test from given directory -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:BUILD -setlocal -if [%BUILDTESTS%] EQU [FALSE] ( goto end ) -echo Building %1 -if not exist %1 ( -echo %1 Not found! -goto end -) - -pushd . -call cd %1 -call qmake -call sbs --config winscw_udeb --keepgoing CLEAN -if [%INSTRUMENT%] EQU [TRUE] ( -call ctcwrap -2comp -n %PATH_TO_COVERAGE_DATA%\%1 -i d -C "EXCLUDE=*" -C "NO_EXCLUDE=%TESTED_SRC%" "%SBS_CALL%" -) else ( -call %SBS_CALL% -) - -popd -endlocal -goto end - - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function RUNTESTS -:: -:: NOTE! Function assumes that test binary is named according to test directory. -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:RUNTESTS -echo Running tests -for /f %%a in ('dir /b ut_*') do ( - call %PATH_TO_DLL%\%%a.exe -dtextshell -- - move \epoc32\winscw\c\data\%%a.log %PATH_TO_RESULT%\%%a.log -) -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function CALCULATECOVERAGE -:: -:: Calculates test coverage. Generates html -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:CALCULATECOVERAGE -echo Calculating coverage -ctcpost %PATH_TO_COVERAGE_DATA%\*.sym | ctcmerge -i - -o profile.txt -call ctc2html -t 70 -i profile.txt -o \coverage_result -nsb -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function REMOVECOVERAGE -:: -:: Removes data from coverage directory -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:REMOVECOVERAGE -echo Removing deleting coverage data -call del %PATH_TO_COVERAGE_DATA%\*.sym -call del %PATH_TO_COVERAGE_DATA%\*.dat -call del profile.txt -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function END -:: -:: Prints done -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:END -echo Done! \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/qtestmains60.h --- a/cellular/sssettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/qtestmains60.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +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 QTESTMAINS60 -#define QTESTMAINS60 - -#define QTEST_MAIN_S60(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ -char *new_argv[3]; \ -QCoreApplication app(argc, argv); \ -\ -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(); \ -\ -TestObject tc; \ -return QTest::qExec(&tc, 3, new_argv); \ -} - -#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.cpp --- a/cellular/sssettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +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 "ut_sssettingswrapper.h" -#include "qtestmains60.h" -#define private public -#include "sssettingswrapper.h" -#include "sssettingswrapper_p.h" - -/*! - UT_SsSettingsWrapper::UT_SsSettingsWrapper - */ -UT_SsSettingsWrapper::UT_SsSettingsWrapper() - : mWrapper(NULL) -{ -} - -/*! - UT_SsSettingsWrapper::~UT_SsSettingsWrapper - */ -UT_SsSettingsWrapper::~UT_SsSettingsWrapper() -{ - delete mWrapper; -} - -/*! - UT_SsSettingsWrapper::init - */ -void UT_SsSettingsWrapper::init() -{ - initialize(); - - mWrapper = new SsSettingsWrapper(); -} - -/*! - UT_SsSettingsWrapper::cleanup - */ -void UT_SsSettingsWrapper::cleanup() -{ - reset(); - - delete mWrapper; - mWrapper = NULL; -} - -/*! - UT_SsSettingsWrapper::t_memleak - */ -void UT_SsSettingsWrapper::t_memleak() -{ - -} - -/*! - UT_SsSettingsWrapper::t_get - */ -void UT_SsSettingsWrapper::t_get() -{ - int value = 0; - expect("RSSSettings::Get").with(ESSSettingsCug, 0); - QVERIFY( !mWrapper->get(Cug, value) ); - expect("RSSSettings::Get").with(ESSSettingsClir, 0); - QVERIFY( !mWrapper->get(Clir, value) ); - expect("RSSSettings::Get").with(ESSSettingsAls, 0); - QVERIFY( !mWrapper->get(Als, value) ); - expect("RSSSettings::Get").with(ESSSettingsAlsBlocking, 0); - QVERIFY( !mWrapper->get(AlsBlocking, value) ); - expect("RSSSettings::Get").with(ESSSettingsDefaultCug, 0); - QVERIFY( !mWrapper->get(DefaultCug, value) ); - QVERIFY(true == verify()); -} - -/*! - UT_SsSettingsWrapper::t_set - */ -void UT_SsSettingsWrapper::t_set() -{ - int value = 0; - expect("RSSSettings::Set").with(ESSSettingsCug, 0); - QVERIFY( !mWrapper->set(Cug, value) ); - expect("RSSSettings::Set").with(ESSSettingsClir, 0); - QVERIFY( !mWrapper->set(Clir, value) ); - expect("RSSSettings::Set").with(ESSSettingsAls, 0); - QVERIFY( !mWrapper->set(Als, value) ); - expect("RSSSettings::Set").with(ESSSettingsAlsBlocking, 0); - QVERIFY( !mWrapper->set(AlsBlocking, value) ); - expect("RSSSettings::Set").with(ESSSettingsDefaultCug, 0); - QVERIFY( !mWrapper->set(DefaultCug, value) ); - QVERIFY(true == verify()); -} - -/*! - UT_SsSettingsWrapper::t_PhoneSettingChanged - */ -Q_DECLARE_METATYPE(SsSettingsWrapperSettings) -void UT_SsSettingsWrapper::t_PhoneSettingChanged() -{ - qRegisterMetaType ("SsSettingsWrapperSettings"); - QSignalSpy spy(mWrapper, - SIGNAL(phoneSettingChanged(SsSettingsWrapperSettings, int ))); - - mWrapper->m_Priv->PhoneSettingChanged(ESSSettingsCug, 0); - - QCOMPARE(spy.count(), 1); - const QList &arguments = spy.at(0); - QVERIFY(Cug == arguments.at(0).value()); - QVERIFY(0 == arguments.at(1).value()); -} - -QTEST_MAIN_S60(UT_SsSettingsWrapper) diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.h --- a/cellular/sssettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +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 UT_SSSETTINGWRAPPER_H -#define UT_SSSETTINGWRAPPER_H - -#include -#include - -class SsSettingsWrapper; - -class UT_SsSettingsWrapper : public QObject, MockService -{ - Q_OBJECT - -public: - UT_SsSettingsWrapper(); - ~UT_SsSettingsWrapper(); - -private slots: - - void init(); - void cleanup(); - - void t_memleak(); - void t_get(); - void t_set(); - - void t_PhoneSettingChanged(); - -private: - SsSettingsWrapper *mWrapper; - -}; - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/sssettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.pro --- a/cellular/sssettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +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: Project file for building unit test component -# -# - -CONFIG += qtestlib -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . -DEFINES += BUILD_SSSETTINGSWRAPPER - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += /epoc32/include/mw/QtTest \ - /epoc32/include/platform/mw \ - /epoc32/include/mw/qt - LIBS += -lmocklib -lsymbianmock -} - -# test code -HEADERS += ut_sssettingswrapper.h -SOURCES += ut_sssettingswrapper.cpp - -# code to be tested -HEADERS += ../../../../../../phonesrv_plat/ss_settings_api/inc/sssettingswrapper.h -SOURCES += ../../src/sssettingswrapper.cpp \ - ../../src/sssettingswrapper_p.cpp - -# mocks needed for testing -SOURCES += ../mocks/mock_rsssettings.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/Logger/PhoneSettingsLogger.h --- a/cellular/telephonysettings/Logger/PhoneSettingsLogger.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/Logger/PhoneSettingsLogger.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #ifndef PHONESETTINGSLOGGER_H #define PHONESETTINGSLOGGER_H -#include "phonesettingsloggingconf.h" +#include "PhoneSettingsLoggingConf.h" #include #include #include diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/bwins/PHONESETTINGSU.DEF --- a/cellular/telephonysettings/bwins/PHONESETTINGSU.DEF Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/bwins/PHONESETTINGSU.DEF Wed Sep 01 12:15:03 2010 +0100 @@ -1,80 +1,80 @@ EXPORTS - ??1CPsetCallBarring@@UAE@XZ @ 1 NONAME ; CPsetCallBarring::~CPsetCallBarring(void) - ??1CPsetCallDiverting@@UAE@XZ @ 2 NONAME ; CPsetCallDiverting::~CPsetCallDiverting(void) - ??1CPsetCallWaiting@@UAE@XZ @ 3 NONAME ; CPsetCallWaiting::~CPsetCallWaiting(void) - ??1CPsetCli@@UAE@XZ @ 4 NONAME ; CPsetCli::~CPsetCli(void) - ??1CPsetContainer@@UAE@XZ @ 5 NONAME ; CPsetContainer::~CPsetContainer(void) - ??1CPsetCustomerServiceProfile@@UAE@XZ @ 6 NONAME ; CPsetCustomerServiceProfile::~CPsetCustomerServiceProfile(void) - ??1CPsetNetwork@@UAE@XZ @ 7 NONAME ; CPsetNetwork::~CPsetNetwork(void) - ??1CPsetSAObserver@@UAE@XZ @ 8 NONAME ; CPsetSAObserver::~CPsetSAObserver(void) - ?CancelAll@CPsetCli@@UAEXXZ @ 9 NONAME ; void CPsetCli::CancelAll(void) - ?CancelCurrentRequest@CPsetCallBarring@@UAEHXZ @ 10 NONAME ; int CPsetCallBarring::CancelCurrentRequest(void) - ?CancelCurrentRequest@CPsetCallDiverting@@UAEHXZ @ 11 NONAME ; int CPsetCallDiverting::CancelCurrentRequest(void) - ?CancelProcess@CPsetCallWaiting@@UAEHXZ @ 12 NONAME ; int CPsetCallWaiting::CancelProcess(void) - ?CancelProcess@CPsetNetwork@@UAEXXZ @ 13 NONAME ; void CPsetNetwork::CancelProcess(void) - ?ChangePasswordL@CPsetCallBarring@@QAEXAAVTMobilePhonePasswordChangeV2@RMobilePhone@@@Z @ 14 NONAME ; void CPsetCallBarring::ChangePasswordL(class RMobilePhone::TMobilePhonePasswordChangeV2 &) - ?ChangePasswordL@CPsetCallBarring@@QAEXAAVTMobilePhonePasswordChangeV2@RMobilePhone@@H@Z @ 15 NONAME ; void CPsetCallBarring::ChangePasswordL(class RMobilePhone::TMobilePhonePasswordChangeV2 &, int) - ?CreateCBObjectL@CPsetContainer@@QAEPAVCPsetCallBarring@@AAVMPsetBarringObserver@@@Z @ 16 NONAME ; class CPsetCallBarring * CPsetContainer::CreateCBObjectL(class MPsetBarringObserver &) - ?CreateCFObjectL@CPsetContainer@@QAEPAVCPsetCallDiverting@@AAVMPsetDivertObserver@@@Z @ 17 NONAME ; class CPsetCallDiverting * CPsetContainer::CreateCFObjectL(class MPsetDivertObserver &) - ?CreateCWObjectL@CPsetContainer@@QAEPAVCPsetCallWaiting@@AAVMPsetCallWaitingObserver@@@Z @ 18 NONAME ; class CPsetCallWaiting * CPsetContainer::CreateCWObjectL(class MPsetCallWaitingObserver &) - ?CreateCliObjectL@CPsetContainer@@QAEPAVCPsetCli@@AAVMPsetCliObserver@@@Z @ 19 NONAME ; class CPsetCli * CPsetContainer::CreateCliObjectL(class MPsetCliObserver &) - ?CreateNetworkModeObjectL@CPsetContainer@@QAEPAVCPsetNetwork@@AAVMPsetNetworkModeObserver@@@Z @ 20 NONAME ; class CPsetNetwork * CPsetContainer::CreateNetworkModeObjectL(class MPsetNetworkModeObserver &) - ?CreateNetworkObjectL@CPsetContainer@@QAEPAVCPsetNetwork@@AAVMPsetNetworkInfoObserver@@@Z @ 21 NONAME ; class CPsetNetwork * CPsetContainer::CreateNetworkObjectL(class MPsetNetworkInfoObserver &) - ?CreateRefreshHandlerL@CPsetContainer@@QAEPAVCPSetRefreshHandler@@XZ @ 22 NONAME ; class CPSetRefreshHandler * CPsetContainer::CreateRefreshHandlerL(void) - ?GetAvailableNetworksL@CPsetNetwork@@UAEXXZ @ 23 NONAME ; void CPsetNetwork::GetAvailableNetworksL(void) - ?GetBarringStatusL@CPsetCallBarring@@UAEXW4TServiceGroup@@W4TBarringProgram@@@Z @ 24 NONAME ; void CPsetCallBarring::GetBarringStatusL(enum TServiceGroup, enum TBarringProgram) - ?GetCallWaitingStatusL@CPsetCallWaiting@@UAEXXZ @ 25 NONAME ; void CPsetCallWaiting::GetCallWaitingStatusL(void) - ?GetClipModeL@CPsetCli@@UAEXXZ @ 26 NONAME ; void CPsetCli::GetClipModeL(void) - ?GetClirModeL@CPsetCli@@UAEXXZ @ 27 NONAME ; void CPsetCli::GetClirModeL(void) - ?GetCnapL@CPsetCli@@UAEXXZ @ 28 NONAME ; void CPsetCli::GetCnapL(void) - ?GetColpModeL@CPsetCli@@UAEXXZ @ 29 NONAME ; void CPsetCli::GetColpModeL(void) - ?GetColrModeL@CPsetCli@@UAEXXZ @ 30 NONAME ; void CPsetCli::GetColrModeL(void) - ?GetCurrentDivertStatus@CPsetSAObserver@@QAEHAAW4TUnconditionalCFStatus@@@Z @ 31 NONAME ; int CPsetSAObserver::GetCurrentDivertStatus(enum TUnconditionalCFStatus &) - ?GetCurrentNetworkInfo@CPsetNetwork@@UAEHAAUTCurrentNetworkInfo@MPsetNetworkSelect@@@Z @ 32 NONAME ; int CPsetNetwork::GetCurrentNetworkInfo(struct MPsetNetworkSelect::TCurrentNetworkInfo &) - ?GetCurrentNetworkModeSelectionL@CPsetNetwork@@UAEXXZ @ 33 NONAME ; void CPsetNetwork::GetCurrentNetworkModeSelectionL(void) - ?GetDefaultNumbersL@CPsetCallDiverting@@QAEHAAVCDesC16ArrayFlat@@@Z @ 34 NONAME ; int CPsetCallDiverting::GetDefaultNumbersL(class CDesC16ArrayFlat &) - ?GetDivertingStatusL@CPsetCallDiverting@@UAEXW4TServiceGroup@@W4TCallDivertingCondition@@W4TBasicServiceGroups@@@Z @ 35 NONAME ; void CPsetCallDiverting::GetDivertingStatusL(enum TServiceGroup, enum TCallDivertingCondition, enum TBasicServiceGroups) - ?GetNetworkSelectMode@CPsetNetwork@@UAEHAAW4TSelectMode@MPsetNetworkSelect@@@Z @ 36 NONAME ; int CPsetNetwork::GetNetworkSelectMode(enum MPsetNetworkSelect::TSelectMode &) - ?GetTimerValueL@CPsetCallDiverting@@QAEHXZ @ 37 NONAME ; int CPsetCallDiverting::GetTimerValueL(void) - ?GetUsedDataNumberLC@CPsetCallDiverting@@QAEPAVHBufC16@@XZ @ 38 NONAME ; class HBufC16 * CPsetCallDiverting::GetUsedDataNumberLC(void) - ?GetUsedFaxNumberLC@CPsetCallDiverting@@QAEPAVHBufC16@@XZ @ 39 NONAME ; class HBufC16 * CPsetCallDiverting::GetUsedFaxNumberLC(void) - ?IsALSSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 40 NONAME ; int CPsetCustomerServiceProfile::IsALSSupported(int &) - ?IsCBSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 41 NONAME ; int CPsetCustomerServiceProfile::IsCBSupported(int &) - ?IsCFSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 42 NONAME ; int CPsetCustomerServiceProfile::IsCFSupported(int &) - ?IsCWSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 43 NONAME ; int CPsetCustomerServiceProfile::IsCWSupported(int &) - ?IsCallActive@CPsetNetwork@@QAEHXZ @ 44 NONAME ; int CPsetNetwork::IsCallActive(void) - ?IsCallActive@CPsetSAObserver@@QAEHXZ @ 45 NONAME ; int CPsetSAObserver::IsCallActive(void) - ?IsGPRSConnected@CPsetNetwork@@QAEHXZ @ 46 NONAME ; int CPsetNetwork::IsGPRSConnected(void) - ?IsGPRSConnected@CPsetSAObserver@@QAEHXZ @ 47 NONAME ; int CPsetSAObserver::IsGPRSConnected(void) - ?IsNetworkSelectionSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 48 NONAME ; int CPsetCustomerServiceProfile::IsNetworkSelectionSupported(int &) - ?NewL@CPsetCallDiverting@@SAPAV1@AAVMPsetDivertObserver@@AAVRMobilePhone@@@Z @ 49 NONAME ; class CPsetCallDiverting * CPsetCallDiverting::NewL(class MPsetDivertObserver &, class RMobilePhone &) - ?NewL@CPsetCallWaiting@@SAPAV1@AAVRMobilePhone@@AAVMPsetCallWaitingObserver@@@Z @ 50 NONAME ; class CPsetCallWaiting * CPsetCallWaiting::NewL(class RMobilePhone &, class MPsetCallWaitingObserver &) - ?NewL@CPsetCli@@SAPAV1@AAVRMobilePhone@@AAVMPsetCliObserver@@@Z @ 51 NONAME ; class CPsetCli * CPsetCli::NewL(class RMobilePhone &, class MPsetCliObserver &) - ?NewL@CPsetContainer@@SAPAV1@XZ @ 52 NONAME ; class CPsetContainer * CPsetContainer::NewL(void) - ?NewL@CPsetCustomerServiceProfile@@SAPAV1@XZ @ 53 NONAME ; class CPsetCustomerServiceProfile * CPsetCustomerServiceProfile::NewL(void) - ?NewL@CPsetNetwork@@SAPAV1@AAVRMobilePhone@@AAVMPsetNetworkInfoObserver@@@Z @ 54 NONAME ; class CPsetNetwork * CPsetNetwork::NewL(class RMobilePhone &, class MPsetNetworkInfoObserver &) - ?NewL@CPsetNetwork@@SAPAV1@AAVRMobilePhone@@AAVMPsetNetworkModeObserver@@@Z @ 55 NONAME ; class CPsetNetwork * CPsetNetwork::NewL(class RMobilePhone &, class MPsetNetworkModeObserver &) - ?NewL@CPsetSAObserver@@SAPAV1@XZ @ 56 NONAME ; class CPsetSAObserver * CPsetSAObserver::NewL(void) - ?NotifyDivertChange@CPsetSAObserver@@QAEXW4TSelectedLine@@AAVTCallDivertNotifySetting@@ABH@Z @ 57 NONAME ; void CPsetSAObserver::NotifyDivertChange(enum TSelectedLine, class TCallDivertNotifySetting &, int const &) - ?OpenCSProfileL@CPsetCustomerServiceProfile@@QAEHXZ @ 58 NONAME ; int CPsetCustomerServiceProfile::OpenCSProfileL(void) - ?ResetNetworkSearch@CPsetNetwork@@QAEHXZ @ 59 NONAME ; int CPsetNetwork::ResetNetworkSearch(void) - ?SelectNetworkL@CPsetNetwork@@UAEXABUTNetworkInfo@MPsetNetworkSelect@@@Z @ 60 NONAME ; void CPsetNetwork::SelectNetworkL(struct MPsetNetworkSelect::TNetworkInfo const &) - ?SetBarringL@CPsetCallBarring@@UAEXABVTCallBarringSetting@@W4TBasicServiceGroups@@@Z @ 61 NONAME ; void CPsetCallBarring::SetBarringL(class TCallBarringSetting const &, enum TBasicServiceGroups) - ?SetCallWaitingL@CPsetCallWaiting@@UAEXW4TSetCallWaiting@MPsetCallWaiting@@W4TBasicServiceGroups@@@Z @ 62 NONAME ; void CPsetCallWaiting::SetCallWaitingL(enum MPsetCallWaiting::TSetCallWaiting, enum TBasicServiceGroups) - ?SetDivertingL@CPsetCallDiverting@@UAEXABVTCallDivertSetting@@W4TBasicServiceGroups@@H@Z @ 63 NONAME ; void CPsetCallDiverting::SetDivertingL(class TCallDivertSetting const &, enum TBasicServiceGroups, int) - ?SetNetObserver@CPsetSAObserver@@QAEXAAVMPsetNetworkInfoObserver@@@Z @ 64 NONAME ; void CPsetSAObserver::SetNetObserver(class MPsetNetworkInfoObserver &) - ?SetNetSAObserver@CPsetNetwork@@QAEXAAVMPsetNetworkInfoObserver@@@Z @ 65 NONAME ; void CPsetNetwork::SetNetSAObserver(class MPsetNetworkInfoObserver &) - ?SetNetworkModeObserver@CPsetNetwork@@QAEXAAVMPsetNetworkModeObserver@@@Z @ 66 NONAME ; void CPsetNetwork::SetNetworkModeObserver(class MPsetNetworkModeObserver &) - ?SetNetworkModeSelectionL@CPsetNetwork@@UAEXAAK@Z @ 67 NONAME ; void CPsetNetwork::SetNetworkModeSelectionL(unsigned long &) - ?SetNewDefaultNumberL@CPsetCallDiverting@@QAEHAAVTDes16@@@Z @ 68 NONAME ; int CPsetCallDiverting::SetNewDefaultNumberL(class TDes16 &) - ?SetRequestObserver@CPsetCallBarring@@QAEXPAVMPsetRequestObserver@@@Z @ 69 NONAME ; void CPsetCallBarring::SetRequestObserver(class MPsetRequestObserver *) - ?SetRequestObserver@CPsetCallDiverting@@QAEXPAVMPsetRequestObserver@@@Z @ 70 NONAME ; void CPsetCallDiverting::SetRequestObserver(class MPsetRequestObserver *) - ?SetRequestObserver@CPsetCallWaiting@@QAEXPAVMPsetRequestObserver@@@Z @ 71 NONAME ; void CPsetCallWaiting::SetRequestObserver(class MPsetRequestObserver *) - ?SetRequestObserver@CPsetCli@@QAEXPAVMPsetRequestObserver@@@Z @ 72 NONAME ; void CPsetCli::SetRequestObserver(class MPsetRequestObserver *) - ?SetTimerValueL@CPsetCallDiverting@@QAEHABH@Z @ 73 NONAME ; int CPsetCallDiverting::SetTimerValueL(int const &) - ?SetUsedDataNumberL@CPsetCallDiverting@@QAEHAAV?$TBuf@$0GE@@@@Z @ 74 NONAME ; int CPsetCallDiverting::SetUsedDataNumberL(class TBuf<100> &) - ?SetUsedFaxNumberL@CPsetCallDiverting@@QAEHAAV?$TBuf@$0GE@@@@Z @ 75 NONAME ; int CPsetCallDiverting::SetUsedFaxNumberL(class TBuf<100> &) - ?SwapDefaultNumberL@CPsetCallDiverting@@QAEXABH@Z @ 76 NONAME ; void CPsetCallDiverting::SwapDefaultNumberL(int const &) - ?VideoMailQueryL@CPsetCallDiverting@@QAEXAAVTDes16@@@Z @ 77 NONAME ; void CPsetCallDiverting::VideoMailQueryL(class TDes16 &) - ?VoiceMailQueryL@CPsetCallDiverting@@QAEXAAVTDes16@@@Z @ 78 NONAME ; void CPsetCallDiverting::VoiceMailQueryL(class TDes16 &) + ?GetBarringStatusL@CPsetCallBarring@@UAEXW4TServiceGroup@@W4TBarringProgram@@@Z @ 1 NONAME ; void CPsetCallBarring::GetBarringStatusL(enum TServiceGroup, enum TBarringProgram) + ?SetNetworkModeSelectionL@CPsetNetwork@@UAEXAAK@Z @ 2 NONAME ; void CPsetNetwork::SetNetworkModeSelectionL(unsigned long &) + ?GetColpModeL@CPsetCli@@UAEXXZ @ 3 NONAME ; void CPsetCli::GetColpModeL(void) + ?CreateCBObjectL@CPsetContainer@@QAEPAVCPsetCallBarring@@AAVMPsetBarringObserver@@@Z @ 4 NONAME ; class CPsetCallBarring * CPsetContainer::CreateCBObjectL(class MPsetBarringObserver &) + ?SetRequestObserver@CPsetCallBarring@@QAEXPAVMPsetRequestObserver@@@Z @ 5 NONAME ; void CPsetCallBarring::SetRequestObserver(class MPsetRequestObserver *) + ?IsCallActive@CPsetNetwork@@QAEHXZ @ 6 NONAME ; int CPsetNetwork::IsCallActive(void) + ?GetCurrentNetworkInfo@CPsetNetwork@@UAEHAAUTCurrentNetworkInfo@MPsetNetworkSelect@@@Z @ 7 NONAME ; int CPsetNetwork::GetCurrentNetworkInfo(struct MPsetNetworkSelect::TCurrentNetworkInfo &) + ?GetCnapL@CPsetCli@@UAEXXZ @ 8 NONAME ; void CPsetCli::GetCnapL(void) + ?SelectNetworkL@CPsetNetwork@@UAEXABUTNetworkInfo@MPsetNetworkSelect@@@Z @ 9 NONAME ; void CPsetNetwork::SelectNetworkL(struct MPsetNetworkSelect::TNetworkInfo const &) + ?NewL@CPsetNetwork@@SAPAV1@AAVRMobilePhone@@AAVMPsetNetworkInfoObserver@@@Z @ 10 NONAME ; class CPsetNetwork * CPsetNetwork::NewL(class RMobilePhone &, class MPsetNetworkInfoObserver &) + ?GetNetworkSelectMode@CPsetNetwork@@UAEHAAW4TSelectMode@MPsetNetworkSelect@@@Z @ 11 NONAME ; int CPsetNetwork::GetNetworkSelectMode(enum MPsetNetworkSelect::TSelectMode &) + ?SwapDefaultNumberL@CPsetCallDiverting@@QAEXABH@Z @ 12 NONAME ; void CPsetCallDiverting::SwapDefaultNumberL(int const &) + ?VideoMailQueryL@CPsetCallDiverting@@QAEXAAVTDes16@@@Z @ 13 NONAME ; void CPsetCallDiverting::VideoMailQueryL(class TDes16 &) + ?SetBarringL@CPsetCallBarring@@UAEXABVTCallBarringSetting@@W4TBasicServiceGroups@@@Z @ 14 NONAME ; void CPsetCallBarring::SetBarringL(class TCallBarringSetting const &, enum TBasicServiceGroups) + ?IsCallActive@CPsetSAObserver@@QAEHXZ @ 15 NONAME ; int CPsetSAObserver::IsCallActive(void) + ??1CPsetCallWaiting@@UAE@XZ @ 16 NONAME ; CPsetCallWaiting::~CPsetCallWaiting(void) + ?ChangePasswordL@CPsetCallBarring@@QAEXAAVTMobilePhonePasswordChangeV2@RMobilePhone@@@Z @ 17 NONAME ; void CPsetCallBarring::ChangePasswordL(class RMobilePhone::TMobilePhonePasswordChangeV2 &) + ?CreateCliObjectL@CPsetContainer@@QAEPAVCPsetCli@@AAVMPsetCliObserver@@@Z @ 18 NONAME ; class CPsetCli * CPsetContainer::CreateCliObjectL(class MPsetCliObserver &) + ?VoiceMailQueryL@CPsetCallDiverting@@QAEXAAVTDes16@@@Z @ 19 NONAME ; void CPsetCallDiverting::VoiceMailQueryL(class TDes16 &) + ??1CPsetContainer@@UAE@XZ @ 20 NONAME ; CPsetContainer::~CPsetContainer(void) + ?NewL@CPsetNetwork@@SAPAV1@AAVRMobilePhone@@AAVMPsetNetworkModeObserver@@@Z @ 21 NONAME ; class CPsetNetwork * CPsetNetwork::NewL(class RMobilePhone &, class MPsetNetworkModeObserver &) + ?GetDefaultNumbersL@CPsetCallDiverting@@QAEHAAVCDesC16ArrayFlat@@@Z @ 22 NONAME ; int CPsetCallDiverting::GetDefaultNumbersL(class CDesC16ArrayFlat &) + ?NewL@CPsetContainer@@SAPAV1@XZ @ 23 NONAME ; class CPsetContainer * CPsetContainer::NewL(void) + ?CreateCFObjectL@CPsetContainer@@QAEPAVCPsetCallDiverting@@AAVMPsetDivertObserver@@@Z @ 24 NONAME ; class CPsetCallDiverting * CPsetContainer::CreateCFObjectL(class MPsetDivertObserver &) + ?IsGPRSConnected@CPsetSAObserver@@QAEHXZ @ 25 NONAME ; int CPsetSAObserver::IsGPRSConnected(void) + ?IsNetworkSelectionSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 26 NONAME ; int CPsetCustomerServiceProfile::IsNetworkSelectionSupported(int &) + ?GetCurrentDivertStatus@CPsetSAObserver@@QAEHAAW4TUnconditionalCFStatus@@@Z @ 27 NONAME ; int CPsetSAObserver::GetCurrentDivertStatus(enum TUnconditionalCFStatus &) + ??1CPsetCallDiverting@@UAE@XZ @ 28 NONAME ; CPsetCallDiverting::~CPsetCallDiverting(void) + ?OpenCSProfileL@CPsetCustomerServiceProfile@@QAEHXZ @ 29 NONAME ; int CPsetCustomerServiceProfile::OpenCSProfileL(void) + ??1CPsetSAObserver@@UAE@XZ @ 30 NONAME ; CPsetSAObserver::~CPsetSAObserver(void) + ?IsCFSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 31 NONAME ; int CPsetCustomerServiceProfile::IsCFSupported(int &) + ?GetDivertingStatusL@CPsetCallDiverting@@UAEXW4TServiceGroup@@W4TCallDivertingCondition@@W4TBasicServiceGroups@@@Z @ 32 NONAME ; void CPsetCallDiverting::GetDivertingStatusL(enum TServiceGroup, enum TCallDivertingCondition, enum TBasicServiceGroups) + ?NewL@CPsetCallDiverting@@SAPAV1@AAVMPsetDivertObserver@@AAVRMobilePhone@@@Z @ 33 NONAME ; class CPsetCallDiverting * CPsetCallDiverting::NewL(class MPsetDivertObserver &, class RMobilePhone &) + ?SetUsedDataNumberL@CPsetCallDiverting@@QAEHAAV?$TBuf@$0GE@@@@Z @ 34 NONAME ; int CPsetCallDiverting::SetUsedDataNumberL(class TBuf<100> &) + ?CreateNetworkModeObjectL@CPsetContainer@@QAEPAVCPsetNetwork@@AAVMPsetNetworkModeObserver@@@Z @ 35 NONAME ; class CPsetNetwork * CPsetContainer::CreateNetworkModeObjectL(class MPsetNetworkModeObserver &) + ?GetCallWaitingStatusL@CPsetCallWaiting@@UAEXXZ @ 36 NONAME ; void CPsetCallWaiting::GetCallWaitingStatusL(void) + ?ResetNetworkSearch@CPsetNetwork@@QAEHXZ @ 37 NONAME ; int CPsetNetwork::ResetNetworkSearch(void) + ?GetAvailableNetworksL@CPsetNetwork@@UAEXXZ @ 38 NONAME ; void CPsetNetwork::GetAvailableNetworksL(void) + ?SetNewDefaultNumberL@CPsetCallDiverting@@QAEHAAVTDes16@@@Z @ 39 NONAME ; int CPsetCallDiverting::SetNewDefaultNumberL(class TDes16 &) + ?CreateCWObjectL@CPsetContainer@@QAEPAVCPsetCallWaiting@@AAVMPsetCallWaitingObserver@@@Z @ 40 NONAME ; class CPsetCallWaiting * CPsetContainer::CreateCWObjectL(class MPsetCallWaitingObserver &) + ??1CPsetCli@@UAE@XZ @ 41 NONAME ; CPsetCli::~CPsetCli(void) + ?CreateNetworkObjectL@CPsetContainer@@QAEPAVCPsetNetwork@@AAVMPsetNetworkInfoObserver@@@Z @ 42 NONAME ; class CPsetNetwork * CPsetContainer::CreateNetworkObjectL(class MPsetNetworkInfoObserver &) + ?SetUsedFaxNumberL@CPsetCallDiverting@@QAEHAAV?$TBuf@$0GE@@@@Z @ 43 NONAME ; int CPsetCallDiverting::SetUsedFaxNumberL(class TBuf<100> &) + ?CancelCurrentRequest@CPsetCallBarring@@UAEHXZ @ 44 NONAME ; int CPsetCallBarring::CancelCurrentRequest(void) + ?NewL@CPsetCli@@SAPAV1@AAVRMobilePhone@@AAVMPsetCliObserver@@@Z @ 45 NONAME ; class CPsetCli * CPsetCli::NewL(class RMobilePhone &, class MPsetCliObserver &) + ?NotifyDivertChange@CPsetSAObserver@@QAEXW4TSelectedLine@@AAVTCallDivertNotifySetting@@ABH@Z @ 46 NONAME ; void CPsetSAObserver::NotifyDivertChange(enum TSelectedLine, class TCallDivertNotifySetting &, int const &) + ?GetCurrentNetworkModeSelectionL@CPsetNetwork@@UAEXXZ @ 47 NONAME ; void CPsetNetwork::GetCurrentNetworkModeSelectionL(void) + ?GetUsedFaxNumberLC@CPsetCallDiverting@@QAEPAVHBufC16@@XZ @ 48 NONAME ; class HBufC16 * CPsetCallDiverting::GetUsedFaxNumberLC(void) + ?SetNetSAObserver@CPsetNetwork@@QAEXAAVMPsetNetworkInfoObserver@@@Z @ 49 NONAME ; void CPsetNetwork::SetNetSAObserver(class MPsetNetworkInfoObserver &) + ?NewL@CPsetCustomerServiceProfile@@SAPAV1@XZ @ 50 NONAME ; class CPsetCustomerServiceProfile * CPsetCustomerServiceProfile::NewL(void) + ?SetNetworkModeObserver@CPsetNetwork@@QAEXAAVMPsetNetworkModeObserver@@@Z @ 51 NONAME ; void CPsetNetwork::SetNetworkModeObserver(class MPsetNetworkModeObserver &) + ?NewL@CPsetCallWaiting@@SAPAV1@AAVRMobilePhone@@AAVMPsetCallWaitingObserver@@@Z @ 52 NONAME ; class CPsetCallWaiting * CPsetCallWaiting::NewL(class RMobilePhone &, class MPsetCallWaitingObserver &) + ?SetRequestObserver@CPsetCallDiverting@@QAEXPAVMPsetRequestObserver@@@Z @ 53 NONAME ; void CPsetCallDiverting::SetRequestObserver(class MPsetRequestObserver *) + ?CancelCurrentRequest@CPsetCallDiverting@@UAEHXZ @ 54 NONAME ; int CPsetCallDiverting::CancelCurrentRequest(void) + ??1CPsetCallBarring@@UAE@XZ @ 55 NONAME ; CPsetCallBarring::~CPsetCallBarring(void) + ?GetClirModeL@CPsetCli@@UAEXXZ @ 56 NONAME ; void CPsetCli::GetClirModeL(void) + ?SetDivertingL@CPsetCallDiverting@@UAEXABVTCallDivertSetting@@W4TBasicServiceGroups@@H@Z @ 57 NONAME ; void CPsetCallDiverting::SetDivertingL(class TCallDivertSetting const &, enum TBasicServiceGroups, int) + ?CreateRefreshHandlerL@CPsetContainer@@QAEPAVCPSetRefreshHandler@@XZ @ 58 NONAME ; class CPSetRefreshHandler * CPsetContainer::CreateRefreshHandlerL(void) + ?SetRequestObserver@CPsetCallWaiting@@QAEXPAVMPsetRequestObserver@@@Z @ 59 NONAME ; void CPsetCallWaiting::SetRequestObserver(class MPsetRequestObserver *) + ?CancelProcess@CPsetNetwork@@UAEXXZ @ 60 NONAME ; void CPsetNetwork::CancelProcess(void) + ?IsALSSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 61 NONAME ; int CPsetCustomerServiceProfile::IsALSSupported(int &) + ?SetNetObserver@CPsetSAObserver@@QAEXAAVMPsetNetworkInfoObserver@@@Z @ 62 NONAME ; void CPsetSAObserver::SetNetObserver(class MPsetNetworkInfoObserver &) + ?SetRequestObserver@CPsetCli@@QAEXPAVMPsetRequestObserver@@@Z @ 63 NONAME ; void CPsetCli::SetRequestObserver(class MPsetRequestObserver *) + ?NewL@CPsetSAObserver@@SAPAV1@XZ @ 64 NONAME ; class CPsetSAObserver * CPsetSAObserver::NewL(void) + ?CancelAll@CPsetCli@@UAEXXZ @ 65 NONAME ; void CPsetCli::CancelAll(void) + ?ChangePasswordL@CPsetCallBarring@@QAEXAAVTMobilePhonePasswordChangeV2@RMobilePhone@@H@Z @ 66 NONAME ; void CPsetCallBarring::ChangePasswordL(class RMobilePhone::TMobilePhonePasswordChangeV2 &, int) + ?SetTimerValueL@CPsetCallDiverting@@QAEHABH@Z @ 67 NONAME ; int CPsetCallDiverting::SetTimerValueL(int const &) + ??1CPsetCustomerServiceProfile@@UAE@XZ @ 68 NONAME ; CPsetCustomerServiceProfile::~CPsetCustomerServiceProfile(void) + ?GetUsedDataNumberLC@CPsetCallDiverting@@QAEPAVHBufC16@@XZ @ 69 NONAME ; class HBufC16 * CPsetCallDiverting::GetUsedDataNumberLC(void) + ?GetClipModeL@CPsetCli@@UAEXXZ @ 70 NONAME ; void CPsetCli::GetClipModeL(void) + ?CancelProcess@CPsetCallWaiting@@UAEHXZ @ 71 NONAME ; int CPsetCallWaiting::CancelProcess(void) + ?IsGPRSConnected@CPsetNetwork@@QAEHXZ @ 72 NONAME ; int CPsetNetwork::IsGPRSConnected(void) + ?GetColrModeL@CPsetCli@@UAEXXZ @ 73 NONAME ; void CPsetCli::GetColrModeL(void) + ?IsCBSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 74 NONAME ; int CPsetCustomerServiceProfile::IsCBSupported(int &) + ??1CPsetNetwork@@UAE@XZ @ 75 NONAME ; CPsetNetwork::~CPsetNetwork(void) + ?SetCallWaitingL@CPsetCallWaiting@@UAEXW4TSetCallWaiting@MPsetCallWaiting@@W4TBasicServiceGroups@@@Z @ 76 NONAME ; void CPsetCallWaiting::SetCallWaitingL(enum MPsetCallWaiting::TSetCallWaiting, enum TBasicServiceGroups) + ?GetTimerValueL@CPsetCallDiverting@@QAEHXZ @ 77 NONAME ; int CPsetCallDiverting::GetTimerValueL(void) + ?IsCWSupported@CPsetCustomerServiceProfile@@QAEHAAH@Z @ 78 NONAME ; int CPsetCustomerServiceProfile::IsCWSupported(int &) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/eabi/phonesettingsu.def --- a/cellular/telephonysettings/eabi/phonesettingsu.def Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/eabi/phonesettingsu.def Wed Sep 01 12:15:03 2010 +0100 @@ -100,39 +100,41 @@ _ZTI16CPsetCallBarring @ 99 NONAME _ZTI16CPsetCallWaiting @ 100 NONAME _ZTI18CPsetCallDiverting @ 101 NONAME - _ZTI23CPSetRefreshHandlerImpl @ 102 NONAME - _ZTI27CPsetCustomerServiceProfile @ 103 NONAME - _ZTI8CPsetCli @ 104 NONAME - _ZTV12CPsetNetwork @ 105 NONAME - _ZTV14CPsetContainer @ 106 NONAME - _ZTV14CPsetTelephony @ 107 NONAME - _ZTV15CPsetSAObserver @ 108 NONAME - _ZTV16CPsetCallBarring @ 109 NONAME - _ZTV16CPsetCallWaiting @ 110 NONAME - _ZTV18CPsetCallDiverting @ 111 NONAME - _ZTV23CPSetRefreshHandlerImpl @ 112 NONAME - _ZTV27CPsetCustomerServiceProfile @ 113 NONAME - _ZTV8CPsetCli @ 114 NONAME - _ZThn28_N12CPsetNetwork13CancelProcessEv @ 115 NONAME - _ZThn28_N12CPsetNetwork14SelectNetworkLERKN18MPsetNetworkSelect12TNetworkInfoE @ 116 NONAME - _ZThn28_N12CPsetNetwork20GetNetworkSelectModeERN18MPsetNetworkSelect11TSelectModeE @ 117 NONAME - _ZThn28_N12CPsetNetwork21GetAvailableNetworksLEv @ 118 NONAME - _ZThn28_N12CPsetNetwork21GetCurrentNetworkInfoERN18MPsetNetworkSelect19TCurrentNetworkInfoE @ 119 NONAME - _ZThn28_N16CPsetCallBarring11SetBarringLERK19TCallBarringSetting19TBasicServiceGroups @ 120 NONAME - _ZThn28_N16CPsetCallBarring17GetBarringStatusLE13TServiceGroup15TBarringProgram @ 121 NONAME - _ZThn28_N16CPsetCallBarring20CancelCurrentRequestEv @ 122 NONAME - _ZThn28_N16CPsetCallWaiting13CancelProcessEv @ 123 NONAME - _ZThn28_N16CPsetCallWaiting15SetCallWaitingLEN16MPsetCallWaiting15TSetCallWaitingE19TBasicServiceGroups @ 124 NONAME - _ZThn28_N16CPsetCallWaiting21GetCallWaitingStatusLEv @ 125 NONAME - _ZThn28_N8CPsetCli12GetClipModeLEv @ 126 NONAME - _ZThn28_N8CPsetCli12GetClirModeLEv @ 127 NONAME - _ZThn28_N8CPsetCli12GetColpModeLEv @ 128 NONAME - _ZThn28_N8CPsetCli12GetColrModeLEv @ 129 NONAME - _ZThn28_N8CPsetCli8GetCnapLEv @ 130 NONAME - _ZThn28_N8CPsetCli9CancelAllEv @ 131 NONAME - _ZThn32_N12CPsetNetwork24SetNetworkModeSelectionLERm @ 132 NONAME - _ZThn32_N12CPsetNetwork31GetCurrentNetworkModeSelectionLEv @ 133 NONAME - _ZThn4_N18CPsetCallDiverting13SetDivertingLERK18TCallDivertSetting19TBasicServiceGroupsi @ 134 NONAME - _ZThn4_N18CPsetCallDiverting19GetDivertingStatusLE13TServiceGroup23TCallDivertingCondition19TBasicServiceGroups @ 135 NONAME - _ZThn4_N18CPsetCallDiverting20CancelCurrentRequestEv @ 136 NONAME + _ZTI20CNetworkResetHandler @ 102 NONAME + _ZTI23CPSetRefreshHandlerImpl @ 103 NONAME + _ZTI27CPsetCustomerServiceProfile @ 104 NONAME + _ZTI8CPsetCli @ 105 NONAME + _ZTV12CPsetNetwork @ 106 NONAME + _ZTV14CPsetContainer @ 107 NONAME + _ZTV14CPsetTelephony @ 108 NONAME + _ZTV15CPsetSAObserver @ 109 NONAME + _ZTV16CPsetCallBarring @ 110 NONAME + _ZTV16CPsetCallWaiting @ 111 NONAME + _ZTV18CPsetCallDiverting @ 112 NONAME + _ZTV20CNetworkResetHandler @ 113 NONAME + _ZTV23CPSetRefreshHandlerImpl @ 114 NONAME + _ZTV27CPsetCustomerServiceProfile @ 115 NONAME + _ZTV8CPsetCli @ 116 NONAME + _ZThn28_N12CPsetNetwork13CancelProcessEv @ 117 NONAME + _ZThn28_N12CPsetNetwork14SelectNetworkLERKN18MPsetNetworkSelect12TNetworkInfoE @ 118 NONAME + _ZThn28_N12CPsetNetwork20GetNetworkSelectModeERN18MPsetNetworkSelect11TSelectModeE @ 119 NONAME + _ZThn28_N12CPsetNetwork21GetAvailableNetworksLEv @ 120 NONAME + _ZThn28_N12CPsetNetwork21GetCurrentNetworkInfoERN18MPsetNetworkSelect19TCurrentNetworkInfoE @ 121 NONAME + _ZThn28_N16CPsetCallBarring11SetBarringLERK19TCallBarringSetting19TBasicServiceGroups @ 122 NONAME + _ZThn28_N16CPsetCallBarring17GetBarringStatusLE13TServiceGroup15TBarringProgram @ 123 NONAME + _ZThn28_N16CPsetCallBarring20CancelCurrentRequestEv @ 124 NONAME + _ZThn28_N16CPsetCallWaiting13CancelProcessEv @ 125 NONAME + _ZThn28_N16CPsetCallWaiting15SetCallWaitingLEN16MPsetCallWaiting15TSetCallWaitingE19TBasicServiceGroups @ 126 NONAME + _ZThn28_N16CPsetCallWaiting21GetCallWaitingStatusLEv @ 127 NONAME + _ZThn28_N8CPsetCli12GetClipModeLEv @ 128 NONAME + _ZThn28_N8CPsetCli12GetClirModeLEv @ 129 NONAME + _ZThn28_N8CPsetCli12GetColpModeLEv @ 130 NONAME + _ZThn28_N8CPsetCli12GetColrModeLEv @ 131 NONAME + _ZThn28_N8CPsetCli8GetCnapLEv @ 132 NONAME + _ZThn28_N8CPsetCli9CancelAllEv @ 133 NONAME + _ZThn32_N12CPsetNetwork24SetNetworkModeSelectionLERm @ 134 NONAME + _ZThn32_N12CPsetNetwork31GetCurrentNetworkModeSelectionLEv @ 135 NONAME + _ZThn4_N18CPsetCallDiverting13SetDivertingLERK18TCallDivertSetting19TBasicServiceGroupsi @ 136 NONAME + _ZThn4_N18CPsetCallDiverting19GetDivertingStatusLE13TServiceGroup23TCallDivertingCondition19TBasicServiceGroups @ 137 NONAME + _ZThn4_N18CPsetCallDiverting20CancelCurrentRequestEv @ 138 NONAME diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/group/bld.inf --- a/cellular/telephonysettings/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -26,9 +26,9 @@ PRJ_EXPORTS -../group/phonesettings_stub.sis /epoc32/data/z/system/install/phonesettings_stub.sis +../group/phonesettings_stub.SIS /epoc32/data/z/system/install/phonesettings_stub.sis // IBY files -../rom/phonesettings.iby CORE_APP_LAYER_IBY_EXPORT_PATH(phonesettings.iby) +../rom/PhoneSettings.iby CORE_APP_LAYER_IBY_EXPORT_PATH(PhoneSettings.iby) // End of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/group/phonesettings.mmp --- a/cellular/telephonysettings/group/phonesettings.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/group/phonesettings.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ */ #include -#include "../logger/phonesettingsloggingconf.h" +#include "../Logger/PhoneSettingsLoggingConf.h" // Capability assignment. CAPABILITY CAP_GENERAL_DLL @@ -28,41 +28,39 @@ UID 0x1000008d 0x100058e3 SOURCEPATH ../src -SOURCE psetcallwaiting.cpp -SOURCE psetcontainer.cpp -SOURCE psetcallbarring.cpp -SOURCE psetcalldiverting.cpp -SOURCE psettelephony.cpp -SOURCE psetcli.cpp -SOURCE psetvariationproxy.cpp -SOURCE psetnetwork.cpp -SOURCE psetsaobserver.cpp -SOURCE psetcsp.cpp -SOURCE psetutility.cpp -SOURCE psetrefreshhandlerimpl.cpp -SOURCE psetcalldivertingbase.cpp -SOURCE psetsubscriberidcheck.cpp -SOURCE psetcalldivertingbasicimpl.cpp -SOURCE psetcalldivertingcreator.cpp -SOURCE psetcalldivertingdualaffectimpl.cpp +SOURCE CNetworkResetHandler.cpp +SOURCE PsetCallWaiting.cpp +SOURCE PsetContainer.cpp +SOURCE PsetCallBarring.cpp +SOURCE PsetCallDiverting.cpp +SOURCE PsetTelephony.cpp +SOURCE PsetCli.cpp +SOURCE PsetVariationProxy.cpp +SOURCE PsetNetwork.cpp +SOURCE PsetSAObserver.cpp +SOURCE PsetCSP.cpp +SOURCE PSetUtility.cpp +SOURCE PSetRefreshHandlerImpl.cpp +SOURCE PSetCallDivertingBase.cpp +SOURCE PSetSubscriberIdCheck.cpp +SOURCE PSetCallDivertingBasicImpl.cpp +SOURCE PSetCallDivertingCreator.cpp +SOURCE PSetCallDivertingDualAffectImpl.cpp USERINCLUDE ../inc -USERINCLUDE ../logger -SYSTEMINCLUDE ../../../inc +USERINCLUDE ../Logger +SYSTEMINCLUDE ../../../inc // APP include needed because telephonysettings // uses vmbx headers from APP layer. -// <-- QT PHONE START --> -MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END --> +APP_LAYER_SYSTEMINCLUDE + LIBRARY euser.lib LIBRARY etel.lib LIBRARY etelmm.lib LIBRARY customapi.lib LIBRARY bafl.lib LIBRARY sssettings.lib -// <-- QT PHONE START --> -//LIBRARY vmbx.lib -// <-- QT PHONE END --> +LIBRARY vmbx.lib LIBRARY featmgr.lib LIBRARY centralrepository.lib diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/CNetworkResetHandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cellular/telephonysettings/inc/CNetworkResetHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,68 @@ +/* +* Copyright (c) 2002-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: CNetworkResetHandler is a async activeobject which handles reseting network call. +* +* +*/ + + +#ifndef CNETWORKRESETHANDLER_H +#define CNETWORKRESETHANDLER_H + +// INCLUDES +#include "PsetNetwork.h" +#include + +// FORWARD DECLARATIONS +class CPsetNetwork; + +/** +* CNetworkResetHandler class is used to handle network reset search requests.´ +*/ +class CNetworkResetHandler : public CActive + { + + public: // constructor & destructor + + static CNetworkResetHandler* NewL( RMobilePhone& aPhone ); + + /* Destructor */ + ~CNetworkResetHandler(); + + /* + * Calls ETEL to start reseting the network. + * @return Error code, or KErrNone. + */ + TInt ResetNetworkSearch(); + + private: + + CNetworkResetHandler( RMobilePhone& aPhone ); + + void ConstructL(); + + void RunL(); + + void DoCancel(); + + // Custom phone. + RMmCustomAPI iCustomApi; + + //Provides client access to mobile phone functionality provided by TSY. + RMobilePhone& iPhone; + + }; +#endif // CNETWORKRESETHANDLER_H + +// end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/MCallDiverting.h --- a/cellular/telephonysettings/inc/MCallDiverting.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/MCallDiverting.h Wed Sep 01 12:15:03 2010 +0100 @@ -29,11 +29,7 @@ class MCallDiverting { public: - /** - * Sets observer which informs when request is completed - */ - virtual void SetRequestObserver( MPsetRequestObserver* aObs ) = 0; - + /** * Sets diverting to the network. * @@ -112,6 +108,15 @@ */ virtual TInt SaveKey( TUint32 aKeyId, const TDesC& aKeyValue ) = 0; + /** + * Opens Vmbx connection. Leaves vmbx to the stack. + * + * @param aTelNumber vmbx number. + * @param aVmbx vmbx connection. + * @return used vmbx number. + */ + virtual TInt OpenVmbxLC( TDes& aTelNumber, RVmbxNumber& aVmbx ) = 0; + /* * Virtual destructor. */ diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/MNetworkInfoObs.h --- a/cellular/telephonysettings/inc/MNetworkInfoObs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/MNetworkInfoObs.h Wed Sep 01 12:15:03 2010 +0100 @@ -26,7 +26,7 @@ #endif #ifndef __MNETWORKSELECT_H -#include "mnetworkselect.h" +#include "MNetworkSelect.h" #endif // DATA TYPES diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/PSetCallDivertingBase.h --- a/cellular/telephonysettings/inc/PSetCallDivertingBase.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/PSetCallDivertingBase.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,10 +24,10 @@ #include #include #include -#include "mcalldiverting.h" -#include "msssettingsobserver.h" +#include "MCallDiverting.h" +#include "MSSSettingsObserver.h" #include "nwdefs.h" -#include "psetconstants.h" +#include "PsetConstants.h" // CLASS DECLARATION class MPsetDivertObserver; @@ -66,11 +66,7 @@ ~CPSetCallDivertingBase(); public: // From base class. - /** - * @see MCallDiverting. - */ - void SetRequestObserver( MPsetRequestObserver* aObs ); - + /** * @see MCallDiverting. */ @@ -115,6 +111,11 @@ /** * @see MCallDiverting. + */ + TInt OpenVmbxLC( TDes& aTelNumber, RVmbxNumber& aVmbx ); + + /** + * @see MCallDiverting. */ TInt GetNumbersFromSharedDataL( TInt aType, CDesC16ArrayFlat& aArray ); @@ -243,12 +244,12 @@ /** * @see CActive::RunL(). */ - virtual void RunL(); + void RunL(); /** * @see CActive::DoCancel(). */ - virtual void DoCancel(); + void DoCancel(); /** * @see MSSSettingsObserver::PhoneSettingChanged(). diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/PSetCallDivertingBasicImpl.h --- a/cellular/telephonysettings/inc/PSetCallDivertingBasicImpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/PSetCallDivertingBasicImpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,13 +21,13 @@ // INCLUDES #include -#include +#include #include #include -#include "msssettingsobserver.h" +#include "MSSSettingsObserver.h" #include "nwdefs.h" -#include "psetconstants.h" -#include "psetcalldivertingbase.h" +#include "PsetConstants.h" +#include "PSetCallDivertingBase.h" // CLASS DECLARATION class CPsetSAObserver; @@ -101,10 +101,6 @@ const TBasicServiceGroups aBsc ); TSelectedLine GetSAAls(); - - private: - // Memorize requested service group - TServiceGroup iRequestedServiceGroup; }; #endif // CPSETCALLDIVERTINGBASICIMPL_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/PSetCallDivertingCreator.h --- a/cellular/telephonysettings/inc/PSetCallDivertingCreator.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/PSetCallDivertingCreator.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,10 +22,11 @@ // INCLUDES #include #include +#include #include #include -#include "mpsetdivertobs.h" -#include "mcalldiverting.h" +#include "MPsetDivertObs.h" +#include "MCallDiverting.h" /** * Factory class for creating divert related classes. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/PSetCallDivertingDualAffectImpl.h --- a/cellular/telephonysettings/inc/PSetCallDivertingDualAffectImpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/PSetCallDivertingDualAffectImpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,13 +21,13 @@ // INCLUDES #include -#include +#include #include #include -#include "msssettingsobserver.h" +#include "MSSSettingsObserver.h" #include "nwdefs.h" -#include "psetconstants.h" -#include "psetcalldivertingbase.h" +#include "PsetConstants.h" +#include "PSetCallDivertingBase.h" // CLASS DECLARATION class CPsetSAObserver; diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/PSetRefreshHandlerImpl.h --- a/cellular/telephonysettings/inc/PSetRefreshHandlerImpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/PSetRefreshHandlerImpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES -#include +#include #include @@ -61,16 +61,16 @@ /** * @see CPSetRefreshHandler::NotifyFileChangeL. - */ - void NotifyFileChangeL( + */ + void NotifyFileChangeL( MSSSettingsRefreshObserver& aObserver, TSatElementaryFiles aObservedFiles, TSatRefreshType aObservedRefreshType ); - /** + /** * @see CPSetRefreshHandler::CancelNotify. - */ - void CancelNotify(); + */ + void CancelNotify(); /** * @see CPSetRefreshHandler::ChangedCspSettings. @@ -82,17 +82,17 @@ public: // Functions from base classes - /** + /** * @see MSSSettingsRefreshObserver::AllowRefresh */ TBool AllowRefresh( const TSatRefreshType aType, const TSatElementaryFiles aFiles ); - /** + /** * @see MSSSettingsRefreshObserver::Refresh */ - void Refresh( + void Refresh( const TSatRefreshType aType, const TSatElementaryFiles aFiles ); diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/PSetUtility.h --- a/cellular/telephonysettings/inc/PSetUtility.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/PSetUtility.h Wed Sep 01 12:15:03 2010 +0100 @@ -88,9 +88,6 @@ static RMobilePhone::TMobilePhoneCFCondition GetDivertReason( TCallDivertingCondition aCondition ); - static TCallDivertingCondition - GetDivertReason( RMobilePhone::TMobilePhoneCFCondition aCondition ); - static RMobilePhone::TMobileService VerifyAltLineUseL(); }; diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/inc/PsetVariationProxy.h --- a/cellular/telephonysettings/inc/PsetVariationProxy.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/inc/PsetVariationProxy.h Wed Sep 01 12:15:03 2010 +0100 @@ -12,9 +12,9 @@ * Contributors: * * Description: -* CPsetVariationProxy class is proxy class for -* central repository variation -* (Call waiting/distinguish between not provisioned and not activated). +* CPsetVariationProxy class is proxy class for +* central repository variation +* (Call waiting/distinguish between not provisioned and not activated). * * */ @@ -42,47 +42,47 @@ { public: //constructor & destructor - /* - * Symbian OS 2-phase Constructor. - * - * @param aUid identifing the central repository UID. + /* + * Symbian OS 2-phase Constructor. + * + * @param aUid identifing the central repository UID. * @param aId central repository ID. * @return the created instance. - */ - static CPSetVariationProxy* NewL( const TUid& aUid, + */ + static CPSetVariationProxy* NewL( const TUid& aUid, const TUint aId ); - - /* Destructor */ - ~CPSetVariationProxy(); - + + /* Destructor */ + ~CPSetVariationProxy(); + public: - /** + /** * Check from member variable 'iFeature' is the requested feature active. - * - * @param aFeature is uid for used central repository variable. - * @return returns TBool type ETrue/EFalse is current feature enabled or not - */ - TBool IsFeatureEnabled( TUint aFeature ) const; - + * + * @param aFeature is uid for used central repository variable. + * @return returns TBool type ETrue/EFalse is current feature enabled or not + */ + TBool IsFeatureEnabled( TUint aFeature ) const; + + private: + + /** + * Constructor + * + * Open CenRep, read data into 'iFeatures' and close CenRep + */ + void ConstructL( const TUid& aUid, const TUint aId ); + private: - /** - * Constructor - * - * Open CenRep, read data into 'iFeatures' and close CenRep - */ - void ConstructL( const TUid& aUid, const TUint aId ); - + /* Default constructor */ + CPSetVariationProxy(); + private: - /* Default constructor */ - CPSetVariationProxy(); - - private: - - // Saves cen rep data readed in ConstructL() - TInt iFeature; + // Saves cen rep data readed in ConstructL() + TInt iFeature; }; #endif // PSETVARIATIONPROXY_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/rom/PhoneSettings.iby --- a/cellular/telephonysettings/rom/PhoneSettings.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/rom/PhoneSettings.iby Wed Sep 01 12:15:03 2010 +0100 @@ -21,6 +21,6 @@ // Network Settings Engine Library file=ABI_DIR\BUILD_DIR\phonesettings.dll SHARED_LIB_DIR\phonesettings.dll -data=ZSYSTEM\install\phonesettings_stub.sis System\Install\phonesettings_stub.sis +data=ZSYSTEM\install\phonesettings_stub.SIS System\Install\phonesettings_stub.SIS #endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/CNetworkResetHandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cellular/telephonysettings/src/CNetworkResetHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,137 @@ +/* +* Copyright (c) 2002-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: CNetworkResetHandler is a async activeobject which handles reseting network call. +* +* +*/ + + +// INCLUDE FILES +#include "CNetworkResetHandler.h" +#include "PhoneSettingsLogger.h" + +// MEMBER FUNCTIONS + +// --------------------------------------------------------------------------- +// +// 1st phase constructor for network reseting observer. +// +// --------------------------------------------------------------------------- +// +CNetworkResetHandler* CNetworkResetHandler::NewL( RMobilePhone& aPhone ) + { + __PHSLOGSTRING("[PHS]CNetworkResetHandler::NewL"); + + CNetworkResetHandler* self = new ( ELeave ) CNetworkResetHandler( aPhone ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + + +// --------------------------------------------------------------------------- +// +// C++ constructor. +// +// --------------------------------------------------------------------------- +// +CNetworkResetHandler::CNetworkResetHandler( RMobilePhone& aPhone ) + : CActive( EPriorityStandard ), iPhone ( aPhone ) + { + __PHSLOGSTRING("[PHS]CNetworkResetHandler::CNetworkResetHandler"); + } + +// --------------------------------------------------------------------------- +// +// Destructor. +// +// --------------------------------------------------------------------------- +// +CNetworkResetHandler::~CNetworkResetHandler() + { + __PHSLOGSTRING("[PHS]CNetworkResetHandler::~CNetworkResetHandler"); + + Cancel(); + iCustomApi.Close(); + } + +// --------------------------------------------------------------------------- +// +// ConstructL. +// +// --------------------------------------------------------------------------- +// +void CNetworkResetHandler::ConstructL() + { + __PHSLOGSTRING("[PHS]CNetworkResetHandler::ConstructL"); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// +// Close connect to ctsy +// +// --------------------------------------------------------------------------- +// +void CNetworkResetHandler::RunL() + { + __PHSLOGSTRING("[PHS]CNetworkResetHandler::RunL"); + iCustomApi.Close(); + } + +// --------------------------------------------------------------------------- +// +// Requests ETEL to Reset back to the previously used network. +// +// --------------------------------------------------------------------------- +// +TInt CNetworkResetHandler::ResetNetworkSearch() + { + __PHSLOGSTRING("[PHS]--> CNetworkResetHandler::ResetNetworkSearch"); + + TInt error = KErrNone; + + if( IsActive() ) + { + error = KErrInUse; + } + else + { + error = iCustomApi.Open( iPhone ); + } + if( KErrNone == error ) + { + // if there wasn´t already connect open to ETEL or active object wasn´t already in use, + // we can thus send request for reset network server + iCustomApi.ResetNetServer( iStatus ); + SetActive(); + } + __PHSLOGSTRING("[PHS]<-- CNetworkResetHandler::ResetNetworkSearch"); + return error; + } + +// --------------------------------------------------------------------------- +// +// DoCancel. +// +// --------------------------------------------------------------------------- +// +void CNetworkResetHandler::DoCancel() + { + __PHSLOGSTRING("[PHS]CNetworkResetHandler::DoCancel"); + iCustomApi.Close(); + } + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PSetCallDivertingBase.cpp --- a/cellular/telephonysettings/src/PSetCallDivertingBase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PSetCallDivertingBase.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,26 +17,27 @@ // INCLUDE FILES -#include "psetcalldivertingbasicimpl.h" +#include "PSetCallDivertingBasicImpl.h" #include #include #include +#include #include #include #include -#include +#include -#include "psetcalldiverting.h" -#include "psetcontainer.h" -#include "mpsetdivertobs.h" -#include "psettelephony.h" -#include "psetpanic.h" -#include "mpsetrequestobs.h" -#include "psetutility.h" -#include "phonesettingslogger.h" -#include "psetsaobserver.h" -#include "psetcalldivertingbase.h" +#include "PsetCallDiverting.h" +#include "PsetContainer.h" +#include "MPsetDivertObs.h" +#include "PsetTelephony.h" +#include "PSetPanic.h" +#include "MPsetRequestObs.h" +#include "PSetUtility.h" +#include "PhoneSettingsLogger.h" +#include "PsetSAObserver.h" +#include "PSetCallDivertingBase.h" // LOCAL CONSTANTS AND MACROS @@ -167,15 +168,6 @@ } // --------------------------------------------------------------------------- -// SetRequestObserver -// --------------------------------------------------------------------------- -// -void CPSetCallDivertingBase::SetRequestObserver( MPsetRequestObserver* aObs ) - { - iReqObserver = aObs; - } - -// --------------------------------------------------------------------------- // SetDivertingL // --------------------------------------------------------------------------- // @@ -816,17 +808,62 @@ // Verifies whether the divert-to number is to voice mail box. // --------------------------------------------------------------------------- // -TBool CPSetCallDivertingBase::IsVMBXDivertL( TDesC& /*aTelNumber*/ ) +TBool CPSetCallDivertingBase::IsVMBXDivertL( TDesC& aTelNumber ) { - __PHSLOGSTRING("[PHS]--> CPSetCallDivertingBase::IsVMBXDivertL" ); TBool result = EFalse; + + if ( FeatureManager::FeatureSupported ( KFeatureIdVmbxCallDivertIcon ) ) + { + RVmbxNumber vmbxConnection; + TTelNumber telNumber; + TInt retValue = OpenVmbxLC( telNumber, vmbxConnection ); + __PHSLOGSTRING1("[PHS] CPSetCallDivertingBase::IsVMBXDivertL: telNumber = %S", &telNumber ); + __PHSLOGSTRING1("[PHS] CPSetCallDivertingBase::IsVMBXDivertL: retValue = %d", retValue ); + + CleanupStack::PopAndDestroy(); //vmbxConnection is closed when popped + if ( retValue == KErrNone ) //VMBX number found + { + + //Concatenate the existing number and add '*' to the beginning + TTelNumber tempStr; + tempStr.Zero(); + tempStr.Append( KPSetAsterisk ); + + //Match with seven characters + TInt matchChars = KPsetMatchingChars; + if ( telNumber.Length() < matchChars ) + { + matchChars = telNumber.Length(); + } + tempStr.Append( telNumber.Right( matchChars ) ); + + //Compare value with divert-to number + if ( aTelNumber.Match ( tempStr ) != KErrNotFound ) + { + __PHSLOGSTRING("[PHS] CPSetCallDivertingBase::IsVMBXDivertL: Match found" ); + result = ETrue; + } + } + } __PHSLOGSTRING("[PHS] <--CPSetCallDivertingBase::IsVMBXDivertL" ); return result; } // --------------------------------------------------------------------------- +// Opens Vmbx. Leaves vmbx to the stack. +// --------------------------------------------------------------------------- +TInt CPSetCallDivertingBase::OpenVmbxLC( TDes& aTelNumber, RVmbxNumber& aVmbx ) + { + __PHSLOGSTRING("[PHS]--> CPSetCallDivertingBase::OpenVmbxLC" ); + User::LeaveIfError( aVmbx.Open( iPhone ) ); + CleanupClosePushL( aVmbx ); + __PHSLOGSTRING("[PHS]<-- CPSetCallDivertingBase::OpenVmbxLC" ); + return aVmbx.GetVmbxNumber( aTelNumber ); + } + +// --------------------------------------------------------------------------- // If SsSettings notifies of settings change, copy new value to member variable. // --------------------------------------------------------------------------- void CPSetCallDivertingBase::PhoneSettingChanged( diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PSetCallDivertingBasicImpl.cpp --- a/cellular/telephonysettings/src/PSetCallDivertingBasicImpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PSetCallDivertingBasicImpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,25 +17,26 @@ // INCLUDE FILES -#include "psetcalldivertingbasicimpl.h" +#include "PSetCallDivertingBasicImpl.h" #include #include #include +#include #include #include #include -#include +#include -#include "psetcalldiverting.h" -#include "psetcontainer.h" -#include "mpsetdivertobs.h" -#include "psettelephony.h" -#include "psetpanic.h" -#include "mpsetrequestobs.h" -#include "psetutility.h" -#include "phonesettingslogger.h" -#include "psetsaobserver.h" +#include "PsetCallDiverting.h" +#include "PsetContainer.h" +#include "MPsetDivertObs.h" +#include "PsetTelephony.h" +#include "PSetPanic.h" +#include "MPsetRequestObs.h" +#include "PSetUtility.h" +#include "PhoneSettingsLogger.h" +#include "PsetSAObserver.h" // LOCAL CONSTANTS AND MACROS _LIT( KPSetIntNbr, "+" ); @@ -66,7 +67,6 @@ // CPSetCallDivertingBasicImpl::~CPSetCallDivertingBasicImpl() { - Cancel(); } // ----------------------------------------------------------------------------- @@ -105,7 +105,6 @@ User::Leave( KErrInUse ); } iBsc = aBsc; - iRequestedServiceGroup = aDivert.iServiceGroup; CPsetTelephony::CheckLineModeL( aDivert.iServiceGroup, &iPhone, iLine ); if ( !iLine->SubSessionHandle() ) @@ -204,10 +203,6 @@ __PHSLOGSTRING("[PHS]--> CPSetCallDivertingBasicImpl::RunL: EPSetChangeDivert" ); //Notify Observer iDivertStatus.iStatus = PSetUtility::GetChangeInfoStatus( iChangeInfo.iAction ); - iDivertStatus.iNumber = iChangeInfo.iNumber.iTelNumber; - iDivertStatus.iCondition = PSetUtility::GetDivertReason(iReason); - iDivertStatus.iNoReplyTimer = iChangeInfo.iTimeout; - iDivertStatus.iServiceGroup = iRequestedServiceGroup; // Check is done because of VOIP notification functionality(PSetNotesUI). if ( iVoiceDivert && !iVideoDivert ) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PSetCallDivertingCreator.cpp --- a/cellular/telephonysettings/src/PSetCallDivertingCreator.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PSetCallDivertingCreator.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,14 +18,14 @@ // INCLUDE FILES -#include "psetcalldivertingbasicimpl.h" -#include "psetcalldivertingdualaffectimpl.h" -#include "psetcalldivertingcreator.h" -#include "psetvariationproxy.h" +#include "PSetCallDivertingBasicImpl.h" +#include "PSetCallDivertingDualAffectImpl.h" +#include "PSetCallDivertingCreator.h" +#include "PsetVariationProxy.h" -#include +#include #include -#include // telephony service local variation keys. +#include // Telephony service local variation keys. #include diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PSetCallDivertingDualAffectImpl.cpp --- a/cellular/telephonysettings/src/PSetCallDivertingDualAffectImpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PSetCallDivertingDualAffectImpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,26 +17,27 @@ // INCLUDE FILES -#include "psetcalldivertingdualaffectimpl.h" -#include "psetsubscriberidcheck.h" +#include "PSetCallDivertingDualAffectImpl.h" +#include "PSetSubscriberIdCheck.h" #include #include #include +#include #include #include #include -#include +#include -#include "psetcalldiverting.h" -#include "psetcontainer.h" -#include "mpsetdivertobs.h" -#include "psettelephony.h" -#include "psetpanic.h" -#include "mpsetrequestobs.h" -#include "psetutility.h" -#include "phonesettingslogger.h" -#include "psetsaobserver.h" +#include "PsetCallDiverting.h" +#include "PsetContainer.h" +#include "MPsetDivertObs.h" +#include "PsetTelephony.h" +#include "PSetPanic.h" +#include "MPsetRequestObs.h" +#include "PSetUtility.h" +#include "PhoneSettingsLogger.h" +#include "PsetSAObserver.h" // LOCAL CONSTANTS AND MACROS _LIT( KPSetIntNbr, "+" ); diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PSetRefreshHandlerImpl.cpp --- a/cellular/telephonysettings/src/PSetRefreshHandlerImpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PSetRefreshHandlerImpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,12 +18,12 @@ // INCLUDE FILES -#include "psetrefreshhandlerimpl.h" +#include "PSetRefreshHandlerImpl.h" #include -#include +#include #include -#include -#include "phonesettingslogger.h" +#include +#include "PhoneSettingsLogger.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PSetSubscriberIdCheck.cpp --- a/cellular/telephonysettings/src/PSetSubscriberIdCheck.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PSetSubscriberIdCheck.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include "psetsubscriberidcheck.h" +#include "PSetSubscriberIdCheck.h" _LIT( KRogersImsi, "30272" ); const TInt KMinImsiLength = 5; diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PSetUtility.cpp --- a/cellular/telephonysettings/src/PSetUtility.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PSetUtility.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "psetutility.h" -#include -#include "phonesettingslogger.h" +#include "PSetUtility.h" +#include +#include "PhoneSettingsLogger.h" // ============================ MEMBER FUNCTIONS =============================== @@ -312,37 +312,6 @@ } // --------------------------------------------------------------------------- -// -// Returns divert reason -// -// --------------------------------------------------------------------------- -// -TCallDivertingCondition PSetUtility::GetDivertReason( - RMobilePhone::TMobilePhoneCFCondition aCondition ) - { - switch ( aCondition ) - { - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - case RMobilePhone::ECallForwardingAllConditionalCases: - return EDivertConditionAllConditionalCases; - case RMobilePhone::ECallForwardingAllCases: - return EDivertConditionAllCalls; - case RMobilePhone::ECallForwardingUnconditional: - return EDivertConditionUnconditional; - case RMobilePhone::ECallForwardingBusy: - return EDivertConditionBusy; - case RMobilePhone::ECallForwardingNoReply: - return EDivertConditionNoReply; - case RMobilePhone::ECallForwardingNotReachable: - default: - return EDivertConditionNotReachable; - } - } - -// --------------------------------------------------------------------------- // Verify that ALS is really used. // --------------------------------------------------------------------------- // diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetCSP.cpp --- a/cellular/telephonysettings/src/PsetCSP.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetCSP.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,9 +22,9 @@ //INCLUDE FILES -#include "psetcsp.h" +#include "PsetCSP.h" #include -#include "phonesettingslogger.h" +#include "PhoneSettingsLogger.h" // MEMBER FUNCTIONS // --------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetCallBarring.cpp --- a/cellular/telephonysettings/src/PsetCallBarring.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetCallBarring.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,14 +19,14 @@ // Include Files #include -#include -#include "mpsetrequestobs.h" -#include "psetcallbarring.h" -#include "psettelephony.h" -#include "psetpanic.h" -#include "psetconstants.h" -#include "psetutility.h" -#include "phonesettingslogger.h" +#include +#include "MPsetRequestObs.h" +#include "PsetCallBarring.h" +#include "PsetTelephony.h" +#include "PSetPanic.h" +#include "PsetConstants.h" +#include "PSetUtility.h" +#include "PhoneSettingsLogger.h" // CONSTANTS _LIT( KPSNameOfClass, "CPsetCallBarring" ); @@ -191,17 +191,17 @@ __PHSLOGSTRING1("[PHS] SetBarringL: Password: %S", &aBarring.iPassword); __PHSLOGSTRING1("[PHS] SetBarringL: Settings: %d", aBarring.iSetting); - ValidateBsc( aBsc ); - - if ( aBsc == EAltTele ) - { - iBarringParameters.iServiceGroup = PSetUtility::VerifyAltLineUseL(); - } - - iBarringParameters.iPassword = aBarring.iPassword; + ValidateBsc( aBsc ); + + if ( aBsc == EAltTele ) + { + iBarringParameters.iServiceGroup = PSetUtility::VerifyAltLineUseL(); + } + + iBarringParameters.iPassword = aBarring.iPassword; iBarringParameters.iAction = SetBarringAction( aBarring.iSetting ); iBarringParameters.iServiceGroup = PSetUtility::ChangeToEtelInternal( aBsc ); - + __PHSLOGSTRING1("[PHS] SetBarringL: Program: %d", aBarring.iType); // Start to request barring change. @@ -258,7 +258,7 @@ iObserver->SetEngineContact( this ); // Does not leave TRAPD( err, iObserver->HandleCBRequestingL( EFalse, ETrue ) ); - + if ( !IsActive() || err != KErrNone ) { return KErrGeneral; @@ -555,44 +555,44 @@ RMobilePhone::TMobilePhoneCBInfoEntryV1 cbInfo; TInt entries = cbStatusList->Enumerate(); __PHSLOGSTRING1("[PHS] HandleInquiryResultL: Entry count: %d", entries); - TInt i(0); - TInt cbArray(0); - // If alternate line in use then only als line service information is shown. + TInt i(0); + TInt cbArray(0); + // If alternate line in use then only als line service information is shown. if ( iAls == ESSSettingsAlsAlternate ) - { - while ( entries > i ) - { - cbInfo = cbStatusList->GetEntryL( i ); + { + while ( entries > i ) + { + cbInfo = cbStatusList->GetEntryL( i ); - if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup == RMobilePhone::EAuxVoiceService ) - { - __PHSLOGSTRING1("[PHS] ALS: iServiceGroup: %d", cbInfo.iServiceGroup); - status = EBarringStatusActive; - arrayOfBsc[cbArray] = static_cast - ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) ); - cbArray++; - } - i++; - } + if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup == RMobilePhone::EAuxVoiceService ) + { + __PHSLOGSTRING1("[PHS] ALS: iServiceGroup: %d", cbInfo.iServiceGroup); + status = EBarringStatusActive; + arrayOfBsc[cbArray] = static_cast + ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) ); + cbArray++; + } + i++; + } } - else // All other services than alternate line service is allowed to show when primary line is active. - { - while ( entries > i ) - { - cbInfo = cbStatusList->GetEntryL( i ); + else // All other services than alternate line service is allowed to show when primary line is active. + { + while ( entries > i ) + { + cbInfo = cbStatusList->GetEntryL( i ); - if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup != RMobilePhone::EAuxVoiceService ) - { - __PHSLOGSTRING1("[PHS] iServiceGroup: %d", cbInfo.iServiceGroup); - status = EBarringStatusActive; - arrayOfBsc[cbArray] = static_cast - ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) ); - cbArray++; - } - i++; - } - } - + if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup != RMobilePhone::EAuxVoiceService ) + { + __PHSLOGSTRING1("[PHS] iServiceGroup: %d", cbInfo.iServiceGroup); + status = EBarringStatusActive; + arrayOfBsc[cbArray] = static_cast + ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) ); + cbArray++; + } + i++; + } + } + arrayOfBsc[cbArray] = KPSetUnusedValue; CleanupStack::PopAndDestroy( cbStatusList ); iObserver->HandleBarringModeStatusL( arrayOfBsc, status ); diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetCallDiverting.cpp --- a/cellular/telephonysettings/src/PsetCallDiverting.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetCallDiverting.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,18 +22,20 @@ #include #include #include + +#include #include -#include +#include -#include "psetcalldiverting.h" -#include "psetcontainer.h" -#include "mpsetdivertobs.h" -#include "psettelephony.h" -#include "psetpanic.h" -#include "phonesettingslogger.h" +#include "PsetCallDiverting.h" +#include "PsetContainer.h" +#include "MPsetDivertObs.h" +#include "PsetTelephony.h" +#include "PSetPanic.h" +#include "PhoneSettingsLogger.h" -#include "psetcalldivertingcreator.h" -#include "mcalldiverting.h" +#include "PSetCallDivertingCreator.h" +#include "MCallDiverting.h" // MEMBER FUNCTIONS // --------------------------------------------------------------------------- @@ -259,16 +261,35 @@ EXPORT_C void CPsetCallDiverting::SetRequestObserver( MPsetRequestObserver* aObs ) { iReqObserver = aObs; - iDivert->SetRequestObserver(aObs); } // --------------------------------------------------------------------------- // Queries for voice mail box number // --------------------------------------------------------------------------- // -EXPORT_C void CPsetCallDiverting::VoiceMailQueryL( TDes& /*aTelNumber*/ ) +EXPORT_C void CPsetCallDiverting::VoiceMailQueryL( TDes& aTelNumber ) { __PHSLOGSTRING("[PHS]--> CPsetCallDiverting::VoiceMailQueryL" ); + RVmbxNumber vmbxConnection; + TBool vmbxNrChanged = ETrue; + TInt retValue = iDivert->OpenVmbxLC( aTelNumber, vmbxConnection ); + __PHSLOGSTRING1("[PHS] CPsetCallDiverting::VoiceMailQueryL: aTelNumber = %S", &aTelNumber ); + __PHSLOGSTRING1("[PHS] CPsetCallDiverting::VoiceMailQueryL: retValue = %d", retValue ); + + if ( retValue == KErrNotFound ) + { + vmbxNrChanged = vmbxConnection.QueryNumberL( EVmbxNotDefinedQuery, aTelNumber ); + } + else if ( retValue != KErrNone ) + { + //Problem with vmbx application, better leave. + User::Leave( retValue ); + } + if ( !vmbxNrChanged ) + { + User::Leave( KErrCancel ); + } + CleanupStack::PopAndDestroy(); // vmbxConnection __PHSLOGSTRING("[PHS] <--CPsetCallDiverting::VoiceMailQueryL" ); } @@ -277,9 +298,29 @@ // Queries for voice mail box number // --------------------------------------------------------------------------- // -EXPORT_C void CPsetCallDiverting::VideoMailQueryL( TDes& /*aTelNumber*/ ) +EXPORT_C void CPsetCallDiverting::VideoMailQueryL( TDes& aTelNumber ) { __PHSLOGSTRING("[PHS]--> CPsetCallDiverting::VideoMailQueryL" ); + RVmbxNumber vmbxConnection; + TBool vmbxNrChanged = ETrue; + TInt retValue = OpenVideoMailboxLC( aTelNumber, vmbxConnection ); + __PHSLOGSTRING1("[PHS] CPsetCallDiverting::VideoMailQueryL: aTelNumber = %S", &aTelNumber ); + __PHSLOGSTRING1("[PHS] CPsetCallDiverting::VideoMailQueryL: retValue = %d", retValue ); + + if ( retValue == KErrNotFound ) + { + vmbxNrChanged = vmbxConnection.QueryVideoMbxNumberL( EVmbxNotDefinedQuery, aTelNumber ); + } + else if ( retValue != KErrNone ) + { + //Problem with vmbx application, better leave. + User::Leave( retValue ); + } + if ( !vmbxNrChanged ) + { + User::Leave( KErrCancel ); + } + CleanupStack::PopAndDestroy(); // vmbxConnection __PHSLOGSTRING("[PHS] <--CPsetCallDiverting::VideoMailQueryL" ); } @@ -288,9 +329,13 @@ // Opens Vmbx. Leaves vmbx to the stack. // --------------------------------------------------------------------------- // -TInt CPsetCallDiverting::OpenVideoMailboxLC( TDes& /*aTelNumber*/, RVmbxNumber& /*aVmbx*/ ) +TInt CPsetCallDiverting::OpenVideoMailboxLC( TDes& aTelNumber, RVmbxNumber& aVmbx ) { - return 0; + __PHSLOGSTRING("[PHS]--> CPsetCallDiverting::OpenVideoMailboxLC" ); + User::LeaveIfError( aVmbx.Open( iPhone ) ); + CleanupClosePushL( aVmbx ); + __PHSLOGSTRING("[PHS]<-- CPsetCallDiverting::OpenVideoMailboxLC" ); + return aVmbx.GetVideoMbxNumber( aTelNumber ); } // End of File diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetCallWaiting.cpp --- a/cellular/telephonysettings/src/PsetCallWaiting.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetCallWaiting.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,17 +18,17 @@ // Include Files -#include "psetcallwaiting.h" -#include "mpsetcallwaitingobs.h" +#include "PsetCallWaiting.h" +#include "MPsetCallWaitingObs.h" #include "nwdefs.h" -#include "psetpanic.h" -#include "psetconstants.h" -#include "mpsetrequestobs.h" -#include "psetutility.h" -#include "phonesettingslogger.h" +#include "PSetPanic.h" +#include "PsetConstants.h" +#include "MPsetRequestObs.h" +#include "PSetUtility.h" +#include "PhoneSettingsLogger.h" -#include "psetvariationproxy.h" -#include +#include "PsetVariationProxy.h" +#include // CONSTANTS _LIT( KPSNameOfClass, "CPsetCallWaiting" ); @@ -107,14 +107,14 @@ Cancel(); iReqObserver = NULL; - if ( iSsSettings ) + if ( iSsSettings ) { iSsSettings->Cancel( ESSSettingsAls, *this ); iSsSettings->Close(); } delete iSsSettings; iSsSettings = NULL; - + delete iCwInterrogator; iCwInterrogator = NULL; } @@ -125,14 +125,14 @@ // // --------------------------------------------------------------------------- void CPsetCallWaiting::PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue ) - { - __PHSLOGSTRING("[PHS]--> PhoneSettingChanged::ValidateBsc" ); - if ( aSetting == ESSSettingsAls ) + { + __PHSLOGSTRING("[PHS]--> PhoneSettingChanged::ValidateBsc" ); + if ( aSetting == ESSSettingsAls ) { iAls = static_cast (aNewValue); } __PHSLOGSTRING("[PHS] <--PhoneSettingChanged::ValidateBsc" ); - } + } // --------------------------------------------------------------------------- // @@ -193,14 +193,14 @@ RMobilePhone::TMobileService cwBasicServiceGroup; - ValidateBsc( aBsc ); + ValidateBsc( aBsc ); if ( aBsc == EAltTele ) { cwBasicServiceGroup = PSetUtility::VerifyAltLineUseL(); } - cwBasicServiceGroup = PSetUtility::ChangeToEtelInternal( aBsc ); + cwBasicServiceGroup = PSetUtility::ChangeToEtelInternal( aBsc ); if ( aSetting == EActivateCallWaiting ) { @@ -272,8 +272,8 @@ // even though request is not active. iObserver->SetEngineContact( *this ); // Does not leave - TRAPD( err, iObserver->HandleCWRequestingL( EFalse, ETrue ) ); - + TRAPD( err, iObserver->HandleCWRequestingL( EFalse, ETrue ) ); + if ( !IsActive() || err != KErrNone ) { return KErrGeneral; @@ -347,25 +347,25 @@ // pass on the status if the current status is still // unknown and the received status is not unknown switch ( cwInfo.iStatus ) - { - case RMobilePhone::ECallWaitingStatusNotProvisioned: - { - status = EStatusNotProvisioned; - break; - } - - case RMobilePhone::ECallWaitingStatusNotAvailable: - { - status = EStatusNotAvailable; - break; - } - - default: - { - status = TGetCallWaitingStatus( cwInfo.iStatus ); - break; - } - } + { + case RMobilePhone::ECallWaitingStatusNotProvisioned: + { + status = EStatusNotProvisioned; + break; + } + + case RMobilePhone::ECallWaitingStatusNotAvailable: + { + status = EStatusNotAvailable; + break; + } + + default: + { + status = TGetCallWaitingStatus( cwInfo.iStatus ); + break; + } + } } arrayOfBsc[i] = static_cast diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetCli.cpp --- a/cellular/telephonysettings/src/PsetCli.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetCli.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ //INCLUDE FILES -#include "psetcli.h" -#include "psetpanic.h" -#include "psetconstants.h" -#include "mpsetrequestobs.h" +#include "PsetCli.h" +#include "PSetPanic.h" +#include "PsetConstants.h" +#include "MPsetRequestObs.h" #include #include diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetContainer.cpp --- a/cellular/telephonysettings/src/PsetContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,9 +20,9 @@ // INCLUDES -#include "psetcontainer.h" -#include "psetconstants.h" -#include "psetrefreshhandlerimpl.h" +#include "PsetContainer.h" +#include "PsetConstants.h" +#include "PSetRefreshHandlerImpl.h" #include // --------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetNetwork.cpp --- a/cellular/telephonysettings/src/PsetNetwork.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetNetwork.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,18 +18,20 @@ // INCLUDE FILES -#include "mpsetnetworkinfoobs.h" -#include "psetnetwork.h" -#include "psetsaobserver.h" -#include "psetpanic.h" -#include "psetconstants.h" -#include "mpsetnetworkselect.h" +#include "CNetworkResetHandler.h" +#include "MPsetNetworkInfoObs.h" +#include "MPsetNetworkSelect.h" +#include "PsetNetwork.h" +#include "PsetSAObserver.h" +#include "PSetPanic.h" +#include "PsetConstants.h" +#include "PhoneSettingsLogger.h" + #include #include #include #include -#include "phonesettingslogger.h" // LOCAL CONSTANTS AND MACROS _LIT( KPSNameOfClass, "CPsetNetwork" ); @@ -89,7 +91,9 @@ delete iNetworkRetrieve; iNetworkRetrieve = NULL; delete iSAObserver; - iSAObserver = NULL; + iSAObserver = NULL; + delete iResetNetworkSearch; + iResetNetworkSearch = NULL; } // --------------------------------------------------------------------------- @@ -145,10 +149,6 @@ // EXPORT_C TInt CPsetNetwork::GetNetworkSelectMode( TSelectMode& aMode ) { - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ RMobilePhone::TMobilePhoneNetworkSelectionV1 setMode; RMobilePhone::TMobilePhoneNetworkSelectionV1Pckg setModePckg( setMode ); @@ -194,10 +194,6 @@ } iTempNetInfo = aInfo; - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ if ( aInfo.iMode == ENetSelectModeManual ) { //Copy data to member variables and make a request. @@ -273,12 +269,12 @@ // resulting in a possible dead lock when CActive::Cancel()'s User::WaitForRequest( iStatus ) never gets signaled. ClearParams(); - if ( iActiveObserver == ENetSelectObserver && iObserver ) + if ( iActiveObserver == ENetSelectObserver ) { __ASSERT_ALWAYS( iObserver, Panic( KPSNameOfClass, ENetNoObserver ) ); HideRequestNoteL(); } - else if ( iActiveObserver == ENetModeObserver && iNetworkModeObserver ) + else if ( iActiveObserver == ENetModeObserver ) { __ASSERT_ALWAYS( iNetworkModeObserver, Panic( KPSNameOfClass, ENetNoNetworkObserver ) ); @@ -319,10 +315,7 @@ TInt amount = results->Enumerate(); __PHSLOGSTRING1("[PHS] CPsetNetwork::RunL: amount: %d", amount); TInt i = 0; - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ + RMobilePhone::TMobilePhoneNetworkInfoV2 nwNames; while ( amount > i ) { @@ -332,9 +325,6 @@ iTempNetInfo.iId.iNetworkCode.Copy( nwNames.iNetworkId ); __PHSLOGSTRING1("[PHS] CPsetNetwork::RunL: NetworkCode: %S", &iTempNetInfo.iId.iNetworkCode); - - iTempNetInfo.iStatus = (MPsetNetworkSelect::TNetworkStatus)nwNames.iStatus; - __PHSLOGSTRING1("[PHS] CPsetNetwork::RunL: Status: %d", &iTempNetInfo.iStatus); iTempNetInfo.iLongName.Copy( nwNames.iLongName ); __PHSLOGSTRING1("[PHS] CPsetNetwork::RunL: LongName: %S", &iTempNetInfo.iLongName); @@ -346,14 +336,16 @@ { iTempNetInfo.iAccess = ENetNetworkWCDMA; } - else if ( nwNames.iAccess == RMobilePhone::ENetworkAccessGsmAndUtran ) - { - iTempNetInfo.iAccess = ENetNetworkGSMandWCDMA; - } else { iTempNetInfo.iAccess = ENetNetworkGSM; } + + /** Implementation of forbidden operator icon begins */ + // Set network status for displaying forbidden operator icon + iTempNetInfo.iStatus = static_cast( nwNames.iStatus ); + /** Implementation of forbidden operator icon ends */ + array->AppendL( iTempNetInfo ); i++; } @@ -481,15 +473,13 @@ { iObserver = &aObserver; iActiveObserver = ENetSelectObserver; - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ + iRegStatus = RMobilePhone::ERegistrationUnknown; User::LeaveIfError( iCustomPhone.Open( iPhone ) ); iSAObserver = CPsetSAObserver::NewL(); CActiveScheduler::Add( this ); + iResetNetworkSearch = CNetworkResetHandler::NewL( iPhone ); } // --------------------------------------------------------------------------- @@ -502,13 +492,11 @@ { iNetworkModeObserver = &aModeObserver; iActiveObserver = ENetModeObserver; - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ + User::LeaveIfError( iCustomPhone.Open( iPhone ) ); CActiveScheduler::Add( this ); + iResetNetworkSearch = CNetworkResetHandler::NewL( iPhone ); } // --------------------------------------------------------------------------- @@ -569,15 +557,11 @@ EXPORT_C TInt CPsetNetwork::ResetNetworkSearch() { __PHSLOGSTRING("[PHS]--> CPsetNetwork::ResetNetworkSearch"); - RMmCustomAPI customApi; - TInt error = customApi.Open( iPhone ); - if (error == KErrNone) - { - customApi.ResetNetServer(); - } - customApi.Close(); - - __PHSLOGSTRING("[PHS] <--CPsetNetwork::ResetNetworkSearch"); + + TInt error = iResetNetworkSearch->ResetNetworkSearch(); + + __PHSLOGSTRING1("[PHS] <--CPsetNetwork::ResetNetworkSearch: error: %d", error); + //for compatibility reasons returns a value return error; } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetSAObserver.cpp --- a/cellular/telephonysettings/src/PsetSAObserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetSAObserver.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,15 +20,15 @@ // INCLUDE FILES #include #include -#include // telephony service local variation keys. +#include // Telephony service local variation keys. #include -#include "psetsaobserver.h" -#include "mpsetnetworkinfoobs.h" -#include "mpsetdivertobs.h" -#include "phonesettingslogger.h" -#include "psetutility.h" -#include "psetvariationproxy.h" +#include "PsetSAObserver.h" +#include "MPsetNetworkInfoObs.h" +#include "MPsetDivertObs.h" +#include "PhoneSettingsLogger.h" +#include "PSetUtility.h" +#include "PsetVariationProxy.h" //CONSTANTS const TInt KPsetRequesterUncertain = 0; @@ -116,7 +116,7 @@ __PHSLOGSTRING("[PHS]--> CPsetSAObserver::IsGPRSConnected" ); TInt connectionStatus = KErrGeneral; - TInt error = RProperty::Get( KUidSystemCategory, + TInt error = RProperty::Get( KUidSystemCategory, KPSUidGprsStatusValue, connectionStatus ); @@ -305,7 +305,7 @@ TInt package = aDivertNotify.iPreviousCfStatus; TPckg indicatorPckg( package ); TInt error = iRepository->Set( KCtsyUnconditionalCFStatus, indicatorPckg ); - __PHSLOGSTRING("[PHS]<-- CPsetSAObserver::NotifyDivertChange" ); + __PHSLOGSTRING("[PHS]<-- CPsetSAObserver::NotifyDivertChange" ); } // --------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetTelephony.cpp --- a/cellular/telephonysettings/src/PsetTelephony.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetTelephony.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,9 @@ #include #include #include -#include "psetconstants.h" -#include "psettelephony.h" -#include "phonesettingslogger.h" +#include "PsetConstants.h" +#include "PsetTelephony.h" +#include "PhoneSettingsLogger.h" // MEMBER FUNCTIONS // --------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/src/PsetVariationProxy.cpp --- a/cellular/telephonysettings/src/PsetVariationProxy.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/src/PsetVariationProxy.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ */ -#include "psetvariationproxy.h" +#include "PsetVariationProxy.h" #include -#include +#include #include // --------------------------------------------------------------------------- @@ -27,16 +27,16 @@ // --------------------------------------------------------------------------- // CPSetVariationProxy::CPSetVariationProxy() - { - } + { + } // --------------------------------------------------------------------------- // Destructor // --------------------------------------------------------------------------- // CPSetVariationProxy::~CPSetVariationProxy() - { - } + { + } // --------------------------------------------------------------------------- // NewL @@ -45,13 +45,13 @@ CPSetVariationProxy* CPSetVariationProxy::NewL( const TUid& aUid, const TUint aId ) - { - CPSetVariationProxy* self = new ( ELeave ) CPSetVariationProxy(); + { + CPSetVariationProxy* self = new ( ELeave ) CPSetVariationProxy(); CleanupStack::PushL( self ); self->ConstructL( aUid, aId ); CleanupStack::Pop( self ); return self; - } + } // --------------------------------------------------------------------------- // ConstructL @@ -60,29 +60,29 @@ void CPSetVariationProxy::ConstructL( const TUid& aUid, const TUint aId ) - { - TInt keySetting = 0; - CRepository* centralRepository = CRepository::NewLC( aUid ); - User::LeaveIfError( centralRepository->Get( aId, keySetting ) ); - - if( ( aUid == KCRUidPhoneSettings ) && + { + TInt keySetting = 0; + CRepository* centralRepository = CRepository::NewLC( aUid ); + User::LeaveIfError( centralRepository->Get( aId, keySetting ) ); + + if( ( aUid == KCRUidPhoneSettings ) && ( keySetting ) ) - { - iFeature |= KCallWaitingDistiquishNotProvisioned; - } - else if ( aUid == KCRUidTelSrvVariation ) - { - iFeature |= keySetting; - } - - CleanupStack::PopAndDestroy( centralRepository ); - } + { + iFeature |= KCallWaitingDistiquishNotProvisioned; + } + else if ( aUid == KCRUidTelSrvVariation ) + { + iFeature |= keySetting; + } + + CleanupStack::PopAndDestroy( centralRepository ); + } // --------------------------------------------------------------------------- // IsFeatureEnabled // --------------------------------------------------------------------------- // TBool CPSetVariationProxy::IsFeatureEnabled( TUint aFeature ) const - { - return aFeature&iFeature; - } + { + return aFeature&iFeature; + } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCallDivertingObserver.h --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCallDivertingObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCallDivertingObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define PHONESETTINGSTESTCALLDIVERTINGGOBSERVER_H #include -#include +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCallWaitingObserver.h --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCallWaitingObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCallWaitingObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define PHONESETTINGSTESTCALLWAITINGGOBSERVER_H #include -#include +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCliObserver.h --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCliObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestCliObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define PHONESETTINGSTESTCLIOBSERVER_H #include -#include +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestNetworkInfoObserver.h --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestNetworkInfoObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestNetworkInfoObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define PHONESETTINGSTESTNETWORKINFOOBSERVER_H #include -#include +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestNetworkModeObserver.h --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestNetworkModeObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestNetworkModeObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define PHONESETTINGSTESTNETWORKMODEOBSERVER_H #include -#include +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestParser.h --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -25,10 +25,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "PhoneSettingsTest.hrh" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestPsetRequestObserver.h --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestPsetRequestObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestPsetRequestObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define PHONESETTINGSTESTPSETREQUESTOBSERVER_H #include -#include +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestRefreshHandler.h --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestRefreshHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/inc/PhoneSettingsTestRefreshHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define PHONESETTINGSTESTREFRESHHANDLER_H #include -#include +#include #include "PhoneSettingsTestParser.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestCSP.cpp --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestCSP.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestCSP.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "PhoneSettingsTest.hrh" #include "PhoneSettingsTest.h" #include "MPhoneSettingsTestMessageHandler.h" diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetwork.cpp --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetwork.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetwork.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -32,7 +32,7 @@ #include "PhoneSettingsTestPsetRequestObserver.h" #include "PhoneSettingsTestNetworkInfoObserver.h" #include "PhoneSettingsTestNetworkModeObserver.h" -#include "psetsaobserver.h" +#include "PsetSAObserver.h" #include "PhoneSettingsTestNetwork.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetworkInfoObserver.cpp --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetworkInfoObserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetworkInfoObserver.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include +#include #include "PhoneSettingsTestNetworkInfoObserver.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetworkModeObserver.cpp --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetworkModeObserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestNetworkModeObserver.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include +#include #include "PhoneSettingsTestNetworkModeObserver.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestParser.cpp --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include #include -#include +#include #include "MPhoneSettingsTestMessageHandler.h" #include "PhoneSettingsTestParser.h" diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestSAObserver.cpp --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestSAObserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestSAObserver.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "PhoneSettingsTest.hrh" #include "MPhoneSettingsTestMessageHandler.h" #include "PhoneSettingsTestUtilities.h" diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestUtilities.cpp --- a/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestUtilities.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/cellular/telephonysettings/tsrc/public/basic/PhoneSettingsTest/src/PhoneSettingsTestUtilities.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include #include -#include "psetconstants.h" +#include "PSetConstants.h" #include "PhoneSettingsTestUtilities.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/bwins/psetwrapperu.def --- a/cellular/telephonysettings/xqbindings/psetwrapper/bwins/psetwrapperu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -EXPORTS - ?trUtf8@PSetCallBarringWrapper@@SA?AVQString@@PBD0H@Z @ 1 NONAME ; class QString PSetCallBarringWrapper::trUtf8(char const *, char const *, int) - ?getAvailableNetworks@PSetNetworkWrapper@@QAEXXZ @ 2 NONAME ; void PSetNetworkWrapper::getAvailableNetworks(void) - ?staticMetaObject@PSetCallWaitingWrapper@@2UQMetaObject@@B @ 3 NONAME ; struct QMetaObject const PSetCallWaitingWrapper::staticMetaObject - ?disableBarringRequestCompleted@PSetCallBarringWrapper@@IAEXHW4BarringType@1@W4BarringStatus@1@_N@Z @ 4 NONAME ; void PSetCallBarringWrapper::disableBarringRequestCompleted(int, enum PSetCallBarringWrapper::BarringType, enum PSetCallBarringWrapper::BarringStatus, bool) - ??_EPSetWrapper@@UAE@I@Z @ 5 NONAME ; PSetWrapper::~PSetWrapper(unsigned int) - ?trUtf8@PSetCallWaitingWrapper@@SA?AVQString@@PBD0@Z @ 6 NONAME ; class QString PSetCallWaitingWrapper::trUtf8(char const *, char const *) - ?validateDivertNumber@PSetCallDivertingWrapper@@ABEHABVTDesC16@@@Z @ 7 NONAME ; int PSetCallDivertingWrapper::validateDivertNumber(class TDesC16 const &) const - ?qt_metacast@PSetNetworkWrapper@@UAEPAXPBD@Z @ 8 NONAME ; void * PSetNetworkWrapper::qt_metacast(char const *) - ?isManualNetworkSelectionSupported@PSetNetworkWrapper@@QBE_NXZ @ 9 NONAME ; bool PSetNetworkWrapper::isManualNetworkSelectionSupported(void) const - ?callDivertingWrapper@PSetWrapper@@QAEAAVPSetCallDivertingWrapper@@XZ @ 10 NONAME ; class PSetCallDivertingWrapper & PSetWrapper::callDivertingWrapper(void) - ?cliInformation@PSetCliWrapper@@IAEXABW4PsCallLineIdentity@@@Z @ 11 NONAME ; void PSetCliWrapper::cliInformation(enum PsCallLineIdentity const &) - ?handleDivertingError@PSetCallDivertingWrapper@@IAEXH@Z @ 12 NONAME ; void PSetCallDivertingWrapper::handleDivertingError(int) - ?cancelRequest@PSetNetworkWrapper@@QAEXXZ @ 13 NONAME ; void PSetNetworkWrapper::cancelRequest(void) - ?qt_metacast@PSetCallBarringWrapper@@UAEPAXPBD@Z @ 14 NONAME ; void * PSetCallBarringWrapper::qt_metacast(char const *) - ?staticMetaObject@PSetCallBarringWrapper@@2UQMetaObject@@B @ 15 NONAME ; struct QMetaObject const PSetCallBarringWrapper::staticMetaObject - ??0PSetCallDivertingWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 16 NONAME ; PSetCallDivertingWrapper::PSetCallDivertingWrapper(class CPsetContainer &, class QObject *) - ?metaObject@PSetCliWrapper@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * PSetCliWrapper::metaObject(void) const - ?tr@PSetCallWaitingWrapper@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString PSetCallWaitingWrapper::tr(char const *, char const *) - ?getNetworkAccessMode@PSetNetworkWrapper@@QBEXXZ @ 19 NONAME ; void PSetNetworkWrapper::getNetworkAccessMode(void) const - ?callWaitingWrapper@PSetWrapper@@QAEAAVPSetCallWaitingWrapper@@XZ @ 20 NONAME ; class PSetCallWaitingWrapper & PSetWrapper::callWaitingWrapper(void) - ?handleCnapStatus@PSetCliWrapper@@IAEXH@Z @ 21 NONAME ; void PSetCliWrapper::handleCnapStatus(int) - ?availableNetworksGot@PSetNetworkWrapper@@IAEXAAV?$QList@PAUNetworkInfo@PSetNetworkWrapper@@@@@Z @ 22 NONAME ; void PSetNetworkWrapper::availableNetworksGot(class QList &) - ?handleCallWaitingChanged@PSetCallWaitingWrapper@@IAEXW4PsCallWaitingCommand@1@H@Z @ 23 NONAME ; void PSetCallWaitingWrapper::handleCallWaitingChanged(enum PSetCallWaitingWrapper::PsCallWaitingCommand, int) - ?metaObject@PSetCallDivertingWrapper@@UBEPBUQMetaObject@@XZ @ 24 NONAME ; struct QMetaObject const * PSetCallDivertingWrapper::metaObject(void) const - ?cancelProcess@PSetCallDivertingWrapper@@QAEXXZ @ 25 NONAME ; void PSetCallDivertingWrapper::cancelProcess(void) - ?getCPsetCallDiverting@PSetCallDivertingWrapper@@QBEAAVCPsetCallDiverting@@XZ @ 26 NONAME ; class CPsetCallDiverting & PSetCallDivertingWrapper::getCPsetCallDiverting(void) const - ?trUtf8@PSetCallWaitingWrapper@@SA?AVQString@@PBD0H@Z @ 27 NONAME ; class QString PSetCallWaitingWrapper::trUtf8(char const *, char const *, int) - ?networkChanged@PSetNetworkWrapper@@IAEXAAUNetworkInfo@1@AAW4RegistrationStatus@1@@Z @ 28 NONAME ; void PSetNetworkWrapper::networkChanged(struct PSetNetworkWrapper::NetworkInfo &, enum PSetNetworkWrapper::RegistrationStatus &) - ?trUtf8@PSetCallDivertingWrapper@@SA?AVQString@@PBD0H@Z @ 29 NONAME ; class QString PSetCallDivertingWrapper::trUtf8(char const *, char const *, int) - ?qt_metacast@PSetCliWrapper@@UAEPAXPBD@Z @ 30 NONAME ; void * PSetCliWrapper::qt_metacast(char const *) - ?callBarringWrapper@PSetWrapper@@QAEAAVPSetCallBarringWrapper@@XZ @ 31 NONAME ; class PSetCallBarringWrapper & PSetWrapper::callBarringWrapper(void) - ?tr@PSetCallBarringWrapper@@SA?AVQString@@PBD0H@Z @ 32 NONAME ; class QString PSetCallBarringWrapper::tr(char const *, char const *, int) - ?networkAccessModeGot@PSetNetworkWrapper@@IAEXH@Z @ 33 NONAME ; void PSetNetworkWrapper::networkAccessModeGot(int) - ??_EPSetCallBarringWrapper@@UAE@I@Z @ 34 NONAME ; PSetCallBarringWrapper::~PSetCallBarringWrapper(unsigned int) - ?trUtf8@PSetNetworkWrapper@@SA?AVQString@@PBD0@Z @ 35 NONAME ; class QString PSetNetworkWrapper::trUtf8(char const *, char const *) - ?getClirMode@PSetCliWrapper@@QAEXXZ @ 36 NONAME ; void PSetCliWrapper::getClirMode(void) - ?qt_metacall@PSetWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 37 NONAME ; int PSetWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?trUtf8@PSetNetworkWrapper@@SA?AVQString@@PBD0H@Z @ 38 NONAME ; class QString PSetNetworkWrapper::trUtf8(char const *, char const *, int) - ?trUtf8@PSetCallDivertingWrapper@@SA?AVQString@@PBD0@Z @ 39 NONAME ; class QString PSetCallDivertingWrapper::trUtf8(char const *, char const *) - ?tr@PSetCallDivertingWrapper@@SA?AVQString@@PBD0H@Z @ 40 NONAME ; class QString PSetCallDivertingWrapper::tr(char const *, char const *, int) - ?handleCallWaitingError@PSetCallWaitingWrapper@@IAEXH@Z @ 41 NONAME ; void PSetCallWaitingWrapper::handleCallWaitingError(int) - ?getStaticMetaObject@PSetCallWaitingWrapper@@SAABUQMetaObject@@XZ @ 42 NONAME ; struct QMetaObject const & PSetCallWaitingWrapper::getStaticMetaObject(void) - ?disableBarring@PSetCallBarringWrapper@@QAEXV?$QFlags@W4PsService@@@@W4BarringType@1@VQString@@@Z @ 43 NONAME ; void PSetCallBarringWrapper::disableBarring(class QFlags, enum PSetCallBarringWrapper::BarringType, class QString) - ?tr@PSetWrapper@@SA?AVQString@@PBD0@Z @ 44 NONAME ; class QString PSetWrapper::tr(char const *, char const *) - ??1PSetCliWrapper@@UAE@XZ @ 45 NONAME ; PSetCliWrapper::~PSetCliWrapper(void) - ?getColrMode@PSetCliWrapper@@QAEXXZ @ 46 NONAME ; void PSetCliWrapper::getColrMode(void) - ?qt_metacall@PSetCliWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 47 NONAME ; int PSetCliWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?handleCallWaitingRequesting@PSetCallWaitingWrapper@@IAEX_N0@Z @ 48 NONAME ; void PSetCallWaitingWrapper::handleCallWaitingRequesting(bool, bool) - ?trUtf8@PSetCallBarringWrapper@@SA?AVQString@@PBD0@Z @ 49 NONAME ; class QString PSetCallBarringWrapper::trUtf8(char const *, char const *) - ?barringStatus@PSetCallBarringWrapper@@QAEXV?$QFlags@W4PsService@@@@W4BarringType@1@@Z @ 50 NONAME ; void PSetCallBarringWrapper::barringStatus(class QFlags, enum PSetCallBarringWrapper::BarringType) - ??1PSetWrapper@@UAE@XZ @ 51 NONAME ; PSetWrapper::~PSetWrapper(void) - ?cancelProcess@PSetCallWaitingWrapper@@QAEXXZ @ 52 NONAME ; void PSetCallWaitingWrapper::cancelProcess(void) - ?findPlus@PSetCallDivertingWrapper@@ABE_NABVTDesC16@@@Z @ 53 NONAME ; bool PSetCallDivertingWrapper::findPlus(class TDesC16 const &) const - ??_EPSetCallDivertingWrapper@@UAE@I@Z @ 54 NONAME ; PSetCallDivertingWrapper::~PSetCallDivertingWrapper(unsigned int) - ?setCallWaiting@PSetCallWaitingWrapper@@QAEXW4PsCallWaitingCommand@1@H@Z @ 55 NONAME ; void PSetCallWaitingWrapper::setCallWaiting(enum PSetCallWaitingWrapper::PsCallWaitingCommand, int) - ??_EPSetCliWrapper@@UAE@I@Z @ 56 NONAME ; PSetCliWrapper::~PSetCliWrapper(unsigned int) - ?tr@PSetCallBarringWrapper@@SA?AVQString@@PBD0@Z @ 57 NONAME ; class QString PSetCallBarringWrapper::tr(char const *, char const *) - ?trUtf8@PSetCliWrapper@@SA?AVQString@@PBD0H@Z @ 58 NONAME ; class QString PSetCliWrapper::trUtf8(char const *, char const *, int) - ?handleCallWaitingGetStatus@PSetCallWaitingWrapper@@IAEXW4PsCallWaitingStatus@1@ABV?$QList@E@@@Z @ 59 NONAME ; void PSetCallWaitingWrapper::handleCallWaitingGetStatus(enum PSetCallWaitingWrapper::PsCallWaitingStatus, class QList const &) - ?requestDone@PSetCallDivertingWrapper@@IAEXXZ @ 60 NONAME ; void PSetCallDivertingWrapper::requestDone(void) - ?qt_metacast@PSetWrapper@@UAEPAXPBD@Z @ 61 NONAME ; void * PSetWrapper::qt_metacast(char const *) - ?tr@PSetCliWrapper@@SA?AVQString@@PBD0H@Z @ 62 NONAME ; class QString PSetCliWrapper::tr(char const *, char const *, int) - ?tr@PSetNetworkWrapper@@SA?AVQString@@PBD0H@Z @ 63 NONAME ; class QString PSetNetworkWrapper::tr(char const *, char const *, int) - ?qt_metacast@PSetCallWaitingWrapper@@UAEPAXPBD@Z @ 64 NONAME ; void * PSetCallWaitingWrapper::qt_metacast(char const *) - ?tr@PSetCallWaitingWrapper@@SA?AVQString@@PBD0H@Z @ 65 NONAME ; class QString PSetCallWaitingWrapper::tr(char const *, char const *, int) - ?getStaticMetaObject@PSetNetworkWrapper@@SAABUQMetaObject@@XZ @ 66 NONAME ; struct QMetaObject const & PSetNetworkWrapper::getStaticMetaObject(void) - ?trUtf8@PSetWrapper@@SA?AVQString@@PBD0@Z @ 67 NONAME ; class QString PSetWrapper::trUtf8(char const *, char const *) - ?getStaticMetaObject@PSetWrapper@@SAABUQMetaObject@@XZ @ 68 NONAME ; struct QMetaObject const & PSetWrapper::getStaticMetaObject(void) - ?staticMetaObject@PSetWrapper@@2UQMetaObject@@B @ 69 NONAME ; struct QMetaObject const PSetWrapper::staticMetaObject - ?metaObject@PSetWrapper@@UBEPBUQMetaObject@@XZ @ 70 NONAME ; struct QMetaObject const * PSetWrapper::metaObject(void) const - ?getDefaultNumbers@PSetCallDivertingWrapper@@QAEXAAVQStringList@@@Z @ 71 NONAME ; void PSetCallDivertingWrapper::getDefaultNumbers(class QStringList &) - ?getCallWaitingStatus@PSetCallWaitingWrapper@@QAEXXZ @ 72 NONAME ; void PSetCallWaitingWrapper::getCallWaitingStatus(void) - ?tr@PSetCliWrapper@@SA?AVQString@@PBD0@Z @ 73 NONAME ; class QString PSetCliWrapper::tr(char const *, char const *) - ?staticMetaObject@PSetCliWrapper@@2UQMetaObject@@B @ 74 NONAME ; struct QMetaObject const PSetCliWrapper::staticMetaObject - ?tr@PSetWrapper@@SA?AVQString@@PBD0H@Z @ 75 NONAME ; class QString PSetWrapper::tr(char const *, char const *, int) - ?getClipMode@PSetCliWrapper@@QAEXXZ @ 76 NONAME ; void PSetCliWrapper::getClipMode(void) - ??1PSetCallWaitingWrapper@@UAE@XZ @ 77 NONAME ; PSetCallWaitingWrapper::~PSetCallWaitingWrapper(void) - ?qt_metacast@PSetCallDivertingWrapper@@UAEPAXPBD@Z @ 78 NONAME ; void * PSetCallDivertingWrapper::qt_metacast(char const *) - ?barringPasswordChangeRequestCompleted@PSetCallBarringWrapper@@IAEXH@Z @ 79 NONAME ; void PSetCallBarringWrapper::barringPasswordChangeRequestCompleted(int) - ?networkWrapper@PSetWrapper@@QAEAAVPSetNetworkWrapper@@XZ @ 80 NONAME ; class PSetNetworkWrapper & PSetWrapper::networkWrapper(void) - ?getColpMode@PSetCliWrapper@@QAEXXZ @ 81 NONAME ; void PSetCliWrapper::getColpMode(void) - ?metaObject@PSetCallBarringWrapper@@UBEPBUQMetaObject@@XZ @ 82 NONAME ; struct QMetaObject const * PSetCallBarringWrapper::metaObject(void) const - ?requestingSelectedNetwork@PSetNetworkWrapper@@IAEX_N@Z @ 83 NONAME ; void PSetNetworkWrapper::requestingSelectedNetwork(bool) - ?queryVoiceMailBoxNumber@PSetCallDivertingWrapper@@QAEHAAVQString@@W4PsService@@@Z @ 84 NONAME ; int PSetCallDivertingWrapper::queryVoiceMailBoxNumber(class QString &, enum PsService) - ?qt_metacall@PSetNetworkWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 85 NONAME ; int PSetNetworkWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?handleDivertingChanged@PSetCallDivertingWrapper@@IAEXABVPSCallDivertingCommand@@_N@Z @ 86 NONAME ; void PSetCallDivertingWrapper::handleDivertingChanged(class PSCallDivertingCommand const &, bool) - ?cliWrapper@PSetWrapper@@QAEAAVPSetCliWrapper@@XZ @ 87 NONAME ; class PSetCliWrapper & PSetWrapper::cliWrapper(void) - ?handleCliStatus@PSetCliWrapper@@IAEXPAEHABW4PsCallLineIdentity@@@Z @ 88 NONAME ; void PSetCliWrapper::handleCliStatus(unsigned char *, int, enum PsCallLineIdentity const &) - ?getStaticMetaObject@PSetCallBarringWrapper@@SAABUQMetaObject@@XZ @ 89 NONAME ; struct QMetaObject const & PSetCallBarringWrapper::getStaticMetaObject(void) - ?qt_metacall@PSetCallDivertingWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 90 NONAME ; int PSetCallDivertingWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?changeBarringPassword@PSetCallBarringWrapper@@QAEXABVQString@@00@Z @ 91 NONAME ; void PSetCallBarringWrapper::changeBarringPassword(class QString const &, class QString const &, class QString const &) - ?getNetworkSelectionMode@PSetNetworkWrapper@@QBE?AW4ErrorCode@1@AAW4NetworkSelectionMode@1@@Z @ 92 NONAME ; enum PSetNetworkWrapper::ErrorCode PSetNetworkWrapper::getNetworkSelectionMode(enum PSetNetworkWrapper::NetworkSelectionMode &) const - ?getVoiceMailBoxNumber@PSetCallDivertingWrapper@@QAEHAAVQString@@W4PsService@@@Z @ 93 NONAME ; int PSetCallDivertingWrapper::getVoiceMailBoxNumber(class QString &, enum PsService) - ?tr@PSetNetworkWrapper@@SA?AVQString@@PBD0@Z @ 94 NONAME ; class QString PSetNetworkWrapper::tr(char const *, char const *) - ?staticMetaObject@PSetCallDivertingWrapper@@2UQMetaObject@@B @ 95 NONAME ; struct QMetaObject const PSetCallDivertingWrapper::staticMetaObject - ??0PSetCliWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 96 NONAME ; PSetCliWrapper::PSetCliWrapper(class CPsetContainer &, class QObject *) - ?trUtf8@PSetCliWrapper@@SA?AVQString@@PBD0@Z @ 97 NONAME ; class QString PSetCliWrapper::trUtf8(char const *, char const *) - ??0PSetNetworkWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 98 NONAME ; PSetNetworkWrapper::PSetNetworkWrapper(class CPsetContainer &, class QObject *) - ?qt_metacall@PSetCallWaitingWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 99 NONAME ; int PSetCallWaitingWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?searchingNetworks@PSetNetworkWrapper@@IAEXAAW4RequestType@1@@Z @ 100 NONAME ; void PSetNetworkWrapper::searchingNetworks(enum PSetNetworkWrapper::RequestType &) - ?getStaticMetaObject@PSetCliWrapper@@SAABUQMetaObject@@XZ @ 101 NONAME ; struct QMetaObject const & PSetCliWrapper::getStaticMetaObject(void) - ?handleDivertingStatus@PSetCallDivertingWrapper@@IAEXAAV?$QList@PAVPSCallDivertingStatus@@@@_N@Z @ 102 NONAME ; void PSetCallDivertingWrapper::handleDivertingStatus(class QList &, bool) - ??1PSetCallDivertingWrapper@@UAE@XZ @ 103 NONAME ; PSetCallDivertingWrapper::~PSetCallDivertingWrapper(void) - ?selectNetwork@PSetNetworkWrapper@@QAEXABUNetworkInfo@1@@Z @ 104 NONAME ; void PSetNetworkWrapper::selectNetwork(struct PSetNetworkWrapper::NetworkInfo const &) - ?handleCliRequesting@PSetCliWrapper@@IAEX_N0@Z @ 105 NONAME ; void PSetCliWrapper::handleCliRequesting(bool, bool) - ?enableBarringRequestCompleted@PSetCallBarringWrapper@@IAEXHW4BarringType@1@W4BarringStatus@1@_N@Z @ 106 NONAME ; void PSetCallBarringWrapper::enableBarringRequestCompleted(int, enum PSetCallBarringWrapper::BarringType, enum PSetCallBarringWrapper::BarringStatus, bool) - ?metaObject@PSetCallWaitingWrapper@@UBEPBUQMetaObject@@XZ @ 107 NONAME ; struct QMetaObject const * PSetCallWaitingWrapper::metaObject(void) const - ?trUtf8@PSetWrapper@@SA?AVQString@@PBD0H@Z @ 108 NONAME ; class QString PSetWrapper::trUtf8(char const *, char const *, int) - ?getCallDivertingStatus@PSetCallDivertingWrapper@@QAEXV?$QFlags@W4PsService@@@@W4PsCallDivertingCondition@@H@Z @ 109 NONAME ; void PSetCallDivertingWrapper::getCallDivertingStatus(class QFlags, enum PsCallDivertingCondition, int) - ?setCallDiverting@PSetCallDivertingWrapper@@QAEHAAVPSCallDivertingCommand@@H@Z @ 110 NONAME ; int PSetCallDivertingWrapper::setCallDiverting(class PSCallDivertingCommand &, int) - ?setNetworkAccessMode@PSetNetworkWrapper@@QAEXW4NetworkAccessMode@1@@Z @ 111 NONAME ; void PSetNetworkWrapper::setNetworkAccessMode(enum PSetNetworkWrapper::NetworkAccessMode) - ??0PSetWrapper@@QAE@PAVQObject@@@Z @ 112 NONAME ; PSetWrapper::PSetWrapper(class QObject *) - ?handleCliError@PSetCliWrapper@@IAEXH@Z @ 113 NONAME ; void PSetCliWrapper::handleCliError(int) - ?handleCFRequesting@PSetCallDivertingWrapper@@IAEX_N0@Z @ 114 NONAME ; void PSetCallDivertingWrapper::handleCFRequesting(bool, bool) - ?cancelAll@PSetCliWrapper@@QAEXXZ @ 115 NONAME ; void PSetCliWrapper::cancelAll(void) - ?networkReqestFailed@PSetNetworkWrapper@@IAEXW4ErrorCode@1@W4RequestType@1@@Z @ 116 NONAME ; void PSetNetworkWrapper::networkReqestFailed(enum PSetNetworkWrapper::ErrorCode, enum PSetNetworkWrapper::RequestType) - ?enableBarring@PSetCallBarringWrapper@@QAEXV?$QFlags@W4PsService@@@@W4BarringType@1@VQString@@@Z @ 117 NONAME ; void PSetCallBarringWrapper::enableBarring(class QFlags, enum PSetCallBarringWrapper::BarringType, class QString) - ?setNewDefaultNumber@PSetCallDivertingWrapper@@QAEXVQString@@@Z @ 118 NONAME ; void PSetCallDivertingWrapper::setNewDefaultNumber(class QString) - ??0PSetCallBarringWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 119 NONAME ; PSetCallBarringWrapper::PSetCallBarringWrapper(class CPsetContainer &, class QObject *) - ?barringStatusRequestCompleted@PSetCallBarringWrapper@@IAEXHABV?$QList@E@@W4BarringStatus@1@@Z @ 120 NONAME ; void PSetCallBarringWrapper::barringStatusRequestCompleted(int, class QList const &, enum PSetCallBarringWrapper::BarringStatus) - ??_EPSetNetworkWrapper@@UAE@I@Z @ 121 NONAME ; PSetNetworkWrapper::~PSetNetworkWrapper(unsigned int) - ?getCPsetCallWaiting@PSetCallWaitingWrapper@@QBEAAVCPsetCallWaiting@@XZ @ 122 NONAME ; class CPsetCallWaiting & PSetCallWaitingWrapper::getCPsetCallWaiting(void) const - ?getCnap@PSetCliWrapper@@QAEXXZ @ 123 NONAME ; void PSetCliWrapper::getCnap(void) - ??1PSetCallBarringWrapper@@UAE@XZ @ 124 NONAME ; PSetCallBarringWrapper::~PSetCallBarringWrapper(void) - ?tr@PSetCallDivertingWrapper@@SA?AVQString@@PBD0@Z @ 125 NONAME ; class QString PSetCallDivertingWrapper::tr(char const *, char const *) - ?getStaticMetaObject@PSetCallDivertingWrapper@@SAABUQMetaObject@@XZ @ 126 NONAME ; struct QMetaObject const & PSetCallDivertingWrapper::getStaticMetaObject(void) - ?metaObject@PSetNetworkWrapper@@UBEPBUQMetaObject@@XZ @ 127 NONAME ; struct QMetaObject const * PSetNetworkWrapper::metaObject(void) const - ??1PSetNetworkWrapper@@UAE@XZ @ 128 NONAME ; PSetNetworkWrapper::~PSetNetworkWrapper(void) - ?staticMetaObject@PSetNetworkWrapper@@2UQMetaObject@@B @ 129 NONAME ; struct QMetaObject const PSetNetworkWrapper::staticMetaObject - ??_EPSetCallWaitingWrapper@@UAE@I@Z @ 130 NONAME ; PSetCallWaitingWrapper::~PSetCallWaitingWrapper(unsigned int) - ??0PSetCallWaitingWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 131 NONAME ; PSetCallWaitingWrapper::PSetCallWaitingWrapper(class CPsetContainer &, class QObject *) - ?qt_metacall@PSetCallBarringWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 132 NONAME ; int PSetCallBarringWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?chageVisbilityOfManualNetworkSelection@PSetNetworkWrapper@@IAEX_N@Z @ 133 NONAME ; void PSetNetworkWrapper::chageVisbilityOfManualNetworkSelection(bool) - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/eabi/psetwrapperu.def --- a/cellular/telephonysettings/xqbindings/psetwrapper/eabi/psetwrapperu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -EXPORTS - _ZN11PSetWrapper10cliWrapperEv @ 1 NONAME - _ZN11PSetWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME - _ZN11PSetWrapper11qt_metacastEPKc @ 3 NONAME - _ZN11PSetWrapper14networkWrapperEv @ 4 NONAME - _ZN11PSetWrapper16staticMetaObjectE @ 5 NONAME DATA 16 - _ZN11PSetWrapper18callBarringWrapperEv @ 6 NONAME - _ZN11PSetWrapper18callWaitingWrapperEv @ 7 NONAME - _ZN11PSetWrapper19getStaticMetaObjectEv @ 8 NONAME - _ZN11PSetWrapper20callDivertingWrapperEv @ 9 NONAME - _ZN11PSetWrapperC1EP7QObject @ 10 NONAME - _ZN11PSetWrapperC2EP7QObject @ 11 NONAME - _ZN11PSetWrapperD0Ev @ 12 NONAME - _ZN11PSetWrapperD1Ev @ 13 NONAME - _ZN11PSetWrapperD2Ev @ 14 NONAME - _ZN14PSetCliWrapper11getClipModeEv @ 15 NONAME - _ZN14PSetCliWrapper11getClirModeEv @ 16 NONAME - _ZN14PSetCliWrapper11getColpModeEv @ 17 NONAME - _ZN14PSetCliWrapper11getColrModeEv @ 18 NONAME - _ZN14PSetCliWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 19 NONAME - _ZN14PSetCliWrapper11qt_metacastEPKc @ 20 NONAME - _ZN14PSetCliWrapper14cliInformationERK18PsCallLineIdentity @ 21 NONAME - _ZN14PSetCliWrapper14handleCliErrorEi @ 22 NONAME - _ZN14PSetCliWrapper15handleCliStatusEPhiRK18PsCallLineIdentity @ 23 NONAME - _ZN14PSetCliWrapper16handleCnapStatusEi @ 24 NONAME - _ZN14PSetCliWrapper16staticMetaObjectE @ 25 NONAME DATA 16 - _ZN14PSetCliWrapper19getStaticMetaObjectEv @ 26 NONAME - _ZN14PSetCliWrapper19handleCliRequestingEbb @ 27 NONAME - _ZN14PSetCliWrapper7getCnapEv @ 28 NONAME - _ZN14PSetCliWrapper9cancelAllEv @ 29 NONAME - _ZN14PSetCliWrapperC1ER14CPsetContainerP7QObject @ 30 NONAME - _ZN14PSetCliWrapperC2ER14CPsetContainerP7QObject @ 31 NONAME - _ZN14PSetCliWrapperD0Ev @ 32 NONAME - _ZN14PSetCliWrapperD1Ev @ 33 NONAME - _ZN14PSetCliWrapperD2Ev @ 34 NONAME - _ZN18PSetNetworkWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 35 NONAME - _ZN18PSetNetworkWrapper11qt_metacastEPKc @ 36 NONAME - _ZN18PSetNetworkWrapper13cancelRequestEv @ 37 NONAME - _ZN18PSetNetworkWrapper13selectNetworkERKNS_11NetworkInfoE @ 38 NONAME - _ZN18PSetNetworkWrapper14networkChangedERNS_11NetworkInfoERNS_18RegistrationStatusE @ 39 NONAME - _ZN18PSetNetworkWrapper16staticMetaObjectE @ 40 NONAME DATA 16 - _ZN18PSetNetworkWrapper17searchingNetworksERNS_11RequestTypeE @ 41 NONAME - _ZN18PSetNetworkWrapper19getStaticMetaObjectEv @ 42 NONAME - _ZN18PSetNetworkWrapper19networkReqestFailedENS_9ErrorCodeENS_11RequestTypeE @ 43 NONAME - _ZN18PSetNetworkWrapper20availableNetworksGotER5QListIPNS_11NetworkInfoEE @ 44 NONAME - _ZN18PSetNetworkWrapper20getAvailableNetworksEv @ 45 NONAME - _ZN18PSetNetworkWrapper20networkAccessModeGotEi @ 46 NONAME - _ZN18PSetNetworkWrapper20setNetworkAccessModeENS_17NetworkAccessModeE @ 47 NONAME - _ZN18PSetNetworkWrapper25requestingSelectedNetworkEb @ 48 NONAME - _ZN18PSetNetworkWrapperC1ER14CPsetContainerP7QObject @ 49 NONAME - _ZN18PSetNetworkWrapperC2ER14CPsetContainerP7QObject @ 50 NONAME - _ZN18PSetNetworkWrapperD0Ev @ 51 NONAME - _ZN18PSetNetworkWrapperD1Ev @ 52 NONAME - _ZN18PSetNetworkWrapperD2Ev @ 53 NONAME - _ZN22PSetCallBarringWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 54 NONAME - _ZN22PSetCallBarringWrapper11qt_metacastEPKc @ 55 NONAME - _ZN22PSetCallBarringWrapper13barringStatusE6QFlagsI9PsServiceENS_11BarringTypeE @ 56 NONAME - _ZN22PSetCallBarringWrapper13enableBarringE6QFlagsI9PsServiceENS_11BarringTypeE7QString @ 57 NONAME - _ZN22PSetCallBarringWrapper14disableBarringE6QFlagsI9PsServiceENS_11BarringTypeE7QString @ 58 NONAME - _ZN22PSetCallBarringWrapper16staticMetaObjectE @ 59 NONAME DATA 16 - _ZN22PSetCallBarringWrapper19getStaticMetaObjectEv @ 60 NONAME - _ZN22PSetCallBarringWrapper21changeBarringPasswordERK7QStringS2_S2_ @ 61 NONAME - _ZN22PSetCallBarringWrapper29barringStatusRequestCompletedEiRK5QListIhENS_13BarringStatusE @ 62 NONAME - _ZN22PSetCallBarringWrapper29enableBarringRequestCompletedEiNS_11BarringTypeENS_13BarringStatusEb @ 63 NONAME - _ZN22PSetCallBarringWrapper30disableBarringRequestCompletedEiNS_11BarringTypeENS_13BarringStatusEb @ 64 NONAME - _ZN22PSetCallBarringWrapper37barringPasswordChangeRequestCompletedEi @ 65 NONAME - _ZN22PSetCallBarringWrapperC1ER14CPsetContainerP7QObject @ 66 NONAME - _ZN22PSetCallBarringWrapperC2ER14CPsetContainerP7QObject @ 67 NONAME - _ZN22PSetCallBarringWrapperD0Ev @ 68 NONAME - _ZN22PSetCallBarringWrapperD1Ev @ 69 NONAME - _ZN22PSetCallBarringWrapperD2Ev @ 70 NONAME - _ZN22PSetCallWaitingWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 71 NONAME - _ZN22PSetCallWaitingWrapper11qt_metacastEPKc @ 72 NONAME - _ZN22PSetCallWaitingWrapper13cancelProcessEv @ 73 NONAME - _ZN22PSetCallWaitingWrapper14setCallWaitingENS_20PsCallWaitingCommandEi @ 74 NONAME - _ZN22PSetCallWaitingWrapper16staticMetaObjectE @ 75 NONAME DATA 16 - _ZN22PSetCallWaitingWrapper19getStaticMetaObjectEv @ 76 NONAME - _ZN22PSetCallWaitingWrapper20getCallWaitingStatusEv @ 77 NONAME - _ZN22PSetCallWaitingWrapper22handleCallWaitingErrorEi @ 78 NONAME - _ZN22PSetCallWaitingWrapper24handleCallWaitingChangedENS_20PsCallWaitingCommandEi @ 79 NONAME - _ZN22PSetCallWaitingWrapper26handleCallWaitingGetStatusENS_19PsCallWaitingStatusERK5QListIhE @ 80 NONAME - _ZN22PSetCallWaitingWrapper27handleCallWaitingRequestingEbb @ 81 NONAME - _ZN22PSetCallWaitingWrapperC1ER14CPsetContainerP7QObject @ 82 NONAME - _ZN22PSetCallWaitingWrapperC2ER14CPsetContainerP7QObject @ 83 NONAME - _ZN22PSetCallWaitingWrapperD0Ev @ 84 NONAME - _ZN22PSetCallWaitingWrapperD1Ev @ 85 NONAME - _ZN22PSetCallWaitingWrapperD2Ev @ 86 NONAME - _ZN24PSetCallDivertingWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 87 NONAME - _ZN24PSetCallDivertingWrapper11qt_metacastEPKc @ 88 NONAME - _ZN24PSetCallDivertingWrapper11requestDoneEv @ 89 NONAME - _ZN24PSetCallDivertingWrapper13cancelProcessEv @ 90 NONAME - _ZN24PSetCallDivertingWrapper16setCallDivertingER22PSCallDivertingCommandi @ 91 NONAME - _ZN24PSetCallDivertingWrapper16staticMetaObjectE @ 92 NONAME DATA 16 - _ZN24PSetCallDivertingWrapper17getDefaultNumbersER11QStringList @ 93 NONAME - _ZN24PSetCallDivertingWrapper18handleCFRequestingEbb @ 94 NONAME - _ZN24PSetCallDivertingWrapper19getStaticMetaObjectEv @ 95 NONAME - _ZN24PSetCallDivertingWrapper19setNewDefaultNumberE7QString @ 96 NONAME - _ZN24PSetCallDivertingWrapper20handleDivertingErrorEi @ 97 NONAME - _ZN24PSetCallDivertingWrapper21getVoiceMailBoxNumberER7QString9PsService @ 98 NONAME - _ZN24PSetCallDivertingWrapper21handleDivertingStatusER5QListIP21PSCallDivertingStatusEb @ 99 NONAME - _ZN24PSetCallDivertingWrapper22getCallDivertingStatusE6QFlagsI9PsServiceE24PsCallDivertingConditioni @ 100 NONAME - _ZN24PSetCallDivertingWrapper22handleDivertingChangedERK22PSCallDivertingCommandb @ 101 NONAME - _ZN24PSetCallDivertingWrapper23queryVoiceMailBoxNumberER7QString9PsService @ 102 NONAME - _ZN24PSetCallDivertingWrapperC1ER14CPsetContainerP7QObject @ 103 NONAME - _ZN24PSetCallDivertingWrapperC2ER14CPsetContainerP7QObject @ 104 NONAME - _ZN24PSetCallDivertingWrapperD0Ev @ 105 NONAME - _ZN24PSetCallDivertingWrapperD1Ev @ 106 NONAME - _ZN24PSetCallDivertingWrapperD2Ev @ 107 NONAME - _ZNK11PSetWrapper10metaObjectEv @ 108 NONAME - _ZNK14PSetCliWrapper10metaObjectEv @ 109 NONAME - _ZNK18PSetNetworkWrapper10metaObjectEv @ 110 NONAME - _ZNK18PSetNetworkWrapper20getNetworkAccessModeEv @ 111 NONAME - _ZNK18PSetNetworkWrapper23getNetworkSelectionModeERNS_20NetworkSelectionModeE @ 112 NONAME - _ZNK18PSetNetworkWrapper33isManualNetworkSelectionSupportedEv @ 113 NONAME - _ZNK22PSetCallBarringWrapper10metaObjectEv @ 114 NONAME - _ZNK22PSetCallWaitingWrapper10metaObjectEv @ 115 NONAME - _ZNK22PSetCallWaitingWrapper19getCPsetCallWaitingEv @ 116 NONAME - _ZNK24PSetCallDivertingWrapper10metaObjectEv @ 117 NONAME - _ZNK24PSetCallDivertingWrapper20validateDivertNumberERK7TDesC16 @ 118 NONAME - _ZNK24PSetCallDivertingWrapper21getCPsetCallDivertingEv @ 119 NONAME - _ZNK24PSetCallDivertingWrapper8findPlusERK7TDesC16 @ 120 NONAME - _ZTI11PSetWrapper @ 121 NONAME - _ZTI14PSetCliWrapper @ 122 NONAME - _ZTI18PSetNetworkWrapper @ 123 NONAME - _ZTI22PSetCallBarringWrapper @ 124 NONAME - _ZTI22PSetCallWaitingWrapper @ 125 NONAME - _ZTI24PSetCallDivertingWrapper @ 126 NONAME - _ZTV11PSetWrapper @ 127 NONAME - _ZTV14PSetCliWrapper @ 128 NONAME - _ZTV18PSetNetworkWrapper @ 129 NONAME - _ZTV22PSetCallBarringWrapper @ 130 NONAME - _ZTV22PSetCallWaitingWrapper @ 131 NONAME - _ZTV24PSetCallDivertingWrapper @ 132 NONAME - _ZN18PSetNetworkWrapper38chageVisbilityOfManualNetworkSelectionEb @ 133 NONAME - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pri --- a/cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pri Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +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: -# - -HEADERS += ../../../../phonesrv_plat/\phone_settings_api/inc/psetcallbarringwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetcalldivertingwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetcallwaitingwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetcliwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetnetworkwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetwrappertypes.h \ - ./src/psetcallbarringwrapper_p.h \ - ./src/psetcalldivertingwrapper_p.h \ - ./src/psetcallwaitingwrapper_p.h \ - ./src/psetcliwrapper_p.h \ - ./src/psetnetworkwrapper_p.h - -symbian: { - SOURCES += ./src/psetcallbarringwrapper_p.cpp \ - ./src/psetcalldivertingwrapper_p.cpp \ - ./src/psetcliwrapper_p.cpp \ - ./src/psetcallwaitingwrapper_p.cpp \ - ./src/psetnetworkwrapper_p.cpp \ - ./src/psetwrapper.cpp \ - ./src/psetcliwrapper.cpp \ - ./src/psetcallwaitingwrapper.cpp \ - ./src/psetcalldivertingwrapper.cpp \ - ./src/psetnetworkwrapper.cpp \ - ./src/psetnetworkinfoconverter.cpp \ - ./src/psetcallbarringwrapper.cpp -} -else: { - SOURCES = ./src/psetwrapper_s.cpp -} - \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pro --- a/cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = lib -TARGET = psetwrapper -MOC_DIR = moc - -INCLUDEPATH += ../../../../phonesrv_plat/phone_settings_api/inc -SOURCEPATH += src - -# Input -include(psetwrapper.pri) - -DEFINES += BUILD_PSETWRAPPER - -symbian: { - LIBS += -lsssettings \ - -lphonesettings \ - -lcustomapi \ - -letelmm \ - -lbafl \ - -lphoneclient \ - -lvmbxengine - - load(data_caging_paths) - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - TARGET.EPOCALLOWDLLDATA = 1 - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.UID3 = 0X20029F20 - - defFiles = \ - "$${LITERAL_HASH}ifdef WINS" \ - "DEFFILE bwins/psetwrapper.def" \ - "$${LITERAL_HASH}else" \ - "DEFFILE eabi/psetwrapper.def" \ - "$${LITERAL_HASH}endif" - MMP_RULES += defFiles - - # For sis file - dllfile.sources = $${TARGET}.dll - dllfile.path = $$SHARED_LIB_DIR - DEPLOYMENT += dllfile - - BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "./rom/psetwrapper.iby CORE_MW_LAYER_IBY_EXPORT_PATH(psetwrapper.iby)" - -} else: { - DESTDIR = c:\hb\lib - DLLDESTDIR = c:\hb\bin -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/rom/psetwrapper.iby --- a/cellular/telephonysettings/xqbindings/psetwrapper/rom/psetwrapper.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +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 __PSETWRAPPER_IBY__ -#define __PSETWRAPPER_IBY__ - -#include - -file=ABI_DIR\BUILD_DIR\psetwrapper.dll SHARED_LIB_DIR\psetwrapper.dll - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/logging.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/logging.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +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 LOGGING_H -#define LOGGING_H - -#include - -#define DPRINT qDebug() << __PRETTY_FUNCTION__ - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +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 "psetcallbarringwrapper_p.h" -#include "logging.h" - -/*! - PSetCallBarringWrapper::PSetCallBarringWrapper - */ -PSetCallBarringWrapper::PSetCallBarringWrapper( - CPsetContainer &psetContainer, - QObject *parent) - : - QObject(parent), - m_privateImpl(new PSetCallBarringWrapperPrivate(*this, psetContainer)) -{ - DPRINT; -} - -/*! - PSetCallBarringWrapper::~PSetCallBarringWrapper - */ -PSetCallBarringWrapper::~PSetCallBarringWrapper() -{ - DPRINT; -} - -/*! - PSetCallBarringWrapper::barringStatus - */ -void PSetCallBarringWrapper::barringStatus( - PsServiceGroup serviceGroup, - BarringType barringType) -{ - DPRINT; - - m_privateImpl->barringStatus(serviceGroup, barringType); -} - -/*! - PSetCallBarringWrapper::enableBarring - */ -void PSetCallBarringWrapper::enableBarring( - PsServiceGroup serviceGroup, - BarringType barringType, - QString barringPassword) -{ - DPRINT; - - m_privateImpl->enableBarring(serviceGroup, barringType, barringPassword); -} - -/*! - PSetCallBarringWrapper::disableBarring - */ -void PSetCallBarringWrapper::disableBarring( - PsServiceGroup serviceGroup, - BarringType barringType, - QString barringPassword) -{ - DPRINT; - - m_privateImpl->disableBarring(serviceGroup, barringType, barringPassword); -} - -/*! - PSetCallBarringWrapper::changeBarringPassword - */ -void PSetCallBarringWrapper::changeBarringPassword( - const QString &oldPassword, - const QString &newPassword, - const QString &verifiedPassword) -{ - DPRINT; - - m_privateImpl->changeBarringPassword( - oldPassword, newPassword, verifiedPassword); -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper_p.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper_p.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,473 +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 "psetcallbarringwrapper.h" -#include "psetcallbarringwrapper_p.h" -#include "logging.h" - -TServiceGroup convertServiceGroup(PsServiceGroup serviceGroup) -{ - TServiceGroup convertedType = EServiceGroupVoice; - switch (serviceGroup) { - case ServiceGroupVoice: - convertedType = EServiceGroupVoice; - break; - case ServiceGroupData: - convertedType = EServiceGroupData; - break; - case ServiceGroupFax: - convertedType = EServiceGroupFax; - break; - case ServiceGroupAllTeleservices: - convertedType = EServiceGroupAllTeleservices; - break; - default: - break; - } - - return convertedType; -} - -PSetCallBarringWrapper::BarringType convertBarringType( - TBarringProgram barringType) -{ - PSetCallBarringWrapper::BarringType convertedType = - PSetCallBarringWrapper::BarringTypeAllBarrings; - switch (barringType) { - case EBarringTypeAllBarrings: - convertedType = PSetCallBarringWrapper::BarringTypeAllBarrings; - break; - case EBarringTypeAllOutgoing: - convertedType = PSetCallBarringWrapper::BarringTypeAllOutgoing; - break; - case EBarringTypeOutgoingInternational: - convertedType = PSetCallBarringWrapper::BarringTypeOutgoingInternational; - break; - case EBarringTypeOutgoingInternationalExceptToHomeCountry: - convertedType = PSetCallBarringWrapper:: - BarringTypeOutgoingInternationalExceptToHomeCountry; - break; - case EBarringTypeAllIncoming: - convertedType = PSetCallBarringWrapper::BarringTypeAllIncoming; - break; - case EBarringTypeIncomingWhenRoaming: - convertedType = PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming; - break; - case EBarringTypeAllServices: - convertedType = PSetCallBarringWrapper::BarringTypeAllServices; - break; - case EBarringTypeAllOutgoingServices: - convertedType = PSetCallBarringWrapper::BarringTypeAllOutgoingServices; - break; - case EBarringTypeAllIncomingServices: - convertedType = PSetCallBarringWrapper::BarringTypeAllIncomingServices; - break; - default: - break; - } - - return convertedType; -} - -TBarringProgram convertBarringType( - PSetCallBarringWrapper::BarringType barringType) -{ - TBarringProgram convertedType = EBarringTypeAllBarrings; - switch (barringType) { - case PSetCallBarringWrapper::BarringTypeAllBarrings: - convertedType = EBarringTypeAllBarrings; - break; - case PSetCallBarringWrapper::BarringTypeAllOutgoing: - convertedType = EBarringTypeAllOutgoing; - break; - case PSetCallBarringWrapper::BarringTypeOutgoingInternational: - convertedType = EBarringTypeOutgoingInternational; - break; - case PSetCallBarringWrapper:: - BarringTypeOutgoingInternationalExceptToHomeCountry: - convertedType - = EBarringTypeOutgoingInternationalExceptToHomeCountry; - break; - case PSetCallBarringWrapper::BarringTypeAllIncoming: - convertedType = EBarringTypeAllIncoming; - break; - case PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming: - convertedType = EBarringTypeIncomingWhenRoaming; - break; - case PSetCallBarringWrapper::BarringTypeAllServices: - convertedType = EBarringTypeAllServices; - break; - case PSetCallBarringWrapper::BarringTypeAllOutgoingServices: - convertedType = EBarringTypeAllOutgoingServices; - break; - case PSetCallBarringWrapper::BarringTypeAllIncomingServices: - convertedType = EBarringTypeAllIncomingServices; - break; - default: - break; - } - - return convertedType; -} - - -PSetCallBarringWrapper::BarringStatus convertBarringStatus( - TBarringStatus status) -{ - PSetCallBarringWrapper::BarringStatus convertedType = - PSetCallBarringWrapper::BarringStatusUnknown; - switch (status) { - case EBarringStatusActive: - convertedType = PSetCallBarringWrapper::BarringStatusActive; - break; - case EBarringStatusInactive: - convertedType = PSetCallBarringWrapper::BarringStatusInactive; - break; - case EBarringStatusNotProvisioned: - convertedType = - PSetCallBarringWrapper::BarringStatusNotProvisioned; - break; - case EBarringStatusUnavailable: - convertedType = PSetCallBarringWrapper::BarringStatusUnavailable; - break; - case EBarringStatusUnknown: - default: - convertedType = PSetCallBarringWrapper::BarringStatusUnknown; - break; - } - - return convertedType; -} - - -/*! - PSetCallBarringWrapperPrivate::PSetCallBarringWrapperPrivate - */ -PSetCallBarringWrapperPrivate::PSetCallBarringWrapperPrivate( - PSetCallBarringWrapper &owner, CPsetContainer &psetContainer) - : - m_owner(owner), - m_callBarring(NULL), - m_currentRequest(RequestNone), - m_barringError(PSetCallBarringWrapper::BarringErrorNone), - m_barringStatus(PSetCallBarringWrapper::BarringStatusUnknown), - m_barringType(PSetCallBarringWrapper::BarringTypeAllBarrings), - m_plural(false) -{ - DPRINT; - - QT_TRAP_THROWING( - m_callBarring = psetContainer.CreateCBObjectL(*this) - ) - - m_callBarring->SetRequestObserver(this); -} - - -/*! - PSetCallBarringWrapperPrivate::~PSetCallBarringWrapperPrivate - */ -PSetCallBarringWrapperPrivate::~PSetCallBarringWrapperPrivate() -{ - DPRINT; - - delete m_callBarring; -} - - -/*! - PSetCallBarringWrapperPrivate::barringStatus - */ -void PSetCallBarringWrapperPrivate::barringStatus( - PsServiceGroup serviceGroup, - PSetCallBarringWrapper::BarringType barringType) -{ - DPRINT; - - TServiceGroup convertedServiceGroup = convertServiceGroup(serviceGroup); - TBarringProgram convertedBarringType = convertBarringType(barringType); - - m_currentRequest = RequestBarringStatus; - QT_TRAP_THROWING(m_callBarring->GetBarringStatusL( - convertedServiceGroup, convertedBarringType) - ) -} - - -/*! - PSetCallBarringWrapperPrivate::enableBarring - */ -void PSetCallBarringWrapperPrivate::enableBarring( - PsServiceGroup serviceGroup, - PSetCallBarringWrapper::BarringType barringType, - QString barringPassword) -{ - DPRINT; - - TCallBarringSetting setting; - setting.iType = convertBarringType(barringType); - setting.iSetting = EActivateBarring; - setting.iServiceGroup = convertServiceGroup(serviceGroup); - setting.iPassword.Copy(barringPassword.utf16()); - - TBasicServiceGroups serviceGroups = EAllTeleAndBearer; - - m_currentRequest = RequestEnableBarring; - QT_TRAP_THROWING( - m_callBarring->SetBarringL(setting, serviceGroups); - ) -} - - -/*! - PSetCallBarringWrapperPrivate::disableBarring - */ -void PSetCallBarringWrapperPrivate::disableBarring( - PsServiceGroup serviceGroup, - PSetCallBarringWrapper::BarringType barringType, - QString barringPassword) -{ - DPRINT; - - TCallBarringSetting setting; - setting.iType = convertBarringType(barringType); - setting.iSetting = ECancelBarring; - setting.iServiceGroup = convertServiceGroup(serviceGroup); - setting.iPassword.Copy(barringPassword.utf16()); - - TBasicServiceGroups serviceGroups = EAllTeleAndBearer; - - m_currentRequest = RequestDisableBarring; - QT_TRAP_THROWING( - m_callBarring->SetBarringL(setting, serviceGroups); - ) -} - - -/*! - PSetCallBarringWrapperPrivate::changeBarringPassword - */ -void PSetCallBarringWrapperPrivate::changeBarringPassword( - const QString &oldPassword, - const QString &newPassword, - const QString &verifiedPassword) -{ - RMobilePhone::TMobilePhonePasswordChangeV2 passwordChange; - passwordChange.iOldPassword.Copy(oldPassword.utf16()); - passwordChange.iNewPassword.Copy(newPassword.utf16()); - passwordChange.iVerifiedPassword.Copy(verifiedPassword.utf16()); - - m_currentRequest = RequestChangePassword; - QT_TRAP_THROWING( - m_callBarring->ChangePasswordL(passwordChange); - ) -} - - -/*! - From MPsetBarringObserver. - PSetCallBarringWrapperPrivate::HandleBarringModeChangedL - */ -void PSetCallBarringWrapperPrivate::HandleBarringModeChangedL( - TBarringProgram aType, - TBarringStatus aStatus, - TBool aPlural ) -{ - DPRINT; - Q_ASSERT(RequestEnableBarring == m_currentRequest || - RequestDisableBarring == m_currentRequest); - - m_barringType = convertBarringType(aType); - m_barringError = PSetCallBarringWrapper::BarringErrorNone; - m_barringStatus = convertBarringStatus(aStatus); - m_plural = static_cast(aPlural); -} - - -/*! - From MPsetBarringObserver. - PSetCallBarringWrapperPrivate::HandleBarringModeStatusL - */ -void PSetCallBarringWrapperPrivate::HandleBarringModeStatusL( - TUint8 aBsc[KPSetNumberOfBsc], - TBarringStatus aStatus ) -{ - DPRINT; - Q_ASSERT(RequestBarringStatus == m_currentRequest); - - m_barringError = PSetCallBarringWrapper::BarringErrorNone; - QT_TRYCATCH_LEAVING( - int index = 0; - unsigned char groupIdCandidate = aBsc[index]; - while ((groupIdCandidate - != static_cast(KPSetUnusedValue))) { - m_basicServiceGroupIds << groupIdCandidate; - groupIdCandidate = aBsc[++index]; - } - ) - m_barringStatus = convertBarringStatus(aStatus); -} - - -/*! - From MPsetBarringObserver. - PSetCallBarringWrapperPrivate::HandleBarringErrorL - */ -void PSetCallBarringWrapperPrivate::HandleBarringErrorL( - TInt aReason ) -{ - DPRINT; - Q_UNUSED(aReason) - - m_barringError = aReason; - m_basicServiceGroupIds.clear(); - m_barringStatus = PSetCallBarringWrapper::BarringStatusUnknown; - m_plural = false; -} - - -/*! - From MPsetBarringObserver. - PSetCallBarringWrapperPrivate::HandleCBRequestingL - */ -void PSetCallBarringWrapperPrivate::HandleCBRequestingL( - TBool aTrue, - TBool aInterrupted ) -{ - DPRINT; - - Q_UNUSED(aTrue) - Q_UNUSED(aInterrupted) -} - - -/*! - From MPsetBarringObserver. - PSetCallBarringWrapperPrivate::SetEngineContact - */ -void PSetCallBarringWrapperPrivate::SetEngineContact( - MPsetCallBarring* aBarringEngine ) -{ - DPRINT; - - Q_UNUSED(aBarringEngine) -} - - -/*! - From MPsetBarringObserver. - PSetCallBarringWrapperPrivate::CbPasswordChangedL - */ -void PSetCallBarringWrapperPrivate::CbPasswordChangedL( - TBool aSuccess ) -{ - DPRINT; - - if (aSuccess) { - m_barringError = PSetCallBarringWrapper::BarringErrorNone; - } else { - m_barringError = KErrGsmSSNegativePasswordCheck; - } -} - - -/*! - From MPsetRequestObserver. - PSetCallBarringWrapperPrivate::RequestComplete - */ -void PSetCallBarringWrapperPrivate::RequestComplete() -{ - DPRINT; - Q_ASSERT(RequestNone != m_currentRequest); - BarringRequest completedRequest = m_currentRequest; - m_currentRequest = RequestNone; - - switch (completedRequest) - { - case RequestBarringStatus: - { - int errorCode = 0; - QT_TRYCATCH_ERROR( errorCode, - emit m_owner.barringStatusRequestCompleted( - m_barringError, - m_basicServiceGroupIds, - m_barringStatus); - ) - DPRINT << "RequestBarringStatus ERROR:" << errorCode; - break; - } - - case RequestEnableBarring: - { - int errorCode = 0; - QT_TRYCATCH_ERROR( errorCode, - emit m_owner.enableBarringRequestCompleted( - m_barringError, - m_barringType, - m_barringStatus, - m_plural); - ) - DPRINT << "RequestEnableBarring ERROR:" << errorCode; - break; - } - - case RequestDisableBarring: - { - int errorCode = 0; - QT_TRYCATCH_ERROR( errorCode, - emit m_owner.disableBarringRequestCompleted( - m_barringError, - m_barringType, - m_barringStatus, - m_plural); - ) - DPRINT << "RequestDisableBarring ERROR:" << errorCode; - break; - } - - case RequestChangePassword: - { - int errorCode = 0; - QT_TRYCATCH_ERROR( errorCode, - emit m_owner.barringPasswordChangeRequestCompleted( - m_barringError); - ) - DPRINT << "RequestChangePassword ERROR:" << errorCode; - break; - } - - default: - break; - } -} - - -/*! - From MPsetRequestObserver. - PSetCallBarringWrapperPrivate::RequestStatusChanged - */ -void PSetCallBarringWrapperPrivate::RequestStatusChanged( - TInt aNewStatus) -{ - DPRINT; - Q_UNUSED(aNewStatus) - Q_ASSERT(RequestNone != m_currentRequest); -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper_p.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper_p.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +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 PSETCALLBARRINGWRAPPER_P_H -#define PSETCALLBARRINGWRAPPER_P_H - -#include -#include -#include -#include - -// Forward declarations -class PSetCallBarringWrapper; -class CPsetContainer; -class CPsetCallBarring; - -class PSetCallBarringWrapperPrivate - : public MPsetBarringObserver, public MPsetRequestObserver -{ -public: - - enum BarringRequest - { - RequestNone, - RequestBarringStatus, - RequestEnableBarring, - RequestDisableBarring, - RequestChangePassword - }; - -public: - - PSetCallBarringWrapperPrivate( - PSetCallBarringWrapper &owner, - CPsetContainer &psetContainer); - - ~PSetCallBarringWrapperPrivate(); - - void barringStatus( - PsServiceGroup serviceGroup, - PSetCallBarringWrapper::BarringType barringType); - - void enableBarring( - PsServiceGroup serviceGroup, - PSetCallBarringWrapper::BarringType barringType, - QString barringPassword); - - void disableBarring( - PsServiceGroup serviceGroup, - PSetCallBarringWrapper::BarringType barringType, - QString barringPassword); - - void changeBarringPassword( - const QString &oldPassword, - const QString &newPassword, - const QString &verifiedPassword); - -public: // From MPsetBarringObserver - - /** - * From MPsetBarringObserver. - * @see MPsetBarringObserver. - */ - void HandleBarringModeChangedL( - TBarringProgram aType, - TBarringStatus aStatus, - TBool aPlural ); - - /** - * From MPsetBarringObserver. - * @see MPsetBarringObserver. - */ - void HandleBarringModeStatusL( - TUint8 aBsc[KPSetNumberOfBsc], - TBarringStatus aStatus ); - - /** - * From MPsetBarringObserver. - * @see MPsetBarringObserver. - */ - void HandleBarringErrorL( - TInt aReason ); - - /** - * From MPsetBarringObserver. - * @see MPsetBarringObserver. - */ - void HandleCBRequestingL( - TBool aTrue, - TBool aInterrupted ); - - /** - * From MPsetBarringObserver. - * @see MPsetBarringObserver. - */ - void SetEngineContact( - MPsetCallBarring* aBarringEngine ); - - /** - * From MPsetBarringObserver. - * @see MPsetBarringObserver. - */ - void CbPasswordChangedL( - TBool aSuccess ); - -public: // From MPsetRequestObserver - - /** - * From MPsetRequestObserver. - * @see MPsetRequestObserver. - */ - void RequestComplete(); - - /** - * From MPsetRequestObserver. - * @see MPsetRequestObserver. - */ - void RequestStatusChanged( - TInt aNewStatus); - -private: - - /** Owner. */ - PSetCallBarringWrapper &m_owner; - - /** Call barring supplementary service handler. */ - CPsetCallBarring *m_callBarring; - - /** Current barring request. */ - BarringRequest m_currentRequest; - - /** Error info from last completed request. */ - int m_barringError; - - /** Basic service group identifiers from last completed request. */ - QList m_basicServiceGroupIds; - - /** Barring status from last completed request. */ - PSetCallBarringWrapper::BarringStatus m_barringStatus; - - /** Barring type from last completed request. */ - PSetCallBarringWrapper::BarringType m_barringType; - - /** Plurality from last completed request. */ - bool m_plural; -}; - -#endif // PSETCALLBARRINGWRAPPER_P diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,376 +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 "psetcalldivertingwrapper.h" -#include "psetcalldivertingwrapper_p.h" -#include "logging.h" - -//Constant -_LIT(KCFInvalidChars,"*#pw"); -_LIT(KCFPlusSign,"+"); - -/*! - PSetCallDivertingWrapper::PSetCallDivertingWrapper - */ -PSetCallDivertingWrapper::PSetCallDivertingWrapper( - CPsetContainer &psetContainer, - QObject *parent) : - QObject(parent), m_psetCallDiverting(NULL), m_emergencyCall(NULL), - m_DefaultNumberListCDes(NULL), m_Priv(NULL) -{ - DPRINT << ": IN"; - - m_Priv = new PSetCallDivertingWrapperPrivate(*this); - QScopedPointer privateImplGuard(m_Priv); - - QT_TRAP_THROWING( - m_psetCallDiverting = psetContainer.CreateCFObjectL( *m_Priv )); - m_psetCallDiverting->SetRequestObserver(m_Priv); - QScopedPointer pSetCallDivertingGuard(m_psetCallDiverting); - - QT_TRAP_THROWING(m_emergencyCall = CPhCltEmergencyCall::NewL( m_Priv )); - QScopedPointer emergencyCallGuard(m_emergencyCall); - - privateImplGuard.take(); - pSetCallDivertingGuard.take(); - emergencyCallGuard.take(); - - DPRINT << ": OUT"; -} - -/*! - PSetCallDivertingWrapper::~PSetCallDivertingWrapper - */ -PSetCallDivertingWrapper::~PSetCallDivertingWrapper() -{ - DPRINT << ": IN"; - - delete m_psetCallDiverting; - delete m_emergencyCall; - - if (m_DefaultNumberListCDes) { - m_DefaultNumberListCDes->Reset(); - delete m_DefaultNumberListCDes; - } - - delete m_Priv; - - DPRINT << ": OUT"; -} - -// -------- Wrapper interface --------- // -/*! - PSetCallDivertingWrapper::setCallDiverting - */ -int PSetCallDivertingWrapper::setCallDiverting( - PSCallDivertingCommand& aSetting, int aBasicServiceGroup) -{ - DPRINT << ": IN"; - - TCallDivertSetting param; - param.iCondition = m_Priv->convert(aSetting.iCondition); - param.iSetting = m_Priv->convert(aSetting.iSetting); - param.iStatus = m_Priv->convert(aSetting.iStatus); - param.iServiceGroup = m_Priv->convert(aSetting.iServiceGroup); - param.iNumber = TPtrC16(aSetting.iNumber.utf16()); - param.iNoReplyTimer = aSetting.iNoReplyTimer; - - int result = validateDivertNumber(param.iNumber); - if (0 == result) { - QT_TRAP_THROWING( - m_psetCallDiverting->SetDivertingL( - param, - static_cast(aBasicServiceGroup))); - } - - DPRINT << ": OUT"; - return result; -} - -/*! - PSetCallDivertingWrapper::getCallDivertingStatus - */ -void PSetCallDivertingWrapper::getCallDivertingStatus( - const PsServiceGroup aServiceGroup, - const PsCallDivertingCondition aCondition, - int aBsc) -{ - DPRINT << ": IN"; - DPRINT << "aServiceGroup : " << aServiceGroup; - DPRINT << "aCondition : " << aCondition; - - QT_TRAP_THROWING( - m_psetCallDiverting->GetDivertingStatusL( - m_Priv->convert(aServiceGroup), - m_Priv->convert(aCondition), - (TBasicServiceGroups)aBsc)); - - DPRINT << ": OUT"; -} - -/*! - PSetCallDivertingWrapper::cancelProcess - */ -void PSetCallDivertingWrapper::cancelProcess() -{ - DPRINT << ": IN"; - - m_psetCallDiverting->CancelCurrentRequest(); - - DPRINT << ": OUT"; -} - -/*! - PSetCallDivertingWrapper::getDefaultNumbers - */ -void PSetCallDivertingWrapper::getDefaultNumbers(QStringList &aDefNumbers) -{ - // QStringList?, max 3 numbers to retrieve. - - DPRINT << ": IN"; - - while (!m_DefaultnumberListQSList.empty()) { - m_DefaultnumberListQSList.removeFirst(); - } - m_DefaultNumberListCDes = new CDesC16ArrayFlat(3); - QT_TRAP_THROWING( - m_psetCallDiverting->GetDefaultNumbersL(*m_DefaultNumberListCDes)); - int count = m_DefaultNumberListCDes->Count(); - for (int i = 0; i < count; i++) { - m_DefaultnumberListQSList.append(QString::fromUtf16( - m_DefaultNumberListCDes->MdcaPoint(i).Ptr(), - m_DefaultNumberListCDes->MdcaPoint(i).Length())); - } - aDefNumbers = m_DefaultnumberListQSList; - m_DefaultNumberListCDes->Reset(); - delete m_DefaultNumberListCDes; - m_DefaultNumberListCDes = NULL; - - DPRINT << ": OUT"; -} - -/*! - PSetCallDivertingWrapper::setNewDefaultNumber - */ -void PSetCallDivertingWrapper::setNewDefaultNumber(QString aNumber) -{ - DPRINT << ": IN"; - - TBuf bufNumber(aNumber.utf16()); - TInt found(KErrNotFound); - TInt loc(KErrNotFound); - m_DefaultNumberListCDes = new CDesC16ArrayFlat(3); - QT_TRAP_THROWING( - m_psetCallDiverting->GetDefaultNumbersL(*m_DefaultNumberListCDes)); - found = m_DefaultNumberListCDes->Find(bufNumber, loc); - m_DefaultNumberListCDes->Reset(); - delete m_DefaultNumberListCDes; - m_DefaultNumberListCDes = NULL; - if (found != KErrNone) { //number is not part of current def.numbers - QT_TRAP_THROWING( - m_psetCallDiverting->SetNewDefaultNumberL(bufNumber)); - } else { - QT_TRAP_THROWING( - m_psetCallDiverting->SwapDefaultNumberL(loc+1)); - } - - DPRINT << ": OUT"; -} - -/*! - * PSetCallDivertingWrapper::getVoiceMailBoxNumber - * @param aNumber empty if not set - * @return -1 if not supported - */ -int PSetCallDivertingWrapper::getVoiceMailBoxNumber( - QString &aNumber, PsService aService) -{ - DPRINT << ": IN"; - - CVoiceMailboxEntry* psetVoiceMailboxEntry = NULL; - CVoiceMailbox* psetVoiceMailBoxScoped = NULL; - QT_TRAP_THROWING(psetVoiceMailBoxScoped = CVoiceMailbox::NewL()); - QScopedPointer psetVoiceMailBox(psetVoiceMailBoxScoped); - - TVoiceMailboxParams psetVoiceMailboxParams; - // Selected mailbox type is voice - psetVoiceMailboxParams.iType = m_Priv->convert(aService); - psetVoiceMailboxEntry = 0; - int ret = 0; - TInt error = psetVoiceMailBox->GetStoredEntry( - psetVoiceMailboxParams, psetVoiceMailboxEntry); - DPRINT << "error: " << error; - if (KErrNotSupported == error) { - ret = -1; - } else if (KErrNone == error) { - // Entry ok, check the number - TPtrC ptrNumber(KNullDesC); - if (KErrNone == psetVoiceMailboxEntry->GetVmbxNumber(ptrNumber)) { - // number ok - aNumber = QString::fromUtf16(ptrNumber.Ptr(), - ptrNumber.Length()); - } - - } else { - // illegal argument - } - - delete psetVoiceMailboxEntry; // Entry ownership was transferred - psetVoiceMailboxEntry = NULL; - - DPRINT << "aVmbxNumber: " << aNumber; - DPRINT << ": OUT"; - return ret; -} - -/*! - * PSetCallDivertingWrapper::queryVoiceMailBoxNumber - * @param aNumber empty if not set - * @return -1 if not supported - */ -int PSetCallDivertingWrapper::queryVoiceMailBoxNumber( - QString &aNumber, PsService aService) -{ - DPRINT << ": IN"; - - CVoiceMailboxEntry* psetVoiceMailboxEntry = NULL; - CVoiceMailbox* psetVoiceMailBoxScoped = NULL; - QT_TRAP_THROWING(psetVoiceMailBoxScoped = CVoiceMailbox::NewL()); - QScopedPointer psetVoiceMailBox(psetVoiceMailBoxScoped); - - TVoiceMailboxParams psetVoiceMailboxParams; - // Selected mailbox type is voice - psetVoiceMailboxParams.iType = m_Priv->convert(aService); - psetVoiceMailboxEntry = 0; - int ret = 0; - TInt error = psetVoiceMailBox->GetStoredEntry( - psetVoiceMailboxParams, psetVoiceMailboxEntry); - - if (KErrNotSupported == error) { - ret = -1; - } else if (KErrNone == error || KErrNotFound == error) { - // No number defined, query new entry from user - error = psetVoiceMailBox->QueryNewEntry( - psetVoiceMailboxParams, psetVoiceMailboxEntry); - - if (KErrNone == error) { - // Save new entry and get the number. - error = psetVoiceMailBox->SaveEntry( *psetVoiceMailboxEntry ); - TPtrC ptrNumber( KNullDesC ); - if ( KErrNone == psetVoiceMailboxEntry->GetVmbxNumber( ptrNumber )) { - // New number ok. - aNumber = QString::fromUtf16(ptrNumber.Ptr(), - ptrNumber.Length()); - } - - } else { - // New number not given. - DPRINT << "New number error: " << error; - } - } else { - // illegal argument - DPRINT << "error: " << error; - } - - delete psetVoiceMailboxEntry; // Entry ownership was transferred - psetVoiceMailboxEntry = NULL; - - DPRINT << "aVmbxNumber: " << aNumber; - DPRINT << ": OUT"; - return ret; -} - -/*! - PSetCallDivertingWrapper::validateDivertNumber - */ -int PSetCallDivertingWrapper::validateDivertNumber( - const TDesC16& aDivertTo) const -{ - DPRINT << ": IN "; - - int result = 0; - - QString diverto = QString::fromUtf16(aDivertTo.Ptr(),aDivertTo.Length()); - DPRINT << "aDivertTo: " << diverto; - TInt noOfInvalidChars = KCFInvalidChars().Length(); - TBool isEmergency(EFalse); - TTelNumber number; - TInt error = m_emergencyCall->IsEmergencyPhoneNumber(aDivertTo, number, - isEmergency); - if ((error == KErrNone) && isEmergency) { - result = KErrGsmSSIllegalOperation; - DPRINT << ": emergency number."; - } else { - // Plus is a special case, as it is accepted as first character. - if (findPlus(aDivertTo)) { - result = KErrGsmSSUnknownAlphabet; - } - for (int index = 0; index < noOfInvalidChars; index++) { - if (aDivertTo.Find(KCFInvalidChars().Mid(index, 1)) == KErrNone) { - result = KErrGsmSSUnknownAlphabet; - DPRINT << ": Invalid divert number. "; - } - } - } - - DPRINT << ": OUT : result " << result; - return result; -} - -/*! - PSetCallDivertingWrapper::findPlus - Seeks '+' from given number. If '+' is first character, it is ignored. - */ -bool PSetCallDivertingWrapper::findPlus(const TDesC16& aDivertTo) const -{ - DPRINT << ": IN "; - - bool plusFound(false); - if (!(aDivertTo.Find(KCFPlusSign) == KErrNotFound)) { - //first char '+', but there can additional '+'s - //ignore first '+' - TPtrC concat = aDivertTo.Right(aDivertTo.Length() - 1); - if (concat.Find(KCFPlusSign) == KErrNone) { - plusFound = true; - DPRINT << ": Invalid divert number. "; - } - } - - DPRINT << ": OUT : plusFound " << plusFound; - return plusFound; -} - -/** - * Get CPsetCallDiverting reference. - */ -CPsetCallDiverting & PSetCallDivertingWrapper::getCPsetCallDiverting() const - { - DPRINT; - - return *m_psetCallDiverting; - } - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper_p.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper_p.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,464 +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 "psetcalldivertingwrapper_p.h" -#include "logging.h" - -/*! - PSetCallDivertingWrapperPrivate::PSetCallDivertingWrapperPrivate - */ -PSetCallDivertingWrapperPrivate::PSetCallDivertingWrapperPrivate( - PSetCallDivertingWrapper &owner) : - m_Owner(owner) -{ - DPRINT; -} - -/*! - PSetCallDivertingWrapperPrivate::~PSetCallDivertingWrapperPrivate - */ -PSetCallDivertingWrapperPrivate::~PSetCallDivertingWrapperPrivate() -{ - DPRINT; - while (!m_DivertingStatusList.empty()) { - DPRINT << "m_DivertingStatusList item to be deleted"; - delete m_DivertingStatusList.takeFirst(); - } -} - -/*! - PSetCallDivertingWrapperPrivate::HandleDivertingChangedL - */ -void PSetCallDivertingWrapperPrivate::HandleDivertingChangedL( - const TCallDivertSetting& aSetting, TBool aPlural) -{ - DPRINT << ": IN "; - - m_callDivertingSetting.iCondition = convert(aSetting.iCondition); - m_callDivertingSetting.iStatus = convert(aSetting.iStatus); - m_callDivertingSetting.iSetting = - static_cast(aSetting.iSetting); - m_callDivertingSetting.iServiceGroup = convert(aSetting.iServiceGroup); - m_callDivertingSetting.iNumber = - QString::fromUtf16(aSetting.iNumber.Ptr(), aSetting.iNumber.Length()); - m_callDivertingSetting.iNoReplyTimer = aSetting.iNoReplyTimer; - QT_TRYCATCH_LEAVING( - emit m_Owner.handleDivertingChanged(m_callDivertingSetting, aPlural)); - - DPRINT << ": OUT "; -} - -/*! - PSetCallDivertingWrapperPrivate::HandleDivertingStatusL - */ -void PSetCallDivertingWrapperPrivate::HandleDivertingStatusL( - CMobilePhoneCFList& aSetting, TBool aPlural) -{ - DPRINT << ": IN "; - - // reset list - while (!m_DivertingStatusList.empty()) { - PSCallDivertingStatus* divertingStatus = - m_DivertingStatusList.takeFirst(); - DPRINT << ": delete : " << divertingStatus; - delete divertingStatus; - } - TInt entries = aSetting.Enumerate(); - TInt numberOfBscs = 0; - RMobilePhone::TMobilePhoneCFInfoEntryV1 cfInfo; - while (entries > numberOfBscs) { - cfInfo = aSetting.GetEntryL(numberOfBscs); - PSCallDivertingStatus* divertingStatus = - new (ELeave) PSCallDivertingStatus(); - divertingStatus->iCondition = convert(cfInfo.iCondition); - divertingStatus->iServiceGroup = convert(cfInfo.iServiceGroup); - divertingStatus->iStatus = convert(cfInfo.iStatus); - divertingStatus->iNumber = QString::fromUtf16( - cfInfo.iNumber.iTelNumber.Ptr(), - cfInfo.iNumber.iTelNumber.Length()); - divertingStatus->iTimeout = cfInfo.iTimeout; - m_DivertingStatusList.append(divertingStatus); - numberOfBscs++; - } - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleDivertingStatus(m_DivertingStatusList,aPlural)); - - DPRINT << ": OUT"; -} - -/*! - PSetCallDivertingWrapperPrivate::HandleDivertingErrorL - */ -void PSetCallDivertingWrapperPrivate::HandleDivertingErrorL(TInt aReason) -{ - DPRINT << ": IN : aReason" << aReason; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleDivertingError(aReason)); - - DPRINT << ": OUT "; -} - -/*! - PSetCallDivertingWrapperPrivate::HandleCFRequestingL - */ -void PSetCallDivertingWrapperPrivate::HandleCFRequestingL(TBool aOngoing, - TBool aInterrupted) -{ - DPRINT << ": IN "; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleCFRequesting(aOngoing, aInterrupted)); - - DPRINT << ": OUT "; -} - -/*! - PSetCallDivertingWrapperPrivate::SetEngineContact - */ -void PSetCallDivertingWrapperPrivate::SetEngineContact( - MPsetCallDiverting* aDivertEngine) -{ - DPRINT << ": IN "; - - Q_UNUSED(aDivertEngine); - - DPRINT << ": OUT "; -} - -/*! - PSetCallDivertingWrapperPrivate::HandleEmergencyDialL - */ -void PSetCallDivertingWrapperPrivate::HandleEmergencyDialL(const TInt aStatus) -{ - DPRINT << ": IN "; - - Q_UNUSED(aStatus); - - DPRINT << ": OUT "; -} - -/*! - PSetCallDivertingWrapperPrivate::RequestComplete - */ -void PSetCallDivertingWrapperPrivate::RequestComplete() -{ - DPRINT << ": IN "; - QT_TRYCATCH_LEAVING( - emit m_Owner.requestDone()); - DPRINT << ": OUT "; -} - -/*! - PSetCallDivertingWrapperPrivate::RequestStatusChanged - */ -void PSetCallDivertingWrapperPrivate::RequestStatusChanged(TInt aNewStatus) -{ - DPRINT << ": IN "; - Q_UNUSED(aNewStatus); - DPRINT << ": OUT "; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -PsCallDivertingCondition PSetCallDivertingWrapperPrivate::convert( - TCallDivertingCondition type) -{ - switch (type) { - case EDivertConditionUnconditional: - return DivertConditionUnconditional; - case EDivertConditionBusy: - return DivertConditionBusy; - case EDivertConditionNoReply: - return DivertConditionNoReply; - case EDivertConditionNotReachable: - return DivertConditionNotReachable; - case EDivertConditionAllCalls: - return DivertConditionAllCalls; - case EDivertConditionAllConditionalCases: - return DivertConditionAllConditionalCases; - default: - break; - } - return DivertConditionUnknown; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -TCallDivertingCondition PSetCallDivertingWrapperPrivate::convert( - PsCallDivertingCondition type) -{ - switch (type) { - case DivertConditionUnconditional: - return EDivertConditionUnconditional; - case DivertConditionBusy: - return EDivertConditionBusy; - case DivertConditionNoReply: - return EDivertConditionNoReply; - case DivertConditionNotReachable: - return EDivertConditionNotReachable; - case DivertConditionAllCalls: - return EDivertConditionAllCalls; - case DivertConditionAllConditionalCases: - return EDivertConditionAllConditionalCases; - default: - break; - } - return EDivertConditionUnconditional; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -PsCallDivertingCondition PSetCallDivertingWrapperPrivate::convert( - RMobilePhone::TMobilePhoneCFCondition type) -{ - switch (type) { - case RMobilePhone::ECallForwardingUnconditional: - return DivertConditionUnconditional; - case RMobilePhone::ECallForwardingBusy: - return DivertConditionBusy; - case RMobilePhone::ECallForwardingNoReply: - return DivertConditionNoReply; - case RMobilePhone::ECallForwardingNotReachable: - return DivertConditionNotReachable; - case RMobilePhone::ECallForwardingAllCases: - return DivertConditionAllCalls; - case RMobilePhone::ECallForwardingAllConditionalCases: - return DivertConditionAllConditionalCases; - default: - break; - } - return DivertConditionUnknown; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -PsCallDivertingStatus PSetCallDivertingWrapperPrivate::convert( - TDivertingStatus type) -{ - switch (type) { - case EDivertingStatusActive: - return DivertingStatusActive; - case EDivertingStatusInactive: - return DivertingStatusInactive; - case EDivertingStatusNotRegistered: - return DivertingStatusNotRegistered; - case EDivertingStatusNotProvisioned: - return DivertingStatusNotProvisioned; - default: - break; - } - return DivertingStatusUnknown; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -TDivertingStatus PSetCallDivertingWrapperPrivate::convert( - PsCallDivertingStatus type) -{ - switch (type) { - case DivertingStatusActive: - return EDivertingStatusActive; - case DivertingStatusInactive: - return EDivertingStatusInactive; - case DivertingStatusNotRegistered: - return EDivertingStatusNotRegistered; - case DivertingStatusNotProvisioned: - return EDivertingStatusNotProvisioned; - default: - break; - } - return EDivertingStatusUnknown; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -PsCallDivertingStatus PSetCallDivertingWrapperPrivate::convert( - RMobilePhone::TMobilePhoneCFStatus type) -{ - switch (type) { - case RMobilePhone::ECallForwardingStatusActive: - return DivertingStatusActive; - case RMobilePhone::ECallForwardingStatusNotActive: - return DivertingStatusInactive; - case RMobilePhone::ECallForwardingStatusNotRegistered: - return DivertingStatusNotRegistered; - case RMobilePhone::ECallForwardingStatusNotProvisioned: - return DivertingStatusNotProvisioned; - default: - break; - } - return DivertingStatusUnknown; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -PsServiceGroup PSetCallDivertingWrapperPrivate::convert(TServiceGroup type) -{ - PsServiceGroup ret(ServiceGroupAllTeleservices); - ret &= type; - return ret; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -TServiceGroup PSetCallDivertingWrapperPrivate::convert(PsServiceGroup type) -{ - const int tmp = type; - TServiceGroup ret = (TServiceGroup)tmp; - return ret; -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -TDivertingSetting PSetCallDivertingWrapperPrivate::convert( - PsCallDivertingSetting type) -{ - switch(type){ - case ActivateDiverting: - return EActivateDiverting; - case CancelDiverting: - return ECancelDiverting; - case RegisterDiverting: - return ERegisterDiverting; - case EraseDiverting: - return EEraseDiverting; - case CheckStatus: - default: - return ECheckStatus; - } -} - -/*! - PSetCallDivertingWrapperPrivate::convert - */ -PsServiceGroup PSetCallDivertingWrapperPrivate::convert( - RMobilePhone::TMobileService service ) -{ - PsServiceGroup ret(0); - switch (service) { - case RMobilePhone::EAllServices: - ret |= ServiceGroupData; - ret |= ServiceGroupVoice; - ret |= ServiceGroupFax; - break; - case RMobilePhone::EAllTele: - case RMobilePhone::EAllTeleExcSms: - ret |= ServiceGroupVoice; - ret |= ServiceGroupFax; - break; - case RMobilePhone::ECircuitDataService: - case RMobilePhone::EPacketDataService: - case RMobilePhone::EAllDataExSms: - case RMobilePhone::ESyncData: - case RMobilePhone::EAsyncData: - case RMobilePhone::EPacketData: - case RMobilePhone::EAllGprsBearer: - case RMobilePhone::EAllPlmnBearer: - case RMobilePhone::EPlmnBearerServ1: - case RMobilePhone::EPlmnBearerServ2: - case RMobilePhone::EPlmnBearerServ3: - case RMobilePhone::EPlmnBearerServ4: - case RMobilePhone::EPlmnBearerServ5: - case RMobilePhone::EPlmnBearerServ6: - case RMobilePhone::EPlmnBearerServ7: - case RMobilePhone::EPlmnBearerServ8: - case RMobilePhone::EPlmnBearerServ9: - case RMobilePhone::EPlmnBearerServA: - case RMobilePhone::EPlmnBearerServB: - case RMobilePhone::EPlmnBearerServC: - case RMobilePhone::EPlmnBearerServD: - case RMobilePhone::EPlmnBearerServE: - case RMobilePhone::EPlmnBearerServF: - case RMobilePhone::EAllBearer: - case RMobilePhone::EPadAccess: - case RMobilePhone::EAllAsync: - case RMobilePhone::EAllSync: - ret |= ServiceGroupData; - break; - case RMobilePhone::ETelephony: - case RMobilePhone::EVoiceService: - case RMobilePhone::EAuxVoiceService: - case RMobilePhone::EAllPlmnTele: - case RMobilePhone::EPlmnTele1: - case RMobilePhone::EPlmnTele2: - case RMobilePhone::EPlmnTele3: - case RMobilePhone::EPlmnTele4: - case RMobilePhone::EPlmnTele5: - case RMobilePhone::EPlmnTele6: - case RMobilePhone::EPlmnTele7: - case RMobilePhone::EPlmnTele8: - case RMobilePhone::EPlmnTele9: - case RMobilePhone::EPlmnTeleA: - case RMobilePhone::EPlmnTeleB: - case RMobilePhone::EPlmnTeleC: - case RMobilePhone::EPlmnTeleD: - case RMobilePhone::EPlmnTeleE: - case RMobilePhone::EPlmnTeleF: - case RMobilePhone::EAltTele: - ret |= ServiceGroupVoice; - break; - case RMobilePhone::EAllDataTele: - case RMobilePhone::EFaxService: - ret |= ServiceGroupFax; - break; - case RMobilePhone::EVoiceGroupCall: - case RMobilePhone::EVoiceBroadcast: - case RMobilePhone::EShortMessageService: - case RMobilePhone::EServiceUnspecified: - default: - // Not supported, skip - break; - } - return ret; -} - -TVmbxType PSetCallDivertingWrapperPrivate::convert( - PsService aService) -{ - TVmbxType ret = EVmbxNone; - switch (aService) { - case ServiceGroupVoice: - ret = EVmbxVoice; - break; - case ServiceGroupData: - ret = EVmbxVideo; - break; - case ServiceGroupAllTeleservices: - case ServiceGroupFax: - case ServiceGroupUnknown: - default: - ret = EVmbxNone; - break; - } - return ret; -} - -// end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper_p.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper_p.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +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 DIVERTINGOBSERVER_H_ -#define DIVERTINGOBSERVER_H_ - -#include -#include -#include -#include -#include "psetcalldivertingwrapper.h" -#include "psetwrappertypes.h" - -class PSetCallDivertingWrapperPrivate : - public MPsetDivertObserver, - public MPhCltEmergencyCallObserver, - public MPsetRequestObserver -{ -public: - PSetCallDivertingWrapperPrivate(PSetCallDivertingWrapper &owner); - - virtual ~PSetCallDivertingWrapperPrivate(); - -public: - // Functions from base classes (observer interface): - - /** - * Handles showing notes, when diverts change. - * - * @param aSetting Setting which was changed. - * @param aPlural Plural notes to be used. - */ - void HandleDivertingChangedL(const TCallDivertSetting& aSetting, - TBool aPlural); - - /** - * Handles showing of status inquiry notes. - * - * @param aBsc List of basic services. - * @param aSetting Divert setting which was queried. - * @param aPlural Plural notes to be used. - */ - - void HandleDivertingStatusL(CMobilePhoneCFList& aSetting, TBool aPlural); - - /** - * Handles showing of error notes. - * - * @param aReason Reason for diverting error. - */ - void HandleDivertingErrorL(TInt aReason); - - /** - * Handles requesting notes. - * - * @param aOngoing Is there a request going on. - * @param aInterrupted Request needs to immediately cancelled. - */ - void HandleCFRequestingL(TBool aOngoing, TBool aInterrupted); - - /** - * Sets pointer so that message is passed succesfully - * from requester to observer. - * - * @param aDivertEngine Source for the events to observer. - */ - void SetEngineContact(MPsetCallDiverting* aDivertEngine); - -public: - // From MPhCltEmergencyCallObserver - - /** - * It is called whenever client's dial request is completed. - * - * @param aStatus error code of the success of the operation. - */ - void HandleEmergencyDialL(const TInt aStatus); - -public: - // From MPsetRequestObserver - /** - * Informs the receiver that request has been completed. - */ - void RequestComplete(); - - /** - * Informs the receiver that request state has changed. - * @param new status, or when finished KErrNone or error code. - */ - void RequestStatusChanged( TInt aNewStatus ); - -public: - TCallDivertingCondition convert(PsCallDivertingCondition type); - TDivertingStatus convert(PsCallDivertingStatus type); - TServiceGroup convert(PsServiceGroup type); - TDivertingSetting convert(PsCallDivertingSetting type); - TVmbxType convert(PsService aService); - -private: - PsCallDivertingCondition convert(TCallDivertingCondition type); - PsCallDivertingCondition convert(RMobilePhone::TMobilePhoneCFCondition type); - PsCallDivertingStatus convert(TDivertingStatus type); - PsCallDivertingStatus convert(RMobilePhone::TMobilePhoneCFStatus type); - PsServiceGroup convert(TServiceGroup type); - PsServiceGroup convert(RMobilePhone::TMobileService service); - - -private: - PSetCallDivertingWrapper &m_Owner; - - QList m_DivertingStatusList; - - PSCallDivertingCommand m_callDivertingSetting; -}; - -#endif /* DIVERTINGOBSERVER_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +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 "psetcallwaitingwrapper.h" -#include "psetcallwaitingwrapper_p.h" -#include "logging.h" - -/*! - PSetCallWaitingWrapper::PSetCallWaitingWrapper - */ -PSetCallWaitingWrapper::PSetCallWaitingWrapper( - CPsetContainer &psetContainer, - QObject *parent) : - QObject(parent), - m_psetCallWaiting(NULL), - m_privateImpl(new PSetCallWaitingWrapperPrivate(*this)) -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetCallWaiting = - psetContainer.CreateCWObjectL(*m_privateImpl)); - - DPRINT << ": OUT "; -} - -/*! - PSetCallWaitingWrapper::~PSetCallWaitingWrapper - */ -PSetCallWaitingWrapper::~PSetCallWaitingWrapper() -{ - DPRINT << ": IN "; - - delete m_psetCallWaiting; - - DPRINT << ": OUT "; -} - -// -------- Wrapper interface --------- // -/*! - PSetCallWaitingWrapper::setCallWaiting - */ -void PSetCallWaitingWrapper::setCallWaiting(PsCallWaitingCommand aSetting, - int aBasicServiceGroup ) -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetCallWaiting->SetCallWaitingL( - (MPsetCallWaiting::TSetCallWaiting)aSetting, - (TBasicServiceGroups)aBasicServiceGroup)); - - DPRINT << ": OUT "; -} - -/*! - PSetCallWaitingWrapper::getCallWaitingStatus - */ -void PSetCallWaitingWrapper::getCallWaitingStatus() -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetCallWaiting->GetCallWaitingStatusL()); - - DPRINT << ": OUT "; -} - -/*! - PSetCallWaitingWrapper::cancelProcess - */ -void PSetCallWaitingWrapper::cancelProcess() -{ - DPRINT << ": IN "; - - m_psetCallWaiting->CancelProcess(); - - DPRINT << ": OUT "; -} - -/*! - PSetCallWaitingWrapper::getCPsetCallWaiting - */ -CPsetCallWaiting & PSetCallWaitingWrapper::getCPsetCallWaiting() const - { - DPRINT; - - return *m_psetCallWaiting; - } - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper_p.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper_p.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,177 +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 "psetcallwaitingwrapper.h" -#include "psetcallwaitingwrapper_p.h" -#include "logging.h" - -/*! - ConvertToQtType - */ -PSetCallWaitingWrapper::PsCallWaitingStatus ConvertToQtType( - const MPsetCallWaiting::TGetCallWaitingStatus& status) -{ - PSetCallWaitingWrapper::PsCallWaitingStatus convertedType = - PSetCallWaitingWrapper::StatusUnknown; - - switch (status) { - case MPsetCallWaiting::EStatusActive: - convertedType = PSetCallWaitingWrapper::StatusActive; - break; - case MPsetCallWaiting::EStatusDisabled: - convertedType = PSetCallWaitingWrapper::StatusDisabled; - break; - case MPsetCallWaiting::EStatusNotAvailable: - convertedType = PSetCallWaitingWrapper::StatusNotAvailable; - break; - case MPsetCallWaiting::EStatusNotProvisioned: - convertedType = PSetCallWaitingWrapper::StatusNotProvisioned; - break; - case MPsetCallWaiting::EStatusUnknown: - convertedType = PSetCallWaitingWrapper::StatusUnknown; - break; - default: - Q_ASSERT_X(false, "switch default", "unknown enumerator"); - break; - } - - return convertedType; -} - -/*! - ConvertToQtType - */ -PSetCallWaitingWrapper::PsCallWaitingCommand ConvertToQtType( - const MPsetCallWaiting::TSetCallWaiting& callWaitingCommand) -{ - PSetCallWaitingWrapper::PsCallWaitingCommand convertedType = - PSetCallWaitingWrapper::ActivateCallWaiting; - - switch (callWaitingCommand) { - case MPsetCallWaiting::EActivateCallWaiting: - convertedType = PSetCallWaitingWrapper::ActivateCallWaiting; - break; - case MPsetCallWaiting::EDeactivateCallWaiting: - convertedType = PSetCallWaitingWrapper::DeactivateCallWaiting; - break; - default: - Q_ASSERT_X(false, "switch default", "unknown enumerator"); - break; - } - - return convertedType; -} - -/*! - PSetCallWaitingWrapperPrivate::PSetCallWaitingWrapperPrivate - */ -PSetCallWaitingWrapperPrivate::PSetCallWaitingWrapperPrivate( - PSetCallWaitingWrapper &owner ) : m_Owner(owner) -{ - DPRINT; -} - -/*! - PSetCallWaitingWrapperPrivate::~PSetCallWaitingWrapperPrivate - */ -PSetCallWaitingWrapperPrivate::~PSetCallWaitingWrapperPrivate() -{ - DPRINT; -} - -// -------- Observer interface --------- // -/*! - PSetCallWaitingWrapperPrivate::HandleCallWaitingGetStatusL - */ -void PSetCallWaitingWrapperPrivate::HandleCallWaitingGetStatusL( - const MPsetCallWaiting::TGetCallWaitingStatus aStatus, - TUint8 aBsc[KPSetNumberOfBsc] ) -{ - DPRINT << "aStatus:" << aStatus; - - QT_TRYCATCH_LEAVING( - QList basicServiceGroupIds; - int index = 0; - unsigned char groupIdCandidate = aBsc[index]; - while (groupIdCandidate != KPSetUnusedValue) { - basicServiceGroupIds << groupIdCandidate; - groupIdCandidate = aBsc[++index]; - } - - emit m_Owner.handleCallWaitingGetStatus( - ConvertToQtType(aStatus), basicServiceGroupIds ); - ) -} - -/*! - PSetCallWaitingWrapperPrivate::HandleCallWaitingChangedL - */ -void PSetCallWaitingWrapperPrivate::HandleCallWaitingChangedL( - const MPsetCallWaiting::TSetCallWaiting aSetting, - const int aResult ) -{ - DPRINT << "aSetting: " << aSetting - << "aResult" << aResult; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleCallWaitingChanged( - ConvertToQtType(aSetting), - static_cast(aResult) ); - ) -} - -/*! - PSetCallWaitingWrapperPrivate::HandleCWRequestingL - */ -void PSetCallWaitingWrapperPrivate::HandleCWRequestingL( TBool aOngoing, - TBool aInterrupted ) -{ - DPRINT << "aOngoing: " << aOngoing - << " aInterrupted: " << aInterrupted; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleCallWaitingRequesting( - static_cast(aOngoing), - static_cast(aInterrupted) ); - ) -} - -/*! - PSetCallWaitingWrapperPrivate::HandleCWErrorL - */ -void PSetCallWaitingWrapperPrivate::HandleCWErrorL( TInt aError ) -{ - DPRINT << "aError: " << aError; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleCallWaitingError( aError ); - ) -} - -/*! - PSetCallWaitingWrapperPrivate::SetEngineContact - */ -void PSetCallWaitingWrapperPrivate::SetEngineContact( - MPsetCallWaiting& aEngineContact ) -{ - DPRINT << "aEngineContact: " << &aEngineContact; -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper_p.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper_p.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +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 PSETCALLWAITINGWRAPPER_P_H_ -#define PSETCALLWAITINGWRAPPER_P_H_ - -#include - -// Forward declarations -class PSetCallWaitingWrapper; - -class PSetCallWaitingWrapperPrivate: - public MPsetCallWaitingObserver -{ -public: - - PSetCallWaitingWrapperPrivate( PSetCallWaitingWrapper &owner ); - - ~PSetCallWaitingWrapperPrivate(); - -public: // From MPsetCallWaitingObserver - - /** - * Handles notes when requesting Call Waiting status. - * - * @param aStatus Query result. - * @param aBsc is List of active groups. - */ - void HandleCallWaitingGetStatusL( - const MPsetCallWaiting::TGetCallWaitingStatus aStatus, - TUint8 aBsc[KPSetNumberOfBsc] ); - - /** - * Handles notes when Call Waiting has been changed. - * - * @param aSetting Changed setting. - * @param aResult Result of the action. - */ - void HandleCallWaitingChangedL( - const MPsetCallWaiting::TSetCallWaiting aSetting, - const TInt aResult ); - - /** - * Handles requesting notes. - * - * @param aStarted Is there a request going on. - * @param aInterrupted Request needs to be immediately cancelled. - */ - void HandleCWRequestingL( TBool aOngoing, - TBool aInterrupted ); - /** - * Handles errors in call waiting requests. - * - * @param aReason Reason for the error. - */ - void HandleCWErrorL( TInt aReason ); - - /** - * Sets pointer so that message is passed succesfully - * from requester to observer. - * - * @param aEngineContact Source of events to observer. - */ - void SetEngineContact( MPsetCallWaiting& aEngineContact ); - -private: // Data: - PSetCallWaitingWrapper &m_Owner; - -}; - - -#endif /* PSETCALLWAITINGWRAPPER_P_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +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 "psetcliwrapper_p.h" -#include "psetcliwrapper.h" -#include "logging.h" -#include -#include -#include -#include -#include - -/*! - PSetCliWrapper::PSetCliWrapper - */ -PSetCliWrapper::PSetCliWrapper( CPsetContainer &psetContainer, - QObject *parent): QObject(parent), - m_privateImpl(new PSetCliWrapperPrivate(*this)) -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING( - m_psetCli = psetContainer.CreateCliObjectL(*m_privateImpl)); -} - -/*! - PSetCliWrapper::~PSetCliWrapper - */ -PSetCliWrapper::~PSetCliWrapper() -{ - DPRINT << ": IN "; - - delete m_psetCli; - - DPRINT << ": OUT "; -} - -// -------- Wrapper interface --------- // -/*! - PSetCliWrapper::getColpMode - */ -void PSetCliWrapper::getColpMode() -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetCli->GetColpModeL()); - - DPRINT << ": OUT "; -} - -/*! - PSetCliWrapper::getClipMode - */ -void PSetCliWrapper::getClipMode() -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetCli->GetClipModeL()); - - DPRINT << ": OUT "; -} - -/*! - PSetCliWrapper::getClirMode - */ -void PSetCliWrapper::getClirMode() -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetCli->GetClirModeL()); - - DPRINT << ": OUT "; -} - -/*! - PSetCliWrapper::getColrMode - */ -void PSetCliWrapper::getColrMode() -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetCli->GetColrModeL()); - - DPRINT << ": OUT "; -} - -/*! - PSetCliWrapper::getCnap - */ -void PSetCliWrapper::getCnap() -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetCli->GetCnapL()); - - DPRINT << ": OUT "; -} - -/*! - PSetCliWrapper::cancelAll - */ -void PSetCliWrapper::cancelAll() -{ - DPRINT << ": IN "; - - m_psetCli->CancelAll(); - - DPRINT << ": OUT "; -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper_p.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper_p.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +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 "psetcliwrapper_p.h" -#include "psetcliwrapper.h" -#include "psetwrappertypes.h" -#include "logging.h" -#include -#include -#include - -/*! - PSetCliWrapperPrivate::PSetCliWrapperPrivate - */ -PSetCliWrapperPrivate::PSetCliWrapperPrivate( - PSetCliWrapper &owner) : - m_Owner(owner) -{ - DPRINT; -} - -/*! - PSetCliWrapperPrivate::~PSetCliWrapperPrivate - */ -PSetCliWrapperPrivate::~PSetCliWrapperPrivate() -{ - DPRINT; -} - -// -------- Observer interface --------- // -/*! - PSetCliWrapperPrivate::SetEngineContact - */ -void PSetCliWrapperPrivate::SetEngineContact(MPsetCli* aEngine) -{ - DPRINT << "aEngine: " << aEngine; -} - -/*! - PSetCliWrapperPrivate::HandleCliRequestingL - */ -void PSetCliWrapperPrivate::HandleCliRequestingL(TBool aOngoing, - TBool aInterrupted) -{ - DPRINT << "aOngoing: " << aOngoing - << " aInterrupted: " << aInterrupted; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleCliRequesting(static_cast(aOngoing), - static_cast (aInterrupted)); - ) -} - -/*! - PSetCliWrapperPrivate::CliInformationL - */ -void PSetCliWrapperPrivate::CliInformationL(TPsuiCli aType) -{ - DPRINT << "aType: " << aType; - - QT_TRYCATCH_LEAVING( - emit m_Owner.cliInformation(static_cast(aType)); - ) -} - -/*! - PSetCliWrapperPrivate::HandleCliStatusL - */ -void PSetCliWrapperPrivate::HandleCliStatusL( - TUint8 aBsc[KPSetNumberOfBsc], TPsuiCli aMode) -{ - DPRINT << "aBsc[0]: " << aBsc[0] - << " aMode: " << aMode; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleCliStatus(static_cast(aBsc), - KPSetNumberOfBsc, static_cast (aMode)); - ) -} - -/*! - PSetCliWrapperPrivate::HandleCnapStatusL - */ -void PSetCliWrapperPrivate::HandleCnapStatusL(TInt aStatus) -{ - DPRINT << "aStatus: " << aStatus; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleCnapStatus(aStatus); - ) -} - -/*! - PSetCliWrapperPrivate::HandleCliErrorL - */ -void PSetCliWrapperPrivate::HandleCliErrorL(TInt aError) -{ - DPRINT << "aError: " << aError; - - QT_TRYCATCH_LEAVING( - emit m_Owner.handleCliError(aError); - ) -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper_p.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper_p.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +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 PSETCLIWRAPPER_P_H_ -#define PSETCLIWRAPPER_P_H_ - -#include - -class PSetCliWrapper; - -class PSetCliWrapperPrivate : public MPsetCliObserver -{ -public: - PSetCliWrapperPrivate( PSetCliWrapper &owner ); - ~PSetCliWrapperPrivate(); - -public: // From MPsetCliObserver - void SetEngineContact( MPsetCli* aEngine ); - void HandleCliRequestingL( TBool aOngoing, - TBool aInterrupted ); - void CliInformationL( TPsuiCli aType ); - void HandleCliStatusL( TUint8 aBsc[KPSetNumberOfBsc], TPsuiCli aMode ); - void HandleCnapStatusL( TInt aStatus ); - void HandleCliErrorL( TInt aError ); -private: - PSetCliWrapper &m_Owner; -}; - -#endif - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkinfoconverter.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkinfoconverter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +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 "psetnetworkinfoconverter.h" - -/*! - \class NetworkInfoConverter - \brief Offers converting services between Symbian and Qt data types. -*/ - -/*! - NetworkInfoConverter::ConvertToSymbianType - */ -MPsetNetworkSelect::TNetworkInfo NetworkInfoConverter::ConvertToSymbianType( - const PSetNetworkWrapper::NetworkInfo &networkInfo) -{ - MPsetNetworkSelect::TNetworkInfo convertedType; - convertedType.iId = ConvertToSymbianType(networkInfo.m_id); - convertedType.iStatus = ConvertToSymbianType(networkInfo.m_status); - convertedType.iMode = ConvertToSymbianType(networkInfo.m_mode); - convertedType.iAccess = ConvertToSymbianType(networkInfo.m_access); - convertedType.iShortName.Copy(networkInfo.m_shortName.utf16()); - convertedType.iLongName.Copy(networkInfo.m_longName.utf16()); - return convertedType; -} - -/*! - NetworkInfoConverter::ConvertToSymbianType - */ -MPsetNetworkSelect::TNetworkId NetworkInfoConverter::ConvertToSymbianType( - const PSetNetworkWrapper::NetworkId &networkId) -{ - MPsetNetworkSelect::TNetworkId convertedType; - convertedType.iCountryCode.Copy(networkId.m_countryCode.utf16()); - convertedType.iNetworkCode.Copy(networkId.m_networkCode.utf16()); - return convertedType; -} - -/*! - NetworkInfoConverter::ConvertToSymbianType - */ -MPsetNetworkSelect::TNetworkStatus NetworkInfoConverter::ConvertToSymbianType( - const PSetNetworkWrapper::NetworkStatus &networkStatus) -{ - MPsetNetworkSelect::TNetworkStatus convertedType = - MPsetNetworkSelect::ENetStatUnknown; - switch (networkStatus) - { - case PSetNetworkWrapper::StatusUnknown: - convertedType = MPsetNetworkSelect::ENetStatUnknown; - break; - case PSetNetworkWrapper::StatusAvailable: - convertedType = MPsetNetworkSelect::ENetStatAvailable; - break; - case PSetNetworkWrapper::StatusCurrent: - convertedType = MPsetNetworkSelect::ENetStatCurrent; - break; - case PSetNetworkWrapper::StatusForbidden: - convertedType = MPsetNetworkSelect::ENetStatForbidden; - break; - default: - Q_ASSERT_X(false, "switch default", "unknown enumerator"); - break; - } - - return convertedType; -} - -/*! - NetworkInfoConverter::ConvertToSymbianType - */ -MPsetNetworkSelect::TSelectMode NetworkInfoConverter::ConvertToSymbianType( - const PSetNetworkWrapper::NetworkSelectionMode &selectionMode) -{ - MPsetNetworkSelect::TSelectMode convertedType = - MPsetNetworkSelect::ENetSelectModeAutomatic; - switch (selectionMode) - { - case PSetNetworkWrapper::SelectionModeAutomatic: - convertedType = MPsetNetworkSelect::ENetSelectModeAutomatic; - break; - case PSetNetworkWrapper::SelectionModeManual: - convertedType = MPsetNetworkSelect::ENetSelectModeManual; - break; - default: - Q_ASSERT_X(false, "switch default", "unknown enumerator"); - break; - } - - return convertedType; -} - -/*! - NetworkInfoConverter::ConvertToSymbianType - */ -MPsetNetworkSelect::TNetworkAccess NetworkInfoConverter::ConvertToSymbianType( - const PSetNetworkWrapper::NetworkAccessType &accessType) -{ - MPsetNetworkSelect::TNetworkAccess convertedType = - MPsetNetworkSelect::ENetNetworkGSM; - switch (accessType) - { - case PSetNetworkWrapper::AccessTypeGsm: - convertedType = MPsetNetworkSelect::ENetNetworkGSM; - break; - case PSetNetworkWrapper::AccessTypeWcdma: - convertedType = MPsetNetworkSelect::ENetNetworkWCDMA; - break; - default: - Q_ASSERT_X(false, "switch default", "unknown enumerator"); - break; - } - - return convertedType; -} - -/*! - NetworkInfoConverter::ConvertToQtType - */ -PSetNetworkWrapper::NetworkSelectionMode NetworkInfoConverter::ConvertToQtType( - const MPsetNetworkSelect::TSelectMode &selectMode) -{ - PSetNetworkWrapper::NetworkSelectionMode convertedType = - PSetNetworkWrapper::SelectionModeAutomatic; - switch (selectMode) - { - case MPsetNetworkSelect::ENetSelectModeAutomatic: - convertedType = PSetNetworkWrapper::SelectionModeAutomatic; - break; - case MPsetNetworkSelect::ENetSelectModeManual: - convertedType = PSetNetworkWrapper::SelectionModeManual; - break; - default: - Q_ASSERT_X(false, "switch default", "unknown enumerator"); - break; - } - - return convertedType; -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkinfoconverter.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkinfoconverter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +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 PSETNETWORKINFOCONVERTER_H -#define PSETNETWORKINFOCONVERTER_H - -#include -#include - -class NetworkInfoConverter -{ -public: - - static MPsetNetworkSelect::TNetworkInfo ConvertToSymbianType( - const PSetNetworkWrapper::NetworkInfo &networkInfo); - - static MPsetNetworkSelect::TNetworkId ConvertToSymbianType( - const PSetNetworkWrapper::NetworkId &networkId); - - static MPsetNetworkSelect::TNetworkStatus ConvertToSymbianType( - const PSetNetworkWrapper::NetworkStatus &networkStatus); - - static MPsetNetworkSelect::TSelectMode ConvertToSymbianType( - const PSetNetworkWrapper::NetworkSelectionMode &selectionMode); - - static MPsetNetworkSelect::TNetworkAccess ConvertToSymbianType( - const PSetNetworkWrapper::NetworkAccessType &accessType); - - static PSetNetworkWrapper::NetworkSelectionMode ConvertToQtType( - const MPsetNetworkSelect::TSelectMode &selectMode); -}; - -#endif // PSETNETWORKINFOCONVERTER_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,232 +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 "psetnetworkwrapper.h" -#include "psetnetworkwrapper_p.h" -#include "logging.h" - -/*! - \class PSetNetworkWrapper - \brief TODO: description -*/ - -/*! - \enum PSetNetworkWrapper::ErrorCode - - This enumeration defines error codes used by PSetNetworkWrapper. -*/ -/*! - \var PSetNetworkWrapper::ErrNoError - Indicates that no error has happened. -*/ - -// TODO: better commenting for NetworkAccessMode enumeration -/*! - \enum NetworkAccessMode - This enumeration defines possible network access modes. -*/ -/*! - \var PSetNetworkWrapper::AccessModeDual - Dual mode. -*/ -/*! - \var PSetNetworkWrapper::AccessModeUmts - 3g/UMTS network mode. -*/ -/*! - \var PSetNetworkWrapper::AccessModeGsm - 2g/GSM network mode. -*/ - -/*! - \struct PSetNetworkWrapper::NetworkId - NetworkId contains network and country identifiers. -*/ -// TODO: is that valid way to document struct members -/*! - \var PSetNetworkWrapper::NetworkId::m_countryCode - Country code. Maximum length is 4. -*/ -/*! - \var PSetNetworkWrapper::NetworkId::m_networkCode - Network code. Maximum length is 8. -*/ - -/*! - \enum PSetNetworkWrapper::NetworkSelectionMode - Network selection mode. -*/ -/*! - \var PSetNetworkWrapper::SelectionModeManual - Specific network is selected manually. -*/ -/*! - \var PSetNetworkWrapper::SelectionModeAutomatic - Network is selected automatically without user interaction. -*/ - -/*! - \enum PSetNetworkWrapper::NetworkStatus - Status of a network. -*/ -// TODO: enumerator comments -/*! - \var PSetNetworkWrapper::StatusUnknown -*/ -/*! - \var PSetNetworkWrapper::StatusAvailable -*/ -/*! - \var PSetNetworkWrapper::StatusCurrent -*/ -/*! - \var PSetNetworkWrapper::StatusForbidden -*/ - -/*! - \enum PSetNetworkWrapper::NetworkAccessType - Network access type. -*/ -// TODO: enumerator comments -/*! - \var PSetNetworkWrapper::AccessTypeGsm -*/ -/*! - \var PSetNetworkWrapper::AccessTypeWcdma -*/ - -/*! - \struct PSetNetworkWrapper::NetworkInfo - Encapsulates information about network. -*/ -// TODO: struct member commenting - -/*! void PSetNetworkWrapper::networkAccessModeGot( - PSetNetworkWrapper::NetworkAccessMode mode) - - This signal is emitted when the current network access mode query has been - completed. -*/ - -/*! - PSetNetworkWrapper::PSetNetworkWrapper - */ -PSetNetworkWrapper::PSetNetworkWrapper( - CPsetContainer &psetContainer, QObject *parent) - : - QObject(parent), - m_privateImpl(new PSetNetworkWrapperPrivate(*this, psetContainer)) -{ - DPRINT << ": IN"; - - DPRINT << ": OUT"; -} - -/*! - PSetNetworkWrapper::~PSetNetworkWrapper - */ -PSetNetworkWrapper::~PSetNetworkWrapper() -{ - DPRINT << ": IN"; - - delete m_privateImpl; - - DPRINT << ": OUT"; -} - -/*! - Puts network retrieve results into array. -*/ -void PSetNetworkWrapper::getAvailableNetworks() -{ - DPRINT; - - m_privateImpl->getAvailableNetworks(); -} - -/*! - Returns current network selection mode. - - \param aMode Network selection mode. - \return Error code. -*/ -PSetNetworkWrapper::ErrorCode PSetNetworkWrapper::getNetworkSelectionMode( - PSetNetworkWrapper::NetworkSelectionMode& mode) const -{ - DPRINT; - - return m_privateImpl->getNetworkSelectionMode(mode); -} - -/*! - Selects network, also for selecting automatic/manual mode. - \param aInfo Network information. -*/ -void PSetNetworkWrapper::selectNetwork( - const PSetNetworkWrapper::NetworkInfo& info) -{ - DPRINT; - - m_privateImpl->selectNetwork(info); -} - -/*! - Cancels ongoing request if any. -*/ -void PSetNetworkWrapper::cancelRequest() -{ - DPRINT; - - m_privateImpl->cancelRequest(); -} - -/*! - Starts to query network access mode. Result is informed with a - networkAccessModeGot() signal. -*/ -void PSetNetworkWrapper::getNetworkAccessMode() const -{ - DPRINT; - - m_privateImpl->getNetworkAccessMode(); -} - -/*! - Sets network access mode. - \param mode Network access mode. - \return ErrorCode. -*/ -void PSetNetworkWrapper::setNetworkAccessMode( - PSetNetworkWrapper::NetworkAccessMode mode) -{ - DPRINT; - - m_privateImpl->setNetworkAccessMode(mode); -} - -/*! - Is manual network selection supported. -*/ -bool PSetNetworkWrapper::isManualNetworkSelectionSupported() const -{ - DPRINT; - - return m_privateImpl->isManualNetworkSelectionSupported(); -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,525 +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 "psetnetworkwrapper_p.h" -#include "logging.h" -#include "psetnetworkinfoconverter.h" - -/*! - \class PSetNetworkWrapperPrivate - \brief Private implementation for network wrapper. -*/ - -/*! - PSetNetworkWrapperPrivate::PSetNetworkWrapperPrivate - */ -PSetNetworkWrapperPrivate::PSetNetworkWrapperPrivate( - PSetNetworkWrapper &owner, - CPsetContainer &psetContainer) - : - m_owner(owner), - m_psetNetwork(NULL), - m_psetNetworkMode(NULL) -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING( - m_psetNetwork.reset(psetContainer.CreateNetworkObjectL(*this))); - m_psetNetwork->SetNetworkModeObserver(*this); - m_psetNetwork->SetNetSAObserver(*this); - QT_TRAP_THROWING( - m_psetNetworkMode.reset(psetContainer.CreateNetworkModeObjectL(*this))); - QT_TRAP_THROWING( - m_refreshHandler.reset(psetContainer.CreateRefreshHandlerL())); - QT_TRAP_THROWING(m_refreshHandler->NotifyFileChangeL( - *this, - KCsp1Ef, - EFileChangeNotification)); - - QT_TRAP_THROWING(m_csp.reset(CPsetCustomerServiceProfile::NewL())); - QT_TRAP_THROWING(m_csp->OpenCSProfileL()); - - DPRINT << ": OUT "; -} - -/*! - PSetNetworkWrapperPrivate::~PSetNetworkWrapperPrivate - */ -PSetNetworkWrapperPrivate::~PSetNetworkWrapperPrivate() -{ - DPRINT << ": IN "; - - while (!m_networkInfoList.isEmpty()) { - DPRINT << " delete : " << m_networkInfoList.first()->m_longName; - delete m_networkInfoList.takeFirst(); - } - m_networkInfoList.clear(); - - DPRINT << ": OUT "; -} - -/*! - PSetNetworkWrapperPrivate::getAvailableNetworks. -*/ -void PSetNetworkWrapperPrivate::getAvailableNetworks() -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetNetwork->GetAvailableNetworksL()); - - DPRINT << ": OUT "; -} - -/*! - PSetNetworkWrapperPrivate::getNetworkSelectionMode -*/ -PSetNetworkWrapper::ErrorCode - PSetNetworkWrapperPrivate::getNetworkSelectionMode( - PSetNetworkWrapper::NetworkSelectionMode& mode) const -{ - DPRINT; - - MPsetNetworkSelect::TSelectMode selectMode = - MPsetNetworkSelect::ENetSelectModeAutomatic; - int result = m_psetNetwork->GetNetworkSelectMode(selectMode); - mode = NetworkInfoConverter::ConvertToQtType(selectMode); - - return ConvertToQtErrorCode(result); -} - -/*! - PSetNetworkWrapperPrivate::selectNetwork. - */ -void PSetNetworkWrapperPrivate::selectNetwork( - const PSetNetworkWrapper::NetworkInfo& info) -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetNetwork->SelectNetworkL( - NetworkInfoConverter::ConvertToSymbianType(info))); - - DPRINT << ": OUT "; -} - -/*! - PSetNetworkWrapperPrivate::cancelRequest -*/ -void PSetNetworkWrapperPrivate::cancelRequest() -{ - DPRINT; - - m_psetNetwork->CancelProcess(); -} - -/*! - PSetNetworkWrapperPrivate::getNetworkAccessMode -*/ -void PSetNetworkWrapperPrivate::getNetworkAccessMode() const -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING( - m_psetNetwork->GetCurrentNetworkModeSelectionL()); - - DPRINT << ": OUT "; -} - -/*! - PSetNetworkWrapperPrivate::setNetworkAccessMode -*/ -void PSetNetworkWrapperPrivate::setNetworkAccessMode( - PSetNetworkWrapper::NetworkAccessMode mode) -{ - DPRINT << ": IN "; - - RMmCustomAPI::TNetworkModeCaps modeCaps = - RMmCustomAPI::KCapsNetworkModeDual; - switch (mode) { - case PSetNetworkWrapper::AccessModeDual: - modeCaps = RMmCustomAPI::KCapsNetworkModeDual; - break; - case PSetNetworkWrapper::AccessModeUmts: - modeCaps = RMmCustomAPI::KCapsNetworkModeUmts; - break; - case PSetNetworkWrapper::AccessModeGsm: - modeCaps = RMmCustomAPI::KCapsNetworkModeGsm; - break; - default: - Q_ASSERT_X(false, "switch default", "unknown enumerator"); - } - - QT_TRAP_THROWING(m_psetNetwork->SetNetworkModeSelectionL( - reinterpret_cast(modeCaps))); - - DPRINT << ": OUT "; -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleNetworkInfoReceivedL( - const CNetworkInfoArray* aInfoArray, - const TInt aResult) -{ - DPRINT << ": IN "; - - Q_UNUSED(aResult); - __ASSERT_DEBUG(NULL != aInfoArray, User::Leave(KErrArgument)); - - // delete qlist - while (!m_networkInfoList.isEmpty()) { - DPRINT << " delete : " << m_networkInfoList.first()->m_longName; - delete m_networkInfoList.takeFirst(); - } - m_networkInfoList.clear(); - - const int itemsCount = aInfoArray->Count(); - - //then insert found networks - for(int i = 0; i < itemsCount; i++) - { - PSetNetworkWrapper::NetworkInfo *info = - new (ELeave) PSetNetworkWrapper::NetworkInfo; - - info->m_id.m_countryCode = QString::fromUtf16( - aInfoArray->At(i).iId.iCountryCode.Ptr(), - aInfoArray->At(i).iId.iCountryCode.Length()); - info->m_id.m_networkCode = QString::fromUtf16( - aInfoArray->At(i).iId.iNetworkCode.Ptr(), - aInfoArray->At(i).iId.iNetworkCode.Length()); - info->m_status = - static_cast( - aInfoArray->At(i).iStatus); - info->m_mode = - static_cast( - aInfoArray->At(i).iMode); - info->m_access = - static_cast( - aInfoArray->At(i).iAccess); - info->m_shortName = - QString::fromUtf16( - aInfoArray->At(i).iShortName.Ptr(), - aInfoArray->At(i).iShortName.Length()); - info->m_longName = - QString::fromUtf16( - aInfoArray->At(i).iLongName.Ptr(), - aInfoArray->At(i).iLongName.Length()); - - m_networkInfoList.append(info); - } - - QT_TRYCATCH_LEAVING( - emit m_owner.availableNetworksGot(m_networkInfoList); - ) - - DPRINT << ": OUT "; -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleCurrentNetworkInfoL( - const MPsetNetworkSelect::TCurrentNetworkInfo& aCurrentInfo, - const TInt aResult) -{ - DPRINT; - - Q_UNUSED(aCurrentInfo); - Q_UNUSED(aResult); -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleNetworkChangedL( - const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, - const MPsetNetworkSelect::TCurrentNetworkStatus aStatus, - const TInt aResult) -{ - DPRINT; - - Q_UNUSED(aCurrentInfo); - Q_UNUSED(aStatus); - Q_UNUSED(aResult); -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleNetworkChangedL( - const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, - const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus, - const TInt aResult) -{ - DPRINT << ": IN "; - - Q_UNUSED(aResult); - - PSetNetworkWrapper::NetworkInfo info; - info.m_id.m_countryCode = QString::fromUtf16( - aCurrentInfo.iId.iCountryCode.Ptr(), - aCurrentInfo.iId.iCountryCode.Length()); - info.m_id.m_networkCode = QString::fromUtf16( - aCurrentInfo.iId.iNetworkCode.Ptr(), - aCurrentInfo.iId.iNetworkCode.Length()); - info.m_status = - static_cast( - aCurrentInfo.iStatus); - info.m_mode = - static_cast( - aCurrentInfo.iMode); - info.m_access = - static_cast( - aCurrentInfo.iAccess); - info.m_shortName = - QString::fromUtf16( - aCurrentInfo.iShortName.Ptr(), - aCurrentInfo.iShortName.Length()); - info.m_longName = - QString::fromUtf16( - aCurrentInfo.iLongName.Ptr(), - aCurrentInfo.iLongName.Length()); - - PSetNetworkWrapper::RegistrationStatus status; - switch (aStatus){ - case RMobilePhone::ERegisteredOnHomeNetwork: - status = PSetNetworkWrapper::RegisteredOnHomeNetwork; - break; - case RMobilePhone::ERegisteredRoaming: - status = PSetNetworkWrapper::RegisteredRoaming; - break; - } - - QT_TRYCATCH_LEAVING( - emit m_owner.networkChanged(info, status); - ) - - DPRINT << ": OUT "; -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleSearchingNetworksL( - MPsetNetworkInfoObserver::TServiceRequest aRequest) -{ - DPRINT << ": IN "; - - PSetNetworkWrapper::RequestType type = - static_cast(aRequest); - QT_TRYCATCH_LEAVING( - emit m_owner.searchingNetworks(type); - ) - - DPRINT << ": OUT "; -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleRequestingSelectedNetworkL( - TBool aOngoing) -{ - DPRINT << ": IN "; - - QT_TRYCATCH_LEAVING( - emit m_owner.requestingSelectedNetwork( - static_cast(aOngoing)); - ) - - DPRINT << ": OUT "; -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleCallActivatedL() -{ - DPRINT; -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleNetworkErrorL( - const MPsetNetworkInfoObserver::TServiceRequest aRequest, - const TInt aError) -{ - DPRINT << ": IN "; - - PSetNetworkWrapper::ErrorCode error; - switch(aError) { - case KErrGsmNetCauseCallActive: - error = PSetNetworkWrapper::ErrCauseCallActive; - break; - case KErrGsm0707NoNetworkService: - error = PSetNetworkWrapper::ErrNoNetworkService; - break; - case KErrGsmOfflineOpNotAllowed: - error = PSetNetworkWrapper::ErrOfflineOpNotAllowed; - break; - default: - error = PSetNetworkWrapper::ErrNoNetworkAccess; - break; - } - - QT_TRYCATCH_LEAVING( - emit m_owner.networkReqestFailed( - error, static_cast(aRequest)); - ) -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleNetworkSystemModeEventsL( - const MPsetNetworkModeObserver::TServiceRequest aRequest, - const TUint32 aNetworkModeCaps) -{ - DPRINT; - - switch (aRequest) { - case MPsetNetworkModeObserver::EServiceRequestNone: - // TODO: what to do with this kind of event - break; - case MPsetNetworkModeObserver::EServiceRequestSetSelectedNetworkMode: - // TODO: implement this - break; - case MPsetNetworkModeObserver::EServiceRequestGetCurrentNetworkMode: { - PSetNetworkWrapper::NetworkAccessMode mode = - PSetNetworkWrapper::AccessModeDual; - if (aNetworkModeCaps & RMmCustomAPI::KCapsNetworkModeDual) { - mode = PSetNetworkWrapper::AccessModeDual; - } else if - (aNetworkModeCaps & RMmCustomAPI::KCapsNetworkModeUmts) { - mode = PSetNetworkWrapper::AccessModeUmts; - } else if - (aNetworkModeCaps & RMmCustomAPI::KCapsNetworkModeGsm) { - mode = PSetNetworkWrapper::AccessModeGsm; - } else { - Q_ASSERT(false); - } - QT_TRYCATCH_LEAVING( - emit m_owner.networkAccessModeGot(static_cast(mode)); - ) - - } - break; - default: - Q_ASSERT_X(false, "switch default", "unknown enumerator"); - } -} - -/*! - From MPsetNetworkInfoObserver. - \see MPsetNetworkInfoObserver. -*/ -void PSetNetworkWrapperPrivate::HandleNetworkErrorL( - const MPsetNetworkModeObserver::TServiceRequest aRequest, - const TInt aError) -{ - DPRINT; - - Q_UNUSED(aRequest); - Q_UNUSED(aError); -} - -/*! - PSetNetworkWrapperPrivate::ConvertToQtErrorCode -*/ -PSetNetworkWrapper::ErrorCode PSetNetworkWrapperPrivate::ConvertToQtErrorCode( - TInt symbianErrorCode) const -{ - // TODO: do proper conversion for error codes - if (KErrNone == symbianErrorCode) { - return PSetNetworkWrapper::ErrNoError; - } else { - return PSetNetworkWrapper::ErrGeneral; - } -} - -/*! - PSetNetworkWrapperPrivate::isManualNetworkSelectionSupported -*/ -bool PSetNetworkWrapperPrivate::isManualNetworkSelectionSupported() const -{ - DPRINT << ": IN "; - - TBool settingSupported(EFalse); - TInt retVal = m_csp->IsNetworkSelectionSupported(settingSupported); - - if ( retVal != KErrNone ) - { - //if a CSP error occurs, by default service is available - settingSupported = ETrue; - } - - DPRINT << ": OUT "; - return settingSupported; -} - -/*! - PSetNetworkWrapperPrivate::AllowRefresh -*/ -TBool PSetNetworkWrapperPrivate::AllowRefresh( - const TSatRefreshType aType, - const TSatElementaryFiles aFiles ) -{ - DPRINT << "aType: " << aType; - DPRINT << "aFiles: " << aFiles; - - return ETrue; -} - -/*! - PSetNetworkWrapperPrivate::Refresh -*/ -void PSetNetworkWrapperPrivate::Refresh( - const TSatRefreshType aType, - const TSatElementaryFiles aFiles ) -{ - DPRINT << "aType: " << aType; - DPRINT << "aFiles: " << aFiles; - - if ((aType != EFileChangeNotification) || - ((aType == EFileChangeNotification) && - (aFiles == KCsp1Ef))) { - TBool networkSelectionSupported; - if (KErrNone == m_csp->IsNetworkSelectionSupported(networkSelectionSupported)) { - DPRINT << "networkSelectionSupported " << networkSelectionSupported; - emit m_owner.chageVisbilityOfManualNetworkSelection(networkSelectionSupported); - } - } - - DPRINT << ": OUT"; -} - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +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 PSETNETWORKWRAPPERPRIVATE_H -#define PSETNETWORKWRAPPERPRIVATE_H - -#include -#include -#include -#include -#include -#include "psetnetworkwrapper.h" - -class PSetNetworkWrapper; -class CPsetContainer; -class CPsetNetwork; -class CPsetCustomerServiceProfile; -class CPSetRefreshHandler; - -class PSetNetworkWrapperPrivate - : - public MPsetNetworkInfoObserver, - public MPsetNetworkModeObserver, - public MSSSettingsRefreshObserver -{ -public: - - PSetNetworkWrapperPrivate( - PSetNetworkWrapper &owner, - CPsetContainer &psetContainer); - - virtual ~PSetNetworkWrapperPrivate(); - -public: - - void getAvailableNetworks(); - - PSetNetworkWrapper::ErrorCode getNetworkSelectionMode( - PSetNetworkWrapper::NetworkSelectionMode& mode) const; - - void selectNetwork( - const PSetNetworkWrapper::NetworkInfo& info); - - void cancelRequest(); - -public: - - void getNetworkAccessMode() const; - - void setNetworkAccessMode(PSetNetworkWrapper::NetworkAccessMode mode); - - bool isManualNetworkSelectionSupported() const; - -public: // From MPsetNetworkInfoObserver - - void HandleNetworkInfoReceivedL( - const CNetworkInfoArray* aInfoArray, - const TInt aResult ); - - void HandleCurrentNetworkInfoL( - const MPsetNetworkSelect::TCurrentNetworkInfo& aCurrentInfo, - const TInt aResult ); - - void HandleNetworkChangedL( - const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, - const MPsetNetworkSelect::TCurrentNetworkStatus aStatus, - const TInt aResult ); - - void HandleNetworkChangedL( - const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, - const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus, - const TInt aResult ); - - void HandleSearchingNetworksL( - MPsetNetworkInfoObserver::TServiceRequest aRequest ); - - void HandleRequestingSelectedNetworkL( - TBool aOngoing ); - - void HandleCallActivatedL(); - - void HandleNetworkErrorL( - const MPsetNetworkInfoObserver::TServiceRequest aRequest, - const TInt aError ); - -public: // From MPsetNetworkModeObserver - - void HandleNetworkSystemModeEventsL( - const MPsetNetworkModeObserver::TServiceRequest aRequest, - const TUint32 aNetworkModeCaps ); - - void HandleNetworkErrorL( - const MPsetNetworkModeObserver::TServiceRequest aRequest, - const TInt aError ); - -public: // From MSSSettingsRefreshObserver - - TBool AllowRefresh( - const TSatRefreshType aType, - const TSatElementaryFiles aFiles ); - - void Refresh( - const TSatRefreshType aType, - const TSatElementaryFiles aFiles ); - -private: - - PSetNetworkWrapper::ErrorCode ConvertToQtErrorCode( - TInt symbianErrorCode) const; - -private: - - /*! Owner. */ - PSetNetworkWrapper &m_owner; - - // TODO: better comments - /*! Own. Network object used to observe network information. */ - QScopedPointer m_psetNetwork; - - /*! Own. Network object used to observe network mode changes. */ - QScopedPointer m_psetNetworkMode; - - QList m_networkInfoList; - - /*! Own. */ - QScopedPointer m_csp; - - /*! Own. */ - QScopedPointer m_refreshHandler; - -}; - -#endif // PSETNETWORKWRAPPERPRIVATE_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +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 "psetwrapper.h" -#include "psetcliwrapper.h" -#include "psetcallwaitingwrapper.h" -#include "psetcalldivertingwrapper.h" -#include "psetnetworkwrapper.h" -#include "psetcallbarringwrapper.h" -#include "logging.h" - -/*! - PSetWrapper::PSetWrapper - */ -PSetWrapper::PSetWrapper(QObject *parent) : - QObject(parent), - m_psetContainer(NULL), - m_wrapperCli(NULL), - m_callWaitingWrapper(NULL), - m_callDivertingWrapper(NULL), - m_networkWrapper(NULL), - m_callBarringWrapper(NULL) -{ - DPRINT << ": IN "; - - QT_TRAP_THROWING(m_psetContainer = CPsetContainer::NewL()); - - DPRINT << ": OUT "; -} - -/*! - PSetWrapper::~PSetWrapper - */ -PSetWrapper::~PSetWrapper() -{ - DPRINT << ": IN "; - - delete m_wrapperCli; - delete m_callWaitingWrapper; - delete m_callDivertingWrapper; - delete m_networkWrapper; - delete m_callBarringWrapper; - delete m_psetContainer; - - DPRINT << ": OUT "; -} - -/*! - PSetWrapper::cliWrapper - */ -PSetCliWrapper& PSetWrapper::cliWrapper() -{ - DPRINT; - - if (!m_wrapperCli) { - m_wrapperCli = new PSetCliWrapper(*m_psetContainer, this); - Q_CHECK_PTR(m_wrapperCli); - } - - return *m_wrapperCli; -} - -/*! - PSetWrapper::callWaitingWrapper - */ -PSetCallWaitingWrapper& PSetWrapper::callWaitingWrapper() -{ - DPRINT; - - if (!m_callWaitingWrapper) { - m_callWaitingWrapper = - new PSetCallWaitingWrapper(*m_psetContainer, this); - Q_CHECK_PTR(m_callWaitingWrapper); - } - - return *m_callWaitingWrapper; -} - -/*! - PSetWrapper::callDivertingWrapper - */ -PSetCallDivertingWrapper& PSetWrapper::callDivertingWrapper() -{ - DPRINT; - - if (!m_callDivertingWrapper) { - m_callDivertingWrapper = - new PSetCallDivertingWrapper(*m_psetContainer, this); - Q_CHECK_PTR(m_callDivertingWrapper); - } - - return *m_callDivertingWrapper; -} - -/*! - PSetWrapper::networkWrapper - */ -PSetNetworkWrapper& PSetWrapper::networkWrapper() -{ - DPRINT; - - if (!m_networkWrapper) { - m_networkWrapper = new PSetNetworkWrapper(*m_psetContainer, this); - Q_CHECK_PTR(m_networkWrapper); - } - - return *m_networkWrapper; -} - -/*! - PSetWrapper::callBarringWrapper - */ -PSetCallBarringWrapper& PSetWrapper::callBarringWrapper() -{ - DPRINT; - - if (!m_callBarringWrapper) { - m_callBarringWrapper = - new PSetCallBarringWrapper(*m_psetContainer, this); - } - - return *m_callBarringWrapper; -} - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/src/psetwrapper_s.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetwrapper_s.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,292 +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 "psetwrapper.h" -#include "psetcliwrapper.h" -#include "psetcallwaitingwrapper.h" -#include "psetcalldivertingwrapper.h" -#include "psetnetworkwrapper.h" -#include "psetcallbarringwrapper.h" -#include "logging.h" - - -PSetWrapper::PSetWrapper(QObject *parent): - QObject(parent), - m_wrapperCli(NULL), - m_callWaitingWrapper(NULL), - m_callDivertingWrapper(NULL), - m_networkWrapper(NULL) -{ - DPRINT << "DUMMY WRAPPER"; -} - -PSetWrapper::~PSetWrapper() -{ - DPRINT << "DUMMY WRAPPER"; - - delete m_wrapperCli; - delete m_callWaitingWrapper; - delete m_callDivertingWrapper; - delete m_networkWrapper; - -} - -PSetCliWrapper& PSetWrapper::cliWrapper() -{ - DPRINT << "DUMMY WRAPPER"; - - if( !m_wrapperCli ){ - m_wrapperCli = new PSetCliWrapper(*m_psetContainer, this); - } - - return *m_wrapperCli; -} - - -PSetCallWaitingWrapper& PSetWrapper::callWaitingWrapper() -{ - DPRINT << "DUMMY WRAPPER"; - - if( !m_callWaitingWrapper ){ - m_callWaitingWrapper = new PSetCallWaitingWrapper(*m_psetContainer, this); - } - - return *m_callWaitingWrapper; -} - - -PSetCallDivertingWrapper& PSetWrapper::callDivertingWrapper() -{ - DPRINT << "DUMMY WRAPPER"; - - if( !m_callWaitingWrapper ){ - m_callDivertingWrapper = new PSetCallDivertingWrapper(*m_psetContainer, this); - } - - return *m_callDivertingWrapper; -} - -PSetNetworkWrapper& PSetWrapper::networkWrapper() -{ - DPRINT << "DUMMY WRAPPER"; - - if (!m_networkWrapper) { - m_networkWrapper = new PSetNetworkWrapper(*m_psetContainer, this); - } - - return *m_networkWrapper; -} - -class PSetCliWrapperPrivate { - PSetCliWrapperPrivate(){} -}; - -PSetCliWrapper::PSetCliWrapper( CPsetContainer &psetContainer, - QObject *parent): - QObject(parent), m_privateImpl(NULL) -{ - DPRINT << "DUMMY WRAPPER"; -} - -PSetCliWrapper::~PSetCliWrapper() -{ - DPRINT << "DUMMY WRAPPER"; -} - -// -------- Wrapper interface --------- // -void PSetCliWrapper::getColpMode() -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCliWrapper::getClipMode() -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCliWrapper::getClirMode() -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCliWrapper::getColrMode() -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCliWrapper::getCnap() -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCliWrapper::cancelAll() -{ - DPRINT << "DUMMY WRAPPER"; -} - -class PSetCallWaitingWrapperPrivate { - PSetCallWaitingWrapperPrivate(){} -}; - -PSetCallWaitingWrapper::PSetCallWaitingWrapper( - CPsetContainer &psetContainer, - QObject *parent) : QObject(parent), m_privateImpl(NULL) -{ - DPRINT << "DUMMY WRAPPER"; -} - -PSetCallWaitingWrapper::~PSetCallWaitingWrapper() -{ - DPRINT << "DUMMY WRAPPER"; -} - -// -------- Wrapper interface --------- // -void PSetCallWaitingWrapper::setCallWaiting( PsCallWaitingCommand aSetting, - int aBasicServiceGroup ) -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCallWaitingWrapper::getCallWaitingStatus() -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCallWaitingWrapper::cancelProcess() -{ - DPRINT << "DUMMY WRAPPER"; -} - -PSetCallDivertingWrapper::PSetCallDivertingWrapper( - CPsetContainer &psetContainer, QObject *parent) : - QObject(parent), m_DefaultNumberListCDes(NULL) -{ - DPRINT << "DUMMY WRAPPER"; -} - -PSetCallDivertingWrapper::~PSetCallDivertingWrapper() -{ - DPRINT << "DUMMY WRAPPER"; -} - -// -------- Wrapper interface --------- // - -int PSetCallDivertingWrapper::setCallDiverting( - PSCallDivertingCommand& aSetting, int aBasicServiceGroup) -{ - DPRINT << "DUMMY WRAPPER"; - return 0; -} - -void PSetCallDivertingWrapper::getCallDivertingStatus( - const PsServiceGroup aServiceGroup, const PsCallDivertingCondition aCondition, - int aBsc) -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCallDivertingWrapper::cancelProcess() -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetCallDivertingWrapper::getDefaultNumbers(QStringList &aDefNumbers) -{ - DPRINT << "DUMMY WRAPPER"; - aDefNumbers = m_DefaultnumberListQSList; -} - -void PSetCallDivertingWrapper::setNewDefaultNumber(QString aNumber) -{ - DPRINT << "DUMMY WRAPPER"; - m_DefaultnumberListQSList.append(aNumber); -} - -void PSetCallDivertingWrapper::getVoiceMailBoxNumber(QString &/*aVmbxNumber*/) -{ - DPRINT << "DUMMY WRAPPER"; -} - -PSetNetworkWrapper::PSetNetworkWrapper( - CPsetContainer &psetContainer, QObject *parent) - : QObject(parent) -{ - DPRINT << "DUMMY WRAPPER"; -} - -PSetNetworkWrapper::~PSetNetworkWrapper() -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetNetworkWrapper::getNetworkAccessMode() const -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetNetworkWrapper::setNetworkAccessMode( - PSetNetworkWrapper::NetworkAccessMode mode) -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetNetworkWrapper::getAvailableNetworks() -{ - DPRINT << "DUMMY WRAPPER"; -} - -PSetNetworkWrapper::ErrorCode PSetNetworkWrapper::getNetworkSelectionMode( - PSetNetworkWrapper::NetworkSelectionMode& mode) const -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetNetworkWrapper::selectNetwork( - const PSetNetworkWrapper::NetworkInfo& info) -{ - DPRINT << "DUMMY WRAPPER"; -} - -void PSetNetworkWrapper::cancelRequest() -{ - DPRINT << "DUMMY WRAPPER"; -} - -class PSetCallBarringWrapperPrivate { -public: - PSetCallBarringWrapperPrivate() {} - ~PSetCallBarringWrapperPrivate() {} -}; - -PSetCallBarringWrapper::PSetCallBarringWrapper( - CPsetContainer &psetContainer, - QObject *parent) - : - QObject(parent) -{ - DPRINT << "DUMMY PSetCallBarringWrapper"; -} - - -PSetCallBarringWrapper::~PSetCallBarringWrapper() -{ - DPRINT << "DUMMY PSetCallBarringWrapper"; -} - - -// End of File. diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/qtestmains60.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/qtestmains60.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +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 QTESTMAINS60 -#define QTESTMAINS60 - -#define QTEST_MAIN_S60(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ -char *new_argv[3]; \ -QCoreApplication app(argc, argv); \ -\ -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(); \ -\ -TestObject tc; \ -return QTest::qExec(&tc, 3, new_argv); \ -} - -#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/testutilities.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/testutilities.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,251 +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 "testutilities.h" - -/*! - Replaces global new operator for utilizing binary. Enables OOM - simulation and memory leak detection. - - Note that creation of CBase derived Symbian classes - are not tracked, because CBase overloads new operator. - */ -void* operator new(std::size_t sz) throw(std::bad_alloc) -{ - return MemoryAllocator::alloc(sz); -} - -/*! - Replaces global delete operator for utilizing binary. Enables OOM - simulation and memory leak detection. - */ -void operator delete(void* memoryAddr) throw() -{ - return MemoryAllocator::free(memoryAddr); -} - -void* operator new(std::size_t sz, const std::nothrow_t&) throw() -{ - return qMalloc(sz); -} - -void operator delete(void* memoryAddress, const std::nothrow_t&) throw() -{ - if (NULL != memoryAddress) { - qFree(memoryAddress); - } -} - -bool MemoryAllocator::m_isOomSimulationEnabled = false; -int MemoryAllocator::m_numOfAllocsSinceLastFail = 0; -int MemoryAllocator::m_allocFailIndex = 1; -QList MemoryAllocator::m_allocList; - -/*! - MemoryAllocator::enableOomSimulation - */ -void MemoryAllocator::enableOomSimulation() -{ - m_isOomSimulationEnabled = true; - m_allocFailIndex = 1; - m_numOfAllocsSinceLastFail = 0; -} - -/*! - MemoryAllocator::disableOomSimulation - */ -void MemoryAllocator::disableOomSimulation() -{ - m_isOomSimulationEnabled = false; -} - -/*! - MemoryAllocator::isOomSimulationEnabled - */ -bool MemoryAllocator::isOomSimulationEnabled() -{ - return m_isOomSimulationEnabled; -} - -/*! - MemoryAllocator::currentAllocFailIndex - */ -int MemoryAllocator::currentAllocFailIndex() -{ - return m_allocFailIndex; -} - -/*! - MemoryAllocator::alloc - */ -void* MemoryAllocator::alloc(std::size_t sz) -{ - if (isOomSimulationEnabled()) { - m_numOfAllocsSinceLastFail++; - if (m_allocFailIndex == m_numOfAllocsSinceLastFail) { - m_allocFailIndex++; - m_numOfAllocsSinceLastFail = 0; -#ifdef QT_NO_EXCEPTIONS - return NULL; -#else - throw std::bad_alloc(); -#endif - } - } - - void *allocatedMemoryAddr = qMalloc(sz); - m_allocList.append(allocatedMemoryAddr); - return allocatedMemoryAddr; -} - -/*! - MemoryAllocator::free - */ -void MemoryAllocator::free(void *memoryAddress) -{ - if (memoryAddress) { - int index = m_allocList.indexOf(memoryAddress); - if (-1 != index) { - m_allocList.removeAt(index); - } - qFree(memoryAddress); - } -} - -/*! - MemoryAllocator::verifyMemoryAllocations - */ -void MemoryAllocator::verifyMemoryAllocations() -{ - int numOfUnfreedCells = m_allocList.count(); - if (0 != numOfUnfreedCells) { - for ( int i = 0; i < numOfUnfreedCells; i++) { - qDebug("UNFREED CELL: %x", reinterpret_cast(m_allocList.at(i))); - } - - m_allocList.clear(); - throw std::bad_alloc(); - } - - m_allocList.clear(); -} - - -/*! - OomTestExecuter::runTest - */ -void OomTestExecuter::runTest( - QObject &testObject, const char *testMethod) -{ - qDebug() << "OomTestExecuter::runTest : IN :" << testMethod; - - MemoryAllocator::enableOomSimulation(); - - bool exceptionCaught = false; - do { - exceptionCaught = false; - int currentAllocFailIndex = MemoryAllocator::currentAllocFailIndex(); - - try { - try { - QMetaObject::invokeMethod( - &testObject, "init", Qt::DirectConnection); - QMetaObject::invokeMethod( - &testObject, testMethod, Qt::DirectConnection); - } catch (const std::bad_alloc &ex) { - exceptionCaught = true; - QMetaObject::invokeMethod( - &testObject, "cleanup", Qt::DirectConnection); - } - // TODO: for some reason bad_alloc exception is corrupted to - // unknown exception and nested catch block is needed to be able to - // handle situation. One level catch does not work for some reason. - } catch (...) { - exceptionCaught = true; - QMetaObject::invokeMethod( - &testObject, "cleanup", Qt::DirectConnection); - if (currentAllocFailIndex == MemoryAllocator::currentAllocFailIndex()) { - qDebug() << "OomTestExecuter::runTest, ERROR: unexpected exception!"; - throw; - } - } - } while(exceptionCaught); - - QMetaObject::invokeMethod(&testObject, "cleanup", Qt::DirectConnection); - MemoryAllocator::disableOomSimulation(); - qDebug() << "OomTestExecuter::runTest : OUT :" << testMethod; -} - -/*! - OomTestExecuter::runAllTests - */ -void OomTestExecuter::runAllTests( - QObject &testObject, const char *callingTestMethod) -{ - const QMetaObject *metaObject = testObject.metaObject(); - - int methodCount = metaObject->methodCount(); - for (int i = 0; i < methodCount; ++i) { - QMetaMethod slotMethodCandidate = metaObject->method(i); - if (!isValidSlot(slotMethodCandidate)) { - continue; - } - - QByteArray slotMethodName(slotMethodCandidate.signature()); - // remove parentheses - slotMethodName = slotMethodName.left(slotMethodName.length() - 2); - - // Prevent from infinite loop and do not execute test method, which - // has called runAllTests. - if (slotMethodName != callingTestMethod) { - runTest(testObject, slotMethodName); - } - } -} - -/*! - OomTestExecuter::isValidSlot - */ -bool OomTestExecuter::isValidSlot(const QMetaMethod &sl) -{ - if ((sl.access() != QMetaMethod::Private) || !sl.parameterTypes().isEmpty() - || qstrlen(sl.typeName()) || (sl.methodType() != QMetaMethod::Slot)) { - return false; - } - - const char *sig = sl.signature(); - int len = qstrlen(sig); - if (len < 2) { - return false; - } - - if (sig[len - 2] != '(' || sig[len - 1] != ')') { - return false; - } - - if (len > 7 && strcmp(sig + (len - 7), "_data()") == 0) { - return false; - } - - if ((strcmp(sig, "initTestCase()") == 0) || (strcmp(sig, "cleanupTestCase()") == 0) - || (strcmp(sig, "cleanup()") == 0) || (strcmp(sig, "init()") == 0)) { - return false; - } - - return true; -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/testutilities.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/testutilities.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +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 TESTUTILITIES_H -#define TESTUTILITIES_H - -#include -#include -#include -#include -#include - -/*! Provides services for OOM simulation and memory leak detection. */ -class MemoryAllocator : public QObject -{ - Q_OBJECT - -public: - - /*! Activates OOM simulation. */ - static void enableOomSimulation(); - - /*! Disables OOM simulation. */ - static void disableOomSimulation(); - - /*! Checks whether OOM simulation is active. */ - static bool isOomSimulationEnabled(); - - /*! Returns current alloc fail index. */ - static int currentAllocFailIndex(); - - /*! Allocates memory. */ - static void* alloc(std::size_t sz); - - /*! Frees allocated memory. */ - static void free(void *memoryAddress); - - /*! Checks that all memory allocated through this allocator is freed. */ - static void verifyMemoryAllocations(); - -private: - - static bool m_isOomSimulationEnabled; - static int m_numOfAllocsSinceLastFail; - static int m_allocFailIndex; - static QList m_allocList; -}; - -/*! Provides services to run QTest cases with OOM simulation. */ -class OomTestExecuter : public QObject -{ - Q_OBJECT - -public: - - /*! Runs specified test case with OOM simulation. */ - template - static void runTest(CLASS& testObject, void(CLASS::*testMethod)()) - { - MemoryAllocator::enableOomSimulation(); - - bool exceptionCaught = false; - do { - exceptionCaught = false; - int currentAllocFailIndex = - MemoryAllocator::currentAllocFailIndex(); - - try { - try { - QMetaObject::invokeMethod( - &testObject, "init", Qt::DirectConnection); - (testObject.*testMethod)(); - } catch (const std::bad_alloc &ex) { - exceptionCaught = true; - QMetaObject::invokeMethod( - &testObject, "cleanup", Qt::DirectConnection); - } - // TODO: for some reason bad_alloc exception is corrupted to - // unknown exception and nested catch block is needed to be able to - // handle situation. One level try-catch does not work for some reason. - } catch (...) { - exceptionCaught = true; - QMetaObject::invokeMethod( - &testObject, "cleanup", Qt::DirectConnection); - if (currentAllocFailIndex == MemoryAllocator::currentAllocFailIndex()) { - qDebug() << "OomTestExecuter::runTest, ERROR: unexpected exception!"; - throw; - } - } - } while(exceptionCaught); - - QMetaObject::invokeMethod(&testObject, "cleanup", Qt::DirectConnection); - MemoryAllocator::disableOomSimulation(); - } - - /*! Runs specified test case with OOM simulation. */ - static void runTest( - QObject &testObject, - const char *testMethod); - - /*! Runs all test cases in given QTest object with OOM simulation. */ - static void runAllTests( - QObject &testObject, - const char *callingTestMethod); - -private: - - static bool isValidSlot(const QMetaMethod &sl); -}; - -#define EXPECT_EXCEPTION(statements) \ -{ \ - bool exceptionDetected = false; \ - try { \ - statements \ - } catch (...) { \ - exceptionDetected = true; \ - } \ - QVERIFY(true == exceptionDetected); \ -} - -#define QTEST_MAIN_S60(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ - char *new_argv[3]; \ - QCoreApplication app(argc, argv); \ - \ - 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(); \ - \ - TestObject tc; \ - int result = QTest::qExec(&tc, 3, new_argv); \ - \ - MemoryAllocator::verifyMemoryAllocations(); \ - \ - return result;\ -} - -#endif // TESTUTILITIES_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cphcltemergencycall.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cphcltemergencycall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +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 "mock_cphcltemergencycall.h" - -TBool CPhCltEmergencyCallMock::iSimulateEmergencyNumberMatch = EFalse; - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCall::CPhCltEmergencyCall -// C++ constructor. -// ----------------------------------------------------------------------------- -// -CPhCltEmergencyCall::CPhCltEmergencyCall( - MPhCltEmergencyCallObserver* aObserver ) - : CActive( EPriorityStandard ), iObserver( aObserver ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCall::CPhCltEmergencyCall -// ----------------------------------------------------------------------------- -// -CPhCltEmergencyCall* CPhCltEmergencyCall::NewL( - MPhCltEmergencyCallObserver* aObserver ) - { - return CPhCltEmergencyCallMock::NewL( aObserver ); - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::CPhCltEmergencyCallMock -// C++ constructor. -// ----------------------------------------------------------------------------- -// -CPhCltEmergencyCallMock::CPhCltEmergencyCallMock( - MPhCltEmergencyCallObserver * aObserver ) - : CPhCltEmergencyCall( aObserver ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::NewL -// ----------------------------------------------------------------------------- -// -CPhCltEmergencyCallMock * CPhCltEmergencyCallMock::NewL( - MPhCltEmergencyCallObserver * aObserver ) - { - SMC_MOCK_NEWL1( CPhCltEmergencyCallMock *, MPhCltEmergencyCallObserver *, aObserver ) - - CPhCltEmergencyCallMock* self = new( ELeave ) CPhCltEmergencyCallMock( aObserver ); - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::IsEmergencyPhoneNumber -// ----------------------------------------------------------------------------- -// -TInt CPhCltEmergencyCallMock::IsEmergencyPhoneNumber( - const TDesC & aNumber, - TBool & aIsEmergencyNumber ) - { - SMC_MOCK_METHOD2( TInt, const TDesC &, aNumber, - TBool &, aIsEmergencyNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::FindEmergencyPhoneNumber -// ----------------------------------------------------------------------------- -// -TInt CPhCltEmergencyCallMock::FindEmergencyPhoneNumber( - TDes & aNumber, - TBool & aIsEmergencyNumber ) - { - SMC_MOCK_METHOD2( TInt, TDes &, aNumber, - TBool &, aIsEmergencyNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::DialEmergencyCallL -// ----------------------------------------------------------------------------- -// -void CPhCltEmergencyCallMock::DialEmergencyCallL( - const TDesC & aNumber ) - { - SMC_MOCK_METHOD1( void, const TDesC &, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::IsEmergencyPhoneNumber -// ----------------------------------------------------------------------------- -// -TInt CPhCltEmergencyCallMock::IsEmergencyPhoneNumber( - const TDesC & aNumber, - TDes & aMatchedEmergencyNumber, - TBool & aIsEmergencyNumber ) - { - if (iSimulateEmergencyNumberMatch) { - aIsEmergencyNumber = ETrue; - } - - SMC_MOCK_METHOD3( TInt, const TDesC &, aNumber, - TDes &, aMatchedEmergencyNumber, - TBool &, aIsEmergencyNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::RunL -// Declaration needed due to vftable references. -// ----------------------------------------------------------------------------- -// -void CPhCltEmergencyCallMock::RunL() - { - - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::DoCancel -// Declaration needed due to vftable references. -// ----------------------------------------------------------------------------- -// -void CPhCltEmergencyCallMock::DoCancel() - { - - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cphcltemergencycall.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cphcltemergencycall.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +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 CPHCLTEMERGENCYCALLMOCK_H -#define CPHCLTEMERGENCYCALLMOCK_H - -#include -#include - -// FORWARD DECLARATIONS -class MPhCltEmergencyCallObserver; - -// CLASS DECLARATION -/** -* Phone Client Emergency Call Api for emergency number query -* and emergency dialing. -* -* @lib phoneclient.lib -* @since SeriesS60_3.2 -*/ -class CPhCltEmergencyCallMock : public CPhCltEmergencyCall - { - public: - static TBool iSimulateEmergencyNumberMatch; - - public: // Constructors and destructor - - /** - * Create an instance that implements the interface. - * - * @param aObserver It is the observer for the instance. - * @return Returns the created instance. - */ - static CPhCltEmergencyCallMock* NewL( - MPhCltEmergencyCallObserver* aObserver ); - - public: // New functions - - /** - * Returns information whether the number specified was an emergency number. - * - * @param aNumber Number to be queried. aNumber might contain prefix (SS code) - * and/or postfix (DTMF part). - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumber. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber - * parameter included emergency number. - * @return Returns error code of the success of the operation. - */ - TInt IsEmergencyPhoneNumber( const TDesC& aNumber, - TBool& aIsEmergencyNumber ); - - /** - * Method can be used to check if the number specified contains - * a valid emergency number in the end of the number. - * - * @param aNumber Number to be queried, matched emergency number - * is returned in this parameter. - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltTelephoneNumber. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber parameter - * was emergency number. - * @return Returns error code of the success of the operation. - */ - TInt FindEmergencyPhoneNumber( TDes& aNumber, - TBool& aIsEmergencyNumber ); - - /** - * Initiates an emergency call. - * - * @param aNumber Emergency number to be dialed. - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumber. - * - * If the aNumber parameter supplies an "empty" buffer - * the call is created either dialing the default emergency - * phone number or use the SET UP EMERGENCY request - * that does not contain a dialling number. - * - * Leaves with KErrArgument, if parameter aNumber was - * not an emergency number. - * - * @pre IsActive() returns EFalse, otherwise leaves with KErrInUse. - */ - void DialEmergencyCallL( const TDesC& aNumber ); - - /** - * Returns information whether the number specified was an emergency - * number and also returns the plain emergency number. - * - * @param aNumber Number to be queried.aNumber might contain prefix (SS code) - * and/or postfix (DTMF part). - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumber. - * - * @param aMatchedEmergencyNumber Matched emergencynumber without prefix or - * postfix is returned in this parameter. The aMatchedEmergencyNumber - * parameter should be a buffer and the clients are - * provided with atypedef called TPhCltEmergencyNumber. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber - * parameter included emergency number. - * - * @return Returns error code of the success of the operation. - */ - TInt IsEmergencyPhoneNumber( const TDesC& aNumber, - TDes& aMatchedEmergencyNumber, TBool& aIsEmergencyNumber ); - - protected: - - /** - * C++ constructor. - */ - CPhCltEmergencyCallMock( MPhCltEmergencyCallObserver* aObserver ); - - void RunL(); - - void DoCancel(); - - }; - -#endif // CPHCLTEMERGENCYCALLMOCK_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cpsetrefreshhandler.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cpsetrefreshhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +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 the License "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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPSetRefreshHandlerMock::NewL -// ----------------------------------------------------------------------------- -// -CPSetRefreshHandlerMock * CPSetRefreshHandlerMock::NewL( ) - { - SMC_MOCK_NEWL0( CPSetRefreshHandlerMock * ) - - CPSetRefreshHandlerMock* self = new( ELeave ) CPSetRefreshHandlerMock; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPSetRefreshHandlerMock::NotifyFileChangeL -// ----------------------------------------------------------------------------- -// -void CPSetRefreshHandlerMock::NotifyFileChangeL( - MSSSettingsRefreshObserver & aObserver, - TSatElementaryFiles aObservedFile, - TSatRefreshType aObservedRefreshType ) - { - m_observer = &aObserver; - SMC_MOCK_METHOD3( void, MSSSettingsRefreshObserver &, aObserver, - TSatElementaryFiles, aObservedFile, - TSatRefreshType, aObservedRefreshType ) - } - - -// ----------------------------------------------------------------------------- -// CPSetRefreshHandlerMock::CancelNotify -// ----------------------------------------------------------------------------- -// -void CPSetRefreshHandlerMock::CancelNotify( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPSetRefreshHandlerMock::ChangedCspSettings -// ----------------------------------------------------------------------------- -// -TInt CPSetRefreshHandlerMock::ChangedCspSettings( - TPSetChangedCspSetting & aChangedCspSettings, - TPSetChangedCspSetting & aNewValues ) - { - SMC_MOCK_METHOD2( TInt, TPSetChangedCspSetting &, aChangedCspSettings, - TPSetChangedCspSetting &, aNewValues ) - } - - -// ----------------------------------------------------------------------------- -// CPSetRefreshHandlerMock::ChangedCspSettings -// ----------------------------------------------------------------------------- -// -void CPSetRefreshHandlerMock::trigerAllowRefresh( - const TSatRefreshType aType, - const TSatElementaryFiles aFiles ) - { - m_observer->AllowRefresh(aType, aFiles); - } - - -// ----------------------------------------------------------------------------- -// CPSetRefreshHandlerMock::ChangedCspSettings -// ----------------------------------------------------------------------------- -// -void CPSetRefreshHandlerMock::trigerRefresh( - const TSatRefreshType aType, - const TSatElementaryFiles aFiles ) - { - m_observer->Refresh(aType, aFiles); - } - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cpsetrefreshhandler.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cpsetrefreshhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +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 the License "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 CPSetRefreshHandler_h -#define CPSetRefreshHandler_h - -#include - -class CPSetRefreshHandlerMock : public CPSetRefreshHandler - { - public: - static CPSetRefreshHandlerMock* NewL(); - void NotifyFileChangeL( MSSSettingsRefreshObserver & aObserver, TSatElementaryFiles aObservedFile, TSatRefreshType aObservedRefreshType ); - void CancelNotify( ); - TInt ChangedCspSettings( TPSetChangedCspSetting & aChangedCspSettings, TPSetChangedCspSetting & aNewValues ); - - public: - void trigerAllowRefresh( - const TSatRefreshType aType, - const TSatElementaryFiles aFiles ); - - void trigerRefresh( - const TSatRefreshType aType, - const TSatElementaryFiles aFiles ); - - MSSSettingsRefreshObserver *m_observer; - }; - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cvoicemailbox.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cvoicemailbox.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +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 - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// TVoiceMailboxParams::TVoiceMailboxParams -// ----------------------------------------------------------------------------- -// -TVoiceMailboxParams::TVoiceMailboxParams( ) - { - - } - - -// ----------------------------------------------------------------------------- -// TVoiceMailboxParams::Version -// ----------------------------------------------------------------------------- -// -TInt TVoiceMailboxParams::Version( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// TVoiceMailboxParams::TVoiceMailboxParams -// ----------------------------------------------------------------------------- -// -TVoiceMailboxParams::TVoiceMailboxParams( - const CVoiceMailboxEntry & aEntry ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::CVoiceMailbox -// ----------------------------------------------------------------------------- -// -CVoiceMailbox::CVoiceMailbox( ) - //: - //CBase( /**/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::ConstructL -// ----------------------------------------------------------------------------- -// -void CVoiceMailbox::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::NewL -// ----------------------------------------------------------------------------- -// -CVoiceMailbox * CVoiceMailbox::NewL( ) - { - SMC_MOCK_NEWL0( CVoiceMailbox * ) - - CVoiceMailbox* self = new( ELeave ) CVoiceMailbox; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::NewLC -// ----------------------------------------------------------------------------- -// -CVoiceMailbox * CVoiceMailbox::NewLC( ) - { - SMC_MOCK_NEWLC0( CVoiceMailbox * ) - - CVoiceMailbox* self = new( ELeave ) CVoiceMailbox; - CleanupStack::PushL( self ); - //self->ConstructL() - return self; - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::~CVoiceMailbox -// ----------------------------------------------------------------------------- -// -CVoiceMailbox::~CVoiceMailbox( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::GetStoredEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::GetStoredEntry( - const TVoiceMailboxParams & aParams, - CVoiceMailboxEntry * & aEntry ) const - { - - CVoiceMailboxEntry* vmbxEntry = NULL; - vmbxEntry = CVoiceMailboxEntry::NewL(); - vmbxEntry->SetServiceId( KVmbxServiceVoice ); - vmbxEntry->SetVoiceMailboxType( EVmbxVoice ); - vmbxEntry->SetVmbxAlsLineType( EVmbxAlsLine1 ); - aEntry = vmbxEntry; - SMC_MOCK_METHOD2( TInt, const TVoiceMailboxParams &, aParams, - CVoiceMailboxEntry *, aEntry ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::SaveEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::SaveEntry( - const CVoiceMailboxEntry & aEntry ) - { - SMC_MOCK_METHOD1( TInt, const CVoiceMailboxEntry &, aEntry ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::QueryNewEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryNewEntry( - const TVoiceMailboxParams & aParams, - CVoiceMailboxEntry * & aEntry ) - { - SMC_MOCK_METHOD2( TInt, const TVoiceMailboxParams &, aParams, - CVoiceMailboxEntry *, aEntry ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::QueryChangeEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryChangeEntry( - const TVoiceMailboxParams & aParams, - CVoiceMailboxEntry * & aEntry ) - { - SMC_MOCK_METHOD2( TInt, const TVoiceMailboxParams &, aParams, - CVoiceMailboxEntry *, aEntry ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::QueryVmbxType -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryVmbxType( - TVoiceMailboxParams & aParams ) - { - SMC_MOCK_METHOD1( TInt, TVoiceMailboxParams &, aParams ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::NotifyVmbxNumberChangeL -// ----------------------------------------------------------------------------- -// -void CVoiceMailbox::NotifyVmbxNumberChangeL( - MVoiceMailboxObserver & aObserver, - const TBool aNotifyOnActiveLineOnly ) - { - SMC_MOCK_METHOD2( void, MVoiceMailboxObserver &, aObserver, - const TBool, aNotifyOnActiveLineOnly ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::NotifyVmbxNumberChangeCancel -// ----------------------------------------------------------------------------- -// -void CVoiceMailbox::NotifyVmbxNumberChangeCancel( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::CheckConfiguration -// ----------------------------------------------------------------------------- -// -TBool CVoiceMailbox::CheckConfiguration( - const TVoiceMailboxParams & aParams, - const TInt aFlags ) - { - SMC_MOCK_METHOD2( TBool, const TVoiceMailboxParams &, aParams, - const TInt, aFlags ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::GetServiceIds -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::GetServiceIds( - RIdArray & aProfileIds ) const - { - SMC_MOCK_METHOD1( TInt, RIdArray &, aProfileIds ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::SaveProvisionedEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::SaveProvisionedEntry( - const CVoiceMailboxEntry & aEntry ) - { - SMC_MOCK_METHOD1( TInt, const CVoiceMailboxEntry &, aEntry ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cvoicemailboxentry.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cvoicemailboxentry.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /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 "cvoicemailboxentry.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::CVoiceMailboxEntry -// ----------------------------------------------------------------------------- -// -CVoiceMailboxEntry::CVoiceMailboxEntry( ) - //: - //CBase( /**/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::ConstructL -// ----------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::NewL -// ----------------------------------------------------------------------------- -// -CVoiceMailboxEntry * CVoiceMailboxEntry::NewL( ) - { - SMC_MOCK_NEWL0( CVoiceMailboxEntry * ) - - CVoiceMailboxEntry* self = new( ELeave ) CVoiceMailboxEntry; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::NewLC -// ----------------------------------------------------------------------------- -// -CVoiceMailboxEntry * CVoiceMailboxEntry::NewLC( ) - { - SMC_MOCK_NEWLC0( CVoiceMailboxEntry * ) - - CVoiceMailboxEntry* self = new( ELeave ) CVoiceMailboxEntry; - CleanupStack::PushL( self ); - //self->ConstructL() - return self; - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::~CVoiceMailboxEntry -// ----------------------------------------------------------------------------- -// -CVoiceMailboxEntry::~CVoiceMailboxEntry( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::ServiceId -// ----------------------------------------------------------------------------- -// -TServiceId CVoiceMailboxEntry::ServiceId( ) const - { - SMC_MOCK_METHOD0( TServiceId ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetServiceId -// ----------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetServiceId( - const TServiceId & aVmbxServiceId ) - { - SMC_MOCK_METHOD1( void, const TServiceId &, aVmbxServiceId ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::VoiceMailboxType -// ----------------------------------------------------------------------------- -// -TVmbxType CVoiceMailboxEntry::VoiceMailboxType( ) const - { - SMC_MOCK_METHOD0( TVmbxType ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVoiceMailboxType -// ----------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetVoiceMailboxType( - const TVmbxType & aVmbxType ) - { - SMC_MOCK_METHOD1( void, const TVmbxType &, aVmbxType ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::VmbxAlsLineType -// ----------------------------------------------------------------------------- -// -TVmbxAlsLineType CVoiceMailboxEntry::VmbxAlsLineType( ) const - { - SMC_MOCK_METHOD0( TVmbxAlsLineType ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxAlsLineType -// ----------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetVmbxAlsLineType( - const TVmbxAlsLineType & aLine ) - { - SMC_MOCK_METHOD1( void, const TVmbxAlsLineType &, aLine ) - } - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetVmbxNumber -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::GetVmbxNumber( - TPtrC & aVmbxNumber ) const - { - SMC_MOCK_METHOD1( TInt, TPtrC &, aVmbxNumber ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxNumber -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::SetVmbxNumber( - const TDesC & aVmbxNumber ) - { - SMC_MOCK_METHOD1( TInt, const TDesC &, aVmbxNumber ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetBrandId -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::GetBrandId( - TPtrC8 & aBrandId ) const - { - SMC_MOCK_METHOD1( TInt, TPtrC8 &, aBrandId ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetBrandId -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::SetBrandId( - const TDesC8 & aBrandId ) - { - SMC_MOCK_METHOD1( TInt, const TDesC8 &, aBrandId ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetVmbxName -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::GetVmbxName( - TPtrC & aVmbxName ) const - { - SMC_MOCK_METHOD1( TInt, TPtrC &, aVmbxName ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxName -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::SetVmbxName( - const TDesC & aVmbxName ) - { - SMC_MOCK_METHOD1( TInt, const TDesC &, aVmbxName ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::UsingMemoryLocation -// ----------------------------------------------------------------------------- -// -TVmbxMemoryLocation CVoiceMailboxEntry::UsingMemoryLocation( ) const - { - SMC_MOCK_METHOD0( TVmbxMemoryLocation ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::Reset -// ----------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::Reset( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetUsingMemoryLocation -// ----------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetUsingMemoryLocation( - const TVmbxMemoryLocation & aType ) - { - SMC_MOCK_METHOD1( void, const TVmbxMemoryLocation &, aType ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallbarring.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallbarring.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::CPsetCallBarring -// ----------------------------------------------------------------------------- -// -CPsetCallBarring::CPsetCallBarring( - RMobilePhone & aPhone ) - : - CActive(EPriorityStandard), - iPhone(aPhone) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::ConstructL -// ----------------------------------------------------------------------------- -// -void CPsetCallBarring::ConstructL( - MPsetBarringObserver & /*aObserver*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::NewL -// ----------------------------------------------------------------------------- -// -CPsetCallBarring * CPsetCallBarring::NewL( - MPsetBarringObserver & aObserver, - RMobilePhone & aPhone ) - { - SMC_MOCK_NEWL2( CPsetCallBarring *, MPsetBarringObserver &, aObserver, - RMobilePhone &, aPhone ) - - CPsetCallBarring* self = new( ELeave ) CPsetCallBarring(aPhone); - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::~CPsetCallBarring -// ----------------------------------------------------------------------------- -// -CPsetCallBarring::~CPsetCallBarring( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::SetBarringL -// ----------------------------------------------------------------------------- -// -void CPsetCallBarring::SetBarringL( - const TCallBarringSetting & aBarring, - TBasicServiceGroups aBsc ) - { - SMC_MOCK_METHOD2( void, const TCallBarringSetting &, aBarring, - TBasicServiceGroups, aBsc ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::GetBarringStatusL -// ----------------------------------------------------------------------------- -// -void CPsetCallBarring::GetBarringStatusL( - const TServiceGroup aGroup, - const TBarringProgram aMode ) - { - SMC_MOCK_METHOD2( void, const TServiceGroup, aGroup, - const TBarringProgram, aMode ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::CancelCurrentRequest -// ----------------------------------------------------------------------------- -// -TInt CPsetCallBarring::CancelCurrentRequest( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::PhoneSettingChanged -// ----------------------------------------------------------------------------- -// -void CPsetCallBarring::PhoneSettingChanged( - TSSSettingsSetting aSetting, - TInt aNewValue ) - { - SMC_MOCK_METHOD2( void, TSSSettingsSetting, aSetting, - TInt, aNewValue ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::ChangePasswordL -// ----------------------------------------------------------------------------- -// -void CPsetCallBarring::ChangePasswordL( - RMobilePhone::TMobilePhonePasswordChangeV2 & aPwds, - TBool aIsBarringPassword ) - { - SMC_MOCK_METHOD2( void, RMobilePhone::TMobilePhonePasswordChangeV2 &, aPwds, - TBool, aIsBarringPassword ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::ChangePasswordL -// ----------------------------------------------------------------------------- -// -void CPsetCallBarring::ChangePasswordL( - RMobilePhone::TMobilePhonePasswordChangeV2 & aPwds ) - { - SMC_MOCK_METHOD1( void, RMobilePhone::TMobilePhonePasswordChangeV2 &, aPwds ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallBarring::SetRequestObserver -// ----------------------------------------------------------------------------- -// -void CPsetCallBarring::SetRequestObserver( - MPsetRequestObserver * aObs ) - { - SMC_MOCK_METHOD1( void, MPsetRequestObserver *, aObs ) - } - - -// --------------------------------------------------------------------------- -// CPsetCallBarring::DoCancel -// --------------------------------------------------------------------------- -// -void CPsetCallBarring::DoCancel() - { - - } -// --------------------------------------------------------------------------- -// CPsetCallBarring::RunL - -// --------------------------------------------------------------------------- -// -void CPsetCallBarring::RunL() - { - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallbarringwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallbarringwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /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: -* -*/ - -#include -#include -#include -#include -#include -#include "psetcallbarringwrapper.h" - -class PSetCallBarringWrapperPrivate { -public: - PSetCallBarringWrapperPrivate() {} - ~PSetCallBarringWrapperPrivate() {} -}; - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PSetCallBarringWrapper::PSetCallBarringWrapper -// ----------------------------------------------------------------------------- -// -PSetCallBarringWrapper::PSetCallBarringWrapper( - CPsetContainer & psetContainer, - QObject * parent ) - : - QObject(parent) - { - Q_UNUSED(psetContainer) - } - - -// ----------------------------------------------------------------------------- -// PSetCallBarringWrapper::~PSetCallBarringWrapper -// ----------------------------------------------------------------------------- -// -PSetCallBarringWrapper::~PSetCallBarringWrapper( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallBarringWrapper::barringStatus -// ----------------------------------------------------------------------------- -// -void PSetCallBarringWrapper::barringStatus( - PsServiceGroup serviceGroup, - BarringType barringType ) - { - SMC_MOCK_METHOD2( void, int/*PsServiceGroup*/, static_cast(serviceGroup), - BarringType, barringType ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallBarringWrapper::enableBarring -// ----------------------------------------------------------------------------- -// -void PSetCallBarringWrapper::enableBarring( - PsServiceGroup serviceGroup, - BarringType barringType, - QString barringPassword) - { - SMC_MOCK_METHOD3( void, int/*PsServiceGroup*/, static_cast(serviceGroup), - BarringType, barringType, QString, barringPassword ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallBarringWrapper::disableBarring -// ----------------------------------------------------------------------------- -// -void PSetCallBarringWrapper::disableBarring( - PsServiceGroup serviceGroup, - BarringType barringType, - QString barringPassword) - { - SMC_MOCK_METHOD3( void, int/*PsServiceGroup*/, static_cast(serviceGroup), - BarringType, barringType, QString, barringPassword ) - } - -// ----------------------------------------------------------------------------- -// PSetCallBarringWrapper::changeBarringPassword -// ----------------------------------------------------------------------------- -// -void PSetCallBarringWrapper::changeBarringPassword( - const QString &oldPassword, - const QString &newPassword, - const QString &verifiedPassword) -{ - SMC_MOCK_METHOD3( void, - const QString &, oldPassword, - const QString &, newPassword, - const QString &, verifiedPassword ) -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcalldiverting.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcalldiverting.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,255 +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 "PsetCallDiverting.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::CPsetCallDiverting -// ----------------------------------------------------------------------------- -// -CPsetCallDiverting::CPsetCallDiverting( - RMobilePhone & aPhone ) : iPhone(aPhone) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::ConstructL -// ----------------------------------------------------------------------------- -// -void CPsetCallDiverting::ConstructL( - MPsetDivertObserver & /*aObserver*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::NewL -// ----------------------------------------------------------------------------- -// -CPsetCallDiverting * CPsetCallDiverting::NewL( - MPsetDivertObserver & aObserver, - RMobilePhone & aPhone ) - { - SMC_MOCK_NEWL2( CPsetCallDiverting *, MPsetDivertObserver &, aObserver, - RMobilePhone &, aPhone ) - - CPsetCallDiverting* self = new( ELeave ) CPsetCallDiverting( aPhone ); - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::~CPsetCallDiverting -// ----------------------------------------------------------------------------- -// -CPsetCallDiverting::~CPsetCallDiverting( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::SetDivertingL -// ----------------------------------------------------------------------------- -// -void CPsetCallDiverting::SetDivertingL( - const TCallDivertSetting & aDivert, - TBasicServiceGroups aBsc, - TBool aVmbx ) - { - SMC_MOCK_METHOD3( void, const TCallDivertSetting &, aDivert, - TBasicServiceGroups, aBsc, - TBool, aVmbx ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::GetDivertingStatusL -// ----------------------------------------------------------------------------- -// -void CPsetCallDiverting::GetDivertingStatusL( - const TServiceGroup aServiceGroup, - const TCallDivertingCondition aCondition, - TBasicServiceGroups aBsc ) - { - SMC_MOCK_METHOD3( void, const TServiceGroup, aServiceGroup, - const TCallDivertingCondition, aCondition, - TBasicServiceGroups, aBsc ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::CancelCurrentRequest -// ----------------------------------------------------------------------------- -// -TInt CPsetCallDiverting::CancelCurrentRequest( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::GetTimerValueL -// ----------------------------------------------------------------------------- -// -TInt CPsetCallDiverting::GetTimerValueL( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::SetTimerValueL -// ----------------------------------------------------------------------------- -// -TInt CPsetCallDiverting::SetTimerValueL( - const TInt & aIndex ) - { - SMC_MOCK_METHOD1( TInt, const TInt &, aIndex ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::GetDefaultNumbersL -// ----------------------------------------------------------------------------- -// -TInt CPsetCallDiverting::GetDefaultNumbersL( - CDesC16ArrayFlat & aDefNumbers ) - { - _LIT( KNumber1,"111111" ); - _LIT( KNumber2,"222222" ); - - aDefNumbers.AppendL(KNumber1()); - aDefNumbers.AppendL(KNumber2()); - - SMC_MOCK_METHOD1( TInt, CDesC16ArrayFlat &, aDefNumbers ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::SetNewDefaultNumberL -// ----------------------------------------------------------------------------- -// -TInt CPsetCallDiverting::SetNewDefaultNumberL( - TDes & aNumber ) - { - SMC_MOCK_METHOD1( TInt, TDes &, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::SwapDefaultNumberL -// ----------------------------------------------------------------------------- -// -void CPsetCallDiverting::SwapDefaultNumberL( - const TInt & aLocation ) - { - SMC_MOCK_METHOD1( void, const TInt &, aLocation ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::SetUsedDataNumberL -// ----------------------------------------------------------------------------- -// -TInt CPsetCallDiverting::SetUsedDataNumberL( - TTelNumber & aNumber ) - { - SMC_MOCK_METHOD1( TInt, TTelNumber &, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::SetUsedFaxNumberL -// ----------------------------------------------------------------------------- -// -TInt CPsetCallDiverting::SetUsedFaxNumberL( - TTelNumber & aNumber ) - { - SMC_MOCK_METHOD1( TInt, TTelNumber &, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::GetUsedFaxNumberLC -// ----------------------------------------------------------------------------- -// -HBufC * CPsetCallDiverting::GetUsedFaxNumberLC( ) - { - SMC_MOCK_METHOD0( HBufC * ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::GetUsedDataNumberLC -// ----------------------------------------------------------------------------- -// -HBufC * CPsetCallDiverting::GetUsedDataNumberLC( ) - { - SMC_MOCK_METHOD0( HBufC * ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::SetRequestObserver -// ----------------------------------------------------------------------------- -// -void CPsetCallDiverting::SetRequestObserver( - MPsetRequestObserver * aObs ) - { - SMC_MOCK_METHOD1( void, MPsetRequestObserver *, aObs ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::VoiceMailQueryL -// ----------------------------------------------------------------------------- -// -void CPsetCallDiverting::VoiceMailQueryL( - TDes & aTelNumber ) - { - SMC_MOCK_METHOD1( void, TDes &, aTelNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallDiverting::VideoMailQueryL -// ----------------------------------------------------------------------------- -// -void CPsetCallDiverting::VideoMailQueryL( - TDes & aTelNumber ) - { - SMC_MOCK_METHOD1( void, TDes &, aTelNumber ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcalldivertingwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcalldivertingwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +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 "psetcalldivertingwrapper.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::PSetCallDivertingWrapper -// ----------------------------------------------------------------------------- -// -PSetCallDivertingWrapper::PSetCallDivertingWrapper( - CPsetContainer & /*psetContainer*/, - QObject * parent ) - : - QObject(parent) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::~PSetCallDivertingWrapper -// ----------------------------------------------------------------------------- -// -PSetCallDivertingWrapper::~PSetCallDivertingWrapper( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::setCallDiverting -// ----------------------------------------------------------------------------- -// -int PSetCallDivertingWrapper::setCallDiverting( - PSCallDivertingCommand & aSetting, - int aBasicServiceGroup ) - { - SMC_MOCK_METHOD2( int, PSCallDivertingCommand &, aSetting, - int, aBasicServiceGroup ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::getCallDivertingStatus -// ----------------------------------------------------------------------------- -// -void PSetCallDivertingWrapper::getCallDivertingStatus( - const PsServiceGroup aServiceGroup, - const PsCallDivertingCondition aCondition, - int aBsc ) - { - SMC_MOCK_METHOD3( void, int/*const PsServiceGroup*/, static_cast(aServiceGroup), - const PsCallDivertingCondition, aCondition, - int, aBsc ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::cancelProcess -// ----------------------------------------------------------------------------- -// -void PSetCallDivertingWrapper::cancelProcess( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::getDefaultNumbers -// ----------------------------------------------------------------------------- -// -void PSetCallDivertingWrapper::getDefaultNumbers( - QStringList & aDefNumbers ) - { - SMC_MOCK_METHOD1( void, QStringList &, aDefNumbers ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::setNewDefaultNumber -// ----------------------------------------------------------------------------- -// -void PSetCallDivertingWrapper::setNewDefaultNumber( - QString aNumber ) - { - SMC_MOCK_METHOD1( void, QString, aNumber ) - } - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::getVoiceMailBoxNumber -// ----------------------------------------------------------------------------- -// -int PSetCallDivertingWrapper::getVoiceMailBoxNumber( - QString &aNumber, PsService aService) - { - SMC_MOCK_METHOD2( int, QString & , aNumber, PsService, aService ) - } - -// ----------------------------------------------------------------------------- -// PSetCallDivertingWrapper::queryVoiceMailBoxNumber -// ----------------------------------------------------------------------------- -// -int PSetCallDivertingWrapper::queryVoiceMailBoxNumber( - QString &aNumber, PsService aService) - { - SMC_MOCK_METHOD2( int, QString & , aNumber, PsService, aService ) - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallwaiting.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallwaiting.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +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 "PsetCallWaiting.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::CPsetCallWaiting -// ----------------------------------------------------------------------------- -// -CPsetCallWaiting::CPsetCallWaiting( - RMobilePhone & aPhone ) - : - CActive( EPriorityStandard ), - iPhone(aPhone) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::ConstructL -// ----------------------------------------------------------------------------- -// -void CPsetCallWaiting::ConstructL( - MPsetCallWaitingObserver & /*aObserver*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::NewL -// ----------------------------------------------------------------------------- -// -CPsetCallWaiting * CPsetCallWaiting::NewL( - RMobilePhone & aPhone, - MPsetCallWaitingObserver & aObserver ) - { - SMC_MOCK_NEWL2( CPsetCallWaiting *, RMobilePhone &, aPhone, - MPsetCallWaitingObserver &, aObserver ) - - CPsetCallWaiting* self = new( ELeave ) CPsetCallWaiting(aPhone); - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::~CPsetCallWaiting -// ----------------------------------------------------------------------------- -// -CPsetCallWaiting::~CPsetCallWaiting( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::SetCallWaitingL -// ----------------------------------------------------------------------------- -// -void CPsetCallWaiting::SetCallWaitingL( - TSetCallWaiting aSetting, - TBasicServiceGroups aBsc ) - { - SMC_MOCK_METHOD2( void, TSetCallWaiting, aSetting, - TBasicServiceGroups, aBsc ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::GetCallWaitingStatusL -// ----------------------------------------------------------------------------- -// -void CPsetCallWaiting::GetCallWaitingStatusL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::CancelProcess -// ----------------------------------------------------------------------------- -// -TInt CPsetCallWaiting::CancelProcess( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::SetRequestObserver -// ----------------------------------------------------------------------------- -// -void CPsetCallWaiting::SetRequestObserver( - MPsetRequestObserver * aObs ) - { - SMC_MOCK_METHOD1( void, MPsetRequestObserver *, aObs ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::PhoneSettingChanged -// ----------------------------------------------------------------------------- -// -void CPsetCallWaiting::PhoneSettingChanged( - TSSSettingsSetting aSetting, - TInt aNewValue ) - { - SMC_MOCK_METHOD2( void, TSSSettingsSetting, aSetting, - TInt, aNewValue ) - } - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::RunL -// ----------------------------------------------------------------------------- -// -void CPsetCallWaiting::RunL() -{ - -} - -// ----------------------------------------------------------------------------- -// CPsetCallWaiting::DoCancel -// ----------------------------------------------------------------------------- -// -void CPsetCallWaiting::DoCancel() -{ - -} diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallwaitingwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallwaitingwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +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 "psetcallwaitingwrapper.h" - -// ============================ MEMBER FUNCTIONS =============================== -class PSetCallWaitingWrapperPrivate -{ -public: - PSetCallWaitingWrapperPrivate() {} -}; - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::PSetCallWaitingWrapper -// ----------------------------------------------------------------------------- -// -PSetCallWaitingWrapper::PSetCallWaitingWrapper( - CPsetContainer & /*psetContainer*/, - QObject * parent ) - : - QObject(parent) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::~PSetCallWaitingWrapper -// ----------------------------------------------------------------------------- -// -PSetCallWaitingWrapper::~PSetCallWaitingWrapper( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::setCallWaiting -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapper::setCallWaiting( - PsCallWaitingCommand aSetting, - int aBasicServiceGroup ) - { - SMC_MOCK_METHOD2( void, PsCallWaitingCommand, aSetting, - int, aBasicServiceGroup ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::getCallWaitingStatus -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapper::getCallWaitingStatus( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCallWaitingWrapper::cancelProcess -// ----------------------------------------------------------------------------- -// -void PSetCallWaitingWrapper::cancelProcess( ) - { - SMC_MOCK_METHOD0( void ) - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcli.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcli.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,152 +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 "PsetCli.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPsetCli::CPsetCli -// ----------------------------------------------------------------------------- -// -CPsetCli::CPsetCli( - RMobilePhone & aPhone ) - : - CActive( EPriorityStandard ), - iPhone( aPhone ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::NewL -// ----------------------------------------------------------------------------- -// -CPsetCli * CPsetCli::NewL( - RMobilePhone & aPhone, - MPsetCliObserver & aObserver ) - { - SMC_MOCK_NEWL2( CPsetCli *, RMobilePhone &, aPhone, - MPsetCliObserver &, aObserver ) - - CPsetCli* self = new( ELeave ) CPsetCli(aPhone); - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::~CPsetCli -// ----------------------------------------------------------------------------- -// -CPsetCli::~CPsetCli( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::GetColpModeL -// ----------------------------------------------------------------------------- -// -void CPsetCli::GetColpModeL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::GetClipModeL -// ----------------------------------------------------------------------------- -// -void CPsetCli::GetClipModeL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::GetClirModeL -// ----------------------------------------------------------------------------- -// -void CPsetCli::GetClirModeL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::GetColrModeL -// ----------------------------------------------------------------------------- -// -void CPsetCli::GetColrModeL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::CancelAll -// ----------------------------------------------------------------------------- -// -void CPsetCli::CancelAll( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::GetCnapL -// ----------------------------------------------------------------------------- -// -void CPsetCli::GetCnapL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCli::SetRequestObserver -// ----------------------------------------------------------------------------- -// -void CPsetCli::SetRequestObserver( - MPsetRequestObserver * aObs ) - { - SMC_MOCK_METHOD1( void, MPsetRequestObserver *, aObs ) - } - -// ----------------------------------------------------------------------------- -// CPsetCli::RunL -// ----------------------------------------------------------------------------- -// -void CPsetCli::RunL() - { - - } - -// ----------------------------------------------------------------------------- -// CPsetCli::DoCancel -// ----------------------------------------------------------------------------- -// -void CPsetCli::DoCancel() - { - - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcliwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcliwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /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: - * - */ -#include -#include -#include -#include "psetcliwrapper.h" - -// ============================ MEMBER FUNCTIONS =============================== -class PSetCliWrapperPrivate -{ -public: - PSetCliWrapperPrivate() {} -}; - - -// ----------------------------------------------------------------------------- -// PSetCliWrapper::PSetCliWrapper -// ----------------------------------------------------------------------------- -// -PSetCliWrapper::PSetCliWrapper( - CPsetContainer & /*psetContainer*/, - QObject * parent ) - : - QObject(parent) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCliWrapper::~PSetCliWrapper -// ----------------------------------------------------------------------------- -// -PSetCliWrapper::~PSetCliWrapper( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetCliWrapper::getColpMode -// ----------------------------------------------------------------------------- -// -void PSetCliWrapper::getColpMode( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCliWrapper::getClipMode -// ----------------------------------------------------------------------------- -// -void PSetCliWrapper::getClipMode( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCliWrapper::getClirMode -// ----------------------------------------------------------------------------- -// -void PSetCliWrapper::getClirMode( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCliWrapper::getColrMode -// ----------------------------------------------------------------------------- -// -void PSetCliWrapper::getColrMode( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCliWrapper::getCnap -// ----------------------------------------------------------------------------- -// -void PSetCliWrapper::getCnap( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetCliWrapper::cancelAll -// ----------------------------------------------------------------------------- -// -void PSetCliWrapper::cancelAll( ) - { - SMC_MOCK_METHOD0( void ) - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcontainer.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcontainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +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 "PsetContainer.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPsetContainer::ConstructL -// ----------------------------------------------------------------------------- -// -void CPsetContainer::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::NewL -// ----------------------------------------------------------------------------- -// -CPsetContainer * CPsetContainer::NewL( ) - { - SMC_MOCK_NEWL0( CPsetContainer * ) - - CPsetContainer* self = new( ELeave ) CPsetContainer; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::~CPsetContainer -// ----------------------------------------------------------------------------- -// -CPsetContainer::~CPsetContainer( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::CreateCWObjectL -// ----------------------------------------------------------------------------- -// -CPsetCallWaiting * CPsetContainer::CreateCWObjectL( - MPsetCallWaitingObserver & aObserver ) - { - SMC_MOCK_METHOD1( CPsetCallWaiting *, MPsetCallWaitingObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::CreateCFObjectL -// ----------------------------------------------------------------------------- -// -CPsetCallDiverting * CPsetContainer::CreateCFObjectL( - MPsetDivertObserver & aObserver ) - { - SMC_MOCK_METHOD1( CPsetCallDiverting *, MPsetDivertObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::CreateCliObjectL -// ----------------------------------------------------------------------------- -// -CPsetCli * CPsetContainer::CreateCliObjectL( - MPsetCliObserver & aObserver ) - { - SMC_MOCK_METHOD1( CPsetCli *, MPsetCliObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::CreateCBObjectL -// ----------------------------------------------------------------------------- -// -CPsetCallBarring * CPsetContainer::CreateCBObjectL( - MPsetBarringObserver & aObserver ) - { - SMC_MOCK_METHOD1( CPsetCallBarring *, MPsetBarringObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::CreateNetworkObjectL -// ----------------------------------------------------------------------------- -// -CPsetNetwork * CPsetContainer::CreateNetworkObjectL( - MPsetNetworkInfoObserver & aObserver ) - { - SMC_MOCK_METHOD1( CPsetNetwork *, MPsetNetworkInfoObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::CreateRefreshHandlerL -// ----------------------------------------------------------------------------- -// -CPSetRefreshHandler * CPsetContainer::CreateRefreshHandlerL( ) - { - SMC_MOCK_METHOD0( CPSetRefreshHandler * ) - } - - -// ----------------------------------------------------------------------------- -// CPsetContainer::CreateNetworkModeObjectL -// ----------------------------------------------------------------------------- -// -CPsetNetwork * CPsetContainer::CreateNetworkModeObjectL( - MPsetNetworkModeObserver & aModeObserver ) - { - SMC_MOCK_METHOD1( CPsetNetwork *, MPsetNetworkModeObserver &, aModeObserver ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcsp.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcsp.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,168 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::NewL -// ----------------------------------------------------------------------------- -// -CPsetCustomerServiceProfile * CPsetCustomerServiceProfile::NewL( ) - { - SMC_MOCK_NEWL0( CPsetCustomerServiceProfile * ) - - CPsetCustomerServiceProfile* self = new( ELeave ) CPsetCustomerServiceProfile; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::~CPsetCustomerServiceProfile -// ----------------------------------------------------------------------------- -// -CPsetCustomerServiceProfile::~CPsetCustomerServiceProfile( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::IsCWSupported -// ----------------------------------------------------------------------------- -// -TInt CPsetCustomerServiceProfile::IsCWSupported( - TBool & aSupport ) - { - SMC_MOCK_METHOD1( TInt, TBool &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::IsCBSupported -// ----------------------------------------------------------------------------- -// -TInt CPsetCustomerServiceProfile::IsCBSupported( - TBool & aSupport ) - { - SMC_MOCK_METHOD1( TInt, TBool &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::IsCFSupported -// ----------------------------------------------------------------------------- -// -TInt CPsetCustomerServiceProfile::IsCFSupported( - TBool & aSupport ) - { - SMC_MOCK_METHOD1( TInt, TBool &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::IsALSSupported -// ----------------------------------------------------------------------------- -// -TInt CPsetCustomerServiceProfile::IsALSSupported( - TBool & aSupport ) - { - SMC_MOCK_METHOD1( TInt, TBool &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::OpenCSProfileL -// ----------------------------------------------------------------------------- -// -TInt CPsetCustomerServiceProfile::OpenCSProfileL( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::IsNetworkSelectionSupported -// ----------------------------------------------------------------------------- -// -TInt CPsetCustomerServiceProfile::IsNetworkSelectionSupported( - TBool & aSupport ) - { - SMC_MOCK_METHOD1( TInt, TBool &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::CheckIfCWSupported -// ----------------------------------------------------------------------------- -// -TBool CPsetCustomerServiceProfile::CheckIfCWSupported( - const RMobilePhone::TCspCallCompletion aContainer ) const - { - SMC_MOCK_METHOD1( TBool, const RMobilePhone::TCspCallCompletion, aContainer ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::CheckIfCBSupported -// ----------------------------------------------------------------------------- -// -TBool CPsetCustomerServiceProfile::CheckIfCBSupported( - const RMobilePhone::TCspCallRestriction aContainer ) const - { - SMC_MOCK_METHOD1( TBool, const RMobilePhone::TCspCallRestriction, aContainer ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::CheckIfCFSupported -// ----------------------------------------------------------------------------- -// -TBool CPsetCustomerServiceProfile::CheckIfCFSupported( - const RMobilePhone::TCspCallOffering aContainer ) const - { - SMC_MOCK_METHOD1( TBool, const RMobilePhone::TCspCallOffering, aContainer ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::CheckIfAlsSupported -// ----------------------------------------------------------------------------- -// -TBool CPsetCustomerServiceProfile::CheckIfAlsSupported( - const RMobilePhone::TCspCPHSTeleservices aContainer ) const - { - SMC_MOCK_METHOD1( TBool, const RMobilePhone::TCspCPHSTeleservices, aContainer ) - } - - -// ----------------------------------------------------------------------------- -// CPsetCustomerServiceProfile::CheckIfNetworkSelectionSupported -// ----------------------------------------------------------------------------- -// -TBool CPsetCustomerServiceProfile::CheckIfNetworkSelectionSupported( - const RMobilePhone::TCspValueAdded aContainer ) const - { - SMC_MOCK_METHOD1( TBool, const RMobilePhone::TCspValueAdded, aContainer ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetnetwork.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetnetwork.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +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 "PsetNetwork.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPsetNetwork::CPsetNetwork -// ----------------------------------------------------------------------------- -// -CPsetNetwork::CPsetNetwork( - RMobilePhone & aPhone ) - : - CActive(EPriorityStandard), - iPhone(aPhone) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::ConstructL -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::ConstructL( - MPsetNetworkInfoObserver & /*aObserver*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::NewL -// ----------------------------------------------------------------------------- -// -CPsetNetwork * CPsetNetwork::NewL( - RMobilePhone & aPhone, - MPsetNetworkInfoObserver & aObserver ) - { - SMC_MOCK_NEWL2( CPsetNetwork *, RMobilePhone &, aPhone, - MPsetNetworkInfoObserver &, aObserver ) - - CPsetNetwork* self = new ( ELeave ) CPsetNetwork( aPhone ); - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::NewL -// ----------------------------------------------------------------------------- -// -CPsetNetwork * CPsetNetwork::NewL( - RMobilePhone & aPhone, - MPsetNetworkModeObserver & aObserver ) - { - SMC_MOCK_NEWL2( CPsetNetwork *, RMobilePhone &, aPhone, - MPsetNetworkModeObserver &, aObserver ) - - CPsetNetwork* self = new ( ELeave ) CPsetNetwork( aPhone ); - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::~CPsetNetwork -// ----------------------------------------------------------------------------- -// -CPsetNetwork::~CPsetNetwork( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::GetAvailableNetworksL -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::GetAvailableNetworksL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::GetCurrentNetworkInfo -// ----------------------------------------------------------------------------- -// -TInt CPsetNetwork::GetCurrentNetworkInfo( - TCurrentNetworkInfo & aInfo ) - { - SMC_MOCK_METHOD1( TInt, TCurrentNetworkInfo &, aInfo ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::GetNetworkSelectMode -// ----------------------------------------------------------------------------- -// -TInt CPsetNetwork::GetNetworkSelectMode( - TSelectMode & aMode ) - { - SMC_MOCK_METHOD1( TInt, TSelectMode &, aMode ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::SelectNetworkL -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::SelectNetworkL( - const TNetworkInfo & aInfo ) - { - SMC_MOCK_METHOD1( void, const TNetworkInfo &, aInfo ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::CancelProcess -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::CancelProcess( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::SetNetworkModeSelectionL -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::SetNetworkModeSelectionL( - TUint32 & aNetworkMode ) - { - // Reference parameter is not really used to return some value so do not - // save it as a reference to the symbianmock, because test will fail - // if stack-based parameter is saved as a reference. - SMC_MOCK_METHOD1( void, TUint32/* &*/, aNetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::GetCurrentNetworkModeSelectionL -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::GetCurrentNetworkModeSelectionL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::IsCallActive -// ----------------------------------------------------------------------------- -// -TInt CPsetNetwork::IsCallActive( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::IsGPRSConnected -// ----------------------------------------------------------------------------- -// -TInt CPsetNetwork::IsGPRSConnected( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::ResetNetworkSearch -// ----------------------------------------------------------------------------- -// -TInt CPsetNetwork::ResetNetworkSearch( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::SetNetSAObserver -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::SetNetSAObserver( - MPsetNetworkInfoObserver & aObserver ) - { - SMC_MOCK_METHOD1( void, MPsetNetworkInfoObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::SetNetworkModeObserver -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::SetNetworkModeObserver( - MPsetNetworkModeObserver & aObserver ) - { - SMC_MOCK_METHOD1( void, MPsetNetworkModeObserver &, aObserver ) - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::DoCancel -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::DoCancel() - { - - } - - -// ----------------------------------------------------------------------------- -// CPsetNetwork::RunL -// ----------------------------------------------------------------------------- -// -void CPsetNetwork::RunL() - { - - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetnetworkwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetnetworkwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +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 "psetnetworkwrapper.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// PSetNetworkWrapper::PSetNetworkWrapper -// ----------------------------------------------------------------------------- -// -PSetNetworkWrapper::PSetNetworkWrapper( - CPsetContainer & /*psetContainer*/, - QObject * parent ) - : - QObject(parent) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetNetworkWrapper::~PSetNetworkWrapper -// ----------------------------------------------------------------------------- -// -PSetNetworkWrapper::~PSetNetworkWrapper( ) - { - - } - - -// ----------------------------------------------------------------------------- -// PSetNetworkWrapper::getAvailableNetworks -// ----------------------------------------------------------------------------- -// -void PSetNetworkWrapper::getAvailableNetworks( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetNetworkWrapper::getNetworkSelectionMode -// ----------------------------------------------------------------------------- -// -PSetNetworkWrapper::ErrorCode PSetNetworkWrapper::getNetworkSelectionMode( - PSetNetworkWrapper::NetworkSelectionMode & mode ) const - { - SMC_MOCK_METHOD1( ErrorCode, PSetNetworkWrapper::NetworkSelectionMode &, mode ) - } - - -// ----------------------------------------------------------------------------- -// PSetNetworkWrapper::selectNetwork -// ----------------------------------------------------------------------------- -// -void PSetNetworkWrapper::selectNetwork( - const PSetNetworkWrapper::NetworkInfo & networkInfo ) - { - SMC_MOCK_METHOD1( void, const PSetNetworkWrapper::NetworkInfo &, networkInfo ) - } - - -// ----------------------------------------------------------------------------- -// PSetNetworkWrapper::cancelRequest -// ----------------------------------------------------------------------------- -// -void PSetNetworkWrapper::cancelRequest( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetNetworkWrapper::getNetworkAccessMode -// ----------------------------------------------------------------------------- -// -void PSetNetworkWrapper::getNetworkAccessMode( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// PSetNetworkWrapper::setNetworkAccessMode -// ----------------------------------------------------------------------------- -// -void PSetNetworkWrapper::setNetworkAccessMode( - PSetNetworkWrapper::NetworkAccessMode mode ) - { - SMC_MOCK_METHOD1( void, PSetNetworkWrapper::NetworkAccessMode, mode ) - } diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/run_auto_tests_qt.bat --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/run_auto_tests_qt.bat Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -@echo off -setlocal -goto :startup - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function DEFAULT -:: -:: Modify this function -:: - TESTED_SRC can be changed to match tested code. -:: Specifies path from testcode group directory to -:: tested code -:: - Add test directories to be runned -:: ie. "call :build ut_projectdirectory" or use -:: "for /f %%a in ('dir /b ut_*') do call :build %%a" -:: which compiles, instruments and runs all test directories -:: starting with "ut_". -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:DEFAULT -set TESTED_SRC=..\..\src\*.cpp - -for /f %%a in ('dir /b ut_*') do call :build %%a -if [%DOMODULESTESTS%] EQU [TRUE] ( -for /f %%a in ('dir /b mt_*') do call :build %%a -) - -call :finish -goto :END - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function STARTUP -:: -:: Initializing script -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:STARTUP - -set BUILDTESTS=TRUE -set RUNTESTS=TRUE -set INSTRUMENT=TRUE -set REMOVEINSTRUMENT=TRUE -set DOMODULESTESTS=TRUE -set SBS_CALL=sbs --config winscw_udeb --keepgoing BUILD -set PATH_TO_DLL=\epoc32\release\winscw\udeb -set PATH_TO_COVERAGE_DATA=\coverage_data -set PATH_TO_RESULT=\test_result - -if not exist %PATH_TO_COVERAGE_DATA% ( -mkdir %PATH_TO_COVERAGE_DATA% -) - -if not exist %PATH_TO_RESULT% ( -mkdir %PATH_TO_RESULT% -) - -if [%1] EQU [] ( goto default ) - -call :%1 -call :%2 -call :%3 -call :%4 -call :%5 -echo Running tests = %RUNTESTS% -echo Instrumenting tests = %INSTRUMENT% -goto default - -:/NOCLEANUP -set REMOVEINSTRUMENT=FALSE -goto end - -:/NORUN -set RUNTESTS=FALSE -set REMOVEINSTRUMENT=FALSE -goto end - -:/NOINSTRUMENT -set INSTRUMENT=FALSE -goto end - -:/NOBUILD -set BUILDTESTS=FALSE -goto end - -:/ONLYUNITTESTS -set DOMODULESTESTS=FALSE -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function FINISH -:: -:: Finishes run_auto_tests.bat -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:FINISH - -if [%RUNTESTS%] EQU [TRUE] ( -call :runtests -) - -if [%INSTRUMENT%] EQU [TRUE] ( -call :calculatecoverage -) - -if [%REMOVEINSTRUMENT%] EQU [TRUE] ( -call :removecoverage -) -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function BUILD -:: param directory -:: -:: builds test from given directory -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:BUILD -setlocal -if [%BUILDTESTS%] EQU [FALSE] ( goto end ) -echo Building %1 -if not exist %1 ( -echo %1 Not found! -goto end -) - -pushd . -call cd %1 -call qmake -call sbs --config winscw_udeb --keepgoing CLEAN -if [%INSTRUMENT%] EQU [TRUE] ( -call ctcwrap -2comp -n %PATH_TO_COVERAGE_DATA%\%1 -i d -C "EXCLUDE=*" -C "NO_EXCLUDE=%TESTED_SRC%" "%SBS_CALL%" -) else ( -call %SBS_CALL% -) - -popd -endlocal -goto end - - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function RUNTESTS -:: -:: NOTE! Function assumes that test binary is named according to test directory. -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:RUNTESTS -echo Running tests -for /f %%a in ('dir /b ut_*') do ( - call %PATH_TO_DLL%\%%a.exe -dtextshell -- - move \epoc32\winscw\c\data\%%a.log %PATH_TO_RESULT%\%%a.log -) -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function CALCULATECOVERAGE -:: -:: Calculates test coverage. Generates html -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:CALCULATECOVERAGE -echo Calculating coverage -ctcpost %PATH_TO_COVERAGE_DATA%\*.sym -p - | ctcmerge -i - -o profile.txt -call ctc2html -t 70 -i profile.txt -o \coverage_result -nsb -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function REMOVECOVERAGE -:: -:: Removes data from coverage directory -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:REMOVECOVERAGE -echo Removing deleting coverage data -call del %PATH_TO_COVERAGE_DATA%\*.sym -call del %PATH_TO_COVERAGE_DATA%\*.dat -call del profile.txt -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function END -:: -:: Prints done -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:END -echo Done! \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,825 +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 "ut_psetcallbarringwrapper.h" -#include "testutilities.h" -#define private public -#include -#include "psetcallbarringwrapper_p.h" - -const int KInvalidEnumeration = -1; - -class BarringObserver : public MPsetBarringObserver -{ - void HandleBarringModeChangedL( - TBarringProgram aType, - TBarringStatus aStatus, - TBool aPlural ) - { - Q_UNUSED(aType); - Q_UNUSED(aStatus); - Q_UNUSED(aPlural); - } - - void HandleBarringModeStatusL( - TUint8 aBsc[KPSetNumberOfBsc], - TBarringStatus aStatus ) - { - Q_UNUSED(aBsc); - Q_UNUSED(aStatus); - } - - void HandleBarringErrorL( - TInt aReason ) - { - Q_UNUSED(aReason); - } - - void HandleCBRequestingL( - TBool aTrue, - TBool aInterrupted ) - { - Q_UNUSED(aTrue); - Q_UNUSED(aInterrupted); - } - - void SetEngineContact( - MPsetCallBarring* aBarringEngine ) - { - Q_UNUSED(aBarringEngine); - } - - void CbPasswordChangedL( - TBool aSuccess ) - { - Q_UNUSED(aSuccess); - } -}; - -void simulateLeaveL() -{ - User::Leave(KErrGeneral); -} - -/*! - UT_PSetCallBarringWrapper::UT_PSetCallBarringWrapper - */ -UT_PSetCallBarringWrapper::UT_PSetCallBarringWrapper() - : - m_psetContainerMock(NULL), - m_wrapper(NULL) -{ -} - - -/*! - UT_PSetCallBarringWrapper::~UT_PSetCallBarringWrapper - */ -UT_PSetCallBarringWrapper::~UT_PSetCallBarringWrapper() -{ - delete m_psetContainerMock; - delete m_wrapper; -} - - -/*! - UT_PSetCallBarringWrapper::init - */ -void UT_PSetCallBarringWrapper::init() -{ - initialize(); - - m_psetContainerMock = new CPsetContainer(); - - BarringObserver dummyObserver; - RMobilePhone dummyPhone; - - CPsetCallBarring *barringMock = NULL; - TRAPD(result, barringMock = CPsetCallBarring::NewL(dummyObserver, dummyPhone)); - QScopedPointer barringMockGuard(barringMock); - EXPECT(CPsetContainer, CreateCBObjectL) - .returns(barringMock); - m_wrapper = new PSetCallBarringWrapper(*m_psetContainerMock, NULL); - barringMockGuard.take(); - - QVERIFY(verify()); -} - - -/*! - UT_PSetCallBarringWrapper::cleanup - */ -void UT_PSetCallBarringWrapper::cleanup() -{ - reset(); - - delete m_psetContainerMock; - m_psetContainerMock = NULL; - delete m_wrapper; - m_wrapper = NULL; -} - - -/*! - UT_PSetCallBarringWrapper::t_construction - */ -void UT_PSetCallBarringWrapper::t_construction() -{ - EXPECT(CPsetContainer, CreateCBObjectL). - willOnce(invokeWithoutArguments(this, simulateLeaveAtMockMethodCall)); - PSetCallBarringWrapper *wrapper = NULL; - EXPECT_EXCEPTION( - wrapper = new PSetCallBarringWrapper(*m_psetContainerMock, NULL);); -} - - -/*! - UT_PSetCallBarringWrapper::t_barringStatus - */ -void UT_PSetCallBarringWrapper::t_barringStatus() -{ -// test status query with different service groups - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeAllBarrings); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupData, EBarringTypeAllBarrings); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupFax, EBarringTypeAllBarrings); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupAllTeleservices, EBarringTypeAllBarrings); - // invalid/unknown enumeration as service group identifier - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeAllBarrings); - - //TODO: remove SeviceGroupUnknown enumeration? - //m_wrapper->barringStatus(ServiceGroupUnknown); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->barringStatus(ServiceGroupData, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->barringStatus(ServiceGroupFax, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->barringStatus(ServiceGroupAllTeleservices, - PSetCallBarringWrapper::BarringTypeAllBarrings); - // invalid/unknown enumeration as service group identifier - m_wrapper->barringStatus( - static_cast(KInvalidEnumeration), - PSetCallBarringWrapper::BarringTypeAllBarrings); - -// test status query with different barring types - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeAllOutgoing); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeOutgoingInternational); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, - EBarringTypeOutgoingInternationalExceptToHomeCountry); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeAllIncoming); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeIncomingWhenRoaming); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeAllServices); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeAllOutgoingServices); - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeAllIncomingServices); - // invalid/unknown enumeration as barring type - EXPECT(CPsetCallBarring, GetBarringStatusL) - .with(EServiceGroupVoice, EBarringTypeAllBarrings); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllOutgoing); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeOutgoingInternational); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper:: - BarringTypeOutgoingInternationalExceptToHomeCountry); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllIncoming); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllServices); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllOutgoingServices); - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllIncomingServices); - // invalid/unknown enumeration as barring type - m_wrapper->barringStatus(ServiceGroupVoice, - static_cast(KInvalidEnumeration)); - - QVERIFY(verify()); -} - - -/*! - UT_PSetCallBarringWrapper::t_barringStatusExceptionOccurs - */ -void UT_PSetCallBarringWrapper::t_barringStatusExceptionOccurs() -{ - EXPECT(CPsetCallBarring, GetBarringStatusL) - .willOnce(invokeWithoutArguments(this, simulateLeaveAtMockMethodCall)); - - EXPECT_EXCEPTION( - m_wrapper->barringStatus( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - ) - - QVERIFY(verify()); -} - - -/*! - UT_PSetCallBarringWrapper::t_enableBarring - */ -void UT_PSetCallBarringWrapper::t_enableBarring() -{ - _LIT(KPassword, "1234"); - TCallBarringSetting setting; - setting.iType = EBarringTypeAllBarrings; - setting.iSetting = EActivateBarring; - setting.iServiceGroup = EServiceGroupVoice; - setting.iPassword.Copy(KPassword()); - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings, - QString("1234")); - - setting.iType = EBarringTypeAllOutgoing; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllOutgoing, - QString("1234")); - - setting.iType = EBarringTypeOutgoingInternational; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeOutgoingInternational, - QString("1234")); - - setting.iType = EBarringTypeOutgoingInternationalExceptToHomeCountry; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeOutgoingInternationalExceptToHomeCountry, - QString("1234")); - - setting.iType = EBarringTypeAllIncoming; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllIncoming, - QString("1234")); - - setting.iType = EBarringTypeIncomingWhenRoaming; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming, - QString("1234")); - - setting.iType = EBarringTypeAllServices; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllServices, - QString("1234")); - - setting.iType = EBarringTypeAllOutgoingServices; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllOutgoingServices, - QString("1234")); - - setting.iType = EBarringTypeAllIncomingServices; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllIncomingServices, - QString("1234")); - -// error handling - EXPECT(CPsetCallBarring, SetBarringL) - .willOnce(invokeWithoutArguments(simulateLeaveL)); - EXPECT_EXCEPTION( - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllIncomingServices, - QString("1234")); - ) - - QVERIFY(verify()); -} - - -/*! - UT_PSetCallBarringWrapper::t_disableBarring - */ -void UT_PSetCallBarringWrapper::t_disableBarring() -{ - _LIT(KPassword, "1234"); - TCallBarringSetting setting; - setting.iType = EBarringTypeAllBarrings; - setting.iSetting = ECancelBarring; - setting.iServiceGroup = EServiceGroupVoice; - setting.iPassword.Copy(KPassword()); - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings, - QString("1234")); - - setting.iType = EBarringTypeAllOutgoing; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllOutgoing, - QString("1234")); - - setting.iType = EBarringTypeOutgoingInternational; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeOutgoingInternational, - QString("1234")); - - setting.iType = EBarringTypeOutgoingInternationalExceptToHomeCountry; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeOutgoingInternationalExceptToHomeCountry, - QString("1234")); - - setting.iType = EBarringTypeAllIncoming; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllIncoming, - QString("1234")); - - setting.iType = EBarringTypeIncomingWhenRoaming; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeIncomingWhenRoaming, - QString("1234")); - - setting.iType = EBarringTypeAllServices; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllServices, - QString("1234")); - - setting.iType = EBarringTypeAllOutgoingServices; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllOutgoingServices, - QString("1234")); - - setting.iType = EBarringTypeAllIncomingServices; - EXPECT(CPsetCallBarring, SetBarringL) - .with(setting, EAllTeleAndBearer); - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllIncomingServices, - QString("1234")); - -// error handling - EXPECT(CPsetCallBarring, SetBarringL) - .willOnce(invokeWithoutArguments(simulateLeaveL)); - EXPECT_EXCEPTION( - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllIncomingServices, - QString("1234")); - ) - - QVERIFY(verify()); -} - - -/*! - UT_PSetCallBarringWrapper::t_changeBarringPassword - */ -void UT_PSetCallBarringWrapper::t_changeBarringPassword() -{ - QString oldPassword = "1234"; - QString newPassword = "4321"; - QString verifiedPassword = "4321"; - RMobilePhone::TMobilePhonePasswordChangeV2 passwordChange; - passwordChange.iOldPassword.Copy(oldPassword.utf16()); - passwordChange.iNewPassword.Copy(newPassword.utf16()); - passwordChange.iVerifiedPassword.Copy(verifiedPassword.utf16()); - EXPECT(CPsetCallBarring, ChangePasswordL) - .with(passwordChange); - - m_wrapper->changeBarringPassword( - oldPassword, newPassword, verifiedPassword); - -// error handling - EXPECT(CPsetCallBarring, ChangePasswordL) - .willOnce(invokeWithoutArguments(simulateLeaveL)); - EXPECT_EXCEPTION( - m_wrapper->changeBarringPassword( - oldPassword, newPassword, verifiedPassword); - ) - - QVERIFY(verify()); -} - - -/*! - UT_PSetCallBarringWrapper::t_HandleBarringModeChangedL - */ -void UT_PSetCallBarringWrapper::t_HandleBarringModeChangedL() -{ - TBool plural = EFalse; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeAllBarrings, EBarringStatusActive, plural); - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeAllOutgoing, EBarringStatusActive, plural); - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeOutgoingInternational, EBarringStatusActive, plural); - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeOutgoingInternationalExceptToHomeCountry, EBarringStatusActive, plural); - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeAllIncoming, EBarringStatusActive, plural); - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeIncomingWhenRoaming, EBarringStatusActive, plural); - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeAllServices, EBarringStatusActive, plural); - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeAllOutgoingServices, EBarringStatusActive, plural); - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeAllIncomingServices, EBarringStatusActive, plural); - ) -} - - -/*! - UT_PSetCallBarringWrapper::t_HandleBarringErrorL - */ -void UT_PSetCallBarringWrapper::t_HandleBarringErrorL() -{ - // TODO: dummy test as functionality not yet implemented - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleBarringErrorL(KErrGeneral); - ) -} - - -/*! - UT_PSetCallBarringWrapper::t_HandleCBRequestingL - */ -void UT_PSetCallBarringWrapper::t_HandleCBRequestingL() -{ - // TODO: dummy test as functionality not yet implemented - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCBRequestingL(EFalse, EFalse); - ) -} - - -/*! - UT_PSetCallBarringWrapper::t_SetEngineContact - */ -void UT_PSetCallBarringWrapper::t_SetEngineContact() -{ - // TODO: dummy test as functionality not yet implemented - m_wrapper->m_privateImpl->SetEngineContact(NULL); -} - - -/*! - UT_PSetCallBarringWrapper::t_CbPasswordChangedL - */ -void UT_PSetCallBarringWrapper::t_CbPasswordChangedL() -{ - TBool success = EFalse; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->CbPasswordChangedL(ETrue); - m_wrapper->m_privateImpl->CbPasswordChangedL(EFalse); - ) -} - - -/*! - UT_PSetCallBarringWrapper::t_HandleBarringModeStatusL - */ -Q_DECLARE_METATYPE(PSetCallBarringWrapper::BarringStatus) -Q_DECLARE_METATYPE(QList) -void UT_PSetCallBarringWrapper::t_HandleBarringModeStatusL() -{ - qRegisterMetaType - ("PSetCallBarringWrapper::BarringStatus"); - qRegisterMetaType >("QList"); - QSignalSpy spy(m_wrapper, - SIGNAL(barringStatusRequestCompleted( - int, - const QList &, - PSetCallBarringWrapper::BarringStatus))); - - TUint8 basicServiceGroupIds[KPSetNumberOfBsc]; - basicServiceGroupIds[0] = EServiceGroupVoice; - basicServiceGroupIds[1] = KPSetUnusedValue; -// test with different barring statuses - QT_TRAP_THROWING( - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->m_privateImpl->HandleBarringModeStatusL( - basicServiceGroupIds, EBarringStatusActive); - m_wrapper->m_privateImpl->RequestComplete(); - - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->m_privateImpl->HandleBarringModeStatusL( - basicServiceGroupIds, EBarringStatusInactive); - m_wrapper->m_privateImpl->RequestComplete(); - - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->m_privateImpl->HandleBarringModeStatusL( - basicServiceGroupIds, EBarringStatusNotProvisioned); - m_wrapper->m_privateImpl->RequestComplete(); - - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->m_privateImpl->HandleBarringModeStatusL( - basicServiceGroupIds, EBarringStatusUnavailable); - m_wrapper->m_privateImpl->RequestComplete(); - - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->m_privateImpl->HandleBarringModeStatusL( - basicServiceGroupIds, EBarringStatusUnknown); - m_wrapper->m_privateImpl->RequestComplete(); - - // invalid/unknown enumeration as barring status - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->m_privateImpl->HandleBarringModeStatusL( - basicServiceGroupIds, - static_cast(KInvalidEnumeration)); - m_wrapper->m_privateImpl->RequestComplete(); - ) - - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") == 0) { - // Signal emissions from RequestComplete will fail with exception safety - // tests so it's not possible to verify signal data. - return; - } - - QCOMPARE(spy.count(), 6); - QList resultBasicServiceGroupIds = - qvariant_cast >(spy.at(0).at(1)); - QVERIFY(ServiceGroupVoice == resultBasicServiceGroupIds[0]); - QVERIFY(PSetCallBarringWrapper::BarringStatusActive == - qvariant_cast(spy.at(0).at(2))); - - resultBasicServiceGroupIds = - qvariant_cast >(spy.at(1).at(1)); - QVERIFY(ServiceGroupVoice == resultBasicServiceGroupIds[0]); - QVERIFY(PSetCallBarringWrapper::BarringStatusInactive == - qvariant_cast(spy.at(1).at(2))); - - resultBasicServiceGroupIds = - qvariant_cast >(spy.at(2).at(1)); - QVERIFY(ServiceGroupVoice == resultBasicServiceGroupIds[0]); - QVERIFY(PSetCallBarringWrapper::BarringStatusNotProvisioned == - qvariant_cast(spy.at(2).at(2))); - - resultBasicServiceGroupIds = - qvariant_cast >(spy.at(3).at(1)); - QVERIFY(ServiceGroupVoice == resultBasicServiceGroupIds[0]); - QVERIFY(PSetCallBarringWrapper::BarringStatusUnavailable == - qvariant_cast(spy.at(3).at(2))); - - resultBasicServiceGroupIds = - qvariant_cast >(spy.at(4).at(1)); - QVERIFY(ServiceGroupVoice == resultBasicServiceGroupIds[0]); - QVERIFY(PSetCallBarringWrapper::BarringStatusUnknown == - qvariant_cast(spy.at(4).at(2))); - - // invalid/unknown enumeration as barring status - resultBasicServiceGroupIds = - qvariant_cast >(spy.at(5).at(1)); - QVERIFY(ServiceGroupVoice == resultBasicServiceGroupIds[0]); - QVERIFY(PSetCallBarringWrapper::BarringStatusUnknown == - qvariant_cast(spy.at(5).at(2))); -} - - -/*! - UT_PSetCallBarringWrapper::t_HandleBarringModeStatusNoBasicServiceGroupIdsL - */ -void UT_PSetCallBarringWrapper::t_HandleBarringModeStatusNoBasicServiceGroupIdsL() -{ - TUint8 basicServiceGroupIds[KPSetNumberOfBsc]; - basicServiceGroupIds[0] = KPSetUnusedValue; - QSignalSpy spy(m_wrapper, - SIGNAL(barringStatusRequestCompleted( - int, - const QList &, - PSetCallBarringWrapper::BarringStatus))); - - QT_TRAP_THROWING( - m_wrapper->barringStatus(ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings); - m_wrapper->m_privateImpl->HandleBarringModeStatusL( - basicServiceGroupIds, EBarringStatusActive); - m_wrapper->m_privateImpl->RequestComplete(); - ) - - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") == 0) { - // Signal emissions from RequestComplete will fail with exception safety - // tests so it's not possible to verify signal data. - return; - } - - QCOMPARE(spy.count(), 1); - QVERIFY(PSetCallBarringWrapper::BarringStatusActive == - qvariant_cast(spy.at(0).at(2))); -} - - -/*! - UT_PSetCallBarringWrapper::t_enableBarringRequestComplete - */ -Q_DECLARE_METATYPE(PSetCallBarringWrapper::BarringType) -void UT_PSetCallBarringWrapper::t_enableBarringRequestComplete() -{ - qRegisterMetaType( - "PSetCallBarringWrapper::BarringType"); - QSignalSpy spy( - m_wrapper, - SIGNAL(enableBarringRequestCompleted(int, - PSetCallBarringWrapper::BarringType, - PSetCallBarringWrapper::BarringStatus, - bool))); - - TCallBarringSetting setting; - m_wrapper->enableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings, - QString("1234")); - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeAllBarrings, EBarringStatusActive, EFalse); - ); - m_wrapper->m_privateImpl->RequestComplete(); - - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") == 0) { - // Signal emissions from RequestComplete will fail with exception safety - // tests so it's not possible to verify signal data. - return; - } - - QCOMPARE(spy.count(), 1); - QCOMPARE(spy.at(0).at(0).toInt(), 0); - QCOMPARE(spy.at(0).at(1).value(), - PSetCallBarringWrapper::BarringTypeAllBarrings); - QCOMPARE(spy.at(0).at(2).value(), - PSetCallBarringWrapper::BarringStatusActive); - QCOMPARE(spy.at(0).at(3).toBool(), false); -} - - -/*! - UT_PSetCallBarringWrapper::t_disableBarringRequestComplete - */ -void UT_PSetCallBarringWrapper::t_disableBarringRequestComplete() -{ - QSignalSpy spy( - m_wrapper, - SIGNAL(disableBarringRequestCompleted(int, - PSetCallBarringWrapper::BarringType, - PSetCallBarringWrapper::BarringStatus, - bool))); - - TCallBarringSetting setting; - m_wrapper->disableBarring( - ServiceGroupVoice, - PSetCallBarringWrapper::BarringTypeAllBarrings, - QString("1234")); - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleBarringModeChangedL( - EBarringTypeAllBarrings, EBarringStatusNotProvisioned, EFalse); - ); - m_wrapper->m_privateImpl->RequestComplete(); - - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") == 0) { - // Signal emissions from RequestComplete will fail with exception safety - // tests so it's not possible to verify signal data. - return; - } - - QCOMPARE(spy.count(), 1); - QCOMPARE(spy.at(0).at(0).toInt(), 0); - QCOMPARE(spy.at(0).at(1).value(), - PSetCallBarringWrapper::BarringTypeAllBarrings); - QCOMPARE(spy.at(0).at(2).value(), - PSetCallBarringWrapper::BarringStatusNotProvisioned); - QCOMPARE(spy.at(0).at(3).toBool(), false); -} - - -/*! - UT_PSetCallBarringWrapper::t_changeBarringPasswordRequestComplete - */ -void UT_PSetCallBarringWrapper::t_changeBarringPasswordRequestComplete() -{ - QSignalSpy spy( - m_wrapper, - SIGNAL(barringPasswordChangeRequestCompleted(int))); - - QString oldPassword = "1234"; - QString newPassword = "4321"; - QString verifiedPassword = "4321"; - m_wrapper->changeBarringPassword( - oldPassword, newPassword, verifiedPassword); - - m_wrapper->m_privateImpl->RequestComplete(); - - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") == 0) { - // Signal emissions from RequestComplete will fail with exception safety - // tests so it's not possible to verify signal data. - return; - } - - QCOMPARE(spy.count(), 1); - QCOMPARE(spy.at(0).at(0).toInt(), 0); -} - - -/*! - UT_PSetCallBarringWrapper::t_RequestStatusChanged - */ -void UT_PSetCallBarringWrapper::t_RequestStatusChanged() -{ - m_wrapper->m_privateImpl->RequestStatusChanged(0); -} - - -/*! - UT_PSetCallBarringWrapper::t_exceptionSafety - */ -void UT_PSetCallBarringWrapper::t_exceptionSafety() -{ - cleanup(); - - OomTestExecuter::runAllTests(*this, "t_exceptionSafety"); -} - - -/*! - UT_PSetCallBarringWrapper::simulateLeaveAtMockMethodCall - */ -void UT_PSetCallBarringWrapper::simulateLeaveAtMockMethodCall() -{ - User::Leave(KErrGeneral); -} - -QTEST_MAIN_S60(UT_PSetCallBarringWrapper) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +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 UT_PSETCALLBARRINGWRAPPER_H -#define UT_PSETCALLBARRINGWRAPPER_H - -#include -#include - -class CPsetContainer; -class PSetCallBarringWrapper; - -class UT_PSetCallBarringWrapper : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_PSetCallBarringWrapper(); - ~UT_PSetCallBarringWrapper(); - -private slots: - - void init(); - void cleanup(); - - void t_construction(); - void t_barringStatus(); - void t_barringStatusExceptionOccurs(); - void t_enableBarring(); - void t_disableBarring(); - void t_changeBarringPassword(); - - // private implementation tests - void t_HandleBarringModeStatusL(); - void t_HandleBarringModeStatusNoBasicServiceGroupIdsL(); - - void t_HandleBarringModeChangedL(); - void t_HandleBarringErrorL(); - void t_HandleCBRequestingL(); - void t_SetEngineContact(); - void t_CbPasswordChangedL(); - - void t_enableBarringRequestComplete(); - void t_disableBarringRequestComplete(); - void t_changeBarringPasswordRequestComplete(); - void t_RequestStatusChanged(); - - void t_exceptionSafety(); - -private: - - void simulateLeaveAtMockMethodCall(); - -private: - - CPsetContainer *m_psetContainerMock; - PSetCallBarringWrapper* m_wrapper; -}; - -#endif // UT_PSETCALLBARRINGWRAPPER_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.pro --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallbarringwrapper/ut_psetcallbarringwrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +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: Project file for building unit test component -# -# - -CONFIG += qtestlib release -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../../ ../common -DEFINES += BUILD_PSETWRAPPER -DEFINES += QT_NO_DEBUG_STREAM - -MOC_DIR = . - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += /epoc32/include/mw/QtTest \ - /epoc32/include/platform/mw \ - /epoc32/include/mw/qt - LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi -} - -# test code -HEADERS += ut_psetcallbarringwrapper.h -HEADERS += ../common/testutilities.h -SOURCES += ut_psetcallbarringwrapper.cpp -SOURCES += ../common/testutilities.cpp - -# code to be tested -HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcallbarringwrapper.h -SOURCES += ../../src/psetcallbarringwrapper.cpp \ - ../../src/psetcallbarringwrapper_p.cpp - -# mocks needed for testing -SOURCES += ../mocks/mock_psetcontainer.cpp \ - ../mocks/mock_psetcallbarring.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,735 +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 "ut_psetcalldivertingwrapper.h" -#include "mock_cphcltemergencycall.h" -#include "testutilities.h" -#define private public -#include "psetcalldivertingwrapper.h" -#include "psetcalldivertingwrapper_p.h" - -class DivertObserver : public MPsetDivertObserver -{ - void HandleDivertingChangedL( - const TCallDivertSetting& aSetting, TBool aPlural) - { - Q_UNUSED(aSetting); - Q_UNUSED(aPlural); - } - - void HandleDivertingStatusL(CMobilePhoneCFList& aSetting, TBool aPlural) - { - Q_UNUSED(aSetting); - Q_UNUSED(aPlural); - } - - void HandleDivertingErrorL(TInt aReason) - { - Q_UNUSED(aReason); - } - - void HandleCFRequestingL(TBool aOngoing, - TBool aInterrupted) - { - Q_UNUSED(aOngoing); - Q_UNUSED(aInterrupted); - } - - void SetEngineContact(MPsetCallDiverting* aDivertEngine) - { - Q_UNUSED(aDivertEngine); - } -}; - -void SimulateLeaveL() -{ - User::Leave(KErrGeneral); -} - -/*! - UT_PSetCallDivertingWrapper::UT_PSetWrapperCallDiverting - */ -UT_PSetCallDivertingWrapper::UT_PSetCallDivertingWrapper() - : mWrapper(NULL), mSetContainerMock(NULL) -{ -} - -/*! - UT_PSetCallDivertingWrapper::~UT_PSetWrapperCallDiverting - */ -UT_PSetCallDivertingWrapper::~UT_PSetCallDivertingWrapper() -{ - delete mWrapper; - delete mSetContainerMock; - mPsetCallDivertingMock = NULL; -} - -/*! - UT_PSetCallDivertingWrapper::init - */ -void UT_PSetCallDivertingWrapper::init() -{ - initialize(); - CPhCltEmergencyCallMock::iSimulateEmergencyNumberMatch = false; - - mSetContainerMock = new CPsetContainer(); - - RMobilePhone dummyHandle; - DivertObserver dummyObsever; - QT_TRAP_THROWING(mPsetCallDivertingMock - = CPsetCallDiverting::NewL(dummyObsever, dummyHandle)); - expect("CPsetContainer::CreateCFObjectL").returns(mPsetCallDivertingMock); - - // Wrapper takes ownership of callDivertingMock during construction. - // Mock must be deleted here if exception happens during construction. - QScopedPointer divertingMockPtr(mPsetCallDivertingMock); - mWrapper = new PSetCallDivertingWrapper(*mSetContainerMock, NULL); - divertingMockPtr.take(); -} - -/*! - UT_PSetCallDivertingWrapper::cleanup - */ -void UT_PSetCallDivertingWrapper::cleanup() -{ - reset(); - - delete mWrapper; - mWrapper = NULL; - delete mSetContainerMock; - mSetContainerMock = NULL; - mPsetCallDivertingMock = NULL; -} - -/*! - UT_PSetCallDivertingWrapper::t_construction - */ -void UT_PSetCallDivertingWrapper::t_construction() -{ - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") != 0) { - - expect("CPsetContainer::CreateCFObjectL"). - willOnce(invokeWithoutArguments(SimulateLeaveL)); - PSetCallDivertingWrapper *wrapper = NULL; - EXPECT_EXCEPTION( - wrapper = new PSetCallDivertingWrapper(*mSetContainerMock, NULL); - delete wrapper; - wrapper = NULL; - ) - QVERIFY(verify()); - - expect("CPhCltEmergencyCallMock::NewL"). - willOnce(invokeWithoutArguments(SimulateLeaveL)); - EXPECT_EXCEPTION( - wrapper = new PSetCallDivertingWrapper(*mSetContainerMock, NULL); - delete wrapper; - wrapper = NULL; - ) - QVERIFY(verify()); - } -} - -/*! - UT_PSetCallDivertingWrapper::t_setCallDivertingWithValidParameters - */ -void UT_PSetCallDivertingWrapper::t_setCallDivertingWithValidParameters() -{ - PSCallDivertingCommand divertingCmd; - divertingCmd.iCondition = DivertConditionUnconditional; - divertingCmd.iSetting = RegisterDiverting; - divertingCmd.iStatus = DivertingStatusUnknown; - divertingCmd.iServiceGroup = ServiceGroupVoice; - divertingCmd.iNumber = "1234567890"; - divertingCmd.iNoReplyTimer = 0; - - TCallDivertSetting expectedParam; - expectedParam.iCondition = EDivertConditionUnconditional; - expectedParam.iSetting = ERegisterDiverting; - expectedParam.iStatus = EDivertingStatusUnknown; - expectedParam.iServiceGroup = EServiceGroupVoice; - expectedParam.iNumber - = TPtrC16(reinterpret_cast(divertingCmd.iNumber.utf16())); - expectedParam.iNoReplyTimer - = static_cast(divertingCmd.iNoReplyTimer); - TBool isVmbx = EFalse; - expect("CPsetCallDiverting::SetDivertingL"). - with(expectedParam, ETelephony, isVmbx); - - mWrapper->setCallDiverting(divertingCmd, ETelephony); - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_setCallDivertingWithInvalidNumber - */ -void UT_PSetCallDivertingWrapper::t_setCallDivertingWithInvalidNumber() -{ - PSCallDivertingCommand divertingCmd; - divertingCmd.iCondition = DivertConditionUnconditional; - divertingCmd.iSetting = RegisterDiverting; - divertingCmd.iStatus = DivertingStatusUnknown; - divertingCmd.iServiceGroup = ServiceGroupVoice; - divertingCmd.iNoReplyTimer = 0; - - expect("CPsetCallDiverting::SetDivertingL").times(0); - - // DTMF digits "*#pw" are not allowed characters - divertingCmd.iNumber = "*"; - int result = mWrapper->setCallDiverting(divertingCmd, ETelephony); - QVERIFY(result == KErrGsmSSUnknownAlphabet); - divertingCmd.iNumber = "#"; - result = mWrapper->setCallDiverting(divertingCmd, ETelephony); - QVERIFY(result == KErrGsmSSUnknownAlphabet); - divertingCmd.iNumber = "p"; - result = mWrapper->setCallDiverting(divertingCmd, ETelephony); - QVERIFY(result == KErrGsmSSUnknownAlphabet); - divertingCmd.iNumber = "w"; - result = mWrapper->setCallDiverting(divertingCmd, ETelephony); - QVERIFY(result == KErrGsmSSUnknownAlphabet); - - // plus allowed only in the beginning of the number - divertingCmd.iNumber = "++"; - result = mWrapper->setCallDiverting(divertingCmd, ETelephony); - QVERIFY(result == KErrGsmSSUnknownAlphabet); - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_setCallDivertingWithEmergencyNumber - */ -void UT_PSetCallDivertingWrapper::t_setCallDivertingWithEmergencyNumber() -{ - PSCallDivertingCommand divertingCmd; - divertingCmd.iCondition = DivertConditionUnconditional; - divertingCmd.iSetting = RegisterDiverting; - divertingCmd.iStatus = DivertingStatusUnknown; - divertingCmd.iServiceGroup = ServiceGroupVoice; - divertingCmd.iNumber = "112"; - divertingCmd.iNoReplyTimer = 0; - - expect("CPsetCallDiverting::SetDivertingL").times(0); - CPhCltEmergencyCallMock::iSimulateEmergencyNumberMatch = ETrue; - expect("CPhCltEmergencyCallMock::IsEmergencyPhoneNumber").returns(KErrNone); - - int result = mWrapper->setCallDiverting(divertingCmd, ETelephony); - QVERIFY(result == KErrGsmSSIllegalOperation); - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_setCallDivertingException - */ -void UT_PSetCallDivertingWrapper::t_setCallDivertingException() -{ - PSCallDivertingCommand divertingCmd; - divertingCmd.iCondition = DivertConditionUnconditional; - divertingCmd.iSetting = RegisterDiverting; - divertingCmd.iStatus = DivertingStatusUnknown; - divertingCmd.iServiceGroup = ServiceGroupVoice; - divertingCmd.iNumber = "1234567890"; - divertingCmd.iNoReplyTimer = 0; - - expect("CPsetCallDiverting::SetDivertingL"). - willOnce(invokeWithoutArguments(this, &simulateLeaveOnMockMethodCallL)); - - EXPECT_EXCEPTION( - mWrapper->setCallDiverting(divertingCmd, ETelephony); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_getCallDivertingStatus - */ -void UT_PSetCallDivertingWrapper::t_getCallDivertingStatus() -{ - expect("CPsetCallDiverting::GetDivertingStatusL"). - with(EServiceGroupVoice, EDivertConditionUnconditional, ETelephony); - - mWrapper->getCallDivertingStatus( - ServiceGroupVoice, DivertConditionUnconditional, ETelephony); - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_getCallDivertingStatusException - */ -void UT_PSetCallDivertingWrapper::t_getCallDivertingStatusException() -{ - expect("CPsetCallDiverting::GetDivertingStatusL"). - with(EServiceGroupVoice, EDivertConditionUnconditional, ETelephony). - willOnce(invokeWithoutArguments(this, &simulateLeaveOnMockMethodCallL)); - - EXPECT_EXCEPTION( - mWrapper->getCallDivertingStatus( - ServiceGroupVoice, DivertConditionUnconditional, ETelephony); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_cancelProcess - */ -void UT_PSetCallDivertingWrapper::t_cancelProcess() -{ - expect("CPsetCallDiverting::CancelCurrentRequest"); - - mWrapper->cancelProcess(); - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_getDefaultNumbers - */ -void UT_PSetCallDivertingWrapper::t_getDefaultNumbers() -{ - expect("CPsetCallDiverting::GetDefaultNumbersL").times(1); - - QStringList defNumbers; - mWrapper->getDefaultNumbers(defNumbers); - - // 2 numbers added in mock_psetcalldiverting.cpp - QVERIFY(2 == defNumbers.count()); - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_getDefaultNumbersException - */ -void UT_PSetCallDivertingWrapper::t_getDefaultNumbersException() -{ - expect("CPsetCallDiverting::GetDefaultNumbersL"). - willOnce(invokeWithoutArguments(this, &simulateLeaveOnMockMethodCallL)); - - QStringList defNumbers; - EXPECT_EXCEPTION( - mWrapper->getDefaultNumbers(defNumbers); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_setNewDefaultNumber - */ -void UT_PSetCallDivertingWrapper::t_setNewDefaultNumber() -{ - expect("CPsetCallDiverting::SetNewDefaultNumberL").times(1); - expect("CPsetCallDiverting::SwapDefaultNumberL").times(0); - - // number not added in mock_psetcalldiverting.cpp - QString defNumber = "444444"; - mWrapper->setNewDefaultNumber(defNumber); - - expect("CPsetCallDiverting::GetDefaultNumbersL") - .willOnce(invoke(SimulateLeaveL)); - EXPECT_EXCEPTION( - mWrapper->setNewDefaultNumber(defNumber); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_getVoiceMailBoxNumber - */ -void UT_PSetCallDivertingWrapper::t_getVoiceMailBoxNumber() -{ - // Fail case #1, illegal argument - QString defNumber; - int ret; - - expect("CVoiceMailbox::GetStoredEntry").returns(-2).times(1); - ret = mWrapper->getVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, 0); - - // Fail case #2, Not supported. - expect("CVoiceMailbox::GetStoredEntry").returns(-5).times(1); - ret = mWrapper->getVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, -1); - - // Fail case #3, number nok - expect("CVoiceMailbox::GetStoredEntry").times(1); - expect("CVoiceMailboxEntry::GetVmbxNumber").returns(-1).times(1); - ret = mWrapper->getVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, 0); - - // ok case#1, number and save ok but no new number. - expect("CVoiceMailbox::GetStoredEntry").returns(-1).times(1); - ret = mWrapper->getVoiceMailBoxNumber(defNumber, ServiceGroupData); - QCOMPARE(ret, 0); - - // ok case#2, number ok - expect("CVoiceMailbox::GetStoredEntry").times(1); - expect("CVoiceMailboxEntry::GetVmbxNumber").times(1); - ret = mWrapper->getVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, 0); - - expect("CVoiceMailbox::NewL") - .willOnce(invoke(SimulateLeaveL)); - EXPECT_EXCEPTION( - mWrapper->getVoiceMailBoxNumber(defNumber, ServiceGroupFax); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_queryVoiceMailBoxNumber - */ -void UT_PSetCallDivertingWrapper::t_queryVoiceMailBoxNumber() -{ - // Fail case #1, illegal argument - QString defNumber; - int ret; - expect("CVoiceMailbox::GetStoredEntry").returns(-2).times(1); - ret = mWrapper->queryVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, 0); - - // Fail case #2, Not supported. - expect("CVoiceMailbox::GetStoredEntry").returns(-5).times(1); - ret = mWrapper->queryVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, -1); - - // Fail case #3, New number not given. - expect("CVoiceMailbox::GetStoredEntry").times(1); - expect("CVoiceMailbox::QueryNewEntry").returns(-5).times(1); - ret = mWrapper->queryVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, 0); - - // Fail case #4, save nok - expect("CVoiceMailbox::GetStoredEntry").returns(-1).times(1); - expect("CVoiceMailbox::QueryNewEntry").times(1); - expect("CVoiceMailbox::SaveEntry").returns(-4).times(1); - ret = mWrapper->queryVoiceMailBoxNumber(defNumber, ServiceGroupData); - QCOMPARE(ret, 0); - - // ok case#1, number and save ok but no new number. - expect("CVoiceMailbox::GetStoredEntry").returns(-1).times(1); - expect("CVoiceMailbox::QueryNewEntry").times(1); - expect("CVoiceMailbox::SaveEntry").times(1); - expect("CVoiceMailboxEntry::GetVmbxNumber").returns(-5).times(1); - ret = mWrapper->queryVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, 0); - - // ok case#2, number ok - expect("CVoiceMailbox::GetStoredEntry").times(1); - expect("CVoiceMailbox::QueryNewEntry").times(1); - expect("CVoiceMailbox::SaveEntry").times(1); - expect("CVoiceMailboxEntry::GetVmbxNumber").times(1); - ret = mWrapper->queryVoiceMailBoxNumber(defNumber, ServiceGroupVoice); - QCOMPARE(ret, 0); - - expect("CVoiceMailbox::NewL") - .willOnce(invoke(SimulateLeaveL)); - EXPECT_EXCEPTION( - mWrapper->queryVoiceMailBoxNumber(defNumber, ServiceGroupFax); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallDivertingWrapper::t_swapDefaultNumber - */ -void UT_PSetCallDivertingWrapper::t_swapDefaultNumber() -{ - expect("CPsetCallDiverting::SetNewDefaultNumberL").times(0); - expect("CPsetCallDiverting::SwapDefaultNumberL").times(1); - - // same number added in mock_psetcalldiverting.cpp - QString defNumber = "222222"; - mWrapper->setNewDefaultNumber(defNumber); - - QVERIFY(true == verify()); -} - - -Q_DECLARE_METATYPE(PSCallDivertingCommand) -/*! - UT_PSetCallDivertingWrapper::t_handleDivertingChanged - */ -void UT_PSetCallDivertingWrapper::t_handleDivertingChanged() -{ - qRegisterMetaType("PSCallDivertingCommand"); - QSignalSpy spy(mWrapper, - SIGNAL(handleDivertingChanged(const PSCallDivertingCommand&, bool))); - - TCallDivertSetting setting; - setting.iCondition = EDivertConditionUnconditional; - setting.iSetting = EActivateDiverting; - setting.iStatus = EDivertingStatusUnknown; - setting.iServiceGroup = EServiceGroupAllTeleservices; - setting.iNumber = KNullDesC(); - TBool plural = ETrue; - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingChangedL(setting, plural)); - - setting.iCondition = EDivertConditionBusy; - setting.iStatus = EDivertingStatusActive; - setting.iServiceGroup = EServiceGroupVoice; - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingChangedL(setting, plural)); - setting.iCondition = EDivertConditionNoReply; - setting.iStatus = EDivertingStatusInactive; - setting.iServiceGroup = EServiceGroupData; - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingChangedL(setting, plural)); - setting.iCondition = EDivertConditionNotReachable; - setting.iStatus = EDivertingStatusNotRegistered; - setting.iServiceGroup = EServiceGroupFax; - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingChangedL(setting, plural)); - setting.iCondition = EDivertConditionAllCalls; - setting.iStatus = EDivertingStatusNotProvisioned; - setting.iServiceGroup = EServiceGroupFax; - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingChangedL(setting, plural)); - setting.iCondition = EDivertConditionAllConditionalCases; - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingChangedL(setting, plural)); - - QCOMPARE(spy.count(), 6); - PSCallDivertingCommand actualCmd = - qvariant_cast(spy.at(0).at(0)); - QVERIFY(actualCmd.iCondition == DivertConditionUnconditional); - QVERIFY(actualCmd.iSetting == ActivateDiverting); - QVERIFY(actualCmd.iStatus == DivertingStatusUnknown); - QVERIFY(actualCmd.iServiceGroup == ServiceGroupAllTeleservices); - QVERIFY(actualCmd.iNumber == QString::fromUtf16(setting.iNumber.Ptr(), - setting.iNumber.Length())); - QVERIFY(spy.at(0).at(1).toBool() == true); - - actualCmd = qvariant_cast(spy.at(1).at(0)); - QVERIFY(actualCmd.iCondition == DivertConditionBusy); - QVERIFY(actualCmd.iStatus == DivertingStatusActive); - QVERIFY(actualCmd.iServiceGroup == ServiceGroupVoice); - actualCmd = qvariant_cast(spy.at(2).at(0)); - QVERIFY(actualCmd.iCondition == DivertConditionNoReply); - QVERIFY(actualCmd.iStatus == DivertingStatusInactive); - QVERIFY(actualCmd.iServiceGroup == ServiceGroupData); - actualCmd = qvariant_cast(spy.at(3).at(0)); - QVERIFY(actualCmd.iCondition == DivertConditionNotReachable); - QVERIFY(actualCmd.iStatus == DivertingStatusNotRegistered); - QVERIFY(actualCmd.iServiceGroup == ServiceGroupFax); - actualCmd = qvariant_cast(spy.at(4).at(0)); - QVERIFY(actualCmd.iCondition == DivertConditionAllCalls); - QVERIFY(actualCmd.iStatus == DivertingStatusNotProvisioned); - QVERIFY(actualCmd.iServiceGroup == ServiceGroupFax); - actualCmd = qvariant_cast(spy.at(5).at(0)); - QVERIFY(actualCmd.iCondition == DivertConditionAllConditionalCases); - - QVERIFY(true == verify()); -} - - -/*! - UT_PSetCallDivertingWrapper::t_handleDivertingStatus - */ -void UT_PSetCallDivertingWrapper::t_handleDivertingStatus() -{ - qRegisterMetaType >("QList&"); - QSignalSpy spy(mWrapper, - SIGNAL(handleDivertingStatus(QList&, bool))); - - // With empty list - CMobilePhoneCFList* cfList = NULL; - QT_TRAP_THROWING(cfList = CMobilePhoneCFList::NewL()); - QScopedPointer cfListDeleter(cfList); - TBool plural = ETrue; - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingStatusL(*cfList, plural)); - - QCOMPARE(spy.count(), 1); - QVERIFY(spy.at(0).at(1).toBool() == true); - spy.clear(); - - // With list entry - RMobilePhone::TMobilePhoneCFInfoEntryV1 entry; - entry.iStatus = RMobilePhone::ECallForwardingStatusNotProvisioned; - entry.iCondition = RMobilePhone::ECallForwardingAllConditionalCases; - cfList->AddEntryL(entry); - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingStatusL(*cfList, plural)); - - QCOMPARE(spy.count(), 1); - QList result = - *reinterpret_cast *>(spy.at(0).at(0).constData()); - - QVERIFY(result.at(0)->iStatus == DivertingStatusNotProvisioned); - QVERIFY(result.at(0)->iCondition == DivertConditionAllConditionalCases); - QVERIFY(spy.at(0).at(1).toBool() == true); - spy.clear(); - - // With list, two entries - delete cfList; - QT_TRAP_THROWING(cfList = CMobilePhoneCFList::NewL()); - entry.iStatus = RMobilePhone::ECallForwardingStatusNotActive; - entry.iCondition = RMobilePhone::ECallForwardingBusy; - cfList->AddEntryL(entry); // Takes copy - - RMobilePhone::TMobilePhoneCFInfoEntryV1 entry2; - entry2.iStatus = RMobilePhone::ECallForwardingStatusActive; - entry2.iCondition = RMobilePhone::ECallForwardingUnconditional; - cfList->AddEntryL(entry2); - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleDivertingStatusL(*cfList, plural)); - - QCOMPARE(spy.count(), 1); - result = *reinterpret_cast *>(spy.at(0).at(0).constData()); - QVERIFY(result.at(0)->iStatus == DivertingStatusInactive); - QVERIFY(result.at(0)->iCondition == DivertConditionBusy); - - QVERIFY(result.at(1)->iStatus == DivertingStatusActive); - QVERIFY(result.at(1)->iCondition == DivertConditionUnconditional); - QVERIFY(spy.at(0).at(1).toBool() == true); - spy.clear(); -} - -/*! - UT_PSetCallDivertingWrapper::t_handleDivertingError - */ -void UT_PSetCallDivertingWrapper::t_handleDivertingError() -{ - QSignalSpy spy(mWrapper, SIGNAL(handleDivertingError(int))); - - QT_TRAP_THROWING(mWrapper->m_Priv->HandleDivertingErrorL(KErrGeneral)); - - QCOMPARE(spy.count(), 1); - QVERIFY(spy.at(0).at(0).toInt() == KErrGeneral); -} - -/*! - UT_PSetCallDivertingWrapper::t_handleCFRequesting - */ -void UT_PSetCallDivertingWrapper::t_handleCFRequesting() -{ - QSignalSpy spy(mWrapper, SIGNAL(handleCFRequesting(bool, bool))); - - TBool ongoing = ETrue; - TBool interrupted = ETrue; - QT_TRAP_THROWING( - mWrapper->m_Priv->HandleCFRequestingL(ongoing, interrupted)); - - QCOMPARE(spy.count(), 1); - QVERIFY(spy.at(0).at(0).toBool() == true); - QVERIFY(spy.at(0).at(1).toBool() == true); -} - -/*! - UT_PSetCallDivertingWrapper::t_setEngineContact - TODO: dummy test because no implementation for the method currently. - */ -void UT_PSetCallDivertingWrapper::t_setEngineContact() -{ - mWrapper->m_Priv->SetEngineContact(mPsetCallDivertingMock); -} - -/*! - UT_PSetCallDivertingWrapper::t_handleEmergencyDial - TODO: dummy test because no implementation for the method currently. - */ -void UT_PSetCallDivertingWrapper::t_handleEmergencyDial() -{ - QT_TRAP_THROWING(mWrapper->m_Priv->HandleEmergencyDialL(KErrNone)); -} - -/*! - UT_PSetCallDivertingWrapper::t_convertPsCallDivertingCondition - */ -void UT_PSetCallDivertingWrapper::t_convertPsCallDivertingCondition() -{ - QVERIFY(EDivertConditionUnconditional == - mWrapper->m_Priv->convert(DivertConditionUnknown)); - QVERIFY(EDivertConditionUnconditional == - mWrapper->m_Priv->convert(DivertConditionUnconditional)); - QVERIFY(EDivertConditionBusy == - mWrapper->m_Priv->convert(DivertConditionBusy)); - QVERIFY(EDivertConditionNoReply == - mWrapper->m_Priv->convert(DivertConditionNoReply)); - QVERIFY(EDivertConditionNotReachable == - mWrapper->m_Priv->convert(DivertConditionNotReachable)); - QVERIFY(EDivertConditionAllCalls == - mWrapper->m_Priv->convert(DivertConditionAllCalls)); - QVERIFY(EDivertConditionAllConditionalCases == - mWrapper->m_Priv->convert(DivertConditionAllConditionalCases)); -} - -/*! - UT_PSetCallDivertingWrapper::t_convertPsCallDivertingStatus - */ -void UT_PSetCallDivertingWrapper::t_convertPsCallDivertingStatus() -{ - QVERIFY(EDivertingStatusActive == - mWrapper->m_Priv->convert(DivertingStatusActive)); - QVERIFY(EDivertingStatusInactive == - mWrapper->m_Priv->convert(DivertingStatusInactive)); - QVERIFY(EDivertingStatusNotRegistered == - mWrapper->m_Priv->convert(DivertingStatusNotRegistered)); - QVERIFY(EDivertingStatusNotProvisioned == - mWrapper->m_Priv->convert(DivertingStatusNotProvisioned)); -} - -/*! - UT_PSetCallDivertingWrapper::t_convertPsCallDivertingSetting - */ -void UT_PSetCallDivertingWrapper::t_convertPsCallDivertingSetting() -{ - QVERIFY(EActivateDiverting == - mWrapper->m_Priv->convert(ActivateDiverting)); - QVERIFY(ECancelDiverting == - mWrapper->m_Priv->convert(CancelDiverting)); - QVERIFY(ERegisterDiverting == - mWrapper->m_Priv->convert(RegisterDiverting)); - QVERIFY(EEraseDiverting == - mWrapper->m_Priv->convert(EraseDiverting)); - QVERIFY(ECheckStatus == - mWrapper->m_Priv->convert(CheckStatus)); - const int invalidEnumeration = -1; - QVERIFY(ECheckStatus == mWrapper->m_Priv->convert( - static_cast(invalidEnumeration))); -} - -/*! - UT_PSetCallDivertingWrapper::t_exceptionSafety - */ -void UT_PSetCallDivertingWrapper::t_exceptionSafety() -{ - cleanup(); - - OomTestExecuter::runAllTests(*this, "t_exceptionSafety"); -} - -/*! - UT_PSetCallDivertingWrapper::simulateLeaveOnMockMethodCallL - */ -void UT_PSetCallDivertingWrapper::simulateLeaveOnMockMethodCallL() -{ - User::Leave(KErrGeneral); -} - -QTEST_MAIN_S60(UT_PSetCallDivertingWrapper) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +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 UT_PSETCALLDIVERTINGWRAPPER_H -#define UT_PSETCALLDIVERTINGWRAPPER_H - -#include -#include - -class PSetCallDivertingWrapper; -class CPsetContainer; -class CPsetCallDiverting; - -class UT_PSetCallDivertingWrapper : public QObject, MockService -{ - Q_OBJECT - -public: - UT_PSetCallDivertingWrapper(); - ~UT_PSetCallDivertingWrapper(); - -private slots: - - void init(); - void cleanup(); - void t_construction(); - - void t_setCallDivertingWithValidParameters(); - void t_setCallDivertingWithInvalidNumber(); - void t_setCallDivertingWithEmergencyNumber(); - void t_setCallDivertingException(); - - void t_getCallDivertingStatus(); - void t_getCallDivertingStatusException(); - void t_cancelProcess(); - - void t_getDefaultNumbers(); - void t_getDefaultNumbersException(); - void t_setNewDefaultNumber(); - void t_getVoiceMailBoxNumber(); - void t_queryVoiceMailBoxNumber(); - void t_swapDefaultNumber(); - - // tests for private implementation - void t_handleDivertingChanged(); - void t_handleDivertingStatus(); - void t_handleDivertingError(); - void t_handleCFRequesting(); - void t_setEngineContact(); - void t_handleEmergencyDial(); - - void t_convertPsCallDivertingCondition(); - void t_convertPsCallDivertingStatus(); - void t_convertPsCallDivertingSetting(); - void t_exceptionSafety(); - -private: - - void simulateLeaveOnMockMethodCallL(); - -private: - PSetCallDivertingWrapper *mWrapper; - CPsetContainer *mSetContainerMock; - CPsetCallDiverting *mPsetCallDivertingMock; -}; - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.pro --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +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: Project file for building unit test component -# -# - -CONFIG += qtestlib release -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../common -DEFINES += BUILD_PSETWRAPPER -DEFINES += QT_NO_DEBUG_STREAM - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += /epoc32/include/mw/QtTest \ - /epoc32/include/platform/mw \ - /epoc32/include/mw/qt - LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lvmbxengine -} - -# test code -HEADERS += ut_psetcalldivertingwrapper.h -HEADERS += ../common/testutilities.h -SOURCES += ut_psetcalldivertingwrapper.cpp -SOURCES += ../common/testutilities.cpp - -# code to be tested -HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h -SOURCES += ../../src/psetcalldivertingwrapper.cpp \ - ../../src/psetcalldivertingwrapper_p.cpp - -# mocks needed for testing -SOURCES += ../mocks/mock_psetcontainer.cpp \ - ../mocks/mock_cphcltemergencycall.cpp \ - ../mocks/mock_psetcalldiverting.cpp \ - ../mocks/mock_cvoicemailbox.cpp \ - ../mocks/mock_cvoicemailboxentry.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,348 +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 "ut_psetcallwaitingwrapper.h" -#include "testutilities.h" -#define private public -#include "psetcallwaitingwrapper.h" -#include "psetcallwaitingwrapper_p.h" - -class WaitingObserver : public MPsetCallWaitingObserver -{ - void HandleCallWaitingGetStatusL( - const MPsetCallWaiting::TGetCallWaitingStatus aStatus, - TUint8 aBsc[KPSetNumberOfBsc]) - { - Q_UNUSED(aStatus); - Q_UNUSED(aBsc); - } - - void HandleCallWaitingChangedL( - const MPsetCallWaiting::TSetCallWaiting aSetting, - const TInt aResult) - { - Q_UNUSED(aSetting); - Q_UNUSED(aResult); - } - - void HandleCWRequestingL( - TBool aOngoing, - TBool aInterrupted) - { - Q_UNUSED(aOngoing); - Q_UNUSED(aInterrupted); - } - - void HandleCWErrorL( - TInt aReason) - { - Q_UNUSED(aReason); - } - - void SetEngineContact( - MPsetCallWaiting& aEngineContact) - { - Q_UNUSED(aEngineContact); - } -}; - -void SimulateLeaveL() -{ - User::Leave(KErrGeneral); -} - -/*! - UT_PSetCallWaitingWrapper::UT_PSetCallWaitingWrapper - */ -UT_PSetCallWaitingWrapper::UT_PSetCallWaitingWrapper() - : - m_numOfLeaveSimulations(0), - m_psetContainerMock(NULL), - m_psetCallWaitingMock(NULL), - m_wrapper(NULL) -{ -} - -/*! - UT_PSetCallWaitingWrapper::~UT_PSetCallWaitingWrapper - */ -UT_PSetCallWaitingWrapper::~UT_PSetCallWaitingWrapper() -{ - delete m_psetContainerMock; - m_psetCallWaitingMock = NULL; - delete m_wrapper; -} - -/*! - UT_PSetCallWaitingWrapper::init - */ -void UT_PSetCallWaitingWrapper::init() -{ - initialize(); - m_numOfLeaveSimulations = 0; - - m_psetContainerMock = new CPsetContainer(); - - RMobilePhone dummyHandle; - WaitingObserver dummyObserver; - QT_TRAP_THROWING(m_psetCallWaitingMock = - CPsetCallWaiting::NewL(dummyHandle, dummyObserver)); - expect("CPsetContainer::CreateCWObjectL").returns(m_psetCallWaitingMock); - - // wrapper takes ownership of callDivertingMock during successful - // construction - QScopedPointer callWaitingMockPtr(m_psetCallWaitingMock); - m_wrapper = new PSetCallWaitingWrapper(*m_psetContainerMock, NULL); - callWaitingMockPtr.take(); -} - -/*! - UT_PSetCallWaitingWrapper::cleanup - */ -void UT_PSetCallWaitingWrapper::cleanup() -{ - reset(); - - delete m_psetContainerMock; - m_psetContainerMock = NULL; - m_psetCallWaitingMock = NULL; - delete m_wrapper; - m_wrapper = NULL; -} - - -/*! - UT_PSetCallWaitingWrapper::t_construction - */ -void UT_PSetCallWaitingWrapper::t_construction() -{ - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") != 0) { - expect("CPsetContainer::CreateCWObjectL"). - willOnce(invokeWithoutArguments(SimulateLeaveL)); - - PSetCallWaitingWrapper *wrapper = NULL; - EXPECT_EXCEPTION( - wrapper = new PSetCallWaitingWrapper(*m_psetContainerMock, NULL); - ) - delete wrapper; - - QVERIFY(verify()); - } -} - - -/*! - UT_PSetCallWaitingWrapper::t_setCallWaiting - */ -void UT_PSetCallWaitingWrapper::t_setCallWaiting() -{ - TBasicServiceGroups basicServiceGroup = EAllTele; - expect("CPsetCallWaiting::SetCallWaitingL"). - with(MPsetCallWaiting::EActivateCallWaiting, basicServiceGroup); - expect("CPsetCallWaiting::SetCallWaitingL"). - with(MPsetCallWaiting::EDeactivateCallWaiting, basicServiceGroup); - - int invalidEnumeration = -1; - expect("CPsetCallWaiting::SetCallWaitingL"). - with(static_cast(invalidEnumeration), basicServiceGroup). - willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL)); - - m_wrapper->setCallWaiting( - PSetCallWaitingWrapper::ActivateCallWaiting, - basicServiceGroup); - m_wrapper->setCallWaiting( - PSetCallWaitingWrapper::DeactivateCallWaiting, - basicServiceGroup); - EXPECT_EXCEPTION( - m_wrapper->setCallWaiting( - static_cast(invalidEnumeration), - basicServiceGroup); - ) - - QVERIFY(1 == m_numOfLeaveSimulations); - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallWaitingWrapper::t_getCallWaitingStatus - */ -void UT_PSetCallWaitingWrapper::t_getCallWaitingStatus() -{ - expect("CPsetCallWaiting::GetCallWaitingStatusL"). - willOnce(invoke(this, &SimulateLeaveAtMockMethodCallL)); - - EXPECT_EXCEPTION( - m_wrapper->getCallWaitingStatus(); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallWaitingWrapper::t_cancelProcess - */ -void UT_PSetCallWaitingWrapper::t_cancelProcess() -{ - expect("CPsetCallWaiting::CancelProcess"); - - m_wrapper->cancelProcess(); - - QVERIFY(true == verify()); -} - -/*! - UT_PSetCallWaitingWrapper::t_handleCallWaitingGetStatus - */ -Q_DECLARE_METATYPE(PSetCallWaitingWrapper::PsCallWaitingStatus) -Q_DECLARE_METATYPE(QList) -void UT_PSetCallWaitingWrapper::t_handleCallWaitingGetStatus() -{ - qRegisterMetaType - ("PSetCallWaitingWrapper::PsCallWaitingStatus"); - qRegisterMetaType >("QList"); - QSignalSpy spy(m_wrapper, SIGNAL(handleCallWaitingGetStatus( - PSetCallWaitingWrapper::PsCallWaitingStatus, const QList &))); - - MPsetCallWaiting::TGetCallWaitingStatus status = - MPsetCallWaiting::EStatusActive; - TUint8 bscList[KPSetNumberOfBsc]; - bscList[0] = EAllTele; - bscList[1] = KPSetUnusedValue; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList)); - status = MPsetCallWaiting::EStatusDisabled; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList)); - status = MPsetCallWaiting::EStatusNotAvailable; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList)); - status = MPsetCallWaiting::EStatusNotProvisioned; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList)); - status = MPsetCallWaiting::EStatusUnknown; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList)); - - const int expectedNumOfSignalEmissions = 5; - QCOMPARE(spy.count(), expectedNumOfSignalEmissions); - const QList &arguments = spy.at(0); - QVERIFY(PSetCallWaitingWrapper::StatusActive == - arguments.at(0).value()); - QVERIFY(EAllTele == arguments.at(1).value >()[0]); - QVERIFY(PSetCallWaitingWrapper::StatusDisabled == - spy.at(1).at(0).value()); - QVERIFY(EAllTele == spy.at(1).at(1).value >()[0]); - QVERIFY(PSetCallWaitingWrapper::StatusNotAvailable == - spy.at(2).at(0).value()); - QVERIFY(EAllTele == spy.at(2).at(1).value >()[0]); - QVERIFY(PSetCallWaitingWrapper::StatusNotProvisioned == - spy.at(3).at(0).value()); - QVERIFY(EAllTele == spy.at(3).at(1).value >()[0]); - QVERIFY(PSetCallWaitingWrapper::StatusUnknown == - spy.at(4).at(0).value()); - QVERIFY(EAllTele == spy.at(4).at(1).value >()[0]); -} - -/*! - UT_PSetCallWaitingWrapper::t_handleCallWaitingChanged - */ -Q_DECLARE_METATYPE(PSetCallWaitingWrapper::PsCallWaitingCommand) -void UT_PSetCallWaitingWrapper::t_handleCallWaitingChanged() -{ - qRegisterMetaType - ("PSetCallWaitingWrapper::PsCallWaitingCommand"); - QSignalSpy spy(m_wrapper, SIGNAL(handleCallWaitingChanged( - PSetCallWaitingWrapper::PsCallWaitingCommand, int))); - - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCallWaitingChangedL( - MPsetCallWaiting::EActivateCallWaiting, KErrNone)); - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCallWaitingChangedL( - MPsetCallWaiting::EDeactivateCallWaiting, KErrNone)); - - const int expectedNumOfSignalEmissions = 2; - QCOMPARE(spy.count(), expectedNumOfSignalEmissions); - QVERIFY(PSetCallWaitingWrapper::ActivateCallWaiting == - spy.at(0).at(0).value()); - QVERIFY(KErrNone == spy.at(0).at(1).toInt()); - QVERIFY(PSetCallWaitingWrapper::DeactivateCallWaiting == - spy.at(1).at(0).value()); - QVERIFY(KErrNone == spy.at(1).at(1).toInt()); -} - -/*! - UT_PSetCallWaitingWrapper::t_handleCallWaitingRequesting - */ -void UT_PSetCallWaitingWrapper::t_handleCallWaitingRequesting() -{ - QSignalSpy spy(m_wrapper, - SIGNAL(handleCallWaitingRequesting(bool, bool))); - - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCWRequestingL(ETrue, ETrue)); - - QCOMPARE(spy.count(), 1); - const QList &arguments = spy.at(0); - QVERIFY(true == arguments.at(0).toBool()); - QVERIFY(true == arguments.at(1).toBool()); -} - -/*! - UT_PSetCallWaitingWrapper::t_handleCallWaitingError - */ -void UT_PSetCallWaitingWrapper::t_handleCallWaitingError() -{ - QSignalSpy spy(m_wrapper, SIGNAL(handleCallWaitingError(int))); - - QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleCWErrorL(KErrGeneral)); - - QCOMPARE(spy.count(), 1); - const QList &arguments = spy.at(0); - QVERIFY(KErrGeneral == arguments.at(0).toInt()); -} - -/*! - UT_PSetCallWaitingWrapper::t_setEngineContact - */ -void UT_PSetCallWaitingWrapper::t_setEngineContact() -{ - // dummy test as no real implementation for the method currently - m_wrapper->m_privateImpl->SetEngineContact( - reinterpret_cast(*this)); -} - -/*! - UT_PSetCallWaitingWrapper::t_exceptionSafety - */ -void UT_PSetCallWaitingWrapper::t_exceptionSafety() -{ - cleanup(); - - OomTestExecuter::runAllTests(*this, "t_exceptionSafety"); -} - -void UT_PSetCallWaitingWrapper::SimulateLeaveAtMockMethodCallL() -{ - m_numOfLeaveSimulations++; - User::Leave( KErrGeneral ); -} - -QTEST_MAIN_S60(UT_PSetCallWaitingWrapper) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +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 UT_PSETCALLWAITINGWRAPPER_H -#define UT_PSETCALLWAITINGWRAPPER_H - -#include -#include - -class CPsetContainer; -class CPsetCallWaiting; -class PSetCallWaitingWrapper; - -class UT_PSetCallWaitingWrapper : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_PSetCallWaitingWrapper(); - ~UT_PSetCallWaitingWrapper(); - -private slots: - - void init(); - void cleanup(); - - void t_construction(); - void t_setCallWaiting(); - void t_getCallWaitingStatus(); - void t_cancelProcess(); - - // signal emitting/private implementation tests - void t_handleCallWaitingGetStatus(); - void t_handleCallWaitingChanged(); - void t_handleCallWaitingRequesting(); - void t_handleCallWaitingError(); - void t_setEngineContact(); - - void t_exceptionSafety(); - -private: - - void SimulateLeaveAtMockMethodCallL(); - -private: - - int m_numOfLeaveSimulations; - CPsetContainer *m_psetContainerMock; - CPsetCallWaiting *m_psetCallWaitingMock; - PSetCallWaitingWrapper* m_wrapper; -}; - -#endif // UT_PSETCALLWAITINGWRAPPER_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.pro --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +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: Project file for building unit test component -# -# - -CONFIG += qtestlib release -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../../ ../common -DEFINES += BUILD_PSETWRAPPER - -MOC_DIR = . - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += /epoc32/include/mw/QtTest \ - /epoc32/include/platform/mw \ - /epoc32/include/mw/qt - LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi -} - -# test code -HEADERS += ut_psetcallwaitingwrapper.h -HEADERS += ../common/testutilities.h -SOURCES += ut_psetcallwaitingwrapper.cpp -SOURCES += ../common/testutilities.cpp - -# code to be tested -HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h -SOURCES += ../../src/psetcallwaitingwrapper.cpp \ - ../../src/psetcallwaitingwrapper_p.cpp - -# mocks needed for testing -SOURCES += ../mocks/mock_psetcontainer.cpp \ - ../mocks/mock_psetcallwaiting.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,366 +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 "ut_psetcliwrapper.h" -#include "testutilities.h" -#define private public -#include "psetcliwrapper.h" -#include "psetcliwrapper_p.h" - -class CliObserver : public MPsetCliObserver -{ - void SetEngineContact( MPsetCli* aEngine ) - { - Q_UNUSED(aEngine); - } - - void HandleCliRequestingL( TBool aOngoing, - TBool aInterrupted ) - { - Q_UNUSED(aOngoing); - Q_UNUSED(aInterrupted); - } - - void CliInformationL( TPsuiCli aType ) - { - Q_UNUSED(aType); - } - - void HandleCliStatusL( TUint8 aBsc[KPSetNumberOfBsc], TPsuiCli aMode ) - { - Q_UNUSED(aBsc); - Q_UNUSED(aMode); - } - - void HandleCnapStatusL( TInt aStatus ) - { - Q_UNUSED(aStatus); - } - - void HandleCliErrorL( TInt aError ) - { - Q_UNUSED(aError); - } -}; - -void SimulateLeaveL() -{ - User::Leave(KErrGeneral); -} - - -/*! - UT_PSetCliWrapper::UT_PSetCliWrapper - */ -UT_PSetCliWrapper::UT_PSetCliWrapper() - : - m_numOfLeaveSimulations(0), - m_psetContainerMock(NULL), - m_wrapper(NULL), - m_cliMock(NULL) -{ -} - -/*! - UT_PSetCliWrapper::~UT_PSetCliWrapper - */ -UT_PSetCliWrapper::~UT_PSetCliWrapper() -{ - delete m_psetContainerMock; - delete m_wrapper; - m_cliMock = NULL; -} - -/*! - UT_PSetCliWrapper::init - */ -void UT_PSetCliWrapper::init() -{ - initialize(); - - m_numOfLeaveSimulations = 0; - m_psetContainerMock = new CPsetContainer(); - - RMobilePhone dummyHandle; - CliObserver dummyObserver; - QT_TRAP_THROWING(m_cliMock = - CPsetCli::NewL(dummyHandle, dummyObserver)); - expect("CPsetContainer::CreateCliObjectL").returns(m_cliMock); - // wrapper takes ownership of callDivertingMock during successfull - // construction. - QScopedPointer cliMockPtr(m_cliMock); - m_wrapper = new PSetCliWrapper(*m_psetContainerMock, NULL); - cliMockPtr.take(); -} - -/*! - UT_PSetCliWrapper::cleanup - */ -void UT_PSetCliWrapper::cleanup() -{ - reset(); - - delete m_psetContainerMock; - m_psetContainerMock = NULL; - delete m_wrapper; - m_wrapper = NULL; - m_cliMock = NULL; -} - -/*! - UT_PSetCliWrapper::t_construction - */ -void UT_PSetCliWrapper::t_construction() -{ - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") != 0) { - expect("CPsetContainer::CreateCliObjectL"). - willOnce(invokeWithoutArguments(SimulateLeaveL)); - - PSetCliWrapper *wrapper = NULL; - EXPECT_EXCEPTION( - wrapper = new PSetCliWrapper(*m_psetContainerMock, NULL); - ) - delete wrapper; - - QVERIFY(verify()); - } -} - -/*! - UT_PSetCliWrapper::t_getColpMode - */ -void UT_PSetCliWrapper::t_getColpMode() -{ - expect("CPsetCli::GetColpModeL"). - willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL)); - - EXPECT_EXCEPTION( - m_wrapper->getColpMode(); - ) - - QVERIFY(1 == m_numOfLeaveSimulations); - QVERIFY(true == verify()); -} - -/*! - UT_PSetCliWrapper::t_getClipMode - */ -void UT_PSetCliWrapper::t_getClipMode() -{ - expect("CPsetCli::GetClipModeL"). - willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL)); - - EXPECT_EXCEPTION( - m_wrapper->getClipMode(); - ) - - QVERIFY(1 == m_numOfLeaveSimulations); - QVERIFY(true == verify()); -} - -/*! - UT_PSetCliWrapper::t_getClirMode - */ -void UT_PSetCliWrapper::t_getClirMode() -{ - expect("CPsetCli::GetClirModeL"). - willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL)); - - EXPECT_EXCEPTION( - m_wrapper->getClirMode(); - ) - - QVERIFY(1 == m_numOfLeaveSimulations); - QVERIFY(true == verify()); -} - -/*! - UT_PSetCliWrapper::t_getColrMode - */ -void UT_PSetCliWrapper::t_getColrMode() -{ - expect("CPsetCli::GetColrModeL"). - willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL)); - - EXPECT_EXCEPTION( - m_wrapper->getColrMode(); - ) - - QVERIFY(1 == m_numOfLeaveSimulations); - QVERIFY(true == verify()); -} - -/*! - UT_PSetCliWrapper::t_getCnap - */ -void UT_PSetCliWrapper::t_getCnap() -{ - expect("CPsetCli::GetCnapL"). - willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL)); - - EXPECT_EXCEPTION( - m_wrapper->getCnap(); - ) - - QVERIFY(1 == m_numOfLeaveSimulations); - QVERIFY(true == verify()); -} - -/*! - UT_PSetCliWrapper::t_cancelAll - */ -void UT_PSetCliWrapper::t_cancelAll() -{ - expect("CPsetCli::CancelAll"); - - m_wrapper->cancelAll(); - - QVERIFY(true == verify()); -} - - -/*! - UT_PSetCliWrapper::t_handleCliRequesting - */ -void UT_PSetCliWrapper::t_handleCliRequesting() -{ - QSignalSpy spy(m_wrapper, SIGNAL(handleCliRequesting(bool, bool))); - - TBool isOngoing = ETrue; - TBool isInterrupted = ETrue; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCliRequestingL(isOngoing, isInterrupted)); - - const int expectednumOfSignalEmissions = 1; - const int expectedNumOfSignalArguments = 2; - QCOMPARE(spy.count(), expectednumOfSignalEmissions); - const QList &arguments = spy.at(0); - QVERIFY(expectedNumOfSignalArguments == arguments.count()); - QVERIFY(ETrue == arguments.at(0).toBool()); - QVERIFY(ETrue == arguments.at(1).toBool()); -} - -/*! - UT_PSetCliWrapper::t_cliInformation - */ -Q_DECLARE_METATYPE(PsCallLineIdentity) -void UT_PSetCliWrapper::t_cliInformation() -{ - qRegisterMetaType("PsCallLineIdentity"); - QSignalSpy spy(m_wrapper, SIGNAL(cliInformation(PsCallLineIdentity))); - - QT_TRAP_THROWING(m_wrapper->m_privateImpl->CliInformationL(EPsuiClirOn)); - - const int expectednumOfSignalEmissions = 1; - const int expectedNumOfSignalArguments = 1; - QCOMPARE(spy.count(), expectednumOfSignalEmissions); - const QList &arguments = spy.at(0); - QVERIFY(expectedNumOfSignalArguments == arguments.count()); - QVERIFY(ClirOn == arguments.at(0).value()); -} - -/*! - UT_PSetCliWrapper::t_handleCliStatus - */ -Q_DECLARE_METATYPE(unsigned char *) -void UT_PSetCliWrapper::t_handleCliStatus() -{ - qRegisterMetaType("unsigned char *"); - QSignalSpy spy(m_wrapper, - SIGNAL(handleCliStatus(unsigned char *, int, PsCallLineIdentity))); - - TUint8 bscList[KPSetNumberOfBsc] = { EAllTele }; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleCliStatusL(bscList, EPsuiClirOn)); - - const int expectednumOfSignalEmissions = 1; - const int expectedNumOfSignalArguments = 3; - QCOMPARE(spy.count(), expectednumOfSignalEmissions); - const QList &arguments = spy.at(0); - QVERIFY(expectedNumOfSignalArguments == arguments.count()); - QVERIFY(EAllTele == arguments.at(0).value()[0]); - QVERIFY(KPSetNumberOfBsc == arguments.at(1).toInt()); - QVERIFY(ClirOn == arguments.at(2).value()); -} - -/*! - UT_PSetCliWrapper::t_handleCnapStatus - */ -void UT_PSetCliWrapper::t_handleCnapStatus() -{ - QSignalSpy spy(m_wrapper, SIGNAL(handleCnapStatus(int))); - - const int status = 1; - QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleCnapStatusL(status)); - - const int expectednumOfSignalEmissions = 1; - const int expectedNumOfSignalArguments = 1; - QCOMPARE(spy.count(), expectednumOfSignalEmissions); - const QList &arguments = spy.at(0); - QVERIFY(expectedNumOfSignalArguments == arguments.count()); - QVERIFY(status == arguments.at(0).toInt()); -} - -/*! - UT_PSetCliWrapper::t_handleCliError - */ -void UT_PSetCliWrapper::t_handleCliError() -{ - QSignalSpy spy(m_wrapper, SIGNAL(handleCliError(int))); - - const int expectedErrorCode = KErrGeneral; - QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleCliErrorL(expectedErrorCode)); - - const int expectednumOfSignalEmissions = 1; - const int expectedNumOfSignalArguments = 1; - QCOMPARE(spy.count(), expectednumOfSignalEmissions); - const QList &arguments = spy.at(0); - QVERIFY(expectedNumOfSignalArguments == arguments.count()); - QVERIFY(expectedErrorCode == arguments.at(0).toInt()); -} - -/*! - UT_PSetCliWrapper::t_setEngineContact - */ -void UT_PSetCliWrapper::t_setEngineContact() -{ - // dummy test as no real implementation for the method currently - m_wrapper->m_privateImpl->SetEngineContact(NULL); -} - -/*! - UT_PSetCliWrapper::t_exceptionSafety - */ -void UT_PSetCliWrapper::t_exceptionSafety() -{ - cleanup(); - - OomTestExecuter::runAllTests(*this, "t_exceptionSafety"); -} - -void UT_PSetCliWrapper::SimulateLeaveAtMockMethodCallL() -{ - m_numOfLeaveSimulations++; - User::Leave( KErrGeneral ); -} - -QTEST_MAIN_S60(UT_PSetCliWrapper) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +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 UT_PSETCLIWRAPPER_H -#define UT_PSETCLIWRAPPER_H - -#include -#include - -class CPsetContainer; -class PSetCliWrapper; -class CPsetCli; - -class UT_PSetCliWrapper : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_PSetCliWrapper(); - ~UT_PSetCliWrapper(); - -private slots: - - void init(); - void cleanup(); - - void t_construction(); - void t_getColpMode(); - void t_getClipMode(); - void t_getClirMode(); - void t_getColrMode(); - void t_getCnap(); - void t_cancelAll(); - - // signal emitting/private implementation tests - void t_handleCliRequesting(); - void t_cliInformation(); - void t_handleCliStatus(); - void t_handleCnapStatus(); - void t_handleCliError(); - void t_setEngineContact(); - - void t_exceptionSafety(); - -private: - - void SimulateLeaveAtMockMethodCallL(); - -private: - - int m_numOfLeaveSimulations; - CPsetContainer *m_psetContainerMock; - CPsetCli* m_cliMock; - PSetCliWrapper* m_wrapper; -}; - -#endif // UT_PSETCLIWRAPPER_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.pro --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +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: Project file for building unit test component -# -# - -CONFIG += qtestlib release -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../../ ../common -DEFINES += BUILD_PSETWRAPPER - -MOC_DIR = . - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += /epoc32/include/mw/QtTest \ - /epoc32/include/platform/mw \ - /epoc32/include/mw/qt - LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi -} - -# test code -HEADERS += ut_psetcliwrapper.h -HEADERS += ../common/testutilities.h -SOURCES += ut_psetcliwrapper.cpp -SOURCES += ../common/testutilities.cpp - -# code to be tested -HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcliwrapper.h -SOURCES += ../../src/psetcliwrapper.cpp \ - ../../src/psetcliwrapper_p.cpp - -# mocks needed for testing -SOURCES += ../mocks/mock_psetcontainer.cpp \ - ../mocks/mock_psetcli.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +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 "ut_psetnetworkinfoconverter.h" -#include "psetnetworkinfoconverter.h" -#include "qtestmains60.h" - - -/*! - UT_PSetNetworkInfoConverter::UT_PSetNetworkInfoConverter - */ -UT_PSetNetworkInfoConverter::UT_PSetNetworkInfoConverter() -{ -} - -/*! - UT_PSetNetworkInfoConverter::~UT_PSetNetworkInfoConverter - */ -UT_PSetNetworkInfoConverter::~UT_PSetNetworkInfoConverter() -{ - -} - -/*! - UT_PSetNetworkInfoConverter::init - */ -void UT_PSetNetworkInfoConverter::init() -{ - initialize(); -} - -/*! - UT_PSetNetworkInfoConverter::cleanup - */ -void UT_PSetNetworkInfoConverter::cleanup() -{ - reset(); -} - -/*! - UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkInfo - */ -void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkInfo() -{ - _LIT(KCountryCode, "1234"); // country code max length is 4 - _LIT(KNetworkCode, "12345678"); // network code max length is 8 - PSetNetworkWrapper::NetworkId networkId = - { - QString::fromUtf16(KCountryCode().Ptr(), KCountryCode().Length()), - QString::fromUtf16(KNetworkCode().Ptr(), KNetworkCode().Length()), - }; - - _LIT(KShortName, "shortNameMaxLength20"); - _LIT(KLongName, "longNameMaxLengthIs30LikeThis_"); - PSetNetworkWrapper::NetworkInfo info = - { - networkId, - PSetNetworkWrapper::StatusUnknown, - PSetNetworkWrapper::SelectionModeManual, - PSetNetworkWrapper::AccessTypeGsm, - QString::fromUtf16(KShortName().Ptr(), KShortName().Length()), - QString::fromUtf16(KLongName().Ptr(), KLongName().Length()), - }; - - MPsetNetworkSelect::TNetworkInfo convertedInfo = - NetworkInfoConverter::ConvertToSymbianType(info); - - QVERIFY(convertedInfo.iId.iCountryCode == KCountryCode()); - QVERIFY(convertedInfo.iId.iNetworkCode == KNetworkCode()); - QVERIFY(convertedInfo.iStatus == MPsetNetworkSelect::ENetStatUnknown); - QVERIFY(convertedInfo.iMode == MPsetNetworkSelect::ENetSelectModeManual); - QVERIFY(convertedInfo.iAccess == MPsetNetworkSelect::ENetNetworkGSM); - QVERIFY(convertedInfo.iShortName == KShortName()); - QVERIFY(convertedInfo.iLongName == KLongName()); -} - -/*! - UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkId - */ -void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkId() -{ - _LIT(KCountryCode, "1234"); - _LIT(KNetworkCode, "12345678"); - PSetNetworkWrapper::NetworkId networkId = - { - QString::fromUtf16(KCountryCode().Ptr(), KCountryCode().Length()), - QString::fromUtf16(KNetworkCode().Ptr(), KNetworkCode().Length()), - }; - - MPsetNetworkSelect::TNetworkId convertedType = - NetworkInfoConverter::ConvertToSymbianType(networkId); - QVERIFY(convertedType.iCountryCode == KCountryCode()); - QVERIFY(convertedType.iNetworkCode == KNetworkCode()); -} - -/*! - UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkStatus - */ -void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkStatus() -{ - MPsetNetworkSelect::TNetworkStatus convertedType = - NetworkInfoConverter::ConvertToSymbianType( - PSetNetworkWrapper::StatusUnknown); - QVERIFY(MPsetNetworkSelect::ENetStatUnknown == convertedType); - - convertedType = NetworkInfoConverter::ConvertToSymbianType( - PSetNetworkWrapper::StatusAvailable); - QVERIFY(MPsetNetworkSelect::ENetStatAvailable == convertedType); - - convertedType = NetworkInfoConverter::ConvertToSymbianType( - PSetNetworkWrapper::StatusCurrent); - QVERIFY(MPsetNetworkSelect::ENetStatCurrent == convertedType); - - convertedType = NetworkInfoConverter::ConvertToSymbianType( - PSetNetworkWrapper::StatusForbidden); - QVERIFY(MPsetNetworkSelect::ENetStatForbidden == convertedType); -} - -/*! - UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkSelectionMode - */ -void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkSelectionMode() -{ - MPsetNetworkSelect::TSelectMode convertedType = - NetworkInfoConverter::ConvertToSymbianType( - PSetNetworkWrapper::SelectionModeAutomatic); - QVERIFY(MPsetNetworkSelect::ENetSelectModeAutomatic == convertedType); - - convertedType = NetworkInfoConverter::ConvertToSymbianType( - PSetNetworkWrapper::SelectionModeManual); - QVERIFY(MPsetNetworkSelect::ENetSelectModeManual == convertedType); -} - -/*! - UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkAccessType - */ -void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkAccessType() -{ - MPsetNetworkSelect::TNetworkAccess convertedType = - NetworkInfoConverter::ConvertToSymbianType( - PSetNetworkWrapper::AccessTypeGsm); - QVERIFY(MPsetNetworkSelect::ENetNetworkGSM == convertedType); - - convertedType = NetworkInfoConverter::ConvertToSymbianType( - PSetNetworkWrapper::AccessTypeWcdma); - QVERIFY(MPsetNetworkSelect::ENetNetworkWCDMA == convertedType); -} - -/*! - UT_PSetNetworkInfoConverter::t_convertToQtTypeNetworkSelectionMode - */ -void UT_PSetNetworkInfoConverter::t_convertToQtTypeNetworkSelectionMode() -{ - PSetNetworkWrapper::NetworkSelectionMode convertedType = - NetworkInfoConverter::ConvertToQtType( - MPsetNetworkSelect::ENetSelectModeAutomatic); - QVERIFY(PSetNetworkWrapper::SelectionModeAutomatic == convertedType); - - convertedType = NetworkInfoConverter::ConvertToQtType( - MPsetNetworkSelect::ENetSelectModeManual); - QVERIFY(PSetNetworkWrapper::SelectionModeManual == convertedType); -} - -QTEST_MAIN_S60(UT_PSetNetworkInfoConverter) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +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 UT_PSETNETWORKINFOCONVERTER_H -#define UT_PSETNETWORKINFOCONVERTER_H - -#include -#include - - -class UT_PSetNetworkInfoConverter : public QObject, public MockService -{ - Q_OBJECT - -public: - UT_PSetNetworkInfoConverter(); - ~UT_PSetNetworkInfoConverter(); - -private slots: - - void init(); - void cleanup(); - - void t_convertToSymbianTypeNetworkInfo(); - void t_convertToSymbianTypeNetworkId(); - void t_convertToSymbianTypeNetworkStatus(); - void t_convertToSymbianTypeNetworkSelectionMode(); - void t_convertToSymbianTypeNetworkAccessType(); - void t_convertToQtTypeNetworkSelectionMode(); -}; - -#endif // UT_PSETNETWORKINFOCONVERTER_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.pro --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +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: Project file for building unit test component -# -# - -CONFIG += qtestlib release -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../common -DEFINES += BUILD_PSETWRAPPER - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += /epoc32/include/mw/QtTest \ - /epoc32/include/platform/mw \ - /epoc32/include/mw/qt - LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi -} - -# test code -HEADERS += ut_psetnetworkinfoconverter.h -SOURCES += ut_psetnetworkinfoconverter.cpp - -# code to be tested -HEADERS += ../../src/psetnetworkinfoconverter.h -SOURCES += ../../src/psetnetworkinfoconverter.cpp - -# mocks -HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h -SOURCES += ../mocks/mock_psetnetworkwrapper.cpp diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,546 +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 "ut_psetnetworkwrapper.h" -#include "testutilities.h" -#define private public -#include "psetnetworkwrapper.h" -#include "psetnetworkwrapper_p.h" - -class NetworkInfoObserver : public MPsetNetworkInfoObserver -{ - - void HandleNetworkInfoReceivedL( - const CNetworkInfoArray* aInfoArray, - const TInt aResult) - { - Q_UNUSED(aInfoArray); - Q_UNUSED(aResult); - } - - void HandleCurrentNetworkInfoL( - const MPsetNetworkSelect::TCurrentNetworkInfo& aCurrentInfo, - const TInt aResult) - { - Q_UNUSED(aCurrentInfo); - Q_UNUSED(aResult); - } - - void HandleNetworkChangedL( - const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, - const MPsetNetworkSelect::TCurrentNetworkStatus aStatus, - const TInt aResult) - { - Q_UNUSED(aCurrentInfo); - Q_UNUSED(aStatus); - Q_UNUSED(aResult); - } - - void HandleNetworkChangedL( - const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, - const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus, - const TInt aResult) - { - Q_UNUSED(aCurrentInfo); - Q_UNUSED(aStatus); - Q_UNUSED(aResult); - } - - void HandleSearchingNetworksL( - TServiceRequest aRequest) - { - Q_UNUSED(aRequest); - } - - void HandleRequestingSelectedNetworkL( - TBool aOngoing) - { - Q_UNUSED(aOngoing); - } - - void HandleCallActivatedL() - { - - } - - void HandleNetworkErrorL( - const MPsetNetworkInfoObserver::TServiceRequest aRequest, - const TInt aError) - { - Q_UNUSED(aRequest); - Q_UNUSED(aError); - } -}; - -void SimulateLeaveL() -{ - User::Leave(KErrGeneral); -} - -/*! - UT_PSetNetworkWrapper::UT_PSetNetworkWrapper - */ -UT_PSetNetworkWrapper::UT_PSetNetworkWrapper() - : - m_wrapper(NULL), - m_psetContainerMock(NULL), - m_psetNetworkMock(NULL), - m_psetNetworkModeMock(NULL) -{ -} - -/*! - UT_PSetNetworkWrapper::~UT_PSetNetworkWrapper - */ -UT_PSetNetworkWrapper::~UT_PSetNetworkWrapper() -{ - delete m_wrapper; - delete m_psetContainerMock; - m_psetNetworkMock = NULL; - m_psetNetworkModeMock = NULL; -} - -/*! - UT_PSetNetworkWrapper::init - */ -void UT_PSetNetworkWrapper::init() -{ - initialize(); - - m_psetContainerMock = new CPsetContainer(); - m_refreshHandler = CPSetRefreshHandlerMock::NewL(); - SmcDefaultValue::SetL(m_refreshHandler); - - RMobilePhone dummyHandle; - NetworkInfoObserver dummyObserver; - QT_TRAP_THROWING(m_psetNetworkMock = - CPsetNetwork::NewL(dummyHandle, dummyObserver)); - QT_TRAP_THROWING(m_psetNetworkModeMock = - CPsetNetwork::NewL(dummyHandle, dummyObserver)); - - expect("CPsetContainer::CreateNetworkObjectL").returns(m_psetNetworkMock); - expect("CPsetContainer::CreateNetworkModeObjectL"). - returns(m_psetNetworkModeMock); - - // wrapper takes ownership of networkmocks during successfull - // construction - QScopedPointer networkMockPtr(m_psetNetworkMock); - QScopedPointer networkModeMockPtr(m_psetNetworkModeMock); - m_wrapper = new PSetNetworkWrapper(*m_psetContainerMock, NULL); - networkMockPtr.take(); - networkModeMockPtr.take(); -} - -/*! - UT_PSetNetworkWrapper::cleanup - */ -void UT_PSetNetworkWrapper::cleanup() -{ - reset(); - - delete m_wrapper; - m_wrapper = NULL; - delete m_psetContainerMock; - m_psetContainerMock = NULL; - m_psetNetworkMock = NULL; - m_psetNetworkModeMock = NULL; -} - -/*! - UT_PSetNetworkWrapper::t_construction - */ -void UT_PSetNetworkWrapper::t_construction() -{ - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") != 0) { - - expect("CPsetContainer::CreateNetworkObjectL"). - willOnce(invokeWithoutArguments(SimulateLeaveL)); - PSetNetworkWrapper *wrapper = NULL; - EXPECT_EXCEPTION( - wrapper = new PSetNetworkWrapper(*m_psetContainerMock, NULL); - delete wrapper; - wrapper = NULL; - ) - QVERIFY(verify()); - - expect("CPsetContainer::CreateNetworkModeObjectL"). - willOnce(invokeWithoutArguments(SimulateLeaveL)); - EXPECT_EXCEPTION( - wrapper = new PSetNetworkWrapper(*m_psetContainerMock, NULL); - delete wrapper; - wrapper = NULL; - ) - QVERIFY(verify()); - } -} - -/*! - UT_PSetNetworkWrapper::t_getAvailableNetworks - */ -void UT_PSetNetworkWrapper::t_getAvailableNetworks() -{ - expect("CPsetNetwork::GetAvailableNetworksL") - .willOnce(invokeWithoutArguments(SimulateLeaveL)); - - EXPECT_EXCEPTION( - m_wrapper->getAvailableNetworks(); - ) - - QVERIFY(verify()); -} - - -/*! - UT_PSetNetworkWrapper::t_getNetworkSelectionMode - */ -void UT_PSetNetworkWrapper::t_getNetworkSelectionMode() -{ - expect("CPsetNetwork::GetNetworkSelectMode")/*. - with(MPsetNetworkSelect::ENetSelectModeManual)*/. - returns(KErrNone); - expect("CPsetNetwork::GetNetworkSelectMode")/*. - with(MPsetNetworkSelect::ENetSelectModeAutomatic)*/. - returns(KErrGeneral); - - PSetNetworkWrapper::NetworkSelectionMode selectionModeManual = - PSetNetworkWrapper::SelectionModeManual; - PSetNetworkWrapper::NetworkSelectionMode selectionModeAutomatic = - PSetNetworkWrapper::SelectionModeAutomatic; - m_wrapper->getNetworkSelectionMode(selectionModeManual); - m_wrapper->getNetworkSelectionMode(selectionModeAutomatic); - - - QVERIFY(true == verify()); -} - -/*! - UT_PSetNetworkWrapper::t_selectNetwork - */ -void UT_PSetNetworkWrapper::t_selectNetwork() -{ - expect("CPsetNetwork::SelectNetworkL") - .willOnce(invokeWithoutArguments(SimulateLeaveL)); - - PSetNetworkWrapper::NetworkInfo info; - EXPECT_EXCEPTION( - m_wrapper->selectNetwork(info); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetNetworkWrapper::t_cancelRequest - */ -void UT_PSetNetworkWrapper::t_cancelRequest() -{ - expect("CPsetNetwork::CancelProcess"); - - m_wrapper->cancelRequest(); - - QVERIFY(true == verify()); -} - -/*! - UT_PSetNetworkWrapper::t_getNetworkAccessMode - */ -void UT_PSetNetworkWrapper::t_getNetworkAccessMode() -{ - expect("CPsetNetwork::GetCurrentNetworkModeSelectionL") - .willOnce(invokeWithoutArguments(SimulateLeaveL)); - - EXPECT_EXCEPTION( - m_wrapper->getNetworkAccessMode(); - ) - - QVERIFY(true == verify()); -} - -/*! - UT_PSetNetworkWrapper::t_setNetworkAccessMode - */ -void UT_PSetNetworkWrapper::t_setNetworkAccessMode() -{ - expect("CPsetNetwork::SetNetworkModeSelectionL"). - with(RMmCustomAPI::KCapsNetworkModeDual); - expect("CPsetNetwork::SetNetworkModeSelectionL"). - with(RMmCustomAPI::KCapsNetworkModeUmts); - expect("CPsetNetwork::SetNetworkModeSelectionL") - .with(RMmCustomAPI::KCapsNetworkModeGsm) - .willOnce(invokeWithoutArguments(SimulateLeaveL)); - - m_wrapper->setNetworkAccessMode(PSetNetworkWrapper::AccessModeDual); - m_wrapper->setNetworkAccessMode(PSetNetworkWrapper::AccessModeUmts); - EXPECT_EXCEPTION( - m_wrapper->setNetworkAccessMode(PSetNetworkWrapper::AccessModeGsm); - ) - - const int invalidMode = -1; - m_wrapper->setNetworkAccessMode( - reinterpret_cast - (invalidMode)); - - QVERIFY(true == verify()); -} - -/*! - UT_PSetNetworkWrapper::t_handleNetworkInfoReceived - */ -void UT_PSetNetworkWrapper::t_handleNetworkInfoReceived() -{ - CNetworkInfoArray* infos = NULL; - - TRAPD(result, m_wrapper->m_privateImpl-> - HandleNetworkInfoReceivedL(infos, KErrNone)); - QVERIFY(KErrArgument == result); - - const TInt KGranularity = 3; - infos = new CNetworkInfoArray(KGranularity); - QScopedPointer infoArrayGuard(infos); - MPsetNetworkSelect::TNetworkInfo info1; - infos->AppendL(info1); - TRAP(result, m_wrapper->m_privateImpl-> - HandleNetworkInfoReceivedL(infos, KErrNone)); - QVERIFY(KErrNone == result); - - MPsetNetworkSelect::TNetworkInfo info2; - infos->AppendL(info2); - TRAP(result, m_wrapper->m_privateImpl-> - HandleNetworkInfoReceivedL(infos, KErrNone)); - QVERIFY(KErrNone == result); - - MPsetNetworkSelect::TNetworkInfo info3; - infos->AppendL(info3); - TRAP(result, m_wrapper->m_privateImpl-> - HandleNetworkInfoReceivedL(infos, KErrNone)); - QVERIFY(KErrNone == result); -} - - -/*! - UT_PSetNetworkWrapper::t_handleCurrentNetworkInfo - */ -void UT_PSetNetworkWrapper::t_handleCurrentNetworkInfo() -{ - MPsetNetworkSelect::TCurrentNetworkInfo networkInfo; - QT_TRAP_THROWING(m_wrapper->m_privateImpl-> - HandleCurrentNetworkInfoL(networkInfo, KErrNone)); -} - -/*! - UT_PSetNetworkWrapper::t_handleNetworkChangedWithNetworkStatus - */ -void UT_PSetNetworkWrapper::t_handleNetworkChangedWithNetworkStatus() -{ - MPsetNetworkSelect::TNetworkInfo networkInfo; - MPsetNetworkSelect::TCurrentNetworkStatus networkStatus = - MPsetNetworkSelect::ENotRegisteredNotSearching; - QT_TRAP_THROWING(m_wrapper->m_privateImpl-> - HandleNetworkChangedL(networkInfo, networkStatus, KErrNone)); -} - -/*! - UT_PSetNetworkWrapper::t_handleNetworkChangedWithPhoneRegistrationStatus - */ -void UT_PSetNetworkWrapper::t_handleNetworkChangedWithPhoneRegistrationStatus() -{ - MPsetNetworkSelect::TNetworkInfo networkInfo; - RMobilePhone::TMobilePhoneRegistrationStatus registrationStatus; - QT_TRAP_THROWING(m_wrapper->m_privateImpl-> - HandleNetworkChangedL(networkInfo, registrationStatus, KErrNone)); -} - - -/*! - UT_PSetNetworkWrapper::t_handleSearchingNetworks - */ -void UT_PSetNetworkWrapper::t_handleSearchingNetworks() -{ - MPsetNetworkInfoObserver::TServiceRequest request = - MPsetNetworkInfoObserver::EServiceRequestNone; - QT_TRAP_THROWING(m_wrapper->m_privateImpl-> - HandleSearchingNetworksL(request)); -} - -/*! - UT_PSetNetworkWrapper::t_handleRequestingSelectedNetwork - */ -void UT_PSetNetworkWrapper::t_handleRequestingSelectedNetwork() -{ - QT_TRAP_THROWING(m_wrapper->m_privateImpl-> - HandleRequestingSelectedNetworkL(EFalse)); - QT_TRAP_THROWING(m_wrapper->m_privateImpl-> - HandleRequestingSelectedNetworkL(ETrue)); -} - -/*! - UT_PSetNetworkWrapper::t_handleCallActivated - */ -void UT_PSetNetworkWrapper::t_handleCallActivated() -{ - QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleCallActivatedL()); -} - -/*! - UT_PSetNetworkWrapper::t_handleNetworkErrorFromInfoObserver - */ -Q_DECLARE_METATYPE(PSetNetworkWrapper::RequestType) -Q_DECLARE_METATYPE(PSetNetworkWrapper::ErrorCode) -void UT_PSetNetworkWrapper::t_handleNetworkErrorFromInfoObserver() -{ - qRegisterMetaType - ("PSetNetworkWrapper::RequestType"); - qRegisterMetaType - ("PSetNetworkWrapper::ErrorCode"); - QSignalSpy spy(m_wrapper, SIGNAL(networkReqestFailed( - PSetNetworkWrapper::ErrorCode, PSetNetworkWrapper::RequestType))); - - MPsetNetworkInfoObserver::TServiceRequest request = - MPsetNetworkInfoObserver::EServiceRequestNone; - QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleNetworkErrorL( - request, KErrGsmNetCauseCallActive)); - QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleNetworkErrorL( - request, KErrGsm0707NoNetworkService)); - QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleNetworkErrorL( - request, KErrGsmOfflineOpNotAllowed)); - QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleNetworkErrorL( - request, KErrGeneral)); - - QCOMPARE(spy.count(), 4); - QVERIFY(PSetNetworkWrapper::ErrCauseCallActive == - qvariant_cast(spy.at(0).at(0))); - QVERIFY(PSetNetworkWrapper::ErrNoNetworkService == - qvariant_cast(spy.at(1).at(0))); - QVERIFY(PSetNetworkWrapper::ErrOfflineOpNotAllowed == - qvariant_cast(spy.at(2).at(0))); - QVERIFY(PSetNetworkWrapper::ErrNoNetworkAccess == - qvariant_cast(spy.at(3).at(0))); -} - - -/*! - UT_PSetNetworkWrapper::t_handleNetworkSystemModeEvents - */ -void UT_PSetNetworkWrapper::t_handleNetworkSystemModeEvents() -{ - QSignalSpy spy(m_wrapper, SIGNAL(networkAccessModeGot(int))); - - MPsetNetworkModeObserver::TServiceRequest serviceRequest = - MPsetNetworkModeObserver::EServiceRequestGetCurrentNetworkMode; - RMmCustomAPI::TNetworkModeCaps modeCaps = - RMmCustomAPI::KCapsNetworkModeDual; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL( - serviceRequest, modeCaps)); - modeCaps =RMmCustomAPI::KCapsNetworkModeUmts; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL( - serviceRequest, modeCaps)); - modeCaps = RMmCustomAPI::KCapsNetworkModeGsm; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL( - serviceRequest, modeCaps)); - - QCOMPARE(spy.count(), 3); - const QList &arguments0 = spy.at(0); - QVERIFY(PSetNetworkWrapper::AccessModeDual == arguments0.at(0).toInt()); - const QList &arguments1 = spy.at(1); - QVERIFY(PSetNetworkWrapper::AccessModeUmts == arguments1.at(0).toInt()); - const QList &arguments2 = spy.at(2); - QVERIFY(PSetNetworkWrapper::AccessModeGsm == arguments2.at(0).toInt()); - - // TODO: test skeleton for switch cases not yet implemented - serviceRequest = MPsetNetworkModeObserver::EServiceRequestNone; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL( - serviceRequest, modeCaps)); - serviceRequest = - MPsetNetworkModeObserver::EServiceRequestSetSelectedNetworkMode; - QT_TRAP_THROWING( - m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL( - serviceRequest, modeCaps)); -} - -/*! - UT_PSetNetworkWrapper::t_handleNetworkErrorFromModeObserver - */ -void UT_PSetNetworkWrapper::t_handleNetworkErrorFromModeObserver() -{ - MPsetNetworkModeObserver::TServiceRequest request = - MPsetNetworkModeObserver::EServiceRequestNone; - QT_TRAP_THROWING(m_wrapper->m_privateImpl-> - HandleNetworkErrorL(request, KErrNone)); -} - -/*! - UT_PSetNetworkWrapper::t_exceptionSafety - */ -void UT_PSetNetworkWrapper::t_exceptionSafety() -{ - cleanup(); - - OomTestExecuter::runAllTests(*this, "t_exceptionSafety"); -} - -/*! - UT_PSetNetworkWrapper::t_isManualNetworkSelectionSupported - */ -void UT_PSetNetworkWrapper::t_isManualNetworkSelectionSupported() -{ - expect("CPsetCustomerServiceProfile::IsNetworkSelectionSupported").returns(KErrNone); - m_wrapper->isManualNetworkSelectionSupported(); - QVERIFY(verify()); - - expect("CPsetCustomerServiceProfile::IsNetworkSelectionSupported").returns(KErrGeneral); - m_wrapper->isManualNetworkSelectionSupported(); - QVERIFY(verify()); -} - -/*! - UT_PSetNetworkWrapper::t_AllowRefresh - */ -void UT_PSetNetworkWrapper::t_AllowRefresh() -{ - TSatRefreshType type; - TSatElementaryFiles file; - m_refreshHandler->trigerAllowRefresh(type, file); -} - -/*! - UT_PSetNetworkWrapper::t_Refresh - */ -void UT_PSetNetworkWrapper::t_Refresh() -{ - TSatElementaryFiles file; - expect("CPsetCustomerServiceProfile::IsNetworkSelectionSupported").returns(KErrNone); - m_refreshHandler->trigerRefresh(EFileChangeNotification, KCsp1Ef); - QVERIFY(verify()); - - expect("CPsetCustomerServiceProfile::IsNetworkSelectionSupported").returns(KErrGeneral); - m_refreshHandler->trigerRefresh(EFileChangeNotification, KCsp1Ef); - QVERIFY(verify()); - - expect("CPsetCustomerServiceProfile::IsNetworkSelectionSupported").times(0); - m_refreshHandler->trigerRefresh(EFileChangeNotification, KCsp2Ef); - QVERIFY(verify()); -} - -QTEST_MAIN_S60(UT_PSetNetworkWrapper) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +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 UT_PSETCALLDIVERTINGWRAPPER_H -#define UT_PSETCALLDIVERTINGWRAPPER_H - -#include -#include - -class PSetNetworkWrapper; -class CPsetContainer; -class CPsetNetwork; -class CPSetRefreshHandlerMock; - -class UT_PSetNetworkWrapper : public QObject, public MockService -{ - Q_OBJECT - -public: - UT_PSetNetworkWrapper(); - ~UT_PSetNetworkWrapper(); - -private slots: - - void init(); - void cleanup(); - - void t_construction(); - void t_getAvailableNetworks(); - void t_getNetworkSelectionMode(); - void t_selectNetwork(); - void t_cancelRequest(); - - void t_getNetworkAccessMode(); - void t_setNetworkAccessMode(); - - // private implementation tests - // tests for MPsetNetworkInfoObserver functionality - void t_handleNetworkInfoReceived(); - void t_handleCurrentNetworkInfo(); - void t_handleNetworkChangedWithNetworkStatus(); - void t_handleNetworkChangedWithPhoneRegistrationStatus(); - void t_handleSearchingNetworks(); - void t_handleRequestingSelectedNetwork(); - void t_handleCallActivated(); - void t_handleNetworkErrorFromInfoObserver(); - - // tests for MPsetNetworkModeObserver functionality - void t_handleNetworkSystemModeEvents(); - void t_handleNetworkErrorFromModeObserver(); - - void t_exceptionSafety(); - - void t_isManualNetworkSelectionSupported(); - void t_AllowRefresh(); - void t_Refresh(); - -private: - PSetNetworkWrapper *m_wrapper; - CPsetContainer *m_psetContainerMock; - CPsetNetwork *m_psetNetworkMock; - CPsetNetwork *m_psetNetworkModeMock; - CPSetRefreshHandlerMock *m_refreshHandler; -}; - -#endif diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.pro --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +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: Project file for building unit test component -# -# - -CONFIG += qtestlib release -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../common -DEFINES += BUILD_PSETWRAPPER - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += /epoc32/include/mw/QtTest \ - /epoc32/include/platform/mw \ - /epoc32/include/mw/qt - LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi -} - -# test code -HEADERS += ut_psetnetworkwrapper.h -HEADERS += ../common/testutilities.h -SOURCES += ut_psetnetworkwrapper.cpp -SOURCES += ../common/testutilities.cpp - -# code to be tested -HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h -SOURCES += ../../src/psetnetworkwrapper.cpp \ - ../../src/psetnetworkwrapper_p.cpp \ - ../../src/psetnetworkinfoconverter.cpp - -# mocks needed for testing -SOURCES += ../mocks/mock_psetcontainer.cpp \ - ../mocks/mock_psetnetwork.cpp \ - ../mocks/mock_psetcsp.cpp \ - ../mocks/mock_cpsetrefreshhandler.cpp -HEADERS += ../mocks/mock_cpsetrefreshhandler.h diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +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 "ut_psetwrapper.h" -#include "psetwrapper.h" -#include "testutilities.h" - -void SimulateLeaveL() -{ - User::Leave(KErrGeneral); -} - -/*! - UT_PSetWrapper::UT_PSetWrapper - */ -UT_PSetWrapper::UT_PSetWrapper() - : - m_setWrapper(NULL), - m_psetContainerMock(NULL) -{ -} - -/*! - UT_PSetWrapper::~UT_PSetWrapper - */ -UT_PSetWrapper::~UT_PSetWrapper() -{ - delete m_setWrapper; - delete m_psetContainerMock; -} - -/*! - UT_PSetWrapper::init - */ -void UT_PSetWrapper::init() -{ - initialize(); - - m_setWrapper = new PSetWrapper(); - m_psetContainerMock = new CPsetContainer(); -} - -/*! - UT_PSetWrapper::cleanup - */ -void UT_PSetWrapper::cleanup() -{ - reset(); - - delete m_setWrapper; - m_setWrapper = NULL; - delete m_psetContainerMock; - m_psetContainerMock = NULL; -} - -/*! - UT_PSetWrapper::t_construction - */ -void UT_PSetWrapper::t_construction() -{ - if (qstrcmp(QTest::currentTestFunction(), "t_exceptionSafety") != 0) { - expect("CPsetContainer::NewL"). - willOnce(invokeWithoutArguments(SimulateLeaveL)); - - PSetWrapper *wrapper = NULL; - EXPECT_EXCEPTION(wrapper = new PSetWrapper(NULL); - ) - delete wrapper; - - QVERIFY(verify()); - } -} - -/*! - UT_PSetWrapper::t_cliWrapper - */ -void UT_PSetWrapper::t_cliWrapper() -{ - PSetCliWrapper *wrapper = NULL; - wrapper = &m_setWrapper->cliWrapper(); - QVERIFY(wrapper == &m_setWrapper->cliWrapper()); -} - -/*! - UT_PSetWrapper::t_callWaitingWrapper - */ -void UT_PSetWrapper::t_callWaitingWrapper() -{ - PSetCallWaitingWrapper *wrapper = NULL; - wrapper = &m_setWrapper->callWaitingWrapper(); - QVERIFY(wrapper == &m_setWrapper->callWaitingWrapper()); -} - -/*! - UT_PSetWrapper::t_callDivertingWrapper - */ -void UT_PSetWrapper::t_callDivertingWrapper() -{ - PSetCallDivertingWrapper *wrapper = NULL; - wrapper = &m_setWrapper->callDivertingWrapper(); - QVERIFY(wrapper == &m_setWrapper->callDivertingWrapper()); -} - -/*! - UT_PSetWrapper::t_networkWrapper - */ -void UT_PSetWrapper::t_networkWrapper() -{ - PSetNetworkWrapper *wrapper = NULL; - wrapper = &m_setWrapper->networkWrapper(); - QVERIFY(wrapper == &m_setWrapper->networkWrapper()); -} - -/*! - UT_PSetWrapper::t_callBarringWrapper - */ -void UT_PSetWrapper::t_callBarringWrapper() -{ - PSetCallBarringWrapper *wrapper = NULL; - wrapper = &m_setWrapper->callBarringWrapper(); - QVERIFY(wrapper == &m_setWrapper->callBarringWrapper()); -} - -/*! - UT_PSetWrapper::t_exceptionSafety - */ -void UT_PSetWrapper::t_exceptionSafety() -{ - cleanup(); - - OomTestExecuter::runAllTests(*this, "t_exceptionSafety"); -} - -QTEST_MAIN_S60(UT_PSetWrapper) diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.h --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +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 UT_PSETWRAPPER_H -#define UT_PSETWRAPPER_H - -#include -#include - -class CPsetContainer; -class PSetWrapper; - -class UT_PSetWrapper : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_PSetWrapper(); - ~UT_PSetWrapper(); - -private slots: - - void init(); - void cleanup(); - void t_construction(); - - void t_cliWrapper(); - void t_callWaitingWrapper(); - void t_callDivertingWrapper(); - void t_networkWrapper(); - void t_callBarringWrapper(); - void t_exceptionSafety(); - -private: - - PSetWrapper* m_setWrapper; - CPsetContainer *m_psetContainerMock; -}; - -#endif // UT_PSETWRAPPER_H diff -r 7d48bed6ce0c -r 987c9837762f cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.pro --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +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: Project file for building unit test component -# -# - -CONFIG += qtestlib release -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../src/ -INCLUDEPATH += . ../../../ ../common -DEFINES += BUILD_PSETWRAPPER - -MOC_DIR = . - -QT -= gui -QT += testlib - -symbian: { - CONFIG += no_icon - INCLUDEPATH += /epoc32/include/mw/QtTest \ - /epoc32/include/platform/mw \ - /epoc32/include/mw/qt - LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi -} - -# test code -HEADERS += ut_psetwrapper.h -HEADERS += ../common/testutilities.h -SOURCES += ut_psetwrapper.cpp -SOURCES += ../common/testutilities.cpp - -# code to be tested -HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetwrapper.h \ - ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h \ - ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h \ - ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcliwrapper.h \ - ../../../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h \ - ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcallbarringwrapper.h -SOURCES += ../../src/psetwrapper.cpp - -# mocks needed for testing -SOURCES += ../mocks/mock_psetcontainer.cpp \ - ../mocks/mock_psetnetworkwrapper.cpp \ - ../mocks/mock_psetcliwrapper.cpp \ - ../mocks/mock_psetcallwaitingwrapper.cpp \ - ../mocks/mock_psetcalldivertingwrapper.cpp \ - ../mocks/mock_psetcallbarringwrapper.cpp diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/callprovider/group/callprovider.mmp --- a/convergedcallengine/callprovider/group/callprovider.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/callprovider/group/callprovider.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -31,7 +31,7 @@ SOURCE cccpcallparameters.cpp USERINCLUDE ../inc -SYSTEMINCLUDE ../../../inc +SYSTEMINCLUDE ../../../inc MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/callprovider/rom/callprovider.iby --- a/convergedcallengine/callprovider/rom/callprovider.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/callprovider/rom/callprovider.iby Wed Sep 01 12:15:03 2010 +0100 @@ -20,6 +20,6 @@ #define __CALLPROVIDER_IBY__ file=ABI_DIR\BUILD_DIR\callprovider.dll SHARED_LIB_DIR\callprovider.dll -data=ZSYSTEM\install\callprovider_stub.sis System\Install\callprovider_stub.sis +data=ZSYSTEM\install\callprovider_stub.SIS System\Install\callprovider_stub.SIS #endif // __CALLPROVIDER_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/group/cce.mmp --- a/convergedcallengine/cce/group/cce.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/group/cce.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -42,10 +42,10 @@ SOURCE ccceobserverasynchroniser.cpp SOURCE cccespsettingshandler.cpp SOURCE cccecallparameters.cpp -SOURCE cccecallinfomediator.cpp -SOURCE cccecallinfomediatorupdater.cpp +SOURCE cccecallinfomediator.cpp +SOURCE cccecallinfomediatorupdater.cpp SOURCE cccecallinfoconverter.cpp -SOURCE tccecallindex.cpp +SOURCE tccecallindex.cpp USERINCLUDE ../inc USERINCLUDE ../api diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/cccecall.h --- a/convergedcallengine/cce/inc/cccecall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/cccecall.h Wed Sep 01 12:15:03 2010 +0100 @@ -98,13 +98,13 @@ class TStateTransition { public: - TStateTransition() - { - iState = CCPCall::EStateIdle; - iInband = EFalse; - } + TStateTransition() + { + iState = CCPCall::EStateIdle; + iInband = EFalse; + } - CCPCall::TCallState iState; + CCPCall::TCallState iState; TBool iInband; }; public: @@ -262,7 +262,7 @@ TInt Release(); /** @see MCCECall::ReplaceActive */ - TInt ReplaceActive(); + TInt ReplaceActive(); /** @see MCCECall::Hold */ TInt Hold(); diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/cccecallcontainer.h --- a/convergedcallengine/cce/inc/cccecallcontainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/cccecallcontainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -302,7 +302,7 @@ * @param aLifeTimeInfo Life time info. * @return Get succeeded ot not. */ - TBool GetLifeTime( TDes8& aLifeTimeInfo ); + TBool GetLifeTime( TDes8& aLifeTimeInfo ); /** * Get CS specific misc info from CS plugin. @@ -310,17 +310,17 @@ * @param aCSInfo CS info. * @return Get succeeded ot not. */ - TBool GetCSInfo( CSInfo& aCSInfo ); - - /** + TBool GetCSInfo( CSInfo& aCSInfo ); + + /** * Stop airtime duration timer * * @since S60 v3.2 * @param aCall CCCECall is used for checking call type */ void AirTimeDurationStop( CCCECall* aCall ) const; - - /** + + /** * Switch Air Duration timer, is needed for handover * * Stop current timer and starts another one. New timer is initialized @@ -331,7 +331,7 @@ * timer switching */ void AirTimeDurationSwap(const CCPCall::TCallType aNewCallType); - + /** * Start airtime duration timer * diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/cccecallinfomediatorupdater.h --- a/convergedcallengine/cce/inc/cccecallinfomediatorupdater.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/cccecallinfomediatorupdater.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CCCECALLINFOMEDIATORUPDATER_H #include -#include +#include class MCCECallInfoMediator; class MCCECallArray; diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/ccceconferencecall.h --- a/convergedcallengine/cce/inc/ccceconferencecall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/ccceconferencecall.h Wed Sep 01 12:15:03 2010 +0100 @@ -112,18 +112,18 @@ /** @see MCCEConferenceCall::HangUp */ TInt HangUp(); - /** @see MCCECall::CallDuration */ - TTimeIntervalSeconds CallDuration() const; + /** @see MCCECall::CallDuration */ + TTimeIntervalSeconds CallDuration() const; /** @see MCCECall::Parameters */ - const CCCPCallParameters& Parameters() const; + const CCCPCallParameters& Parameters() const; private: // from base class MCCEConferenceCall - /** @see MCCEConferenceCall::Release */ + /** @see MCCEConferenceCall::Release */ TInt Release(); /** @see MCCEConferenceCall::ServiceId */ diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/cccedurationtimer.h --- a/convergedcallengine/cce/inc/cccedurationtimer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/cccedurationtimer.h Wed Sep 01 12:15:03 2010 +0100 @@ -63,7 +63,7 @@ * * @since S60 v3.2 */ - void SetConferenceObserver( MCCEConferenceCallObserver* aObserver ); + void SetConferenceObserver( MCCEConferenceCallObserver* aObserver ); /** * Start timer. @@ -78,7 +78,7 @@ * @since S60 v3.2 */ void Start(TInt aBeatsOffset); - + /** * Restart air duration timer from the given value * @@ -86,7 +86,7 @@ * @param aBeatsOffset innitial timer value */ void RestartAirTimeDuration(TInt aBeatsOffset); - + /** * Start timer * @@ -158,11 +158,11 @@ * If this is NULL, timer is used to AirTime duration. */ MCCECallObserver* iObserver; - + /** * Conference call duration observer. */ - MCCEConferenceCallObserver* iConferenceCallObserver; + MCCEConferenceCallObserver* iConferenceCallObserver; /** * Timer diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/ccceemergencycall.h --- a/convergedcallengine/cce/inc/ccceemergencycall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/ccceemergencycall.h Wed Sep 01 12:15:03 2010 +0100 @@ -165,13 +165,13 @@ class TStateTransition { public: - TStateTransition() - { - iState = CCPCall::EStateIdle; - iInband = EFalse; - } - - CCPCall::TCallState iState; + TStateTransition() + { + iState = CCPCall::EStateIdle; + iInband = EFalse; + } + + CCPCall::TCallState iState; TBool iInband; }; /** diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/ccceextension.h --- a/convergedcallengine/cce/inc/ccceextension.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/ccceextension.h Wed Sep 01 12:15:03 2010 +0100 @@ -70,42 +70,42 @@ /** @see MCCEExtensionInterface::RequestCommand */ TInt RequestCommand( TUint32 aServiceID, - TInt aRequestId, + TInt aRequestId, TDesC8& aData ); /** @see MCCEExtensionInterface::CancelRequest */ TInt CancelRequest( TUint32 aServiceID, - TInt aRequestId ); + TInt aRequestId ); - //from MCCPExtensionObserver + //from MCCPExtensionObserver /** @see MCCEExtensionObserver::HandleExtensionEvents */ void HandleExtensionEvents( TUint32 aServiceId, - TInt aEvent, - TInt aStatus ); + TInt aEvent, + TInt aStatus ); private: void ConstructL(); - /** - * - */ + /** + * + */ CCCEExtension( CCCEPluginManager& aPluginManager ); - /** - * Get plug-in pointer that relates to service-id. - */ - CConvergedCallProvider* GetExtIfPlugin( TUint32 aServiceid ); + /** + * Get plug-in pointer that relates to service-id. + */ + CConvergedCallProvider* GetExtIfPlugin( TUint32 aServiceid ); - /** - * Plug-in manager. - */ + /** + * Plug-in manager. + */ CCCEPluginManager& iPluginManager; - /** - * Extension observer - */ + /** + * Extension observer + */ MCCEExtensionObserver* iMCCEExtensionObserver; }; diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/ccceobserverasynchroniser.h --- a/convergedcallengine/cce/inc/ccceobserverasynchroniser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/ccceobserverasynchroniser.h Wed Sep 01 12:15:03 2010 +0100 @@ -104,7 +104,7 @@ /** * From MCCEObserver */ - void DataPortName( TName& aPortName ); + void DataPortName( TName& aPortName ); /** * From MCCEObserver @@ -114,30 +114,30 @@ /** * From MCCESsObserver */ - void BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent ); - + void BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent ); + /** * From MCCESsObserver */ - void CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent ); - + void CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent ); + /** * From MCCESsObserver */ - void CallForwardEventOccurred( - const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent, - const TDesC& aRemoteAddress ); + void CallForwardEventOccurred( + const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent, + const TDesC& aRemoteAddress ); /** * From MCCESsObserver */ - void CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent ); + void CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent ); /** * From MCCESsObserver */ - void NotifyCurrentActiveALSLine( TInt aLine ); + void NotifyCurrentActiveALSLine( TInt aLine ); /** * From MCCEConferenceCallObserver @@ -164,22 +164,22 @@ */ void ErrorOccurred( TCCPConferenceCallError aError ); - /** + /** * From MCCEConferenceCallObserver */ - void CallDurationChanged( const TTimeIntervalSeconds aDuration ); + void CallDurationChanged( const TTimeIntervalSeconds aDuration ); /** * From MCCEDtmfObserver - */ - void HandleDTMFEvent( const MCCEDtmfObserver::TCCEDtmfEvent aEvent, + */ + void HandleDTMFEvent( const MCCEDtmfObserver::TCCEDtmfEvent aEvent, const TInt aError, const TChar aTone ); /** * From MCCEExtensionObserver */ void HandleExtensionEvents( TUint32 aServiceId, - TInt aEvent, + TInt aEvent, TInt aStatus ); private: diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/ccceplugin.h --- a/convergedcallengine/cce/inc/ccceplugin.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/ccceplugin.h Wed Sep 01 12:15:03 2010 +0100 @@ -154,11 +154,11 @@ void MoCallCreated( MCCPCall& aCall ); /** @see MCCPCSObserver::DataPortName */ - void DataPortName( TName& aPortName ); + void DataPortName( TName& aPortName ); - /** @see MCCPCSObserver::ConferenceCallCreated */ - void ConferenceCallCreated( MCCPConferenceCall& aConferenceCall ); - + /** @see MCCPCSObserver::ConferenceCallCreated */ + void ConferenceCallCreated( MCCPConferenceCall& aConferenceCall ); + // from base class MCCPObserver /** @see MCCPObserver::ErrorOccurred */ @@ -176,20 +176,20 @@ // from base class MCCPObserver /** @see MCCPSsObserver::BarringEventOccurred */ - void BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent ); - + void BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent ); + /** @see MCCPSsObserver::CLIEventOccurred */ - void CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent ); - + void CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent ); + /** @see MCCPSsObserver::CallForwardEventOccurred */ - void CallForwardEventOccurred( const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent, + void CallForwardEventOccurred( const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent, const TDesC& aRemoteAddress ); /** @see MCCPSsObserver::CallCugEventOccurred */ - void CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent ); - - /** @see MCCPSsObserver::NotifyCurrentActiveALSLine */ - void NotifyCurrentActiveALSLine( TInt aLine ); + void CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent ); + + /** @see MCCPSsObserver::NotifyCurrentActiveALSLine */ + void NotifyCurrentActiveALSLine( TInt aLine ); private: /** Constructor */ @@ -233,7 +233,7 @@ * Reference to dead observer * This will be informed when plugin crashes */ - MCCPPluginDeathObserver& iDeathObserver; + MCCPPluginDeathObserver& iDeathObserver; /** * Use handle to ecom plugin. diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/cccepluginmanager.h --- a/convergedcallengine/cce/inc/cccepluginmanager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/cccepluginmanager.h Wed Sep 01 12:15:03 2010 +0100 @@ -56,9 +56,9 @@ * @param aCallContainer Reference to call container * @param aTransferController Reference to transfer controller */ - static CCCEPluginManager* NewL( - CCCECallContainer& aCallContainer, - CCCETransferController& aTransferController ); + static CCCEPluginManager* NewL( + CCCECallContainer& aCallContainer, + CCCETransferController& aTransferController ); /** * Destructor. @@ -165,9 +165,9 @@ // from base class MCCPPluginDeathObserver /** @see MCCPPluginDeathObserver::CCPPluginDiedEvent */ - void CCPPluginDiedEvent(TUid aPluginId, TInt aDeathType, TInt aReason); - - /** @see MCCPPluginDeathObserver::CCPPluginInitialisationFailed */ + void CCPPluginDiedEvent(TUid aPluginId, TInt aDeathType, TInt aReason); + + /** @see MCCPPluginDeathObserver::CCPPluginInitialisationFailed */ void CCPPluginInitialisationFailed(TUid aPluginUid, TInt aError); // from base class CActive @@ -177,14 +177,14 @@ * * @since S60 v3.2 */ - void RunL(); + void RunL(); /** * Cancels incoming call monitor * * @since S60 v3.2 */ - void DoCancel(); + void DoCancel(); private: @@ -235,12 +235,12 @@ private: /** Constructor */ - CCCEPluginManager( - CCCECallContainer& aCallContainer, - CCCETransferController& aTransferController ); + CCCEPluginManager( + CCCECallContainer& aCallContainer, + CCCETransferController& aTransferController ); /** Leaving stuff in constructor */ - void ConstructL(); + void ConstructL(); private: diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/inc/cccetransfercontroller.h --- a/convergedcallengine/cce/inc/cccetransfercontroller.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/inc/cccetransfercontroller.h Wed Sep 01 12:15:03 2010 +0100 @@ -72,7 +72,7 @@ * An error has occurred concerning a specific call. * @since S60 3.2 * @param aError Error code. - * @param aCall Current MCCPCall. + * @param aCall Current MCCPCall. * @return none */ void ErrorOccurred( const TCCPError aError, MCCPCall* aCall ); @@ -90,7 +90,7 @@ * The state of the call has changed. * @since S60 3.2 * @param aState Call state. - * @param aCall Current MCCPCall. + * @param aCall Current MCCPCall. * @return none */ void CallStateChangedWithInband( TCCPCallState aState, MCCPCall* aCall ); @@ -99,7 +99,7 @@ * An event has occurred concerning a specific call. * @since S60 3.2 * @param aEvent Occurred event. - * @param aCall Current MCCPCall. + * @param aCall Current MCCPCall. * @return none */ void CallEventOccurred( const MCCPCallObserver::TCCPCallEvent aEvent, @@ -111,7 +111,7 @@ * Notifies changed call capabilities * @since S60 3.2 * @param aCaps New capabilities for the call - * @param aCall Current MCCPCall. + * @param aCall Current MCCPCall. * @return none */ void CallCapsChanged( const TUint32 aCapsFlags, MCCPCall* aCall ); diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/ccce.cpp --- a/convergedcallengine/cce/src/ccce.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/ccce.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -247,7 +247,7 @@ // ----------------------------------------------------------------------------- // EXPORT_C TBool CCCE::GetLifeTime( TDes8& aLifeTimeInfo ) - { + { CCELOGSTRING("CCCE::GetLifeTime()"); return iCallContainer->GetLifeTime(aLifeTimeInfo); } @@ -257,9 +257,9 @@ // ----------------------------------------------------------------------------- // EXPORT_C TBool CCCE::GetCSInfo( CSInfo& aCSInfo ) - { + { CCELOGSTRING("CCCE::GetCSInfo()"); return iCallContainer->GetCSInfo(aCSInfo); - } + } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/cccecall.cpp --- a/convergedcallengine/cce/src/cccecall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/cccecall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -86,7 +86,7 @@ delete iCCEDurationTimer; delete iObserver; delete iCallParameters; - FeatureManager::UnInitializeLib(); + FeatureManager::UnInitializeLib(); } // --------------------------------------------------------------------------- @@ -2117,7 +2117,7 @@ break; /** Remote party info target meaning has changed */ case ECCPNotifyRemotePartyInfoChange: - { + { //Ho occurred, call type has changed if ( FeatureManager::FeatureSupported( KFeatureIdFfVoiceCallContinuity ) ) { @@ -2130,8 +2130,8 @@ iCallContainer.AirTimeDurationSwap( iCall->Parameters().CallType() ); iObserver->CallEventOccurred( MCCECallObserver::ECCENotifyRemotePartyInfoChange ); - } - break; + } + break; /** Call secure status cannot be determined */ case ECCPSecureNotSpecified: iObserver->CallEventOccurred( MCCECallObserver::ECCESecureNotSpecified ); diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/cccecallcontainer.cpp --- a/convergedcallengine/cce/src/cccecallcontainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/cccecallcontainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -61,7 +61,7 @@ // void CCCECallContainer::ConstructL() { - FeatureManager::InitializeLibL(); + FeatureManager::InitializeLibL(); iCallStateMediator = CCCECallInfoMediator::NewL( *this ); CreateCallDataArraysL(); @@ -170,7 +170,7 @@ // void CCCECallContainer::AirTimeDurationSwap( const CCPCall::TCallType aNewCallType) - { + { CCELOGSTRING("CCCECallContainer::AirTimeDurationSwap(): IN"); CCCECall* call = NULL; @@ -191,29 +191,29 @@ } if( 1 == calls ) - { - // After handover we will have only one active call - // If we have more or less, timer swapping will not happend - if (aNewCallType == CCPCall::ECallTypePS ) - { - CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): CS Stops, PS restarts from %d", - iCSDuration->NumberOfBeats() ); - iCSDuration->Stop(); - iPSDuration->RestartAirTimeDuration(iCSDuration->NumberOfBeats()); - iCSDuration->Reset(); - } - else - { - CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): PS Stops, CS restarts from %d", - iPSDuration->NumberOfBeats() ); - iPSDuration->Stop(); - iCSDuration->RestartAirTimeDuration(iPSDuration->NumberOfBeats()); - iPSDuration->Reset(); - } - } + { + // After handover we will have only one active call + // If we have more or less, timer swapping will not happend + if (aNewCallType == CCPCall::ECallTypePS ) + { + CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): CS Stops, PS restarts from %d", + iCSDuration->NumberOfBeats() ); + iCSDuration->Stop(); + iPSDuration->RestartAirTimeDuration(iCSDuration->NumberOfBeats()); + iCSDuration->Reset(); + } + else + { + CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): PS Stops, CS restarts from %d", + iPSDuration->NumberOfBeats() ); + iPSDuration->Stop(); + iCSDuration->RestartAirTimeDuration(iPSDuration->NumberOfBeats()); + iPSDuration->Reset(); + } + } CCELOGSTRING("CCCECallContainer::AirTimeDurationSwap(): OUT"); - } - + } + // --------------------------------------------------------------------------- // AirTimeDurationStop() // --------------------------------------------------------------------------- @@ -294,7 +294,7 @@ call = GetCall( i ); if ( call->State() == CCPCall::EStateConnected || call->State() == CCPCall::EStateHold ) - { + { if ( IsCsPlugin( call, EFalse ) ) { csCalls++; @@ -370,7 +370,7 @@ TCallReleaseEntry entry; entry.iCallToRelease = &aCalltoRemove; entry.iUid = aUid; - iCallstoRelease.Append(entry); + iCallstoRelease.Append(entry); if (!iIdle->IsActive()) { iIdle->Start( TCallBack(ReleaseCalls,this) ); @@ -699,9 +699,7 @@ { if( call->ImplementationUid() == aImplementationUid ) { - // return value ignored. Ownership of the call object is not - // transferred to array. - aCallArray.Append(call); + aCallArray.Append(call); } } } @@ -731,10 +729,8 @@ callState == CCPCall::EStateConnecting || callState == CCPCall::EStateConnected ) { - // Ownership of the call object is not - // transferred to array. - err = aCallArray.Append( call ); - + aCallArray.Append( call ); + err = KErrNone; } } } @@ -746,8 +742,8 @@ callState == CCPCall::EStateConnecting || callState == CCPCall::EStateConnected ) { - // Ownership of the iEmergencyCall object is not transfered. - err = aCallArray.Append( iEmergencyCall ); + aCallArray.Append( iEmergencyCall ); + err = KErrNone; } } @@ -989,8 +985,8 @@ // Do nothing when there is only cscalls if ( IsCsPlugin( aCall, ETrue ) ) - { - + { + break; } @@ -1292,24 +1288,24 @@ // ----------------------------------------------------------------------------- // TBool CCCECallContainer::GetLifeTime( TDes8& aLifeTimeInfo ) - { + { CCELOGSTRING("CCCE::GetLifeTime()"); - CConvergedCallProvider* plugin = NULL; - + CConvergedCallProvider* plugin = NULL; + TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId)); if( plugin ) - { - plugin->GetLifeTime(aLifeTimeInfo); - } - else - { - CCELOGSTRING("CCCE::GetLifeTime() - CS plugin not found!"); - return EFalse; - } + { + plugin->GetLifeTime(aLifeTimeInfo); + } + else + { + CCELOGSTRING("CCCE::GetLifeTime() - CS plugin not found!"); + return EFalse; + } - return ETrue; + return ETrue; } // ----------------------------------------------------------------------------- @@ -1317,26 +1313,26 @@ // ----------------------------------------------------------------------------- // TBool CCCECallContainer::GetCSInfo( CSInfo& aCSInfo ) - { + { CCELOGSTRING("CCCE::GetCSInfo()"); - CConvergedCallProvider* plugin = NULL; - - TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId)); + CConvergedCallProvider* plugin = NULL; + + TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId)); if( plugin ) - { - plugin->GetCSInfo(aCSInfo); - } - else - { - CCELOGSTRING("CCCE::GetCSInfo() - CS plugin not found!"); - return EFalse; - } + { + plugin->GetCSInfo(aCSInfo); + } + else + { + CCELOGSTRING("CCCE::GetCSInfo() - CS plugin not found!"); + return EFalse; + } - return ETrue; - } + return ETrue; + } // --------------------------------------------------------------------------- // CCCECallContainer::IsCsPlugin diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/cccecallinfomediator.cpp --- a/convergedcallengine/cce/src/cccecallinfomediator.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/cccecallinfomediator.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ #include "cccecallinfomediator.h" -#include +#include #include -#include -#include +#include +#include #include "cccecallinfomediatorupdater.h" #include "cccecallinfoconverter.h" diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/cccecallinfomediatorupdater.cpp --- a/convergedcallengine/cce/src/cccecallinfomediatorupdater.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/cccecallinfomediatorupdater.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #include "cccecallinfomediatorupdater.h" #include -#include +#include #include "mccecallinfomediator.h" #include "cccecall.h" diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/cccecallparameters.cpp --- a/convergedcallengine/cce/src/cccecallparameters.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/cccecallparameters.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -65,7 +65,6 @@ cloned->SetLineType(iLineType); cloned->SetUUSId(iUUSId); cloned->SetOrigin(iOrigin); - cloned->SetAlphaId(iAlphaId); return cloned; } @@ -91,18 +90,18 @@ // ----------------------------------------------------------------------------- // void CCCECallParameters::SetLineType(CCCECallParameters::TCCELineType aLineType) - { - iLineType = aLineType; - } + { + iLineType = aLineType; + } // ----------------------------------------------------------------------------- // Gets the line type of the call. // ----------------------------------------------------------------------------- // CCCECallParameters::TCCELineType CCCECallParameters::LineType() const - { - return iLineType; - } + { + return iLineType; + } // ----------------------------------------------------------------------------- // Sets the service id identifying the service provider of the call. @@ -110,81 +109,72 @@ // void CCCECallParameters::SetUUSId(TBuf aUUSId) { - iUUSId = aUUSId; - } + iUUSId = aUUSId; + } // ----------------------------------------------------------------------------- // Gets the UUS id of the call. // ----------------------------------------------------------------------------- // TBuf CCCECallParameters::UUSId() const - { - return iUUSId; - } + { + return iUUSId; + } // ----------------------------------------------------------------------------- // Sets the bearer of the call. // ----------------------------------------------------------------------------- // void CCCECallParameters::SetBearer(TBuf8 aBearer) - { - iBearer = aBearer; - } + { + iBearer = aBearer; + } // ----------------------------------------------------------------------------- // Gets the bearer of the call. // ----------------------------------------------------------------------------- // TBuf8 CCCECallParameters::Bearer() const - { - return iBearer; - } + { + return iBearer; + } // ----------------------------------------------------------------------------- // Sets the sub address of the dialled phone number. // ----------------------------------------------------------------------------- // void CCCECallParameters::SetSubAddress(TBuf aSubAddress) - { - iSubAddress = aSubAddress; - } + { + iSubAddress = aSubAddress; + } // ----------------------------------------------------------------------------- // Gets the sub address of the dialled phone number. // ----------------------------------------------------------------------------- // TBuf CCCECallParameters::SubAddress() const - { - return iSubAddress; - } + { + return iSubAddress; + } // ----------------------------------------------------------------------------- // Sets the origin of the call. // ----------------------------------------------------------------------------- // void CCCECallParameters::SetOrigin(CCCECallParameters::TCCECallOrigin aCallOrigin) - { - iOrigin = aCallOrigin; - } + { + iOrigin = aCallOrigin; + } // ----------------------------------------------------------------------------- // Gets the origin of the call. // ----------------------------------------------------------------------------- // CCCECallParameters::TCCECallOrigin CCCECallParameters::Origin() const - { - return iOrigin; - } - -void CCCECallParameters::SetAlphaId(TBuf aAlphaId) - { - iAlphaId = aAlphaId; - } + { + return iOrigin; + } -TBuf CCCECallParameters::AlphaId() const - { - return iAlphaId; - } // End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/ccceconferencecall.cpp --- a/convergedcallengine/cce/src/ccceconferencecall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/ccceconferencecall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -194,7 +194,7 @@ iConferenceCall = iPluginManager.GetPluginL( call->ImplementationUid() )->NewConferenceL( ServiceId(), *this ); - + if(iConferenceCall) { iConferenceCall->AddCallL( &call->GetCCPCall() ); @@ -286,11 +286,10 @@ for( TInt i = 0; i < array.Count(); i++ ) { - // *call ownership is not transfered. const CCCECall* call = iCallContainer.GetCall( array[i] ); // Check if cce call matching to ccp call is available - iCallArray.Append( call ); // Ignore return value; + iCallArray.Append( call ); iCallParameters->SetServiceId( call->ServiceId() ); CCELOGSTRING("CCCEConferenceCall:: Call added to conferencecall"); @@ -391,12 +390,14 @@ TInt CCCEConferenceCall::GetCallArray( RPointerArray& aCallArray ) { TInt err( KErrNotFound ); - TInt count = iCallArray.Count(); - aCallArray.Reserve(count); - for (TInt a = 0; a < count; a++) + + for (TInt a = 0; a < iCallArray.Count(); a++) { - err= aCallArray.Append( iCallArray[a] ); + aCallArray.Append( iCallArray[a] ); + err = KErrNone; } + + return err; } @@ -630,8 +631,8 @@ // --------------------------------------------------------------------------- // TTimeIntervalSeconds CCCEConferenceCall::CallDuration() const - { + { return iCCEDurationTimer->NumberOfBeats(); - } + } // End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/cccedtmf.cpp --- a/convergedcallengine/cce/src/cccedtmf.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/cccedtmf.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -70,9 +70,9 @@ { CCELOGSTRING("CCCEDtmf::~CCCEDtmf"); - while( iObservers.Count() ) - { - CCELOGSTRING("CCCEDtmf::~CCCEDtmf: There are dtmf observers in the array. Should be removed before dtor!"); + while( iObservers.Count() ) + { + CCELOGSTRING("CCCEDtmf::~CCCEDtmf: There are dtmf observers in the array. Should be removed before dtor!"); iObservers.Remove ( 0 ); iObservers.Compress(); } @@ -103,8 +103,7 @@ if( !error && provider ) { - // Ref-to-Ptr -> ownership not transfered. - err = aProviders.InsertInAddressOrder( provider ); + aProviders.InsertInAddressOrder( provider ); } } @@ -249,7 +248,7 @@ else { // already added, ignore - CCELOGSTRING("CCCEDtmf::AddObserverL. Observer to be added already existed. Operation ignored!"); + CCELOGSTRING("CCCEDtmf::AddObserverL. Observer to be added already existed. Operation ignored!"); } } @@ -260,17 +259,17 @@ TInt CCCEDtmf::RemoveObserver( const MCCEDtmfObserver& aObserver ) { CCELOGSTRING("CCCEDtmf::RemoveObserver"); - TInt index = iObservers.Find( &aObserver ); + TInt index = iObservers.Find( &aObserver ); if( index!=KErrNotFound ) { iObservers.Remove ( index ); iObservers.Compress(); } - else - { - return KErrNotFound; - } + else + { + return KErrNotFound; + } return KErrNone; } @@ -290,11 +289,11 @@ MCCEDtmfObserver::TCCEDtmfEvent event = (MCCEDtmfObserver::TCCEDtmfEvent)(aEvent); - for( TInt i=0; i(iObservers[i])->HandleDTMFEvent( event, - aError, - aTone ); + for( TInt i=0; i(iObservers[i])->HandleDTMFEvent( event, + aError, + aTone ); } } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/cccedurationtimer.cpp --- a/convergedcallengine/cce/src/cccedurationtimer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/cccedurationtimer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -145,7 +145,7 @@ // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// +// void CCCEDurationTimer::RestartAirTimeDuration(TInt aBeatsOffset) { //Check if active @@ -161,7 +161,7 @@ iAirTimeDuration = ETrue; } } - + // ----------------------------------------------------------------------------- // CCCEDurationTimer::StartAirTimeDuration // if timer is not already active @@ -199,7 +199,7 @@ // TDateTime CCCEDurationTimer::StartTime() { - return iStartTime.DateTime(); + return iStartTime.DateTime(); } // ----------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/ccceextension.cpp --- a/convergedcallengine/cce/src/ccceextension.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/ccceextension.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -90,11 +90,11 @@ // given is used. if( !iMCCEExtensionObserver ) - { - return KErrNotFound; - } - - iMCCEExtensionObserver = NULL; + { + return KErrNotFound; + } + + iMCCEExtensionObserver = NULL; return KErrNone; } @@ -103,27 +103,27 @@ // ----------------------------------------------------------------------------- // TInt CCCEExtension::RequestCommand( TUint32 aServiceId, - TInt aRequestId, - TDesC8& aData ) + TInt aRequestId, + TDesC8& aData ) { CCELOGSTRING3("CCCEExtension::RequestCommand(): Service id=%d Request id=%d", aServiceId, aRequestId ); - CConvergedCallProvider* plugin = GetExtIfPlugin(aServiceId); + CConvergedCallProvider* plugin = GetExtIfPlugin(aServiceId); - if( !plugin ) - { - CCELOGSTRING("CCCEExtension::RequestCommand(): Plug-in for service-id was not found. Returning KErrNotFound" ); - return KErrNotFound; - } + if( !plugin ) + { + CCELOGSTRING("CCCEExtension::RequestCommand(): Plug-in for service-id was not found. Returning KErrNotFound" ); + return KErrNotFound; + } MCCPExtensionProvider* extif = NULL; - TRAPD( err, extif = plugin->ExtensionProviderL(*this) ); + TRAPD( err, extif = plugin->ExtensionProviderL(*this) ); - if( err!=KErrNone ) - { - CCELOGSTRING2("CCCEExtension::RequestCommand(): Plug-in was found, but extension interface get failed with error=%d", err ); - return err; - } + if( err!=KErrNone ) + { + CCELOGSTRING2("CCCEExtension::RequestCommand(): Plug-in was found, but extension interface get failed with error=%d", err ); + return err; + } if( extif ) { @@ -131,7 +131,7 @@ } else { - CCELOGSTRING("CCCEExtension::RequestCommand() Plug-in extension interface was found, but extensions are not supported. Returning KErrNotSupported" ); + CCELOGSTRING("CCCEExtension::RequestCommand() Plug-in extension interface was found, but extensions are not supported. Returning KErrNotSupported" ); return KErrNotSupported; } @@ -143,34 +143,34 @@ // ----------------------------------------------------------------------------- // TInt CCCEExtension::CancelRequest( TUint32 aServiceId, - TInt aRequestId ) + TInt aRequestId ) { CCELOGSTRING3("CCCEExtension::CancelRequest(): Service id=%d Request id=%d", aServiceId, aRequestId ); - CConvergedCallProvider* plugin = GetExtIfPlugin(aServiceId); + CConvergedCallProvider* plugin = GetExtIfPlugin(aServiceId); - if( !plugin ) - { - CCELOGSTRING("CCCEExtension::CancelRequest(): Plug-in for service-id was not found. Returning KErrNotFound" ); - return KErrNotFound; - } + if( !plugin ) + { + CCELOGSTRING("CCCEExtension::CancelRequest(): Plug-in for service-id was not found. Returning KErrNotFound" ); + return KErrNotFound; + } MCCPExtensionProvider* extif = NULL; - TRAPD( err, extif = plugin->ExtensionProviderL(*this) ); + TRAPD( err, extif = plugin->ExtensionProviderL(*this) ); - if( err!=KErrNone ) - { - CCELOGSTRING2("CCCEExtension::CancelRequest(): Plug-in was found, but extension interface get failed with error=%d", err ); - return err; - } - + if( err!=KErrNone ) + { + CCELOGSTRING2("CCCEExtension::CancelRequest(): Plug-in was found, but extension interface get failed with error=%d", err ); + return err; + } + if( extif ) { extif->CancelRequest(aRequestId); } else { - CCELOGSTRING("CCCEExtension::CancelRequest() Plug-in extension interface was found, but extensions are not supported. Returning KErrNotSupported" ); + CCELOGSTRING("CCCEExtension::CancelRequest() Plug-in extension interface was found, but extensions are not supported. Returning KErrNotSupported" ); return KErrNotSupported; } @@ -182,20 +182,20 @@ // ----------------------------------------------------------------------------- // void CCCEExtension::HandleExtensionEvents( TUint32 aServiceId, - TInt aEvent, + TInt aEvent, TInt aStatus ) { CCELOGSTRING3("CCCEExtension::HandleExtensionEvents(): Service id=%d Event=%d", aServiceId, aEvent ); CCELOGSTRING2("CCCEExtension::HandleExtensionEvents(): Status=%d", aStatus ); if( iMCCEExtensionObserver ) - { - iMCCEExtensionObserver->HandleExtensionEvents(aServiceId,aEvent,aStatus); - } - else - { - CCELOGSTRING("CCCEExtension::HandleExtensionEvents(): No observer was set, ignoring no event was notified!" ); - } + { + iMCCEExtensionObserver->HandleExtensionEvents(aServiceId,aEvent,aStatus); + } + else + { + CCELOGSTRING("CCCEExtension::HandleExtensionEvents(): No observer was set, ignoring no event was notified!" ); + } } // ----------------------------------------------------------------------------- @@ -208,7 +208,7 @@ TRAP_IGNORE( provider = iPluginManager.GetPluginL( aServiceId ) ); - return provider; + return provider; } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/ccceobserverasynchroniser.cpp --- a/convergedcallengine/cce/src/ccceobserverasynchroniser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/ccceobserverasynchroniser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -171,7 +171,7 @@ CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EDataPortName"); if (iCCEObserver) { - iCCEObserver->DataPortName( iEvents[0].iTName ); + iCCEObserver->DataPortName( iEvents[0].iTName ); } break; } @@ -213,14 +213,14 @@ if (iCCESsObserver) { if( iEvents[0].iDescriptor ) - { - iCCESsObserver->CallForwardEventOccurred( - (MCCESsObserver::TCCESsCallForwardEvent)iEvents[0].iInt1, *iEvents[0].iDescriptor ); + { + iCCESsObserver->CallForwardEventOccurred( + (MCCESsObserver::TCCESsCallForwardEvent)iEvents[0].iInt1, *iEvents[0].iDescriptor ); } else - { - CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallForwardEventOccurred, descr is NULL!"); - } + { + CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallForwardEventOccurred, descr is NULL!"); + } } break; } @@ -373,13 +373,13 @@ // MCCEObserver DataPortName // ----------------------------------------------------------------------------- void CCCEObserverAsynchroniser::DataPortName( TName& aPortName ) - { + { CCELOGSTRING( "CCCEObserverAsynchroniser::DataPortName"); TEventStorage event; event.iEventType = EDataPortName; event.iTName = aPortName; AddEvent(event); - } + } // ----------------------------------------------------------------------------- // MCCEObserver ConferenceCallCreated @@ -404,7 +404,7 @@ event.iInt1 = aBarringEvent; AddEvent(event); } - + // ----------------------------------------------------------------------------- // MCCESsObserver CLIEventOccurred // ----------------------------------------------------------------------------- @@ -417,13 +417,13 @@ AddEvent(event); } - + // ----------------------------------------------------------------------------- // MCCESsObserver CallForwardEventOccurred // ----------------------------------------------------------------------------- void CCCEObserverAsynchroniser::CallForwardEventOccurred( - const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent, - const TDesC& aRemoteAddress ) + const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent, + const TDesC& aRemoteAddress ) { CCELOGSTRING( "CCCEObserverAsynchroniser::CallForwardEventOccurred"); TEventStorage event; @@ -528,7 +528,7 @@ // ----------------------------------------------------------------------------- // MCCEDtmfObserver HandleDTMFEvent -// ----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- void CCCEObserverAsynchroniser::HandleDTMFEvent( const MCCEDtmfObserver::TCCEDtmfEvent aEvent, const TInt aError, const TChar aTone ) @@ -546,7 +546,7 @@ // MCCEExtensionObserver HandleExtensionEvents // ----------------------------------------------------------------------------- void CCCEObserverAsynchroniser::HandleExtensionEvents( TUint32 aServiceId, - TInt aEvent, + TInt aEvent, TInt aStatus ) { CCELOGSTRING( "CCCEObserverAsynchroniser::HandleExtensionEvents"); diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/ccceplugin.cpp --- a/convergedcallengine/cce/src/ccceplugin.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/ccceplugin.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -250,10 +250,10 @@ // --------------------------------------------------------------------------- // void CCCEPlugin::DataPortName( TName& aPortName ) - { - CCELOGSTRING( "CCCEPlugin::DataPortName" ); - iObserver.DataPortName( aPortName ); - } + { + CCELOGSTRING( "CCCEPlugin::DataPortName" ); + iObserver.DataPortName( aPortName ); + } // --------------------------------------------------------------------------- // From class MCCPCSObserver @@ -559,7 +559,7 @@ CCELOGSTRING( "CCCEPlugin::BarringEventOccurred:OUT" ); } - + // --------------------------------------------------------------------------- // CCCEPlugin::CLIEventOccurred @@ -571,18 +571,18 @@ if( iCallContainer.SsObserver() ) { - // one to one mapping at the moment can be casted directly, change if mapping gets out of sync + // one to one mapping at the moment can be casted directly, change if mapping gets out of sync iCallContainer.SsObserver()->CLIEventOccurred( - (MCCESsObserver::TCCESsCLIEvent)aCallLineEvent ); + (MCCESsObserver::TCCESsCLIEvent)aCallLineEvent ); } - else - { - CCELOGSTRING( "CCCEPlugin::CLIEventOccurred: Event ignored no observer is set!" ); - } + else + { + CCELOGSTRING( "CCCEPlugin::CLIEventOccurred: Event ignored no observer is set!" ); + } CCELOGSTRING( "CCCEPlugin::CLIEventOccurred:OUT" ); } - + // --------------------------------------------------------------------------- // CCCEPlugin::BarringEventOccurred @@ -596,15 +596,15 @@ if( iCallContainer.SsObserver() ) { - // one to one mapping at the moment can be casted directly, change if mapping gets out of sync + // one to one mapping at the moment can be casted directly, change if mapping gets out of sync iCallContainer.SsObserver()->CallForwardEventOccurred( - (MCCESsObserver::TCCESsCallForwardEvent)aCallForwardEvent, - aRemoteAddress ); + (MCCESsObserver::TCCESsCallForwardEvent)aCallForwardEvent, + aRemoteAddress ); } - else - { - CCELOGSTRING( "CCCEPlugin::CallForwardEventOccurred: Event ignored no observer is set!" ); - } + else + { + CCELOGSTRING( "CCCEPlugin::CallForwardEventOccurred: Event ignored no observer is set!" ); + } CCELOGSTRING( "CCCEPlugin::CallForwardEventOccurred:OUT" ); @@ -621,14 +621,14 @@ if( iCallContainer.SsObserver() ) { - // one to one mapping at the moment can be casted directly, change if mapping gets out of sync + // one to one mapping at the moment can be casted directly, change if mapping gets out of sync iCallContainer.SsObserver()->CallCugEventOccurred( (MCCESsObserver::TCCESsCugEvent)aCugEvent ); } - else - { - CCELOGSTRING( "CCCEPlugin::CallCugEventOccurred: Event ignored no observer is set!" ); - } + else + { + CCELOGSTRING( "CCCEPlugin::CallCugEventOccurred: Event ignored no observer is set!" ); + } CCELOGSTRING( "CCCEPlugin::CallCugEventOccurred:OUT" ); } @@ -645,10 +645,10 @@ { iCallContainer.SsObserver()->NotifyCurrentActiveALSLine(aLine); } - else - { - CCELOGSTRING( "CCCEPlugin::NotifyCurrentActiveALSLine: Event ignored no observer is set!" ); - } + else + { + CCELOGSTRING( "CCCEPlugin::NotifyCurrentActiveALSLine: Event ignored no observer is set!" ); + } CCELOGSTRING( "CCCEPlugin::NotifyCurrentActiveALSLine():OUT" ); } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cce/src/cccepluginmanager.cpp --- a/convergedcallengine/cce/src/cccepluginmanager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cce/src/cccepluginmanager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -73,10 +73,10 @@ #if 0 // capabilities still todo here - static _LIT_SECURITY_POLICY_PASS( KAllowAllPolicy ); - static _LIT_SECURITY_POLICY_C2( KICMPolicy, - ECapabilityNetworkControl, - ECapabilityWriteDeviceData); + static _LIT_SECURITY_POLICY_PASS( KAllowAllPolicy ); + static _LIT_SECURITY_POLICY_C2( KICMPolicy, + ECapabilityNetworkControl, + ECapabilityWriteDeviceData); // define first property to be integer type @@ -471,7 +471,7 @@ else if( iAlternativeEmergencyPlugins.Find( aUid ) == KErrNotFound ) { CCELOGSTRING("CCCEPluginManager::AddToAlternativeEmergencyArray: New plugin. Append to array "); - iAlternativeEmergencyPlugins.Append( aUid ); // return value ignored.. + iAlternativeEmergencyPlugins.Append( aUid ); } else { @@ -609,16 +609,12 @@ { CCCEPlugin* plugin( NULL ); - // performance note: a loop is nothing but keeping count in a register, decrementing it's - // value after each iteration and jumping back. - // But, calling RPointerArray.Count() is expensive.. that's why const TInt count - const TInt count = iPluginArray.Count(); - for( TInt i=0; i < count; i++ ) + for( TInt i=0; iType().iUid == aImplementationUid.iUid ) { plugin = iPluginArray[i]; - i = count; + i = iPluginArray.Count(); } } @@ -660,16 +656,14 @@ { if ( iPluginArray[a]->Type() == aPluginId ) { - if( KErrNone == iPluginsToClose.Append(iPluginArray[a])) - { - if (!iIdle->IsActive()) - { - iIdle->Start( TCallBack(RemovePlugins,this) ); - } - iPluginArray.Remove(a); - iPluginArray.Compress(); - return; + iPluginsToClose.Append(iPluginArray[a]); + if (!iIdle->IsActive()) + { + iIdle->Start( TCallBack(RemovePlugins,this) ); } + iPluginArray.Remove(a); + iPluginArray.Compress(); + return; } } } @@ -694,16 +688,14 @@ { if ( iPluginArray[a]->Type() == aPluginUid ) { - if( KErrNone == iPluginsToClose.Append(iPluginArray[a])) - { - if (!iIdle->IsActive()) - { - iIdle->Start( TCallBack(RemovePlugins,this) ); - } - iPluginArray.Remove(a); - iPluginArray.Compress(); - return; + iPluginsToClose.Append(iPluginArray[a]); + if (!iIdle->IsActive()) + { + iIdle->Start( TCallBack(RemovePlugins,this) ); } + iPluginArray.Remove(a); + iPluginArray.Compress(); + return; } } } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cenrepdatabase/group/cenrepdatabase.mmp --- a/convergedcallengine/cenrepdatabase/group/cenrepdatabase.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cenrepdatabase/group/cenrepdatabase.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -33,9 +33,7 @@ USERINCLUDE ../inc -// <-- QT PHONE START --> -MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END --> +APP_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY centralrepository.lib diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/cenrepdatabase/src/cenrepdatabaseutil.cpp --- a/convergedcallengine/cenrepdatabase/src/cenrepdatabaseutil.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/cenrepdatabase/src/cenrepdatabaseutil.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -144,16 +144,16 @@ CENREPDATABASELOG( "CCenRepDatabaseUtil::BeginTransactionL - IN" ); iSemaphore.Wait(); - TCleanupItem cleanup( CCenRepDatabaseUtil::ReleaseSemaphore, this ); - CleanupStack::PushL( cleanup ); + TCleanupItem cleanup( CCenRepDatabaseUtil::ReleaseSemaphore, this ); + CleanupStack::PushL( cleanup ); User::LeaveIfError( iRepository->StartTransaction( CRepository::EReadWriteTransaction ) ); - iRepository->CleanupRollbackTransactionPushL(); // if leave happens, - // only roll back, no delete - - CENREPDATABASELOG( "CCenRepDatabaseUtil::BeginTransactionL - OUT" ); + iRepository->CleanupRollbackTransactionPushL(); // if leave happens, + // only roll back, no delete + + CENREPDATABASELOG( "CCenRepDatabaseUtil::BeginTransactionL - OUT" ); } // --------------------------------------------------------------------------- @@ -164,15 +164,15 @@ { CENREPDATABASELOG( "CCenRepDatabaseUtil::CommitTransaction - IN" ); - TUint32 temp; - - TInt retval = iRepository->CommitTransaction( temp ); - - iSemaphore.Signal(); + TUint32 temp; + + TInt retval = iRepository->CommitTransaction( temp ); + + iSemaphore.Signal(); - CleanupStack::Pop( 2 ); // semaphore and repository - - CENREPDATABASELOG( "CCenRepDatabaseUtil::CommitTransaction - OUT" ); + CleanupStack::Pop( 2 ); // semaphore and repository + + CENREPDATABASELOG( "CCenRepDatabaseUtil::CommitTransaction - OUT" ); return retval; } @@ -185,12 +185,12 @@ { CENREPDATABASELOG( "CCenRepDatabaseUtil::RollbackTransaction - IN" ); - CleanupStack::Pop( 2 ); // rollback transaction item and semaphore + CleanupStack::Pop( 2 ); // rollback transaction item and semaphore - iRepository->RollbackTransaction(); - iSemaphore.Signal(); - - CENREPDATABASELOG( "CCenRepDatabaseUtil::RollbackTransaction - OUT" ); + iRepository->RollbackTransaction(); + iSemaphore.Signal(); + + CENREPDATABASELOG( "CCenRepDatabaseUtil::RollbackTransaction - OUT" ); } // --------------------------------------------------------------------------- @@ -600,28 +600,28 @@ // --------------------------------------------------------------------------- // void CCenRepDatabaseUtil::ReleaseSemaphore( TAny* aPtr ) - { - CENREPDATABASELOG( "CCenRepDatabaseUtil::ReleaseSemaphore - IN" ); - - ASSERT ( aPtr ); - CCenRepDatabaseUtil* utils = static_cast( aPtr ); - utils->DoReleaseSemaphore(); - - CENREPDATABASELOG( "CCenRepDatabaseUtil::ReleaseSemaphore - OUT" ); - } + { + CENREPDATABASELOG( "CCenRepDatabaseUtil::ReleaseSemaphore - IN" ); + + ASSERT ( aPtr ); + CCenRepDatabaseUtil* utils = static_cast( aPtr ); + utils->DoReleaseSemaphore(); + + CENREPDATABASELOG( "CCenRepDatabaseUtil::ReleaseSemaphore - OUT" ); + } // --------------------------------------------------------------------------- // Release semaphore // --------------------------------------------------------------------------- // void CCenRepDatabaseUtil::DoReleaseSemaphore() - { - CENREPDATABASELOG( "CCenRepDatabaseUtil::DoReleaseSemaphore - IN" ); - - iSemaphore.Signal(); - - CENREPDATABASELOG( "CCenRepDatabaseUtil::DoReleaseSemaphore - OUT" ); - } + { + CENREPDATABASELOG( "CCenRepDatabaseUtil::DoReleaseSemaphore - IN" ); + + iSemaphore.Signal(); + + CENREPDATABASELOG( "CCenRepDatabaseUtil::DoReleaseSemaphore - OUT" ); + } // --------------------------------------------------------------------------- // Set value of key or create a new one. @@ -713,9 +713,9 @@ } } else - { - User::Leave( err ); - } + { + User::Leave( err ); + } CleanupStack::PopAndDestroy( &keys ); @@ -777,8 +777,8 @@ TBool& aOk ) { RIpAppPropArray allArray; - TCleanupItem cleanup( CCenRepDatabaseUtil::CleanupPointerArray, &allArray ); - CleanupStack::PushL( cleanup ); + TCleanupItem cleanup( CCenRepDatabaseUtil::CleanupPointerArray, &allArray ); + CleanupStack::PushL( cleanup ); TInt err = FindEntryL( aEntryId, allArray ); if( err == KErrNone ) @@ -823,10 +823,10 @@ // --------------------------------------------------------------------------- // void CCenRepDatabaseUtil::CleanupPointerArray( TAny* aPointer ) - { - RIpAppPropArray* array = static_cast( aPointer ); - array->ResetAndDestroy(); - } + { + RIpAppPropArray* array = static_cast( aPointer ); + array->ResetAndDestroy(); + } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/data/102828e3.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/data/102828e3.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,56 @@ +/* +* Copyright (c) 1028 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: Resource definitions for CS Plugin +* +*/ + + +#include "ecom/registryinfo.rh" + +// ----------------------------------------------------------------------------- +// +// CS Plugin ecom resource file. +// +// ----------------------------------------------------------------------------- +// +RESOURCE REGISTRY_INFO theInfo + { + // csplugin.dll UID + dll_uid = 0x102828E3; + interfaces = + { + INTERFACE_INFO + { + // CCP interface UID + interface_uid = 0x10282588; + implementations = + { + IMPLEMENTATION_INFO + { + // CS Plug-in implementation UID + implementation_uid = 0x102828E5; + version_no = 1; + display_name = "CS Plug-in"; + default_data = ""; + // Note : opaque_data MUST have @ least a single byte of data + // in this instance it is an empty string. + opaque_data = " "; + } + // Place additional interface implementations here + }; + } + // Place additional interfaces here + }; + } +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/data/csplugin_stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/data/csplugin_stub.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,33 @@ +; +; 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: For packing csplugin stub. +; +; csplugin_stub.pkg + +; Languages +&EN + +; Header +#{"csplugin"},(0x102828E3),1,0,0,TYPE=SA + +;Localised Vendor name +%{"Nokia"} + +;Unique Vendor name +:"Nokia" + +; Target + +""-"z:\sys\bin\csplugin.dll" +""-"z:\resource\plugins\csplugin.rsc" \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/data/csplugin_stub.sis Binary file convergedcallengine/csplugin/data/csplugin_stub.sis has changed diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2006-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: Build information file for project CS Call Plugin +* +*/ + +#include + +// specifies the platforms this component needs to be built +PRJ_PLATFORMS +DEFAULT + + +// Specify the source file followed by its destination here +PRJ_EXPORTS +../data/csplugin_stub.sis /epoc32/data/z/system/install/csplugin_stub.sis + +// IBY files +#if defined(CORE_MW_LAYER_IBY_EXPORT_PATH) +../rom/csplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(csplugin.iby) +#endif + +// Specify the .mmp files required for building the important component +// releasables. +PRJ_MMPFILES +csplugin.mmp + + +//PRJ_TESTMMPFILES +//../internal/test/group/mt_cconvergedcallprovider.mmp diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/group/csplugin.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/group/csplugin.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,116 @@ +/* +* Copyright (c) 2007-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 definition file for project CS Plugin +* +*/ + + +#include +#include + +TARGET csplugin.dll +TARGETTYPE PLUGIN + +// 271067363 0x102828E3 CS Call Plugin ECom DLL UID +// 271067364 0x102828E4 CS Call Plugin ECom Interface UID +// 271067365 0x102828E5 CS Call Plugin ECom Implementation UID + +// ECOM Dll recognition UID followed by the unique UID for this dll +UID 0x10009D8D 0x102828E3 + +CAPABILITY CAP_ECOM_PLUGIN NetworkControl NetworkServices ReadDeviceData +VENDORID VID_DEFAULT + +SOURCEPATH ../src +SOURCE csprovider.cpp +SOURCE cspproxy.cpp +SOURCE cspcall.cpp +SOURCE cspvoicecall.cpp +SOURCE rcsplinecontainer.cpp +SOURCE cspetelcalleventmonitor.cpp +SOURCE cspetelcallstatusmonitor.cpp +SOURCE cspcallinfomonitor.cpp +SOURCE cspetelincomingcallmonitor.cpp +SOURCE cspetelcallrequester.cpp +SOURCE cspetelcallcapsmonitor.cpp +SOURCE cspetelconferencecallrequester.cpp +SOURCE cspdtmfprovider.cpp +SOURCE cspeteldtmfmonitor.cpp +SOURCE cspeteldtmfstopmonitor.cpp +SOURCE cspconferencecall.cpp +SOURCE cspetelconferencestatusmonitor.cpp +SOURCE cspetelconferenceeventmonitor.cpp +SOURCE cspetelconferencecapsmonitor.cpp +SOURCE csptransferprovider.cpp +SOURCE cspservicesettingshandler.cpp +SOURCE cspvideocall.cpp +SOURCE cspetelvideocallcapsmonitor.cpp +SOURCE cspforwardprovider.cpp +SOURCE cspvideocallconnectionhandler.cpp +SOURCE cspcalladdedhandler.cpp +SOURCE cspcallarray.cpp +SOURCE csppanic.cpp +SOURCE cspaudiohandler.cpp +SOURCE csppubsublistener.cpp +SOURCE cspcenreplistener.cpp +SOURCE cspetelcallwaitingrequester.cpp +SOURCE cspsupplementaryservicesmonitor.cpp +SOURCE cspcipheringstatusmonitor.cpp +SOURCE cspsssettingshandler.cpp +SOURCE cspuuimessagesender.cpp +SOURCE cspuuimonitor.cpp +SOURCE tcspskypeidparser.cpp +SOURCE cspdevsound.cpp +SOURCE cspmicrophone.cpp +SOURCE cspspeaker.cpp +SOURCE cspaudiostreams.cpp +SOURCE csptimer.cpp +SOURCE cspcallcommandhandler.cpp +SOURCE cspremotealertingtonelistener.cpp +SOURCE cspetellinestatusmonitor.cpp +SOURCE cspclientvideocall.cpp +SOURCE cspclientvoicecall.cpp + +// user include paths +USERINCLUDE ../inc + +// APP_LAYER_SYSTEMINCLUDE is needed for +// telmicmutestatuspskeys.h telincallvolcntrlcrkeys.h +// MW_LAYER_SYSTEMINCLUDE would be preferred +APP_LAYER_SYSTEMINCLUDE + +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/mmf/server +SYSTEMINCLUDE /epoc32/include/mmf/common +SYSTEMINCLUDE /epoc32/include/mda/client + +SOURCEPATH ../data +START RESOURCE 102828e3.rss +TARGET csplugin.rsc +END + +LIBRARY bafl.lib +LIBRARY euser.lib +LIBRARY ecom.lib +LIBRARY etelmm.lib +LIBRARY etel.lib +LIBRARY customapi.lib +LIBRARY esock.lib +LIBRARY serviceprovidersettings.lib // Reading service id and related +LIBRARY featmgr.lib +LIBRARY mmfdevsound.lib +LIBRARY centralrepository.lib +LIBRARY sssettings.lib +LIBRARY telephonyaudiorouting.lib callprovider.lib cce.lib +DEBUGLIBRARY flogger.lib diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/group/csplugin_UID_.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/group/csplugin_UID_.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -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: UID for csplugin +* +*/ +// Makmake-generated uid source file +#include +#pragma data_seg(".SYMBIAN") +__EMULATOR_IMAGE_HEADER2(0x10000079,0x10009d8d,0x102828e3,EPriorityForeground,0x000ffffeu,0x00000000u,0x102828e3,0x101fb657,0x00010000,0) +#pragma data_seg() diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspaudiohandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspaudiohandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,199 @@ +/* +* Copyright (c) 2007-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: Declarations for class CSPAudioHandler +* +*/ + + +#ifndef CSPAUDIOHANDLER_H +#define CSPAUDIOHANDLER_H + +#include +#include + +#include "mcsppubsubobserver.h" +#include "mcspcenrepobserver.h" + + +class CSPPubSubListener; +class CSPCenRepListener; +class CSPAudioStreams; + +/** +* Handles call adding from calls not done by the plugin. +* +*/ +class CSPAudioHandler: public CBase, + public MCSPPubSubObserver, + public MCSPCenRepObserver, + public MDevSoundObserver + { + + public: //Constructors and descructor + + /** + * Two-phased constructing for the monitor. + * + * @param aObserver the observer for getting notification + * @param aLine the line to monitor + * @param aLineId line identifier + */ + static CSPAudioHandler* NewL( ); + + /** + * C++ default destructor. + */ + virtual ~CSPAudioHandler( ); + + /** + * Start audio streams. + */ + void Start(); + + /** + * Stop audio streams. + */ + void Stop(); + + /** + * From base class MCSPPubSubObserver. + * Handler for changed event. + * @param aUid uid of setting + * @param aKey id of setting + * @param aStatus status of completed AO operation + */ + virtual void HandleNotifyPSL( const TUid aUid, const TInt& aKey, + const TRequestStatus& aStatus ); + + /** + * From base class MCSPCenRepObserver. + * Handler for changed event. + * @param aUid uid of setting + * @param aVal value + */ + virtual void CSPAudioHandler::HandleNotifyCenRepL( + const TUid aUid, + const TUint32 aKey, + TInt aVal ); + + protected: //From DevSound + + /** + * Handles DevDound initialization completion event. + * @param aError. KErrNone if successful. Other values are possible + * indicating a problem initializing CMMFDevSound object. + */ + void InitializeComplete( TInt aError ); + + /** + * Handles CMMFDevSound object's data request event. + * @param aBuffer. Buffer to be filled + */ + void BufferToBeFilled( CMMFBuffer* aBuffer ); + + /** + * Handles play completion or cancel event. + * @param aError. The status of playback + */ + void PlayError( TInt aError ); + + /** + * Not Supported + */ + void ToneFinished( TInt aError ); + + /** + * Not supported. + */ + void BufferToBeEmptied( CMMFBuffer* aBuffer ); + + /** + * Not supported. + */ + void RecordError( TInt aError ); + + /** + * Not supported. + */ + void ConvertError( TInt aError ); + + /** + * Not supported. + */ + void DeviceMessage( TUid aMessageType, const TDesC8& aMsg ); + + protected: // From CActive + /** + * From CActive + * RunL + */ + void RunL(); + + /** + * From CActive + * Catches errors if RunL leaves + * @param aError error code + * @return error code + */ + TInt RunError( TInt aError ); + + /** + * From CActive + * Cancels the monitor + */ + void DoCancel(); + + private: + /** + * C++ default constructor + * @param aObserver the observer for status change (incoming call) + * @param aLine the line associated with the call + * @param aLineId line identifier + */ + CSPAudioHandler( ); + + /** + * Constructs the monitor in the second phase. + */ + void ConstructL(); + + private: // data + + /** + * Mute listening from Publish&Subscribe. + */ + CSPPubSubListener* iMuteListener; + + /** + * Incall loudspeaker listening from Central Repository. + */ + CSPCenRepListener* iIncallLoudspeakerVolumeListener; + + /** + * Incall ear volume listening from Central Repository. + */ + CSPCenRepListener* iIncallEarVolumeListener; + + /** + * Audio streams handler. + */ + CSPAudioStreams* iAudioStreams; + + /** + * Call count + */ + TInt iCallCount; + }; + +#endif // CSPAUDIOHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspaudiostreams.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspaudiostreams.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,244 @@ +/* +* Copyright (c) 2006 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: Starts and stops audio streams. +* +*/ + + +#ifndef CSPAUDIOSTREAMS_H +#define CSPAUDIOSTREAMS_H + + +#include +#include +#include "MTelephonyAudioRoutingObserver.h" +#include "mcspdevsoundobserver.h" +#include "mcsptimerobserver.h" + +class MCSPDevSoundFactory; +class CSPTimer; +class CSPMicrophone; +class CSPSpeaker; +class MCSPAudioStreamObserver; +class CSPTimer; + + +/** + * Starts and stops audio streams. + * If the activation fails then there is a retry timer which + * will try the activation later. + */ +NONSHARABLE_CLASS( CSPAudioStreams ) : + public CBase, + public MCSPDevSoundObserver, + public MCSPTimerObserver, + public MTelephonyAudioRoutingObserver + { + +public: + + /** + * Two-phased constructing. + */ + static CSPAudioStreams* NewL( ); + + /** + * Two-phased constructing. + */ + static CSPAudioStreams* NewLC( ); + + /** + * C++ default destructor. + */ + virtual ~CSPAudioStreams(); + + /** + * Starts audio streams ie inits mic and speaker. + */ + void StartStreams(); + + /** + * Stops audio streams ie shuts down mic and speaker. + */ + void StopStreams(); + + /** + * Sets volume for ear. + */ + void VolumeChangedEar( TInt aVolume ); + + /** + * Sets volume for loudspeaker. + */ + void VolumeChangedLoudspeaker( TInt aVolume ); + + /** + * Stores volume levels. + */ + void StoreVolumes(TInt aVolumeEar, TInt aVolumeLoudspeaker); + + /** + * Set unmuted. + */ + void SetUnmuted(); + + /** + * Set muted. + */ + void SetMuted(); + + /** + * Gives access to CSPMicrophone instance. Ownership not given. + * @return MCSPMic instance. + */ + CSPMicrophone& Mic() const; + + /** + * Gives access to CSPSpeaker instance. Ownership not given. + * @return MCSPSpeaker instance. + */ + CSPSpeaker& Speaker() const; + + /** + * Set observer for audio stream events. + * @param aObserver + */ + void SetAudioStreamObserver( MCSPAudioStreamObserver& aObserver ); + +// from base class MCSPDevSoundObserver + + /** + * From MCSPDevSoundObserver + * Notification that Mic has been activated successfully + */ + void MicActivatedSuccessfully(); + + /** + * From MCSPDevSoundObserver + * Notification that speaker has been activated successfully + */ + void SpeakerActivatedSuccessfully(); + + /** + * From MCSPDevSoundObserver + * Notification that Mic initialisation failed. + */ + void MicActivationFailed(); + + /** + * From MCSPDevSoundObserver + * Notification that Speaker activation failed. + */ + void SpeakerActivationFailed(); + +// from base class MCSPTimerObserver + + /** + * From MCSPTimerObserver. + * Notify from CSPTimer that timeout passed. + */ + void TimerEvent(); + +protected: // Functions from base classes + +// from base class MTelephonyAudioRoutingObserver + + /** + * @see MTelephonyAudioRoutingObserver. + */ + void AvailableOutputsChanged( CTelephonyAudioRouting& aTelephonyAudioRouting ); + + /** + * @see MTelephonyAudioRoutingObserver. + */ + void OutputChanged( CTelephonyAudioRouting& aTelephonyAudioRouting); + + /** + * @see MTelephonyAudioRoutingObserver. + */ + void SetOutputComplete( CTelephonyAudioRouting& aTelephonyAudioRouting, TInt aError); + +private: + + /** + * C++ default constructor. + */ + CSPAudioStreams( ); + + void ConstructL( ); + + static TInt TimerCallBack( TAny* aThisPtr ); + + void AudioStreamsStarted(); + + void StartTimer(); + + void StartMicAndSpeaker(); + + TBool IsMicAndSpeakerStarted(); + + void ApplyVolume(TInt aVolumeEar, TInt aVolumeLoudspeaker); + +private: // data + + /** + * Mic. + * own. + */ + CSPMicrophone* iMic; + + /** + * Speaker. + * Own. + */ + CSPSpeaker* iSpeaker; + + /** + * Timer for retrying the activation of streams (mic & speaker) if + * there was a failure in activation. + * Own. + */ + CSPTimer* iTimer; + + /** + * Timeout value used with timer. Timeout value doubles every retry to + * activate the streams. + */ + TInt iTimeout; + + /** + * Audio output for checking if loadspeaker or ear volume should be used. + * Own. + */ + CTelephonyAudioRouting* iAudioRouting; + + /** + * Observer for stream events. + * Not own. + */ + MCSPAudioStreamObserver* iStreamObserver; + + /** + * Ear volume. + */ + TInt iVolumeEar; + + /** + * Loudspeaker volume. + */ + TInt iVolumeLoudspeaker; + + }; + +#endif // CSPAUDIOSTREAMS_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspcall.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspcall.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,787 @@ +/* +* Copyright (c) 2007-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: CSPCall for CS Call Plug-in +* +*/ + + + +#ifndef CSPCALL_H +#define CSPCALL_H + +#include +#include +#include +#include +#include +#include +#include + +#include "cspconsts.h" +#include "cspetelcallrequester.h" // For the requester and TRequestType +#include "mcspcallobserver.h" +#include "mcspcallerrorobserver.h" +#include "mcspuusmessageobserver.h" +#include "mcspcallcommandhandling.h" + + +class MCCPForwardProvider; +class CSPForwardProvider; +class CSPTransferProvider; +class RMobileCall; +class CSPEtelCallStatusMonitor; +class CSPEtelCallEventMonitor; +class CSPCallInfoMonitor; +class CSPEtelCallCapsMonitor; +class CSPTransferProvider; +class CSPEtelCallCapsMonitor; +class CSPAudioHandler; +class MCSPCommonInfo; +class CSPUUIMonitor; +class CSPUUIMessageSender; + + +/** +* Call class for CS Call Plug-in. Implements the API defined by CCP in classes +* MCCPCall and MCCPCSCall +* +* @lib csplugin.dll +*/ +class CSPCall : public CBase, + public MCCPCSCall, + public MCSPCallObserver, + public MCSPCallErrorObserver, + public MCSPUUSMessageObserver, + public MCCPCallCommandHandling + { + public: + /* + * C++ default destructor + */ + virtual ~CSPCall( ); + + /** + * ETel call name accessor. + * @return system wide error code + */ + void CallName( TName& aCallName ); + + /** + * Sets the audio handler for the call. + * @param aHandler audio handler + */ + void SetAudioHandler( CSPAudioHandler* aHandler ); + + /** + * Security setting change notification. + * @param aValue new value + */ + void SecuritySettingChanged( TInt aValue ); + + /** + * Remote alerting tone status changed notification. + * @param aNewStatus New remote alerting tone status. + */ + void RemoteAlertingToneStatusChanged( + RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus ); + + /** + * Set iDontReportTerm flag value to ETrue. + */ + void DontReportTerminationError(); + +// from base class MCSPCallObserver + + /** + * Updates the call event for observers. + * @param aEvent the event to be notified + */ + virtual void NotifyForwardEventOccurred( + MCCPForwardObserver::TCCPForwardEvent aEvent ); + + /** + * Updates the state change and forwards the state for observer. + * @param aState new state (ETel) of the call + */ + virtual void NotifyCallStateChangedETel( + RMobileCall::TMobileCallStatus aState ); + + /** + * Updates the call event for observers. + * @param aEvent the event to be notified + */ + virtual void NotifyCallEventOccurred( + MCCPCallObserver::TCCPCallEvent aEvent ); + + /** + * Updates the transfer event for observers. + * @param aEvent the event to be notified + */ + virtual void NotifyTransferCallEventOccurred( + MCCPTransferObserver::TCCPTransferEvent aEvent ); + + /** + * Notifies changed call capabilities. + * @param aCapsFlags new capability flags + */ + + virtual void CallCapsChanged( const TUint32 aCapsFlags ); + +// from base class MCSPCallErrorObserver + + /** + * From MCSPCallErrorObserver + * Dial request failed notification. + * @param aErrorCode request failing error code + */ + void DialRequestFailed( TInt aErrorCode ); + + /** + * From MCSPCallErrorObserver + * Emergency dial request failed notification. + * @param aErrorCode request failing error code + */ + void EmergencyDialRequestFailed( TInt aErrorCode ); + + /** + * From MCSPCallErrorObserver + * Notifies about error situation for CCE. + */ + virtual void NotifyErrorOccurred( TCCPError aError ); + +// from base class MCSPUUSMessageObserver + + /** + * From MCSPUUSMessageObserver + * UUS message received notification. + */ + void UUSMessageReceived( TDesC& aMessage ); + +// from base class MCCPCSCall + + /** + * From MCCPCSCall + * Returns call information + * @param aCallInfo TMobileCallInfoV3 + * @return KErrNone if succesfull + * otherwise another system wide error code + */ + virtual TInt GetMobileCallInfo( TDes8& aCallInfo ) const; + + /** + * From MCCPCSCall + * Gets the calls data call capabilities + * @param aCaps TMobileCallDataCapsV1 + * @return KErrNone if the function member was successful, + * KErrNotSupported if call doesn't support circuit switched data + * KErrNotFound if this call is not a data call + */ + virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const; + +// from base class MCCPCall + + /** + * From MCCPCall + * Answers to an incoming call. + * @return system wide error code + */ + virtual TInt Answer(); + + /** + * From MCCPCall + * Rejects an incoming call. + * @return system wide error code + */ + virtual TInt Reject(); + + /** + * From MCCPCall + * Reguests plug-in to queue the call. + * @return system wide error code + */ + virtual TInt Queue(); + + /** + * From MCCPCall + * Starts dialing to remote party + * @return system wide error code + */ + virtual TInt Dial(); + + /** + * From MCCPCSCall + * Starts dialing to recipient + * @param aCallParams Call parameters used + * by the TSY (TCallParamsPckg) + * @return system wide error code + */ + TInt Dial( const TDesC8& aCallParams ); + + /** + * From MCCPCall + * Call is ringning + * @return system wide error code + */ + virtual TInt Ringing(); + + /** + * From MCCPCall + * Ends an ongoing call. + * @return system wide error code + */ + virtual TInt HangUp(); + + /** + * From MCCPCall + * Cancels the ongoing request + * @return system wide error code + */ + virtual TInt Cancel(); + + /** + * From MCCPCall + * Puts the specified call on hold. + * @return system wide error code + */ + virtual TInt Hold(); + + /** + * From MCCPCall + * Resumes the call. + * @return system wide error code + */ + virtual TInt Resume(); + + /** + * From MCCPCall + * Swaps a connected call to its opposite state either active or on hold + * @return system wide error code + */ + virtual TInt Swap(); + + /** + * From MCCPCall + * Returns the remote party of the call. + * @return remote party address, + */ + const TDesC& RemoteParty() const; + + /** + * From MCCPCall + * Returns the remote party name of the call. + * @return remote party name + */ + const TDesC& RemotePartyName(); + + /** + * From MCCPCall + * Dialled party. + * @return dialled party name + */ + const TDesC& DialledParty() const; + + /** + * From MCCPCall + * Return boolean value if the incoming call is forwarded or not. + * @return ETrue if call is forwarded, else EFalse + */ + virtual TBool IsCallForwarded() const; + + /** + * From MCCPCall + * Returns boolean value if the call is mobile originated or not. + * @return ETrue if call is mobile originated, otherwise EFalse + */ + virtual TBool IsMobileOriginated() const; + + /** + * From MCCPCall + * Returns the state of the call. + * @return TCCPCallState The current state of the call + */ + virtual MCCPCallObserver::TCCPCallState State() const; + + /** + * From MCCPCall + * Returns TUid of the plug-in used for this call + * @return TUid Implementation UID of the Plug-In + */ + virtual TUid Uid() const; + + /** + * From MCCPCall + * Returns call control caps for this call + * @return call capability information + */ + virtual MCCPCallObserver::TCCPCallControlCaps Caps( ) const; + + /** + * From MCCPCall + * Get call's secure status. + * @return TBool ETrue if security is enabled, else EFalse. + */ + virtual TBool IsSecured() const; + + /** + * From MCCPCall + * Get call's secure specified status. + * @return TBool ETrue if secure specified + */ + virtual TBool SecureSpecified() const; + + /** + * From MCCPCall + * Set call parameters. + * @param aNewParams New call paramater information. + */ + virtual void SetParameters( const CCCPCallParameters& aNewParams ); + + /** + * From MCCPCall + * Cet call parameters. + * @return Current call paramater information. + */ + virtual const CCCPCallParameters& Parameters() const; + + /** + * From MCCPCall + * Get Forward provider + * @param aObserver - observer class for forward events + * @return Pointer to MCCPForwardProvider if succesfull, NULL if not available + * @leave on error case system error code + */ + virtual MCCPForwardProvider* ForwardProviderL( const MCCPForwardObserver& aObserver ); + + /** + * From MCCPCall + * Get Call transfer provider + * @param aObserver - observer class for transfer events + * @return Pointer to MCCPTransferProvider if succesfull, NULL if not available + * @leave on error case system error code + */ + virtual MCCPTransferProvider* TransferProviderL( const MCCPTransferObserver& aObserver ); + + /** + * From MCCPCall + * Adds a new observer for MCCECall object. Called in MT call case. In MO + * case observer will be given at call construction. + * Plug-in dependent feature if duplicates or more than one observers + * are allowed or not. Currently CCE will set only one observer. + * @param aObserver Observer + * @leave system error if observer adding fails + */ + virtual void AddObserverL( const MCCPCallObserver& aObserver ); + + /** + * From MCCPCall + * Remove an observer. + * @param aObserver Observer + * @return KErrNone if removed succesfully. KErrNotFound if observer was not found. + * Any other system error depending on the error. + */ + virtual TInt RemoveObserver( const MCCPCallObserver& aObserver ); + + /** + * From MCCPCall + * Returns the inband tone associated to an error condition or a state transition of a call. + * See defenition for TCCPTone. + * @since S60 3.2 + * @param None. + * @return TCCPTone Used tone. + */ + TCCPTone Tone() const; + +// from base class MCCPCSCall + + /** + * From MCCPCSCall + * Indicates that FDN check is not used for dial. + */ + virtual void NoFDNCheck( ); + + /** + * From MCCPCSCall + * Log dialed number. SAT related, check if dialed number is to be logged or not. + * @since S60 5.0 + * @param None + * @return Log dialed number or not. + */ + virtual TBool LogDialedNumber() const; + +// from base class MCCPCallCommandHandling + + /** + * Perform answer command. + * @return system wide error code + */ + TInt PerformAnswerRequest(); + + /** + * Perform dial command. + * @return system wide error code + */ + TInt PerformDialRequest(); + + protected: + + /** + * Starts dialing to recipient. + * Bypasses FDN check according to aFdnCheck. + * @param aFdnCheck True if FDN checking is used + * @return system wide error code + */ + virtual TInt DialFdnCond( TBool aFdnCheck ) = 0; + + protected: + + /** + * C++ default constructor. + * + * @param aLine line of the call + * @param aMobileOriginated is call mobile originated + * @param aName contains call name (mobile terminated) or phone number (mobile originated) + * @param aCommonInfo reference to common info interface + * @param aIsEmergencyCall is emergency call + */ + CSPCall( RMobileLine& aLine, + TBool aMobileOriginated, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo, + TBool aIsEmergencyCall ); + + /* + * Constructing 2nd phase. + * @param aParams call parameters + */ + virtual void ConstructL( const CCCECallParameters& aParams ); + + /* + * Notifies the ringing state to observers. + */ + virtual void NotifyRingingState(); + + /** + * Mapping ETel state to CCP state. + * @param aEtelState an ETel state + * @return corresponding CCP state + */ + MCCPCallObserver::TCCPCallState + CSPCall::CCPStateFromETelState( + RMobileCall::TMobileCallStatus aEtelState ); + + /** + * From MCSPCallObserver + * Updates the state change including inband tones + * played by network and forwards the state for observer. + * @param aState new state of the call + */ + virtual void NotifyCallStateChangedWithInband( + MCCPCallObserver::TCCPCallState aState ); + + /** + * Updates the state change + * and forwards the state for observer. + * @param aState new state of the call + */ + virtual void NotifyCallStateChanged( + MCCPCallObserver::TCCPCallState aState ); + + /** + * From MCSPCallObserver + * Notify that remote party info has changed. + * @param aRemotePartyName new remote party name + * @param aRemotePartyNumber new remote party number + */ + virtual void NotifyRemotePartyInfoChanged( + const TDesC& aRemotePartyName, + const TDesC& aRemotePartyNumber ); + + /** + * Open call handle. + * Opens a new call handle for MO call + * and an existing handle for MT call. + */ + virtual void OpenCallHandleL(); + + /** + * Update call info data including call name, + * remote name and number data. + */ + virtual void UpdateCallInfo(); + + /** + * Implementation for UpdateCallInfo(). + */ + virtual void UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo ); + + /** + * Set call origin to CCCECallParameters. + */ + virtual void UpdateCallOrigin( RMobileCall::TMobileCallInfoV7 aCallInfo ); + + /** + * Reads information from cenrep. + * @param aUid CR Uid + * @param aKey CR key + * @param aVal value of key, output + */ + void ReadRepositoryL( TUid aUid, TUint aKey, TInt& aVal); + + /** + * Check and notify call termination error. + */ + void CheckAndNotifyTerminationError(); + + /** + * Error from iExitCode. + */ + TInt ExitCodeError() const; + + /** + * Update call name number info. + * @param aCallInfo RMobileCall::TMobileCallInfoV3 + * @param aCallCreatedByMonitor, set: + * EFalse for calls added by plugin owner + * ETrue for calls added by ETel status monitor + */ + void UpdateCallNameNumberInfo( + RMobileCall::TMobileCallInfoV3& aCallInfo, + TBool aCallAddedByMonitor ); + + /** + * Open new call. + * New call is opened when the plugin owner adds the new + * call (compare to OpenExistingCall where call is added by + * ETel monitor). + */ + void OpenNewCall(); + + /** + * Open existing call. + * Existing call is opened if one of the ETel + * monitors (incoming call monitor or line status monitor) + * has added the call and no new call needs to be + * opened. + * @param aName name of the existing call + */ + void OpenExistingCallL( const TDesC& aName ); + + private: + + /** + * Create call handlers for call requests and for + * monitoring call events. + */ + void CreateCallHandlersL(); + + /** + * Update call state from ETel + * @return system wide error code + */ + int UpdateCallState(); + + /** + * Sends a remote party info changed notification + * if the remote party number has changed. + */ + void NotifyRemotePartyNumberChanged(); + + private: + + enum TCSPCallAudioStatus { + ECSPCallAudioStatusInactive, + ECSPCallAudioStatusActive + }; + + protected: + + /** + * CCP Call Observer array. + */ + RPointerArray iObservers; + + /** + * Actual ETel call handle. + */ + RMobileCall iCall; + + /** + * ETel line + */ + RMobileLine& iLine; + + /** + * Determines if the call direction is either MO (ETrue) or MT (EFalse) + */ + TBool iMobileOriginated; + + /** + * Name information of the call. + * + * Name information is stored during CSPCall construction + * and assigned to iCallName (MT or client call) or + * iRemotePartyNumber (MO call) afterwards. + */ + TBuf iName; + + /** + * Remote party name of the call. + */ + TBuf iRemotePartyNumber; + + /** + * Remote party name of the call. + */ + TBuf iRemotePartyName; + + /** + * Dialled party of the call. + */ + TBuf iDialledParty; + + /** + * Call name for MT call. + */ + TName iCallName; + + /** + * Call parameters. + */ + CCCECallParameters* iParams; + + /** + * Call state in CCP format + */ + MCCPCallObserver::TCCPCallState iCallState; + + /** + * Capability flags. + */ + TUint32 iCapsFlags; + + /** + * Call status monitor + */ + CSPEtelCallStatusMonitor* iCallStatusMonitor; + + /** + * Call event monitor + */ + CSPEtelCallEventMonitor* iCallEventMonitor; + + /** + * Call info monitor + */ + CSPCallInfoMonitor* iCallInfoMonitor; + + /** + * Makes the asynchronic requests for various purposes. + */ + CSPEtelCallRequester* iRequester; + + /** + * Dial completion code. + */ + TInt iDialCompletionCode; + + /** + * Common information for calls. + */ + MCSPCommonInfo& iCommonInfo; + + /** + * Call termination error notification has been sent. + */ + TBool iTerminationErrorNotified; + + /** + * Emergency call. + */ + TBool iIsEmergencyCall; + + private: + + /** + * Transfer provider. + * Own. + */ + CSPTransferProvider* iTransferProvider; + + /** + * Forward provider. No actual implementation. + * Own. + */ + CSPForwardProvider* iForwardProvider; + + /** + * Audio dev sound handler. + * Not own. + */ + CSPAudioHandler* iAudioHandler; + + /** + * FDN check usage status. Default is on. (ETrue) + */ + TBool iFdnCheck; + + /** + * Monitors call capabilities from ETel. + * Own. + */ + CSPEtelCallCapsMonitor* iCallCapsMonitor; + + /* + * UUS monitor + */ + CSPUUIMonitor* iUUIMonitor; + + /* + * UUS sender + */ + CSPUUIMessageSender* iUUIMessageSender; + + /** + * Data for parsed skype id. + * Own. + */ + HBufC* iSkypeId; + + /** + * Audio stop requested status. The flag prevents double audio stop. + * Stop is executed in Disconnecting state and Idle state + * if previous state has been DisconnectingWithInband. + * Audio start status. + */ + TCSPCallAudioStatus iAudioStatus; + + /** + * Defines whether to report KErrGsmCCNormalUnspecified + * and KErrGsmCCCallRejected. + */ + TBool iDontReportTerm; + + /** + * User to user information. Sended to network before dial. + * Own. + */ + HBufC* iUserToUserInformation; + + friend class UT_CSPCall; + friend class MT_CConvergedCallProvider; + + + }; + + +#endif // CSPCALL_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspcalladdedhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspcalladdedhandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,166 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPCallAddedHandler +* +*/ + + +#ifndef CSPCALLADDEDHANDLER_H +#define CSPCALLADDEDHANDLER_H + +#include +#include +#include "rcsplinecontainer.h" +#include "mcsplinestatusobserver.h" // For MCSPLineStatusObserver + +class CSPCall; +class CSPCallArray; +class CSProvider; +class MCCPCSObserver; +class RCSPLineContainer; +class CSPEtelLineStatusMonitor; +class CSPEtelCallWaitingRequester; +class MCSPCommonInfo; +class CSPAudioHandler; + +/** +* Handles call adding from calls not done by the plugin. +* +* @lib csplugin.dll +*/ +NONSHARABLE_CLASS(CSPCallAddedHandler): public CBase, + public MCSPLineStatusObserver + { + + public: //Constructors and descructor + + /** + * Two-phased constructing for the monitor. + * + * @param aObserver the observer for getting notification + * @param aLine the line to monitor + * @param aLineId line identifier + */ + static CSPCallAddedHandler* NewL( + const MCCPCSObserver& aObserver, + RCSPLineContainer& aLineContainer, + CSPCallArray& aCallArray, + MCSPCommonInfo& aCommonInfo, + CSPAudioHandler& aAudioHandler ); + + /** + * C++ default destructor + */ + virtual ~CSPCallAddedHandler( ); + + +// from base class MCSPLineStatusMonitor + + /** + * Handles line status change notifications + * @param aLine the line to monitor + * @param aLineId line identifier + * @param aLineStatus + */ + void LineStatusChanged( RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId, + RMobileCall::TMobileCallStatus& aLineStatus ); + + protected: // From CActive + + /** + * From CActive + * RunL + */ + void RunL(); + + /** + * From CActive + * Catches errors if RunL leaves + * @param aError error code + * @return error code + */ + TInt RunError( TInt aError ); + + /** + * From CActive + * Cancels the monitor + */ + void DoCancel(); + + private: + + /** + * C++ default constructor + * @param aObserver the observer for status change (incoming call) + * @param aLine the line associated with the call + * @param aLineId line identifier + */ + CSPCallAddedHandler( const MCCPCSObserver& aObserver, + RCSPLineContainer& aLineContainer, + CSPCallArray& aCallArray, + MCSPCommonInfo& aCommonInfo, + CSPAudioHandler& aAudioHandler ); + + /** + * Constructs the monitor in the second phase. + */ + void ConstructL(); + + /** + * Handles call creation + * @param aLine the line to monitor + * @param aCallName the call name + * @param aLineId line identifier + */ + void CallAdded( RMobileLine& aLine, + TName aCallName, + RCSPLineContainer::TCSPLineId aLineId ); + + private: // data + + /** + * Line container. + */ + RCSPLineContainer& iLineContainer; + + /** + * Notifications observer. + */ + const MCCPCSObserver& iObserver; + + /** + * Line status monitors. + */ + CSPEtelLineStatusMonitor* iVoiceLineMonitor; + CSPEtelLineStatusMonitor* iDataLineMonitor; + CSPEtelLineStatusMonitor* iAuxLineMonitor; + + /** + * Array of calls. + */ + CSPCallArray& iCallArray; + + /** + * Common info handle. + */ + MCSPCommonInfo& iCommonInfo; + + /** + * Audio Handler reference. + */ + CSPAudioHandler& iAudioHandler; + }; + +#endif // CSPCALLADDEDHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspcallarray.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspcallarray.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPCallArray +* +*/ + + +#ifndef CSPCALLARRAY_H +#define CSPCALLARRAY_H + +#include + +#include "mcspcallinformation.h" + +class CSPCall; + +/** +* Handles call adding from calls not done by the plugin. +* +* @lib csplugin.dll +*/ +class CSPCallArray: public CBase, + public MCSPCallInformation + { + + public: //Constructors and descructor + + /** + * Two-phased constructing for the array. + * + */ + static CSPCallArray* NewL( ); + + /** + * C++ default destructor + */ + virtual ~CSPCallArray( ); + + /** + * Remove call from array + * @param aCall call to be removed + * @return result of removal + */ + TInt Add( CSPCall* aCall ); + + /** + * Remove call from array + * @param aCall call to be removed + * @return result of removal + */ + TInt Remove( CSPCall* aCall ); + + /** + * Get call count. + */ + TInt GetCallCount( ); + + /** + * Get call by index. + */ + CSPCall* Get( TInt aIndex ); + +// from base class MCSPCallInformation + + /** + * From MCSPCallInformation + * Finds call pointer specified by call name. + * @param aCallName + * @return corresponding call pointer or NULL if not found. + */ + CSPCall* FindCall( const TName& aCallName ); + + private: + /** + * C++ default constructor + * @param aObserver the observer for status change (incoming call) + * @param aLine the line associated with the call + * @param aLineId line identifier + */ + CSPCallArray( ); + + private: // data + + /** + * Pointer array of call objects. + */ + RPointerArray iCallArray; + + }; + +#endif // CSPCALLARRAY_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspcallcommandhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspcallcommandhandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,110 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declarations for class CSPCallCommandHandler +* +*/ + + +#ifndef CSPCALLCOMMANDHANDLER_H +#define CSPCALLCOMMANDHANDLER_H + +#include + +#include "mcspcallinformation.h" + +class CSPCall; +class MCCPCallCommandHandling; + +/** +* Handles call adding from calls not done by the plugin. +* +* @lib csplugin.dll +*/ +enum TCSPPendingCallCommand { + ECSPNone, + ECSPAnswerCall, + ECSPDialCall + }; + +class CSPCallCommandHandler: public CBase + { + + public: //Constructors and descructor + + /** + * Two-phased constructing for the array. + */ + static CSPCallCommandHandler* NewL(); + + /** + * C++ default destructor + */ + virtual ~CSPCallCommandHandler( ); + + /** + * Indicates active hangup command. + * @param aCall MT call + * @return system wide error code + */ + TInt IndicateActiveHangup( MCCPCallCommandHandling& aCall ); + + /** + * Indicates hangup command complete. + * @param aCall MT call + * @return system wide error code + */ + TInt IndicateHangupComplete( MCCPCallCommandHandling& aCall ); + + /** + * Indicates active hangup command. + * @param aCall MT call + * @return system wide error code + */ + TInt IndicateDialRequest( MCCPCallCommandHandling& aCall ); + + /** + * Indicates active hangup command. + * @param aCall MT call + * @return system wide error code + */ + TInt IndicateAnswerRequest( MCCPCallCommandHandling& aCall ); + + + private: + /** + * C++ default constructor + */ + CSPCallCommandHandler(); + + private: // data + + /** + * Active hangup array. + */ + RPointerArray iActiveHangupArray; + + /** + * Pending command. + */ + TCSPPendingCallCommand iPendingCommand; + + /** + * Pending call command object. + * Not own + */ + MCCPCallCommandHandling* iPendingCall; + + }; + +#endif // CSPCALLCOMMANDHANDLER_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspcallinfomonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspcallinfomonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2007 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: Monitors changes in remote party info +* (RMobileCall::TMobileCallRemotePartyInfoV1) +* Interface : +* +*/ + + +#ifndef CSPCALLINFOMONITOR_H +#define CSPCALLINFOMONITOR_H + +// INCLUDES +#include +#include "mcspcallobserver.h" + +// FORWARD DECLARATIONS + +class CSPCallData; +class CSPPhoneData; +class RMobileCall; + +// CLASS DEFINITIONS + +/** Monitors changes in remote party info. +* This class monitors remote party info changes in ETel's call objects. +* @since 3.1 +*/ +NONSHARABLE_CLASS( CSPCallInfoMonitor ): public CActive + { + public: + /** + * Two-phased constructor + * @param aObserver Call info change observer + * @param aCall This is the call to be monitored + */ + static CSPCallInfoMonitor* NewL( + MCSPCallObserver& aObserver, RMobileCall &aCall ); + + /** D'tor. */ + ~CSPCallInfoMonitor(); + + public: + /** + * Starts monitoring. + */ + void StartMonitoring( ); + + private: + /** Prohibited. */ + CSPCallInfoMonitor& operator=( const CSPCallInfoMonitor& ); + + /** + * C++ Constructor + * @param aObserver aObserver Call info change observer + * @param aCall This is the call to be monitored. + */ + CSPCallInfoMonitor( MCSPCallObserver& aObserver, + RMobileCall &aCall ); + + + private: // from CActive + /** @see CActive::RunL() */ + void RunL(); + + /** @see CActive::DoCancel() */ + void DoCancel(); + + + + private: + + /** + * Observer for info change. + */ + MCSPCallObserver& iObserver; + + /** + * Pointer to Call object. + * Not own. + */ + RMobileCall& iCall; + + /** + * Remote party info. + */ + RMobileCall::TMobileCallRemotePartyInfoV1 iRemotePartyInfo; + + /** + * packaged remote party info. + */ + RMobileCall::TMobileCallRemotePartyInfoV1Pckg iRemotePartyInfoPckg; + }; + +#endif // CSPCALLINFOMONITOR_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspcenreplistener.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspcenreplistener.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,116 @@ +/* +* Copyright (c) 2007 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: This file contains the header of CenRep Listener class. +* +*/ + + +#ifndef CSPCENREPLISTENER_H +#define CSPCENREPLISTENER_H + +// INCLUDE FILES +#include + +// Forward declarations +class CRepository; +class MCSPCenRepObserver; + +// BASE CLASS + +// CLASS DECLARATION + +/** +* CSPCenRepListener manages getting notification on CenRep key changes. +*/ +class CSPCenRepListener : public CActive + { + public: + + /** + * Two-phased construction. + * + * @param aUid cenrep Uid + * @param aKey key to be listened + * @param aObserver observer for key change. + * @return instance of the class + */ + static CSPCenRepListener* NewL( TUid aUid, TUint32 aKey, + MCSPCenRepObserver* aObserver ); + + /** + * Destructor. + */ + virtual ~CSPCenRepListener(); + + public: + + /** + * Gets the current value of the monitored setting + * @param aValue the current value of the monitored setting + * @return TInt Symbian OS error code from central repository + */ + TInt Get( TInt& aValue ); + + + protected: // From CActive + + void DoCancel(); + TInt RunError( TInt aError ); + void RunL(); + + private: + + /** + * Constructor + * @param aUid cenrep Uid + * @param aKey key to be listened + * @param aObserver observer for key change. + */ + CSPCenRepListener( TUid aUid, TUint32 aKey, + MCSPCenRepObserver* aObserver ); + + + /** + * Private constructing. + */ + void ConstructL(); + + /** + * Submits a notification request + */ + void SubmitNotifyRequestL(); + + + private: // Owned by this object + + /** + * UID of CR key. + */ + TUid iUid; + + /** + * Repository access. + * Own. + */ + CRepository* iRepository; + + /** + * Identification number of the monitored setting. + */ + TUint32 iMonitorSetting; + + MCSPCenRepObserver* iObserver; +}; + +#endif // CSPCENREPLISTENER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspcipheringstatusmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspcipheringstatusmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,121 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPCipheringStatusMonitor +* +*/ + + +#ifndef CSPCIPHERINGSTATUSMONITOR_H +#define CSPCIPHERINGSTATUSMONITOR_H + +// INCLUDES +#include +#include + +#include "cspconsts.h" + + +// FORWARD DECLARATIONS +class RMmCustomAPI; +class MCSPSecuritySettingObserver; + +// CLASS DECLARATION + + +class CSPCipheringStatusMonitor : public CActive + { + public: //Constructors and descructor + + /** + * C++ default constructor + */ + CSPCipheringStatusMonitor( RMmCustomAPI& aMmCustom, + MCSPSecuritySettingObserver& aObs ); + + /** + * Destructor. + */ + ~CSPCipheringStatusMonitor(); + + public: + + static CSPCipheringStatusMonitor* NewL( RMmCustomAPI& aMmCustom, + MCSPSecuritySettingObserver& aObs ); + + /** + * Starts monitoring the CW notifications + */ + void StartMonitoring(); + + /** + * Network security status. + * @return secured status + */ + TBool NetworkSecurityStatus() const; + + /** + * Secure specified. + * @return secure specified status + */ + TBool SecureSpecified() const; + + protected: // From CActive + + /** + * Cancels asyncronous request(s). + */ + void DoCancel(); + + /** + * Informs object that asyncronous request is ready. + */ + void RunL(); + + private: // data + + /** + * Ciphering info + */ + RMmCustomAPI::TCipheringInfo iCipheringInfo; + + /** + * CustomAPI handle + */ + RMmCustomAPI& iMmCustom; + + /** + * Security setting observer. + */ + MCSPSecuritySettingObserver &iObserver; + + /** + * indicates if ciphering status was retreived for the first time + */ + TBool iIsInitialised; + + /** + * Call secure status. + */ + TBool iCallsSecured; + + /** + * Call secure specified status. + */ + TBool iSecureSpecified; + + }; + +#endif // CSPCIPHERINGSTATUSMONITOR_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspclientvideocall.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspclientvideocall.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements CSPClientVideoCall for CS Call Plug-in +* +*/ + + +#ifndef CSPCLIENTVIDEOCALL_H +#define CSPCLIENTVIDEOCALL_H + +#include +#include +#include +#include +#include + +#include "cspvideocall.h" +#include "cspconsts.h" +#include "mcspcallobserver.h" +#include "mcspcallerrorobserver.h" + + +/** +* Call class for CS Call Plug-in. Implements the API defined by CCP in classes +* MCCPCall and MCCPCSCall +* +* @lib csplugin.dll +* @since S60 v5.0 +*/ +class CSPClientVideoCall : public CSPVideoCall + { + + public: + + /* + * Creates a new CSPClientVideoCall object. + * @since S60 5.0 + * @param aName dialled number (MT) or call name (MO) + * @param aLine line for opening the call + * @param aParams call parameters + * @param aCommonInfo common information for call, + * @return pointer to created call object + */ + static CSPClientVideoCall* NewL( const TDesC& aName, + RMobileLine& aLine, + const CCCECallParameters& aParams, + MCSPCommonInfo& aCommonInfo ); + + /** + * C++ default destructor + */ + virtual ~CSPClientVideoCall( ); + +// from base class CSPVideoCall + + /** + * From CSPCall + * Updates the state change and forwards the state for observer. + * @param aState new state of the call + */ + void NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState ); + + /** + * From CSPCall + * Updates the state change and forwards the state for observer. + * @param aState new state of the call + */ + void NotifyCallStateChangedWithInband( MCCPCallObserver::TCCPCallState aState ); + + private: + + /* + * C++ default constructor + * @param aLine open line ready for use + * @param aServiceId service ID + * @param aCallType type of call + * @param aLineType type of line (primary/aux) + * @param aMobileOriginated true if MO, false if MT + * @param aName call name (MT) or recipient (MO) + * @param aExtMoCall is externally created MO call + */ + CSPClientVideoCall( RMobileLine& aLine, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo ); + + /* + * Constructing 2nd phase. + * @since S60 3.2 + */ + void ConstructL( const CCCECallParameters& aParams ); + + /* + * Indicate client call. + * Indication is done in Dialling state and can be done only once + */ + void IndicateClientCall(); + + /** + * Open call handle. + * Opens an existing handle for client call. + */ + void OpenCallHandleL(); + + /** + * Update call info. + */ + void UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo ); + + private: // Data + + /** + * Defines whether client call has been already indicated for this call + * when Dialling state is entered. + */ + TBool iClientCallIndicated; + + }; + + +#endif // CSPCLIENTVIDEOCALL_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspclientvoicecall.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspclientvoicecall.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,114 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements CSPClientVoiceCall for CS Call Plug-in +* +*/ + + +#ifndef CSPCLIENTVOICECALL_H +#define CSPCLIENTVOICECALL_H + +#include "cspvoicecall.h" + +/** +* Client voice call class for CS Call Plug-in. +* +* @lib csplugin.dll +*/ +class CSPClientVoiceCall : public CSPVoiceCall + { + + public: + + /* + * Creates a new CSPClientVoiceCall object. + * @since S60 5.0 + * @param aName dialled number (MT) or call name (MO) + * @param aLine line for opening the call + * @param aParams call parameters + * @param aCommonInfo common information for call, + * @return pointer to created call object + */ + static CSPClientVoiceCall* NewL( const TDesC& aName, + RMobileLine& aLine, + const CCCECallParameters& aParams, + MCSPCommonInfo& aCommonInfo ); + + /** + * C++ default destructor + */ + virtual ~CSPClientVoiceCall( ); + + // from base class CSPVoiceCall + + /** + * From CSPVoiceCall + * Updates the state change and forwards the state for observer. + * @param aState new state of the call + */ + void NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState ); + + /** + * From CSPVoiceCall + * Updates the state change and forwards the state for observer. + * @param aState new state of the call + */ + void NotifyCallStateChangedWithInband( MCCPCallObserver::TCCPCallState aState ); + + private: + + /* + * Voice call constructor. + * @param aLine open line ready for use + * @param aName remote party or call name depending on direction + * @param aCommonInfo reference to common info interface + */ + CSPClientVoiceCall( RMobileLine& aLine, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo ); + + /* + * Constructing 2nd phase. + */ + void ConstructL( const CCCECallParameters& aParams ); + + /* + * Indicate client call. + * Indication is done in Dialling state and can be done only once + */ + void IndicateClientCall(); + + /** + * Open call handle. + * Opens an existing handle for client call. + */ + void OpenCallHandleL(); + + /** + * Update call info. + */ + void UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo ); + + private: // Data + + /** + * Defines whether client call has been already indicated for this call + * when Dialling state is entered. + */ + TBool iClientCallIndicated; + + }; + + +#endif // CSPCLIENTVOICECALL_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspconferencecall.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspconferencecall.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,316 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements CSPConferenceCall for CS Call Plug-in +* +*/ + + + +#ifndef CSPCONFERENCECALL_H +#define CSPCONFERENCECALL_H + +#include +#include +#include +#include +#include +#include + +#include "mcspconferencestatusobserver.h" +#include "cspconsts.h" +#include "cspetelconferencecallrequester.h" // For the requester and TConferenceRequestType + + +class MCCPForwardProvider; +class MCCPTransferProvider; +class MCCPObserver; +class MCSPCallInformation; +class CSPConferenceCallObserver; +class RMobileConferenceCall; +class CSPEtelConferenceStatusMonitor; +class CSPEtelConferenceEventMonitor; +class CSPEtelConferenceCapsMonitor; + + +/** +* Call class for CS Call Plug-in. Implements the API defined by CCP in classes +* MCCPCall and MCCPCSCall +* +* @lib csplugin.dll +*/ +class CSPConferenceCall : public CBase, + public MCCPConferenceCall, + public MCSPConferenceStatusObserver + { + + public: + /* + * Creates a new CSPConferenceCall object. + * @param aPhone reference to phone object + * @return pointer to created call object + * @param aServiceId the service id + */ + static CSPConferenceCall* NewL( + RMobilePhone& aPhone, + MCSPCallInformation& aCallInfo, + TUint32 aServiceId ); + + /* + * C++ default destructor + */ + virtual ~CSPConferenceCall( ); + + /** + * Getter for observer + * @return observer for CS calls. + */ + MCCPCallObserver* Observer() const; + + /** + * Notifies call specific event to observers. + * @param aEvent conference event that was occurred + * @param aCallName the name of the related call object + */ + void NotifyEvent( + MCCPConferenceCallObserver::TCCPConferenceCallEvent aEvent, + TName& aCallName ); + + /** + * Notifies non-'call specific' event to observers. + * @param aEvent conference event that was occurred, + */ + void NotifyEvent( + MCCPConferenceCallObserver::TCCPConferenceCallEvent aEvent ); + + /** + * Notifies about conference call request related errors. + */ + void NotifyConferenceError( TCCPConferenceCallError aErr ); + + /** + * Handles caps change. + * @param aNewCaps new caps + */ + void ConferenceCapsChanged( TUint32 aNewCaps ); + +// from base class MCSPConferenceStatusObserver + + /** + * From MCSPConferenceStatusObserver. + * Notifies event to observers. + * @param aStatus new status of the conference call + */ + void NotifyStateChange( + MCSPConferenceStatusObserver::TCSPConferenceState aStatus ); + +// from base class MCCPConferenceCall + + /** + * From MCCPConferenceCall. + * Adds new call to conference call. + * @param aCall Call to be added to conference + * @return Leaves in case of an error. + * KErrArgument, KErrNoMemory + */ + void AddCallL( MCCPCall* aCall ); + + /** + * From MCCPConferenceCall. + * Removes call from conference call. + * @param aCall Call to be removed from conference + * @return In error case leaves. + * KErrArgument, KErrNotFound + */ + void RemoveCallL( MCCPCall* aCall ); + + /** + * From MCCPConferenceCall. + * Returns number of calls in conference call. + * @param aCallCount Number of calls in conference. + * @return KErrNone if succesfull, otherwise system wide error code. + */ + TInt CallCount( ) const; + + /** + * From MCCPConferenceCall. + * Switch to a private call with one call from conference call. + * @param aCall Call to be removed from conference + * @return In error case leaves. + * KErrArgument, KErrNotFound + */ + void GoOneToOneL( MCCPCall& aCall ); + + /** + * Adds current calls (1 hold + connected ) + * to part of conference + * @leave In case of an error system wide error code + */ + void CurrentCallsToConferenceL(); + + /** + * From MCCPConferenceCall + * Returns serviceId + * @since S60 3.2 + * @return TUint32 ServiceId + */ + TUint32 ServiceId() const; + + /** + * From MCCPConferencCall + * Ends an ongoing call. + * @since S60 3.2 + */ + TInt HangUp(); + + /** + * From MCCPConferenceCall + * Puts the specified call on hold. + * @since S60 3.2 + */ + TInt Hold(); + + /** + * From MCCPConferenceCall + * Resumes the call. + * @since S60 3.2 + */ + TInt Resume(); + + /** + * From MCCPConferenceCall + * Swaps a connected call to its opposite state either active or on hold + * @since S60 3.2 + */ + TInt Swap(); + + /** + * Adds a new observer for the conference call object. + * @since S60 3.2 + * @param aObserver the conference observer to be added + */ + void AddObserverL( const MCCPConferenceCallObserver& aObserver ); + + /** + * Removes an observer. + * @since S60 3.2 + * @param aObserver the observer to be removed + * @return system wide error code + */ + TInt RemoveObserver( const MCCPConferenceCallObserver& aObserver ); + + /** + * Get conference participants. + * @since S60 5.0 + * @param aCallArray array where participating calls are stored + * @return system wide error code + */ + TInt GetCallArray( RPointerArray& aCallArray ); + + private: + + /* + * C++ default constructor + * @param aPhone handle to the ETel Phone + * @param aCallInfo call information + * @param aServiceId service id + */ + CSPConferenceCall( RMobilePhone& aPhone, + MCSPCallInformation& aCallInfo, + TUint32 aServiceId ); + + /* + * Constructing 2nd phase. + * @since S60 3.2 + * @param aObserver the CCP call observer, + */ + void ConstructL( ); + + /** + * Get conference state from ETel. + * @since S60 5.0 + * @param aState param for storing conference call state + * @return system wide error code + */ + TInt GetConferenceCallState( + MCCPConferenceCallObserver::TCCPConferenceCallState& aState ); + + private: + + /** + * Call status monitor. + * Own. + */ + CSPEtelConferenceStatusMonitor* iCallStatusMonitor; + + /** + * Call event monitor. + * Own. + */ + CSPEtelConferenceEventMonitor* iCallEventMonitor; + + /** + * Call caps monitor. + * Own. + */ + CSPEtelConferenceCapsMonitor* iCallCapsMonitor; + + /** + * ETel call object + */ + RMobileConferenceCall iCall; + + /** + * ETel phone + */ + RMobilePhone& iPhone; + + /** + * Conference call state. + */ + MCCPConferenceCallObserver::TCCPConferenceCallState iCallState; + + /** + * Makes the asynchronic requests for various purposes. + */ + CSPEtelConferenceCallRequester* iRequester; + + /** + * Observer array for conference states, events and errors. + */ + RPointerArray iObservers; + + /** + * Call count for adding call. + */ + TInt iCallCountForAddCall; + + /** + * Call Information for resolving call pointers from + * the call names. + */ + MCSPCallInformation& iCallInfo; + + /** + * Service ID + */ + TUint32 iServiceId; + + /** + * Call name of a last call added to this conference.. + */ + TName iAddedCallName; + + }; + +#endif // CSPCONFERENCECALL_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspconsts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspconsts.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2007 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: Constants for CSP +* +*/ + + + +#ifndef CCSPCONSTS_H +#define CCSPCONSTS_H + +_LIT( KCSPName,"CSP" ); + + +//The length of a pause created during dialling by the comma character (',') measured in seconds. +const TUint KCSPDefaultInterval = 2; + +// The boolean indicating the autoreadial is on or off +const TBool KCSPDefaultAutoRedial = EFalse; + +/** +* Required for notifying Incoming Call Monitor. +*/ +const TInt KCSPImplementationUidInt = 0x102828E5; + +/** +* Implementation uid of CS Plugin. +*/ +const TUid KCSPImplementationUid = { KCSPImplementationUidInt }; + +/** +* Number of message slots in RTelServer +*/ +const TInt KNbrOfMessageSlots = 128; + +const TInt KCSPPhoneNumberMaxLength = 100; + +const TInt KCSPCallingNameMaxLength = 80; + +#endif // CCSPCONSTS_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspdevsound.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspdevsound.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,165 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Wrapper for CMMFDevSound +* +*/ + +#ifndef CSPDEVSOUND_H +#define CSPDEVSOUND_H + +#include + +class MCSPDevSoundObserver; + +/** + * Wrapper for CMMFDevSound + * + */ +NONSHARABLE_CLASS( CSPDevSound ): + public CBase, + public MDevSoundObserver + { +public: + + /** + * Destructor. + */ + virtual ~CSPDevSound(); + + /** + * Activates the dev sound stream. MCSPDevSoundObserver methods are called + * when activation goes ok or fails. If the stream is already active or + * activating then nothing is done. + */ + virtual void Activate(); + + /** + * Deactivates the devsound stream. If stream is not active or + * activation is not ongoing then nothing is done. + */ + virtual void Deactivate(); + + /** + * Indicates that activation is ongoing, + * but the result of the activation is still unknown. + * @return ETrue - activation ongoing, EFalse - activation not ongoing. + */ + TBool IsActivationOngoing() const; + + /** + * Determines wether the devsound stream is active or not. + * @return ETrue - Stream is active, EFalse - Stream not active. + */ + TBool IsActive() const; + + CMMFDevSound& DevSound(); + +// from base class MDevSoundObserver + + /** + * From MDevSoundObserver + * Empty implementation + */ + void InitializeComplete( TInt aError ); + + /** + * From MDevSoundObserver + * Empty implementation + */ + void BufferToBeFilled( CMMFBuffer* aBuffer ); + + /** + * From MDevSoundObserver + * Empty implementation + */ + void PlayError( TInt aError ); + + /** + * From MDevSoundObserver + * Empty implementation + */ + void ToneFinished( TInt aError ); + + /** + * From MDevSoundObserver + * Empty implementation + */ + void BufferToBeEmptied( CMMFBuffer* aBuffer ); + + /** + * From MDevSoundObserver + * Empty implementation + */ + void RecordError( TInt aError ); + + /** + * From MDevSoundObserver + * Empty implementation + */ + void ConvertError( TInt aError ); + + /** + * From MDevSoundObserver + * Empty implementation + */ + void DeviceMessage( TUid aMessageType, const TDesC8& aMsg ); + +protected: + + CSPDevSound( MCSPDevSoundObserver& aObserver ); + + void ConstructL( + TMMFState aMode, TUint aAudioPreference, TUint aAudioPriority ); + +private: + + /** + * Derived class has to activate the stream here. + */ + virtual void DoActivateL() = 0; + +protected: // Data + + /** + * Indication if device is activated. Derived class has to update this. + */ + TBool iActive; + + /** + * Indication if activation is ongoing. + * Derived class has to update this. + */ + TBool iActivationOngoing; + + /** + * Devsound instance + * Own. + */ + CMMFDevSound* iDevSound; + + /** + * Observer for successfull activation. + * Not own. + */ + MCSPDevSoundObserver& iObserver; + + /** + * Audio priority settings for Devsound. + */ + TMMFPrioritySettings iPrioritySettings; + + + }; + +#endif // CSPDEVSOUND_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspdtmfprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspdtmfprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,191 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header of CSPDTMFProvider which provides DTMF functionality. +* +*/ + + +#ifndef CSPDTMFPROVIDER_H +#define CSPDTMFPROVIDER_H + + +#include +#include +#include + + +class RMobilePhone; +class CSPEtelDtmfMonitor; +class CSPEtelDtmfStopMonitor; +class RMmCustomAPI; + +/** +* Makes asynchronic request to ETel interface according to given request type. +* Provides canceling via CActive::Cancel(). +* +*/ +class CSPDTMFProvider: public CActive, + public MCCPDTMFProvider + { + + public: + + /** + * Two phased constructing of the DTMF provider instance. + * @param aPhone mobile phone handle + * @param aMmCustom custom API handle for special DTMF event + * monitoring. + * @return the DTMF provider instance + */ + static CSPDTMFProvider* NewL( RMobilePhone& aPhone, + RMmCustomAPI& aMmCustom ); + + + /** + * C++ default destructor + */ + virtual ~CSPDTMFProvider( ); + + /** + * HandleDTMFEvents. + * @since S60 3.2 + * @param aEvent Event type + * @param aError Error code + * @param aTone Character + */ + void NotifyDTMFEvent( const MCCPDTMFObserver::TCCPDtmfEvent aEvent, + const TInt aError, + const TChar aTone ); + + +// from base class MCCPDTMFProvider + /** + * Cancels asynchronous DTMF string sending. + * @return KErrNone if succesfull, otherwise another system wide error code + */ + TInt CancelDtmfStringSending(); + + /** + * Starts the transmission of a single DTMF tone across a + * connected and active call. + * @param aTone Tone to be played. + * @return KErrNone if succesfull, otherwise another system wide error code + */ + TInt StartDtmfTone( const TChar aTone ); + + /** + * Stops playing current DTMF tone. + * @return KErrNone if succesfull, otherwise another system wide error code + */ + TInt StopDtmfTone(); + + /** + * Plays DTMF string. + * @param aString String to be played. + * @return KErrNone if succesfull, otherwise another system wide error code + * KErrArgument if the specified string contains illegal DTMF characters + */ + TInt SendDtmfToneString( const TDesC& aString ); + + /** + * Continue or cancel sending DTMF string which was stopped with 'w'-character + * in string. + * @param aContinue ETrue if sending of the DTMF string should continue, + * EFalse if the rest of the DTMF string is to be discarded. + * @return KErrNone if succesfull, otherwise another system wide error code + */ + TInt ContinueDtmfStringSending( const TBool aContinue ); + + /** + * Add an observer for DTMF related events. + * Plug-in dependent feature if duplicates or more than one observers + * are allowed or not. Currently CCE will set only one observer. + * @since S60 v3.2 + * @param aObserver Observer + * @leave system error if observer adding fails + */ + void AddObserverL( const MCCPDTMFObserver& aObserver ); + + /** + * Remove an observer. + * @since S60 v3.2 + * @param aObserver Observer + * @return KErrNone if removed succesfully. KErrNotFound if observer was not found. + * Any other system error depending on the error. + */ + TInt RemoveObserver( const MCCPDTMFObserver& aObserver ); + +// from base class CActive + protected: + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + + private: + /** + * Constructs the requester. + * + * @param aPhone handle to ETel phone + * @param aMmCustom custom API handle + */ + CSPDTMFProvider( RMobilePhone& aPhone, RMmCustomAPI& aMmCustom ); + + /** + * Constructing the provider in the second phase. + */ + void ConstructL(); + + private: // data + + /** + * DTMF event observer. + */ + RPointerArray iObservers; + + /** + * ETel phone handle for DTMF functionality. + */ + RMobilePhone& iPhone; + + /** + * Monitor for DTMF events and changes. + * Own. + */ + CSPEtelDtmfMonitor* iMonitor; + + /** + * Monitor for DTMF stopping. + * Own. + */ + CSPEtelDtmfStopMonitor* iStopMonitor; + + /** + * Custom API reference. + */ + RMmCustomAPI& iMmCustom; + + }; + +#endif // CSPDTMFPROVIDER \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelcallcapsmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelcallcapsmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,122 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPEtelCallCapsMonitor +* +*/ + + +#ifndef CSPETELCALLCAPSMONITOR_H +#define CSPETELCALLCAPSMONITOR_H + +#include +#include + + +class MCSPCallObserver; + + +/** +* Monitors single ETel RMobileCall for call capss. +* +* This monitor is applied only for listening incoming calls, i.e. +* line capabilites are not monitored. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSPEtelCallCapsMonitor: public CActive + { + + public: //Constructors and descructor + + + /** + * Two-phased constructing for the monitor. + * + * @param aObserver the observer for getting notification + * @param aCall the line to monitor + */ + static CSPEtelCallCapsMonitor* NewL( + MCSPCallObserver& aObserver, + RMobileCall& aCall ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelCallCapsMonitor( ); + + /** + * Start monitoring call capss + * @since S60 3.2 + */ + void StartMonitoring(); + + /** + * Fetches call control caps. + * @return call control caps flags. + */ + TUint32 FetchCallControlCapsL(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + /** + * C++ default constructor + * @param aObserver the observer for status change (incoming call) + * @param aCall the line associated with the call + */ + CSPEtelCallCapsMonitor( MCSPCallObserver& aObserver, + RMobileCall& aCall ); + + /** + * Constructs the monitor in the second phase. + */ + void ConstructL(); + + + private: // data + /** + * Forwards caps change. + */ + MCSPCallObserver& iObserver; + + /** + * Call that is being observed. + */ + RMobileCall& iCall; + + /** + * Call capabilities. + */ + RMobileCall::TMobileCallCapsV1 iCaps; + RMobileCall::TMobileCallCapsV1Pckg iCapsPckg; + + + + }; + +#endif // CSPETELCALLCAPSMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelcalleventmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelcalleventmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,107 @@ +/* +* Copyright (c) 2007 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: Monitors call events from ETel +* +*/ + + +#ifndef CSPETELCALLEVENTMONITOR_H +#define CSPETELCALLEVENTMONITOR_H + +#include +#include + +class CSPCall; +class MCCPCallObserver; +class MCSPCallObserver; + +class CSPEtelCallEventMonitor + : public CActive + { + public: //Constructors and descructor + + /** + * Two-phased constructing for the monitor. + * @param aObserver the observer for events + * @param aCall actual object of the monitoring + */ + static CSPEtelCallEventMonitor* NewL( MCSPCallObserver& aObserver, + RMobileCall& aCall ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelCallEventMonitor( ); + + /** + * Start monitoring call events + */ + void StartMonitoring(); + + protected: // From CActive + + /** + * From CActive + * RunL + */ + void RunL(); + + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + + private: + + /** + * C++ constructor for the monitor. + * @param aObserver observers events + * @param aCall actual object of the monitoring + */ + CSPEtelCallEventMonitor( MCSPCallObserver& aObserver, + RMobileCall& aCall ); + + + private: // data + + /** + * Observer for call events. + */ + MCSPCallObserver& iObserver; + + /** + * ETel call which this monitors + */ + RMobileCall& iCall; + + /** + * Pointer for recovering from a situation where CCE releases call + * during observer-call sequence. + */ + TBool* iDestrPtr; + + + protected: + /** + * Call event + */ + RMobileCall::TMobileCallEvent iCallEvent; + + }; + +#endif // CSPETELCALLEVENTMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelcallrequester.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelcallrequester.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,202 @@ +/* +* Copyright (c) 2007 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: Delivers asynchronous requests to ETel +* +*/ + + +#ifndef CSPETELCALLREQUESTER_H +#define CSPETELCALLREQUESTER_H + + +#include +#include +#include +#include + +class MCSPCallErrorObserver; + +/** +* Makes asynchronic request to ETel interface according to given request type. +* Provides canceling via CActive::Cancel(). +* +*/ +class CSPEtelCallRequester + : public CActive + { + + public: + /** + * Supported request types. + */ + enum TRequestType { + ERequestTypeNone, + ERequestTypeDial, + ERequestTypeAnswer, + ERequestTypeHangup, + ERequestTypeHold, + ERequestTypeResume, + ERequestTypeGoOneToOne, + ERequestTypeSwap, + ERequestTypeDialEmergency + }; + + /** + * Constructs the requester via two phase. + * + * @param aObserver the observer for request errors + * @param aCall ETel RMobileCall reference that is the object + * of the request. + */ + static CSPEtelCallRequester* NewL( MCSPCallErrorObserver& aObserver, + RMobileCall& aCall ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelCallRequester( ); + + /** + * Makes the request. Note that ERequestTypeDial is made with a + * separate MakeDialRequest function. + * + * @since S60 3.2 + * @param aRequest type of request + * @return KErrNone if request was sent successfully. + * KErrNotSupported if the given request is not supported + * KErrArgument if the specified request is not known. + * KErrUnknown if unspecified error (should not happen) + */ + TInt MakeRequest( TRequestType aRequest ); + + /** + * Cancels the request. + * + * @since S60 3.2 + * @param aRequest type of request + * @return KErrNone if request was sent successfully. + * KErrNotSupported if the given request is not supported + * KErrArgument if the specified request is not known. + * KErrUnknown if unspecified error (should not happen) + */ + TInt CancelRequest( TRequestType aRequest ); + + + /** + * Makes a dial request. + * @since S60 3.2 + * @param aCallParamsPckg call parametrs + * @param aRemoteParty phone number + * @return KErrNone if successful, else error code + */ + TInt MakeDialRequest( + const TDesC8& aCallParams, + TDesC& aRemoteParty ); + + /** + * Makes a dial request without FDN check. + * @since S60 3.2 + * @param aCallParamsPckg call parametrs + * @param aRemoteParty phone number + * @return KErrNone if successful, else error code + */ + TInt MakeDialNoFdnCheckRequest( + const TDesC8& aCallParams, + TDesC& aRemoteParty ); + + + /** + * Makes a answer request. + * @since S60 3.2 + * @param aCallParams call parametrs + * @return KErrNone if successful, else error code + */ + TInt MakeAnswerRequest( + const TDesC8& aCallParams ); + + /** + * Makes emergency request. + * @param aRecipient emengency number + * @return error code + */ + TInt MakeDialEmergencyRequest( + const RMobileENStore::TEmergencyNumber& aRecipient ); + + /** + * Mapping between ETel and CCP errors. + * @param aErrorCode ETel error code + * @return CCP error code + */ + TCCPError MapError( TInt aErrorCode ); + + /** + * Getter for the active request. + * @return request. + */ + TRequestType Request(); + + /** + * Cancel dial (applies both emergency and normal calls) + * @return result of cancel (system wide error code) + */ + TInt CSPEtelCallRequester::DialCancel(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + + private: + + /** + * Constructs the requester. + * + * @param aObserver the observer for request errors + * @param aCall ETel RMobileCall reference that is the object + * of the request. + */ + CSPEtelCallRequester( MCSPCallErrorObserver& aObserver, + RMobileCall& aCall ); + + + private: // data + /** + * Observer for request errors. + */ + MCSPCallErrorObserver& iObserver; + + /** + * ETel call which this monitors + */ + RMobileCall& iCall; + + /** + * Type of request. + */ + TRequestType iRequestType; + + }; + +#endif // CSPETELCALLREQUESTER_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelcallstatusmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelcallstatusmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2007 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: Monitors call status changes from ETel +* +*/ + + +#ifndef CSPETELCALLSTATUSMONITOR_H +#define CSPETELCALLSTATUSMONITOR_H + +#include +#include + +class MCSPCallObserver; + + +NONSHARABLE_CLASS(CSPEtelCallStatusMonitor) : public CActive + { + public: //Constructors and descructor + + /** + * Two-phased constructing for the monitor. + * @param aObserver observer for call status changes + * @param aCall actual object of the monitoring + */ + static CSPEtelCallStatusMonitor* NewL( MCSPCallObserver& aObserver, + RMobileCall& aCall ); + + /** + * Destructor of the monitor which cancels ongoing monitoring. + */ + virtual ~CSPEtelCallStatusMonitor( ); + + /** + * Start monitoring call events + * @since S60 3.2 + */ + void StartMonitoring(); + + /** + * State of call. + * @return ETel state + */ + RMobileCall::TMobileCallStatus State(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + + private: + + /** + * C++ constructor for the monitor. + * @param aObserver observer for status changes + * @param aCall actual object of the monitoring + */ + CSPEtelCallStatusMonitor( MCSPCallObserver& aObserver, RMobileCall& aCall ); + + private: // data + /** + * Observer for state changes. + */ + MCSPCallObserver& iObserver; + + /** + * ETel call which this monitors + */ + RMobileCall& iCall; + + /** + * Pointer for recovering from a situation where CCE releases call + * during observer-call sequence. + */ + TBool* iDestrPtr; + + protected: + /** + * ETel call status + */ + RMobileCall::TMobileCallStatus iCallStatus; + + }; + +#endif // CSPETELCALLSTATUSMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelcallwaitingrequester.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelcallwaitingrequester.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,165 @@ +/* +* Copyright (c) 2007 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: Fetches call waiting status from ETel +* +*/ + + +#ifndef CSPETELCALLWAITINGREQUESTER_H +#define CSPETELCALLWAITINGREQUESTER_H + + +#include +#include +#include +#include + +class RMobilePhone; +class CRetrieveMobilePhoneCWList; + +/** +* Makes asynchronic request to ETel interface according to given request type. +* Provides canceling via CActive::Cancel(). +* +*/ +class CSPEtelCallWaitingRequester + : public CActive + { + + public: + + /** + * Constructs the requester via two phase. + * + * @param aPhone mobile phone reference needed for reading cw setting + * @return requester object + */ + static CSPEtelCallWaitingRequester* NewL( RMobilePhone& aPhone ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelCallWaitingRequester( ); + + /** + * Makes the request. Note that ERequestTypeDial is made with a + * separate MakeDialRequest function. + * + * @since S60 3.2 + * @param aRequest type of request + * @return ETrue if active, EFalse if not + */ + void GetCallWaitingL( const CCCECallParameters& iParams, + TBool& aCallWaitingStatus ); + + + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + + private: + + /** + * Requester can be inactive (from boot to first Cw request), + * requesting value from network + * (with first MT call that gets Queue-request from CCE), + * or monitoring (after first request). + */ + enum ECSPCwRequesterMode { + ECwRequesterInactive, + ECwRequesterGetStarted, + ECwRequesterMonitoring + }; + + private: + + /** + * Constructor. + * @param aPhone mobile phone reference needed for reading cw setting + * + */ + CSPEtelCallWaitingRequester::CSPEtelCallWaitingRequester(RMobilePhone& aPhone); + + /** + * Constructs the requester. + * + * @param aPhone phone reference + */ + void CSPEtelCallWaitingRequester::ConstructL(); + + /** + * Starts monitoring call waiting setting. + */ + void StartMonitoring(); + + /** + * Returns the call waiting status from call waiting status list by linetype. + */ + void GetCallWaitingStatusByLineType( const CCCECallParameters& iParams, + TBool& aCallWaitingStatus ); + + + private: // data + + /** + * List of call waiting settings. + * Own. + */ + CRetrieveMobilePhoneCWList* iList; + + /** + * Making the asynchronous request synchronous. + */ + CActiveSchedulerWait iWait; + + /** + * Phone handle for listening cw status changes. + */ + RMobilePhone& iPhone; + + /** + * Cw status descriptor for reading changed cw status. + */ + TPckgBuf iDesCwStatus; + + /** + * Current mode according to the enumeration. + */ + ECSPCwRequesterMode iMode; + + /** + * Actual call waiting status for primary line: On/Off = True/False. + */ + TBool iPrimaryLineCwStatus; + + /** + * Actual call waiting status for aux line: On/Off = True/False. + */ + TBool iAuxLineCwStatus; + }; + +#endif // CSPETELCALLWAITINGREQUESTER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelconferencecallrequester.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelconferencecallrequester.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,143 @@ +/* +* Copyright (c) 2007 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: Delivers asynchronous requests to ETel +* +*/ + + +#ifndef CSPETELCONFERENCECALLREQUESTER_H +#define CSPETELCONFERENCECALLREQUESTER_H + + +#include +#include +#include + +class CSPCall; +class MCCPCallObserver; +class CSPConferenceCall; + +/** +* Makes asynchronic request to ETel interface according to given request type. +* Provides canceling via CActive::Cancel(). +* +*/ +class CSPEtelConferenceCallRequester + : public CActive + { + + public: + /** + * Supported request types. + */ + enum TConferenceRequestType { + EConferenceRequestTypeAddCall, + EConferenceRequestTypeHangup, + EConferenceRequestTypeHold, + EConferenceRequestTypeResume, + EConferenceRequestTypeCreateConference, + EConferenceRequestTypeSwap + }; + + /** + * Constructs the requester via two phase. + * + * @param aOwner the owner for the requester + * @param aCall ETel RMobileCall reference that is the object + * of the request. + */ + static CSPEtelConferenceCallRequester* NewL( + CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelConferenceCallRequester( ); + + /** + * Makes the request. Note that ERequestTypeDial is made with a + * separate MakeDialRequest function. + * + * @since S60 3.2 + * @param aRequest type of request + * @return KErrNone if request was sent successfully. + * KErrNotSupported if the given request is not supported + * KErrArgument if the specified request is not known. + * KErrUnknown if unspecified error (should not happen) + */ + TInt MakeRequest( TConferenceRequestType aRequest ); + + + /** + * Makes a dial request. + * @since S60 3.2 + * @param aCallName call name to be added + * @return KErrNone if successful, else error code + */ + TInt MakeAddCallRequest( const TName& aCallName ); + + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + + private: + + /** + * Constructs the requester. + * + * @param aOwner the owner for the requester + * @param aCall ETel RMobileCall reference that is the object + * of the request. + */ + CSPEtelConferenceCallRequester( CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ); + + /** + * Constructing in the second phase. + */ + void ConstructL(); + + private: // data + /** + * Call object which owns this monitor + */ + CSPConferenceCall& iOwner; + + /** + * ETel call which this monitors + */ + RMobileConferenceCall& iCall; + + /** + * Type of request. + */ + TConferenceRequestType iRequestType; + + }; + +#endif // CSPETELCONFERENCECALLREQUESTER_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelconferencecapsmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelconferencecapsmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,121 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPEtelConferenceCapsMonitor +* +*/ + + +#ifndef CSPETELCONFERENCECAPSMONITOR_H +#define CSPETELCONFERENCECAPSMONITOR_H + +#include +#include + + +class CSPConferenceCall; + + +/** +* Monitors single ETel RMobileConferenceCall for conference call capss. +* +* This monitor is applied only for listening incoming calls, i.e. +* line capabilites are not monitored. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSPEtelConferenceCapsMonitor: public CActive + { + + public: //Constructors and descructor + + + /** + * Two-phased constructing for the monitor. + * + * @param aOwner the observer for getting notification + * @param aCall the line to monitor + */ + static CSPEtelConferenceCapsMonitor* NewL( + CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelConferenceCapsMonitor( ); + + /** + * Start monitoring call capss + * @since S60 3.2 + */ + void StartMonitoring(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + /** + * C++ default constructor + * @param aOwner the observer for status change (incoming call) + * @param aCall the line associated with the call + */ + CSPEtelConferenceCapsMonitor( CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ); + + /** + * Constructs the monitor in the second phase. + */ + void ConstructL(); + + + private: // data + /** + * Forwards capss. + */ + CSPConferenceCall& iOwner; + + /** + * Conference call that is being observed. + */ + RMobileConferenceCall& iCall; + + /** + * Caps received. + */ + TUint32 iCaps; + + /** + * Pointer for recovering from a situation where CCE releases call + * during observer-call sequence. + */ + TBool* iDestrPtr; + + + }; + +#endif // CSPETELCONFERENCECAPSMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelconferenceeventmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelconferenceeventmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,125 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPEtelConferenceEventMonitor +* +*/ + + +#ifndef CSPETELCONFERENCEEVENTMONITOR_H +#define CSPETELCONFERENCEEVENTMONITOR_H + +#include +#include + + +class CSPCall; +class CSPConferenceCall; + + +/** +* Monitors single ETel RMobileConferenceCall for conference call events. +* +* This monitor is applied only for listening incoming calls, i.e. +* line capabilites are not monitored. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSPEtelConferenceEventMonitor: public CActive + { + + public: //Constructors and descructor + + + /** + * Two-phased constructing for the monitor. + * + * @param aOwner the observer for getting notification + * @param aPhone the line to monitor + */ + static CSPEtelConferenceEventMonitor* NewL( + CSPConferenceCall& aOwner, + RMobileConferenceCall& aPhone ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelConferenceEventMonitor( ); + + /** + * Start monitoring call events + * @since S60 3.2 + */ + void StartMonitoring(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + /** + * C++ default constructor + * @param aOwner the observer for status change (incoming call) + * @param aPhone the line associated with the call + */ + CSPEtelConferenceEventMonitor( CSPConferenceCall& aOwner, + RMobileConferenceCall& aPhone ); + + /** + * Constructs the monitor in the second phase. + */ + void ConstructL(); + + + private: // data + /** + * Forwards events. + */ + CSPConferenceCall& iOwner; + + /** + * Phone that is being observed for incoming call. + */ + RMobileConferenceCall& iCall; + + /** + * Event received. + */ + RMobileConferenceCall::TMobileConferenceEvent iEvent; + + /** + * The call name related to the event. + */ + TName iCallName; + + /** + * Pointer for recovering from a situation where CCE releases call + * during observer-call sequence. + */ + TBool* iDestrPtr; + + }; + +#endif // CSPETELCONFERENCEEVENTMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelconferencestatusmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelconferencestatusmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,118 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declarations for class CSPEtelConferenceStatusMonitor +* +*/ + + +#ifndef CSPETELCONFERENCECALLSTATUSMONITOR_H +#define CSPETELCONFERENCECALLSTATUSMONITOR_H + +#include +#include + + +class MCSPConferenceStatusObserver; + +/** +* Monitors single ETel RMobileConferenceCall for conference call statuss. +* +* This monitor is applied only for listening incoming calls, i.e. +* line capabilites are not monitored. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +NONSHARABLE_CLASS(CSPEtelConferenceStatusMonitor): public CActive + { + + public: //Constructors and descructor + + /** + * Two-phased constructing for the monitor. + * + * @param aObserver the observer for getting notification + * @param aPhone the line to monitor + */ + static CSPEtelConferenceStatusMonitor* NewL( + MCSPConferenceStatusObserver& aObserver, + RMobileConferenceCall& aPhone ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelConferenceStatusMonitor( ); + + /** + * Start monitoring call statuss + * @since S60 3.2 + */ + void StartMonitoring(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + + /** + * C++ default constructor + * @param aObserver the observer for status change (incoming call) + * @param aPhone the line associated with the call + */ + CSPEtelConferenceStatusMonitor( MCSPConferenceStatusObserver& aObserver, + RMobileConferenceCall& aPhone ); + + /** + * Constructs the monitor in the second phase. + */ + void ConstructL(); + + + private: // data + /** + * Owner. + */ + MCSPConferenceStatusObserver& iOwner; + + /** + * Phone that is being observed for incoming call. + */ + RMobileConferenceCall& iCall; + + /** + * Status received. + */ + RMobileConferenceCall::TMobileConferenceStatus iConferenceStatus; + + /** + * Pointer for recovering from a situation where CCE releases call + * during observer-call sequence. + */ + TBool* iDestrPtr; + + }; + +#endif // CSPETELCONFERENCECALLSTATUSMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspeteldtmfmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspeteldtmfmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,110 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPEtelDtmfMonitor +* +*/ + + +#ifndef CSPETELDTMFMONITOR_H +#define CSPETELDTMFMONITOR_H + +#include +#include +#include + + +class CSPCall; +class CSPDTMFProvider; + + + +/** +* Monitors ETel for DTMF events. +* +* This monitor is applied only for listening incoming calls, i.e. +* line capabilites are not monitored. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSPEtelDtmfMonitor: public CActive + { + + public: //Constructors and descructor + + + /** + * Two-phased constructing for the monitor. + * + * @param aObserver the observer for getting notification + * @param aMmCustom Custom API handle + */ + static CSPEtelDtmfMonitor* NewL( + CSPDTMFProvider& aObserver, + RMmCustomAPI& aMmCustom ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelDtmfMonitor( ); + + /** + * Start monitoring call events + * @since S60 3.2 + */ + void StartMonitoring(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + /** + * C++ default constructor + * @param aObserver the observer for status change (incoming call) + * @param aMmCustom Custom API handle + */ + CSPEtelDtmfMonitor( CSPDTMFProvider& aObserver, + RMmCustomAPI& aMmCustom ); + + private: // data + /** + * Forwards events. + */ + CSPDTMFProvider& iObserver; + + /** + * Event data. Updated when event occurs. + */ + RMmCustomAPI::TDtmfInfo iEventData; + + /** + * Custom API reference. + */ + RMmCustomAPI& iMmCustom; + + }; + +#endif // CSPETELDTMFMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspeteldtmfstopmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspeteldtmfstopmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,109 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPEtelDtmfStopMonitor +* +*/ + + +#ifndef CSPETELDTMFSTOPMONITOR_H +#define CSPETELDTMFSTOPMONITOR_H + +#include +#include + + +class CSPCall; +class CSPDTMFProvider; + + +/** +* Monitors single ETel RMobilePhone for DTMF events. +* +* This monitor is applied only for listening incoming calls, i.e. +* line capabilites are not monitored. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSPEtelDtmfStopMonitor: public CActive + { + + public: //Constructors and descructor + + + /** + * Two-phased constructing for the monitor. + * + * @param aObserver the observer for getting notification + * @param aPhone the line to monitor + */ + static CSPEtelDtmfStopMonitor* NewL( + CSPDTMFProvider& aObserver, + RMobilePhone& aPhone ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelDtmfStopMonitor( ); + + /** + * Start monitoring call events + * @since S60 3.2 + */ + void StartMonitoring(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + /** + * C++ default constructor + * @param aObserver the observer for status change (incoming call) + * @param aPhone the line associated with the call + */ + CSPEtelDtmfStopMonitor( CSPDTMFProvider& aObserver, + RMobilePhone& aPhone ); + + + private: // data + /** + * Forwards events. + */ + CSPDTMFProvider& iObserver; + + /** + * Phone that is being observed for incoming call. + */ + RMobilePhone& iPhone; + + /** + * Event received. + */ + RMobilePhone::TMobilePhoneDTMFEvent iEventData; + + }; + +#endif // CSPETELDTMFSTOPMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelincomingcallmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelincomingcallmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,118 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPEtelIncomingCallMonitor +* +*/ + + +#ifndef CSPETELINCOMINGCALLMONITOR_H +#define CSPETELINCOMINGCALLMONITOR_H + +#include +#include + +#include "mcspincomingcallobserver.h" +#include "rcsplinecontainer.h" + +class CSPCall; +class MCCPCallObserver; + + + +/** +* Monitors single ETel RMobileLine for incoming calls. +* +* This monitor is applied only for listening incoming calls, i.e. +* line capabilites are not monitored. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSPEtelIncomingCallMonitor: public CActive + { + + public: //Constructors and descructor + + /** + * Two-phased constructing for the monitor. + * + * @param aObserver the observer for getting notification + * @param aLine the line to monitor + * @param aLineId line identifier + */ + static CSPEtelIncomingCallMonitor* NewL( + MCSPIncomingCallObserver& aObserver, + RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelIncomingCallMonitor( ); + + /** + * Start monitoring call events + * @since S60 3.2 + */ + void StartMonitoring(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + /** + * C++ default constructor + * @param aObserver the observer for status change (incoming call) + * @param aLine the line associated with the call + * @param aLineId line identifier + */ + CSPEtelIncomingCallMonitor( MCSPIncomingCallObserver& aObserver, + RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId ); + + private: // data + /** + * Forwards the incoming call information. + */ + MCSPIncomingCallObserver& iIncomingCallObserver; + + /** + * Incoming call name received from ETel. + */ + TName iCallName; + + /** + * Line that is being observed for incoming call. + */ + RMobileLine& iLine; + + /** + * Line identifier / type. + */ + RCSPLineContainer::TCSPLineId iLineId; + }; + +#endif // CSPETELINCOMINGCALLMONITOR_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetellinestatusmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetellinestatusmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,115 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declarations for class CSPEtelLineStatusMonitor +* +*/ + + +#ifndef CSPETELLINESTATUSMONITOR_H_ +#define CSPETELLINESTATUSMONITOR_H_ + +#include +#include +#include "rcsplinecontainer.h" + +class MCSPLineStatusObserver; + +/** +* Monitors single ETel RMobileLine for calls. +* +* This monitor is applied only for listening line status changes +* +* @lib csplugin.dll +* @since S60 5.0 +*/ +NONSHARABLE_CLASS(CSPEtelLineStatusMonitor): public CActive + { + + public: //Constructors and descructor + + /** + * Two-phased constructing for the monitor. + * + * @param aObserver the observer for getting notification + * @param aLine the line to monitor + * @param aLineId line identifier + */ + static CSPEtelLineStatusMonitor* NewL( + MCSPLineStatusObserver& aObserver, + RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelLineStatusMonitor( ); + + /** + * Start monitoring call events + * @since S60 5.0 + */ + void StartMonitoring(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 5.0 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 5.0 + */ + void DoCancel(); + + private: + + /** + * C++ default constructor + * @param aObserver the observer for status change + * @param aLine the line associated with the call + * @param aLineId line identifier + */ + CSPEtelLineStatusMonitor( MCSPLineStatusObserver& aObserver, + RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId ); + + private: // data + + /** + * Line status from ETel. + */ + RMobileCall::TMobileCallStatus iLineStatus; + + /** + * Line that is being observed for status changes. + */ + RMobileLine& iLine; + + /** + * Line identifier / type. + */ + RCSPLineContainer::TCSPLineId iLineId; + + /** + * Line status notifications observer. + */ + MCSPLineStatusObserver& iObserver; + + }; + +#endif /*CSPETELLINESTATUSMONITOR_H_*/ diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspetelvideocallcapsmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspetelvideocallcapsmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2007 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: Declarations for class CSPEtelCallCapsMonitor +* +*/ + + +#ifndef CSPETELDATACALLCAPSMONITOR_H +#define CSPETELDATACALLCAPSMONITOR_H + +#include +#include + + +class CSPVideoCall; + + +/** +* Monitors single ETel RMobileCall for call capss. +* +* This monitor is applied only for listening incoming calls, i.e. +* line capabilites are not monitored. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSPEtelVideoCallCapsMonitor: public CActive + { + + public: //Constructors and descructor + + + /** + * Two-phased constructing for the monitor. + * + * @param aOwner the observer for getting notification + * @param aCall the line to monitor + */ + static CSPEtelVideoCallCapsMonitor* NewL( + CSPVideoCall& aOwner, + RMobileCall& aCall ); + + /** + * C++ default destructor + */ + virtual ~CSPEtelVideoCallCapsMonitor( ); + + /** + * Start monitoring call capss + * @since S60 3.2 + */ + void StartMonitoring(); + + /** + * Getter for fetching mobile data call caps. + */ + TInt GetMobileDataCallCaps( TDes8& aCaps ) const; + + /** + * Gets protocol caps. + * @return protocol caps + */ + TUint GetProtocolCaps(); + + /** + * Updates protocol caps for call + * @since S60 5.0 + */ + void UpdateProtocolCaps(); + + protected: // From CActive + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + /** + * C++ default constructor + * @param aOwner the observer for status change (incoming call) + * @param aCall the line associated with the call + */ + CSPEtelVideoCallCapsMonitor( CSPVideoCall& aOwner, + RMobileCall& aCall ); + + /** + * Constructs the monitor in the second phase. + */ + void ConstructL(); + + + private: // data + /** + * Forwards capss. + */ + CSPVideoCall& iOwner; + + /** + * Call that is being observed. + */ + RMobileCall& iCall; + + /** + * Call capabilities. + */ + RMobileCall::TMobileCallDataCapsV1 iDataCallCaps; + RMobileCall::TMobileCallDataCapsV1Pckg iDataCallCapsPckg; + + }; + +#endif // CSPETELDATACALLCAPSMONITOR_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspforwardprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspforwardprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,127 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header of CSPForwardProvider which provides methods and +* functionality to handle call forwarding +* +*/ + + +#ifndef CSPFORWARDPROVIDER_H +#define CSPFORWARDPROVIDER_H + +#include +#include +#include + +/** +* Call forward methods. +* MCCPCallObserver is used for errors, statuses, notifications etc +* +* @since S60 3.2 +*/ +class CSPForwardProvider : public CBase, + public MCCPForwardProvider + { + + public: + /** + * Two phased constructing of the forward provider instance. + * @return the Forward provider instance + */ + static CSPForwardProvider* NewL(); + + /** + * Destructs the forward provider. + * @since S60 3.2 + */ + virtual ~CSPForwardProvider(); + + /** + * Updates the call event for observers. + * @param aEvent the event to be notified + */ + void NotifyForwardEventOccurred( + MCCPForwardObserver::TCCPForwardEvent aEvent ); + +// from base class MCCPForwardProvider + + /** + * Returns pointer to array containing addresses to forward the call to. + * Index zero contains the first address. If there are no addresses available + * returns an empty array. + * @return Reference to array containing addresses + * @leave KErrNotReady call is not in forwarding state + * @leave KErrNotSupported if call is not mobile originated + * @leave system error code + * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO + * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received + */ + virtual const CDesC8Array& GetForwardAddressChoicesL(); + + /** + * Forward call to address at given index. + * @param aIndex Index of address where the call is to be forwarded. Address is + * found in the array received from GetForwardAddressChoicesL. Index starts from zero. + * @leave KErrArgument Index is not in array + * @leave KErrNotReady Call is not in forwarding state + * @leave KErrNotSupported If call is not mobile originated + * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO + * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received + */ + virtual void ForwardToAddressL( const TInt aIndex ); + + /** + * Add an observer for forward related events. + * Currently CCE will set only one observer. + * @since S60 v3.2 + * @param aObserver Observer + * @leave system error if observer adding fails + */ + virtual void AddObserverL( const MCCPForwardObserver& aObserver ); + + /** + * Remove an observer. + * @since S60 v3.2 + * @param aObserver Observer + * @return KErrNone if removed succesfully. + * @return KErrNotFound if observer was not found. + */ + virtual TInt RemoveObserver( const MCCPForwardObserver& aObserver ); + + private: + + /** + * Constructs the provider + * + */ + CSPForwardProvider( ); + + /** + * Constructing 2nd phase. + */ + void ConstructL(); + + private: // data + + /** + * DTMF event observer. + */ + RPointerArray iObservers; + + CDesC8Array* iEmptyArray; + + +}; + +#endif CSPFORWARDPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/csplogger.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/csplogger.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,220 @@ +/* +* Copyright (c) 2006 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: Provides macros for logging +* +*/ + + + +#ifndef __CSPLOGGER_H__ +#define __CSPLOGGER_H__ + +// INCLUDES +#include + +/* +----------------------------------------------------------------------------- + + USER LOG SELECTION + +----------------------------------------------------------------------------- +*/ + +inline TUint CSPLOGMASK() + { + return 0x8fffffff; // This is default mask value. + } // User can change mask value to get different king of logging. + +#ifndef _DEBUG + +/*************************** +* Logging method variants: +* 0 = No logging +* 1 = Flogger +* 2 = RDebug +***************************/ + +#define CSP_LOGGING_METHOD 0 // UREL BUILD + +#else + +#ifdef __WINS__ +#define CSP_LOGGING_METHOD 2 // UDEB BUILD, WINS +#else +#define CSP_LOGGING_METHOD 2 // UDEB BUILD, HW +#endif // __WINS__ + +#endif // _DEBUG + + +// Next is for backward compatibility +#if CSP_LOGGING_METHOD > 0 +#define CSP_LOGGING_ENABLED +#define TF_LOGGING_ENABLED +#endif + + +/* +----------------------------------------------------------------------------- + + LOGGING OPTIONS + +----------------------------------------------------------------------------- +*/ + +#define CSPOBJECT 0x00000001 // Construction and destruction + +#define CSPERROR 0x00000002 // Error that can be handled. Describe reason for error situation. +#define CSPPANIC 0x00000004 // Critical error: Panic. + + +#define CSPREQIN 0x00000040 // Public interface methods +#define CSPREQOUT 0x00000080 // Set outgoing request +#define CSPREQEND 0x00000100 // Complete request + +#define CSPINT 0x00000200 // Internal activity + +#define CSPMSTATE 0x00000400 // Component state changes + +#define CSPGENERAL 0x00000800 // For deprecated TFLOGxxx-macros and for temporary usage + + +/* +----------------------------------------------------------------------------- + + LOG SETTINGS + +----------------------------------------------------------------------------- +*/ + +#if CSP_LOGGING_METHOD == 1 // Flogger + +#include +_LIT(KTfLogFolder,"CSP"); +_LIT(KTfLogFile,"CSPLOG.TXT"); + +#elif CSP_LOGGING_METHOD == 2 // RDebug + +#include + +#endif + + +/* +----------------------------------------------------------------------------- + + LOGGING MACROs + + USE THESE MACROS IN YOUR CODE ! + +----------------------------------------------------------------------------- +*/ +#define MESSAGE(A) _L(A) + +#if CSP_LOGGING_METHOD == 1 // Flogger + +#define CSPLOGTEXT(Type,AAA) { \ + if((CSPLOGMASK()&(Type))==(Type)) \ + { \ + RFileLogger::Write(KTfLogFolder(),KTfLogFile(), \ + EFileLoggingModeAppend, AAA); \ + } \ + } +#define CSPLOGSTRING(Type,AAA) { \ + if((CSPLOGMASK()&(Type))==(Type)) \ + { \ + _LIT(tempLogDes,AAA); \ + RFileLogger::Write(KTfLogFolder(),KTfLogFile(), \ + EFileLoggingModeAppend,tempLogDes()); \ + } \ + } +#define CSPLOGSTRING2(Type,AAA,BBB) { \ + if((CSPLOGMASK()&(Type))==(Type)) \ + { \ + _LIT(tempLogDes,AAA); \ + RFileLogger::WriteFormat(KTfLogFolder(),KTfLogFile(), \ + EFileLoggingModeAppend, \ + TRefByValue(tempLogDes()),BBB); \ + } \ + } +#define CSPLOGSTRING3(Type,AAA,BBB,CCC) { \ + if((CSPLOGMASK()&(Type))==(Type)) \ + { \ + _LIT(tempLogDes,AAA); \ + RFileLogger::WriteFormat(KTfLogFolder(),KTfLogFile(), \ + EFileLoggingModeAppend, \ + TRefByValue(tempLogDes()),BBB,CCC); \ + } \ + } +#define CSPLOGSTRING4(Type,AAA,BBB,CCC,DDD) { \ + if((CSPLOGMASK()&(Type))==(Type)) \ + { \ + _LIT(tempLogDes,AAA); \ + RFileLogger::WriteFormat(KTfLogFolder(), \ + KTfLogFile(),EFileLoggingModeAppend, \ + TRefByValue(tempLogDes()), \ + BBB,CCC,DDD); \ + } \ + } + +#elif CSP_LOGGING_METHOD == 2 // RDebug + +#define CSPLOGTEXT(Type,AAA) { \ + if((CSPLOGMASK()&(Type))==(Type)) RDebug::Print(AAA); \ + } +#define CSPLOGSTRING(Type,AAA) { \ + if((CSPLOGMASK()&(Type))== \ + (Type)) RDebug::Print(_L(AAA)); \ + } +#define CSPLOGSTRING2(Type,AAA,BBB) { \ + if((CSPLOGMASK()&(Type))== \ + (Type)) RDebug::Print(_L(AAA),BBB); \ + } +#define CSPLOGSTRING3(Type,AAA,BBB,CCC) { \ + if((CSPLOGMASK()&(Type))== \ + (Type)) RDebug::Print(_L(AAA),BBB,CCC); \ + } +#define CSPLOGSTRING4(Type,AAA,BBB,CCC,DDD) { \ + if((CSPLOGMASK()&(Type))== \ + (Type)) RDebug::Print(_L(AAA),BBB,CCC,DDD); \ + } + +#else // CSP_LOGGING_METHOD == 0 or invalid + +#define CSPLOGTEXT(Type,AAA) // Example: TFLOGTEXT(CSPMESOUT, own_desc) +#define CSPLOGSTRING(Type,AAA) // Example: TFLOGSTRING(CSPMESIN, "Test") +#define CSPLOGSTRING2(Type,AAA,BBB) // Example: TFLOGSTRING(CSPMESINT, "Test %i", aValue) +#define CSPLOGSTRING3(Type,AAA,BBB,CCC) // Example: TFLOGSTRING(CSPMESOUT, "Test %i %i", aValue1, aValue2) +#define CSPLOGSTRING4(Type,AAA,BBB,CCC,DDD) // Example: TFLOGSTRING(CSPMESOUT, "Test %i %i %i", aValue1, aValue2, aValue3) + +#endif // CSP_LOGGING_METHOD + + +/* +----------------------------------------------------------------------------- + + DEPRECATED LOGGING MACROs + + DON'T USE THESE MACROS IN YOUR CODE ANYMORE! + +----------------------------------------------------------------------------- +*/ + +#define TFLOGTEXT(AAA) CSPLOGTEXT(CSPGENERAL,AAA); +#define TFLOGSTRING(AAA) CSPLOGSTRING(CSPGENERAL,AAA); +#define TFLOGSTRING2(AAA,BBB) CSPLOGSTRING2(CSPGENERAL,AAA,BBB); +#define TFLOGSTRING3(AAA,BBB,CCC) CSPLOGSTRING3(CSPGENERAL,AAA,BBB,CCC); +#define TFLOGSTRING4(AAA,BBB,CCC,DDD) CSPLOGSTRING4(CSPGENERAL,AAA,BBB,CCC,DDD); + +#endif // CSPLOGGER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspmicrophone.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspmicrophone.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,99 @@ +/* +* Copyright (c) 2006 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: Mic stream to DevSound. +* +*/ + + +#ifndef CSPMICROPHONE_H +#define CSPMICROPHONE_H + +#include "cspdevsound.h" + +/** + * Provides mic functionality. + * + */ +NONSHARABLE_CLASS( CSPMicrophone ): public CSPDevSound + { + +public: + + static CSPMicrophone* NewL( MCSPDevSoundObserver& aObserver ); + + virtual ~CSPMicrophone(); + + /** + * Determines mic mute state. + * + * + * @return ETrue - mic is muted, EFalse - mic is not muted. + */ + TBool IsMuted(); + + /** + * Set mic muted. + * + * + */ + void SetMuted(); + + /** + * Set mic unmuted. + * + * + */ + void SetUnmuted(); + +// from base class MDevSoundObserver + + /** + * From MDevSoundObserver + * Notification from Devsound that stream (mic) is + * activated successfully. + * + * + */ + void BufferToBeEmptied( CMMFBuffer* aBuffer ); + + /** + * From MDevSoundObserver + * Notification from devsound that downstream(mic) activation + * feiled. + * + * + */ + void RecordError( TInt aError ); + +private: + +// from base class MCSPDevSound + + /** + * From MCSPDevSound. + * Tries to activate the mic stream. + * + * + */ + void DoActivateL(); + +protected: + + CSPMicrophone( MCSPDevSoundObserver& aObserver ); + + void ConstructL(); + + }; + +#endif // CSPMICROPHONE_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/csppanic.pan --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/csppanic.pan Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2002-2004 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: This file contains panic enumerations +* +*/ + + +#ifndef CSPPANIC_PAN +#define CSPPANIC_PAN + +// INCLUDES +#include +#include + +// CONSTANTS + +// CSPlugin panic text +_LIT( KCSPPanic, "CSPlugin Panic!" ); + + enum TCSPPanic + { + ECSPPanicAccessingDataOnIncompleteRequest = 1, + ECSPPanicAllSettingsDataObjectsAlreadyInUse = 2, + ECSPPanicBadHandle = 3, + ECSPPanicCallDataNull = 4, + ECSPPanicCallIndexOutOfRange = 5, + ECSPPanicConferenceIndexOutOfRange = 6, + ECSPPanicDebugDangerousMove = 7, + ECSPPanicIllegalCommand = 8, + ECSPPanicIndexOutOfRange = 9, + ECSPPanicInvalidCommand = 10, + ECSPPanicInvalidHandle = 11, + ECSPPanicInvalidMode = 12, + ECSPPanicInvalidRequest = 13, + ECSPPanicInvalidRequestId = 14, + ECSPPanicInvalidState = 15, + ECSPPanicLineNotFound = 16, + ECSPPanicNoCallInState = 17, + ECSPPanicNoCallOrLine = 18, + ECSPPanicNoConferenceCall = 19, + ECSPPanicNoErrorCodeInSuccessfulRequest = 20, + ECSPPanicNoEtel = 21, + ECSPPanicNoFreeCalls = 22, + ECSPPanicNoObserver = 23, + ECSPPanicNoPhoneServer = 24, + ECSPPanicNoRepository = 25, + ECSPPanicNotCompleted = 26, + ECSPPanicNullPointer = 27, + ECSPPanicObserverAlreadySet = 28, + ECSPPanicRepositoryAlreadyActive = 29, + ECSPPanicPropertyAlreadyActive = 30, + ECSPPanicSplitWithoutConference = 31, + ECSPPanicUIHasBeenLeaved = 32, + ECSPPanicVideoLibraryNotFound = 33, + ECSPPanicInvalidIncomingCallMonitor = 34, + ECSPPanicInvalidCallAddedMonitor = 35, + ECSPPanicInvalidCallEventMonitor = 36, + ECSPPanicExternalDataIdOutOfRange = 37, + ECSPPanicCallIsAlreadyAddedToConference = 38, + ECSPPanicInvalidParameter = 39, + ECSPPanicDataConnectionInitError = 40, + ECSPPanicTimerAlreadyActive = 41, + + ECSPPanicMaximum = 100 + }; + +// MACROS +// None. + +// DATA TYPES +// None. + +// FUNCTION PROTOTYPES +// None. + +// FORWARD DECLARATIONS +// None. + +// CLASS DECLARATION +// None. + +GLREF_C void Panic( TCSPPanic aPanic ); + +#endif diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/csppubsublistener.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/csppubsublistener.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,130 @@ +/* +* Copyright (c) 2007 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: Declarations for class CCSPPubSubListener +* +*/ + + +#ifndef CSPPUBSUBLISTENER_H +#define CSPPUBSUBLISTENER_H + +// INCLUDES +#include +#include +#include + +// FORWARD DECLARATIONS +class MCSPPubSubObserver; + +// CLASS DECLARATION + +/** +* RProperty poller. +* +* @lib videoteleng.lib +* @since Series 60 2.8 +*/ +NONSHARABLE_CLASS( CSPPubSubListener ) : public CActive + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aUid the Uid to use + * @param aKey item's key + * @param aObserver callback interface for notification + * @return instance of CSPPubSubListener + */ + static CSPPubSubListener* NewL( const TUid aUid, const TInt aKey, + MCSPPubSubObserver* aObserver ); + + /** + * Destructor. + */ + virtual ~CSPPubSubListener(); + + public: // New functions. + + /** + * Gets integer value from P & S. + * @param aVal a value in return + * @return error code + */ + TInt Get( TInt& aVal ); + + /** + * Gets 8 bit string value from P&S. + * @param aVal a value in return + * @return error code + */ + TInt Get( TDes8& aVal ); + + /** + * Gets 16 bit descriptor value from P&S. + * @param aVal a value in return + * @return error code + */ + TInt Get( TDes16& aVal ); + + private: // New functions. + + /** + * Starts the listening (RunL). + */ + void StartListening(); + + private: // From CActive. + + /** @see CActive::RunL */ + virtual void RunL(); + + /** @see CActive::Cancel */ + virtual void DoCancel(); + + /** @see CActive::RunError */ + virtual TInt RunError( TInt aError ); + + private: + + /** + * Constructor of the listener. + * @param aUid the Uid to use + * @param aKey item's key + * @param aObserver callback interface for notification + */ + CSPPubSubListener( const TUid aUid, TInt aKey, + MCSPPubSubObserver* aObserver ); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + private: // Data + + /** UID of the monitored item. */ + TUid iUid; + + /** ID of the monitored item. */ + TInt iId; + + /** Property to subscribe to. */ + RProperty iProperty; + + /** Observer for PS notifications. */ + MCSPPubSubObserver* iObserver; + }; + +#endif // CVTENGPUBSUBSGSETTINGS_H +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspremotealertingtonelistener.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspremotealertingtonelistener.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Listens remote alerting tone status changes +* +*/ + + +#ifndef CSPREMOTEALERTINGTONELISTENER_H +#define CSPREMOTEALERTINGTONELISTENER_H + +#include +#include + +class MCSPRemoteAlertingToneObserver; + +/** + * Listens remote alerting tone changes. + * + * @lib CSPlugin.lib + * @since S60 v5.0 + */ +NONSHARABLE_CLASS( CSPRemoteAlertingToneListener ) : public CActive + { +public: + + /** + * Two-phased constructor. + * @param aCustomAPI Connected custom API instance. + * @param aObserver Observer of the remote alerting tone chnages. + */ + static CSPRemoteAlertingToneListener* NewL( + RMmCustomAPI& aCustomAPI, + MCSPRemoteAlertingToneObserver& aObserver ); + + + /** + * Destructor. + */ + virtual ~CSPRemoteAlertingToneListener(); + + /** + * Starts listening remote alerting tone changes. Observer is notified + * when change occurs. Listening stops when Cancel is called or listening + * instance is deleted. + * + * @since S60 v5.0 + */ + void StartListening(); + +protected: + +// from base class CActive + + void DoCancel(); + + void RunL(); + +private: + + CSPRemoteAlertingToneListener( + RMmCustomAPI& aCustomAPI, + MCSPRemoteAlertingToneObserver& aObserver ); + +private: // data + + /** + * For listening changes in remote alerting tone status. + * Not own. + */ + RMmCustomAPI& iCustomAPI; + + /** + * Status of the remote alerting tone. + */ + RMmCustomAPI::TRemoteAlertingToneStatus iRATStatus; + + /** + * Change observer. + */ + MCSPRemoteAlertingToneObserver& iObserver; + + }; + +#endif // CSPREMOTEALERTINGTONELISTENER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/csprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/csprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,601 @@ +/* +* Copyright (c) 2007-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 class for CS Call Plug-in +* +*/ + + + +#ifndef CSPROVIDER_H +#define CSPROVIDER_H + +#include +#include +#include +#include +#include +#include + +#include "mcspincomingcallobserver.h" +#include "mcspsecuritysettingobserver.h" +#include "mcspcommoninfo.h" +#include "mcsppubsubobserver.h" +#include "mcspremotealertingtoneobserver.h" +#include "mcspconferencestatusobserver.h" + + +// FORWARD DECLARATIONS +class CSPEtelIncomingCallMonitor; +class CSPDTMFProvider; +class CSPServiceSettingsHandler; +class CSPEtelCallAddedMonitor; +class CSPConferenceCall; +class CSPCallArray; +class CSPAudioHandler; +class CSPEtelCallWaitingRequester; +class CSPSupplementaryServicesMonitor; +class MCCPSsObserver; +class CSPCipheringStatusMonitor; +class CSPSsSettingsHandler; +class CSPCallAddedHandler; +class CSPPubSubListener; +class CSPCallCommandHandler; +class CSPRemoteAlertingToneListener; +class CSPEtelConferenceStatusMonitor; + +/** +* Main class for using CS Call Plug-in. Implements the CCP API. +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSProvider : public CConvergedCallProvider, + public MCSPIncomingCallObserver, + public MCSPCommonInfo, + public MCSPSecuritySettingObserver, + public MCSPPubSubObserver, + public MCSPRemoteAlertingToneObserver, + public MCSPConferenceStatusObserver +{ + public: + + /** + * Two-phased constructor. + * @return new instance of the class + */ + static CSProvider* NewL(); + + /** + * C++ default destructor + */ + virtual ~CSProvider(); + + /** + * Notification of SS event. + * @param aSsTypeAndMode SS type and SS mode + * @param aSsInfo SS info + */ + void NotifySsEvent( RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode, + RMmCustomAPI::TSsInfo& aSsInfo ); + + +// from base class CConvergedCallProvider + + /** + * Initializes plug-in. All required parameters must be passed + * with this function in order to use services. + * Simplifies pluging construct removing need to pass parameters + * to ECom interface + * @since S60 3.2 + * @param aAppUID Application UID of Telephony application + * @param aObserver general observer + * @param aSsObserver observer for events related to supplementary + * services. + */ + void InitializeL( const MCCPObserver& aObserver, + const MCCPSsObserver& aSsObserver ); + + /** + * Creates a new call and checks secure status from profile. + * @since S60 3.2 + * @param aServiceId service id + * @param aRemoteParty Recipients address/number + * @param aObserver Observer + * @return MCCPMoCall + */ + MCCPCall* NewCallL( const CCCPCallParameters& aCallParameters, + const TDesC& aRemoteParty, + const MCCPCallObserver& aObserver ); + + + /** + * From CConvergedCallProvider + * Releases all bindings to call and deletes it. + * This will be called by CCE to free all the resources reserved for the call. + * After this call CCE will not access the call object anymore and observer + * for the class must not be used in plug-in. + * This operation must always succeed. If plug-in decides to pre-allocate the + * call object it can choose to do so, but plug-in has to make sure call is + * returned to the state it was before calling CConvergedCallProvider::NewCallL. + * @param aCalltoRemove Call to remove. + * @return KErrNone or KErrNotFound if removed call is not found. + * @pre None, can always be called. + * @post Plug-in must quarantee all resources for the call will be cleaned up. + * and plug-in must not call observer after this call! + * @since S60 3.2 + */ + virtual TInt ReleaseCall( MCCPCall& aCalltoRemove ); + + /** + * From CConvergedCallProvider + * Creates a new Emergency call and add user-agent header. + * @since S60 3.2 + * @param aServiceId service id + * @param aAddress address of emergency call + * @param aObserver Observer + * @return MCCPEmergencyCall + */ + MCCPEmergencyCall* NewEmergencyCallL( + const TUint32 aServiceId, + const TDesC& aAddress, + const MCCPCallObserver& aObserver ); + + /** + * From CConvergedCallProvider. + * Releases all bindings to call and deletes it. + * This must be called to free all the resources reserved for the call. + * After this call CCE must not be access the call object anymore and observer + * for the class must not be used in plug-in. + * This operation mustways succeed. If plug-in decides to pre-allocate the + * call object it can choose to do so, but client has to be sure call is + * cleared from the plug-in and all resuorces are returned to the state before calling + * CConvergedCallProvider::NewEmergencyCallL. + * @param aCalltoRemove Call to remove. + * @return KErrNone or KErrNotFound if removed call is not found. + * @pre None, can always be called. + * @post Plug-in must quarantee all resources for the call will be cleaned up. Call must not + * be referenced anymore from CCE and plug-in must not call observer after this call! + * @since S60 3.2 + */ + TInt ReleaseEmergencyCall( MCCPEmergencyCall& aCalltoRemove ); + + /** + * From CConvergedCallProvider + * Creates a new conference call. + * @since S60 3.2 + * @param aServiceId service id + * @param aObserver Observer + * @return MCCPConferenceCall + */ + MCCPConferenceCall* NewConferenceL( const TUint32 aServiceId, + const MCCPConferenceCallObserver& aObserver ); + + /** + * From CConvergedCallProvider + * Releases all bindings to conference call. CCE will call this after receiving + * MCCPConferenceCallObserver::ECCPConferenceIdle from plug-in or when it itself + * wants to release the call. In normal sequence called from CCE after HangUp is completed. + * @param aCalltoRemove Call to remove. + * @return KErrNone or KErrNotFound if removed call is not found. + * @pre None, can always be called. + * @post Plug-in must quarantee all resources for the call will be cleaned up. Call must not + * be referenced anymore from CCE and plug-in must not call observer after this call! + * @since S60 3.2 + */ + TInt ReleaseConferenceCall( MCCPConferenceCall& aCalltoRemove ); + + /** + * Returns Uid of plug-in which is on use. + * @since S60 3.2 + * @return Uid of plug-in + */ + const TUid& Uid() const; + + /** + * Get Plug-In capabilities + * @since S60 3.2 + * @return caps + */ + TUint32 Caps( ) const; + + /** + * Get DTMF provider + * @since S60 3.2 + * @return Pointer to MCCPDTMFProvider if succesfull, + * NULL if not available + */ + MCCPDTMFProvider* DTMFProviderL( const MCCPDTMFObserver& aObserver ); + + /** + * Get extension provider + * @since S60 3.2 + * @return Pointer to MCCPExtensionProvider if succesfull, + * NULL if not available + */ + MCCPExtensionProvider* ExtensionProviderL( + const MCCPExtensionObserver& aObserver ); + + /** + * This method gets the lifetime of the MS. The lifetime information + * includes the manufacturing date of the MS and the total amount of airtime use, + * from the manufacturing date until the call to this method. Calling this method + * does not reset any data. This is used only CS, other plug-ins may ignore this method. + * @since S60 3.2 + * @param aLifeTimeInfo Life time information + * @return none + */ + TBool GetLifeTime( TDes8& aLifeTimeInfo ); + + /** + * This method gets serial number from MS. The CSInfo includes + * the serial number. + * @since S60 5.0 + * @param aCSInfo CS specific information from MS. + * @return Get succeeded or not. + */ + TBool GetCSInfo( CSInfo& aCSInfo ); + +// from base class MCSPIncomingCallObserver + + /** + * From MCSPIncomingCallObserver. + * Informs incoming call. + * + * @since S60 3.2 + * @param aLine the line that corresponds to the call + * @param aCallName the name of call + * @param aLineId line identifier for the call + */ + void IncomingCallArrived( RMobileLine& aLine, TName aCallName, + RCSPLineContainer::TCSPLineId aLineId ); + +// from base class MCSPCommonInfo + + /** + * From MCSPCommonInfo + * Makes the request. Note that ERequestTypeDial is made with a + * separate MakeDialRequest function. + * + * @since S60 3.2 + * @param aRequest type of request + * @return ETrue if active, EFalse if not + */ + void GetCallWaitingL( const CCCECallParameters& iParams, + TBool& aCallWaitingStatus ); + + /** + * From MCSPCommonInfo + * Diagnostic error fetching. + * @param aCallName name of call related to error + * @return diagnostic error code + */ + TInt GetDiagnosticError( TName& aCallName ); + + /** + * From MCSPCommonInfo + * + * Network security status + * + * @since Series60_4.0 + * @return true if security enabled + */ + TBool NetworkSecurityStatus() const; + + /** + * From MCSPCommonInfo + * Secure specified status. + * @since Series60_5.0 + * @return true if secure specified + */ + TBool SecureSpecified() const; + + /** + * From MCSPCommonInfo + * Remote alerting tone status. + * @return tone status for remote alerting tone playing + */ + RMmCustomAPI::TRemoteAlertingToneStatus GetRemoteAlertingToneStatus(); + + /** + * From MCSPCommonInfo + * Initializes with current settings. + * @param aParams call params + */ + void InitializeCallParameters( RMobileCall::TMobileCallParamsV7& aParams ); + + /** + * From MCSPCommonInfo + * Initializes with current data call settings. + * @param aParams call params + */ + void InitializeDataCallParameters( RMobileCall::TMobileHscsdCallParamsV1& aParams ); + + /** + * From MCPSCommonInfo + * @param aCall client call to be indicated + */ + void IndicateClientCall( MCCPCSCall* aCall ); + + /** + * Indicates incoming call for CCE. + * @param aCall incoming call + */ + TInt IndicateIncomingCall( MCCPCSCall* aCall ); + + /** + * Notify data port name about a loaned data port. + * @param aDataPortName port name + */ + void NotifyDataPortName( TName& aDataPortName ); + + /** + * Indicates active hangup command. + * @param aCall MT call + * @return system wide error code + */ + TInt IndicateActiveHangup( MCCPCallCommandHandling& aCall ); + + /** + * Indicates hangup command complete. + * @param aCall MT call + * @return system wide error code + */ + TInt IndicateHangupComplete( MCCPCallCommandHandling& aCall ); + + /** + * Indicates active hangup command. + * @param aCall MT call + * @return system wide error code + */ + TInt IndicateDialRequest( MCCPCallCommandHandling& aCall ); + + /** + * Indicates active hangup command. + * @param aCall MT call + * @return system wide error code + */ + TInt IndicateAnswerRequest( MCCPCallCommandHandling& aCall ); + + /** + * Don't report termination error + * @since Series60_5.0 + * @return system wide error code + */ + TInt DontReportTerminationError(); + +// From base class MCSPSecuritySettingObserver + + /** + * From MCSPSecuritySettingObserver + * Notifies about changed security status. + * @param aValue + */ + void SecuritySettingChanged( TInt aValue ); + +// From base class MCSPPubSubObserver + + /** + * Handler for changed event. + * @param aUid uid of setting + * @param aKey id of setting + * @param aStatus status of completed AO operation + */ + void HandleNotifyPSL( const TUid aUid, const TInt& aKey, + const TRequestStatus& aStatus ); + +// From base class MCSPRemoteAlertingToneObserver + + /** + * From MCSPRemoteAlertingToneObserver + * @see MCSPRemoteAlertingToneObserver + */ + void RemoteAlertingToneStatusChanged( + RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus ); + +// From base class MCSPConferenceStatusObserver + + /** + * From MCSPConferenceStatusObserver. + * Notifies event to observers. + * @param aStatus new status of the conference call + */ + void NotifyStateChange( + MCSPConferenceStatusObserver::TCSPConferenceState aStatus ); + + private: + + /** + * C++ default constructor + */ + CSProvider(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + /** + * Creates connections to ETel. + */ + void CreateEtelConnectionsL(); + + /** + * Handles diverting and barring notifications. + * @param aAddr address + * @param aSsTypeAndMode ss type and mode struct + */ + void HandleDivertOrBarring(TDesC& addr, + RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode); + + /** + * Handles SIM status + */ + void HandleSIMStatusL(); + + // data + private: + + /** + * Implementation UID + */ + TUid iImplementationUid; + + /** + * ETel connection + */ + RTelServer iServer; + + /** + * Mobile phone handle. + */ + RMobilePhone iMobilePhone; + + /** + * Mobile conference call handle. + */ + RMobileConferenceCall iMobileConferenceCall; + + /** + * Observer for provider level functionality. + * Not own. + */ + MCCPCSObserver* iCCPObserver; + + /** + * Observer for SS events. + * Not own. + */ + MCCPSsObserver* iSsObserver; + + /** + * DTMF provider. + * Own. + */ + CSPDTMFProvider* iDTMFProvider; + + /** + * Monitors line for incoming calls. + * Own. + */ + CSPEtelIncomingCallMonitor* iIncomingVoiceCallMonitor; + + /** + * Monitors line for incoming data/video calls. + * Own. + */ + CSPEtelIncomingCallMonitor* iIncomingDataCallMonitor; + + /** + * Monitors line for incoming calls from aux line + * Own. + */ + CSPEtelIncomingCallMonitor* iIncomingAuxCallMonitor; + + /** + * Call array. + * Own. + */ + CSPCallArray* iCallArray; + + /** + * Custom API handle for custom functionality. + */ + RMmCustomAPI iMmCustom; + + /** + * Line container. + */ + RCSPLineContainer iLineContainer; + + /** + * Service settings handler for reading + * service id and name information. + * Own. + */ + CSPServiceSettingsHandler* iServiceHandler; + + /** + * Initialisation status. + */ + TBool iInitialized; + + /** + * Call added monitor. + * Own. + */ + CSPCallAddedHandler* iCallAddedHandler; + + /** + * Service ID. + */ + TUint32 iServiceId; + + /** + * Dev sound handler. + * Own. + */ + CSPAudioHandler* iAudioHandler; + + /** + * Call waiting requester. + * Own. + */ + CSPEtelCallWaitingRequester* iCwRequester; + + /** + * Supplementary service related event monitor. + * Own. + */ + CSPSupplementaryServicesMonitor* iSsMonitor; + + /** + * Ciphering (network security level On/Off) setting monitor. + */ + CSPCipheringStatusMonitor* iCipheringStatusMonitor; + + /** + * SS Settings handler for reading ALS line and ALS supported status. + */ + CSPSsSettingsHandler* iSsSettingsHandler; + + /** + * Sim status listener. + * Own. + */ + CSPPubSubListener* iSimStatusListener; + + /** + * CallCommandHandler. + * Own. + */ + CSPCallCommandHandler* iCallCommandHandler; + + /** + * Remote Alerting Tone listener. + */ + CSPRemoteAlertingToneListener* iRemoteAlertingToneListener; + + /** + * Monitor for conference status changes. + * Own. + */ + CSPEtelConferenceStatusMonitor* iConferenceStatusMonitor; + + /** + * Keep track of conference existence. + */ + CSPConferenceCall* iConferenceCall; +}; + +#endif // CSPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspservicesettingshandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspservicesettingshandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,82 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header of CSPServiceSettingsHandler +* +*/ + + +#ifndef CSPSERVICESETTINGSHANDLER_H +#define CSPSERVICESETTINGSHANDLER_H + +#include + +#include "rcsplinecontainer.h" + +/** +* Makes asynchronic request to ETel interface according to given request type. +* Provides canceling via CActive::Cancel(). +* +*/ +class CSPServiceSettingsHandler: public CBase + { + public: + + /** + * Two phased constructing of the DTMF provider instance. + * @return the instance to service settings handler + */ + static CSPServiceSettingsHandler* NewL( ); + + + /** + * C++ default destructor + */ + virtual ~CSPServiceSettingsHandler( ); + + /** + * Find service ID by name. + * @since S60 3.2 + * @param aName the name of service + * @param aServiceId service ID + */ + void FindByNameL( const TDesC& aName, TUint32& aServiceId ); + + /** + * Find CS service ID. + * @param aServiceId the service id as output + * @return error code if read was not succesfull + */ + TInt ReadCSServiceId( TUint32& aServiceId ); + + + + private: + /** + * Constructs the requester. + * + */ + CSPServiceSettingsHandler( ); + + /** + * Constructing the provider in the second phase. + */ + void ConstructL(); + + private: // data + + + + }; + +#endif // CSPSERVICESETTINGSHANDLER \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspspeaker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspspeaker.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,83 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Provides speaker functionality +* +*/ + + +#ifndef CSPSPEAKER_H +#define CSPSPEAKER_H + +#include "cspdevsound.h" + +class MCSPDevSoundObserver; + +/** + * Provides speaker functionality. + * + */ +NONSHARABLE_CLASS( CSPSpeaker ): public CSPDevSound + { + +public: + + static CSPSpeaker* NewL( MCSPDevSoundObserver& aObserver ); + + virtual ~CSPSpeaker(); + + /** + * Sets volume. + * @param aVolume Volume. + */ + void SetVolume( TInt aVolume ); + + /** + * Gets volume. + * @return Current volume. + */ + TInt Volume(); + +// from base class MDevSoundObserver + + /** + * From MDevSoundObserver. + * Indication from devsound that stream (speaker) has been activated + * successfully. + */ + void BufferToBeFilled( CMMFBuffer* /*aBuffer*/ ); + + /** + * From MDevSoundObserver. + * Indication from devsound that activation of stream( speaker) + * failed. + */ + void PlayError( TInt aErrorCode ); + +private: + + /** + * From CSPDevSound. + * Tries to activate the mic stream. + */ + void DoActivateL(); + +protected: + + CSPSpeaker( MCSPDevSoundObserver& aObserver ); + + void ConstructL(); + + }; + +#endif // CSPSPEAKER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspsssettingshandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspsssettingshandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,144 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file contains the header file of the class +* CSPSsSettingsHandler. +* +*/ + + + +#ifndef CSPSSSETTINGSHANDLER_H +#define CSPSSSETTINGSHANDLER_H + +// INCLUDES +#include +#include + + +// FORWARD DECLARATIONS +class MCCPSsObserver; + +// CLASS DECLARATION + +/** +* CSPSsSettingsHandler observer SSSettings changes +* +* @lib phoneenginegsm +* @since Series_60 4.0 +*/ +class CSPSsSettingsHandler : public CBase, + public MSSSettingsObserver + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CSPSsSettingsHandler* NewL( const MCCPSsObserver& aObserver ); + + /** + * Destructor. + */ + virtual ~CSPSsSettingsHandler( ); + + public: // New functions + + /** + * GetALSLineL + * @param aALSLine, Als line information to be updated + */ + void GetALSLineL( RMobilePhone::TMobilePhoneALSLine& aALSLine ); + + /** + * SetALSLineL + * @param aALSLine, Als line information to set + */ + void SetALSLineL( RMobilePhone::TMobilePhoneALSLine& aALSLine ); + + /** + * GetClirL + * @param aClir, Clir information to be updated + */ + void GetClirL( RMobileCall::TMobileCallIdRestriction& aClir ); + + /** + * GetCugL + * @param aCugIndex, CUG index + */ + void GetCugL( TInt& aCugIndex ); + + /** + * GetDefaultCugL + * Get CUG default value. + */ + void GetDefaultCugL(TInt& aDefCug ); + + /** + * IsValueValidCugIndex + * Is CUG index in allowed range. + */ + TBool IsValueValidCugIndex( const TInt& aValue ) const; + + public: // Functions from MSSSettingsObserver + + /* + * Observer functoin + * @param aSetting Current setting + * @param aNewValue New value for the setting + */ + virtual void PhoneSettingChanged( + TSSSettingsSetting aSetting, + TInt aNewValue ); + + private: + + /** + * Constructor. + */ + CSPSsSettingsHandler( const MCCPSsObserver& aObserver ); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + /** + * Call register Als notify after idle callback + */ + void RegisterAfterIdle(); + + /** + * CIdle CallBack method + */ + static TInt CIdleCallBack( TAny* aAny ); + + /** + * Register to notify ALS line changed + */ + void Register(); + + private: // Data + + /** + * MCCPSsObserver is used to send message to the CCE/phone. + */ + MCCPSsObserver& iObserver; + //Pointer to instance of Settings + RSSSettings iSSSettings; + // Idle object to register ALS notify. + CIdle* iRegisterAlsNofify; + + }; + +#endif // CSPSSSETTINGSHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspsupplementaryservicesmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspsupplementaryservicesmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,96 @@ +/* +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file contains the header file of the +* CSPSupplementaryServicesMonitor object. +* +*/ + + +#ifndef CSPSUPPLEMENTARYSERVICESMONITOR_H +#define CSPSUPPLEMENTARYSERVICESMONITOR_H + + +//INCLUDES +#include +#include + + +// FORWARD DECLARATIONS +class CSProvider; + +// CLASS DECLARATION + +/** +* Monitors Supplementary Services +* +* @lib CallHandling.lib +* @since Series60_4.0 +*/ +class CSPSupplementaryServicesMonitor: public CActive + { + public: //Constructors and descructor + + /** + * C++ default constructor. + */ + CSPSupplementaryServicesMonitor( + CSProvider& aOwner, + RMmCustomAPI& aCustomAPI ); + + /** + * Destructor. + */ + virtual ~CSPSupplementaryServicesMonitor(); + + public: //New functions + + /** + * Starts monitoring new calls + * @since Series60_4.0 + * @param None. + * @return None. + */ + void StartMonitoring(); + + protected: // From CActive + + /** + * Cancels asyncronous request(s). + * @since Series60_4.0 + * @param None. + * @return None. + */ + void DoCancel(); + + /** + * Informs object that asyncronous request is ready. + * @since Series60_4.0 + * @param None. + * @return None. + */ + void RunL(); + + private: + + /** Owner of this object */ + CSProvider& iOwner; + /** Subsession to custom api */ + RMmCustomAPI& iCustomAPI; + /** Suplementary Services Type And Mode */ + RMmCustomAPI::TSsTypeAndMode iSsTypeAndMode; + /** Suplementary Services info */ + RMmCustomAPI::TSsInfo iSsInfo; + }; + +#endif // CSPSUPPLEMENTARYSERVICESMONITOR_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/csptimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/csptimer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,98 @@ +/* +* Copyright (c) 2006 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: Timer service +* +*/ + + +#ifndef CSPTIMER_H +#define CSPTIMER_H + +#include + +class MCSPTimerObserver; + +/** + * Timer service. + * + * @lib PhoneEngine.lib + * @since S60 v3.1 + */ +NONSHARABLE_CLASS( CSPTimer ) : protected CTimer + { +public: + + static CSPTimer* NewL(); + + static CSPTimer* NewLC(); + + virtual ~CSPTimer(); + + /** + * Request for notify after aTimeout. + * After timeout has passed observer is called. Panics + * if there is notify already ongoing ie IsNotifyOngoing + * returns ETrue. + * + * + * @param aTimeout Time out in microseconds. + * @param aTimerObserver Observer for notify. + */ + virtual void NotifyAfter( TInt aTimeout, + MCSPTimerObserver& aTimerObserver ); + + /** + * Cancels the outstanding notify request. After + * this call notify is no longer ongoing ie IsNotifyOngoing + * return EFalse. + * + * + */ + virtual void CancelNotify(); + + /** + * Determines if there is notify ongoing. + * + * + * @return ETrue - notify is ongoing, EFalse - notify is not ongoing. + */ + virtual TBool IsNotifyOngoing(); + +protected: + +// from base class CActive + + /** + * From CActive + * Called when timer timeout is up. + * + * + */ + void RunL(); + + CSPTimer(); + + void ConstructL(); + +protected: // data + + /** + * Observer for notify service. + * Not own. + */ + MCSPTimerObserver* iObserver; + + }; + +#endif // CSPTIMER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/csptransferprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/csptransferprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,200 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header of CSPTransferProvider which provides methods and +* functionality to handle call transfering +* +*/ + + +#ifndef CSPTRANSFERPROVIDER_H +#define CSPTRANSFERPROVIDER_H + +#include +#include +#include + +class RMobileCall; +class MCSPCallErrorObserver; +class MCSPCommonInfo; + +/** +* Call transfer methods. +* MCCPCallObserver is used for errors, statuses, notifications etc +* +* @since S60 3.2 +*/ +class CSPTransferProvider : public CActive, + public MCCPTransferProvider + { + + public: + /** + * Two phased constructing of the transfer provider instance. + * @param aCall mobile call handle + * @return the Transfer provider instance + */ + static CSPTransferProvider* NewL( RMobileCall& aCall, + MCSPCallErrorObserver& aErrorObserver, + MCSPCommonInfo& aCommonInfo ); + + /** + * Destructs the transfer provider. + * @since S60 3.2 + */ + virtual ~CSPTransferProvider(); + + public: + + // from base class MCCPTransferProvider + /** + * Attended transfer to given call recipient. + * There exist a call between A-B and A-C. A wants to transfer the call + * to B-C. A itself will not be inline in case the transfer is made + * succesfully.In above case C will be the aTransferTargetCall. B is + * the recipient of the current call between A-B - called on A's call + * object transfer provider. The A-B call is on hold (optional). + * + * @param aTransferTargetCall Target receiver of the transferred call. + * In this case there exist a call. + * @return In case of an immediate error returns system error code, + * if request has been started returns KErrNone. + * Actual request result indication comes via observer class + */ + TInt AttendedTransfer( MCCPCall& aTransferTargetCall ); + + /** + * Attended transfer to given address. There does not need to be + * a current call between the given transfer target. + * @param aTransferTarget Transfer target address + * @return In case of an immediate error returns system error code, + * if request has been started returns KErrNone. + * Actual request result indication comes via observer class + */ + TInt AttendedTransfer( const TDesC& aTransferTarget ); + + /** + * Unattended transfer. Call is requested to be transferred to given + * address. After ECCPRemoteTransferring event current call will be + * disconnected and no transfer status is checked from the operation. + * @param aTransferTarget Address of the target + * @return In case of an immediate error returns system error code, + * if request has been started returns KErrNone. + * Actual request result indication comes via observer class + */ + TInt UnattendedTransfer( const TDesC& aTransferTarget ); + + /** + * Accept incoming call transfer request from the call remote party. + * @param aAccept ETrue - accept transfer, + * EFalse do not accept transfer request. + * @return In case of an immediate error returns system error code, + * if request has been started returns KErrNone. + * Actual request result indication comes via observer class + */ + TInt AcceptTransfer( const TBool aAccept ); + + /** + * When the other end of the call has requested call transfer to + * third party it is notified to + * CCPCallCall::EventOccurred(ECCPRemoteTransferring). + * The new recipient of the call can be fetched via this method. + * @return New recipient for the call after transfer + */ + const TDesC& TransferTarget() const; + + /** + * Add an observer for transfer related events. + * Plug-in dependent feature if duplicates or more than one observers + * are allowed or not. Currently CCE will set only one observer. + * @since S60 v3.2 + * @param aObserver Observer + * @leave system error if observer adding fails + */ + void AddObserverL( const MCCPTransferObserver& aObserver ); + + /** + * Remove an observer. + * @since S60 v3.2 + * @param aObserver Observer + * @return KErrNone if removed succesfully + * KErrNotFound if observer was not found. + * Any other system error depending on the error. + */ + TInt RemoveObserver( const MCCPTransferObserver& aObserver ); + + /** + * A transfer event has occurred concerning a specific call. + * @since S60 3.2 + * @param aEvent Occurred event. + */ + void TransferEventOccurred( + const MCCPTransferObserver::TCCPTransferEvent aEvent ); + + // from base class CActive + protected: + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + /** + * Constructs the provider + * + * @param aCall handle mobile call + */ + CSPTransferProvider( RMobileCall& aCall, + MCSPCallErrorObserver& aErrorObserver, + MCSPCommonInfo& aCommonInfo ); + + /** + * Constructing 2nd phase. + */ + void ConstructL(); + + private: // data + + /** + * DTMF event observer. + */ + RPointerArray iObservers; + + /** + * Etel call object + */ + RMobileCall& iCall; + + /** + * Error observer; + */ + MCSPCallErrorObserver& iErrorObserver; + + /** + * Common information for calls. + */ + MCSPCommonInfo& iCommonInfo; + + +}; + +#endif CSPTRANSFERPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspuuimessagesender.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspuuimessagesender.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,96 @@ +/* +* Copyright (c) 2007 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: Sends UUI message. +* +*/ + + +#ifndef CSPUUIMESSAGESENDER_H +#define CSPUUIMESSAGESENDER_H + +#include +#include + +/** + * Sends user to user information messages. + * + * @lib PhoneEngine.lib + * @since S60 v3.2 + */ +NONSHARABLE_CLASS( CSPUUIMessageSender ) : public CActive + { + +public: + + static CSPUUIMessageSender* NewL( + RMobileCall& aCall ); + + virtual ~CSPUUIMessageSender(); + + /** + * Sends user to user information. + * + * @since S60 v3.2 + * @param aMessage UUI message to be sent. + */ + void SendUUIMessage( const TDesC& aMessage ); + +// from base class CActive + +protected: + + /** + * From CActive. + * + * Cancels active request. + * @since S60 v3.2 + */ + void DoCancel(); + + /** + * From CActive. + * + * Callback to indicate completion + * of request. + * @since S60 v3.2 + */ + void RunL(); + +private: + + CSPUUIMessageSender( + RMobileCall& aCall ); + + void ConstructL(); + +private: // data + + /** + * Call, which the UUI is sent to. + * Not own. + */ + RMobileCall& iCall; + + /** + * Request. + */ + RMobileCall::TMobileCallUUSRequestV1 iUUSRequest; + + /** + * Request package. + */ + RMobileCall::TMobileCallUUSRequestV1Pckg iUUSRequestPckg; + }; + +#endif // CSPUUIMESSAGESENDER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspuuimonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspuuimonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,97 @@ +/* +* Copyright (c) 2007 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: Monitor UUI messages. +* +*/ + + +#ifndef CSPUUIMONITOR_H +#define CSPUUIMONITOR_H + +#include +#include + +class MCSPUUSMessageObserver; + +/** + * Monitors UUI messages. + * + * @lib PhoneEngine.lib + * @since S60 v3.2 + */ +NONSHARABLE_CLASS( CSPUUIMonitor ) : public CActive + { +public: + + static CSPUUIMonitor* NewL(RMobileCall& aCall, + MCSPUUSMessageObserver& aUUIHandler ); + + virtual ~CSPUUIMonitor(); + + /** + * Starts monitoring the UUI messages + * + * @since S60 v3.2 + */ + void StartMonitor(); + +protected: + +// from base class CActive + + /** + * From CActive + * Cancels the outstanding request + * + * @since S60 v3.2 + */ + void DoCancel(); + + /** + * From CActive + * Handles request completion + * + * @since S60 v3.2 + */ + void RunL(); + +private: + + CSPUUIMonitor(RMobileCall& aCall, + MCSPUUSMessageObserver& aUUIHandler ); + + void ConstructL(); + +private: // data + + /** + * Etel call. + * Not own. + */ + RMobileCall& iCall; + + /** + * UUI data. + */ + RMobileCall::TMobileCallUUI iUUI; + + + /** + * UUI message observer; + */ + MCSPUUSMessageObserver& iObserver; + + }; + +#endif // CSPUUIMONITOR_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspvideocall.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspvideocall.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,231 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements CSPVideoCall for CS Call Plug-in +* +*/ + + + +#ifndef CSPVIDEOCALL_H +#define CSPVIDEOCALL_H + +#include +#include +#include +#include +#include + +#include "cspcall.h" +#include "cspconsts.h" +#include "mcspcallobserver.h" +#include "mcspcallerrorobserver.h" +#include "cspvideocallconnectionhandler.h" + + +class MCCPObserver; +class RMobileCall; +class CSPEtelCallStatusMonitor; +class CSPEtelCallEventMonitor; +class CSPEtelVideoCallCapsMonitor; +class CSPEtelCallWaitingRequester; + +/** +* Call class for CS Call Plug-in. Implements the API defined by CCP in classes +* MCCPCall and MCCPCSCall +* +* @lib csplugin.dll +* @since S60 v3.2 +*/ +class CSPVideoCall : public CSPCall + { + + public: + /* + * Creates a new CSPVideoCall object. + * @since S60 3.2 + * @param aName dialled number (MT) or call name (MO) + * @param aLine line for opening the call + * @param aMobileOriginated direction of call + * @param aParams call parameters + * @param aCommonInfo common information for call, + * @return pointer to created call object + */ + static CSPVideoCall* NewL( const TDesC& aName, + RMobileLine& aLine, + TBool aMobileOriginated, + const CCCECallParameters& aParams, + MCSPCommonInfo& aCommonInfo ); + + /** + * C++ default destructor + */ + virtual ~CSPVideoCall( ); + + /** + * Informs about ready data connection. + * @aPortName name of data port + */ + void ConnectionReady( TName aDataPortName ); + + /** + * Error occurred when establishing connection. + * @param aErr error value + */ + void ConnectionEstablishingFailed(TInt aErr); + + /** + * Notification about data call caps change. + * @param aCaps new caps + */ + void DataCallCapsChanged( RMobileCall::TMobileCallDataCapsV1& aCaps ); + + /** + * Selects call type video or voice depending of available procotol + * capabilities + * @return Call type video or voice + */ + CCPCall::TCallType SelectCallTypeFromProtocolCaps(); + +// from base class CSPCall + + /** + * From CSPCall + * Updates the state change and forwards the state for observer. + * @param aState new state of the call + */ + virtual void NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState ); + + /** + * From CSPCall + * Updates the state change and forwards the state for observer. + * @param aState new state of the call + */ + virtual void NotifyCallStateChangedWithInband( MCCPCallObserver::TCCPCallState aState ); + + /** + * From MCCPCSCall + * Starts dialing to recipient without FDN check. + * @param aCallParams Call parameters used by the TSY (TCallParamsPckg) + * @return system wide error code + */ + TInt DialNoFdnCheck( const TDesC8& aCallParams ); + + /** + * From CSPCall + * Switch in the alternating call mode of an alternating call + * @since S60 3.2 + */ + TInt SwitchAlternatingCall(); + + /** + * From MCCPCSCall + * Gets the calls data call capabilities + * @since S60 3.2 + * @param aCaps TMobileCallDataCapsV1 + * @return KErrNone if the function member was successful, + * KErrNotSupported if call doesn't support circuit switched data + * KErrNotFound if this call is not a data call + */ + virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const; + + /** + * From MCCPCall + * Get call's secure status. + * @since S60 3.2 + * @return TBool ETrue if security is enabled, else EFalse. + */ + TBool IsSecured() const; + + protected: + + /* + * C++ default constructor + * @param aLine open line ready for use + * @param aMobileOriginated true if MO, false if MT + * @param aName call name (MT) or recipient (MO) + * @param aCommonInfo reference to common info interface + */ + CSPVideoCall( RMobileLine& aLine, + TBool aMobileOriginated, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo ); + + /* + * Constructing 2nd phase. + * @since S60 3.2 + */ + void ConstructL( const CCCECallParameters& aParams ); + + private: + + /** + * Sets default call params. + */ + void SetDefaultCallParameters(); + + /** + * Sets default video call params + */ + void SetVideoCallParameters(); + + /** + * Branches dial requests according + * to FDN check flag. + * @aFdnCheck ETrue if FDN is checked + */ + TInt DialFdnCond( TBool aFdnCheck ); + + private: + + /** + * Data call caps monitor + * Own. + */ + CSPEtelVideoCallCapsMonitor* iVideoCallCapsMonitor; + + /** + * Call parameters. + */ + RMobileCall::TMobileHscsdCallParamsV1 iDataCallParams; + + /** + * Call parameters package. + */ + RMobileCall::TMobileHscsdCallParamsV1Pckg iDataCallParamsPckg; + + /** + * Air Interface User Rate + */ + RMobileCall::TMobileCallAiur iAirInterfaceUserRate; + + /** + * Current received time slots + */ + TInt iCurrentTimeSlots; + + /** + * Connection functionality + * Own. + */ + CSPVideoCallConnectionHandler* iConnectionHandler; + + /** + * Next call state + */ + MCCPCallObserver::TCCPCallState iNextCallState; + + }; + + +#endif // CSPVIDEOCALL_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspvideocallconnectionhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspvideocallconnectionhandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,160 @@ +/* +* Copyright (c) 2007-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: Delivers asynchronous requests to ETel +* +*/ + + +#ifndef CSPVIDEOCALLCONNECTIONHANDLER_H +#define CSPVIDEOCALLCONNECTIONHANDLER_H + + +#include +#include +#include +#include +#include + +class CSPVideoCall; + +/** +* Handles data call connection specific requests. +* Provides canceling via CActive::Cancel(). +* +*/ +class CSPVideoCallConnectionHandler : public CActive + { + + public: + + /** + * Constructs the requester via two phase. + * + * @param aObserver the observer for request errors + * @param aCall ETel RMobileCall reference that is the object + * of the request. + */ + static CSPVideoCallConnectionHandler* NewL( CSPVideoCall& aObserver, + RMobileCall& aCall ); + + /** + * C++ default destructor + */ + virtual ~CSPVideoCallConnectionHandler( ); + + /** + * Initializes connection including data port loaning. + * @since S60 3.2 + * @return KErrNone if successful, else error code + */ + TInt InitializeConnection( ); + + /** + * Releases connection including data port loaning. + * @since S60 3.2 + * @return KErrNone if successful, else error code + */ + TInt ReleaseConnection( ); + + /** + * Connection initialized. + * @since S60 3.2 + * @return connection initialized status + */ + TBool ConnectionInitialized( ); + + protected: // From CActive + + /** + * From CActive + * RunL + * @since S60 3.2 + */ + void RunL(); + + /** + * From CActive + * Cancels the monitor + * @since S60 3.2 + */ + void DoCancel(); + + private: + + /** + * Constructs the connection handler. + * + * @param aObserver the observer for request errors + * @param aCall ETel RMobileCall reference that is the object + * of the request. + */ + CSPVideoCallConnectionHandler( CSPVideoCall& aObserver, + RMobileCall& aCall ); + + /** + * Constructing in the second phase. + */ + void ConstructL(); + + /** + * Create socket connection. + */ + TInt CreateSocketConnection(); + + /** + * Loan data port. + * Initiates asynchronous request to loan dataport. + */ + TInt LoanDataPort(); + + /** + * Close socket connection. + */ + void CloseConnection(); + + + private: // data + /** + * Observer for request errors. + */ + CSPVideoCall& iObserver; + + /** + * ETel call which this monitors + */ + RMobileCall& iCall; + + /** + * Comm port info. + */ + RCall::TCommPort iCommPort; + + /** + * Connection reference + */ + RConnection iConnection; + + /** + * Tells if socket connection has been initialized + */ + TBool iConnectionInitialized; + + /** + * Socket Server handle. + */ + RSocketServ iSocketServer; + + }; + +#endif // CSPVIDEOCALLCONNECTIONHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/cspvoicecall.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/cspvoicecall.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,184 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements CSPVoiceCall for CS Call Plug-in +* +*/ + + +#ifndef CSPVOICECALL_H +#define CSPVOICECALL_H + + +#include // For MCCPEmergencyCall + +#include "cspcall.h" // For CSPCall + + +class MCCPForwardProvider; +class MCCPObserver; +class RMobileCall; +class CSPEtelCallStatusMonitor; +class CSPEtelCallEventMonitor; +class CSPEtelCallWaitingRequester; + +/** +* Call class for CS Call Plug-in. Implements the API defined by CCP in classes +* MCCPCall and MCCPCSCall +* +* @lib csplugin.dll +*/ +class CSPVoiceCall : public CSPCall, + public MCCPEmergencyCall + { + + public: + /* + * Creates a new CSPVoiceCall object for MO or MT call. + * @param aName dialled number (MO) or call name (MT) + * @param aLine line for opening the call + * @param aMobileOriginated direction of call + * @param aParams call parameters + * @param aCommonInfo common info interface + * @param aIsEmergency is emergency call + * @return pointer to created call object + */ + static CSPVoiceCall* NewL( const TDesC& aName, + RMobileLine& aLine, + TBool aMobileOriginated, + const CCCECallParameters& aParams, + MCSPCommonInfo& aCommonInfo, + TBool aIsEmergency ); + + /** + * C++ default destructor + */ + virtual ~CSPVoiceCall(); + + /** + * Goes one-to-one from conference. + * @return system wide error code + */ + TInt GoOneToOne(); + +// from base class CSPCall + + /** + * From MCCPCSCall + * Switch in the alternating call mode of an alternating call + * @return system wide error code + */ + TInt SwitchAlternatingCall(); + + /** + * From MCCPCall + * Answer call. + * @return system wide error code + */ + TInt Answer(); + + /** + * Ends an ongoing call. + * @return KErrNone If request was started succesfully. + * @return KErrAlreadyExists If call is already in idle state. + */ + TInt HangUp(); + + /** + * From MCCPCall + * Cancels the ongoing dial request + * @return system wide error code + */ + TInt Cancel(); + +// from base class MCCPEmergencyCall + + /** + * Dials an emergency call. + * @param aRecipient Emergency call address suggested to be used. + * Can be given also in CConvergedCallProvider::NewEmergencyCallL. + * Plug-in will use given address and/or its own known one. + * Preferred address usage order: + * 1) Plug-in own emergency address + * 2) Address given in Dial + * 3) Address given in CConvergedCallProvider::NewEmergencyCallL. + * @return KErrNone if request was started succesfully. + * @return KErrNotReady If call is not in idle state. + * @return KErrNotSupported Emergency call is not supported. + */ + TInt Dial( const TDesC& aEmergencyNumber); + + protected: + + /* + * Voice call constructor. + * @param aLine open line ready for use + * @param aServiceId service ID + * @param aCallType type of call (voice/video/data/fax) + * @param aLineType primary/aux line type + * @param aMobileOriginated direction of call + * @param aName remote party or call name depending on direction + * @param aExtMoCall true in case of externally created MO call + * @param aIsEmergency is emergency call flag + * @param aBearer bearer capabilities for SAT + * @param aSubAddress sub adrress for SAT + * @param aOrigin call origin (i.e. SAT or Phone) + */ + CSPVoiceCall( RMobileLine& aLine, + TBool aMobileOriginated, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo, + TBool aIsEmergency ); + + /* + * Constructing 2nd phase. + */ + void ConstructL( const CCCECallParameters& aParams ); + + /** + * Set default call parameters to be used in dial. + */ + void SetDefaultCallParameters(); + + /** + * From CSPCall. + * Starts dialing to recipient. + * Bypasses FDN check according to aFdnCheck. + * @param aFdnCheck True if FDN checking is used + * @return system wide error code + */ + TInt DialFdnCond( TBool aFdnCheck ); + + protected: // Data + + /** + * Call parametrs. + */ + RMobileCall::TMobileCallParamsV7 iCallParams; + + /** + * Package of call paremeters. + */ + RMobileCall::TMobileCallParamsV7Pckg iCallParamsPckg; + + /** + * Stores the emergency number. + */ + RMobileENStore::TEmergencyNumber iEmergencyNumber; + + friend class UT_CSPVoiceCall; + + }; + + +#endif // CSPVOICECALL_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspaudiostreamobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspaudiostreamobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,49 @@ +/* +* Copyright (c) 2006 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: Observer interface for getting information on audio streams. +* +*/ + + +#ifndef MCSPAUDIOSTREAMOBSERVER_H +#define MCSPAUDIOSTREAMOBSERVER_H + +/** + * Observer interface for getting information of audio streams. + * + */ +NONSHARABLE_CLASS( MCSPAudioStreamObserver ) + { + +public: + + /** + * Indication that audio streams has been started. + * + */ + virtual void AudioStreamsStarted() = 0; + + /** + * Indication that audio streams will be closed. + * + * Client can do operations affected to streams from this method, + * but after this method the streams will be closed. + * + */ + virtual void AudioStreamsGoingToStop() = 0; + + }; + + +#endif // MCSPAUDIOSTREAMOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspcalladdedobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspcalladdedobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,54 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for MCSPCallAddedObserver class +* +*/ + + + +#ifndef MCSPCALLADDEDOBSERVER_H +#define MCSPCALLADDEDOBSERVER_H + +//INCLUDES +#include + +#include "rcsplinecontainer.h" + +// CLASS DECLARATION + +/** +* Virtual interface for monitoring incoming call. +* +* @since S60 3.2 +*/ +class MCSPCallAddedObserver + { + public: + + /** + * Informs about added call. + * @since S60 3.2 + * @param aLine the line that corresponds to the call + * @param aCallName the name of the call + */ + virtual void CallAdded( RMobileLine& aLine, + TName aCallName, + RCSPLineContainer::TCSPLineId aLineId ) = 0; + + + }; + +#endif // MINCOMINGCALLOBSERVER_H + +//End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspcallcommandhandling.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspcallcommandhandling.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,55 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declarations for class mcspcallcommandhandling +* +*/ + + + +#ifndef MCSPCALLCOMMANDHANDLING_H +#define MCSPCALLCOMMANDHANDLING_H + +// INCLUDES +#include + +class CSPCall; + +// CLASS DECLARATION + + +/** +* Observer interface for call command handling +* +*/ +class MCCPCallCommandHandling + { + public: // New functions + + /** + * Perform answer command. + * @return system wide error code + */ + virtual TInt PerformAnswerRequest() = 0; + + /** + * Perform dial command. + * @return system wide error code + */ + virtual TInt PerformDialRequest() = 0; + + }; + +#endif // MCSPCALLCOMMANDHANDLING_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspcallerrorobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspcallerrorobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,65 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for MCSPCallErrorObserver class for +* observing errors related to call requests, e.g. dialling. +* +*/ + + + +#ifndef MCSPCALLERROROBSERVER_H +#define MCSPCALLERROROBSERVER_H + +//INCLUDES +#include + + + +// CLASS DECLARATION + +/** +* Interface for monitoring incoming call. +* +* @since S60 3.2 +*/ +class MCSPCallErrorObserver + { + public: + + /** + * Informs about failed dial. + * @param aErrorCode + */ + virtual void DialRequestFailed( TInt aErrorCode ) = 0; + + /** + * Informs about failed emergency dial. + * @param aErrorCode + */ + virtual void EmergencyDialRequestFailed( TInt aErrorCode ) = 0; + + /** + * Informs about erroneous request. + * @since S60 3.2 + * @param aError request related to the error. + */ + virtual void NotifyErrorOccurred( TCCPError aErr ) = 0; + + + + }; + +#endif // MINCOMINGCALLOBSERVER_H + +//End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspcallinformation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspcallinformation.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,50 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for MCSPCallInformation class +* +*/ + + + +#ifndef MCSPCALLINFORMATION_H +#define MCSPCALLINFORMATION_H + +//INCLUDES +#include + +// FORWARD DECLARATIONS +class CSPCall; + +// CLASS DECLARATION + +/** +* Interface for browsing calls. +* +*/ +class MCSPCallInformation + { + public: + + /** + * Finds call based on the name. + * @param aCallName call name (etel) + * @return call object or NULL if not found. + */ + virtual CSPCall* FindCall( const TName& aCallName ) = 0; + + }; + +#endif // MINCOMINGCALLOBSERVER_H + +//End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspcallobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspcallobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,107 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for MCSPCallObserver class for +* observing errors related to call requests, e.g. dialling. +* +*/ + + + +#ifndef MCSPCALLOBSERVER_H +#define MCSPCALLOBSERVER_H + +//INCLUDES +#include + +#include +#include +#include +#include + + + +// CLASS DECLARATION + +/** +* Interface for monitoring incoming call. +* +* @since S60 3.2 +*/ +class MCSPCallObserver + { + public: + + /** + * Informs about occurred event. + * @since S60 3.2 + * @param aEvent occurred event + */ + virtual void NotifyCallEventOccurred( + MCCPCallObserver::TCCPCallEvent aEvent ) = 0; + + /** + * Updates the state change and forwards the state for observer. + * @param aState new state (ETel) of the call + */ + virtual void NotifyCallStateChangedETel( + RMobileCall::TMobileCallStatus aState ) = 0; + + /** + * Informs about changed state that includes inband tones. + * @since S60 3.2 + * @param aState the new state + */ + virtual void NotifyCallStateChangedWithInband( + MCCPCallObserver::TCCPCallState aState ) = 0; + + /** + * Informs about occurred transfer related event. + * @since S60 3.2 + * @param aEvent occurred transfer event + */ + virtual void NotifyTransferCallEventOccurred( + const MCCPTransferObserver::TCCPTransferEvent aEvent ) = 0; + + + /** + * Updates the call event for observers. + * @param aEvent the event to be notified + */ + virtual void NotifyForwardEventOccurred( + MCCPForwardObserver::TCCPForwardEvent aEvent ) = 0; + + + /** + * Updates changed call capability information. + * @param aCapsFlags new caps flags + */ + virtual void CallCapsChanged( const TUint32 aCapsFlags ) = 0; + + /** + * Notify that remote party info has changed. + * @param aRemotePartyName new remote party name + * @param aRemotePartyNumber new remote party number + * + */ + virtual void NotifyRemotePartyInfoChanged( + const TDesC& aRemotePartyName, + const TDesC& aRemotePartyNumber + ) = 0; + + + }; + +#endif // MINCOMINGCALLOBSERVER_H + +//End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspcenrepobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspcenrepobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,49 @@ +/* +* Copyright (c) 2007 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: Declarations for class MCSPCenRepObserver +* +*/ + + + +#ifndef MCSPCENREPOBSERVER_H +#define MCSPCENREPOBSERVER_H + +// INCLUDES +#include + +// CLASS DECLARATION + +/** +* Observer interface for indicating P&S changes +* +*/ +class MCSPCenRepObserver + { + public: // New functions + + /** + * Handler for changed event. + * @param aUid uid of setting + * @param aKey the changed key + * @param aVal value + */ + virtual void HandleNotifyCenRepL( const TUid aUid, + const TUint32 aKey, + TInt aVal) = 0; + }; + +#endif // MCSPCENREPOBSERVER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspcommoninfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspcommoninfo.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,156 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declarations for class MCSPCommonInfo +* +*/ + + + +#ifndef MCSPCOMMONINFO_H +#define MCSPCOMMONINFO_H + +// INCLUDES +#include +#include // for ciphering status +#include +#include // For CCCPCallParameters +#include + + +class CSPCall; +class MCCPCallCommandHandling; +class MCCPCSCall; + +// CLASS DECLARATION + + +/** +* Observer interface for indicating P&S changes +* +*/ +class MCSPCommonInfo + { + public: // New functions + + /** + * Makes the request. Note that ERequestTypeDial is made with a + * separate MakeDialRequest function. + * + * @param aRequest type of request + * @return ETrue if active, EFalse if not + */ + virtual void GetCallWaitingL( const CCCECallParameters& iParams, + TBool& aCallWaitingStatus ) = 0; + + /** + * Diagnostic error fetching. + * @param aCallName name of call + * @return diagnostic error code + */ + virtual TInt GetDiagnosticError( TName& aCallName ) = 0; + + + /** + * Network security status. + * @since Series60_4.0 + * @return true if calls use secured connection + */ + virtual TBool NetworkSecurityStatus() const = 0; + + + /** + * Remote alerting tone playing status. + * @return tone status (tone type/not played) + */ + virtual RMmCustomAPI::TRemoteAlertingToneStatus GetRemoteAlertingToneStatus() = 0; + + /** + * Initializes with current settings. + * @param aParams call params + */ + virtual void InitializeCallParameters( RMobileCall::TMobileCallParamsV7& aParams ) = 0; + + /** + * Initializes with current settings. + * @param aParams call params + */ + virtual void InitializeDataCallParameters( + RMobileCall::TMobileHscsdCallParamsV1& aParams ) = 0; + + /** + * Indicates that client call has been created. + * @param aCall client call pointer + */ + virtual void IndicateClientCall( MCCPCSCall* aCall ) = 0; + + /** + * Indicates incoming call. + * @param aCall MT call + * @return system wide error code + */ + virtual TInt IndicateIncomingCall( MCCPCSCall* aCall ) = 0; + + /** + * Notify data port name of a loaned data port. + * @param aDataPort + */ + virtual void NotifyDataPortName( TName& aDataPortName ) = 0; + + /** + * Indicates active hangup command. + * @param aCall MT call + * @return system wide error code + */ + virtual TInt IndicateActiveHangup( MCCPCallCommandHandling& aCall ) = 0; + + /** + * Indicates hangup command complete. + * @param aCall MT call + * @return system wide error code + */ + virtual TInt IndicateHangupComplete( MCCPCallCommandHandling& aCall ) = 0; + + /** + * Indicates dial command. + * @param aCall MT call + * @return system wide error code + */ + virtual TInt IndicateDialRequest( MCCPCallCommandHandling& aCall ) = 0; + + /** + * Indicates answer command. + * @param aCall MT call + * @return system wide error code + */ + virtual TInt IndicateAnswerRequest( MCCPCallCommandHandling& aCall ) = 0; + + /** + * Secure specified status. + * @since Series60_5.0 + * @return ETrue if specified + */ + virtual TBool SecureSpecified() const = 0; + + /** + * Don't report termination error + * @since Series60_5.0 + * @return system wide error code + */ + virtual TInt DontReportTerminationError() = 0; + + }; + +#endif // MCSPCOMMONINFO_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspconferencestatusobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspconferencestatusobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,55 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for MCSPConferenceStatusObserver class +* +*/ + + + +#ifndef MCSPCONFERENCESTATUSOBSERVER_H +#define MCSPCONFERENCESTATUSOBSERVER_H + + +// CLASS DECLARATION + +/** +* Virtual interface for monitoring conference status. +* +* @since S60 5.0 +*/ +NONSHARABLE_CLASS(MCSPConferenceStatusObserver) + { + public: + + /* Security setting event value */ + enum TCSPConferenceState + { + /** The conference call is in the idle state. */ + ECSPConferenceIdle, + /** The conference call is in the active, connected state. */ + ECSPConferenceActive, + /** The conference call is in the held, connected state. */ + ECSPConferenceHold, + }; + + /** + * Informs conference call state change. + * @since S60 5.0 + */ + virtual void NotifyStateChange( + MCSPConferenceStatusObserver::TCSPConferenceState aStatus ) = 0; + + }; + +#endif // MCSPCONFERENCESTATUSOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspdevsoundobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspdevsoundobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2006 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: Observer for audio stream start up. +* +*/ + + +#ifndef MCSPDEVSOUNDOBSERVER_H +#define MCSPDEVSOUNDOBSERVER_H + +/** + * Observer interface for knowing when audio streams have been + * successfully ramped up. + * + */ +class MCSPDevSoundObserver + { + +public: + + /** + * Notification that Mic has been activated successfully + * + */ + virtual void MicActivatedSuccessfully() = 0; + + /** + * Notification that speaker has been activated successfully + * + */ + virtual void SpeakerActivatedSuccessfully() = 0; + + /** + * Notification that Mic initialisation failed. + * + */ + virtual void MicActivationFailed() = 0; + + /** + * Notification that Speaker activation failed. + * + */ + virtual void SpeakerActivationFailed() = 0; + + }; + + +#endif // MCSPDEVSOUNDOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspincomingcallobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspincomingcallobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,54 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for MCSPIncomingCallObserver class +* +*/ + + + +#ifndef MCSPINCOMINGCALLOBSERVER_H +#define MCSPINCOMINGCALLOBSERVER_H + +//INCLUDES +#include + +#include "rcsplinecontainer.h" + +// CLASS DECLARATION + +/** +* Virtual interface for monitoring incoming call. +* +* @since S60 3.2 +*/ +class MCSPIncomingCallObserver + { + public: + + /** + * Informs incoming call. + * @since S60 3.2 + * @param aLine the line that corresponds to the call + * @param aCallName the name of the call + */ + virtual void IncomingCallArrived( RMobileLine& aLine, + TName aCallName, + RCSPLineContainer::TCSPLineId aLineId ) = 0; + + + }; + +#endif // MINCOMINGCALLOBSERVER_H + +//End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcsplinestatusobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcsplinestatusobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,53 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for MCSPLineStatusObserver class +* +*/ + + + +#ifndef MCSPLINESTATUSOBSERVER_H +#define MCSPLINESTATUSOBSERVER_H + +//INCLUDES +#include +#include "rcsplinecontainer.h" + +// CLASS DECLARATION + +/** +* Virtual interface for monitoring line status changes. +* +* @since S60 5.0 +*/ +NONSHARABLE_CLASS(MCSPLineStatusObserver) + { + public: + + /** + * Informs about line status changes. + * @since S60 5.0 + * @param aLine the line that is monitored for events + * @param aLineId the line id + * @param aCallStatus the line status + */ + virtual void LineStatusChanged( RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId, + RMobileCall::TMobileCallStatus& aCallStatus ) = 0; + + }; + +#endif // MCSPLINESTATUSOBSERVER_H + +//End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcsppubsubobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcsppubsubobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,48 @@ +/* +* Copyright (c) 2007 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: Declarations for class MCSPPubSubObserver +* +*/ + + + +#ifndef MCSPPUBSUBOBSERVER_H +#define MCSPPUBSUBOBSERVER_H + +// INCLUDES +#include + +// CLASS DECLARATION + +/** +* Observer interface for indicating P&S changes +* +*/ +class MCSPPubSubObserver + { + public: // New functions + + /** + * Handler for changed event. + * @param aUid uid of setting + * @param aKey id of setting + * @param aStatus status of completed AO operation + */ + virtual void HandleNotifyPSL( const TUid aUid, const TInt& aKey, + const TRequestStatus& aStatus ) = 0; + }; + +#endif // MCSPPUBSUBOBSERVER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspremotealertingtoneobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspremotealertingtoneobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,48 @@ +/* +* Copyright (c) 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: Observer for remote alerting tone change. +* +*/ + + +#ifndef MCSPREMOTEALERTINGTONEOBSERVER_H +#define MCSPREMOTEALERTINGTONEOBSERVER_H + +#include +#include + +/** + * Observer for remote alerting tone status changes. + * + * @lib CSPlugin + * @since S60 v5.0 + */ +NONSHARABLE_CLASS( MCSPRemoteAlertingToneObserver ) + { + +public: + + /** + * Notification of remote alerting tone status change. + * + * @since S60 v5.0 + * @param aNewStatus New remote alerting tone status. + */ + virtual void RemoteAlertingToneStatusChanged( + RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus ) = 0; + + }; + + +#endif // MCSPREMOTEALERTINGTONEOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspsecuritysettingobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspsecuritysettingobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2007 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: Interface for observing security setting. +* +*/ + + + +#ifndef MCSPSECURITYSETTINGOBSERVER_H_ +#define MCSPSECURITYSETTINGOBSERVER_H_ + +/** +* Virtual interface for monitoring call ownership. +* +* @since S60 3.2 +*/ +class MCSPSecuritySettingObserver + { + public: + + /* Security setting event value */ + enum TCSPSecuritySettingEvent + { + ESecureCall, + ENotSecureCall, + ESecureNotSpecified + }; + + public: + + /** + * SecuritySettingChanged. + * @param aValue + * @since S60 3.2 + */ + virtual void SecuritySettingChanged( TInt aValue ) = 0; + + }; + +#endif /*MCSPSECURITYSETTINGOBSERVER_H_*/ diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcsptimerobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcsptimerobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2006 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: Observer interface for getting notifes from CSPTimer +* +*/ + + +#ifndef MCSPTIMEROBSERVER_H +#define MCSPTIMEROBSERVER_H + +/** + * Observer for CSPTimer events. + * + */ +class MCSPTimerObserver + { + +public: + + /** + * Timer request has completed. + * + * @since S60 v3.1 + */ + virtual void TimerEvent() = 0; + + }; + + +#endif // MCSPTIMEROBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/mcspuusmessageobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/mcspuusmessageobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,46 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Header file for MCSPUUSMessageObserver class +* +*/ + + + +#ifndef MCSPUUSMESSAGEOBSERVER_H +#define MCSPUUSMESSAGEOBSERVER_H + +//INCLUDES + +// CLASS DECLARATION + +/** +* Observer interface for indicating User to User Signalling +* +* @since S60 3.2 +*/ +class MCSPUUSMessageObserver + { + public: + + /** + * Informs UUS message + * @since S60 3.2 + * @param aMessage + */ + virtual void UUSMessageReceived( TDesC& aMessage ) = 0; + }; + +#endif // MCSPUUSMESSAGEOBSERVER_H + +//End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/rcsplinecontainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/rcsplinecontainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,127 @@ +/* +* Copyright (c) 2002-2003 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: Encapsulates all of the lines required by the CS Plugin. +* +*/ + + +#ifndef RCSPLINECONTAINER_H +#define RCSPLINECONTAINER_H + +// INCLUDES + +#include // ETel +#include +#include + +// CLASS DEFINITIONS + +/** +* Encapsulates all of the lines required by the phone +* engine. +* +* @lib phoneengine.lib +* @since 1.2 +*/ +NONSHARABLE_CLASS(RCSPLineContainer) + { + public: + + enum TCSPLineId { + ECSPLineSpeech = 0, + ECSPLineAuxSpeech, + ECSPLineData, + ECSPLineFax + }; + + public: // Constructors + + // Default c++ constructor + RCSPLineContainer(); + + public: // new functions + /** + * Open voice, aux, data and fax lines. + * @since 3.2 + * @param aPhone open lines on this phone + * @return Returns an error only if the primary + * line cannot be opened, otherwise KErrNone. + */ + TInt Open( RMobilePhone& aPhone, + TUint32 aServiceId ); + + + /** + * @since 3.2 + * Close the lines. Frees all resources owned by + * this container. + */ + void Close(); + + /** + * Access a specific line + * @since 1.2 + * @param aLine The type of line to return + * @returns The line specified + */ + RMobileLine& LineByType( TCSPLineId aLine ); + + /** + * Returns whether the specified line is open + * @since 3.2 + * @param aLine line to check + * @return ETrue if specified line is open. + */ + TBool LineIsOpen( TCSPLineId aLine ); + + /** + * Resolve call information. + * @param aLineId line id (input) + * @param aServiceId service id (output) + * @param aCallType call type (output) + * @param aLineType line type (output) + */ + TInt ResolveCallInfo( RCSPLineContainer::TCSPLineId aLineId, + TUint32& aServiceId, + CCPCall::TCallType& aCallType, + CCCECallParameters::TCCELineType& aLineType ) const; + + /** + * Resolves line id based on call parameters. + * @param aCallParameters + * @return line id + */ + RCSPLineContainer::TCSPLineId ResolveLineIdL( + const CCCECallParameters& aCallParameters ) const; + + + private: + + // Prohibit copy constructor if not deriving from CBase. + RCSPLineContainer( RCSPLineContainer& ); + // Prohibit assigment operator if not deriving from CBase. + RCSPLineContainer& operator=( const RCSPLineContainer& ); + + private: + RMobileLine iPrimaryLine; + RMobileLine iAls2Line; + RMobileLine iDataLine; + RMobileLine iFaxLine; + + TUint32 iServiceId; + }; + +#endif // RCSPLINECONTAINER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/inc/tcspskypeidparser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/inc/tcspskypeidparser.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,61 @@ +/* +* Copyright (c) 2007 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: Parses Skype id from UUI message. +* +*/ + + +#ifndef TCSPSKYPEIDPARSER_H +#define TCSPSKYPEIDPARSER_H + +#include + +/** + * Skype id parser. + * + * @lib phoneengine.lib + * @since S60 v3.2 + */ +class TCSPSkypeIdParser + { +public: + + TCSPSkypeIdParser(); + + /** + * Creates right size buffer to be used with parse method. + * + * @since S60 v3.2 + * @return Buffer. Ownership given to caller. + */ + static HBufC* CreateSkypeIdBufferL(); + + + /** + * Parses Skype if from UUI message. + * + * @since S60 v3.2 + * @param aUUIMessage Message. + * @param aSkypeId Parser skype id is appended here. + * @return Error code. KErrNotSupported if data is not understood by + * parser. + */ + TInt Parse( const TDesC& aUUIMessage, TDes& aSkypeId ); + + +private: // data + + }; + +#endif // CSPSKYPEIDPARSER_H diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/rom/csplugin.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/rom/csplugin.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,27 @@ +/* +* Copyright (c) 2006-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: Image description file for project ?myapp +* +*/ + + +#ifndef CSPLUGIN_IBY +#define CSPLUGIN_IBY + +ECOM_PLUGIN( csplugin.dll, 102828E3.rsc ) +data=ZSYSTEM\install\csplugin_stub.sis System\Install\csplugin_stub.sis + +#endif // CSPLUGIN_IBY + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspaudiohandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspaudiohandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,283 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPAudioHandler +* +*/ + + +#include "cspaudiohandler.h" + +#include +#include +#include +#include + +#include "cspaudiostreams.h" +#include "csppubsublistener.h" +#include "cspcenreplistener.h" +#include "csplogger.h" + + +// --------------------------------------------------------------------------- +// CSPAudioHandler::NewL. +// --------------------------------------------------------------------------- +// +CSPAudioHandler* CSPAudioHandler::NewL( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPAudioHandler::NewL()" ); + CSPAudioHandler* self = new ( ELeave ) CSPAudioHandler( ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPAudioHandler::~CSPAudioHandler( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPAudioHandler::~CSPAudioHandler()" ); + delete iMuteListener; + delete iIncallLoudspeakerVolumeListener; + delete iIncallEarVolumeListener; + delete iAudioStreams; + } + +// --------------------------------------------------------------------------- +// CSPAudioHandler::Start +// --------------------------------------------------------------------------- +// +void CSPAudioHandler::Start() + { + iCallCount++; + CSPLOGSTRING2( CSPINT, "CSPAudioHandler::Start callcount: %d", iCallCount ); + + if ( iCallCount == 1 ) + { + iAudioStreams->StartStreams(); + } + } + +// --------------------------------------------------------------------------- +// CSPAudioHandler::Stop +// --------------------------------------------------------------------------- +// +void CSPAudioHandler::Stop() + { + CSPLOGSTRING2( CSPINT, "CSPAudioHandler::Stop callcount: %d", iCallCount ); + if ( iCallCount == 1 ) + { + iAudioStreams->StopStreams(); + iCallCount--; + } + else if ( iCallCount > 1 ) + { + iCallCount--; + } + } + +// --------------------------------------------------------------------------- +// From MCSPPubSubObserver +// CSPAudioHandler::HandleNotifyPSL +// --------------------------------------------------------------------------- +// +void CSPAudioHandler::HandleNotifyPSL( const TUid /*aUid*/, const TInt& /*aKey*/, + const TRequestStatus& /*aStatus*/ ) + { + TInt muteVal; + TInt err = iMuteListener->Get( muteVal ); + if ( err == KErrNone && muteVal == EPSTelMicMuteOn ) + { + CSPLOGSTRING2( CSPINT, + "CSPAudioHandler::HandleNotifyPSL_MUTE %d", muteVal); + #if !defined(__WINSCW__) + iAudioStreams->SetMuted(); + #endif //__WINSCW__ + } + else if ( err == KErrNone ) + { + CSPLOGSTRING2( CSPINT, + "CSPAudioHandler::HandleNotifyPSL_UNMUTE %d", muteVal); + #if !defined(__WINSCW__) + // Change when gain is really changed + iAudioStreams->SetUnmuted(); + #endif //__WINSCW__ + } + } + +// --------------------------------------------------------------------------- +// From MCSPCenRepObserver +// CSPAudioHandler::HandleNotifyCenRepL +// --------------------------------------------------------------------------- +// +void CSPAudioHandler::HandleNotifyCenRepL( const TUid /*aUid*/, + const TUint32 aKey, + TInt aVal ) + { + if ( aKey == KTelIncallLoudspeakerVolume ) + { + CSPLOGSTRING( CSPINT, "CSPAudioHandler::HandleNotifyCenRepL IncallLoudspeaker" ); + iAudioStreams->VolumeChangedLoudspeaker( aVal ); + } + else if ( aKey == KTelIncallEarVolume ) + { + CSPLOGSTRING( CSPINT, "CSPAudioHandler::HandleNotifyCenRepL IncallEar" ); + iAudioStreams->VolumeChangedEar( aVal ); + } + else + { + CSPLOGSTRING( CSPINT, "CSPAudioHandler::HandleNotifyCenRepL UNKNOWN" ); + } + } + +// --------------------------------------------------------- +// CSPAudioHandler::InitializeComplete +// +// Handles DevSound initialisation callback +// --------------------------------------------------------- +// +void CSPAudioHandler::InitializeComplete( TInt aError ) + { + if ( KErrNone != aError ) + { + // If initialisation failed, volume can not be adjusted + CSPLOGSTRING2( CSPERROR, + "CSPAudioHandler::InitializeComplete Error:%d", aError ); + } + else + { + CSPLOGSTRING( CSPINT, + "CSPAudioHandler::InitializeComplete"); + } + } + +// --------------------------------------------------------- +// CSPAudioHandler::BufferToBeFilled +// --------------------------------------------------------- +// +void CSPAudioHandler::BufferToBeFilled( CMMFBuffer* /*aBuffer*/ ) + { + } + +// --------------------------------------------------------- +// CSPAudioHandler::BufferToBeEmptied() +// Not supported +// --------------------------------------------------------- +// +void CSPAudioHandler::BufferToBeEmptied( CMMFBuffer* /*aBuffer*/ ) + { + } + +// --------------------------------------------------------- +// CSPAudioHandler::PlayError +// Not supported +// --------------------------------------------------------- +// +void CSPAudioHandler::PlayError( TInt /*aError*/ ) + { + } + +// --------------------------------------------------------- +// CSPAudioHandler::RecordError +// Not supported +// --------------------------------------------------------- +// +void CSPAudioHandler::RecordError( TInt /*aError*/ ) + { + } + +// --------------------------------------------------------- +// CSPAudioHandler::ConvertError +// Not supported +// --------------------------------------------------------- +// +void CSPAudioHandler::ConvertError( TInt /*aError*/ ) + { + } + +// --------------------------------------------------------- +// CSPAudioHandler::DeviceMessage +// Not supported +// --------------------------------------------------------- +// +void CSPAudioHandler::DeviceMessage( TUid /*aMessageType*/, const TDesC8& /*aMsg*/ ) + { + } + +// --------------------------------------------------------- +// CSPAudioHandler::ToneFinished +// Not supported +// --------------------------------------------------------- +// +void CSPAudioHandler::ToneFinished( TInt /*aError*/ ) + { + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPAudioHandler::CSPAudioHandler( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPAudioHandler::CSPAudioHandler()" ); + iCallCount = 0; // Active calls count + } + +// --------------------------------------------------------------------------- +// Second phase construction. +// --------------------------------------------------------------------------- +// +void CSPAudioHandler::ConstructL() + { + RProperty::TType type( RProperty::EInt ); + TSecurityPolicy readPolicy( ECapability_None ); + TSecurityPolicy writePolicy( ECapabilityWriteDeviceData ); + + RProperty::Define( KPSUidTelMicrophoneMuteStatus, + KTelMicrophoneMuteState, + type, + readPolicy, + writePolicy ); + + iMuteListener = CSPPubSubListener::NewL( + KPSUidTelMicrophoneMuteStatus, + KTelMicrophoneMuteState, + this ); + + iIncallLoudspeakerVolumeListener = CSPCenRepListener::NewL( KCRUidInCallVolume, + KTelIncallLoudspeakerVolume, this ); + + iIncallEarVolumeListener = CSPCenRepListener::NewL( KCRUidInCallVolume, + KTelIncallEarVolume, this ); + + iAudioStreams = CSPAudioStreams::NewL(); + + // Initialize audio volumes + TInt volEar; + TInt volLoud; + + TInt volGetRes = iIncallEarVolumeListener->Get( volEar ); + CSPLOGSTRING3(CSPINT, "CSPAudioHandler::ConstructL() ear %d %d", volGetRes, volEar ); + volGetRes = iIncallLoudspeakerVolumeListener->Get( volLoud ); + CSPLOGSTRING3(CSPINT, "CSPAudioHandler::ConstructL() loudspkr %d %d", volGetRes, volLoud ); + + iAudioStreams->StoreVolumes( volEar, volLoud ); + } + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspaudiostreams.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspaudiostreams.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,419 @@ +/* +* Copyright (c) 2006 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: Starts and stops audio streams. +* +*/ + + +#include "cspaudiostreams.h" +#include "cspmicrophone.h" +#include "cspspeaker.h" +#include "csplogger.h" +#include "mcspaudiostreamobserver.h" +#include "csptimer.h" + +#include + +/** +* Timeout initial value. +*/ +const TInt KTimeoutInitial = 200000; // 0.2s + +/** +* Double the timeout for every retry. +*/ +const TInt KTimeoutMultiplier = 2; + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// Static constructor +// --------------------------------------------------------------------------- +// +CSPAudioStreams* CSPAudioStreams::NewL( ) + { + CSPAudioStreams* self = + CSPAudioStreams::NewLC(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Static constructor +// --------------------------------------------------------------------------- +// +CSPAudioStreams* CSPAudioStreams::NewLC( ) + { + CSPAudioStreams* self = new( ELeave ) CSPAudioStreams( ); + CleanupStack::PushL( self ); + self->ConstructL( ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CSPAudioStreams::~CSPAudioStreams() + { + if (iTimer) + { + iTimer->CancelNotify(); + delete iTimer; + } + + delete iSpeaker; + delete iMic; + delete iAudioRouting; + } + +// --------------------------------------------------------------------------- +// Sets observer for audio stream. +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::SetAudioStreamObserver( + MCSPAudioStreamObserver& aObserver ) + { + iStreamObserver = &aObserver; + } + +// --------------------------------------------------------------------------- +// Gives access to mic +// --------------------------------------------------------------------------- +// +CSPMicrophone& CSPAudioStreams::Mic() const + { + return *iMic; + } + +// --------------------------------------------------------------------------- +// Gives access to speaker +// --------------------------------------------------------------------------- +// +CSPSpeaker& CSPAudioStreams::Speaker() const + { + return *iSpeaker; + } + +// --------------------------------------------------------------------------- +// From class MCSPAudioStream +// Activates mic and speaker. +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::StartStreams() + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::StartStreams"); + + if( !IsMicAndSpeakerStarted() ) + { + StartMicAndSpeaker(); + + if( iStreamObserver ) + { + iStreamObserver->AudioStreamsStarted(); + } + } + } + +// --------------------------------------------------------------------------- +// From class MCSPAudioStream +// Deactivates mic and speaker if the streams are active or they are +// activating. +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::StopStreams() + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::StopStreams"); + + if( IsMicAndSpeakerStarted() ) + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::StopStreams Stopping"); + iTimer->CancelNotify(); + iTimeout = KTimeoutInitial; + if( iStreamObserver ) + { + iStreamObserver->AudioStreamsGoingToStop(); + } + iMic->Deactivate(); + iSpeaker->Deactivate(); + } + } + +// --------------------------------------------------------------------------- +// CSPAudioStreams::VolumeChangedEar +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::VolumeChangedEar(TInt aVolume) + { + CSPLOGSTRING2(CSPINT, "CSPAudioStreams::SetVolume %d", aVolume); + iVolumeEar = aVolume; + iSpeaker->SetVolume( aVolume ); + } + +// --------------------------------------------------------------------------- +// CSPAudioStreams::VolumeChangedLoudspeaker +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::VolumeChangedLoudspeaker(TInt aVolume) + { + CSPLOGSTRING2(CSPINT, "CSPAudioStreams::SetVolume %d", aVolume); + iVolumeLoudspeaker = aVolume; + iSpeaker->SetVolume( aVolume ); + } + +// --------------------------------------------------------------------------- +// CSPAudioStreams::StoreVolumes +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::StoreVolumes(TInt aVolumeEar, TInt aVolumeLoudspeaker ) + { + iVolumeEar = aVolumeEar; + iVolumeLoudspeaker = aVolumeLoudspeaker; + } + +// --------------------------------------------------------------------------- +// CSPAudioStreams::ApplyVolume +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::ApplyVolume(TInt aVolumeEar, TInt aVolumeLoudspeaker ) + { + CTelephonyAudioRouting::TAudioOutput current = iAudioRouting->Output(); + if ( current == CTelephonyAudioRouting::ELoudspeaker ) + { + CSPLOGSTRING( CSPINT, "CSPAudioStreams::ApplyVolume Loudspeaker Active: SetVolume" ); + iSpeaker->SetVolume( aVolumeLoudspeaker ); + } + // else: ear volume should be used + else if ( current == CTelephonyAudioRouting::EHandset ) + { + CSPLOGSTRING( CSPINT, "CSPAudioStreams::ApplyVolume Ear Active: SetVolume" ); + iSpeaker->SetVolume( aVolumeEar ); + } + else + { + CSPLOGSTRING2( CSPINT, "CSPAudioStreams::ApplyVolume UNKNOWN AUDIO OUTPUT MODE %d", current ); + // No volume setting + iSpeaker->SetVolume( aVolumeEar ); + } + } + +// --------------------------------------------------------------------------- +// CSPAudioStreams::SetMuted +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::SetMuted() + { + iMic->SetMuted(); + } + +// --------------------------------------------------------------------------- +// CSPAudioStreams::SetUnmuted +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::SetUnmuted() + { + iMic->SetUnmuted(); + } + +// --------------------------------------------------------------------------- +// From class MCSPAudioStreamObserver +// If speaker is already active then the streams are active. +// If speker is not active and it is not activating then speaker then +// activation has failed and start retry timer. +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::MicActivatedSuccessfully() + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::MicActivatedSuccessfully" ); + if( iSpeaker->IsActive() ) + { + // Mic and speaker are active. + AudioStreamsStarted(); + } + else if( !iSpeaker->IsActivationOngoing() ) + { + // Start retry timer for activating speaker again + StartTimer(); + } + } + +// --------------------------------------------------------------------------- +// From class MCSPAudioStreamObserver +// If mic is already active then streams are active. +// If mic is not active and it is not activating then mic activation has +// failed and start retry timer. +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::SpeakerActivatedSuccessfully() + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::SpeakerActivatedSuccessfully" ); + if( iMic->IsActive() ) + { + // Mic and speaker are active. + AudioStreamsStarted(); + } + else if( !iMic->IsActivationOngoing() ) + { + // Start retry timer for activating mic again. + StartTimer(); + } + } + +// --------------------------------------------------------------------------- +// From class MCSPAudioStreamObserver +// Starts timer for trying activation again. +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::MicActivationFailed() + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::MicActivationFailed" ); + + // Dont start timer until speaker has stopped activation. + if( !iSpeaker->IsActivationOngoing() ) + { + StartTimer(); + } + } + +// --------------------------------------------------------------------------- +// From class MCSPAudioStreamObserver +// Starts timer for trying activation again. +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::SpeakerActivationFailed() + { + CSPLOGSTRING(CSPINT, "PE.AudioStreams::SpeakerActivationFailed" ); + + // Dont start timer until mic has stopped activation. + if( !iMic->IsActivationOngoing() ) + { + StartTimer(); + } + } + +// --------------------------------------------------------------------------- +// From class MCSPTimerObserver +// Notify from CSPTimer that timeout passed. Try to start mic and +// speaker again. +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::TimerEvent() + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams.TimerEvent" ); + iTimeout *= KTimeoutMultiplier; + StartMicAndSpeaker(); + } + +// ----------------------------------------------------------------------------- +// CTSEAudioRouteObserver::AvailableOutputsChanged +// ----------------------------------------------------------------------------- +// +void CSPAudioStreams::AvailableOutputsChanged( + CTelephonyAudioRouting& /*aTelephonyAudioRouting*/ ) + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::AvailableOutputsChanged" ); + } + +// ----------------------------------------------------------------------------- +// CTSEAudioRouteObserver::OutputChanged +// ----------------------------------------------------------------------------- +// +void CSPAudioStreams::OutputChanged( + CTelephonyAudioRouting& /*aTelephonyAudioRouting*/ ) + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::OutputChanged" ); + ApplyVolume(iVolumeEar, iVolumeLoudspeaker); + } + +// ----------------------------------------------------------------------------- +// CSPAudioStreams::SetOutputComplete +// ----------------------------------------------------------------------------- +// +void CSPAudioStreams::SetOutputComplete( CTelephonyAudioRouting& /*aTelephonyAudioRouting*/, + TInt /*aError*/ ) + { + } + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- +// +CSPAudioStreams::CSPAudioStreams( ): iTimeout(KTimeoutInitial) + { + } + +// --------------------------------------------------------------------------- +// Second phase constructor +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::ConstructL( ) + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::ConstructL"); + + iTimer = CSPTimer::NewL(); + iMic = CSPMicrophone::NewL( *this ); + iSpeaker = CSPSpeaker::NewL( *this ); + + #if !defined(__WINSCW__) + iAudioRouting = CTelephonyAudioRouting::NewL( *this ); + #endif //__WINSCW__ + } + +// --------------------------------------------------------------------------- +// Resets timer +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::AudioStreamsStarted() + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::AudioStreamsStarted" ); + iTimeout = KTimeoutInitial; + iTimer->CancelNotify(); + } + +// --------------------------------------------------------------------------- +// Starts timer +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::StartTimer() + { + CSPLOGSTRING(CSPINT, "CSPAudioStreams::StartTimer" ); + iTimer->NotifyAfter( iTimeout, *this ); + } + +// --------------------------------------------------------------------------- +// Starts mic and speaker +// --------------------------------------------------------------------------- +// +void CSPAudioStreams::StartMicAndSpeaker() + { + // if speaker and mic is active then activation does not + // cause any actions. + iSpeaker->Activate(); + iMic->Activate(); + } + +// --------------------------------------------------------------------------- +// Indicated if mic and speaker are started or starting up. +// --------------------------------------------------------------------------- +// +TBool CSPAudioStreams::IsMicAndSpeakerStarted() + { + TBool areStreamsActive( iSpeaker->IsActive() && iMic->IsActive() ); + TBool areStreamsActivating( iMic->IsActivationOngoing() || + iSpeaker->IsActivationOngoing() || iTimer->IsNotifyOngoing() ); + + return areStreamsActive || areStreamsActivating; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspcall.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspcall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1971 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements class CSPCall which provides call functionality +* +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cspcall.h" +#include "cspetelcallrequester.h" +#include "cspetelcalleventmonitor.h" +#include "cspcallinfomonitor.h" +#include "cspetelcallstatusmonitor.h" +#include "cspetelcallcapsmonitor.h" +#include "csptransferprovider.h" +#include "cspforwardprovider.h" +#include "csplogger.h" +#include "csppanic.pan" +#include "cspconsts.h" +#include "cspaudiohandler.h" +#include "mcspcommoninfo.h" +#include "mcspsecuritysettingobserver.h" +#include "tcspskypeidparser.h" +#include "cspuuimonitor.h" +#include "cspuuimessagesender.h" + +const TInt KTimesToSplitValue = 16; + + +// --------------------------------------------------------------------------- +// CSPCall::~CSPCall +// --------------------------------------------------------------------------- +// +CSPCall::~CSPCall() + { + CSPLOGSTRING(CSPOBJECT, "CSPCall::~CSPCall <"); + + delete iParams; + iCommonInfo.IndicateHangupComplete( *this ); + + if ( iAudioHandler + && iAudioStatus == ECSPCallAudioStatusActive ) + { + iAudioStatus = ECSPCallAudioStatusInactive; + iAudioHandler->Stop(); + } + + delete iUserToUserInformation; + delete iRequester; + delete iCallEventMonitor; + delete iCallStatusMonitor; + delete iCallCapsMonitor; + delete iCallInfoMonitor; + delete iForwardProvider; + delete iTransferProvider; + delete iUUIMonitor; + delete iUUIMessageSender; + delete iSkypeId; + + iObservers.Close(); + if ( iCall.SubSessionHandle() ) + { + iCall.Close(); + } + + CSPLOGSTRING(CSPOBJECT, "CSPCall::~CSPCall >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::SetAudioHandler +// --------------------------------------------------------------------------- +// +void CSPCall::SetAudioHandler( CSPAudioHandler* aHandler ) + { + CSPLOGSTRING2(CSPINT, "CSPCall::SetAudioHandler handler: %x", aHandler); + iAudioHandler = aHandler; + } + +// --------------------------------------------------------------------------- +// CSPCall::SecuritySettingChanged +// --------------------------------------------------------------------------- +// +void CSPCall::SecuritySettingChanged( TInt aValue ) + { + switch ( aValue ) + { + case MCSPSecuritySettingObserver::ESecureCall: + { + CSPLOGSTRING(CSPINT, + "CSPCall::SecuritySettingChanged Sending 'secure call' event"); + NotifyCallEventOccurred( MCCPCallObserver::ECCPSecureCall ); + break; + } + case MCSPSecuritySettingObserver::ENotSecureCall: + { + CSPLOGSTRING(CSPINT, + "CSPCall::SecuritySettingChanged Sending 'not secure call' event"); + NotifyCallEventOccurred( MCCPCallObserver::ECCPNotSecureCall ); + break; + } + case MCSPSecuritySettingObserver::ESecureNotSpecified: + { + CSPLOGSTRING(CSPINT, + "CSPCall::SecuritySettingChanged Sending SecureNotSpecified"); + NotifyCallEventOccurred( MCCPCallObserver::ECCPSecureNotSpecified ); + break; + } + + default: + { + CSPLOGSTRING(CSPERROR, "CSPCall::SecuritySettingChanged, \ + unknown event"); + break; + } + } + } + +// --------------------------------------------------------------------------- +// CSPCall::RemoteAlertingToneStatusChanged +// Sends EarlyMediaStarted event to observer if network has started to +// play remote alerting tone. There is only one known use case: Network +// starts playing alerting tone during connecting state. +// +// This RemoteAlertingToneStatusChanged is called for every call, +// so it is calls responsibility to determine if the +// observer should be notified. +// --------------------------------------------------------------------------- +// +void CSPCall::RemoteAlertingToneStatusChanged( + RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus ) + { + CSPLOGSTRING2(CSPINT, + "CSPCall::RemoteAlertingToneStatusChanged new status: %d", aNewStatus ); + + if ( aNewStatus == RMmCustomAPI::EUiStopTone || + aNewStatus == RMmCustomAPI::EUiNoTone ) // NW tells us to stop playing + { + // Connecting is only state where network starts playing the tone. + if ( iCallState == MCCPCallObserver::ECCPStateConnecting ) + { + NotifyCallEventOccurred( + MCCPCallObserver::ECCCSPEarlyMediaStarted ); + } + } + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyCallStateChangedETel +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyCallStateChangedETel( RMobileCall::TMobileCallStatus aState ) + { + CSPLOGSTRING3(CSPINT, + "CSPCall::NotifyCallStateChangedETel < state: %d this: %x", + aState, this ); + switch ( aState ) + { + /* + Cannot receive any mapping call statuses from ETel to following + optional states: + + ECCPStateForwarding MO call is being forwarded at receiver end + ECCPStateQueued Call is queued locally. + + The commented observer calls are for CS specific call states. + */ + + // Indicates that the call is idle or unknown. + case RMobileCall::EStatusIdle: + case RMobileCall::EStatusUnknown: + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Idle"); + + // If audio still active + if ( iAudioStatus == ECSPCallAudioStatusActive + && iAudioHandler + && ( iParams->CallType() == CCPCall::ECallTypeCSVoice + || iParams->CallType() == CCPCall::ECallTypeVideo ) ) + { + iAudioStatus = ECSPCallAudioStatusInactive; + iAudioHandler->Stop(); + } + + // Notify error in case not going through disconnecting + if ( iCallState != MCCPCallObserver::ECCPStateDisconnecting + && !iTerminationErrorNotified ) + { + CheckAndNotifyTerminationError(); + } + + NotifyCallStateChanged( MCCPCallObserver::ECCPStateIdle ); + iCommonInfo.IndicateHangupComplete( *this ); + break; + } + // The call is dialling. + case RMobileCall::EStatusDialling: + CSPLOGSTRING(CSPINT, "CSPCall callstate Dialling"); + { + // Start streams also for MO video call to prevent audio routing problems + // with other applications. + if ( iAudioHandler + && ( iParams->CallType() == CCPCall::ECallTypeCSVoice + || iParams->CallType() == CCPCall::ECallTypeVideo ) ) + { + iAudioStatus = ECSPCallAudioStatusActive; + iAudioHandler->Start(); + } + + iDontReportTerm = EFalse; + NotifyCallStateChanged( MCCPCallObserver::ECCPStateDialling ); + break; + } + //Indicates that the MT call is ringing but not answered yet by + // the local user + case RMobileCall::EStatusRinging: + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Ringing"); + NotifyCallStateChanged( MCCPCallObserver::ECCPStateRinging ); + break; + } + // Indicates that the local user has answered the MT call but + // the network has not acknowledged the call connection yet. + case RMobileCall::EStatusAnswering: + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Answering"); + + if ( !iMobileOriginated + && iAudioHandler + && iAudioStatus == ECSPCallAudioStatusInactive + && iParams->CallType() == CCPCall::ECallTypeCSVoice ) + { + iAudioStatus = ECSPCallAudioStatusActive; + iAudioHandler->Start(); + } + + NotifyCallStateChanged( MCCPCallObserver::ECCPStateAnswering ); + break; + } + // MO Call: the network notifies to the MS that the remote party + // is now ringing. + case RMobileCall::EStatusConnecting: + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETelConnecting"); + RMmCustomAPI::TRemoteAlertingToneStatus tone = + iCommonInfo.GetRemoteAlertingToneStatus(); + if ( tone == RMmCustomAPI::EUiNoTone || + tone == RMmCustomAPI::EUiStopTone ) + { + NotifyCallStateChangedWithInband( MCCPCallObserver::ECCPStateConnecting ); + } + else + { + NotifyCallStateChanged( MCCPCallObserver::ECCPStateConnecting ); + } + break; + } + // Indicates that call is connected and active. + case RMobileCall::EStatusConnected: + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Connected"); + + iDontReportTerm = ETrue; + NotifyCallStateChanged( MCCPCallObserver::ECCPStateConnected ); + + // Agreement with TSY is that the + // COLP number is available in connected state. + NotifyRemotePartyNumberChanged(); + + // Stop streams for MO video call so that Video Telephony can + // receive RemCon commands instead of Phone. + if ( iMobileOriginated + && iAudioHandler + && iAudioStatus == ECSPCallAudioStatusActive + && iParams->CallType() == CCPCall::ECallTypeVideo ) + { + iAudioStatus = ECSPCallAudioStatusInactive; + iAudioHandler->Stop(); + } + break; + } + // Indicates that call is disconnecting. (Same as RCall::HangingUp) + case RMobileCall::EStatusDisconnecting: + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Disconnecting"); + + if ( !iTerminationErrorNotified ) + { + CheckAndNotifyTerminationError(); + } + + NotifyCallStateChanged( MCCPCallObserver::ECCPStateDisconnecting ); + break; + } + // Indicates that the call is disconnecting with inband data + // (to enable the network to send an audio tone), signifying + // that the call is not to be released until user terminates call + case RMobileCall::EStatusDisconnectingWithInband: + { + CSPLOGSTRING(CSPINT, + "CSPCall::NotifyCallStateChangedETel DisconnectingWithInband"); + + if ( !iTerminationErrorNotified ) + { + CheckAndNotifyTerminationError(); + } + + NotifyCallStateChangedWithInband( + MCCPCallObserver::ECCPStateDisconnecting ); + break; + } + // Indicates that the call is connected but on hold. + case RMobileCall::EStatusHold: + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Hold"); + NotifyCallStateChanged( MCCPCallObserver::ECCPStateHold ); + break; + } + case RMobileCall::EStatusTransferring: + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Transferring"); + NotifyCallStateChanged( MCCPCallObserver::ECCPStateTransferring ); + break; + } + + // Indicates that call is undergoing temporary channel loss + // and it may or may not be reconnected. + case RMobileCall::EStatusReconnectPending: // fall through + //Indicates that the call is the non-active half of an alternating + // call. This call is waiting for its active half or the remote + // end to switch alternating call mode. + case RMobileCall::EStatusWaitingAlternatingCallSwitch: // fall through + case RMobileCall::EStatusTransferAlerting: + { + CSPLOGSTRING2(CSPINT, + "CSPCall::NotifyCallStateChangedETel no special handling for state %d", + aState); + break; + } + + default: + { + CSPLOGSTRING(CSPERROR, + "CSPCall::NotifyCallStateChangedETel callstate UNKNOWN"); + break; + } + } + CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyCallStateChangedETel >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyCallEventOccurred +// Notifies observers about call events +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyCallEventOccurred( + MCCPCallObserver::TCCPCallEvent aEvent ) + { + CSPLOGSTRING2(CSPINT, + "CSPCall::NotifyCallEventOccurred < event: %d", aEvent); + + TInt obsCount = iObservers.Count(); + for ( TInt i = 0; i < obsCount; i++ ) + { + CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred obs=%d",i); + MCCPCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->CallEventOccurred( aEvent, this ); + } + + CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred ok obs=%d",i); + } + + CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred > event: %d", aEvent); + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyTransferCallEventOccurred +// Forward notification of transfer event to it's provider +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyTransferCallEventOccurred( + MCCPTransferObserver::TCCPTransferEvent aEvent ) + { + CSPLOGSTRING2(CSPINT, "CSPCall::NotifyTransferCallEventOccurred %d", aEvent); + // forward the method call to CSPTransferProvider object + iTransferProvider->TransferEventOccurred( aEvent ); + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyForwardEventOccurred +// Notifies observers about call events +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyForwardEventOccurred( + MCCPForwardObserver::TCCPForwardEvent aEvent ) + { + CSPLOGSTRING2(CSPINT, "CSPCall::NotifyForwardEventOccurred %d", aEvent); + iForwardProvider->NotifyForwardEventOccurred( aEvent ); + } + +// --------------------------------------------------------------------------- +// CSPCall::CallName +// Get call name +// --------------------------------------------------------------------------- +// +void CSPCall::CallName( TName& aCallName ) + { + CSPLOGSTRING(CSPINT, "CSPCall::CallName"); + aCallName.Zero(); + aCallName.Append( iCallName ); + } + +// --------------------------------------------------------------------------- +// CSPCall::DialRequestFailed +// Handles situations when dial fails +// --------------------------------------------------------------------------- +// +void CSPCall::DialRequestFailed( TInt aErrorCode ) + { + CSPLOGSTRING(CSPERROR, "CSPCall::DialRequestFailed"); + iDialCompletionCode = aErrorCode; + + // If state has not changed + // ( e.g. in case of dial could not be initiated by network problem) + if ( iCallStatusMonitor->State() == + RMobileCall::RMobileCall::EStatusUnknown ) + { + NotifyErrorOccurred( iRequester->MapError( aErrorCode ) ); + + // Force release since otherwise call remains unreleased + CSPLOGSTRING(CSPERROR, "CSPCall::DialRequestFailed() Force Idle"); + NotifyCallStateChanged( MCCPCallObserver::ECCPStateIdle ); + } + + // If dial request has completed after notifying disconnecting state + else if ( iCallState == MCCPCallObserver::ECCPStateDisconnecting + && !iTerminationErrorNotified ) + { + CheckAndNotifyTerminationError(); + } + } + +// --------------------------------------------------------------------------- +// CSPCall::EmergencyDialRequestFailed +// Handles situations when emergency dial fails +// --------------------------------------------------------------------------- +// +void CSPCall::EmergencyDialRequestFailed( TInt /*aErrorCode*/ ) + { + CSPLOGSTRING(CSPERROR, "CSPCall::EmergencyDialRequestFailed"); + + // Always same error code for CCE + NotifyErrorOccurred( ECCPEmergencyFailed ); + + // Mark that exit code will not be used + iTerminationErrorNotified = ETrue; + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyErrorOccurred +// Notifies observers about errors +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyErrorOccurred( TCCPError aError ) + { + CSPLOGSTRING2(CSPERROR, "CSPCall::NotifyErrorOccurred err %d", aError ); + + TInt obsCount = iObservers.Count(); + for ( TInt i = 0; i < obsCount; i++ ) + { + MCCPCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->ErrorOccurred( aError, this ); + } + } + } + +// --------------------------------------------------------------------------- +// CSPCall::CallCapsChanged +// Notifies observers about new capabilities. +// --------------------------------------------------------------------------- +// +void CSPCall::CallCapsChanged( const TUint32 aCapsFlags ) + { + CSPLOGSTRING2(CSPERROR, "CSPCall::CallCapsChanged %b", aCapsFlags ); + iCapsFlags = aCapsFlags; + TInt obsCount = iObservers.Count(); + for ( TInt i = 0; i < obsCount; i++ ) + { + MCCPCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->CallCapsChanged( aCapsFlags, this ); + } + } + } + +// --------------------------------------------------------------------------- +// From class MCCPCSCall +// CSPCall::GetMobileCallInfo +// --------------------------------------------------------------------------- +// +TInt CSPCall::GetMobileCallInfo( TDes8& aCallInfo ) const + { + CSPLOGSTRING(CSPINT, "CSPCall::GetMobileCallInfo"); + return iCall.GetMobileCallInfo( aCallInfo ); + } + +// --------------------------------------------------------------------------- +// From class MCCPCSCall +// CSPCall::GetMobileDataCallCaps +// --------------------------------------------------------------------------- +// +TInt CSPCall::GetMobileDataCallCaps( TDes8& /*aCaps*/ ) const + { + CSPLOGSTRING(CSPERROR, + "CSPCall::GetMobileDataCallCaps ERROR, Not supported"); + return KErrNotSupported; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Dial +// --------------------------------------------------------------------------- +// +TInt CSPCall::Dial() + { + CSPLOGSTRING( CSPREQIN, "CSPCall::Dial" ); + // Parameters not given, must create empty descriptor. + TBuf8<1> params; + return Dial(params); + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::RemoteParty +// --------------------------------------------------------------------------- +// +const TDesC& CSPCall::RemoteParty() const + { + CSPLOGSTRING(CSPREQIN, "CSPCall::RemoteParty"); + return iRemotePartyNumber; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::RemotePartyName +// --------------------------------------------------------------------------- +// +const TDesC& CSPCall::RemotePartyName() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::RemotePartyName"); + return iRemotePartyName; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::DialledParty +// --------------------------------------------------------------------------- +// +const TDesC& CSPCall::DialledParty() const + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::DialledParty %S", &iRemotePartyNumber); + return iRemotePartyNumber; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Answer +// --------------------------------------------------------------------------- +// +TInt CSPCall::Answer() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Answer <"); + TInt ret( KErrNone ); + + if ( iCallState == MCCPCallObserver::ECCPStateRinging + || iCallState == MCCPCallObserver::ECCPStateQueued ) + { + if( iMobileOriginated ) + { + ret = KErrGeneral; + } + else if( iCallState != MCCPCallObserver::ECCPStateRinging && + iCallState != MCCPCallObserver::ECCPStateQueued ) + { + ret = KErrAccessDenied; + } + else + { + ret = iCommonInfo.IndicateAnswerRequest( *this ); + } + } + else + { + // Not correct state for answer + ret = KErrNotReady; + } + + CSPLOGSTRING2(CSPREQIN, "CSPCall::Answer > ret %d", ret); + return ret; + } + +// --------------------------------------------------------------------------- +// From class MCCPCallCommandHandling +// CSPCall::PerformAnswerRequest +// --------------------------------------------------------------------------- +// +TInt CSPCall::PerformAnswerRequest() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::PerformAnswerRequest"); + + TInt ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeAnswer ); + CSPLOGSTRING3(CSPINT, + "CSPCall::Answer request performed, call state %d ret: %d", iCallState, ret); + + return ret; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Reject +// --------------------------------------------------------------------------- +// +TInt CSPCall::Reject() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Reject <"); + TInt ret; + if ( iCallState == MCCPCallObserver::ECCPStateRinging + || iCallState == MCCPCallObserver::ECCPStateQueued + || iCallState == MCCPCallObserver::ECCPStateAnswering ) + { + CSPLOGSTRING( CSPREQIN, "CSPCall::Reject 2" ); + ret = HangUp(); + } + else + { + ret = KErrNotReady; + } + CSPLOGSTRING2(CSPREQIN, "CSPCall::Reject > ret: %d", ret ); + return ret; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Queue +// --------------------------------------------------------------------------- +// +TInt CSPCall::Queue() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Queue"); + TBool callWaitingState; + iDontReportTerm = ETrue; + + TRAPD( res, iCommonInfo.GetCallWaitingL( *iParams, callWaitingState ) ); + if( res == KErrNone ) + { + if ( callWaitingState ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Queue Call Waiting On"); + iCallState = MCCPCallObserver::ECCPStateQueued; + + // Notify Queued state + TInt obsCount = iObservers.Count ( ); + for (TInt i = 0; i < obsCount; i++ ) + { + MCCPCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->CallStateChanged ( iCallState, this ); + } + } + CSPLOGSTRING(CSPOBJECT, "CSPCall::Queue ok"); + + return KErrNone; + } + else + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Queue Call Waiting Off"); + } + } + else + { + CSPLOGSTRING2(CSPERROR, + "CSPCall::Queue Error %d with CR. Call Waiting Off", + res); + } + + return KErrNotSupported; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Ringing +// --------------------------------------------------------------------------- +// +TInt CSPCall::Ringing() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Ringing"); + iDontReportTerm = ETrue; + + // Ringing state is accepted because MT-call goes to ringing + // state in the beginning based on ETel state maching. + if ( iCallState == MCCPCallObserver::ECCPStateIdle || + iCallState == MCCPCallObserver::ECCPStateRinging ) + { + NotifyRingingState(); + return KErrNone; + } + else if ( iCallState == MCCPCallObserver::ECCPStateAnswering ) + { + // Do nothing if already in Answering state (autoanswer). + return KErrNone; + } + + return KErrNotReady; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::HangUp +// --------------------------------------------------------------------------- +// +TInt CSPCall::HangUp() + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::HangUp this: %x", this); + TInt ret( KErrNone ); + + CSPEtelCallRequester::TRequestType req = iRequester->Request(); + if ( req == CSPEtelCallRequester::ERequestTypeDial || + ( req == CSPEtelCallRequester::ERequestTypeDialEmergency ) ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 1: Cancel ongoing dial"); + ret = iRequester->DialCancel(); + CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp Canceled"); + } + else if ( req == CSPEtelCallRequester::ERequestTypeHangup ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 2"); + ret = KErrAlreadyExists; + } + else if ( req == CSPEtelCallRequester::ERequestTypeNone + && iCallState != MCCPCallObserver::ECCPStateIdle ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 3"); + ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeHangup ); + iCommonInfo.IndicateActiveHangup( *this ); + } + else if ( req == CSPEtelCallRequester::ERequestTypeNone ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 4"); + ret = KErrAlreadyExists; + } + else + { + CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 5"); + // Request pending, must be canceled + iRequester->Cancel(); + ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeHangup ); + iCommonInfo.IndicateActiveHangup( *this ); + } + + return ret; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Cancel +// --------------------------------------------------------------------------- +// +TInt CSPCall::Cancel() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Cancel"); + return HangUp(); + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Hold +// --------------------------------------------------------------------------- +// +TInt CSPCall::Hold() + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::Hold this: %x", this); + TInt ret; + + if ( iCallState == MCCPCallObserver::ECCPStateConnected ) + { + CSPLOGSTRING(CSPREQOUT, "CSPCall::Hold make request"); + + // Set call on hold + ret = iRequester->MakeRequest( + CSPEtelCallRequester::ERequestTypeHold ); + if ( ret != KErrNone ) + { + CSPLOGSTRING2(CSPERROR, + "CSPCall::Hold ERROR: %d", ret); + } + } + else if ( iCallState == MCCPCallObserver::ECCPStateHold ) + { + CSPLOGSTRING(CSPERROR, "CSPCall::Hold : already held"); + ret = KErrAlreadyExists; + } + else + { + CSPLOGSTRING(CSPERROR, "CSPCall::Hold not allowed"); + ret = KErrNotReady; + } + + return ret; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Resume +// --------------------------------------------------------------------------- +// +TInt CSPCall::Resume() + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::Resume this: %x", this); + TInt ret; + + if ( iCallState == MCCPCallObserver::ECCPStateHold ) + { + CSPLOGSTRING(CSPREQOUT, "CSPCall::Resume request"); + + ret = iRequester->MakeRequest( + CSPEtelCallRequester::ERequestTypeResume ); + if ( KErrNone != ret ) + { + CSPLOGSTRING2(CSPERROR, "CSPCall::Resume ERROR %d", ret); + } + } + else if ( iCallState == MCCPCallObserver::ECCPStateConnected ) + { + CSPLOGSTRING(CSPERROR, "CSPCall::Resume already connected" ); + ret = KErrAlreadyExists; + } + else + { + CSPLOGSTRING(CSPERROR, "CSPCall::Resume not held state" ); + ret = KErrNotReady; + } + + return ret; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Swap +// --------------------------------------------------------------------------- +// +TInt CSPCall::Swap() + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::Swap this: %x", this); + TInt ret; + if ( iCallState == MCCPCallObserver::ECCPStateConnected + || iCallState == MCCPCallObserver::ECCPStateHold ) + { + ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeSwap ); + if ( ret ) + { + CSPLOGSTRING2( CSPERROR, "CSPCall::Swap Error %d", ret ); + } + } + else + { + ret = KErrNotReady; + } + return ret; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::IsMobileOriginated +// --------------------------------------------------------------------------- +// +TBool CSPCall::IsMobileOriginated() const + { + CSPLOGSTRING(CSPREQIN, "CSPCall::IsMobileOriginated"); + return iMobileOriginated; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::State +// --------------------------------------------------------------------------- +// +MCCPCallObserver::TCCPCallState CSPCall::State() const + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::State %d", iCallState); + return iCallState; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Uid +// --------------------------------------------------------------------------- +// +TUid CSPCall::Uid() const + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::Uid %d", KCSPImplementationUid); + return KCSPImplementationUid; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Caps +// --------------------------------------------------------------------------- +// +MCCPCallObserver::TCCPCallControlCaps CSPCall::Caps( ) const + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::Caps %b", iCapsFlags ); + return (MCCPCallObserver::TCCPCallControlCaps) iCapsFlags; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::SetParameters +// --------------------------------------------------------------------------- +// +void CSPCall::SetParameters( const CCCPCallParameters& /*aNewParams*/ ) + { + CSPLOGSTRING(CSPOBJECT, "CSPCall::SetParameters ERROR Can't set params"); + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Parameters +// --------------------------------------------------------------------------- +// +const CCCPCallParameters& CSPCall::Parameters() const + { + CSPLOGSTRING(CSPINT, "CSPCall::Parameters"); + return *iParams; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::TransferProvider +// --------------------------------------------------------------------------- +// +MCCPTransferProvider* CSPCall::TransferProviderL(const MCCPTransferObserver& + aObserver ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::TransferProvider"); + iTransferProvider->AddObserverL( aObserver ); + return iTransferProvider; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::ForwardProvider +// --------------------------------------------------------------------------- +// +MCCPForwardProvider* CSPCall::ForwardProviderL( + const MCCPForwardObserver& aObserver ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::ForwardProvider"); + iForwardProvider->AddObserverL( aObserver ); + return iForwardProvider; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::AddObserverL +// --------------------------------------------------------------------------- +// +void CSPCall::AddObserverL( const MCCPCallObserver& aObserver ) + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::AddObserverL %x", &aObserver); + if ( iObservers.Find( &aObserver ) == KErrNotFound ) + { + iObservers.AppendL( &aObserver ); + } + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// Removes observer. +// --------------------------------------------------------------------------- +// +TInt CSPCall::RemoveObserver( const MCCPCallObserver& aObserver ) + { + CSPLOGSTRING2(CSPREQIN, "CSPCall::RemoveObserver %x", &aObserver); + + TInt found = iObservers.Find( &aObserver ); + if ( found != KErrNotFound ) + { + iObservers.Remove( found ); + return KErrNone; + } + + return found; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::IsCallForwarded +// --------------------------------------------------------------------------- +// +TBool CSPCall::IsCallForwarded( ) const + { + CSPLOGSTRING(CSPREQIN, "CSPCall::IsCallForwarded <"); + TBool ret( EFalse ); + TInt err( KErrNone ); + RMobileCall::TMobileCallInfoV3 callInfo; + RMobileCall::TMobileCallInfoV3Pckg pck( callInfo ); + err = iCall.GetMobileCallInfo( pck ); + if (err == KErrNone ) + { + ret = callInfo.iForwarded; + } + + CSPLOGSTRING2(CSPREQIN, + "CSPCall::IsCallForwarded > forwarder: %d", ret ); + + return ret; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::IsSecured +// --------------------------------------------------------------------------- +// +TBool CSPCall::IsSecured( ) const + { + CSPLOGSTRING(CSPREQIN, "CSPCall::IsSecured"); + return iCommonInfo.NetworkSecurityStatus(); + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::SecureSpecified +// --------------------------------------------------------------------------- +// +TBool CSPCall::SecureSpecified( ) const + { + CSPLOGSTRING(CSPREQIN, "CSPCall::SecureSpecified"); + return iCommonInfo.SecureSpecified(); + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::Tone +// --------------------------------------------------------------------------- +// +TCCPTone CSPCall::Tone() const + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Tone <"); + TCCPTone tone( ECCPNoSoundSequence ); + + if ( iCallState == MCCPCallObserver::ECCPStateConnecting ) + { + RMmCustomAPI::TRemoteAlertingToneStatus ts = iCommonInfo.GetRemoteAlertingToneStatus(); + + if (ts == RMmCustomAPI::EUiRbtTone ) + { + tone = ECCPRemoteAlerting; + } + else if ( ts == RMmCustomAPI::EUiStopTone ) + { + tone = ECCPNoSoundSequence; + } + else + { + // No tone + tone = ECCPNoSoundSequence; + } + } + else + { + // Handle disconnecting tones + TInt callDisconnectingError = ExitCodeError(); + CSPLOGSTRING2(CSPINT, "CSPCall::Tone exit code err: %d", callDisconnectingError); + + switch( callDisconnectingError ) + { + case KErrNone: + // GSM: DIAL TONE (optional) - not used in Nokia phones + CSPLOGSTRING(CSPERROR, "CSPCall::Tone: No sound"); + break; + case KErrGsmCCUserBusy: + // GSM: SUBSCRIBER BUSY + tone = ECCPToneUserBusy; + CSPLOGSTRING(CSPINT, "CSPCall::Tone: Subscriber Busy"); + break; + // Fall through + case KErrGsmCCNumberChanged: + case KErrGsmCCResponseToStatusEnquiry: + case KErrGsmCCNormalUnspecified: + // GSM: NONE, Nokia phones: radio path not available + tone = ECCPToneRadioPathNotAvailable; + CSPLOGSTRING(CSPINT, "CSPCall::Tone: RadioPathNotAvailable"); + break; + case KErrGsmCCNoChannelAvailable: + case KErrGsmCCTemporaryFailure: + case KErrGsmCCSwitchingEquipmentCongestion: + case KErrGsmCCRequestedChannelNotAvailable: + case KErrGsmCCQualityOfServiceNotAvailable: + case KErrGsmCCBearerCapabilityNotCurrentlyAvailable: + // GSM: CONGESTION + tone = ECCPToneCongestion; + CSPLOGSTRING(CSPINT, "CSPCall::Tone: Congestion"); + break; + case KErrGsmCCUnassignedNumber: + case KErrGsmCCNoRouteToDestination: + case KErrGsmCCChannelUnacceptable: + case KErrGsmCCOperatorDeterminedBarring: + case KErrGsmCCUserNotResponding: + case KErrGsmCCUserAlertingNoAnswer: + case KErrGsmCCCallRejected: + case KErrGsmCCNonSelectedUserClearing: + case KErrGsmCCDestinationOutOfOrder: + case KErrGsmCCInvalidNumberFormat: + case KErrGsmCCFacilityRejected: + case KErrGsmCCNetworkOutOfOrder: + case KErrGsmCCAccessInformationDiscarded: + case KErrGsmCCResourceNotAvailable: + case KErrGsmCCRequestedFacilityNotSubscribed: + case KErrGsmCCIncomingCallsBarredInCug: + case KErrGsmCCBearerCapabilityNotAuthorised: + case KErrGsmCCServiceNotAvailable: + case KErrGsmCCBearerServiceNotImplemented: + case KErrGsmCCChannelTypeNotImplemented: + case KErrGsmCCAcmGreaterThanAcmMax: + case KErrGsmCCRequestedFacilityNotImplemented: + case KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable: + case KErrGsmCCServiceNotImplemented: + case KErrGsmCCInvalidCallReferenceValue: + case KErrGsmCCChannelDoesNotExist: + case KErrGsmCCSuspendedCallExistsButCallIdentityDoesNotWork: + case KErrGsmCCCallIdentityInUse: + case KErrGsmCCNoCallSuspended: + case KErrGsmCCRequestedCallIdentityAlreadyCleared: + case KErrGsmCCUserNotInCug: + case KErrGsmCCIncompatibleDestination: + case KErrGsmCCInvalidTransitNetworkSelection: + case KErrGsmCCIncompatibleSegmentedMessage: + case KErrGsmCCSemanticallyIncorrectMessage: + case KErrGsmCCInvalidMandatoryInformation: + case KErrGsmCCNonExistentMessageType: + case KErrGsmCCIncompatibleMessageInProtocolState: + case KErrGsmCCNonExistentInformationElement: + case KErrGsmCCConditionalIEError: + case KErrGsmCCIncompatibleMessageInCallState: + case KErrGsmCCRecoveryOnTimerExpiry: + case KErrGsmCCUnspecifiedProtocolError: + case KErrGsmCCUnspecifiedInterworkingError: + // GSM: SPECIAL INFORMATION + tone = ECCPToneSpecialInformation; + CSPLOGSTRING(CSPINT, "CSPCall::Tone: Special Information"); + break; + default: + CSPLOGSTRING(CSPERROR, "CSPCall::Tone: ERROR not found"); + break; + } + } + + CSPLOGSTRING2(CSPREQIN, "CSPCall::Tone > tone: %d", tone); + return tone; + } + +// --------------------------------------------------------------------------- +// From class MCCPCSCall +// CSPCall::NoFdnCheck +// --------------------------------------------------------------------------- +// +void CSPCall::NoFDNCheck( ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::NoFDNCheck"); + iFdnCheck = EFalse; + } + +// --------------------------------------------------------------------------- +// CSPCall::LogDialedNumber +// --------------------------------------------------------------------------- +// +TBool CSPCall::LogDialedNumber() const + { + CSPLOGSTRING(CSPREQIN, "CSPCall::LogDialedNumber true"); + return ETrue; + } + +// --------------------------------------------------------------------------- +// From class MCCPCSCall +// CSPCall::Dial +// --------------------------------------------------------------------------- +// +TInt CSPCall::Dial( const TDesC8& /*aCallParams*/ ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::Dial"); + return iCommonInfo.IndicateDialRequest( *this ); + } + +// --------------------------------------------------------------------------- +// From class MCCPCallCommandHandling +// CSPCall::PerformDialRequest +// --------------------------------------------------------------------------- +// +TInt CSPCall::PerformDialRequest() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::PerformDialRequest"); + iDialCompletionCode = KErrNone; + iTerminationErrorNotified = EFalse; + + // Send the User to User Information. + if( iUserToUserInformation->Length() ) + { + iUUIMessageSender->SendUUIMessage( *iUserToUserInformation ); + } + + return DialFdnCond( iFdnCheck ); + } + +// --------------------------------------------------------------------------- +// CSPCall::CSPCall +// --------------------------------------------------------------------------- +// +CSPCall::CSPCall( RMobileLine& aLine, + TBool aMobileOriginated, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo, + TBool aIsEmergencyCall ) : + iLine( aLine ), + iMobileOriginated( aMobileOriginated ), + iName( aName ), + iCommonInfo( aCommonInfo ), + iTerminationErrorNotified( EFalse ), + iIsEmergencyCall( aIsEmergencyCall), + iFdnCheck(ETrue), + iAudioStatus( ECSPCallAudioStatusInactive ) + + { + CSPLOGSTRING(CSPOBJECT, "CSPCall::CSPCall"); + } + +// --------------------------------------------------------------------------- +// CSPCall::ConstructL +// Constructing CSPCall in 2nd phase +// --------------------------------------------------------------------------- +// +void CSPCall::ConstructL( const CCCECallParameters& aParams ) + { + CSPLOGSTRING(CSPOBJECT, "CSPCall::ConstructL <"); + + // Create cloned copy of call parameters + iParams = static_cast( aParams.CloneL() ); + + // Open call handle + OpenCallHandleL(); + + // Update call info + UpdateCallInfo(); + + // Update call state from ETel + UpdateCallState(); + + // Create call handlers for call related requests + // and for monitoring call related events + CreateCallHandlersL(); + + CSPLOGSTRING(CSPOBJECT, "CSPCall::ConstructL >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::OpenCallHandleL +// Open call handle, calls either OpenNewCallL or OpenExistingCallL depending +// of the call direction and if the call is a client call +// --------------------------------------------------------------------------- +// +void CSPCall::OpenCallHandleL() + { + CSPLOGSTRING(CSPINT, "CSPCall::OpenCallHandleL <"); + + if ( iMobileOriginated ) + { + // There is no existing call on line, open new call + OpenNewCall(); + } + else + { + // Mobile terminated call on line, open existing call + OpenExistingCallL( iName ); + } + + CSPLOGSTRING(CSPINT, "CSPCall::OpenCallHandleL >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::UpdateCallInfoL +// Update call info including remote party name and number data +// --------------------------------------------------------------------------- +// +void CSPCall::UpdateCallInfo() + { + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo <"); + RMobileCall::TMobileCallInfoV7 callInfo; + RMobileCall::TMobileCallInfoV7Pckg pck( callInfo ); + TInt err = iCall.GetMobileCallInfo( pck ); + + UpdateCallInfoImpl( callInfo ); + + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::UpdateCallInfoImpl +// Implementation for UpdateCallInfo(). +// --------------------------------------------------------------------------- +// +void CSPCall::UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo ) + { + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfoImpl <"); + + if ( iMobileOriginated ) + { + // Call wasn't added by ETel monitor, update info accordingly + UpdateCallNameNumberInfo( aCallInfo, EFalse ); + } + else + { + // Call was added by ETel monitor, update info accordingly + UpdateCallNameNumberInfo( aCallInfo, ETrue ); + } + + + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfoImpl >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::UpdateCallOrigin +// Set call origin to CCCECallParameters. +// --------------------------------------------------------------------------- +// +void CSPCall::UpdateCallOrigin( RMobileCall::TMobileCallInfoV7 aCallInfo ) + { + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallOrigin <"); + + if ( iMobileOriginated ) + { + if ( RMobileCall::EOriginatorSIM == aCallInfo.iCallParamOrigin ) + { + iParams->SetOrigin(CCCECallParameters::ECCECallOriginSAT); + } + } + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallOrigin >"); + } + + + +// --------------------------------------------------------------------------- +// CSPCall::UpdateCallStateL +// +// --------------------------------------------------------------------------- +// +int CSPCall::UpdateCallState() + { + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallState <"); + TInt err( KErrNone ); + + // Update call state from ETel + RMobileCall::TMobileCallStatus etelState; + err = iCall.GetMobileCallStatus( etelState ); + if ( KErrNone == err ) + { + iCallState = CCPStateFromETelState( etelState ); + } + CSPLOGSTRING2(CSPINT, "CSPCall::UpdateCallState > res %d", err); + + return err; + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyRemotePartyNumberChanged +// +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyRemotePartyNumberChanged() + { + CSPLOGSTRING(CSPINT, "CSPCall::NotifyRemotePartyNumberChanged <"); + + // If COLP number is different from original dialled number + // it is available in connected state of a MO call. + // TSY does not send notification so number must be fetched. + if ( IsMobileOriginated() ) + { + RMobileCall::TMobileCallInfoV3 callInfo; + RMobileCall::TMobileCallInfoV3Pckg callInfoPckg( callInfo ); + + GetMobileCallInfo( callInfoPckg ); + callInfo = callInfoPckg(); + + + if ( callInfo.iRemoteParty.iRemoteNumber.iTelNumber.Length() ) + { + NotifyRemotePartyInfoChanged( KNullDesC(), + callInfo.iRemoteParty.iRemoteNumber.iTelNumber); + } + } + } + + +// --------------------------------------------------------------------------- +// CSPCall::CreateCallHandlersL +// Create call handlers for call related requests and call monitoring +// --------------------------------------------------------------------------- +// +void CSPCall::CreateCallHandlersL() + { + CSPLOGSTRING(CSPINT, "CSPCall::CreateCallHandlersL <"); + + iRequester = CSPEtelCallRequester::NewL( *this, iCall ); + + iCallEventMonitor = CSPEtelCallEventMonitor::NewL( *this, iCall ); + iCallEventMonitor->StartMonitoring(); + iCallStatusMonitor = CSPEtelCallStatusMonitor::NewL( *this, iCall ); + iCallStatusMonitor->StartMonitoring(); + + iCallCapsMonitor = CSPEtelCallCapsMonitor::NewL( *this, iCall ); + iCallCapsMonitor->StartMonitoring(); + iCapsFlags = iCallCapsMonitor->FetchCallControlCapsL(); + + iCallInfoMonitor = CSPCallInfoMonitor::NewL( *this, iCall ); + iCallInfoMonitor->StartMonitoring(); + + // Start UUI monitor and create message sender + iSkypeId = TCSPSkypeIdParser::CreateSkypeIdBufferL(); + iUUIMonitor = CSPUUIMonitor::NewL( iCall,*this ); + iUUIMonitor->StartMonitor(); + iUUIMessageSender = CSPUUIMessageSender::NewL( iCall ); + iUserToUserInformation = iParams->UUSId().AllocL(); + + // Transfer provider + iTransferProvider = CSPTransferProvider::NewL( iCall, *this, iCommonInfo ); + + // Forward provider + iForwardProvider = CSPForwardProvider::NewL(); + + CSPLOGSTRING(CSPINT, "CSPCall::CreateCallHandlersL >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyRingingState +// Gets to ringing state +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyRingingState( ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyRingingState"); + iCallState = MCCPCallObserver::ECCPStateRinging; + + TInt obsCount = iObservers.Count ( ); + for (TInt i = 0; i < obsCount; i++ ) + { + MCCPCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->CallStateChanged ( iCallState, this ); + } + } + } + +// --------------------------------------------------------------------------- +// CSPCall::CCPStateFromETelState +// Simple mapping between state enumerations. +// --------------------------------------------------------------------------- +// +MCCPCallObserver::TCCPCallState CSPCall::CCPStateFromETelState( + RMobileCall::TMobileCallStatus aEtelState ) + { + MCCPCallObserver::TCCPCallState ret = MCCPCallObserver::ECCPStateIdle; + switch ( aEtelState ) + { + case RMobileCall::EStatusUnknown: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::Unknown" ); + ret = MCCPCallObserver::ECCPStateIdle; + break; + } + case RMobileCall::EStatusIdle: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusIdle" ); + ret = MCCPCallObserver::ECCPStateIdle; + break; + } + case RMobileCall::EStatusRinging: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusRinging" ); + ret = MCCPCallObserver::ECCPStateRinging; + break; + } + // Map the following to connecting status + case RMobileCall::EStatusDialling: + { + CSPLOGSTRING( CSPREQIN, "CSPCall::State > \ + RMobileCall::EStatusDialling" ); + ret = MCCPCallObserver::ECCPStateDialling; + break; + } + case RMobileCall::EStatusConnecting: + { + CSPLOGSTRING( CSPREQIN, "CSPCall::State > \ + RMobileCall::Connecting" ); + ret = MCCPCallObserver::ECCPStateConnecting; + break; + } + case RMobileCall::EStatusAnswering: + { + CSPLOGSTRING( CSPREQIN, "CSPCall::State > \ + RMobileCall::Answering" ); + ret = MCCPCallObserver::ECCPStateAnswering; + break; + } + // Call is connected and active. + case RMobileCall::EStatusConnected: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusConnected" ); + ret = MCCPCallObserver::ECCPStateConnected; + break; + } + case RMobileCall::EStatusDisconnectingWithInband: + case RMobileCall::EStatusDisconnecting: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusDisconnecting/Inband?"); + ret = MCCPCallObserver::ECCPStateDisconnecting; + break; + } + case RMobileCall::EStatusReconnectPending: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusHangingUp" ); + ret = MCCPCallObserver::ECCPStateDisconnecting; + break; + } + case RMobileCall::EStatusHold: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusHold" ); + ret = MCCPCallObserver::ECCPStateHold; + break; + } + case RMobileCall::EStatusWaitingAlternatingCallSwitch: + { + // This state is not used in real life. + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusWaitingAlternatingCallSwitch" ); + ret = MCCPCallObserver::ECCPStateConnected; + break; + } + case RMobileCall::EStatusTransferring: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusHold" ); + ret = MCCPCallObserver::ECCPStateTransferring; + break; + } + case RMobileCall::EStatusTransferAlerting: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::State > RMobileCall::EStatusHold" ); + ret = MCCPCallObserver::ECCPStateTransferring; + break; + } + default: + { + CSPLOGSTRING( CSPREQIN, + "CSPCall::CCPStateFromETelState unhandled state "); + } + } + + CSPLOGSTRING3(CSPINT, + "CSPCall::CCPStateFromETelState ETel: %d CCP: %d", aEtelState, ret); + return ret; + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyCallStateChanged +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState ) + { + CSPLOGSTRING3(CSPINT, + "CSPCall::NotifyCallStateChanged < state: %d this: %x", + aState, this ); + + iCallState = aState; + TBool notifyObservers( ETrue ); + + if ( !iMobileOriginated && MCCPCallObserver::ECCPStateRinging == aState ) + { + CSPLOGSTRING2(CSPINT, "CSPCall::No notify on ringing MT", aState); + notifyObservers = EFalse; + } + + if ( notifyObservers ) + { + TInt obsCount = iObservers.Count(); + for ( TInt i = 0; i < obsCount; i++ ) + { + MCCPCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->CallStateChanged( aState, this ); + } + } + } + + CSPLOGSTRING3(CSPINT, + "CSPCall::NotifyCallStateChanged > state: %d this: %x", + aState, this ); + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyCallStateChangedWithInband +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyCallStateChangedWithInband( + MCCPCallObserver::TCCPCallState aState ) + { + CSPLOGSTRING3(CSPINT, + "CSPCall::NotifyCallStateChangedWithInBand < state: %d this: %x", + aState, this ); + + iCallState = aState; + + if ( !iMobileOriginated && MCCPCallObserver::ECCPStateRinging == aState ) + { + CSPLOGSTRING2(CSPINT, "CSPCall::No notify on ringing MT", aState); + } + else + { + TInt obsCount = iObservers.Count(); + for ( TInt i = 0; i < obsCount; i++ ) + { + MCCPCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->CallStateChangedWithInband( aState, this ); + } + } + } + CSPLOGSTRING3(CSPINT, + "CSPCall::NotifyCallStateChangedWithInband > state: %d this: %x", + aState, this); + } + +// --------------------------------------------------------------------------- +// CSPCall::ReadRepositoryL +// Reads the given information from Central Repository. +// --------------------------------------------------------------------------- +// +void CSPCall::ReadRepositoryL( TUid aUid, TUint aKey, TInt& aVal) + { + CSPLOGSTRING(CSPINT, "CSPCall::ReadRepositoryL"); + + CRepository* cr = CRepository::NewL( aUid ); + TInt err = cr->Get( aKey, aVal ); + delete cr; + User::LeaveIfError( err ); + } + +// --------------------------------------------------------------------------- +// CSPCall::CheckAndNotifyTerminationError +// Reads error code from ETel. +// --------------------------------------------------------------------------- +// +void CSPCall::CheckAndNotifyTerminationError() + { + CSPLOGSTRING2(CSPINT, + "CSPCall::CheckAndNotifyTerminationError dial completion code: %d", + iDialCompletionCode); + + // Emergency error handling is separated into CSPEtelCallRequester + if ( !iIsEmergencyCall ) + { + TInt termErr = ExitCodeError(); + CSPLOGSTRING2(CSPINT, + "CSPCall::CheckAndNotifyTerminationError exit code error: %d", + termErr); + + if ( termErr == KErrNone ) + { + // Handle KErrGsmCCUnassignedNumber correctly + // because the value is not stored in exit code. + termErr = iDialCompletionCode; + CSPLOGSTRING(CSPINT, + "CSPCall::CheckAndNotifyTerminationError use dial completion code"); + } + + if ( termErr == KErrGsmRRPreEmptiveRelease ) + { + // Error KErrGsmRRPreEmptiveRelease occurs when there is active call + // and user make emergency call, can be ignored. + CSPLOGSTRING3( + CSPERROR, + "CSPCall::CheckAndNotifyTerminationError preemptive release, ignore: %d", + termErr, + this ); + } + else if ( iDontReportTerm + && ( termErr == KErrGsmCCNormalUnspecified + || termErr == KErrGsmCCCallRejected ) ) + { + // Not an error, since this happens on normal + // call termination situation after connected call. + CSPLOGSTRING3(CSPERROR, + "CSPCall::CheckAndNotifyTerminationError DISCARD this: %x err: %d", + this, + termErr); + } + else if ( termErr ) + { + TCCPError ccpErr(ECCPErrorNone); + + // Only a couple of error codes can have diagnostic information. + // aDiagnostic ought to be undefined in other situatios, + // but at least in this way we can really guarantee it. + if ( termErr == KErrGsmCCFacilityRejected || + termErr == KErrGsmCCRequestedFacilityNotSubscribed || + termErr == KErrGsmCCIncomingCallsBarredInCug || + termErr == KErrGsmCCRequestedFacilityNotImplemented || + termErr == KErrGsmCCUserNotInCug ) + { + TName name; + CallName( name ); + TInt diagErr = iCommonInfo.GetDiagnosticError( name ); + ccpErr = iRequester->MapError( diagErr ); + + // Finally use exit code if diagnostic did not contain + // any useful information. + if ( ccpErr == ECCPRequestFailure ) + { + ccpErr = iRequester->MapError( termErr ); + } + } + else + { + ccpErr = iRequester->MapError( termErr ); + } + + NotifyErrorOccurred( ccpErr ); + iTerminationErrorNotified = ETrue; + } + } + } + +// --------------------------------------------------------------------------- +// CSPCall::ExitCodeError +// Reads error code from ETel call info's iExitCode. +// --------------------------------------------------------------------------- +// +TInt CSPCall::ExitCodeError() const + { + CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError < this: %x", + this ); + TInt callError; + RMobileCall::TMobileCallInfoV3 callInfo; + RMobileCall::TMobileCallInfoV3Pckg pck( callInfo ); + TInt getErr = iCall.GetMobileCallInfo( pck ); + // Is there value in higher 16 bits + if ( KErrNone == getErr && (callInfo.iExitCode & 0xFFFF0000) ) + { + CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError callInfo.iExitCode %d", + callInfo.iExitCode ); + callError = ( callInfo.iExitCode >> KTimesToSplitValue ); + + if ( callError > KErrEtelGsmBase ) + // Not in valid exteded range + { + // Ignore invalid extented code + if ( ( callInfo.iExitCode & 0x0000FFFF ) == KErrNone ) + // core error is zero + { + callError = KErrNone; + } + else + { + callError = ( ( callInfo.iExitCode & 0x0000FFFF ) + | 0xFFFF0000 ); + } + } + } + // Higher and lower 16 bits are zero + else if ( !( callInfo.iExitCode & 0xFFFFFFFF ) ) + { + callError = KErrNone; + } + else + { + // No extended error, expand value to full range + callError = ( callInfo.iExitCode | 0xFFFF0000 ); + } + + CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError > err: %d", callError); + + return callError; + } + +// --------------------------------------------------------------------------- +// CSPCall::UUSMessageReceived +// --------------------------------------------------------------------------- +// + void CSPCall::UUSMessageReceived( TDesC& aMessage ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::UUSMessageReceived"); + TCSPSkypeIdParser parser; + + TPtr ptr = iSkypeId->Des(); + ptr.Zero(); + const TInt error( parser.Parse( aMessage, ptr ) ); + + if ( !error ) + { + iRemotePartyName = ptr; + NotifyCallEventOccurred( MCCPCallObserver::ECCPNotifyRemotePartyInfoChange ); + } + CSPLOGSTRING2(CSPINT, "CSPCall::UUSMessageReceived err: %d", error ); + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyRemotePartyInfoChanged +// --------------------------------------------------------------------------- +// +void CSPCall::NotifyRemotePartyInfoChanged( const TDesC& aRemotePartyName, + const TDesC& aRemotePartyNumber ) + { + CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyRemotePartyInfoChanged"); + + if ( aRemotePartyName.Length() ) + { + iRemotePartyName = aRemotePartyName; + } + + if ( aRemotePartyNumber.Length() ) + { + iRemotePartyNumber = aRemotePartyNumber; + } + + NotifyCallEventOccurred( MCCPCallObserver::ECCPNotifyRemotePartyInfoChange ); + } + +// --------------------------------------------------------------------------- +// CSPCall::DontReportTerminationError +// --------------------------------------------------------------------------- +// +void CSPCall::DontReportTerminationError() + { + CSPLOGSTRING(CSPREQIN, "CSPCall::DontReportTerminationError"); + iDontReportTerm = ETrue; + } + +// --------------------------------------------------------------------------- +// CSPCall::UpdateCallNameNumberInfo +// Update call info including remote party name and number data +// --------------------------------------------------------------------------- +// +void CSPCall::UpdateCallNameNumberInfo( + RMobileCall::TMobileCallInfoV3& aCallInfo, + TBool aCallAddedByMonitor ) + { + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallNameNumberInfo <"); + + iCallName.Zero(); + iRemotePartyNumber.Zero(); + iRemotePartyName.Zero(); + + if ( aCallAddedByMonitor ) + { + CSPLOGSTRING(CSPINT, + "CSPCall::UpdateCallNameNumberInfo call added by monitor"); + + // If call was created by ETel line status or incoming call monitor + // the call name is already known, only remote party info is fetched from + // call info + iCallName.Append( iName ); + iRemotePartyName.Append( aCallInfo.iRemoteParty.iCallingName ); + iRemotePartyNumber.Append( aCallInfo.iRemoteParty.iRemoteNumber.iTelNumber ); + } + else + { + CSPLOGSTRING(CSPINT, + "CSPCall::UpdateCallNameNumberInfo call added by plugin owner"); + + // The call was not created by monitor and the remote number is already known, + // fetch only call name from call info + iCallName.Append( aCallInfo.iCallName ); + iRemotePartyNumber.Append( iName ); + } + + CSPLOGSTRING2(CSPINT, + "CSPCall::UpdateCallNameNumberInfo iCallName: %S", &iCallName ); + CSPLOGSTRING2(CSPINT, + "CSPCall::UpdateCallNameNumberInfo iRemotePartyNumber: %S", &iRemotePartyNumber ); + CSPLOGSTRING2(CSPINT, + "CSPCall::UpdateCallNameNumberInfo iRemotePartyName: %S", &iRemotePartyName ); + + CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallNameNumberInfo >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::OpenNewCall +// Open new call +// --------------------------------------------------------------------------- +// +void CSPCall::OpenNewCall() + { + CSPLOGSTRING(CSPINT, "CSPCall::OpenNewCall <"); + + // Open new call + __ASSERT_ALWAYS( iCall.OpenNewCall( iLine ) == KErrNone, + Panic( ECSPPanicNoEtel ) ); + + CSPLOGSTRING(CSPINT, "CSPCall::OpenNewCall >"); + } + +// --------------------------------------------------------------------------- +// CSPCall::OpenExistingCallL +// Open existing call +// --------------------------------------------------------------------------- +// +void CSPCall::OpenExistingCallL( const TDesC& aName ) + { + CSPLOGSTRING2(CSPINT, + "CSPCall::OpenExistingCallL < aName: %S", &aName); + + // Open existing call with given name from current line + TInt err = iCall.OpenExistingCall( iLine, aName ); + + if ( KErrNone != err ) + { + CSPLOGSTRING2(CSPERROR, + "CSPCall::OpenCallHandleL OpenExistingCall error: %d, leaving", err); + User::Leave( err ); + } + + CSPLOGSTRING(CSPINT, "CSPCall::OpenExistingCallL >"); + } + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspcalladdedhandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspcalladdedhandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,262 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPCallAddedHandler +* +*/ + + +#include "cspcalladdedhandler.h" + +#include +#include + +#include "cspcallarray.h" +#include "cspetellinestatusmonitor.h" +#include "mcsplinestatusobserver.h" +#include "rcsplinecontainer.h" +#include "csplogger.h" +#include "cspclientvoicecall.h" +#include "cspclientvideocall.h" +#include "rcsplinecontainer.h" +#include "mcspcommoninfo.h" +#include "cspconsts.h" + + +// --------------------------------------------------------------------------- +// CSPCallAddedHandler::NewL. +// --------------------------------------------------------------------------- +// +CSPCallAddedHandler* CSPCallAddedHandler::NewL( + const MCCPCSObserver& aObserver, + RCSPLineContainer& aLineContainer, + CSPCallArray& aCallArray, + MCSPCommonInfo& aCommonInfo, + CSPAudioHandler& aAudioHandler ) + { + CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::NewL()" ); + CSPCallAddedHandler* self = new ( ELeave ) CSPCallAddedHandler( + aObserver, aLineContainer, + aCallArray, aCommonInfo, + aAudioHandler ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPCallAddedHandler::~CSPCallAddedHandler( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::~CSPCallAddedHandler" ); + delete iAuxLineMonitor; + delete iVoiceLineMonitor; + delete iDataLineMonitor; + } + +// --------------------------------------------------------------------------- +// CSPCallAddedHandler::CallAdded +// --------------------------------------------------------------------------- +// +void CSPCallAddedHandler::CallAdded( RMobileLine& aLine, + TName aCallName, + RCSPLineContainer::TCSPLineId aLineId ) + { + CSPLOGSTRING2(CSPINT, + "CSPCallAddedHandler::CallAdded line: %d", aLineId); + CSPLOGSTRING2(CSPINT, + "CSPCallAddedHandler::CallAdded call name: %S", &aCallName); + + // Find call by name + if ( !iCallArray.FindCall( aCallName ) ) + { + TInt err( KErrNone ); + + // Resolve call type + TUint32 serviceId( 0 ); + CCPCall::TCallType callType; + CCCECallParameters::TCCELineType lineType; + + iLineContainer.ResolveCallInfo( aLineId, serviceId, callType, lineType ); + + CSPCall* call = NULL; + CCCECallParameters* callParameters = NULL; + + TRAP_IGNORE( callParameters = CCCECallParameters::NewL() ); + if ( callParameters ) + { + callParameters->SetServiceId(serviceId); + callParameters->SetCallType(callType); + callParameters->SetLineType(lineType); + + CSPLOGSTRING2(CSPINT, + "CSPCallAddedHandler::CallAdded call type: %d", callType ); + + if ( callType == CCPCall::ECallTypeCSVoice ) + { + TRAP( err, call = CSPClientVoiceCall::NewL( aCallName, + aLine, *callParameters, + iCommonInfo )); + } + else if ( callType == CCPCall::ECallTypeVideo ) + { + CSPLOGSTRING(CSPINT, + "CSPCallAddedHandler::CallAdded creating video call"); + TRAP( err, call = CSPClientVideoCall::NewL( aCallName, + aLine, *callParameters, + iCommonInfo )); + } + + delete callParameters; + callParameters = NULL; + } + + CSPLOGSTRING2(CSPINT, + "CSPCallAddedHandler::CallAdded Client call creation res %d", err ); + + if ( call ) + { + // Set audio handler for DevSound + call->SetAudioHandler( &iAudioHandler ); + + MCCPCallObserver::TCCPCallState callState = call->State(); + CSPLOGSTRING2(CSPINT, + "CSPCallAddedHandler::CallAdded call state: %d", callState ); + + if ( callState == MCCPCallObserver::ECCPStateDialling ) + { + CSPLOGSTRING(CSPINT, + "CSPCallAddedHandler::CallAdded add Dialling call" ); + + iCallArray.Add( call ); + + CSPLOGSTRING(CSPINT, + "CSPCallAddedHandler::CallAdded notifying dialling state" ); + + call->NotifyCallStateChangedETel( RMobileCall::EStatusDialling ); + } + else if ( callState == MCCPCallObserver::ECCPStateConnecting || + callState == MCCPCallObserver::ECCPStateConnected ) + { + CSPLOGSTRING(CSPINT, + "CSPCallAddedHandler::CallAdded add Connecting/Connected call" ); + iCallArray.Add( call ); + iCommonInfo.IndicateClientCall( call ); + } + else + { + CSPLOGSTRING(CSPERROR, + "CSPCallAddedHandler::CallAdded ignore call" ); + delete call; + } + } + } + } + +// --------------------------------------------------------------------------- +// CSPCallAddedHandler::LineStatusChanged +// --------------------------------------------------------------------------- +// +void CSPCallAddedHandler::LineStatusChanged( RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId, + RMobileCall::TMobileCallStatus& aLineStatus ) + { + CSPLOGSTRING2(CSPINT, + "CSPCallAddedHandler::LineStatusChanged line: %d", aLineId ); + CSPLOGSTRING2(CSPINT, + "CSPCallAddedHandler::LineStatusChanged line status: %d", + aLineStatus ); + + if ( aLineStatus == RMobileCall::EStatusDialling ) + { + TInt err(KErrNone); + RLine::TLineInfo lineInfo; + err = aLine.GetInfo( lineInfo ); + TName callName; + + if ( err == KErrNone ) + { + callName = lineInfo.iNameOfLastCallAdded; + CallAdded( aLine, callName, aLineId); + } + else + { + CSPLOGSTRING2(CSPERROR, + "CSPCallAddedHandler::LineStatusChanged get info err:%d", + err); + } + } + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPCallAddedHandler::CSPCallAddedHandler( + const MCCPCSObserver& aObserver, + RCSPLineContainer& aLineContainer, + CSPCallArray& aCallArray, + MCSPCommonInfo& aCommonInfo, + CSPAudioHandler& aAudioHandler ) : + iLineContainer( aLineContainer ), + iObserver( aObserver ), + iCallArray( aCallArray ), + iCommonInfo( aCommonInfo ), + iAudioHandler( aAudioHandler ) + { + CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::CSPCallAddedHandler"); + } + +// --------------------------------------------------------------------------- +// Second phase construction. +// --------------------------------------------------------------------------- +// +void CSPCallAddedHandler::ConstructL() + { + CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::ConstructL <"); + + if ( iLineContainer.LineIsOpen( RCSPLineContainer::ECSPLineSpeech ) ) + { + RMobileLine& line = iLineContainer.LineByType( + RCSPLineContainer::ECSPLineSpeech ); + iVoiceLineMonitor = CSPEtelLineStatusMonitor::NewL( *this, line, + RCSPLineContainer::ECSPLineSpeech ); + iVoiceLineMonitor->StartMonitoring(); + } + // This is for videocalls + if ( iLineContainer.LineIsOpen( RCSPLineContainer::ECSPLineData ) ) + { + RMobileLine& line = iLineContainer.LineByType( + RCSPLineContainer::ECSPLineData ); + + iDataLineMonitor = CSPEtelLineStatusMonitor::NewL( *this, line, + RCSPLineContainer::ECSPLineData ); + iDataLineMonitor->StartMonitoring(); + } + + if ( iLineContainer.LineIsOpen( RCSPLineContainer::ECSPLineAuxSpeech ) ) + { + RMobileLine& line = iLineContainer.LineByType( + RCSPLineContainer::ECSPLineAuxSpeech ); + iAuxLineMonitor = CSPEtelLineStatusMonitor::NewL( *this, line, + RCSPLineContainer::ECSPLineAuxSpeech ); + iAuxLineMonitor->StartMonitoring(); + } + + CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::ConstructL >"); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspcallarray.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspcallarray.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,145 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPCallArray +* +*/ + + +#include + +#include "cspcallarray.h" +#include "csplogger.h" +#include "cspcall.h" +#include "cspconsts.h" + + +// --------------------------------------------------------------------------- +// CSPCallArray::NewL. +// --------------------------------------------------------------------------- +// +CSPCallArray* CSPCallArray::NewL( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPCallArray::NewL()" ); + CSPCallArray* self = new ( ELeave ) CSPCallArray( ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the array including remaining calls. +// --------------------------------------------------------------------------- +// +CSPCallArray::~CSPCallArray( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPCallArray::~CSPCallArray()" ); + TInt callCount = iCallArray.Count(); + CSPLOGSTRING2(CSPOBJECT, "CSPCallArray::~CSPCallArray() calls %d", callCount); + + for (TInt callIndex = 0; callIndex < callCount; callIndex++) + { + CSPCall* call = iCallArray[ callIndex ]; + delete call; + } + + iCallArray.Reset(); + iCallArray.Close(); + } + +// --------------------------------------------------------------------------- +// From MCSPCallInformation +// Iterates through call objects finding the call matching the given name. +// --------------------------------------------------------------------------- +// +CSPCall* CSPCallArray::FindCall( const TName& aCallName ) + { + CSPLOGSTRING(CSPINT, "CSPCallArray::FindCall()"); + + TInt callCount = iCallArray.Count(); + for (TInt callIndex = 0; callIndex < callCount; callIndex++) + { + + CSPCall* call = iCallArray[ callIndex ]; + if ( call ) + { + TName currentCallName; + call->CallName( currentCallName ); + if ( currentCallName.Compare( aCallName ) == 0 ) + { + CSPLOGSTRING(CSPINT, "CSPCallArray::FindCall() OK"); + return call; + } + } + } + + CSPLOGSTRING(CSPINT, "CSPCallArray::FindCall() NOT FOUND"); + return NULL; + } + +// --------------------------------------------------------------------------- +// CSPCallArray::Add +// --------------------------------------------------------------------------- +// +TInt CSPCallArray::Add(CSPCall* aCall ) + { + CSPLOGSTRING(CSPINT, "CSPCallArray::Add()"); + return iCallArray.Append( aCall ); + } + +// --------------------------------------------------------------------------- +// CSPCallArray::Remove +// --------------------------------------------------------------------------- +// +TInt CSPCallArray::Remove(CSPCall* aCall ) + { + CSPLOGSTRING(CSPINT, "CSPCallArray::Remove()"); + TInt index = iCallArray.Find( aCall ); + if ( index != KErrNotFound ) + { + iCallArray.Remove( index ); + return KErrNone; + } + CSPLOGSTRING(CSPINT, "CSPCallArray::Remove() NOT FOUND"); + return KErrNotFound; + } + +// --------------------------------------------------------------------------- +// CSPCallArray::GetCallCount +// --------------------------------------------------------------------------- +// +TInt CSPCallArray::GetCallCount( ) + { + return iCallArray.Count(); + } + +// --------------------------------------------------------------------------- +// CSPCallArray::Get +// --------------------------------------------------------------------------- +// +CSPCall* CSPCallArray::Get( TInt aIndex ) + { + return iCallArray[aIndex]; + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPCallArray::CSPCallArray() + { + CSPLOGSTRING(CSPOBJECT, + "CSPCallArray::CSPCallArray()" ); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspcallcommandhandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspcallcommandhandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,193 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPCallCommandHandler +* +*/ + + +#include "cspcallcommandhandler.h" +#include "mcspcallcommandhandling.h" +#include "csplogger.h" + +// --------------------------------------------------------------------------- +// CSPCallCommandHandler::NewL. +// --------------------------------------------------------------------------- +// +CSPCallCommandHandler* CSPCallCommandHandler::NewL() + { + CSPLOGSTRING(CSPOBJECT, + "CSPCallCommandHandler::NewL()" ); + CSPCallCommandHandler* self = new ( ELeave ) CSPCallCommandHandler(); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the array including remaining calls. +// --------------------------------------------------------------------------- +// +CSPCallCommandHandler::~CSPCallCommandHandler() + { + iActiveHangupArray.Reset(); + iActiveHangupArray.Close(); + CSPLOGSTRING(CSPOBJECT, + "CSPCallCommandHandler::~CSPCallCommandHandler"); + } + +// --------------------------------------------------------------------------- +// CSPCallCommandHandler::IndicateActiveHangup +// --------------------------------------------------------------------------- +// +TInt CSPCallCommandHandler::IndicateActiveHangup( MCCPCallCommandHandling& aCall ) + { + TInt err = iActiveHangupArray.Find( &aCall ); + if ( err == KErrNotFound ) + { + err = iActiveHangupArray.Append( &aCall ); + CSPLOGSTRING2( + CSPINT, + "CSPCallCommandHandler::IndicateActiveHangup append error: %d", + err ); + } + else + { + CSPLOGSTRING( + CSPINT, + "CSPCallCommandHandler::IndicateActiveHangup call already added"); + } + CSPLOGSTRING2( + CSPINT, + "CSPCallCommandHandler::IndicateActiveHangup active hangup count: %d", + iActiveHangupArray.Count()); + + return err; + } + +// --------------------------------------------------------------------------- +// CSPCallCommandHandler::CSPCallCommandHandler::IndicateHangupComplete +// --------------------------------------------------------------------------- +// +TInt CSPCallCommandHandler::IndicateHangupComplete( MCCPCallCommandHandling& aCall ) + { + TInt index = iActiveHangupArray.Find( &aCall ); + if ( index != KErrNotFound ) + { + iActiveHangupArray.Remove( index ); + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateHangupComplete remove"); + } + + if( !iActiveHangupArray.Count() && iPendingCall ) + { + if( iPendingCommand == ECSPAnswerCall ) + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateHangupComplete perform answer request"); + iPendingCall->PerformAnswerRequest(); + iPendingCommand = ECSPNone; + iPendingCall = NULL; + } + else if( iPendingCommand == ECSPDialCall ) + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateHangupComplete perform dial request"); + iPendingCall->PerformDialRequest(); + iPendingCommand = ECSPNone; + iPendingCall = NULL; + } + } + + CSPLOGSTRING2(CSPINT, + "CSPCallCommandHandler::IndicateHangupComplete active hangup count: %d", + iActiveHangupArray.Count()); + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSPCallCommandHandler::IndicateDialRequest +// --------------------------------------------------------------------------- +// +TInt CSPCallCommandHandler::IndicateDialRequest( MCCPCallCommandHandling& aCall ) + + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateDialRequest"); + TInt ret( KErrNone ); + + if( !iActiveHangupArray.Count() ) + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateDialRequest dial"); + aCall.PerformDialRequest(); + } + else if( !iPendingCall && iPendingCommand == ECSPNone ) + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateDialRequest delay dialing"); + iPendingCall = &aCall; + iPendingCommand = ECSPDialCall; + } + else + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateDialRequest ERROR already exists"); + ret = KErrAlreadyExists; + } + return ret; + } + +// --------------------------------------------------------------------------- +// CSPCallCommandHandler::IndicateAnswerRequest +// --------------------------------------------------------------------------- +// +TInt CSPCallCommandHandler::IndicateAnswerRequest( MCCPCallCommandHandling& aCall ) + + { + CSPLOGSTRING(CSPINT, "CSPCallCommandHandler::IndicateAnswerRequest" ); + + TInt ret( KErrNone ); + + if( !iActiveHangupArray.Count() ) + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateAnswerRequest answer"); + aCall.PerformAnswerRequest(); + } + else if( !iPendingCall && iPendingCommand == ECSPNone ) + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateAnswerRequest delay answering"); + iPendingCall = &aCall; + iPendingCommand = ECSPAnswerCall; + } + else + { + CSPLOGSTRING(CSPINT, + "CSPCallCommandHandler::IndicateAnswerRequest ERROR already exists"); + ret = KErrAlreadyExists; + } + + return ret; + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPCallCommandHandler::CSPCallCommandHandler() + { + CSPLOGSTRING(CSPOBJECT, "CSPCallCommandHandler::CSPCallCommandHandler"); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspcallinfomonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspcallinfomonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,156 @@ +/* +* Copyright (c) 2007 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: Monitors changes in remote party info. +* Interface : +* +*/ + + + +// INCLUDE FILES + +#include "cspcallinfomonitor.h" +#include "mcspcallobserver.h" +#include "csppanic.pan" +#include "csplogger.h" //Debug + + +// ============================ MEMBER FUNCTIONS ============================= + +//---------------------------------------------------------------------------- +// CSPCallInfoMonitor::NewL() +// +// 1st phase constructor +//---------------------------------------------------------------------------- +// +CSPCallInfoMonitor* CSPCallInfoMonitor::NewL + ( MCSPCallObserver& aObserver, + RMobileCall& aCall ) + { + CSPCallInfoMonitor* self = new (ELeave) CSPCallInfoMonitor( aObserver, + aCall ); + return self; + } + +//---------------------------------------------------------------------------- +// CSPCallInfoMonitor::~CSPCallInfoMonitor() +// +// d'tor. +//---------------------------------------------------------------------------- +// +CSPCallInfoMonitor::~CSPCallInfoMonitor() + { + Cancel(); + CSPLOGSTRING( CSPINT, "CSP: CSPCallInfoMonitor::~CSPCallInfoMonitor" ); + } + +//---------------------------------------------------------------------------- +// CSPCallInfoMonitor::StartMonitor() +// +// Starts monitoring. +//---------------------------------------------------------------------------- +// +void CSPCallInfoMonitor::StartMonitoring() + { + // error ignored (starting notification doesn't leave) + if (!IsActive()) + { + iCall.NotifyRemotePartyInfoChange( + iStatus, + iRemotePartyInfoPckg ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPCallInfoMonitor::StartMonitoring: Already active" ); + + } + } + +//---------------------------------------------------------------------------- +// CSPCallInfoMonitor::RunL() +// +// Handling of the status changes. +//---------------------------------------------------------------------------- +// +void CSPCallInfoMonitor::RunL() + { + CSPLOGSTRING2( CSPINT, + "CSP: CSPCallInfoMonitor::RunL iStatus: %d", iStatus.Int() ); + + RMobileCall::TMobileCallRemoteIdentityStatus idStatus = + iRemotePartyInfo.iRemoteIdStatus; + CSPLOGSTRING2( CSPINT, + "CSP: CSPCallInfoMonitor::RunL id status: %d", idStatus ); + + switch ( iStatus.Int() ) + { + case KErrNone: + { + if ( idStatus == RMobileCall::ERemoteIdentityAvailable) + { + iObserver.NotifyRemotePartyInfoChanged( + iRemotePartyInfo.iCallingName, + KNullDesC()); + } + else + { + CSPLOGSTRING2( CSPERROR, + "CSP: CSPCallInfoMonitor::RunL DISCARD: %d", idStatus ); + } + break; + } + default: + CSPLOGSTRING( CSPERROR, + "CSP: CSPCallInfoMonitor::RunL error" ); + break; + } + + if ( KErrNotSupported != iStatus.Int() ) + { + StartMonitoring(); + } + } + +//---------------------------------------------------------------------------- +// CSPCallInfoMonitor::DoCancel() +// +// Implementation of cancel. +//---------------------------------------------------------------------------- +// +void CSPCallInfoMonitor::DoCancel() + { + CSPLOGSTRING( CSPINT, "CSP: CSPCallInfoMonitor::DoCancel" ); + + iCall.CancelAsyncRequest( EMobileCallNotifyRemotePartyInfoChange ); + } + +//---------------------------------------------------------------------------- +// CSPCallInfoMonitor::CSPCallInfoMonitor() +// +// constructor. +//---------------------------------------------------------------------------- +// +CSPCallInfoMonitor::CSPCallInfoMonitor( MCSPCallObserver &aObserver, + RMobileCall& aCall ) : + CActive( EPriorityStandard ), + iObserver( aObserver ), + iCall( aCall ), + iRemotePartyInfoPckg( iRemotePartyInfo ) + { + CActiveScheduler::Add( this ); + } + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspcenreplistener.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspcenreplistener.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,169 @@ +/* +* Copyright (c) 2007 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: Central Repository listening +* +*/ + + +// INCLUDE FILES +#include "cspcenreplistener.h" +#include +#include "csppanic.pan" +#include "mcspcenrepobserver.h" +#include "csplogger.h" + + +// ----------------------------------------------------------------------------- +// CSPCenRepListener::CSPCenRepListener +// C++ default constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- +// +CSPCenRepListener* CSPCenRepListener::NewL( + TUid aUid, + TUint32 aMonitorSetting, + MCSPCenRepObserver* aObserver + ) + { + CSPLOGSTRING( CSPINT, "CSPCenRepListener::NewL" ) + CSPCenRepListener* self = new( ELeave ) + CSPCenRepListener( aUid, aMonitorSetting, aObserver ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + + +// Destructor +CSPCenRepListener::~CSPCenRepListener() + { + Cancel(); + delete iRepository; + } + + +// ----------------------------------------------------------------------------- +// CSPCenRepListener::Get +// ----------------------------------------------------------------------------- +// +TInt CSPCenRepListener::Get( TInt& aValue ) + { + return ( iRepository->Get( iMonitorSetting, aValue ) ); + } + + +// ----------------------------------------------------------------------------- +// CSPCenRepListener::DoCancel +// ----------------------------------------------------------------------------- +// +void CSPCenRepListener::DoCancel() + { + __ASSERT_DEBUG( iRepository, Panic( ECSPPanicNoRepository ) ); + iRepository->NotifyCancel( iMonitorSetting ); + } + + +// ----------------------------------------------------------------------------- +// CSPCenRepListener::RunError +// ----------------------------------------------------------------------------- +// +TInt CSPCenRepListener::RunError( + #ifdef _DEBUG + TInt aError // Log the leavecode from RunL + #else + TInt /*aError*/ + #endif + ) + { + #ifdef _DEBUG + CSPLOGSTRING2( CSPERROR, "CSPCenRepListener::RunError %d", aError ); + #endif + return ( KErrNone ); + } + + +// ----------------------------------------------------------------------------- +// CSPCenRepListener::RunL +// ----------------------------------------------------------------------------- +// +void CSPCenRepListener::RunL() + { + CSPLOGSTRING( CSPINT, "CSPCenRepListener::RunL"); + + // Don't resubmit the request on error + // Central repositry completes notifications with id of setting + // so check only that value of iStatus is negative + User::LeaveIfError( iStatus.Int() < KErrNone ); + SubmitNotifyRequestL(); + + TInt volume; + // The loudspeaker volume has changed in repository. + // Retrieve the current volume from repository. + User::LeaveIfError( Get( volume ) ); + + CSPLOGSTRING2( CSPINT, "CSPCenRepListener::RunL vol %d", volume); + iObserver->HandleNotifyCenRepL( iUid, iMonitorSetting, volume ); + } + + +// ----------------------------------------------------------------------------- +// CSPCenRepListener::CSPCenRepListener +// ----------------------------------------------------------------------------- +// +CSPCenRepListener::CSPCenRepListener( + TUid aUid, + TUint32 aMonitorSetting, + MCSPCenRepObserver* aObserver + ) : CActive( EPriorityStandard ), + iUid( aUid ), + iMonitorSetting( aMonitorSetting ), + iObserver( aObserver ) + { + CSPLOGSTRING( CSPINT, "CSPCenRepListener::CSPCenRepListener, start"); + CActiveScheduler::Add( this ); + + CSPLOGSTRING( CSPINT, "CSPCenRepListener::CSPCenRepListener, complete"); + } + + +// ----------------------------------------------------------------------------- +// CSPCenRepListener::ConstructL +// ----------------------------------------------------------------------------- +// +void CSPCenRepListener::ConstructL() + { + // Create repository instance + iRepository = CRepository::NewL( iUid ); + // Start monitoring + SubmitNotifyRequestL(); + } + + +// ----------------------------------------------------------------------------- +// CSPCenRepListener::SubmitNotifyRequestL +// ----------------------------------------------------------------------------- +// +void CSPCenRepListener::SubmitNotifyRequestL() + { + CSPLOGSTRING( CSPINT, "CSPCenRepListener::SubmitNotifyRequestL"); + __ASSERT_DEBUG( iRepository, Panic( ECSPPanicNoRepository ) ); + __ASSERT_DEBUG( !IsActive(), Panic( ECSPPanicRepositoryAlreadyActive ) ); + iRepository->NotifyRequest( iMonitorSetting, iStatus ); + SetActive(); + CSPLOGSTRING( CSPINT, "CSPCenRepListener::SubmitNotifyRequestL, complete"); + } + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspcipheringstatusmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspcipheringstatusmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,201 @@ +/* +* Copyright (c) 2007 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: Contains the implementation of class +* CSPCipheringStatusMonitor. +* +*/ + + +// INCLUDE FILES +#include +#include "cspcipheringstatusmonitor.h" +#include "csplogger.h" +#include "mcspsecuritysettingobserver.h" + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CSPCipheringStatusMonitor::CSPCipheringStatusMonitor( + RMmCustomAPI& aMmCustom, MCSPSecuritySettingObserver& aObs ) + : CActive( EPriorityStandard ), + iMmCustom( aMmCustom ), + iObserver( aObs ), + iIsInitialised( EFalse ), + iCallsSecured( EFalse ), + iSecureSpecified( ETrue ) + { + CActiveScheduler::Add( this ); + } + +// Destructor +CSPCipheringStatusMonitor::~CSPCipheringStatusMonitor() + { + Cancel(); + } + +// --------------------------------------------------------------------------- +// CSPCipheringStatusMonitor::NewL +// --------------------------------------------------------------------------- +// +CSPCipheringStatusMonitor* CSPCipheringStatusMonitor::NewL( + RMmCustomAPI& aMmCustom, MCSPSecuritySettingObserver& aObs ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPCipheringStatusMonitor::NewL()" ); + CSPCipheringStatusMonitor* self = new ( ELeave ) CSPCipheringStatusMonitor( + aMmCustom, aObs ); + return self; + } + +// ----------------------------------------------------------------------------- +// CSPCipheringStatusMonitor::StartMonitoring +// Starts ciphering status monitoring +// ----------------------------------------------------------------------------- +// +void CSPCipheringStatusMonitor::StartMonitoring() + { + if ( !IsActive() ) + { + if ( !iIsInitialised ) + { + // Monitor not initialized, get the initial ciphering status + iMmCustom.GetCipheringInfo( iStatus, iCipheringInfo ); + } + else + { + // Monitor already initialized, monitor changes + iMmCustom.NotifyCipheringInfoChange( iStatus, iCipheringInfo ); + } + SetActive(); + } + else + { + CSPLOGSTRING( CSPINT, + "CSP: CSPCipheringStatusMonitor::StartMonitoring: \ + not done, already active"); + } + } + +// ----------------------------------------------------------------------------- +// CSPCipheringStatusMonitor::DoCancel +// Cancels active object requests +// Method calls CancelAsyncRequest from the CustomaEtel object +// ----------------------------------------------------------------------------- +// +void CSPCipheringStatusMonitor::DoCancel() + { + CSPLOGSTRING( CSPINT, "CSP: CSPCipheringStatusMonitor::DoCancel" ); + + if ( IsActive() ) + { + if( iIsInitialised ) + { + iMmCustom.CancelAsyncRequest( ECustomNotifyCipheringInfoChangeIPC ); + } + else + { + iMmCustom.CancelAsyncRequest( ECustomGetCipheringInfoIPC ); + } + } + } + +// ----------------------------------------------------------------------------- +// CPESupplementaryServicesMonitor::RunL +// Method gets notification from etel that asyncronous request is completed. +// Method sends possible messages to the owner object and +// Method makes a new issue request to the CustomEtel. +// ----------------------------------------------------------------------------- +// +void CSPCipheringStatusMonitor::RunL() + { + CSPLOGSTRING2(CSPINT, + "CSP: CSPCipheringStatusMonitor::RunL: iStatus: %d", iStatus.Int() ); + + if ( iStatus == KErrNone ) + { + TBool secureSpecifiedChanged = iSecureSpecified != iCipheringInfo.iIndStatus; + + // Notify only on secure specified status changes + if ( secureSpecifiedChanged ) + { + // Is set when secure indicator showing is allowed. + iSecureSpecified = iCipheringInfo.iIndStatus; + + if ( !iSecureSpecified ) + { + iObserver.SecuritySettingChanged( + MCSPSecuritySettingObserver::ESecureNotSpecified ); + } + } + + TBool callsSecuredChanged = ( iCallsSecured != iCipheringInfo.iCiphStatus ); + + // Notify secure status changes only when secure has been specified + if ( iSecureSpecified && callsSecuredChanged ) + { + iCallsSecured = iCipheringInfo.iCiphStatus; + + if ( iCallsSecured ) + { + iObserver.SecuritySettingChanged( MCSPSecuritySettingObserver::ESecureCall ); + } + else + { + iObserver.SecuritySettingChanged( MCSPSecuritySettingObserver::ENotSecureCall ); + } + } + + iIsInitialised = ETrue; + StartMonitoring(); + } + else + { + CSPLOGSTRING( CSPINT, + "CSPCipheringStatusMonitor::RunL: Ciphering Off MONITOR OFF" ); + } + + if ( iStatus == KErrNotFound && !iIsInitialised ) + { + // Network was not ready while fetching ciphering info + iIsInitialised = ETrue; + StartMonitoring(); + CSPLOGSTRING( CSPINT, + "CALL: CSPCipheringStatusMonitor::RunL: StartMonitoring()" ); + } + } + +// ----------------------------------------------------------------------------- +// CSPCipheringStatusMonitor::NetworkSecurityStatus +// Network security status. +// ----------------------------------------------------------------------------- +// +TBool CSPCipheringStatusMonitor::NetworkSecurityStatus() const + { + return iCallsSecured; + } + +// ----------------------------------------------------------------------------- +// CSPCipheringStatusMonitor::SecureSpecified +// Secure specified status. +// ----------------------------------------------------------------------------- +// +TBool CSPCipheringStatusMonitor::SecureSpecified() const + { + return iSecureSpecified; + } + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspclientvideocall.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspclientvideocall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,201 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements class CSPClientVideoCall which provides client video call +* functionality +* +*/ + + +#include +#include +#include +#include + +#include "cspclientvideocall.h" +#include "csplogger.h" +#include "csppanic.pan" +#include "cspconsts.h" +#include "mcspcommoninfo.h" + + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::NewL Two phased construction. +// --------------------------------------------------------------------------- +// +CSPClientVideoCall* CSPClientVideoCall::NewL( const TDesC& aName, + RMobileLine& aLine, + const CCCECallParameters& aParams, + MCSPCommonInfo& aCommonInfo ) + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::NewL <<"); + + CSPClientVideoCall* self = new (ELeave) CSPClientVideoCall( aLine, + aName, aCommonInfo ); + CleanupStack::PushL( self ); + self->ConstructL( aParams ); + CleanupStack::Pop( self ); + CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::NewL >>"); + return self; + } + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::~CSPClientVideoCall +// --------------------------------------------------------------------------- +// +CSPClientVideoCall::~CSPClientVideoCall() + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::~CSPClientVideoCall"); + } + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::NotifyCallStateChanged +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPClientVideoCall::NotifyCallStateChanged( + MCCPCallObserver::TCCPCallState aState ) + { + CSPLOGSTRING2(CSPINT, + "CSPClientVideoCall::NotifyCallStateChanged state: %d", + aState); + + // Client call type is not valid before Dialling state + if ( aState == MCCPCallObserver::ECCPStateDialling ) + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::NotifyCallStateChanged\ + updating call type"); + + CCPCall::TCallType callType = SelectCallTypeFromProtocolCaps(); + iParams->SetCallType( callType ); + + // Indicate client call to observer in Dialling state + IndicateClientCall(); + } + + CSPVideoCall::NotifyCallStateChanged( aState ); + } + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::NotifyCallStateChangedWithInband +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPClientVideoCall::NotifyCallStateChangedWithInband( + MCCPCallObserver::TCCPCallState aState ) + { + CSPLOGSTRING2(CSPINT, + "CSPClientVideoCall::NotifyCallStateChangedWithInband %d", aState); + + // Client call type info is not available before Dialling phase + if ( aState == MCCPCallObserver::ECCPStateDialling ) + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::NotifyCallStateChanged\ + updating call type"); + + CCPCall::TCallType callType = SelectCallTypeFromProtocolCaps(); + iParams->SetCallType( callType ); + + // Indicate client call to observer in Dialling state + IndicateClientCall(); + } + + CSPVideoCall::NotifyCallStateChangedWithInband( aState ); + } + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::CSPClientVideoCall +// --------------------------------------------------------------------------- +// +CSPClientVideoCall::CSPClientVideoCall( RMobileLine& aLine, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo ) : + CSPVideoCall( aLine, ETrue, aName, + aCommonInfo ) + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::CSPClientVideoCall"); + // Set client call flag(s) + iClientCallIndicated = EFalse; + } + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::ConstructL +// Constructing CSPClientVideoCall for MT call. +// --------------------------------------------------------------------------- +// +void CSPClientVideoCall::ConstructL( const CCCECallParameters& aParams ) + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::ConstructL <"); + CSPVideoCall::ConstructL( aParams ); + CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::ConstructL >"); + } + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::IndicateClientCall +// Indicate dialling if needed +// --------------------------------------------------------------------------- +// +void CSPClientVideoCall::IndicateClientCall() + { + // Can be done only once for each call and possible duplicate + // notifies are blocked + if ( !iClientCallIndicated ) + { + iClientCallIndicated = ETrue; + + CSPLOGSTRING(CSPINT, + "CSPClientVideoCall::IndicateClientCall IndicateClientCall") + + iCommonInfo.IndicateClientCall( this ); + + CSPLOGSTRING(CSPINT, + "CSPClientVideoCall::IndicateClientCall IndicateClientCall completed") + } + else + { + CSPLOGSTRING(CSPERROR, + "CSPClientVideoCall::IndicateClientCall already indicated") + } + } + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::OpenCallHandleL +// --------------------------------------------------------------------------- +// +void CSPClientVideoCall::OpenCallHandleL() + { + CSPLOGSTRING(CSPINT, "CSPClientVideoCall::OpenCallHandleL <"); + + // Client call, open existing call handle + OpenExistingCallL( iName ); + + CSPLOGSTRING(CSPINT, "CSPClientVideoCall::OpenCallHandleL >"); + } + +// --------------------------------------------------------------------------- +// CSPClientVideoCall::UpdateCallInfoImpl +// Update call info including remote party name and number data +// --------------------------------------------------------------------------- +// +void CSPClientVideoCall::UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo ) + { + CSPLOGSTRING(CSPINT, "CSPClientVideoCall::UpdateCallInfoImpl <"); + + // Call was added by ETel monitor, update info accordingly + UpdateCallNameNumberInfo( aCallInfo, ETrue ); + UpdateCallOrigin( aCallInfo ); + + CSPLOGSTRING(CSPINT, "CSPClientVideoCall::UpdateCallInfoImpl >"); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspclientvoicecall.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspclientvoicecall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,190 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements class CSPClientVoiceCall which provides call functionality +* +*/ + + +#include +#include +#include +#include + +#include "cspclientvoicecall.h" +#include "csplogger.h" +#include "csppanic.pan" +#include "cspconsts.h" +#include "mcspcommoninfo.h" + + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::NewL Two phased construction. +// --------------------------------------------------------------------------- +// +CSPClientVoiceCall* CSPClientVoiceCall::NewL( const TDesC& aName, + RMobileLine& aLine, + const CCCECallParameters& aParams, + MCSPCommonInfo& aCommonInfo ) + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::NewL <"); + + CSPClientVoiceCall* self = new ( ELeave ) CSPClientVoiceCall( aLine, + aName, + aCommonInfo ); + CleanupStack::PushL( self ); + self->ConstructL( aParams ); + CleanupStack::Pop( self ); + CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::NewL >"); + return self; + } + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::~CSPClientVoiceCall +// --------------------------------------------------------------------------- +// +CSPClientVoiceCall::~CSPClientVoiceCall() + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::~CSPClientVoiceCall"); + } + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::CSPClientVoiceCall +// --------------------------------------------------------------------------- +// +CSPClientVoiceCall::CSPClientVoiceCall( RMobileLine& aLine, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo ): + CSPVoiceCall( aLine, + ETrue, aName, + aCommonInfo, EFalse ) + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::CSPClientVoiceCall"); + + // Set client call flag(s) + iClientCallIndicated = EFalse; + } + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::ConstructL +// Constructing CSPClientVoiceCall for MT call. +// --------------------------------------------------------------------------- +// +void CSPClientVoiceCall::ConstructL( const CCCECallParameters& aParams ) + { + CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::ConstructL <"); + CSPVoiceCall::ConstructL( aParams ); + CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::ConstructL >"); + } + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::NotifyCallStateChanged +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPClientVoiceCall::NotifyCallStateChanged( + MCCPCallObserver::TCCPCallState aState ) + { + CSPLOGSTRING2(CSPINT, + "CSPClientVoiceCall::NotifyCallStateChanged state: %d", + aState); + + // Client call is indicated during dialling state + if ( aState == MCCPCallObserver::ECCPStateDialling ) + { + IndicateClientCall(); + } + + CSPVoiceCall::NotifyCallStateChanged( aState ); + } + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::NotifyCallStateChangedWithInband +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPClientVoiceCall::NotifyCallStateChangedWithInband( + MCCPCallObserver::TCCPCallState aState ) + { + CSPLOGSTRING2(CSPINT, + "CSPClientVoiceCall::NotifyCallStateChangedWithInband state: %d", + aState); + + // Client call is indicated during dialling state + if ( aState == MCCPCallObserver::ECCPStateDialling ) + { + IndicateClientCall(); + } + + CSPVoiceCall::NotifyCallStateChangedWithInband( aState ); + } + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::IndicateClientCall +// Indicate dialling if needed +// --------------------------------------------------------------------------- +// +void CSPClientVoiceCall::IndicateClientCall() + { + // Can be done only once for each call and possible duplicate + // notifies are blocked + if ( !iClientCallIndicated ) + { + iClientCallIndicated = ETrue; + + CSPLOGSTRING(CSPINT, + "CSPClientVoiceCall::IndicateClientCall indicate client call") + + iCommonInfo.IndicateClientCall( this ); + + CSPLOGSTRING(CSPINT, + "CSPClientVoiceCall::IndicateClientCall IndicateClientCall completed") + } + else + { + CSPLOGSTRING(CSPERROR, + "CSPClientVoiceCall::IndicateClientCall already indicated") + } + } + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::OpenCallHandleL +// --------------------------------------------------------------------------- +// +void CSPClientVoiceCall::OpenCallHandleL() + { + CSPLOGSTRING(CSPINT, "CSPClientVoiceCall::OpenCallHandleL <"); + + // Client call, open existing call handle + OpenExistingCallL( iName ); + + CSPLOGSTRING(CSPINT, "CSPClientVoiceCall::OpenCallHandleL >"); + } + +// --------------------------------------------------------------------------- +// CSPClientVoiceCall::UpdateCallInfoImpl +// Update call info including remote party name and number data +// --------------------------------------------------------------------------- +// +void CSPClientVoiceCall::UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo ) + { + CSPLOGSTRING(CSPINT, "CSPClientVoiceCall::UpdateCallInfoImpl <"); + + // Call was added by ETel monitor, update info accordingly + UpdateCallNameNumberInfo( aCallInfo, ETrue ); + UpdateCallOrigin( aCallInfo ); + + CSPLOGSTRING(CSPINT, "CSPClientVoiceCall::UpdateCallInfoImpl >"); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspconferencecall.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspconferencecall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,623 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements class CSPConferenceCall which provides call functionality +* +*/ + + + +#include +#include +#include + +#include "cspconferencecall.h" +#include "cspvoicecall.h" +#include "cspetelconferencecallrequester.h" +#include "cspetelconferenceeventmonitor.h" +#include "cspetelconferencestatusmonitor.h" +#include "cspetelconferencecapsmonitor.h" +#include "mcspcallinformation.h" +#include "csplogger.h" +#include "csppanic.pan" +#include "cspconsts.h" + + +// --------------------------------------------------------------------------- +// CSPConferenceCall::NewL +// --------------------------------------------------------------------------- +// +CSPConferenceCall* CSPConferenceCall::NewL( + RMobilePhone& aPhone, + MCSPCallInformation& aCallInfo, + TUint32 aServiceId ) + { + CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::NewL()"); + + CSPConferenceCall* self = new ( ELeave ) CSPConferenceCall( aPhone, + aCallInfo, aServiceId ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::NewL() end"); + return self; + } + +// --------------------------------------------------------ß------------------- +// CSPConferenceCall::~CSPConferenceCall +// --------------------------------------------------------------------------- +// +CSPConferenceCall::~CSPConferenceCall() + { + CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::~CSPConferenceCall() start"); + iObservers.Close(); + + delete iCallStatusMonitor; + delete iCallEventMonitor; + delete iCallCapsMonitor; + delete iRequester; + iCall.Close(); + + CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::~CSPConferenceCall() end"); + } + +// --------------------------------------------------------------------------- +// CSPConferenceCall::NotifyEvent +// Conference event forwarding. +// This way Added, Removed and Split events are notified. +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::NotifyEvent( + MCCPConferenceCallObserver::TCCPConferenceCallEvent aEvent, + TName& aCallName ) + { + CSPLOGSTRING2( CSPINT, "CSPConferenceCall::NotifyEvent < %d", aEvent ); + + CSPCall* call = iCallInfo.FindCall( aCallName ); + TInt count = iObservers.Count(); + for ( TInt i = 0; i < count; i++ ) + { + MCCPConferenceCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->ConferenceCallEventOccurred( aEvent, call ); + } + } + CSPLOGSTRING2( CSPINT, "CSPConferenceCall::NotifyEvent > %d", aEvent ); + } + +// --------------------------------------------------------------------------- +// CSPConferenceCall::NotifyEvent +// Conference event forwarding in case of Terminated, Built or Swapped events. +// These events are not call specific. +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::NotifyEvent( + MCCPConferenceCallObserver::TCCPConferenceCallEvent aEvent ) + { + CSPLOGSTRING2( CSPINT, "CSPConferenceCall::NotifyEvent < %d", aEvent ); + + TInt count = iObservers.Count(); + for ( TInt i = 0; i < count; i++ ) + { + MCCPConferenceCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->ConferenceCallEventOccurred( aEvent, NULL ); + } + } + + CSPLOGSTRING2( CSPINT, "CSPConferenceCall::NotifyEvent > %d", aEvent ); + } + +// --------------------------------------------------------------------------- +// CSPConferenceCall::NotifyStateChanged +// Conference state change forwarding +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::NotifyStateChange( + MCSPConferenceStatusObserver::TCSPConferenceState aStatus ) + { + CSPLOGSTRING3( CSPINT, "CSPConferenceCall::NotifyStateChange %d this: %x", aStatus, + this ); + iCallState = static_cast(aStatus); + if ( aStatus == MCSPConferenceStatusObserver::ECSPConferenceIdle ) + { + iCallCountForAddCall = 0; + } + else + { + if ( iCallCountForAddCall == 1 ) + { + iCallCountForAddCall++; + } + } + + TInt count = iObservers.Count(); + for ( TInt i = 0; i < count; i++ ) + { + MCCPConferenceCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->ConferenceCallStateChanged( + static_cast(aStatus) ); + } + } + } + +// --------------------------------------------------------------------------- +// CSPConferenceCall::ConferenceCapsChanged +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::ConferenceCapsChanged( TUint32 aCaps ) + { + CSPLOGSTRING2( CSPINT, "CSPConferenceCall::ConferenceCapsChanged %b", aCaps ); + + TInt count = iObservers.Count(); + for ( TInt i = 0; i < count; i++ ) + { + MCCPConferenceCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->ConferenceCallCapsChanged( + (MCCPConferenceCallObserver::TCCPConferenceCallCaps) aCaps ); + } + } + } + +// --------------------------------------------------------------------------- +// CSPConferenceCall::NotifyConferenceError +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::NotifyConferenceError( TCCPConferenceCallError aErr ) + { + CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::NotifyConferenceError < %d", aErr ); + + TInt count = iObservers.Count(); + for ( TInt i = 0; i < count; i++ ) + { + MCCPConferenceCallObserver *obs = iObservers[i]; + if ( obs ) + { + obs->ErrorOccurred( aErr ); + } + } + + CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::NotifyConferenceError > %d", aErr ); + } + +// --------------------------------------------------------------------------- +// From class MCCPConferenceCall +// CSPConferenceCall::AddCall +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::AddCallL( MCCPCall* aCall ) + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::AddCallL " ); + + TInt err(KErrNone); + + if ( aCall ) + { + iCallCountForAddCall++; + CSPLOGSTRING2( CSPINT, "CSPConferenceCall::AddCallL calls added %d", + iCallCountForAddCall ); + + if ( iCallCountForAddCall < 2 ) + { + CSPLOGSTRING2( CSPINT, + "CSPConferenceCall::AddCallL DO NOTHING SINCE CALL COUNT IS %d", iCallCountForAddCall ); + } + else if ( iCallCountForAddCall == 2 ) + { + err = iRequester->MakeRequest( + CSPEtelConferenceCallRequester:: + EConferenceRequestTypeCreateConference ); + } + else if ( iCallCountForAddCall > 2 ) + { + CSPLOGSTRING( CSPINT, "CSPConferenceCall::AddCall cast call"); + CSPCall* cspCall = static_cast< CSPCall* > ( aCall ); + + iAddedCallName.Zero(); + cspCall->CallName( iAddedCallName ); + CSPLOGSTRING2( CSPINT, "CSPConferenceCall::AddCall n=%S", &iAddedCallName ); + err = iRequester->MakeAddCallRequest( iAddedCallName ); + CSPLOGSTRING2( CSPINT, + "CSPConferenceCall::AddCallL result %d", err); + } + } + else + { + CSPLOGSTRING( CSPERROR, + "CSPConferenceCall::AddCallL Invalid argument, call NULL" ); + + err = KErrArgument; + } + + CSPLOGSTRING2( CSPINT, "CSPConferenceCall::AddCallL returning %d", err); + + User::LeaveIfError( err ); + + CSPLOGSTRING( CSPINT, "CSPConferenceCall::AddCallL OK" ); + } + +// --------------------------------------------------------------------------- +// From class MCCPConferenceCall +// CSPConferenceCall::RemoveCallL +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::RemoveCallL( MCCPCall* aCall ) + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::RemoveCallL " ); + if ( aCall ) + { + User::LeaveIfError( aCall->HangUp() ); + CSPLOGSTRING( CSPINT, "CSPConferenceCall::RemoveCallL Hangup request sent" ); + } + else + { + CSPLOGSTRING( CSPERROR, "CSPConferenceCall::RemoveCallL Invalid argument" ); + User::Leave( KErrArgument ); + } + + CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::RemoveCallL end" ); + } + +// --------------------------------------------------------------------------- +// From class MCCPConferenceCall +// CSPConferenceCall::CallCount +// --------------------------------------------------------------------------- +// +TInt CSPConferenceCall::CallCount( ) const + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::CallCount" ); + TInt callCount(0); + TInt err = iCall.EnumerateCalls( callCount ); + CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::CallCount end" ); + return callCount; + } + +// --------------------------------------------------------------------------- +// From class MCCPConferenceCall +// CSPConferenceCall::GoOneToOneL +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::GoOneToOneL( MCCPCall& aCall ) + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::GoOneToOneL " ); + + if ( aCall.Parameters().CallType() == CCPCall::ECallTypeCSVoice ) + { + CSPVoiceCall& voiceCall = static_cast< CSPVoiceCall& > ( aCall ); + TInt err = voiceCall.GoOneToOne(); + CSPLOGSTRING2( CSPREQIN, "CSPConferenceCall::GoOneToOneL Request %d", + err ); + User::LeaveIfError( err ); + } + else + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::GoOneToOneL ERROR NOT VOICE CALL" ); + User::Leave( KErrNotSupported ); + } + CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::GoOneToOneL end" ); + } + +// --------------------------------------------------------------------------- +// From class MCCPConferenceCall +// CSPConferenceCall::ServiceId +// --------------------------------------------------------------------------- +// +TUint32 CSPConferenceCall::ServiceId() const + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::ServiceId " ); + return iServiceId; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPConferenceCall::HangUp +// --------------------------------------------------------------------------- +// +TInt CSPConferenceCall::HangUp() + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::HangUp " ); + TInt err(KErrNone); + + err = iRequester->MakeRequest( + CSPEtelConferenceCallRequester::EConferenceRequestTypeHangup ); + if ( err ) + { + CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::HangUp error %d", err ); + } + + return err; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPConferenceCall::Hold +// --------------------------------------------------------------------------- +// +TInt CSPConferenceCall::Hold() + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::Hold call" ); + + TInt err( KErrNone ); + + if ( iCallState == MCCPConferenceCallObserver::ECCPConferenceActive ) + { + CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::Hold > RMobileConferenceCall::Hold" ); + + err = iRequester->MakeRequest( + CSPEtelConferenceCallRequester::EConferenceRequestTypeHold ); + if ( err != KErrNone ) + { + CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::Hold error: %d", + err ); + } + } + else + { + CSPLOGSTRING2( CSPERROR, + "CSPConferenceCall::Hold : invalid state %d", + iCallState ); + err = KErrNotReady; + } + + + return err; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPConferenceCall::Resume +// --------------------------------------------------------------------------- +// +TInt CSPConferenceCall::Resume() + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::Resume " ); + + TInt err( KErrNone ); + + if ( iCallState == MCCPConferenceCallObserver::ECCPConferenceHold ) + { + CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::Resume " ); + err = iRequester->MakeRequest( + CSPEtelConferenceCallRequester::EConferenceRequestTypeResume ); + if ( KErrNone != err ) + { + CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::Resume Error %d", + err ); + } + + } + else + { + CSPLOGSTRING2( CSPERROR, + "CSPConferenceCall::Resume : invalid state %d", + iCallState ); + err = KErrNotReady; + } + + return err; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPConferenceCall::Swap +// --------------------------------------------------------------------------- +// +TInt CSPConferenceCall::Swap() + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::Swap " ); + TInt err(KErrNone); + + if ( iCallState == MCCPConferenceCallObserver::ECCPConferenceActive + || iCallState == MCCPConferenceCallObserver::ECCPConferenceHold ) + { + err = iRequester->MakeRequest( + CSPEtelConferenceCallRequester::EConferenceRequestTypeSwap ); + if ( err != KErrNone ) + { + CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::Swap Request error: %d", err ); + } + } + else + { + err = KErrNotReady; + CSPLOGSTRING2( CSPERROR, + "CSPConferenceCall::Swap Invalid state %d", + iCallState ); + } + + return err; + } + +// --------------------------------------------------------------------------- +// From class MCCPConferenceCall +// CSPConferenceCall::CurrentCallsToConferenceL +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::CurrentCallsToConferenceL() + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::CurrentCallsToConferenceL " ); + iRequester->MakeRequest( + CSPEtelConferenceCallRequester::EConferenceRequestTypeCreateConference ); + CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::CurrentCallsToConferenceL end" ); + } + +// --------------------------------------------------------------------------- +// From class MCCPConferenceCall +// CSPConferenceCall::GetCallArray +// --------------------------------------------------------------------------- +// +TInt CSPConferenceCall::GetCallArray( RPointerArray& aCallArray ) + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::GetCallArray" ); + // Reset array in case + aCallArray.Reset(); + TInt err( KErrNone ); + + RMobileCall::TMobileCallInfoV3 callInfo; + RMobileCall::TMobileCallInfoV3Pckg callInfoPck( callInfo ); + + TInt callCount = CallCount(); + CSPCall* call; + + // Resolve call objects that are part of the conference + for ( int i = 0; i < callCount; i++ ) + { + err = iCall.GetMobileCallInfo( i, callInfoPck ); + + if ( KErrNone == err ) + { + // Find call by call name + call = iCallInfo.FindCall( callInfo.iCallName); + if ( call ) + { + err = aCallArray.Append( call ); + } + else + { + err = KErrNotFound; + } + } + CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::GetCallArray err: %d", err ); + } + + CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::GetCallArray end"); + return err; + } + +// --------------------------------------------------------------------------- +// Adds observer. +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::AddObserverL( const MCCPConferenceCallObserver& aObserver ) + { + if ( iObservers.Find( &aObserver ) == KErrNotFound ) + { + iObservers.Append( &aObserver ); + } + } + +// --------------------------------------------------------------------------- +// Removes given observer. +// --------------------------------------------------------------------------- +// +TInt CSPConferenceCall::RemoveObserver( const MCCPConferenceCallObserver& aObserver ) + { + CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::RemoveObserver " ); + TInt found = iObservers.Find( &aObserver ); + if ( found != KErrNotFound ) + { + iObservers.Remove( found ); + return KErrNone; + } + + return found; + } + +// --------------------------------------------------------------------------- +// CSPConferenceCall::GetConferenceCallState +// --------------------------------------------------------------------------- +// +TInt CSPConferenceCall::GetConferenceCallState( + MCCPConferenceCallObserver::TCCPConferenceCallState& aState ) + { + CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::GetConferenceCallState()"); + RMobileConferenceCall::TMobileConferenceStatus status; + TInt err = iCall.GetConferenceStatus( status ); + + switch( status ) + { + case RMobileConferenceCall::EConferenceIdle: + { + aState = MCCPConferenceCallObserver::ECCPConferenceIdle; + break; + } + case RMobileConferenceCall::EConferenceActive: + { + aState = MCCPConferenceCallObserver::ECCPConferenceActive; + break; + } + case RMobileConferenceCall::EConferenceHold: + { + aState = MCCPConferenceCallObserver::ECCPConferenceHold; + break; + } + default: + break; + } + + return err; + } + +// --------------------------------------------------------------------------- +// CSPConferenceCall::CSPConferenceCall +// --------------------------------------------------------------------------- +// +CSPConferenceCall::CSPConferenceCall( RMobilePhone& aPhone, + MCSPCallInformation& aCallInfo, + TUint32 aServiceId ) : + iPhone( aPhone ), + iRequester( NULL ), + iCallInfo( aCallInfo ), + iServiceId( aServiceId ) + { + CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::CSPConferenceCall()"); + } + +// --------------------------------------------------------------------------- +// CSPConferenceCall::ConstructL +// Constructing CSPConferenceCall for MT call. +// --------------------------------------------------------------------------- +// +void CSPConferenceCall::ConstructL( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::ConstructL() start"); + User::LeaveIfError( iCall.Open(iPhone) ); + + iCall.EnumerateCalls( iCallCountForAddCall ); + CSPLOGSTRING2(CSPERROR, "CSPConferenceCall::Initialize() Call count : %d", + iCallCountForAddCall ); + + MCCPConferenceCallObserver::TCCPConferenceCallState conferenceState; + TInt err = GetConferenceCallState( conferenceState ); + + if ( KErrNone == err ) + { + iCallState = conferenceState; + CSPLOGSTRING2(CSPINT, "CSPConferenceCall::Initialize() State : %d", iCallState ); + } + else + { + iCallState = MCCPConferenceCallObserver::ECCPConferenceIdle; + CSPLOGSTRING2(CSPERROR, + "CSPConferenceCall::Initialize() state fetching error %d", err ); + } + + // Start Etel monitors + iCallEventMonitor = CSPEtelConferenceEventMonitor::NewL( *this, iCall ); + iCallEventMonitor->StartMonitoring(); + iCallStatusMonitor = CSPEtelConferenceStatusMonitor::NewL( *this, iCall ); + iCallStatusMonitor->StartMonitoring(); + iCallCapsMonitor = CSPEtelConferenceCapsMonitor::NewL( *this, iCall ); + iCallCapsMonitor->StartMonitoring(); + + iRequester = CSPEtelConferenceCallRequester::NewL( *this, iCall ); + CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::ConstructL() end"); + } + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspdevsound.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspdevsound.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,209 @@ +/* +* Copyright (c) 2006 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: Wrapper for CMMFDevSound +* +*/ + + +#include "cspdevsound.h" +#include "csplogger.h" +#include "mcspdevsoundobserver.h" + +#include +#include + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// CSPDevSound +// --------------------------------------------------------------------------- +// +CSPDevSound::CSPDevSound( MCSPDevSoundObserver& aObserver ) : + iObserver( aObserver ) + { + } + +// --------------------------------------------------------------------------- +// ConstructL +// --------------------------------------------------------------------------- +// +void CSPDevSound::ConstructL( + TMMFState aMode, + TUint aAudioPreference, + TUint aAudioPriority ) + { + CSPLOGSTRING( CSPINT, "CSPDevSound::ConstructL; Entry" ); + + TFourCC modemFourCC; + modemFourCC.Set(KS60FourCCCodeModem); + + iDevSound = CMMFDevSound::NewL(); +#ifndef __WINSCW__ + iDevSound->InitializeL( *this, modemFourCC, aMode ); +#endif + iPrioritySettings.iPriority = aAudioPriority; + iPrioritySettings.iPref = + static_cast( aAudioPreference ); + iPrioritySettings.iState = aMode; + CSPLOGSTRING( CSPINT, "CSPDevSound::ConstructL; Exit" ); + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +CSPDevSound::~CSPDevSound() + { + delete iDevSound; + } + +// --------------------------------------------------------------------------- +// Tries to activate the audio stream if not active or activating +// --------------------------------------------------------------------------- +// +void CSPDevSound::Activate() + { + CSPLOGSTRING( CSPINT, "CSPDevSound::Activate" ); + if( !IsActive() && !IsActivationOngoing() ) + { + iActivationOngoing = ETrue; + TInt err = KErrNone; + TRAP( err, DoActivateL() ); + CSPLOGSTRING2( CSPINT, "CSPDevSound::Activate %d", err ); + } + } + +// --------------------------------------------------------------------------- +// Deactivates the audio device. +// --------------------------------------------------------------------------- +// +void CSPDevSound::Deactivate() + { + CSPLOGSTRING( CSPINT, "CSPDevSound::Deactivate" ); + if( IsActive() || IsActivationOngoing() ) + { + CSPLOGSTRING( CSPINT, "CSPDevSound::Deactivate Stopping" ); + iDevSound->Stop(); + iActive = EFalse; + iActivationOngoing = EFalse; + } + } + +// --------------------------------------------------------------------------- +// ActivationOngoing +// --------------------------------------------------------------------------- +// +TBool CSPDevSound::IsActivationOngoing() const + { + return iActivationOngoing; + } + +// --------------------------------------------------------------------------- +// IsActive +// --------------------------------------------------------------------------- +// +TBool CSPDevSound::IsActive() const + { + return iActive; + } + +CMMFDevSound& CSPDevSound::DevSound() + { + return *iDevSound; + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +void CSPDevSound::InitializeComplete( TInt aError ) + { + CSPLOGSTRING( CSPINT, "CSPDevSound::InitializeComplete" ); + if( aError == KErrNone ) + { + iDevSound->SetPrioritySettings( iPrioritySettings ); + + } + + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +void CSPDevSound::BufferToBeFilled( CMMFBuffer* /*aBuffer*/ ) + { + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +void CSPDevSound::PlayError( TInt /*aError*/ ) + { + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +void CSPDevSound::ToneFinished( TInt /*aError*/ ) + { + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +void CSPDevSound::BufferToBeEmptied( CMMFBuffer* /*aBuffer*/ ) + { + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +void CSPDevSound::RecordError( TInt /*aError*/ ) + { + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +void CSPDevSound::ConvertError( TInt /*aError*/ ) + { + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Not implemented +// --------------------------------------------------------------------------- +// +void CSPDevSound::DeviceMessage( + TUid /*aMessageType*/, + const TDesC8& /*aMsg*/ ) + { + } + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspdtmfprovider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspdtmfprovider.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,261 @@ +/* +* Copyright (c) 2007 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: Contains the implementation of class CSPDTMFProvider +* +*/ + + +#include +#include +#include +#include + +#include "cspdtmfprovider.h" +#include "csplogger.h" +#include "cspeteldtmfmonitor.h" +#include "cspeteldtmfstopmonitor.h" + +CSPDTMFProvider* CSPDTMFProvider::NewL( RMobilePhone& aPhone, + RMmCustomAPI& aMmCustom ) + { + CSPDTMFProvider* self = new ( ELeave ) CSPDTMFProvider( aPhone, + aMmCustom ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor of the object. +// --------------------------------------------------------------------------- +// +CSPDTMFProvider::~CSPDTMFProvider( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPDTMFProvider::~CSPDTMFProvider()" ); + Cancel(); + iObservers.Close(); + delete iMonitor; + delete iStopMonitor; + } + +// --------------------------------------------------------------------------- +// Notifies observers about a DTMF event +// --------------------------------------------------------------------------- +// +void CSPDTMFProvider::NotifyDTMFEvent( const MCCPDTMFObserver::TCCPDtmfEvent aEvent, + const TInt aError, + const TChar aTone ) + { + CSPLOGSTRING2(CSPINT, "CSPDTMFProvider::NotifyDTMFEvent %d", aEvent ); + for ( TInt i = 0; i < iObservers.Count(); i++ ) + { + MCCPDTMFObserver *obs = iObservers[i]; + if ( obs ) + { + iObservers[i]->HandleDTMFEvent( aEvent, aError, aTone ); + } + } + } + + +// --------------------------------------------------------------------------- +// Cancel DTMF string sending +// --------------------------------------------------------------------------- +// +TInt CSPDTMFProvider::CancelDtmfStringSending() + { + CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::CancelDtmfStringSending" ); + if ( IsActive() ) + { + Cancel(); + } + else + { + return KErrAlreadyExists; // Is not active + } + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// Starts DTMF string sending +// --------------------------------------------------------------------------- +// +TInt CSPDTMFProvider::StartDtmfTone( const TChar aTone ) + { + CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::StartDtmfTone" ); + TInt ret(KErrAlreadyExists); + if (!IsActive()) + { + ret = iPhone.StartDTMFTone( aTone ); + } + return ret; + } + +// --------------------------------------------------------------------------- +// Stop DTMF tone +// --------------------------------------------------------------------------- +// +TInt CSPDTMFProvider::StopDtmfTone() + { + CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::StopDtmfTone" ); + TInt ret(KErrAlreadyExists); + if (!IsActive()) + { + ret = iPhone.StopDTMFTone(); + } + return ret; + } + +// --------------------------------------------------------------------------- +// Send DTMF string +// --------------------------------------------------------------------------- +// +TInt CSPDTMFProvider::SendDtmfToneString( const TDesC& aString ) + { + CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::SendDtmfToneString" ); + TInt ret = KErrInUse; + + if ( !IsActive() ) + { + iPhone.SendDTMFTones( iStatus, aString ); + SetActive(); + ret = KErrNone; + } + + return ret; + } + +// --------------------------------------------------------------------------- +// Continue DTMF string sending +// --------------------------------------------------------------------------- +// +TInt CSPDTMFProvider::ContinueDtmfStringSending( const TBool aContinue ) + { + CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::ContinueDtmfStringSending" ); + return iPhone.ContinueDTMFStringSending( aContinue ); + } + +// --------------------------------------------------------------------------- +// Adds observer. +// --------------------------------------------------------------------------- +// +void CSPDTMFProvider::AddObserverL( const MCCPDTMFObserver& aObserver ) + { + if ( iObservers.Find( &aObserver ) == KErrNotFound ) + { + iObservers.Append( &aObserver ); + } + } + +// --------------------------------------------------------------------------- +// Removes given observer. +// --------------------------------------------------------------------------- +// +TInt CSPDTMFProvider::RemoveObserver( const MCCPDTMFObserver& aObserver ) + { + TInt ret = KErrNotFound; + + TInt found = iObservers.Find( &aObserver ); + if ( found != KErrNotFound ) + { + iObservers.Remove( found ); + ret = KErrNone; + } + + return ret; + } + +// --------------------------------------------------------------------------- +// From CActive. +// Handles request completion. +// --------------------------------------------------------------------------- +// +void CSPDTMFProvider::RunL() + { + CSPLOGSTRING2( CSPREQIN, + "CSPDTMFProvider::RunL: status: %d", iStatus.Int() ); + + if ( iStatus == KErrNone ) + { + MCCPDTMFObserver::TCCPDtmfEvent event = + MCCPDTMFObserver::ECCPDtmfStringSendingCompleted; + NotifyDTMFEvent( event, KErrNone, NULL ); + } + else + { + TInt error = iStatus.Int(); + if ( error != KErrCancel ) + { + MCCPDTMFObserver::TCCPDtmfEvent event = + MCCPDTMFObserver::ECCPDtmfStringSendingCompleted; + NotifyDTMFEvent( event, error, NULL ); + } + else + { + // Cancel is not notified + CSPLOGSTRING( CSPREQEND, "CSPDTMFProvider::RunL Cancel." ); + } + } + + CSPLOGSTRING( CSPREQEND, "CSPDTMFProvider::RunL End of RunL." ); + } + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPDTMFProvider::DoCancel() + { + if ( iStatus == KRequestPending ) + { + CSPLOGSTRING( CSPINT, + "CSPDTMFProvider::DoCancel Canceling pending request.." ); + iPhone.CancelAsyncRequest( EMobilePhoneSendDTMFTones ); + } + } + +// --------------------------------------------------------------------------- +// Constructs the requester. +// --------------------------------------------------------------------------- +// +CSPDTMFProvider::CSPDTMFProvider( RMobilePhone& aPhone, + RMmCustomAPI& aMmCustom ): + CActive( EPriorityStandard ), + iPhone( aPhone ), + iMmCustom( aMmCustom ) + { + CSPLOGSTRING(CSPOBJECT, "CSPDTMFProvider::CSPDTMFProvider()" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Constructs the requester in the second phase. +// --------------------------------------------------------------------------- +// +void CSPDTMFProvider::ConstructL( ) + { + if ( !iPhone.SubSessionHandle() || !iMmCustom.SubSessionHandle() ) + { + User::Leave( KErrArgument ); + } + iMonitor = CSPEtelDtmfMonitor::NewL( *this, iMmCustom ); + iMonitor->StartMonitoring(); + iStopMonitor = CSPEtelDtmfStopMonitor::NewL( *this, iPhone ); + iStopMonitor->StartMonitoring(); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelcallcapsmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelcallcapsmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,145 @@ +/* +* Copyright (c) 2007 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: Implementation of class CSPEtelCallCapsMonitor which +* monitors call status changes from ETel and notifies observer +* according to call status change. +* +*/ + + +#include "cspetelcallcapsmonitor.h" + +#include + +#include "mcspcallobserver.h" +#include "csplogger.h" + + +// --------------------------------------------------------------------------- +// Constructs the monitor in two phase. +// --------------------------------------------------------------------------- +// +CSPEtelCallCapsMonitor* CSPEtelCallCapsMonitor::NewL( + MCSPCallObserver& aObserver, + RMobileCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallCapsMonitor::NewL()" ); + CSPEtelCallCapsMonitor* self = + new ( ELeave ) CSPEtelCallCapsMonitor( + aObserver, aCall ); + return self; + } + + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelCallCapsMonitor::~CSPEtelCallCapsMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallCapsMonitor::~CSPEtelCallCapsMonitor()" ); + Cancel(); + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallCapsMonitor::~CSPEtelCallCapsMonitor() ok" ); + + } + + +// --------------------------------------------------------------------------- +// Starts the monitoring. +// --------------------------------------------------------------------------- +// +void CSPEtelCallCapsMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallCapsMonitor::StartMonitoring()" ); + + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, + "CSPEtelCallCapsMonitor::StartMonitoring: Request \ + RMobilePhone::NotifyCapsChange" ); + iCall.NotifyMobileCallCapsChange( iStatus, iCapsPckg ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSPEtelCallCapsMonitor::StartMonitoring: Already active" ); + } + } + +// --------------------------------------------------------------------------- +// From CActive +// Handles call status notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelCallCapsMonitor::RunL() + { + CSPLOGSTRING2( CSPREQEND, + "CSPEtelCallCapsMonitor::RunL: status: %d", iStatus.Int() ); + + if ( iStatus == KErrNone ) + { + TUint32 capsFlags = iCaps.iCallControlCaps; + + iObserver.CallCapsChanged( capsFlags ); + StartMonitoring(); + } + + } + + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelCallCapsMonitor::DoCancel() + { + iCall.CancelAsyncRequest( EMobileCallNotifyMobileCallCapsChange ); + } + + + + +// --------------------------------------------------------------------------- +// Constructs the monitor.. +// --------------------------------------------------------------------------- +// +CSPEtelCallCapsMonitor::CSPEtelCallCapsMonitor( MCSPCallObserver& aObserver, + RMobileCall& aCall ) : + CActive( EPriorityStandard ), + iObserver( aObserver ), + iCall ( aCall ), + iCapsPckg( iCaps ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallCapsMonitor::CSPEtelCallCapsMonitor()" ); + CActiveScheduler::Add( this ); + } + + +TUint32 CSPEtelCallCapsMonitor::FetchCallControlCapsL() + { + TInt err = iCall.GetMobileCallCaps( iCapsPckg ); + User::LeaveIfError( err ); + return iCaps.iCallControlCaps; + } + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelcalleventmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelcalleventmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,291 @@ +/* +* Copyright (c) 2007 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: Implementation of class CSPEtelCallEventMonitor which +* monitors call events from ETel and notifies observer +* accordingly. +* +*/ + + +#include +#include +#include + +#include "cspetelcalleventmonitor.h" +#include "csplogger.h" +#include "cspcall.h" + + + +// --------------------------------------------------------------------------- +// CSPEtelCallEventMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelCallEventMonitor* CSPEtelCallEventMonitor::NewL( MCSPCallObserver& aObserver, + RMobileCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallEventMonitor::NewL()" ); + CSPEtelCallEventMonitor* self = new ( ELeave ) CSPEtelCallEventMonitor( + aObserver, aCall ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelCallEventMonitor::~CSPEtelCallEventMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallEventMonitor::~CSPEtelCallEventMonitor()" ); + Cancel(); + + if ( iDestrPtr ) + { + *iDestrPtr = ETrue; + iDestrPtr = NULL; + } + } + +// --------------------------------------------------------------------------- +// Starts the monitoring. +// --------------------------------------------------------------------------- +// +void CSPEtelCallEventMonitor::StartMonitoring() + { + CSPLOGSTRING( CSPINT, "CSPEtelCallEventMonitor::StartMonitoring" ); + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, + "CSP: CSPEtelCallEventMonitor::StartMonitoring: \ + Request RMobilePhone::NotifyCallEvent" ); + iCall.NotifyCallEvent( iStatus, iCallEvent ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelCallEventMonitor::StartMonitoring: Already active" ); + } + } + +// --------------------------------------------------------------------------- +// From CActive +// Handles event notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelCallEventMonitor::RunL() + { + CSPLOGSTRING( CSPINT, "CSPEtelCallEventMonitor::RunL") + + // Survive from monitor destruction during observing sequence + TBool destroyed = EFalse; + iDestrPtr = &destroyed; + + if ( iStatus == KErrNone ) + { + switch ( iCallEvent ) + { + // The call has been terminated by the remote party. + case RMobileCall::ERemoteTerminated: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely terminated" ); + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPRemoteTerminated ); + break; + } + // The call has been placed on hold as a result of a local action + case RMobileCall::ELocalHold: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Locally held" ); + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPLocalHold ); + break; + } + + // The call has been resumed as a result of a local action. + case RMobileCall::ELocalResume: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Locally resumed" ); + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPLocalResume ); + break; + } + // The call has been deflected to another remote party as a result + // of a local action. + case RMobileCall::ELocalDeflectCall: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Locally deflected" ); + iObserver.NotifyTransferCallEventOccurred( + MCCPTransferObserver::ECCPLocalTransfer ); + break; + } + // The call has been transferred to another remote party as a + // result of a local action. + case RMobileCall::ELocalTransfer: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Locally transfered" ); + iObserver.NotifyTransferCallEventOccurred( + MCCPTransferObserver::ECCPLocalTransfer ); + break; + } + // The call has been placed on hold by the remote connected party + case RMobileCall::ERemoteHold: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely held" ); + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPRemoteHold ); + break; + } + // The call has been resumed by the remote connected party. + case RMobileCall::ERemoteResume: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely resumed" ); + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPRemoteResume ); + break; + } + // The call has been joined by the remote connected party to other + // call(s) to create/add to a conference call. + case RMobileCall::ERemoteConferenceCreate: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely created \ + conference" ); + + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPRemoteConferenceCreate ); + + break; + } + case RMobileCall::ERemoteTransferring: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely created \ + conference" ); + iObserver.NotifyTransferCallEventOccurred( + MCCPTransferObserver::ECCPRemoteTransferring ); + break; + } + case RMobileCall::ERemoteTransferAlerting: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely created \ + conference" ); + iObserver.NotifyTransferCallEventOccurred( + MCCPTransferObserver::ECCPRemoteTransferAlerting ); + break; + } + // The outgoing call has been barred by the remote party + case RMobileCall::ERemoteBarred: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely barred" ); + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPRemoteBarred ); + break; + } + + // The call is being forwarded by the remote party. + case RMobileCall::ERemoteForwarding: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely forwarded" ); + iObserver.NotifyForwardEventOccurred( + MCCPForwardObserver::ECCPRemoteForwarding ); + break; + } + + // The call is waiting at the remote end. + case RMobileCall::ERemoteWaiting: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Remotely waiting" ); + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPRemoteWaiting ); + break; + } + + // The outgoing call has been barred by the local party. + case RMobileCall::ELocalBarred: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Locally barred" ); + iObserver.NotifyCallEventOccurred( + MCCPCallObserver::ECCPLocalBarred ); + break; + } + + default: + { + CSPLOGSTRING2( CSPINT, + "CSP CSPEtelCallEventMonitor::RunL: Unspecified/protocol \ + specific call event: %d", iCallEvent ); + break; + } + } + } + + if ( !destroyed ) + { + // In case instance has not been deleted, pointer must be cleared. + iDestrPtr = NULL; + if ( iStatus == KErrNone ) + { + StartMonitoring(); + } + } + else + { + // already destroyed, do not touch members. + } + } + +// --------------------------------------------------------------------------- +// From CActive +// Request canceling. +// --------------------------------------------------------------------------- +// +void CSPEtelCallEventMonitor::DoCancel() + { + CSPLOGSTRING( CSPINT, "CSPEtelCallEventMonitor::DoCancel" ); + iCall.CancelAsyncRequest( EMobileCallNotifyCallEvent ); + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPEtelCallEventMonitor::CSPEtelCallEventMonitor( MCSPCallObserver& aObserver, + RMobileCall& aCall ) : + CActive( EPriorityStandard ), + iObserver( aObserver ), + iCall ( aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallEventMonitor::CSPEtelCallEventMonitor()" ); + CActiveScheduler::Add( this ); + } + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelcallrequester.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelcallrequester.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,929 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Contains the implementation of class CSPEtelCallRequester +* +*/ + +#include "cspetelcallrequester.h" + +#include +#include +#include +#include + +#include "mcspcallerrorobserver.h" +#include "csplogger.h" + + +// --------------------------------------------------------------------------- +// Constructs the requester via two phased constructing. +// --------------------------------------------------------------------------- +// +CSPEtelCallRequester* CSPEtelCallRequester::NewL( + MCSPCallErrorObserver& aObserver, + RMobileCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelCallRequester::NewL()" ); + CSPEtelCallRequester* self = new ( ELeave ) CSPEtelCallRequester( + aObserver, aCall ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor of the object. +// --------------------------------------------------------------------------- +// +CSPEtelCallRequester::~CSPEtelCallRequester( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelCallRequester::~CSPEtelCallRequester()" ); + CSPLOGSTRING2(CSPINT, "CSPEtelCallRequester:: type: %d", iRequestType ); + Cancel(); + } + +// --------------------------------------------------------------------------- +// CSPEtelCallRequester::MakeDialRequest +// --------------------------------------------------------------------------- +// +TInt CSPEtelCallRequester::MakeDialRequest( + const TDesC8& aCallParams, + TDesC& aRecipient ) + { + CSPLOGSTRING(CSPINT, "CSPEtelCallRequester::MakeDialRequest" ); + iRequestType = ERequestTypeDial; + + if ( !IsActive() ) + { + iCall.Dial( iStatus, aCallParams, aRecipient ); + SetActive(); + } + else + { + return KErrInUse; + } + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSPEtelCallRequester::MakeDialNoFdnCheckRequest +// --------------------------------------------------------------------------- +// +TInt CSPEtelCallRequester::MakeDialNoFdnCheckRequest( + const TDesC8& aCallParams, + TDesC& aRecipient ) + { + CSPLOGSTRING(CSPINT, "CSPEtelCallRequester::MakeDialNoFdnCheckRequest" ); + iRequestType = ERequestTypeDial; + + if ( !IsActive() ) + { + iCall.DialNoFdnCheck( iStatus, aCallParams, aRecipient ); + SetActive(); + } + else + { + return KErrInUse; + } + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSPEtelCallRequester::MakeAnswerRequest +// --------------------------------------------------------------------------- +// +TInt CSPEtelCallRequester::MakeAnswerRequest( + const TDesC8& aCallParams ) + { + CSPLOGSTRING(CSPINT, "CSPEtelCallRequester::MakeAnswerRequest" ); + if ( !IsActive() ) + { + iRequestType = ERequestTypeAnswer; + iCall.AnswerIncomingCall( iStatus, aCallParams ); + SetActive(); + } + else + { + return KErrInUse; + } + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSPEtelCallRequester::MakeDialEmergencyRequest +// --------------------------------------------------------------------------- +// +TInt CSPEtelCallRequester::MakeDialEmergencyRequest( + const RMobileENStore::TEmergencyNumber& aRecipient ) + { + CSPLOGSTRING(CSPINT, "CSPEtelCallRequester::MakeDialEmergencyRequest" ); + Cancel(); + + iRequestType = ERequestTypeDialEmergency; + iCall.DialEmergencyCall( iStatus, aRecipient ); + SetActive(); + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSPEtelCallRequester::MakeRequest +// --------------------------------------------------------------------------- +// +TInt CSPEtelCallRequester::MakeRequest( TRequestType aRequest ) + { + TInt result = KErrUnknown; + + if ( !IsActive() ) + { + if ( aRequest != ERequestTypeDial + && aRequest != ERequestTypeDialEmergency ) + { + iRequestType = aRequest; + } + CSPLOGSTRING2( CSPREQOUT, + "CSP: CSPEtelCallRequester::MakeRequest %d", iRequestType ); + switch ( aRequest ) + { + case ERequestTypeDial: + { + // Requested through MakeDialRequest as a special case because + // of the parameters. + result = KErrNotSupported; + break; + } + case ERequestTypeDialEmergency: + { + // Requested through MakeDialEmergencyRequest as a special case because + // of the parameters. + result = KErrNotSupported; + break; + } + case ERequestTypeAnswer: + { + iCall.AnswerIncomingCall( iStatus ); + result = KErrNone; + SetActive(); + break; + } + case ERequestTypeHangup: + { + iCall.HangUp( iStatus ); + SetActive(); + result = KErrNone; + break; + } + case ERequestTypeHold: + { + iCall.Hold( iStatus ); + SetActive(); + result = KErrNone; + break; + } + case ERequestTypeResume: + { + iCall.Resume( iStatus ); + SetActive(); + result = KErrNone; + break; + } + case ERequestTypeGoOneToOne: + { + iCall.GoOneToOne( iStatus ); + SetActive(); + result = KErrNone; + break; + } + case ERequestTypeSwap: + { + iCall.Swap( iStatus ); + SetActive(); + result = KErrNone; + break; + } + + default: + { + CSPLOGSTRING2( CSPERROR, + "CSP: CSPEtelCallRequester::MakeRequest: Unspecified \ + request type: %d", iRequestType ); + result = KErrArgument; + } + } + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelCallRequester::MakeRequest: Already active" ); + result = KErrInUse; + } + + return result; + } + +// --------------------------------------------------------------------------- +// CSPEtelCallRequester::CancelRequest +// --------------------------------------------------------------------------- +// +TInt CSPEtelCallRequester::CancelRequest( TRequestType aRequest ) + { + TInt result(KErrNone); + if ( iRequestType == aRequest ) + { + Cancel(); + } + else + { + CSPLOGSTRING3( CSPERROR, "CSPEtelCallRequester::CancelRequest: No such active, current is %d, param=%d", iRequestType, aRequest ); + result = KErrNotReady; + } + return result; + } + +// --------------------------------------------------------------------------- +// From CActive +// CSPEtelCallRequester::RunL +// --------------------------------------------------------------------------- +// +void CSPEtelCallRequester::RunL() + { + CSPLOGSTRING2( CSPREQEND, "CSPEtelCallRequester::RunL: status: %d", iStatus.Int() ); + + TRequestType endedRequest = iRequestType; + iRequestType = ERequestTypeNone; + if ( iStatus == KErrNone ) + { + + switch ( endedRequest ) + { + case ERequestTypeDial: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Dial request OK" ); + break; + } + case ERequestTypeAnswer: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Answer request OK" ); + break; + } + case ERequestTypeHangup: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Hangup request OK" ); + break; + } + case ERequestTypeHold: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Hold request OK" ); + break; + } + case ERequestTypeResume: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Resume request OK" ); + break; + } + case ERequestTypeGoOneToOne: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: GoOneToOne request OK" ); + break; + } + case ERequestTypeSwap: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Swap request OK" ); + break; + } + case ERequestTypeDialEmergency: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: DialEmergency request OK" ); + break; + } + default: + { + CSPLOGSTRING2( CSPERROR, + "CSP CSPEtelCallRequester::RunL: Unspecified request \ + type: %d", iRequestType ); + break; + } + } + } + else + { + // Error situations + TInt err = iStatus.Int(); + CSPLOGSTRING2( CSPERROR, "CSP CSPEtelCallRequester::RunL: request \ + completed with error: %d", err ); + + switch ( endedRequest ) + { + case ERequestTypeDial: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Dial request" ); + if ( err != KErrCancel ) + { + iObserver.DialRequestFailed( err ); + return; // In case of Idle state has caused + // immediate destruction of this object. + } + break; + } + case ERequestTypeAnswer: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Answer request" ); + iObserver.NotifyErrorOccurred( ECCPRequestFailure ); + break; + } + case ERequestTypeHangup: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Hangup request" ); + iObserver.NotifyErrorOccurred( ECCPRequestFailure ); + break; + } + case ERequestTypeHold: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Hold request" ); + iObserver.NotifyErrorOccurred( ECCPLocalHoldFail ); + + break; + } + case ERequestTypeResume: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Resume request" ); + iObserver.NotifyErrorOccurred( ECCPLocalResumeFail ); + break; + } + case ERequestTypeGoOneToOne: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: GoOneToOne request" ); + iObserver.NotifyErrorOccurred( ECCPRequestFailure ); + break; + } + case ERequestTypeSwap: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelCallRequester::RunL: Swap request" ); + iObserver.NotifyErrorOccurred( ECCPRequestFailure ); + break; + } + case ERequestTypeDialEmergency: + { + CSPLOGSTRING2( CSPINT, + "CSP CSPEtelCallRequester: RunL: DialEmergency error: %d", + err ); + + if ( err != KErrCancel ) + { + iObserver.EmergencyDialRequestFailed(err); + } + + break; + } + + default: + { + CSPLOGSTRING2( CSPERROR, + "CSP CSPEtelCallRequester::RunL: Unspecified request \ + type: %d", iRequestType ); + break; + } + } + + } + } + + +// --------------------------------------------------------------------------- +// From CActive +// CSPEtelCallRequester::DoCancel +// --------------------------------------------------------------------------- +// +void CSPEtelCallRequester::DoCancel() + { + CSPLOGSTRING( CSPREQOUT, "CSP: CSPEtelCallRequester::DoCancel" ); + TRequestType cancelRequest = iRequestType; + iRequestType = ERequestTypeNone; + + if ( IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, "CSP: CSPEtelCallRequester::DoCancel IsActive" ); + switch ( cancelRequest ) + { + case ERequestTypeDial: + { + CSPLOGSTRING( CSPREQOUT, "CSPEtelCallRequester::DoCancel DialCancel" ); + iCall.DialCancel(); + CSPLOGSTRING( CSPREQOUT, "CSPEtelCallRequester::DoCancel DialCancel OK" ); + break; + } + case ERequestTypeAnswer: + { + iCall.AnswerIncomingCallCancel(); + break; + } + case ERequestTypeHangup: + { + iCall.HangUpCancel(); + break; + } + case ERequestTypeHold: + { + iCall.CancelAsyncRequest( EMobileCallHold ); + break; + } + case ERequestTypeResume: + { + iCall.CancelAsyncRequest( EMobileCallResume ); + break; + } + case ERequestTypeGoOneToOne: + { + iCall.CancelAsyncRequest( EMobileCallGoOneToOne ); + break; + } + case ERequestTypeSwap: + { + iCall.CancelAsyncRequest( EMobileCallSwap ); + break; + } + case ERequestTypeDialEmergency: + { + iCall.CancelAsyncRequest( EMobileCallDialEmergencyCall ); + break; + } + default: + { + CSPLOGSTRING2( CSPERROR, "CSP CSPEtelCallRequester::DoCancel: \ + Unspecified request type: %d", iRequestType ); + } + } + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelCallRequester::DoCancel: Not active" ); + } + } + +// --------------------------------------------------------------------------- +// Constructs the requester. +// --------------------------------------------------------------------------- +// +CSPEtelCallRequester::CSPEtelCallRequester( + MCSPCallErrorObserver& aObserver, + RMobileCall& aCall ) : + CActive( EPriorityStandard ), + iObserver( aObserver ), + iCall ( aCall ), + iRequestType( ERequestTypeNone ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelCallRequester::CSPEtelCallRequester()" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Error value mapping. +// --------------------------------------------------------------------------- +// +TCCPError CSPEtelCallRequester::MapError( TInt aErrorCode ) + { + TCCPError ret = ECCPRequestFailure; + CSPLOGSTRING2( CSPINT, "CSPEtelCallRequester::MapError %d", aErrorCode); + + switch ( aErrorCode ) + { + case KErrGsmCCUnassignedNumber: + { + ret = ECCPErrorNotReached; + break; + } + case KErrGsmCCUserBusy: + { + ret = ECCPErrorBusy; + break; + } + case KErrMMEtelCallForbidden: + case KErrGsmCallInProgress: + case KErrGsmNumberBarred: + case KErrGsmNotAllowed: + case KErrEtelCallNotActive: + case KErrEtelCallAlreadyActive: + { + ret = ECCPErrorNotAllowed; + break; + } + case KErrGsmCCNumberChanged: + { + ret = ECCPErrorMovedPermanently; + break; + } + case KErrGsmCCInvalidNumberFormat: + { + ret = ECCPErrorInvalidURI; + break; + } + case KErrGsmCCNormalUnspecified: + { + ret = ECCPErrorNoAnswerForVideo; + break; + } + case KErrGsmCCTemporaryFailure: + case KErrGsmCCSwitchingEquipmentCongestion: + case KErrGsmCCRequestedChannelNotAvailable: + { + ret = ECCPErrorNetworkBusy; + break; + } + case KErrGsmCCNetworkOutOfOrder: + { + ret = ECCPErrorNetworkOutOfOrder; + break; + } + case KErrGsmCCRequestedFacilityNotSubscribed: + { + ret = ECCPErrorCCRequestedFacilityNotSubscribed; + break; + } + case KErrGsmCCInvalidCallReferenceValue: + { + ret = ECCPErrorInvalidCallReferenceValue; + break; + } + case KErrGsmCCUserNotInCug: + { + ret = ECCPErrorUserNotInCug; + break; + } + case KErrGsmCCIncompatibleDestination: + { + // Affects to phone redial handling + ret = ECCPErrorBadRequest; + break; + } + case KErrGsmCCInvalidTransitNetworkSelection: + { + ret = ECCPErrorCCInvalidTransitNetworkSelection; + break; + } + case KErrGsmCCSemanticallyIncorrectMessage: + case KErrGsmCCConditionalIEError: + case KErrGsmCCUnspecifiedProtocolError: + case KErrEtelNoCarrier: + { + ret = ECCPErrorConnectionError; + break; + } + case KErrGsmCallServerFail: + case KErrGsm0707NotFound: + case KErrGsmCallRejected: + { + ret = ECCPErrorRejected; + break; + } + case KErrGeneral: + { + ret = ECCPErrorGeneral; + break; + } + case KErrNotSupported: + { + ret = ECCPErrorNotSupported; + break; + } + case KErrNoMemory: + { + ret = ECCPErrorNoMemory; + break; + } + case KErrInUse: + { + ret = ECCPErrorAlreadyInUse; + break; + } + case KErrNotReady: + { + ret = ECCPErrorNotReady; + break; + } + case KErrGsmNoService: + { + ret = ECCPErrorNoService; + break; + } + case KErrGsmOfflineOpNotAllowed: + { + ret = ECCPErrorNotAllowedInOfflineMode; + break; + } + case KErrDiagnosticInfoBarredWithCUG: + { + ret = ECCPErrorCUGOutgoingCallsBarred; + break; + } + case KErrDiagnosticInfoBarredNoCUG: + { + ret = ECCPErrorCUGNotSelected; + break; + } + case KErrDiagnosticInfoBarredUnknownCUG: + { + ret = ECCPErrorCUGIndexUnknown; + break; + } + case KErrDiagnosticInfoBarredIncompatibleCUG: + { + ret = ECCPErrorCUGIndexIncompatible; + break; + } + case KErrDiagnosticInfoBarredFailureCUG: + { + ret = ECCPErrorCUGCallsFailure; + break; + } + case KErrDiagnosticInfoBarredClirNotSubscribed: + { + ret = ECCPErrorCLIRNotSubscribed; + break; + } + case KErrDiagnosticInfoBarredCCBSPossible: + { + ret = ECCPErrorCCBSPossible; + break; + } + case KErrDiagnosticInfoBarredCCBSNotPossible: + { + ret = ECCPErrorCCBSNotPossible; + break; + } + case KErrGsmCCRequestedFacilityNotImplemented: + { + ret = ECCPErrorServiceSettingError; + break; + } + case KErrGsm0707SimNotInserted: + case KErrGsm0707SIMPuk1Required: + case KErrGsm0707SimPin1Required: + case KErrGsm0707SimPin2Required: + case KErrGsm0707SimFailure: + case KErrGsm0707PhoneToSimLockRequired: + case KErrGsm0707SimWrong: + { + ret = ECCPErrorAuthenticationFailed; + break; + } + case KErrGsmInvalidFdn: + { + ret = ECCPErrorInvalidFDN; + break; + } + case KErrArgument: + { + ret = ECCPErrorInvalidPhoneNumber; + break; + } + case KErrGsmCCOperatorDeterminedBarring: + { + ret = ECCPErrorNumberBarred; + break; + } + case KErrGsmCCChannelUnacceptable: + { + ret = ECCPErrorUnacceptableChannel; + break; + } + case KErrGsmCCAccessInformationDiscarded: + { + ret = ECCPErrorAccessInformationDiscarded; + break; + } + case KErrGsmCCQualityOfServiceNotAvailable: + { + ret = ECCPErrorQualityOfServiceNotAvailable; + break; + } + case KErrAccessDenied: + { + ret = ECCPErrorAccessDenied; + break; + } + case KErrGsmCCNoRouteToDestination: + { + ret = ECCPErrorCCNoRouteToDestination; + break; + } + case KErrGsmCCDestinationOutOfOrder: + { + ret = ECCPErrorCCDestinationOutOfOrder; + break; + } + case KErrGsmCCResourceNotAvailable: + { + ret = ECCPErrorCCResourceNotAvailable; + break; + } + case KErrGsmCCIncompatibleMessageInCallState: + { + ret = ECCPErrorCCIncompatibleMessageInCallState; + break; + } + case KErrGsmCCNormalCallClearing: + { + ret = ECCPErrorCCNormalCallClearing; + break; + } + case KErrGsmCCUserNotResponding: + { + ret = ECCPErrorCCUserNotResponding; + break; + } + case KErrGsmCCUserAlertingNoAnswer: + { + ret = ECCPErrorCCUserAlertingNoAnswer; + break; + } + case KErrGsmCCCallRejected: + { + ret = ECCPErrorCCCallRejected; + break; + } + case KErrGsmCCPreemption: + { + ret = ECCPErrorCCPreemption; + break; + } + case KErrGsmCCFacilityRejected: + { + ret = ECCPErrorCCFacilityRejected; + break; + } + case KErrGsmCCResponseToStatusEnquiry: + { + ret = ECCPErrorCCResponseToStatusEnquiry; + break; + } + case KErrGsmCCInvalidMandatoryInformation: + { + ret = ECCPErrorCCInvalidMandatoryInformation; + break; + } + case KErrGsmCCNonExistentMessageType: + { + ret = ECCPErrorCCNonExistentMessageType; + break; + } + case KErrGsmCCIncompatibleMessageInProtocolState: + { + ret = ECCPErrorCCIncompatibleMessageInProtocolState; + break; + } + case KErrGsmCCNonExistentInformationElement: + { + ret = ECCPErrorCCNonExistentInformationElement; + break; + } + case KErrGsmCCRecoveryOnTimerExpiry: + { + ret = ECCPErrorCCRecoveryOnTimerExpiry; + break; + } + case KErrGsmCCNoChannelAvailable: + { + ret = ECCPErrorCCNoChannelAvailable; + break; + } + case KErrGsmCCIncomingCallsBarredInCug: + { + ret = ECCPErrorCCIncomingCallsBarredInCug; + break; + } + case KErrGsmCCBearerCapabilityNotAuthorised: + { + ret = ECCPErrorCCBearerCapabilityNotAuthorised; + break; + } + case KErrGsmCCBearerCapabilityNotCurrentlyAvailable: + { + ret = ECCPErrorCCBearerCapabilityNotCurrentlyAvailable; + break; + } + case KErrGsmCCServiceNotAvailable: + { + ret = ECCPErrorCCServiceNotAvailable; + break; + } + case KErrGsmCCBearerServiceNotImplemented: + { + ret = ECCPErrorCCBearerServiceNotImplemented; + break; + } + case KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable: + { + ret = ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable; + break; + } + case KErrGsmCCServiceNotImplemented: + { + ret = ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable; + break; + } + case KErrGsmCCUnspecifiedInterworkingError: + { + ret = ECCPErrorCCUnspecifiedInterworkingError; + break; + } + case KErrGsmNoNumber: + { + ret = ECCPErrorInvalidPhoneNumberCancelRedial; + break; + } + case KErrNotFound: + { + ret = ECCPErrorNotFound; + break; + } + case KErrTimedOut: + { + ret = ECCPErrorTimedOut; + break; + } + case KErrGsmReleaseByUser: + { + ret = ECCPErrorReleaseByUserForCancelRedial; + break; + } + case KErrSatControl: + { + ret = ECCPErrorSatControl; + break; + } + default: + { + // Use the predefined. + break; + } + } + return ret; + } + +// --------------------------------------------------------------------------- +// Returns the active request. +// --------------------------------------------------------------------------- +// +CSPEtelCallRequester::TRequestType CSPEtelCallRequester::Request() + { + if ( IsActive() ) + { + return iRequestType; + } + + return ERequestTypeNone; + } + +// --------------------------------------------------------------------------- +// Canceling emergency or normal call dial request. +// --------------------------------------------------------------------------- +// +TInt CSPEtelCallRequester::DialCancel() + { + TInt ret = KErrNotReady; + if ( iRequestType == ERequestTypeDialEmergency + || ( iRequestType == ERequestTypeDial ) ) + { + ret = CancelRequest( iRequestType ); + } + else + { + CSPLOGSTRING2(CSPINT, + "CSPEtelCallRequester::DialCancel invalid irequest for dialcancel %d", + iRequestType); + } + + return ret; + } + + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelcallstatusmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelcallstatusmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,161 @@ +/* +* Copyright (c) 2007 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: Implementation of class CSPEtelCallStatusMonitor which +* monitors call status changes from ETel and notifies observer +* according to call status change. +* +*/ + + +#include + +#include "cspetelcallstatusmonitor.h" +#include "mcspcallobserver.h" +#include "csplogger.h" + + + +// --------------------------------------------------------------------------- +// CSPEtelCallEventMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelCallStatusMonitor* CSPEtelCallStatusMonitor::NewL( MCSPCallObserver& aObserver, + RMobileCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallEventMonitor::NewL()" ); + CSPEtelCallStatusMonitor* self = new ( ELeave ) CSPEtelCallStatusMonitor( + aObserver, aCall ); + return self; + } + + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelCallStatusMonitor::~CSPEtelCallStatusMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallStatusMonitor::~CSPEtelCallStatusMonitor()" ); + Cancel(); + + if ( iDestrPtr ) + { + *iDestrPtr = ETrue; + iDestrPtr = NULL; + } + + } + + +// --------------------------------------------------------------------------- +// Starts the monitoring. +// --------------------------------------------------------------------------- +// +void CSPEtelCallStatusMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPINT, "CSPEtelCallStatusMonitor::StartMonitoring()" ); + if ( !IsActive() && iCall.SubSessionHandle() ) + { + CSPLOGSTRING( CSPREQOUT, + "CSP: CSPEtelCallStatusMonitor::StartMonitoring: Request \ + RMobilePhone::NotifyMobileCallStatusChange" ); + iCall.NotifyMobileCallStatusChange( iStatus, iCallStatus ); + CSPLOGSTRING( CSPREQOUT, "CSPEtelCallStatusMonitor:: Notify OK" ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelCallStatusMonitor::StartMonitoring: Already active" ); + } + } + + +// --------------------------------------------------------------------------- +// Starts the monitoring. +// --------------------------------------------------------------------------- +// +RMobileCall::TMobileCallStatus CSPEtelCallStatusMonitor::State() + { + return iCallStatus; + } + +// --------------------------------------------------------------------------- +// From CActive +// Handles call status notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelCallStatusMonitor::RunL() + { + CSPLOGSTRING( CSPINT, "CSPEtelCallStatusMonitor::RunL") + + // Survive from monitor destruction during observing sequence + TBool destroyed = EFalse; + iDestrPtr = &destroyed; + + if ( iStatus == KErrNone ) + { + iObserver.NotifyCallStateChangedETel( iCallStatus ); + } + + if ( !destroyed ) + { + // In case instance has not been deleted, pointer must be cleared. + iDestrPtr = NULL; + if ( iStatus == KErrNone ) + { + StartMonitoring(); + } + } + else + { + // already destroyed, do not touch members. + } + } + + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelCallStatusMonitor::DoCancel() + { + CSPLOGSTRING( CSPINT, "CSPEtelCallStatusMonitor::DoCancel" ); + iCall.CancelAsyncRequest( EMobileCallNotifyMobileCallStatusChange ); + } + + + + +// --------------------------------------------------------------------------- +// Constructs the monitor.. +// --------------------------------------------------------------------------- +// +CSPEtelCallStatusMonitor::CSPEtelCallStatusMonitor( MCSPCallObserver& aObserver, + RMobileCall& aCall ) : + CActive( EPriorityStandard ), + iObserver( aObserver ), + iCall ( aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallStatusMonitor::CSPEtelCallStatusMonitor()" ); + CActiveScheduler::Add( this ); + } + + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelcallwaitingrequester.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelcallwaitingrequester.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,263 @@ +/* +* Copyright (c) 2007 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: Contains the implementation of class CSPEtelCallWaitingRequester +* +*/ + + + +#include "cspetelcallwaitingrequester.h" + +#include +#include + +#include "csplogger.h" +#include "cspconsts.h" + + +// --------------------------------------------------------------------------- +// Constructs the requester via two phased constructing. +// --------------------------------------------------------------------------- +// +CSPEtelCallWaitingRequester* CSPEtelCallWaitingRequester::NewL( + RMobilePhone& aPhone ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester::NewL()" ); + CSPEtelCallWaitingRequester* self = + new ( ELeave ) CSPEtelCallWaitingRequester( aPhone ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor of the object. +// --------------------------------------------------------------------------- +// +CSPEtelCallWaitingRequester::~CSPEtelCallWaitingRequester( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester::~CSPEtelCallWaitingRequester()" ); + Cancel(); + delete iList; + } + +// --------------------------------------------------------------------------- +// CSPEtelCallWaitingRequester::GetCallWaitingL +// --------------------------------------------------------------------------- +// +void CSPEtelCallWaitingRequester::GetCallWaitingL( const CCCECallParameters& + aParams, + TBool& aCallWaitingStatus ) + { + CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::GetCallWaitingL()" ); + + if ( iMode == ECwRequesterInactive ) + { + iMode = ECwRequesterGetStarted; + iList->Start( iStatus ); + SetActive(); + iWait.Start(); + + if ( iStatus == -5252 ) + { + aCallWaitingStatus = ETrue; + } + else + { + // Get the list of call waiting entries + CMobilePhoneCWList* cwList = iList->RetrieveListL(); + CleanupStack::PushL(cwList); + + TInt count = cwList->Enumerate(); + RMobilePhone::TMobilePhoneCWInfoEntryV1 cwInfo; + + aCallWaitingStatus = EFalse; // Default false + CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::GetCallWaitingL() iterate" ); + for( TInt i=0; i < count ; i++ ) + { + cwInfo = cwList->GetEntryL( i ); + + if ( cwInfo.iStatus == RMobilePhone::ECallWaitingStatusActive ) + { + if ( cwInfo.iServiceGroup == RMobilePhone::EAuxVoiceService ) + { + iAuxLineCwStatus = ETrue; + } + else + { + iPrimaryLineCwStatus = ETrue; + } + } + } + + GetCallWaitingStatusByLineType( aParams, aCallWaitingStatus ); + + CSPLOGSTRING2(CSPINT, + "CSPEtelCallWaitingRequester::GetCallWaitingL() res:%d", + aCallWaitingStatus ); + CleanupStack::PopAndDestroy( cwList ); + + // Initial value has been read from network, + // now we must keep the setting value up to date. + StartMonitoring(); + } + } + + else if ( iMode == ECwRequesterMonitoring ) + { + CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::GetCallWaitingL() use cached value" ); + GetCallWaitingStatusByLineType( aParams, aCallWaitingStatus ); + } + else if ( iMode == ECwRequesterGetStarted ) + { + CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::GetCallWaitingL() KErrInUse" ); + User::Leave( KErrInUse ); + } + } + +// --------------------------------------------------------------------------- +// From CActive +// CSPEtelCallWaitingRequester::RunL +// --------------------------------------------------------------------------- +// +void CSPEtelCallWaitingRequester::RunL() + { + CSPLOGSTRING2( CSPREQEND, "CSPEtelCallWaitingRequester::RunL: status: %d", + iStatus.Int() ); + if ( iWait.IsStarted() ) + { + iWait.AsyncStop(); + } + else if ( KErrNone == iStatus.Int() ) + { + RMobilePhone::TMobilePhoneCWInfoEntryV1 cwInfo = iDesCwStatus(); + switch (cwInfo.iStatus) + { + case RMobilePhone::ECallWaitingStatusActive: + if ( cwInfo.iServiceGroup == RMobilePhone::EAuxVoiceService ) + { + iAuxLineCwStatus = ETrue; + } + else + { + iPrimaryLineCwStatus = ETrue; + } + break; + case RMobilePhone::ECallWaitingStatusNotActive: + if ( cwInfo.iServiceGroup == RMobilePhone::EAuxVoiceService ) + { + iAuxLineCwStatus = EFalse; + } + else + { + iPrimaryLineCwStatus = EFalse; + } + break; + default: + break; + } + + CSPLOGSTRING3(CSPINT, + "CSPEtelCallWaitingRequester::RunL: service:%d new cw status:%d", + cwInfo.iServiceGroup, cwInfo.iStatus ); + + StartMonitoring(); + } + else + { + iMode = ECwRequesterInactive; + } + } + +// --------------------------------------------------------------------------- +// From CActive +// CSPEtelCallWaitingRequester::DoCancel +// --------------------------------------------------------------------------- +// +void CSPEtelCallWaitingRequester::DoCancel() + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester::DoCancel()" ); + if ( iMode == ECwRequesterGetStarted ) + { + iList->Cancel(); + iMode = ECwRequesterInactive; + } + else if ( iMode == ECwRequesterMonitoring ) + { + iPhone.CancelAsyncRequest( EMobilePhoneNotifyCallWaitingStatusChange ); + iMode = ECwRequesterInactive; + } + } + +// --------------------------------------------------------------------------- +// Constructs the requester. +// --------------------------------------------------------------------------- +// +CSPEtelCallWaitingRequester::CSPEtelCallWaitingRequester(RMobilePhone& aPhone): + CActive( EPriorityStandard ), + iPhone( aPhone ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester::CSPEtelCallWaitingRequester()" ); + CActiveScheduler::Add( this ); + iPrimaryLineCwStatus = EFalse; + iAuxLineCwStatus = EFalse; + iMode = ECwRequesterInactive; + } + +// --------------------------------------------------------------------------- +// CSPEtelCallWaitingRequester::ConstructL +// --------------------------------------------------------------------------- +// +void CSPEtelCallWaitingRequester::ConstructL() + { + CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::ConstructL()" ); + iList = CRetrieveMobilePhoneCWList::NewL(iPhone); + } + +// --------------------------------------------------------------------------- +// Start listening call waiting status change notifications. +// --------------------------------------------------------------------------- +// +void CSPEtelCallWaitingRequester::StartMonitoring() + { + iPhone.NotifyCallWaitingStatusChange( iStatus, iDesCwStatus ); + SetActive(); + iMode = ECwRequesterMonitoring; + } + +// --------------------------------------------------------------------------- +// Returns the call waiting status from call waiting status list by linetype. +// --------------------------------------------------------------------------- +// +void CSPEtelCallWaitingRequester::GetCallWaitingStatusByLineType( const CCCECallParameters& + aParams, + TBool& aCallWaitingStatus ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester:GetCallWaitingStatusByLineType" ); + + if ( aParams.LineType() == CCCECallParameters::ECCELineTypePrimary ) + { + aCallWaitingStatus = iPrimaryLineCwStatus; + } + else + { + aCallWaitingStatus = iAuxLineCwStatus; + } + CSPLOGSTRING3(CSPINT, + "CSPEtelCallWaitingRequester::GetCallWaitingStatusByLineType: line:%d res:%d", + aParams.LineType(), aCallWaitingStatus ); + } + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelconferencecallrequester.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelconferencecallrequester.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,375 @@ +/* +* Copyright (c) 2007 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: Contains the implementation of class +* CSPEtelConferenceCallRequester. +* +*/ + + +#include +#include + +#include "cspetelconferencecallrequester.h" +#include "csplogger.h" +#include "cspconferencecall.h" + + +// --------------------------------------------------------------------------- +// Constructs the requester via two phased constructing. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceCallRequester* CSPEtelConferenceCallRequester::NewL( + CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelConferenceCallRequester::NewL()" ); + CSPEtelConferenceCallRequester* self = new ( ELeave ) CSPEtelConferenceCallRequester( + aOwner, aCall ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor of the object. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceCallRequester::~CSPEtelConferenceCallRequester( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelConferenceCallRequester::~CSPEtelConferenceCallRequester()" ); + CSPLOGSTRING2(CSPINT, "CSPEtelConferenceCallRequester:: type: %d", iRequestType ); + Cancel(); + } + +// --------------------------------------------------------------------------- +// CSPEtelConferenceCallRequester::MakeAddCallRequest +// --------------------------------------------------------------------------- +// +TInt CSPEtelConferenceCallRequester::MakeAddCallRequest( const TName& aCallName ) + { + if ( !IsActive() ) + { + iRequestType = EConferenceRequestTypeAddCall; + iCall.AddCall( iStatus, aCallName ); + SetActive(); + } + else + { + return KErrInUse; + } + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSPEtelConferenceCallRequester::MakeRequest +// --------------------------------------------------------------------------- +// +TInt CSPEtelConferenceCallRequester::MakeRequest( + TConferenceRequestType aRequest ) + { + TInt result = KErrUnknown; + + if ( !IsActive() ) + { + if ( aRequest != EConferenceRequestTypeAddCall ) + { + iRequestType = aRequest; + } + + CSPLOGSTRING2( CSPREQOUT, + "CSP: CSPEtelConferenceCallRequester::MakeRequest %d", iRequestType ); + switch ( aRequest ) + { + case EConferenceRequestTypeAddCall: + { + // Requested through EConferenceRequestTypeAddCall as a special case because + // of the parameters. + result = KErrNotSupported; + break; + } + case EConferenceRequestTypeHangup: + { + iCall.HangUp( iStatus ); + SetActive(); + result = KErrNone; + break; + } + case EConferenceRequestTypeHold: + { + iCall.Swap( iStatus ); + SetActive(); + result = KErrNone; + break; + } + case EConferenceRequestTypeResume: + { + iCall.Swap( iStatus ); + SetActive(); + result = KErrNone; + break; + } + case EConferenceRequestTypeCreateConference: + { + iCall.CreateConference( iStatus ); + SetActive(); + result = KErrNone; + break; + } + case EConferenceRequestTypeSwap: + { + iCall.Swap( iStatus ); + SetActive(); + result = KErrNone; + break; + } + default: + { + CSPLOGSTRING2( CSPERROR, + "CSP: CSPEtelConferenceCallRequester::MakeRequest: Unspecified \ + request type: %d", iRequestType ); + result = KErrArgument; + } + } + + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelConferenceCallRequester::MakeRequest: Already active" ); + + if ( aRequest == EConferenceRequestTypeHangup ) + { + // First cancel ongoing request. + Cancel(); + + iCall.HangUp( iStatus ); + SetActive(); + result = KErrNone; + } + else + { + result = KErrInUse; + } + } + + return result; + } + +// --------------------------------------------------------------------------- +// CSPEtelConferenceCallRequester::RunL +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceCallRequester::RunL() + { + // from CActive + CSPLOGSTRING2( CSPREQEND, + "CSP: CSPEtelConferenceCallRequester::RunL: status: %d", iStatus.Int() ); + + if ( iStatus == KErrNone ) + { + switch ( iRequestType ) + { + case EConferenceRequestTypeAddCall: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceCallRequester::RunL: Add call request OK" ); + break; + } + case EConferenceRequestTypeHangup: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceCallRequester::RunL: Hangup request OK" ); + break; + } + case EConferenceRequestTypeHold: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceCallRequester::RunL: Hold request OK" ); + break; + } + case EConferenceRequestTypeResume: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceCallRequester::RunL: Resume request OK" ); + break; + } + case EConferenceRequestTypeCreateConference: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceCallRequester::RunL: Conference create request OK" ); + break; + } + case EConferenceRequestTypeSwap: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceCallRequester::RunL: Conference swap request OK" ); + break; + } + default: + { + CSPLOGSTRING2( CSPERROR, + "CSP CSPEtelConferenceCallRequester::RunL: Unspecified request \ + type: %d", iRequestType ); + break; + } + } + } + else + { + // Error situations + + CSPLOGSTRING2( CSPERROR, "CSP CSPEtelConferenceCallRequester::RunL: request \ + completed with error: %d", iStatus.Int() ); + switch ( iRequestType ) + { + case EConferenceRequestTypeAddCall: + { + CSPLOGSTRING( CSPERROR, + "CSP CSPEtelConferenceCallRequester::RunL: Add call request" ); + iOwner.NotifyConferenceError( + ECCPConferenceErrorAddCall ); + break; + } + case EConferenceRequestTypeHangup: + { + CSPLOGSTRING( CSPERROR, + "CSP CSPEtelConferenceCallRequester::RunL: Hangup request" ); + iOwner.NotifyConferenceError( + ECCPConferenceErrorHangUp ); + break; + } + case EConferenceRequestTypeHold: + { + CSPLOGSTRING( CSPERROR, + "CSP CSPEtelConferenceCallRequester::RunL: Hold request" ); + iOwner.NotifyConferenceError( + ECCPConferenceErrorHold ); + break; + } + case EConferenceRequestTypeResume: + { + CSPLOGSTRING( CSPERROR, + "CSP CSPEtelConferenceCallRequester::RunL: Resume request err" ); + iOwner.NotifyConferenceError( + ECCPConferenceErrorResume ); + break; + } + case EConferenceRequestTypeCreateConference: + { + CSPLOGSTRING( CSPERROR, + "CSP CSPEtelConferenceCallRequester::RunL: Conference create request" ); + iOwner.NotifyConferenceError( + ECCPConferenceErrorAddCall ); + break; + } + case EConferenceRequestTypeSwap: + { + CSPLOGSTRING( CSPERROR, + "CSP CSPEtelConferenceCallRequester::RunL: Conference swap request" ); + iOwner.NotifyConferenceError( + ECCPConferenceErrorSwap ); + + break; + } + default: + { + CSPLOGSTRING2( CSPERROR, + "CSP CSPEtelConferenceCallRequester::RunL: Unspecified request \ + type: %d", iRequestType ); + break; + } + } + + } + } + +// --------------------------------------------------------------------------- +// CSPEtelConferenceCallRequester::DoCancel +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceCallRequester::DoCancel() + { + if ( IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, "CSP: CSPEtelConferenceCallRequester::DoCancel" ); + switch ( iRequestType ) + { + case EConferenceRequestTypeAddCall: + { + iCall.CancelAsyncRequest( EMobileConferenceCallAddCall ); + break; + } + case EConferenceRequestTypeHangup: + { + iCall.CancelAsyncRequest( EMobileConferenceCallHangUp ); + break; + } + case EConferenceRequestTypeHold: + case EConferenceRequestTypeResume: + { + iCall.CancelAsyncRequest( EMobileConferenceCallSwap ); + break; + } + case EConferenceRequestTypeCreateConference: + { + iCall.CancelAsyncRequest( EMobileConferenceCallCreateConference ); + break; + } + case EConferenceRequestTypeSwap: + { + iCall.CancelAsyncRequest( EMobileConferenceCallSwap ); + break; + } + default: + { + CSPLOGSTRING2( CSPERROR, "CSP CSPEtelConferenceCallRequester::DoCancel: \ + Unspecified request type: %d", iRequestType ); + } + } + + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelConferenceCallRequester::DoCancel: Already active" ); + } + } + +// --------------------------------------------------------------------------- +// Constructs the requester. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceCallRequester::CSPEtelConferenceCallRequester( + CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ) : + CActive( EPriorityStandard ), + iOwner( aOwner ), + iCall ( aCall ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelConferenceCallRequester::CSPEtelConferenceCallRequester()" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Constructing in the second phase. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceCallRequester::ConstructL() + { + } + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelconferencecapsmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelconferencecapsmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,173 @@ +/* +* Copyright (c) 2007 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: Implementation of class CSPEtelConferenceCapsMonitor which +* monitors call status changes from ETel and notifies observer +* according to call status change. +* +*/ + + +#include "cspetelconferencecapsmonitor.h" + +#include "cspconferencecall.h" +#include "csplogger.h" + + + +// --------------------------------------------------------------------------- +// CSPEtelConferenceCapsMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceCapsMonitor* CSPEtelConferenceCapsMonitor::NewL( + CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceCapsMonitor::NewL()" ); + CSPEtelConferenceCapsMonitor* self = + new ( ELeave ) CSPEtelConferenceCapsMonitor( + aOwner, aCall ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceCapsMonitor::~CSPEtelConferenceCapsMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceCapsMonitor::~CSPEtelConferenceCapsMonitor()" ); + + if ( iDestrPtr ) + { + *iDestrPtr = ETrue; + iDestrPtr = NULL; + } + + Cancel(); + } + + +// --------------------------------------------------------------------------- +// Starts the monitoring. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceCapsMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceCapsMonitor::StartMonitoring()" ); + + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, + "CSP: CSPEtelConferenceCapsMonitor::StartMonitoring: Request \ + RMobilePhone::NotifyCapsChange" ); + iCall.NotifyCapsChange( iStatus, iCaps ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelConferenceCapsMonitor::StartMonitoring: Already active" ); + } + } + +// --------------------------------------------------------------------------- +// From CActive +// Handles call status notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceCapsMonitor::RunL() + { + CSPLOGSTRING2( CSPREQEND, + "CSPEtelConferenceCapsMonitor::RunL: status: %d", iStatus.Int() ); + + // Survive from monitor destruction during observing sequence + TBool destroyed = EFalse; + iDestrPtr = &destroyed; + + + if ( iStatus == KErrNone ) + { + // Test caps and notify about the iOwner + iOwner.ConferenceCapsChanged( iCaps ); + + } + + if ( !destroyed ) + { + // In case instance has not been deleted, it is important to clear + // iPtr pointer. + iDestrPtr = NULL; + + // ok to modify member variables. + if ( iStatus == KErrNone ) + { + StartMonitoring(); + } + } + else + { + // already destroyed, do not touch members. + } + + } + + + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceCapsMonitor::DoCancel() + { + iCall.CancelAsyncRequest( EMobileConferenceCallNotifyCapsChange ); + } + + + + +// --------------------------------------------------------------------------- +// Constructs the monitor.. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceCapsMonitor::CSPEtelConferenceCapsMonitor( CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ) : + CActive( EPriorityStandard ), + iOwner( aOwner ), + iCall ( aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceCapsMonitor::CSPEtelConferenceCapsMonitor()" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Second phase construction. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceCapsMonitor::ConstructL() + { + // Implementation not required. + } + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelconferenceeventmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelconferenceeventmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,250 @@ +/* +* Copyright (c) 2007 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: Implementation of class CSPEtelConferenceEventMonitor which +* monitors call events from ETel and notifies observer +* accordingly. +* +*/ + + +#include "cspetelconferenceeventmonitor.h" + +#include + +#include "csplogger.h" +#include "cspconferencecall.h" + + + +// --------------------------------------------------------------------------- +// CSPEtelConferenceEventMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceEventMonitor* CSPEtelConferenceEventMonitor::NewL( + CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceEventMonitor::NewL()" ); + CSPEtelConferenceEventMonitor* self = + new ( ELeave ) CSPEtelConferenceEventMonitor( + aOwner, aCall ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + + + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceEventMonitor::~CSPEtelConferenceEventMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceEventMonitor::~CSPEtelConferenceEventMonitor()" ); + Cancel(); + + if ( iDestrPtr ) + { + *iDestrPtr = ETrue; + iDestrPtr = NULL; + } + + } + +// --------------------------------------------------------------------------- +// Starts the monitoring. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceEventMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceEventMonitor::StartMonitoring()" ); + + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, + "CSP: CSPEtelConferenceEventMonitor::StartMonitoring: \ + Request RMobilePhone::NotifyEvent" ); + + iCall.NotifyConferenceEvent( iStatus, iEvent, iCallName ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelConferenceEventMonitor::StartMonitoring: Already active" ); + } + } + + +// --------------------------------------------------------------------------- +// From CActive +// Handles event notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceEventMonitor::RunL() + { + CSPLOGSTRING2( CSPREQEND, + "CSPEtelConferenceEventMonitor::RunL: status: %d", iStatus.Int() ); + + // Survive from monitor destruction during observing sequence + TBool destroyed = EFalse; + iDestrPtr = &destroyed; + + + if ( iStatus == KErrNone ) + { + CSPLOGSTRING2( CSPINT, + "CSP CSPEtelConferenceEventMonitor::RunL Event related callname = %S", + &iCallName ); + + switch ( iEvent ) + { + case RMobileConferenceCall::EConferenceCallAdded: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceCallAdded" ); + iOwner.NotifyEvent( + MCCPConferenceCallObserver::ECCPConferenceCallAdded, + iCallName ); + + break; + } + // The call has been placed on hold as a result of a local action + case RMobileConferenceCall::EConferenceCallRemoved: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceCallRemoved" ); + iOwner.NotifyEvent( + MCCPConferenceCallObserver::ECCPConferenceCallRemoved, + iCallName ); + break; + } + + // The call has been resumed as a result of a local action. + case RMobileConferenceCall::EConferenceBuilt: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceBuilt" ); + iOwner.NotifyEvent( + MCCPConferenceCallObserver::ECCPConferenceBuilt ); + break; + } + + case RMobileConferenceCall::EConferenceTerminated: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceTerminated" ); + iOwner.NotifyEvent( + MCCPConferenceCallObserver::ECCPConferenceTerminated ); + break; + } + + case RMobileConferenceCall::EConferenceSwapped: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceSwapped" ); + iOwner.NotifyEvent( + MCCPConferenceCallObserver::ECCPConferenceSwapped ); + break; + } + + case RMobileConferenceCall::EConferenceSplit: + { + CSPLOGSTRING( CSPINT, + "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceSplit" ); + iOwner.NotifyEvent( + MCCPConferenceCallObserver::ECCPConferenceSplit, + iCallName ); + break; + } + + default: + { + CSPLOGSTRING2( CSPERROR, + "CSP CSPEtelConferenceEventMonitor::RunL: ERROR Unspecified \ + call event: %d", iEvent ); + break; + } + + } + } + else + { + CSPLOGSTRING2( CSPERROR, + "CSP CSPEtelConferenceEventMonitor::RunL err %d", iStatus.Int() ); + } + + if ( !destroyed ) + { + // In case instance has not been deleted, it is important to clear + // iPtr pointer. + iDestrPtr = NULL; + + // ok to modify member variables. + if ( iStatus == KErrNone ) + { + StartMonitoring(); + } + } + else + { + // already destroyed, do not touch members. + } + + } + + +// --------------------------------------------------------------------------- +// From CActive +// Request canceling. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceEventMonitor::DoCancel() + { + iCall.CancelAsyncRequest( EMobileConferenceCallNotifyConferenceEvent ); + } + + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceEventMonitor::CSPEtelConferenceEventMonitor( CSPConferenceCall& aOwner, + RMobileConferenceCall& aCall ) : + CActive( EPriorityStandard ), + iOwner( aOwner ), + iCall ( aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceEventMonitor::CSPEtelConferenceEventMonitor()" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Second phase construction. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceEventMonitor::ConstructL() + { + // Implementation not required. + } + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelconferencestatusmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelconferencestatusmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,202 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of class CSPEtelConferenceStatusMonitor which +* monitors call status changes from ETel and notifies observer +* according to call status change. +* +*/ + + +#include "cspetelconferencestatusmonitor.h" + +#include + +#include "csplogger.h" +#include "cspconferencecall.h" + + +// --------------------------------------------------------------------------- +// CSPEtelConferenceStatusMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceStatusMonitor* CSPEtelConferenceStatusMonitor::NewL( + MCSPConferenceStatusObserver& aOwner, + RMobileConferenceCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelConferenceStatusMonitor::NewL()" ); + CSPEtelConferenceStatusMonitor* self = + new ( ELeave ) CSPEtelConferenceStatusMonitor( + aOwner, aCall ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceStatusMonitor::~CSPEtelConferenceStatusMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceStatusMonitor::~CSPEtelConferenceStatusMonitor()" ); + Cancel(); + + if ( iDestrPtr ) + { + *iDestrPtr = ETrue; + iDestrPtr = NULL; + } + } + +// --------------------------------------------------------------------------- +// Starts the monitoring. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceStatusMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceStatusMonitor::StartMonitoring()" ); + if ( !IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, + "CSP: CSPEtelConferenceStatusMonitor::StartMonitoring: Request \ + RMobilePhone::NotifyMobileStatusChange" ); + iCall.NotifyConferenceStatusChange( iStatus, iConferenceStatus ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelConferenceStatusMonitor::StartMonitoring: Already active" ); + } + } + +// --------------------------------------------------------------------------- +// From CActive +// Handles call status notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceStatusMonitor::RunL() + { + CSPLOGSTRING2( CSPREQEND, + "CSPEtelConferenceStatusMonitor::RunL: status: %d", iStatus.Int() ); + + // Survive from monitor destruction during observing sequence + TBool destroyed = EFalse; + iDestrPtr = &destroyed; + + if ( iStatus == KErrNone ) + { + switch ( iConferenceStatus ) + { + + case RMobileConferenceCall::EConferenceIdle: + { + CSPLOGSTRING( CSPINT, "CSPETelConferenceStatusMonitor IDLE"); + iOwner.NotifyStateChange( + MCSPConferenceStatusObserver::ECSPConferenceIdle ); + break; + } + + case RMobileConferenceCall::EConferenceActive: + { + CSPLOGSTRING( CSPINT, "CSPETelConferenceStatusMonitor ACTIVE"); + iOwner.NotifyStateChange( + MCSPConferenceStatusObserver::ECSPConferenceActive ); + break; + } + case RMobileConferenceCall::EConferenceHold: + { + CSPLOGSTRING( CSPINT, "CSPETelConferenceStatusMonitor HOLD"); + + iOwner.NotifyStateChange( + MCSPConferenceStatusObserver::ECSPConferenceHold ); + + break; + } + + default: + { + CSPLOGSTRING2( CSPINT, + "CSP CSPEtelConferenceStatusMonitor::RunL: Unspecified/protocol \ + specific call status: %d", iConferenceStatus ); + break; + } + } + + } + else + { + CSPLOGSTRING2( CSPERROR, + "CSP CSPEtelConferenceStatusMonitor::RunL err %d", iStatus.Int() ); + } + + if ( !destroyed ) + { + // In case instance has not been deleted, it is important to clear + // iPtr pointer. + iDestrPtr = NULL; + + // ok to modify member variables. + if ( iStatus == KErrNone ) + { + StartMonitoring(); + } + } + else + { + // Already destroyed, do not touch members. + } + } + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceStatusMonitor::DoCancel() + { + iCall.CancelAsyncRequest( + EMobileConferenceCallNotifyConferenceStatusChange ); + } + +// --------------------------------------------------------------------------- +// Constructs the monitor.. +// --------------------------------------------------------------------------- +// +CSPEtelConferenceStatusMonitor::CSPEtelConferenceStatusMonitor( + MCSPConferenceStatusObserver& aOwner, + RMobileConferenceCall& aCall ) : + CActive( EPriorityStandard ), + iOwner( aOwner ), + iCall ( aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelConferenceStatusMonitor::CSPEtelConferenceStatusMonitor()" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Second phase construction. +// --------------------------------------------------------------------------- +// +void CSPEtelConferenceStatusMonitor::ConstructL() + { + // Implementation not required. + } + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspeteldtmfmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspeteldtmfmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,188 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPEtelDtmfMonitor +* +*/ + + + +#include +#include +#include + +#include "cspeteldtmfmonitor.h" +#include "csplogger.h" +#include "cspdtmfprovider.h" +#include "cspconsts.h" +#include "cspdtmfprovider.h" + + + +// --------------------------------------------------------------------------- +// CSPEtelDtmfMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelDtmfMonitor* CSPEtelDtmfMonitor::NewL( + CSPDTMFProvider& aObserver, + RMmCustomAPI& aMmCustom ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelDtmfMonitor::NewL()" ); + CSPEtelDtmfMonitor* self = new ( ELeave ) CSPEtelDtmfMonitor( + aObserver, aMmCustom ); + return self; + } + + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelDtmfMonitor::~CSPEtelDtmfMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelDtmfMonitor::~CSPEtelDtmfMonitor()" ); + Cancel(); + } + +// --------------------------------------------------------------------------- +// Starts the monitor. +// --------------------------------------------------------------------------- +// +void CSPEtelDtmfMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPINT, + "CSPEtelDtmfMonitor::StartMonitoring()" ); + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPINT, + "CSP: CSPEtelDtmfMonitor::StartMonitoring: Request \ + iMmCustom.NotifyDTMFEvent( iStatus, iEventData )" ); + iMmCustom.NotifyDtmfEvent( iStatus, iEventData ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelDtmfMonitor::StartMonitoring: Already active" ); + } + } +// --------------------------------------------------------------------------- +// From CActive. +// Handles line status change notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelDtmfMonitor::RunL() + { + TInt err = iStatus.Int(); + CSPLOGSTRING2( CSPREQEND, + "CSPEtelDtmfMonitor::RunL: status: %d", err ); + + if ( err == KErrNone ) + { + MCCPDTMFObserver::TCCPDtmfEvent event; + if ( iEventData.iEvent == RMmCustomAPI::EDtmfStart + && iEventData.iType == RMmCustomAPI::EDtmfManual ) + { + event = MCCPDTMFObserver::ECCPDtmfManualStart; + } + else if ( iEventData.iEvent == RMmCustomAPI::EDtmfStart + && iEventData.iType == RMmCustomAPI::EDtmfSequence ) + { + event = MCCPDTMFObserver::ECCPDtmfSequenceStart; + } + else if ( iEventData.iEvent == RMmCustomAPI::EDtmfStop + && iEventData.iType == RMmCustomAPI::EDtmfManual ) + { + event = MCCPDTMFObserver::ECCPDtmfManualStop; + } + else if ( iEventData.iEvent == RMmCustomAPI::EDtmfStop + && iEventData.iType == RMmCustomAPI::EDtmfSequence ) + { + event = MCCPDTMFObserver::ECCPDtmfSequenceStop; + } + else if ( iEventData.iEvent == RMmCustomAPI::EDtmfAbort + && iEventData.iType == RMmCustomAPI::EDtmfManual ) + { + event = MCCPDTMFObserver::ECCPDtmfManualAbort; + } + else if ( iEventData.iEvent == RMmCustomAPI::EDtmfAbort + && iEventData.iType == RMmCustomAPI::EDtmfSequence ) + { + event = MCCPDTMFObserver::ECCPDtmfSequenceAbort; + } + else + { + // Unknown event + CSPLOGSTRING3( CSPERROR, + "CSPEtelDtmfMonitor::RunL: Unknown event = %¨d, type = %d", + iEventData.iEvent, iEventData.iType ); + + // Refresh and return (no observer notfiying). + StartMonitoring(); + return; + } + + iObserver.NotifyDTMFEvent( event, err, iEventData.iTone ); + } + else + { + CSPLOGSTRING2( CSPERROR, "CSPEtelDtmfMonitor::RunL: Error \ + from DTMF: %d", err ); + } + + // Continue if not in offline mode + if ( err != KErrGsmOfflineOpNotAllowed && err != KErrCancel + && err != KErrNotSupported ) + { + StartMonitoring(); + } + CSPLOGSTRING( CSPREQEND, "CSPEtelDtmfMonitor::RunL End of RunL." ); + } + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelDtmfMonitor::DoCancel() + { + if ( iStatus == KRequestPending ) + { + CSPLOGSTRING( CSPINT, + "CSPEtelDtmfMonitor::DoCancel Canceling pending request.." ); + iMmCustom.CancelAsyncRequest( ECustomNotifyDtmfEventIPC ); + } + } + + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPEtelDtmfMonitor::CSPEtelDtmfMonitor( + CSPDTMFProvider& aObserver, + RMmCustomAPI& aMmCustom ) : + CActive( EPriorityStandard ), + iObserver( aObserver ), + iMmCustom( aMmCustom ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelDtmfMonitor::CSPEtelDtmfMonitor()" ); + CActiveScheduler::Add( this ); + } + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspeteldtmfstopmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspeteldtmfstopmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,145 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPEtelDtmfStopMonitor +* +*/ + + + +#include +#include + +#include "cspeteldtmfstopmonitor.h" +#include "csplogger.h" +#include "cspdtmfprovider.h" +#include "cspconsts.h" +#include "cspdtmfprovider.h" + + +// --------------------------------------------------------------------------- +// CSPEtelDtmfStopMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelDtmfStopMonitor* CSPEtelDtmfStopMonitor::NewL( + CSPDTMFProvider& aObserver, + RMobilePhone& aPhone ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelDtmfStopMonitor::NewL()" ); + CSPEtelDtmfStopMonitor* self = new ( ELeave ) CSPEtelDtmfStopMonitor( + aObserver, aPhone ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelDtmfStopMonitor::~CSPEtelDtmfStopMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelDtmfStopMonitor::~CSPEtelDtmfStopMonitor()" ); + Cancel(); + } + +// --------------------------------------------------------------------------- +// Starts the monitor. +// --------------------------------------------------------------------------- +// +void CSPEtelDtmfStopMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPINT, "CSPEtelDtmfStopMonitor::StartMonitoring()" ); + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPINT, + "CSP: CSPEtelDtmfStopMonitor::StartMonitoring: Request \ + iPhone.NotifyStopInDTMFString( iStatus, iEventData )" ); + iPhone.NotifyStopInDTMFString( iStatus ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelDtmfStopMonitor::StartMonitoring: Already active" ); + } + } +// --------------------------------------------------------------------------- +// From CActive. +// Handles line status change notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelDtmfStopMonitor::RunL() + { + TInt err = iStatus.Int(); + CSPLOGSTRING2( CSPINT, + "CSPEtelDtmfStopMonitor::RunL: status: %d", err ); + + if ( err != KErrCancel && err != KErrServerTerminated ) + { + + TChar tone = NULL; + MCCPDTMFObserver::TCCPDtmfEvent event = + MCCPDTMFObserver::ECCPDtmfStopInDtmfString; + iObserver.NotifyDTMFEvent( event, err, tone ); + } + else + { + CSPLOGSTRING2( CSPERROR, "CSPEtelDtmfStopMonitor::RunL: Error \ + from RMobilePhone: %d", iStatus.Int() ); + } + + + // Continue if not in offline mode + if ( err != KErrGsmOfflineOpNotAllowed && err != KErrCancel + && err != KErrNotSupported ) + { + StartMonitoring(); + } + CSPLOGSTRING( CSPREQEND, "CSPEtelDtmfStopMonitor::RunL End of RunL." ); + } + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelDtmfStopMonitor::DoCancel() + { + if ( iStatus == KRequestPending ) + { + CSPLOGSTRING( CSPINT, + "CSPEtelDtmfStopMonitor::DoCancel Canceling pending request.." ); + iPhone.CancelAsyncRequest( EMobilePhoneNotifyStopInDTMFString ); + + } + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPEtelDtmfStopMonitor::CSPEtelDtmfStopMonitor( + CSPDTMFProvider& aObserver, + RMobilePhone& aPhone ) : + CActive( EPriorityStandard ), + iObserver( aObserver ), + iPhone( aPhone ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelDtmfStopMonitor::CSPEtelDtmfStopMonitor()" ); + CActiveScheduler::Add( this ); + } + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelincomingcallmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelincomingcallmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,134 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPEtelIncomingCallMonitor +* +*/ + + +#include "cspetelincomingcallmonitor.h" +#include "csplogger.h" +#include "cspcall.h" +#include "cspconsts.h" + + +// --------------------------------------------------------------------------- +// CSPEtelIncomingCallMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelIncomingCallMonitor* CSPEtelIncomingCallMonitor::NewL( + MCSPIncomingCallObserver& aObserver, + RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId ) + { + CSPLOGSTRING(CSPOBJECT, "CSPEtelIncomingCallMonitor::NewL <"); + CSPEtelIncomingCallMonitor* self = new ( ELeave ) CSPEtelIncomingCallMonitor( + aObserver, aLine, aLineId ); + CSPLOGSTRING(CSPOBJECT, "CSPEtelIncomingCallMonitor::NewL >"); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelIncomingCallMonitor::~CSPEtelIncomingCallMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelIncomingCallMonitor::~CSPEtelIncomingCallMonitor" ); + Cancel(); + } + +// --------------------------------------------------------------------------- +// Starts the monitor. +// --------------------------------------------------------------------------- +// +void CSPEtelIncomingCallMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPINT, "CSPEtelIncomingCallMonitor::StartMonitoring"); + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPINT, + "CSPEtelIncomingCallMonitor::StartMonitoring NotifyIncomingCall"); + iCallName.Zero(); + iLine.NotifyIncomingCall( iStatus, iCallName ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSPEtelIncomingCallMonitor::StartMonitoring Error already active"); + } + } +// --------------------------------------------------------------------------- +// From CActive. +// Handles line status change notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelIncomingCallMonitor::RunL() + { + CSPLOGSTRING(CSPINT, "CSPEtelIncomingCallMonitor::RunL <") + + if ( iStatus == KErrNone ) + { + iIncomingCallObserver.IncomingCallArrived( iLine, iCallName, + iLineId ); + // Continue monitoring + StartMonitoring(); + } + else + { + CSPLOGSTRING2( CSPERROR, "CSPEtelIncomingCallMonitor::RunL: Error \ + from RMobileLine: %d", iStatus.Int() ); + } + + CSPLOGSTRING(CSPREQEND, "CSPEtelIncomingCallMonitor::RunL >"); + } + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelIncomingCallMonitor::DoCancel() + { + CSPLOGSTRING( CSPINT, "CSPEtelIncomingCallMonitor::DoCancel" ); + + if ( iStatus == KRequestPending ) + { + CSPLOGSTRING( CSPINT, + "CSPEtelIncomingCallMonitor::DoCancel Canceling pending request.." ); + iLine.NotifyIncomingCallCancel(); + } + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPEtelIncomingCallMonitor::CSPEtelIncomingCallMonitor( + MCSPIncomingCallObserver& aObserver, + RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId ) : + CActive( EPriorityStandard + 2 ), + iIncomingCallObserver( aObserver ), + iLine( aLine ), + iLineId( aLineId ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelIncomingCallMonitor::CSPEtelIncomingCallMonitor" ); + CActiveScheduler::Add( this ); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetellinestatusmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetellinestatusmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,133 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPEtelLineStatusMonitor +* +*/ + + + +#include + +#include "cspetellinestatusmonitor.h" +#include "mcsplinestatusobserver.h" +#include "csplogger.h" +#include "cspconsts.h" + + +// --------------------------------------------------------------------------- +// CSPEtelCallAddedMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelLineStatusMonitor* CSPEtelLineStatusMonitor::NewL( + MCSPLineStatusObserver& aObserver, + RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelLineStatusMonitor::NewL()" ); + CSPEtelLineStatusMonitor* self = new ( ELeave ) CSPEtelLineStatusMonitor( + aObserver, aLine, aLineId ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelLineStatusMonitor::~CSPEtelLineStatusMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelLineStatusMonitor::~CSPEtelLineStatusMonitor()" ); + Cancel(); + } + +// --------------------------------------------------------------------------- +// Starts the monitor. +// --------------------------------------------------------------------------- +// +void CSPEtelLineStatusMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPINT, "CSPEtelLineStatusMonitor::StartMonitoring()" ); + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPINT, + "CSP: CSPEtelLineStatusMonitor::StartMonitoring: Request \ + iLine.NotifyStatusChange( iStatus, iLineStatus )" ); + + iLine.NotifyMobileLineStatusChange( iStatus, iLineStatus ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelLineStatusMonitor::StartMonitoring: Already active" ); + } + } + +// --------------------------------------------------------------------------- +// From CActive. +// Handles line status change notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelLineStatusMonitor::RunL() + { + CSPLOGSTRING2( CSPINT, "CSPEtelLineStatusMonitor::RunL: %d", iStatus.Int() ); + + if ( iStatus == KErrNone ) + { + CSPLOGSTRING( CSPINT, "CSPEtelLineStatusMonitor::RunL status changed") + iObserver.LineStatusChanged( iLine, iLineId, iLineStatus ); + + StartMonitoring(); + } + } + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelLineStatusMonitor::DoCancel() + { + CSPLOGSTRING( CSPINT, "CSPEtelLineStatusMonitor::DoCancel" ); + + if ( iStatus == KRequestPending ) + { + CSPLOGSTRING( CSPINT, + "CSPEtelLineStatusMonitor::DoCancel Canceling pending request" ); + iLine.CancelAsyncRequest( EMobileLineNotifyMobileLineStatusChange ); + } + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CSPEtelLineStatusMonitor::CSPEtelLineStatusMonitor( + MCSPLineStatusObserver& aObserver, + RMobileLine& aLine, + RCSPLineContainer::TCSPLineId aLineId ) : + CActive( EPriorityStandard ), + iLine( aLine ), + iLineId( aLineId ), + iObserver( aObserver ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelLineStatusMonitor::CSPEtelLineStatusMonitor()" ); + CActiveScheduler::Add( this ); + } + + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspetelvideocallcapsmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspetelvideocallcapsmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,177 @@ +/* +* Copyright (c) 2007 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: Implementation of class CSPEtelVideoCallCapsMonitor which +* monitors call status changes from ETel and notifies observer +* according to call status change. +* +*/ + + +#include + +#include "cspetelvideocallcapsmonitor.h" +#include "cspvideocall.h" +#include "csplogger.h" + + +// --------------------------------------------------------------------------- +// CSPEtelCallEventMonitor::NewL. +// --------------------------------------------------------------------------- +// +CSPEtelVideoCallCapsMonitor* CSPEtelVideoCallCapsMonitor::NewL( + CSPVideoCall& aOwner, + RMobileCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelCallEventMonitor::NewL()" ); + CSPEtelVideoCallCapsMonitor* self = + new ( ELeave ) CSPEtelVideoCallCapsMonitor( + aOwner, aCall ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the object by canceling first ongoing monitoring. +// --------------------------------------------------------------------------- +// +CSPEtelVideoCallCapsMonitor::~CSPEtelVideoCallCapsMonitor( ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelVideoCallCapsMonitor::CSPEtelVideoCallCapsMonitor()" ); + Cancel(); + } + +// --------------------------------------------------------------------------- +// Starts the monitoring. +// NOTE: This function reads the initial value of data call caps in the +// beginning so that client can use GetMobileDataCallCaps to get up to date +// caps information. +// --------------------------------------------------------------------------- +// +void CSPEtelVideoCallCapsMonitor::StartMonitoring() + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelVideoCallCapsMonitor::StartMonitoring()" ); + + iCall.GetMobileDataCallCaps( iDataCallCapsPckg ); + + if ( !IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, + "CSP: CSPEtelVideoCallCapsMonitor::StartMonitoring: Request \ + RMobilePhone::NotifyCapsChange" ); + iCall.NotifyMobileDataCallCapsChange( iStatus, iDataCallCapsPckg ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSP: CSPEtelVideoCallCapsMonitor::StartMonitoring: Already active" ); + } + } + +// --------------------------------------------------------------------------- +// CSPEtelVideoCallCapsMonitor::GetMobileDataCallCaps +// --------------------------------------------------------------------------- +// +TInt CSPEtelVideoCallCapsMonitor::GetMobileDataCallCaps( TDes8& aCaps ) const + { + CSPLOGSTRING( CSPREQIN, "CSPEtelVideoCallCapsMonitor::GetMobileDataCallCaps" ); + // get data call caps from Etel + aCaps = iDataCallCapsPckg; + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSPEtelVideoCallCapsMonitor::GetProtocolCaps +// --------------------------------------------------------------------------- +// +TUint CSPEtelVideoCallCapsMonitor::GetProtocolCaps() + { + iDataCallCaps = iDataCallCapsPckg(); + return iDataCallCaps.iProtocolCaps; + } + +// --------------------------------------------------------------------------- +// From CActive +// Handles call status notifying. +// --------------------------------------------------------------------------- +// +void CSPEtelVideoCallCapsMonitor::RunL() + { + CSPLOGSTRING2( CSPREQEND, + "CSPEtelVideoCallCapsMonitor::RunL: status: %d", iStatus.Int() ); + + if ( iStatus == KErrNone ) + { + iDataCallCaps = iDataCallCapsPckg(); + + iOwner.DataCallCapsChanged( iDataCallCaps ); + + iCall.NotifyMobileDataCallCapsChange( iStatus, iDataCallCapsPckg ); + SetActive(); + } + } + +// --------------------------------------------------------------------------- +// From CActive +// Canceling functionality. +// --------------------------------------------------------------------------- +// +void CSPEtelVideoCallCapsMonitor::DoCancel() + { + iCall.CancelAsyncRequest( EMobileCallNotifyMobileDataCallCapsChange ); + } + +// --------------------------------------------------------------------------- +// Constructs the monitor.. +// --------------------------------------------------------------------------- +// +CSPEtelVideoCallCapsMonitor::CSPEtelVideoCallCapsMonitor( CSPVideoCall& aOwner, + RMobileCall& aCall ) : + CActive( EPriorityStandard ), + iOwner( aOwner ), + iCall ( aCall ), + iDataCallCapsPckg( iDataCallCaps ) + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelVideoCallCapsMonitor::CSPEtelCallCapsMonitor()" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Second phase construction. +// --------------------------------------------------------------------------- +// +void CSPEtelVideoCallCapsMonitor::ConstructL() + { + // Implementation not required. + } + +// --------------------------------------------------------------------------- +// CSPEtelVideoCallCapsMonitor::UpdateProtocolCaps +// --------------------------------------------------------------------------- +// +void CSPEtelVideoCallCapsMonitor::UpdateProtocolCaps() + { + CSPLOGSTRING(CSPOBJECT, + "CSPEtelVideoCallCapsMonitor::UpdateProtocolCaps()" ); + + iCall.GetMobileDataCallCaps( iDataCallCapsPckg ); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspforwardprovider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspforwardprovider.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,137 @@ +/* +* Copyright (c) 2007 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: Contains the implementation of class CSPForwardProvider +* +*/ + + +#include +#include +#include +#include // CDesC8ArrayFlat + +#include "cspforwardprovider.h" +#include "csplogger.h" + + +// --------------------------------------------------------------------------- +// Two phased construction +// --------------------------------------------------------------------------- +// +CSPForwardProvider* CSPForwardProvider::NewL ( ) + { + CSPForwardProvider* self = new ( ELeave ) CSPForwardProvider( ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor of the object. +// --------------------------------------------------------------------------- +// +CSPForwardProvider::~CSPForwardProvider() + { + delete iEmptyArray; + iObservers.Close(); + } + +// --------------------------------------------------------------------------- +// CSPCall::NotifyForwardEventOccurred +// Notifies observers about call events +// --------------------------------------------------------------------------- +// +void CSPForwardProvider::NotifyForwardEventOccurred( + MCCPForwardObserver::TCCPForwardEvent aEvent ) + { + CSPLOGSTRING2( CSPREQOUT, + "CSPForwardProvider::ForwardEventOccurred: event: %d", aEvent ); + + for ( TInt i = 0; i < iObservers.Count(); i++ ) + { + MCCPForwardObserver *obs = iObservers[i]; + if ( obs ) + { + obs->ForwardEventOccurred( aEvent ); + } + } + } + +// --------------------------------------------------------------------------- +// Forward address choice array. +// --------------------------------------------------------------------------- +// +const CDesC8Array& CSPForwardProvider::GetForwardAddressChoicesL() + { + return *iEmptyArray; + } + +// --------------------------------------------------------------------------- +// Forward to address. +// Not supported. +// --------------------------------------------------------------------------- +// +void CSPForwardProvider::ForwardToAddressL( const TInt /*aIndex*/ ) + { + User::Leave( KErrNotSupported ); + return; + } + +// --------------------------------------------------------------------------- +// Adds observer to array +// --------------------------------------------------------------------------- +// +void CSPForwardProvider::AddObserverL( const MCCPForwardObserver& aObserver ) + { + if ( iObservers.Find( &aObserver ) == KErrNotFound ) + { + iObservers.Append( &aObserver ); + } + } + +// --------------------------------------------------------------------------- +// Removes observer from array +// --------------------------------------------------------------------------- +// +TInt CSPForwardProvider::RemoveObserver( const MCCPForwardObserver& aObserver ) + { + TInt found = iObservers.Find( &aObserver ); + if ( found != KErrNotFound ) + { + iObservers.Remove( found ); + return KErrNone; + } + return found; + } + +// --------------------------------------------------------------------------- +// Default C++ constructor +// --------------------------------------------------------------------------- +// +CSPForwardProvider::CSPForwardProvider( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPForwardProvider::CSPForwardProvider()" ); + } + +// --------------------------------------------------------------------------- +// Constructing 2nd phase +// --------------------------------------------------------------------------- +// +void CSPForwardProvider::ConstructL() + { + CSPLOGSTRING(CSPOBJECT, "CSPForwardProvider::ConstructL()" ); + iEmptyArray = new (ELeave) CDesC8ArrayFlat( 1 ); + } + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspmicrophone.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspmicrophone.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,160 @@ +/* +* Copyright (c) 2006 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: Mic stream to DevSound. +* +*/ + + +#include "cspmicrophone.h" +#include "csplogger.h" +#include "mcspdevsoundobserver.h" + +#include + +// Mute value +const TInt KSetMuteToDevSound = 0; + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// Static constructor. +// --------------------------------------------------------------------------- +// +CSPMicrophone* CSPMicrophone::NewL( + MCSPDevSoundObserver& aObserver ) + { + CSPMicrophone* self = new( ELeave ) CSPMicrophone( aObserver ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CSPMicrophone::~CSPMicrophone() + { + } + +// --------------------------------------------------------------------------- +// Gives mic mute state +// --------------------------------------------------------------------------- +// +TBool CSPMicrophone::IsMuted() + { + const TInt gain( iDevSound->Gain() ); + TBool isMuted = EFalse; + if ( !gain ) + { + // Mute is on + isMuted = ETrue; + } + CSPLOGSTRING( CSPINT, "CSPMicrophone::IsMuted" ); + return isMuted; + } + +// --------------------------------------------------------------------------- +// Set mic muted. +// --------------------------------------------------------------------------- +// +void CSPMicrophone::SetMuted() + { + CSPLOGSTRING( CSPINT, "CSPMicrophone::SetMicMuted" ); + iDevSound->SetGain( KSetMuteToDevSound ); + } + +// --------------------------------------------------------------------------- +// Set mic unmuted +// --------------------------------------------------------------------------- +// +void CSPMicrophone::SetUnmuted() + { + CSPLOGSTRING( CSPINT, "CSPMicrophone::SetUnmuted" ); + iDevSound->SetGain( iDevSound->MaxGain() ); + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Activation was successfull. +// --------------------------------------------------------------------------- +// +void CSPMicrophone::BufferToBeEmptied( CMMFBuffer* /*aBuffer*/ ) + { + CSPLOGSTRING( CSPINT, "CSPMicrophone::BufferToBeEmptied" ); + + // We dont react to devsound messages unless we are activating. + if( IsActivationOngoing() ) + { + iActive = ETrue; + iActivationOngoing = EFalse; + iObserver.MicActivatedSuccessfully(); + } + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Activation feiled +// --------------------------------------------------------------------------- +// +void CSPMicrophone::RecordError( TInt aError ) + { + CSPLOGSTRING( CSPINT, "CSPMicrophone::RecordError" ); + + // We dont react to devsound messages unless we are activating. + if( IsActivationOngoing() ) + { + if( aError == KErrAccessDenied ) + { + iActivationOngoing = EFalse; + iObserver.MicActivationFailed(); + } + } + } + +// --------------------------------------------------------------------------- +// From class CSPDevSound +// Tries to activate mic stream. Stream becomes active when BufferToBeFilled +// gets called. +// --------------------------------------------------------------------------- +// +void CSPMicrophone::DoActivateL() + { + iDevSound->RecordInitL(); + } + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- +// +CSPMicrophone::CSPMicrophone( + MCSPDevSoundObserver& aObserver ) : + CSPDevSound( aObserver ) + { + } + +// --------------------------------------------------------------------------- +// Second phase constructor +// --------------------------------------------------------------------------- +// +void CSPMicrophone::ConstructL() + { + CSPDevSound::ConstructL( + EMMFStateRecording, + KAudioPrefCSCallUplink, + KAudioPriorityCSCallUplink ); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/csppanic.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/csppanic.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2002-2004 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: This module contains the implementation of panic function for +* for CS-plugin. +* +*/ + + +// INCLUDE FILES +#include "csppanic.pan" +#include "e32std.h" + +// EXTERNAL DATA STRUCTURES +// None. + +// EXTERNAL FUNCTION PROTOTYPES +// None. + +// CONSTANTS +// None. + +// MACROS +// None. + +// LOCAL CONSTANTS AND MACROS +// None. + +// MODULE DATA STRUCTURES +// None. + +// LOCAL FUNCTION PROTOTYPES +// None. + +// ==================== LOCAL FUNCTIONS ==================== + +// ----------------------------------------------------------------------------- +// Panic +// Creates PhoneEngine panic. +// Returns: None. +// ----------------------------------------------------------------------------- +// +GLDEF_C void Panic( TCSPPanic aPanic ) + { + User::Panic( KCSPPanic, aPanic ); + } + +// ===================== MEMBER FUNCTIONS ================== +// None. + +// ================= OTHER EXPORTED FUNCTIONS ============== +// None. + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspproxy.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspproxy.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2006 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: CSP Ecom proxyfile +* +*/ + + + +#include +#include + +#include "csprovider.h" +#include "csplogger.h" + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// TImplementationProxy::ImplementationTable +// --------------------------------------------------------------------------- +// +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY( 0x102828E5, CSProvider::NewL ) + }; + +// --------------------------------------------------------------------------- +// TImplementationProxy::ImplementationGroupProxy +// --------------------------------------------------------------------------- +// +EXPORT_C const TImplementationProxy* ImplementationGroupProxy( + TInt& aTableCount ) + { + CSPLOGSTRING(CSPOBJECT, "CSPPROXY - A"); + aTableCount = + sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); + CSPLOGSTRING(CSPOBJECT, "CSPPROXY - B"); + return ImplementationTable; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/csppubsublistener.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/csppubsublistener.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,162 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements the class CSPPubSubListener +* +*/ + + +#include "csppubsublistener.h" +#include "mcsppubsubobserver.h" +#include "csplogger.h" + + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::CSPPubSubListener +// C++ constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- +// +CSPPubSubListener::CSPPubSubListener( + const TUid aUid, const TInt aKey, MCSPPubSubObserver* aObserver ) : + CActive( CActive::EPriorityStandard ), + iUid( aUid ), iId( aKey ), iObserver( aObserver ) + { + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::~CSPPubSubListener +// Destructor. +// ----------------------------------------------------------------------------- +// +CSPPubSubListener::~CSPPubSubListener() + { + CSPLOGSTRING( CSPINT, "CSPPubSubListener::~CSPPubSubListener" ) + Cancel(); + iProperty.Close(); + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::RunL +// From CActive. +// ----------------------------------------------------------------------------- +// +void CSPPubSubListener::RunL() + { + CSPLOGSTRING( CSPINT, "CSPPubSubListener::RunL" ) + const TRequestStatus status( iStatus ); + StartListening(); + iObserver->HandleNotifyPSL( iUid, iId, status ); + CSPLOGSTRING( CSPINT, "CSPPubSubListener::RunL end" ) + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::DoCancel +// From CActive. +// ----------------------------------------------------------------------------- +// +void CSPPubSubListener::DoCancel() + { + CSPLOGSTRING( CSPINT, "CSPPubSubListener::DoCancel") + iProperty.Cancel(); + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::RunError +// From CActive. +// ----------------------------------------------------------------------------- +// +TInt CSPPubSubListener::RunError( TInt /*aError*/ ) + { + CSPLOGSTRING( CSPINT, "CSPPubSubListener::RunError" ) + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::NewL +// ----------------------------------------------------------------------------- +// +CSPPubSubListener* CSPPubSubListener::NewL( const TUid aUid, + const TInt aKey, MCSPPubSubObserver* aObserver ) + { + CSPLOGSTRING( CSPINT, "CSPPubSubListener::NewL" ) + CSPPubSubListener* self = new( ELeave ) + CSPPubSubListener( aUid, aKey, aObserver ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::StartListening +// ----------------------------------------------------------------------------- +// +void CSPPubSubListener::StartListening() + { + iProperty.Subscribe( iStatus ); + SetActive(); + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::ConstructL +// ----------------------------------------------------------------------------- +// +void CSPPubSubListener::ConstructL() + { + if ( iObserver ) + { + CActiveScheduler::Add( this ); + } + + User::LeaveIfError ( iProperty.Attach( iUid, iId, EOwnerThread ) ); + + if ( iObserver ) + { + StartListening(); + } + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::Get +// Read integer value. +// ----------------------------------------------------------------------------- +// +TInt CSPPubSubListener::Get( TInt& aVal ) + { + return iProperty.Get( iUid, iId, aVal ); + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::Get +// Read binary value. +// ----------------------------------------------------------------------------- +// +TInt CSPPubSubListener::Get( TDes8& aVal ) + { + return iProperty.Get( iUid, iId, aVal ); + } + +// ----------------------------------------------------------------------------- +// CSPPubSubListener::Get +// Read string value. +// ----------------------------------------------------------------------------- +// +TInt CSPPubSubListener::Get( TDes16& aVal ) + { + return iProperty.Get( iUid, iId, aVal ); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspremotealertingtonelistener.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspremotealertingtonelistener.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Listens remote alerting tone status changes +* +*/ + + +#include "cspremotealertingtonelistener.h" +#include "mcspremotealertingtoneobserver.h" + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// Default constructor +// --------------------------------------------------------------------------- +// +CSPRemoteAlertingToneListener::CSPRemoteAlertingToneListener( + RMmCustomAPI& aCustomAPI, + MCSPRemoteAlertingToneObserver& aObserver ) : + CActive( CActive::EPriorityStandard ), + iCustomAPI( aCustomAPI ), + iObserver( aObserver ) + { + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Static constructor +// --------------------------------------------------------------------------- +// +CSPRemoteAlertingToneListener* CSPRemoteAlertingToneListener::NewL( + RMmCustomAPI& aCustomAPI, + MCSPRemoteAlertingToneObserver& aObserver ) + { + CSPRemoteAlertingToneListener* self = + new( ELeave ) CSPRemoteAlertingToneListener( + aCustomAPI, aObserver ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CSPRemoteAlertingToneListener::~CSPRemoteAlertingToneListener() + { + Cancel(); + } + +// --------------------------------------------------------------------------- +// Starts listening the remote alerting tone changes, if not already started +// --------------------------------------------------------------------------- +// +void CSPRemoteAlertingToneListener::StartListening() + { + if ( !IsActive() ) + { + iCustomAPI.NotifyRemoteAlertingToneStatusChange( iStatus, iRATStatus ); + SetActive(); + } + } + +// --------------------------------------------------------------------------- +// From class CActive. +// Cancels the oustanding request. +// --------------------------------------------------------------------------- +// +void CSPRemoteAlertingToneListener::DoCancel() + { + iCustomAPI.CancelAsyncRequest( + ECustomNotifyRemoteAlertingToneStatusChangeIPC ); + } + +// --------------------------------------------------------------------------- +// From class CActive. +// Starts listening next change and notifies the observer if no errors +// in request completion. +// --------------------------------------------------------------------------- +// +void CSPRemoteAlertingToneListener::RunL() + { + const TInt error( iStatus.Int() ); + if ( error != KErrNotSupported ) + { + StartListening(); + } + if ( error == KErrNone ) + { + iObserver.RemoteAlertingToneStatusChanged( iRATStatus ); + } + } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/csprovider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/csprovider.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1273 @@ +/* +* Copyright (c) 2007-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 class of CS Call Plug-in +* +*/ + + +// EXTERNAL INCLUDES +#include +#include +#include +#include +#include +#include +#include + +// USER INCLUDES +#include "csprovider.h" +#include "cspvoicecall.h" +#include "cspvideocall.h" +#include "cspetelincomingcallmonitor.h" +#include "cspetelconferencestatusmonitor.h" +#include "cspdtmfprovider.h" +#include "cspconferencecall.h" +#include "cspcallarray.h" +#include "cspservicesettingshandler.h" +#include "cspaudiohandler.h" +#include "cspetelcallwaitingrequester.h" +#include "cspsupplementaryservicesmonitor.h" +#include "cspcipheringstatusmonitor.h" +#include "cspsssettingshandler.h" +#include "cspcalladdedhandler.h" +#include "csppubsublistener.h" +#include "cspcallcommandhandler.h" +#include "cspremotealertingtonelistener.h" +#include "csppanic.pan" +#include "csplogger.h" +#include "cspconsts.h" + +const TInt KCSServiceId = 1; + +// --------------------------------------------------------------------------- +// CSProvider::CSProvider +// --------------------------------------------------------------------------- +// +CSProvider::CSProvider(): iImplementationUid( KCSPImplementationUid ) + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::CSProvider"); + iInitialized = EFalse; + } + +// --------------------------------------------------------------------------- +// CSProvider::~CSProvider +// --------------------------------------------------------------------------- +// +CSProvider::~CSProvider() + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider <"); + delete iCallArray; + + if ( iInitialized ) + { + delete iConferenceStatusMonitor; + delete iCallCommandHandler; + delete iRemoteAlertingToneListener; + delete iSimStatusListener; + delete iSsSettingsHandler; + delete iAudioHandler; + delete iSsMonitor; + delete iCwRequester; + delete iServiceHandler; + delete iIncomingVoiceCallMonitor; + delete iIncomingDataCallMonitor; + delete iIncomingAuxCallMonitor; + delete iCallAddedHandler; + delete iCipheringStatusMonitor; + delete iDTMFProvider; + + CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close lines"); + iLineContainer.Close(); + CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close customapi"); + iMmCustom.Close(); + CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close conference call"); + iMobileConferenceCall.Close(); + CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close phone"); + iMobilePhone.Close(); + CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider unload phone"); + iServer.UnloadPhoneModule( KMmTsyModuleName ); + CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close server session"); + iServer.Close(); + } + + CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::ConstructL +// --------------------------------------------------------------------------- +// +void CSProvider::ConstructL() + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::ConstructL <"); + iCallArray = CSPCallArray::NewL(); + CSPLOGSTRING(CSPOBJECT, "CSProvider::ConstructL >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::NewL +// --------------------------------------------------------------------------- +// +CSProvider* CSProvider::NewL() + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::NewL() <"); + CSProvider* self = new ( ELeave ) CSProvider(); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + CSPLOGSTRING(CSPOBJECT, "CSProvider::NewL() >"); + return self; + } + +// --------------------------------------------------------------------------- +// CSProvider::NotifySsEvent +// --------------------------------------------------------------------------- +// +void CSProvider::NotifySsEvent( + RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode, + RMmCustomAPI::TSsInfo& aSsInfo ) + { + CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent <"); + TBuf<10> addr; + + switch( aSsTypeAndMode.iSsType ) + { + case RMmCustomAPI::ESsAllSs: + { + CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent ESsAllSs"); + if( iSsSettingsHandler ) + { + TInt cugIndex( aSsInfo.iCugIndex ); + + if ( iSsSettingsHandler->IsValueValidCugIndex( cugIndex ) ) + { + CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent CallCugEventOccurred"); + iSsObserver->CallCugEventOccurred( + MCCPSsObserver::ECCPSsShowIncCallGroupIndex ); + } + else + { + CSPLOGSTRING2(CSPERROR, + "CSProvider::NotifySsEvent err invalid cug index %d", cugIndex ); + } + } + break; + } + + case RMmCustomAPI::ESsRegPassword: + case RMmCustomAPI::ESsClip: + case RMmCustomAPI::ESsClir: + case RMmCustomAPI::ESsCnap: + case RMmCustomAPI::ESsColp: + case RMmCustomAPI::ESsColr: + { + CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent Discarding"); + break; + } + + case RMmCustomAPI::ESsCallWaiting: + { + CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent ESsCallWaiting"); + iSsObserver->CallForwardEventOccurred( + MCCPSsObserver::ESsCallWaiting, + addr ); + break; + } + + case RMmCustomAPI::ESsAllForwardings: + case RMmCustomAPI::ESsForwUncond: + case RMmCustomAPI::ESsForwBusy: + case RMmCustomAPI::ESsForwNoReply: + case RMmCustomAPI::ESsForwNoReach: + case RMmCustomAPI::ESsAllCondForwardings: + { + switch( aSsInfo.iForwMode ) + { + case RMmCustomAPI::ESsIncCallIsForw: + iSsObserver->CallForwardEventOccurred( + MCCPSsObserver::ECCPSsIncCallIsForw, + addr ); + break; + case RMmCustomAPI::ESsIncCallForwToC: + iSsObserver->CallForwardEventOccurred( + MCCPSsObserver::ECCPSsIncCallForwToC, + addr ); + break; + case RMmCustomAPI::ESsOutCallForwToC: + iSsObserver->CallForwardEventOccurred( + MCCPSsObserver::ECCPSsOutCallForwToC, + addr ); + break; + default: + { + HandleDivertOrBarring( addr, aSsTypeAndMode ); + break; + } + } + break; + } + + case RMmCustomAPI::ESsAllBarrings: + case RMmCustomAPI::ESsBarrAllOut: + case RMmCustomAPI::ESsBarrOutInter: + case RMmCustomAPI::ESsBarrOutInterExcHome: + case RMmCustomAPI::ESsOutgoingBarrServ: + { + iSsObserver->BarringEventOccurred( + MCCPSsObserver::ECCPSsOutgoingCallBarred ); + break; + } + + case RMmCustomAPI::ESsBarrAllIn: + case RMmCustomAPI::ESsBarrAllInRoam: + case RMmCustomAPI::ESsIncomingBarrServ: + { + iSsObserver->BarringEventOccurred( + MCCPSsObserver::ECCPSsIncomingCallBarred ); + break; + } + + default: + { + CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent Unknown SS"); + break; + } + } + + CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent >"); + } + +// From CConvergedCallProvider +// --------------------------------------------------------------------------- +// CSProvider::InitializeL +// --------------------------------------------------------------------------- +// +void CSProvider::InitializeL( const MCCPObserver& aObserver, + const MCCPSsObserver& aSsObserver ) + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::InitializeL <"); + if ( iInitialized ) + { + CSPLOGSTRING(CSPOBJECT, + "CSProvider::InitializeL() Error already initialized"); + User::Leave( KErrAlreadyExists ); + } + iInitialized = ETrue; + + CreateEtelConnectionsL(); + + iServiceHandler = CSPServiceSettingsHandler::NewL(); + + TInt readErr = iServiceHandler->ReadCSServiceId( iServiceId ); + if ( readErr ) + { + CSPLOGSTRING(CSPERROR, "CSProvider::InitializeL()\ + ERROR COULD NOT READ SERVICE ID FOR CS-PLUGIN "); + CSPLOGSTRING(CSPERROR, "CSProvider::InitializeL() \ + Please ensure that SPSettings is initialized corretly! "); + iServiceId = KCSServiceId; + } + + // Save CCP observer as pointer-type member + const MCCPCSObserver& obs = static_cast(aObserver); + iCCPObserver = const_cast(&obs); + + // Save CCP SS observer as pointer-type member + const MCCPSsObserver& ssObs = static_cast(aSsObserver); + iSsObserver = const_cast(&ssObs); + + RPhone::TLineInfo lineInfo; + __ASSERT_ALWAYS( iMobilePhone.GetLineInfo( 0, lineInfo ) + == KErrNone, Panic( ECSPPanicNoEtel ) ); + + // Open Lines. At least voice line must be opened. + __ASSERT_ALWAYS( iLineContainer.Open( iMobilePhone, iServiceId ) == KErrNone, + Panic( ECSPPanicNoEtel ) ); + + RMobileLine& voiceLine = iLineContainer.LineByType( + RCSPLineContainer::ECSPLineSpeech ); + + // Create and start incoming voice call monitor for primary line + iIncomingVoiceCallMonitor = CSPEtelIncomingCallMonitor::NewL( *this, + voiceLine, + RCSPLineContainer::ECSPLineSpeech ); + iIncomingVoiceCallMonitor->StartMonitoring(); + + // Create and start incoming data call monitor for data line + RMobileLine& dataLine = iLineContainer.LineByType( RCSPLineContainer::ECSPLineData ); + iIncomingDataCallMonitor = CSPEtelIncomingCallMonitor::NewL( *this, dataLine, + RCSPLineContainer::ECSPLineData ); + iIncomingDataCallMonitor->StartMonitoring(); + + // Create and start incoming call monitor for auxilary line + RMobileLine& auxLine = iLineContainer.LineByType( RCSPLineContainer::ECSPLineAuxSpeech ); + iIncomingAuxCallMonitor = CSPEtelIncomingCallMonitor::NewL( *this, auxLine, + RCSPLineContainer::ECSPLineAuxSpeech ); + iIncomingAuxCallMonitor->StartMonitoring(); + + iCwRequester = CSPEtelCallWaitingRequester::NewL( iMobilePhone ); + + // Start conference call monitor for monitoring external conference creation + iConferenceStatusMonitor = CSPEtelConferenceStatusMonitor::NewL( *this, + iMobileConferenceCall ); + iConferenceStatusMonitor->StartMonitoring(); + + CSPLOGSTRING(CSPOBJECT, "CSProvider::InitializeL create DTMF provider"); + iDTMFProvider = CSPDTMFProvider::NewL( iMobilePhone, iMmCustom ); + + // Create and start ciphering status monitor + iCipheringStatusMonitor = CSPCipheringStatusMonitor::NewL( iMmCustom, *this ); + iCipheringStatusMonitor->StartMonitoring(); + + // Create audio handler + CSPLOGSTRING(CSPOBJECT, "CSProvider::InitializeL create audio handler"); + iAudioHandler = CSPAudioHandler::NewL(); + + // Create call added handler for listening ext call creation + iCallAddedHandler = CSPCallAddedHandler::NewL( + obs, + iLineContainer, + *iCallArray, + *this, + *iAudioHandler ); + + iSimStatusListener = CSPPubSubListener::NewL( + KPSUidStartup, + KPSSimStatus, + this ); + + HandleSIMStatusL(); + + iRemoteAlertingToneListener = + CSPRemoteAlertingToneListener::NewL( iMmCustom, *this ); + iRemoteAlertingToneListener->StartListening(); + + iCallCommandHandler = CSPCallCommandHandler::NewL(); + + CSPLOGSTRING(CSPOBJECT, "CSProvider::InitializeL >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::NewCallL creates MO call. +// --------------------------------------------------------------------------- +// +MCCPCall* CSProvider::NewCallL( const CCCPCallParameters& aCallParameters, + const TDesC& aRemoteParty, + const MCCPCallObserver& aObserver ) + { + CSPLOGSTRING(CSPREQIN, "CSProvider::NewCallL <"); + + const CCCECallParameters& parameters = + reinterpret_cast (aCallParameters); + + TUint32 serviceId = aCallParameters.ServiceId(); + + if ( serviceId != iServiceId ) + { + CSPLOGSTRING(CSPERROR, "CSProvider::NewCallL ERROR, service id not acceptable!"); + User::Leave( ECCPErrorInvalidPhoneNumber ); + } + + RCSPLineContainer::TCSPLineId lineId = + iLineContainer.ResolveLineIdL( parameters ); + + RMobileLine& line = iLineContainer.LineByType( lineId ); + + CSPCall* call = NULL; + + if ( RCSPLineContainer::ECSPLineSpeech == lineId || + RCSPLineContainer::ECSPLineAuxSpeech == lineId ) + { + call = CSPVoiceCall::NewL( const_cast(aRemoteParty), + line, + ETrue, + parameters, + *this, + EFalse ); + CleanupStack::PushL( call ); + } + + // Create CSPDataCall object for data/video call + else if ( RCSPLineContainer::ECSPLineData == lineId ) + { + call = CSPVideoCall::NewL( + const_cast(aRemoteParty), + line, ETrue, parameters, + *this ); + CleanupStack::PushL( call ); + } + else if ( RCSPLineContainer::ECSPLineFax == lineId ) + { + CSPLOGSTRING(CSPERROR, + "CSProvider::NewCallL ERROR FAX is unsupported call type"); + User::Leave( KErrNotSupported ); + } + + if ( aRemoteParty.Length() == 0 ) + { + CSPLOGSTRING(CSPERROR, "CSProvider::NewCallL ERROR: aRemoteParty.Length ==0"); + + User::Leave( ECCPErrorInvalidPhoneNumber ); + } + + call->AddObserverL( aObserver ); + TInt err = iCallArray->Add( call ); + User::LeaveIfError( err ); + + call->SetAudioHandler( iAudioHandler ); + + CleanupStack::Pop( call ); + + CSPLOGSTRING(CSPOBJECT, "CSProvider::NewCallL >"); + return call; + } + +// --------------------------------------------------------------------------- +// CSProvider::ReleaseCall +// --------------------------------------------------------------------------- +// +TInt CSProvider::ReleaseCall( MCCPCall& aCall ) + { + CSPLOGSTRING2(CSPREQIN, "CSProvider::ReleaseCall %d", &aCall); + CSPCall* call = static_cast(&aCall); + TInt err = iCallArray->Remove( call ); + if ( err == KErrNone ) + { + delete call; + } + return err; + } + +// --------------------------------------------------------------------------- +// CSProvider::NewEmergencyCallL +// --------------------------------------------------------------------------- +// +MCCPEmergencyCall* CSProvider::NewEmergencyCallL( const TUint32 aServiceId, + const TDesC& aAddress, + const MCCPCallObserver& aObserver ) + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::NewEmergencyCallL <"); + + RMobileLine& voiceLine = iLineContainer.LineByType( + RCSPLineContainer::ECSPLineSpeech ); + TBuf8 emptyBearer; + TBuf emptySubAddress; + + CCCECallParameters* tmpParams = CCCECallParameters::NewL(); + CleanupStack::PushL( tmpParams ); + tmpParams->SetServiceId(aServiceId); + CSPVoiceCall* call = CSPVoiceCall::NewL( aAddress, + voiceLine, + ETrue, + *tmpParams, + *this, + ETrue); + + CleanupStack::PopAndDestroy( tmpParams ); + CleanupStack::PushL( call ); + + call->AddObserverL( aObserver ); + TInt err = iCallArray->Add( call ); + User::LeaveIfError( err ); + + call->SetAudioHandler( iAudioHandler ); + + CleanupStack::Pop( call ); + + CSPLOGSTRING(CSPOBJECT, "CSProvider::NewEmergencyCallL >"); + return call; + } + +// --------------------------------------------------------------------------- +// CSProvider::ReleaseEmergencyCall +// --------------------------------------------------------------------------- +// +TInt CSProvider::ReleaseEmergencyCall( MCCPEmergencyCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::ReleaseEmergencyCall"); + CSPVoiceCall* call = static_cast(&aCall); + iCallArray->Remove( call ); + delete call; + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSProvider::NewConferenceL +// --------------------------------------------------------------------------- +// +MCCPConferenceCall* CSProvider::NewConferenceL( + const TUint32 /*aServiceId*/, + const MCCPConferenceCallObserver& aObserver ) + { + CSPLOGSTRING(CSPREQIN, "CSProvider::NewConferenceL <"); + if ( !iConferenceCall ) + { + iConferenceCall = CSPConferenceCall::NewL( + iMobilePhone, *iCallArray, iServiceId ); + iConferenceCall->AddObserverL( aObserver ); + } + else + { + CSPLOGSTRING(CSPERROR, "CSProvider::NewConferenceL()\ + Error conference already exists"); + User::Leave( KErrAlreadyExists ); + } + CSPLOGSTRING(CSPREQOUT, "CSProvider::NewConferenceL >"); + return iConferenceCall; + } + +// --------------------------------------------------------------------------- +// CSProvider::ReleaseConferenceCall +// --------------------------------------------------------------------------- +// +TInt CSProvider::ReleaseConferenceCall( MCCPConferenceCall& aCall ) + { + CSPLOGSTRING(CSPREQIN, "CSProvider::ReleaseConferenceCall"); + TInt ret( KErrNone ); + if ( &aCall == iConferenceCall ) + { + delete iConferenceCall; + iConferenceCall = NULL; + } + else + { + CSPLOGSTRING(CSPERROR, + "CSProvider::ReleaseConferenceCall Error call not found"); + ret = KErrNotFound; + } + return ret; + } + +// --------------------------------------------------------------------------- +// CSProvider::Uid +// --------------------------------------------------------------------------- +// +const TUid& CSProvider::Uid() const + { + CSPLOGSTRING2(CSPREQIN, "CSProvider::Uid uid: %d", iImplementationUid); + return iImplementationUid; + } + +// --------------------------------------------------------------------------- +// CSProvider::Caps +// --------------------------------------------------------------------------- +// +TUint32 CSProvider::Caps( ) const + { + CSPLOGSTRING(CSPREQIN, "CSProvider::Caps"); + return NULL; + } + +// --------------------------------------------------------------------------- +// CSProvider::DTMFProvider +// --------------------------------------------------------------------------- +// +MCCPDTMFProvider* CSProvider::DTMFProviderL( + const MCCPDTMFObserver& aObserver ) + { + CSPLOGSTRING2(CSPREQIN, + "CSProvider::DTMFProvider observer: %x", &aObserver); + iDTMFProvider->AddObserverL( aObserver ); + CSPLOGSTRING(CSPREQIN, "CSProvider::DTMFProvider observer added"); + return iDTMFProvider; + } + +// --------------------------------------------------------------------------- +// CSProvider::ExtensionProvider +// --------------------------------------------------------------------------- +// +MCCPExtensionProvider* CSProvider::ExtensionProviderL( + const MCCPExtensionObserver& /*aObserver*/) + { + CSPLOGSTRING(CSPREQIN, "CSProvider::ExtensionProvider"); + return NULL; + } + +// --------------------------------------------------------------------------- +// CSProvider::GetLifeTime +// --------------------------------------------------------------------------- +// +TBool CSProvider::GetLifeTime( TDes8& aLifeTimeInfo ) + { + CSPLOGSTRING(CSPREQIN, "CSProvider::GetLifeTime"); + TInt err = iMmCustom.GetLifeTime( aLifeTimeInfo ); + if ( err ) + { + return EFalse; + } + return ETrue; + } + +// --------------------------------------------------------------------------- +// CSProvider::GetCSInfo +// --------------------------------------------------------------------------- +// +TBool CSProvider::GetCSInfo( CSInfo& aCSInfo ) + { + CSPLOGSTRING(CSPREQIN, "CSProvider::GetCSInfo"); + if ( iInitialized ) + { + RMobilePhone::TMobilePhoneIdentityV1 imei; + TRequestStatus reqStatus( KErrNone ); + + CSPLOGSTRING(CSPREQOUT, + "CSProvider::GetCSInfo request get phone id"); + iMobilePhone.GetPhoneId( reqStatus, imei ); + User::WaitForRequest( reqStatus ); + CSPLOGSTRING(CSPREQOUT, + "CSProvider::GetCSInfo completed get phone id"); + + if ( reqStatus.Int() != KErrNone ) + { + imei.iSerialNumber.Zero(); + } + + aCSInfo.iSerialNumber = imei.iSerialNumber; + return reqStatus.Int() == KErrNone; + } + + return iInitialized; + } + +// --------------------------------------------------------------------------- +// From MCSPIncomingCallObserver +// CSProvider::IncomingCallArrived +// --------------------------------------------------------------------------- +// +void CSProvider::IncomingCallArrived( RMobileLine& aLine, TName aCallName, + RCSPLineContainer::TCSPLineId aLineId ) + { + RMobileLine::TLineInfo lineInfo; + aLine.GetInfo( lineInfo ); + CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived < line id %d", aLineId ); + CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived call name %S", &aCallName ); + + CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived answ %S", &lineInfo.iNameOfCallForAnswering ); + CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived last %S", &lineInfo.iNameOfLastCallAdded ); + CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived status %d", lineInfo.iStatus ); + CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived hook %d", lineInfo.iHookStatus ); + + // Find call by name. + // In case CallAddedHandler has opened it and added to array, + // it should not be re-opened. + if ( !iCallArray->FindCall( aCallName ) ) + { + TInt err(KErrUnknown); + TUint32 serviceId( 0 ); + CCPCall::TCallType callType; + CCCECallParameters::TCCELineType lineType; + err = iLineContainer.ResolveCallInfo( aLineId, serviceId, callType, lineType ); + + if ( !err ) + { + CSPCall* call = NULL; + TBuf8 emptyBearer; + TBuf emptySubAddress; + CCCECallParameters* callParameters = NULL; + TRAP_IGNORE( callParameters = CCCECallParameters::NewL() ); + if ( callParameters ) + { + callParameters->SetServiceId(serviceId); + callParameters->SetCallType(callType); + callParameters->SetLineType(lineType); + callParameters->SetOrigin(CCCECallParameters::ECCECallOriginPhone); + + if ( callType == CCPCall::ECallTypeCSVoice ) + { + TRAP( err, call = CSPVoiceCall::NewL( aCallName, + aLine, + EFalse, + *callParameters, + *this, + EFalse ) ); + } + else if ( callType == CCPCall::ECallTypeVideo ) + { + TRAP( err, call = CSPVideoCall::NewL( aCallName, + aLine, + EFalse, + *callParameters, + *this ) ); + } + else + { + CSPLOGSTRING2(CSPERROR, + "CSProvider::IncomingCallArrived() unknown call type %d", err ); + err = KErrUnknown; + } + + delete callParameters; + } + + if ( call && err == KErrNone ) + { + TInt appendError = iCallArray->Add( call ); + CSPLOGSTRING2(CSPERROR, + "CSProvider::IncomingCallArrived Appending call res %d", + appendError); + + // Set audio handler for DevSound. + call->SetAudioHandler( iAudioHandler ); + + // Indicate incoming call for observer. + TInt err = IndicateIncomingCall( call ); + + if ( KErrNone == err && + call->State() == MCCPCallObserver::ECCPStateAnswering ) + { + // If call has proceeded already to Answering state (autoanswer) + // a change notification needs to be sent. + call->NotifyCallStateChangedETel( RMobileCall::EStatusAnswering ); + } + + if ( err ) + { + iCallArray->Remove( call ); + delete call; + } + + CSPLOGSTRING( CSPINT, "CSProvider::IncomingCallArrived Inform CCE OK" ); + } + else if ( call && err != KErrNone ) + { + // Delete call, call array removal not needed. + delete call; + } + else + { + CSPLOGSTRING2(CSPERROR, + "CSProvider::IncomingCallArrived Call could not be created %d", err); + } + } + else + { + CSPLOGSTRING2(CSPERROR, "CSProvider::IncomingCallArrived ERROR Resolve call info err=%d", + err); + } + } + CSPLOGSTRING(CSPINT, "CSProvider::IncomingCallArrived >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::GetCallWaitingL +// --------------------------------------------------------------------------- +// +void CSProvider::GetCallWaitingL( const CCCECallParameters& aParams, + TBool& aCallWaitingStatus ) + { + CSPLOGSTRING(CSPINT, "CSProvider::GetCallWaitingL <"); + + // If there are already connected or held call: call waiting must be + // already ON. + TInt callCount = iCallArray->GetCallCount(); + TInt activeCallCount = 0; + for (TInt i = 0; i < callCount; i++) + { + switch (iCallArray->Get(i)->State()) + { + case MCCPCallObserver::ECCPStateConnected: + { + activeCallCount++; + break; + } + case MCCPCallObserver::ECCPStateHold: + { + activeCallCount++; + break; + } + case MCCPCallObserver::ECCPStateAnswering: + { + activeCallCount++; + break; + } + } + } + if ( activeCallCount > 0 ) + { + // CW status must be ON, so it is not reasonable to ask it from network + aCallWaitingStatus = ETrue; + } + else + { + iCwRequester->GetCallWaitingL( aParams, aCallWaitingStatus ); + } + + CSPLOGSTRING(CSPINT, "CSProvider::GetCallWaitingL >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::GetDiagnosticError +// --------------------------------------------------------------------------- +// +TInt CSProvider::GetDiagnosticError( TName& aCallName ) + { + CSPLOGSTRING2(CSPINT, + "CSProvider::GetDiagnosticError call name %S", &aCallName ); + return iMmCustom.GetDiagnosticInfo( aCallName ); + } + +// --------------------------------------------------------------------------- +// CSProvider::NetworkSecurityStatus +// --------------------------------------------------------------------------- +// +TBool CSProvider::NetworkSecurityStatus() const + { + CSPLOGSTRING(CSPINT, "CSProvider::NetworkSecurityStatus"); + return iCipheringStatusMonitor->NetworkSecurityStatus(); + } + +// --------------------------------------------------------------------------- +// CSProvider::SecureSpecified +// --------------------------------------------------------------------------- +// +TBool CSProvider::SecureSpecified() const + { + CSPLOGSTRING(CSPINT, "CSProvider::SecureSpecified"); + return iCipheringStatusMonitor->SecureSpecified(); + } + +// --------------------------------------------------------------------------- +// Remote alerting tone playing status. Error situation is handled as no tone. +// --------------------------------------------------------------------------- +// +RMmCustomAPI::TRemoteAlertingToneStatus CSProvider::GetRemoteAlertingToneStatus() + { + RMmCustomAPI::TRemoteAlertingToneStatus status; + TInt err = iMmCustom.GetRemoteAlertingToneStatus( status ); + if ( err ) + { + status = RMmCustomAPI::EUiNoTone; + } + CSPLOGSTRING2(CSPINT, + "CSProvider::GetRemoteAlertingToneStatus status: %d", status ); + return status; + } + +// --------------------------------------------------------------------------- +// CSProvider::SecuritySettingChanged +// --------------------------------------------------------------------------- +// +void CSProvider::SecuritySettingChanged( TInt aValue ) + { + CSPLOGSTRING2(CSPINT, + "CSProvider::SecuritySettingChanged value: %d", aValue); + + TInt callCount = iCallArray->GetCallCount(); + for (TInt i = 0; i < callCount; i++) + { + iCallArray->Get(i)->SecuritySettingChanged( aValue ); + } + } + +// --------------------------------------------------------------------------- +// CSProvider::CreateEtelConnectionsL +// --------------------------------------------------------------------------- +// +void CSProvider::CreateEtelConnectionsL() + { + CSPLOGSTRING(CSPINT, "CSProvider::CreateEtelConnectionsL <"); + + TInt errorCode( KErrNone ); + TInt phoneCount( 0 ); + RTelServer::TPhoneInfo phoneInfo; + + //This method connects the client to the ETel Server. + //It must be used before any of other functions during a telephony session. + __ASSERT_ALWAYS( iServer.Connect( KNbrOfMessageSlots ) + == KErrNone, Panic( ECSPPanicNoEtel ) ); + + //This method loads an ETel TSY module. mmtsy + errorCode = iServer.LoadPhoneModule( KMmTsyModuleName ); + __ASSERT_ALWAYS( + errorCode == KErrNone || errorCode == KErrAlreadyExists, + Panic( ECSPPanicNoEtel ) ); + + errorCode = iServer.SetExtendedErrorGranularity( + RTelServer::EErrorExtended ); + __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) ); + + errorCode = iServer.SetPriorityClientV2(); + CSPLOGSTRING2(CSPINT, "CSProvider:: Priority client: %d", errorCode ); + if( KErrAlreadyExists == errorCode ) + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::CreateEtelConnectionsL() Already initialized"); + User::Leave( KErrAlreadyExists ); + } + //This method retrieves the total number of phones supported by all + //the currently loaded ETel (TSY) modules. + errorCode = iServer.EnumeratePhones( phoneCount ); + __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) ); + + //This method retrieves information associated with the specified phone + while ( phoneCount-- ) + { + errorCode = iServer.GetPhoneInfo( phoneCount, phoneInfo ); + __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) ); + + if ( phoneInfo.iName == KMmTsyPhoneName ) + { + phoneCount = 0; + } + } + + //This method opens a phone subsession by name, + //and starts the modem initialisation process. + errorCode = iMobilePhone.Open( iServer, phoneInfo.iName ); + __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) ); + + iMobilePhone.SetEmergencyClient(RPhone::EEmergencyCSVoiceCallRequest); + + errorCode = iMobileConferenceCall.Open( iMobilePhone ); + __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) ); + + errorCode = iMmCustom.Open( iMobilePhone ); + __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) ); + + iSsMonitor = new (ELeave) + CSPSupplementaryServicesMonitor( *this, iMmCustom ); + iSsMonitor->StartMonitoring(); + + CSPLOGSTRING(CSPINT, "CSProvider::CreateEtelConnectionsL >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::HandleDivertOrBarring +// Helper method. +// --------------------------------------------------------------------------- +// +void CSProvider::HandleDivertOrBarring(TDesC& addr, RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode) + { + CSPLOGSTRING(CSPINT, "CSProvider::HandleDivertOrBarring <"); + switch ( aSsTypeAndMode.iSsType ) + { + // MO unconditional diverts + case RMmCustomAPI::ESsAllForwardings: + case RMmCustomAPI::ESsForwUncond: + { + if( aSsTypeAndMode.iSsMode == RMmCustomAPI::ESsModeActive ) + { + iSsObserver->CallForwardEventOccurred( + MCCPSsObserver::ECCPSsForwardUnconditionalModeActive, + addr ); + } + else + { + iSsObserver->CallForwardEventOccurred( + MCCPSsObserver::ECCPSsForwardUnconditionalModeNotActive, + addr ); + } + break; + } + + // MO conditional diverts + case RMmCustomAPI::ESsForwBusy: + case RMmCustomAPI::ESsForwNoReply: + case RMmCustomAPI::ESsForwNoReach: + case RMmCustomAPI::ESsAllCondForwardings: + { + if( aSsTypeAndMode.iSsMode == RMmCustomAPI::ESsModeActive ) + { + iSsObserver->CallForwardEventOccurred( + MCCPSsObserver::ECCPSsForwardConditionallyModeActive, + addr ); + } + else + { + iSsObserver->CallForwardEventOccurred( + MCCPSsObserver::ECCPSsForwardConditionallyModeNotActive, + addr ); + } + break; + } + default: + { + // No handling needed + } + } + CSPLOGSTRING(CSPINT, "CSProvider::HandleDivertOrBarring >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::InitializeCallParameters +// Initialises call parameters from SSSettings +// --------------------------------------------------------------------------- +// +void CSProvider::InitializeCallParameters( RMobileCall::TMobileCallParamsV7& aParams ) + { + CSPLOGSTRING(CSPINT, "CSProvider::InitializeCallParameters <"); + TInt defaultCug(0); + TInt cug(0); + + if( iSsSettingsHandler ) + { + TRAP_IGNORE(iSsSettingsHandler->GetClirL( aParams.iIdRestrict )); + TRAP_IGNORE(iSsSettingsHandler->GetDefaultCugL( defaultCug )); + TRAP_IGNORE(iSsSettingsHandler->GetCugL( cug )); + } + + // This is always set to false thus allowing calls outside groups. + aParams.iCug.iSuppressOA = EFalse; + + if ( cug >= 0 && cug != defaultCug ) // set group + { + // Invoke cug. + aParams.iCug.iCugIndex = cug; + aParams.iCug.iExplicitInvoke = ETrue; + aParams.iCug.iSuppressPrefCug = ETrue; + } + else if ( cug == -1 ) // -1 supress + { + aParams.iCug.iCugIndex = defaultCug; + aParams.iCug.iExplicitInvoke = ETrue; + aParams.iCug.iSuppressPrefCug = ETrue; + } + else // default cug + { + aParams.iCug.iCugIndex = defaultCug; + aParams.iCug.iExplicitInvoke = EFalse; + aParams.iCug.iSuppressPrefCug = EFalse; + } + CSPLOGSTRING(CSPINT, "CSProvider::InitializeCallParameters >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::InitializeDataCallParameters +// Initialises call parameters from SSSettings +// --------------------------------------------------------------------------- +// +void CSProvider::InitializeDataCallParameters( RMobileCall::TMobileHscsdCallParamsV1& aParams ) + { + CSPLOGSTRING(CSPINT, "CSProvider::InitializeDataCallParameters <"); + TInt defaultCug(0); + TInt cug(0); + + if( iSsSettingsHandler ) + { + TRAP_IGNORE(iSsSettingsHandler->GetClirL( aParams.iIdRestrict )); + TRAP_IGNORE(iSsSettingsHandler->GetDefaultCugL( defaultCug )); + TRAP_IGNORE(iSsSettingsHandler->GetCugL( cug )); + } + + // This is always set to false thus allowing calls outside groups. + aParams.iCug.iSuppressOA = EFalse; + + if ( cug >= 0 && cug != defaultCug ) // set group + { + // Invoke cug. + aParams.iCug.iCugIndex = cug; + aParams.iCug.iExplicitInvoke = ETrue; + aParams.iCug.iSuppressPrefCug = ETrue; + } + else if ( cug == -1 ) // -1 supress + { + aParams.iCug.iCugIndex = defaultCug; + aParams.iCug.iExplicitInvoke = ETrue; + aParams.iCug.iSuppressPrefCug = ETrue; + } + else // default cug + { + aParams.iCug.iCugIndex = defaultCug; + aParams.iCug.iExplicitInvoke = EFalse; + aParams.iCug.iSuppressPrefCug = EFalse; + } + + CSPLOGSTRING(CSPINT, "CSProvider::InitializeDataCallParameters >"); + } + +// --------------------------------------------------------------------------- +// CSProvider::IndicateClientCall +// This fucntion delivers call pointer to be managed by CCE. +// --------------------------------------------------------------------------- +// +void CSProvider::IndicateClientCall( MCCPCSCall* aCall ) + { + CSPLOGSTRING2(CSPINT, "CSProvider::IndicateClientCall call: %x", aCall); + iCCPObserver->MoCallCreated( *aCall ); + CSPLOGSTRING(CSPINT, "CSProvider::IndicateClientCall Inform CCE OK"); + } + +// --------------------------------------------------------------------------- +// CSProvider::IndicateIncomingCall +// This fucntion delivers call pointer to be managed by CCE. +// --------------------------------------------------------------------------- +// +TInt CSProvider::IndicateIncomingCall( MCCPCSCall* aCall ) + { + CSPLOGSTRING2(CSPINT, + "CSProvider::IncomingCallArrived call: %x, inform CCE", aCall); + iCCPObserver->IncomingCall( aCall ); + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CSProvider::NotifyDataPortName +// --------------------------------------------------------------------------- +// +void CSProvider::NotifyDataPortName( TName& aDataPortName ) + { + CSPLOGSTRING2(CSPINT, + "CSProvider::NotifyDataPortName name: %S", &aDataPortName); + iCCPObserver->DataPortName( aDataPortName ); + } + +// --------------------------------------------------------------------------- +// CSProvider::HandleNotifyPSL +// From MCSPPubSubObserver. +// --------------------------------------------------------------------------- +// +void CSProvider::HandleNotifyPSL( const TUid /*aUid*/, const TInt& /*aKey*/, + const TRequestStatus& /*aStatus*/ ) + { + CSPLOGSTRING(CSPINT, "CSProvider::HandleNotifyPSL"); + HandleSIMStatusL(); + } + +// --------------------------------------------------------------------------- +// CSProvider::RemoteAlertingToneStatusChanged +// From MCSPRemoteAlertingToneObserver. +// Notify all calls about the change. Call is responsible for +// notifying observer if the status change was for the call. +// --------------------------------------------------------------------------- +// +void CSProvider::RemoteAlertingToneStatusChanged( + RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus ) + { + CSPLOGSTRING(CSPINT, "CSProvider::RemoteAlertingToneStatusChanged"); + for ( TInt i = 0; i < iCallArray->GetCallCount(); i++ ) + { + CSPCall* call = iCallArray->Get( i ); + if ( call ) + { + call->RemoteAlertingToneStatusChanged( aNewStatus ); + } + } + } + +// --------------------------------------------------------------------------- +// CSProvider::HandleSIMStatusL +// --------------------------------------------------------------------------- +// +void CSProvider::HandleSIMStatusL() + { + CSPLOGSTRING(CSPINT, "CSProvider::HandleSIMStatusL"); + if ( !iSsSettingsHandler && iSimStatusListener ) + { + TInt simState( ESimNotReady ); + TInt err = iSimStatusListener->Get( simState ); + if ( err == KErrNone && simState == ESimUsable ) + { + iSsSettingsHandler = CSPSsSettingsHandler::NewL( *iSsObserver ); + } + else + { + CSPLOGSTRING2( CSPERROR, "CSProvider::HandleSIMStatusL, err: %d", err ); + } + } + + if ( iSsSettingsHandler && iSimStatusListener ) + { + delete iSimStatusListener; + iSimStatusListener = NULL; + } + } + +// --------------------------------------------------------------------------- +// CSProvider::IndicateActiveHangup +// --------------------------------------------------------------------------- +// +TInt CSProvider::IndicateActiveHangup( MCCPCallCommandHandling& aCall ) + { + CSPLOGSTRING(CSPINT, "CSProvider::IndicateActiveHangup"); + return iCallCommandHandler->IndicateActiveHangup( aCall ); + } + +// --------------------------------------------------------------------------- +// CSProvider::IndicateHangupComplete +// --------------------------------------------------------------------------- +// +TInt CSProvider::IndicateHangupComplete( MCCPCallCommandHandling& aCall ) + { + CSPLOGSTRING(CSPINT, "CSProvider::IndicateHangupComplete"); + return iCallCommandHandler->IndicateHangupComplete( aCall ); + } + +// --------------------------------------------------------------------------- +// CSProvider::IndicateDialRequest +// --------------------------------------------------------------------------- +// +TInt CSProvider::IndicateDialRequest( MCCPCallCommandHandling& aCall ) + { + CSPLOGSTRING(CSPINT, "CSProvider::IndicateDialRequest"); + return iCallCommandHandler->IndicateDialRequest( aCall ); + } + +// --------------------------------------------------------------------------- +// CSProvider::IndicateAnswerRequest +// --------------------------------------------------------------------------- +// +TInt CSProvider::IndicateAnswerRequest( MCCPCallCommandHandling& aCall ) + { + CSPLOGSTRING(CSPINT, "CSProvider::IndicateAnswerRequest"); + return iCallCommandHandler->IndicateAnswerRequest( aCall ); + } + +// --------------------------------------------------------------------------- +// CSProvider::DontReportTerminationError +// --------------------------------------------------------------------------- +// +TInt CSProvider::DontReportTerminationError() + { + CSPLOGSTRING(CSPINT, "CSProvider::DontReportTerminationError"); + + TInt callCount = iCallArray->GetCallCount(); + for ( TInt i = 0; i < callCount; i++ ) + { + if ( iCallArray->Get(i)->State() == MCCPCallObserver::ECCPStateConnecting ) + { + iCallArray->Get(i)->DontReportTerminationError(); + return KErrNone; + } + } + return KErrNotFound; + } + +// --------------------------------------------------------------------------- +// CSProvider::NotifyStateChange +// --------------------------------------------------------------------------- +// +void CSProvider::NotifyStateChange( + MCSPConferenceStatusObserver::TCSPConferenceState aStatus ) + { + CSPLOGSTRING(CSPINT, "CSProvider::NotifyStateChange"); + + if ( !iConferenceCall && + aStatus == MCSPConferenceStatusObserver::ECSPConferenceActive ) + { + TRAPD( err, iConferenceCall = CSPConferenceCall::NewL( + iMobilePhone, *iCallArray, iServiceId ) ); + if ( KErrNone == err ) + { + CSPLOGSTRING( CSPINT, "CSProvider::NotifyStateChange ext conference created" ); + iCCPObserver->ConferenceCallCreated( *iConferenceCall ); + } + else + { + CSPLOGSTRING2(CSPERROR, "CSProvider::NotifyStateChange \ + ext conference creation error %d", err); + } + } + } + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspservicesettingshandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspservicesettingshandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,138 @@ +/* +* Copyright (c) 2007 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: Contains the implementation of class CSPServiceSettingsHandler +* +*/ + + +// CLASS HEADER +#include "cspservicesettingshandler.h" + +// EXTERNAL INCLUDES +#include +#include + +// INTERNAL INCLUDES +#include "csplogger.h" + + +_LIT(KLineNameVoice, "CS"); + + + +CSPServiceSettingsHandler* CSPServiceSettingsHandler::NewL( ) + { + CSPServiceSettingsHandler* self + = new ( ELeave ) CSPServiceSettingsHandler( ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor of the object. +// --------------------------------------------------------------------------- +// +CSPServiceSettingsHandler::~CSPServiceSettingsHandler( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPServiceSettingsHandler::~CSPServiceSettingsHandler()" ); + } + +// --------------------------------------------------------------------------- +// Finds service ID by name. +// --------------------------------------------------------------------------- +// +void CSPServiceSettingsHandler::FindByNameL( const TDesC& aName, + TUint32& aServiceId ) + { + CSPLOGSTRING(CSPINT, "CSPServiceSettingsHandler::FindByNameL()" ); + CSPLOGSTRING2(CSPINT, "CSPServiceSettingsHandler::FindByNameL() Name=%S", &aName ); + CSPSettings* settingsApi = CSPSettings::NewLC(); + RIdArray idArray; + CleanupClosePushL( idArray ); + TInt err = settingsApi->FindServiceIdsL( idArray ); + + TBool found = EFalse; + if ( KErrNone == err ) + { + TInt idCount = idArray.Count(); + if( idCount > 0 ) + { + + for ( TInt i = 0; !found && i < idCount; i++ ) + { + CSPEntry* entry = CSPEntry::NewLC(); + TInt ferr = settingsApi->FindEntryL( idArray[i], *entry ); + + if( ferr == KErrNone + && aName.Compare( entry->GetServiceName() ) == 0 ) + { + aServiceId = idArray[i]; + found = ETrue; + } + CleanupStack::PopAndDestroy( entry ); + } + } + else + { + err = KErrNotFound; + } + } + + if ( !found ) + { + err = KErrNotFound; + } + + CleanupStack::PopAndDestroy( &idArray ); + CleanupStack::PopAndDestroy( settingsApi ); + CSPLOGSTRING3(CSPINT, "CSProvider::FindByNameL() err = %d serv_id = %u", + err, aServiceId ); + User::LeaveIfError( err ); + } + + + +TInt CSPServiceSettingsHandler::ReadCSServiceId( TUint32& aServiceId ) + { + TRAPD( err, FindByNameL( KLineNameVoice, aServiceId ) ); + + if ( err ) + { + CSPLOGSTRING2(CSPINT, + "CSPServiceSettingsHandler::FindByNameL() leave %d", + err ); + } + return err; + } + +// --------------------------------------------------------------------------- +// Constructs the requester. +// --------------------------------------------------------------------------- +// +CSPServiceSettingsHandler::CSPServiceSettingsHandler( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPServiceSettingsHandler::CSPServiceSettingsHandler()" ); + } + +// --------------------------------------------------------------------------- +// Constructs the requester in the second phase. +// --------------------------------------------------------------------------- +// +void CSPServiceSettingsHandler::ConstructL( ) + { + } + + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspspeaker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspspeaker.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,158 @@ +/* +* Copyright (c) 2006 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: Provides speaker functionality +* +*/ + + +#include + +#include "cspspeaker.h" +#include "csplogger.h" +#include "mcspdevsoundobserver.h" + +//Audio levels +//Max volume level +const TInt KMaxVolumeLevel = 10; + +// --------------------------------------------------------------------------- +// Static constructor +// --------------------------------------------------------------------------- +// +CSPSpeaker* CSPSpeaker::NewL( + MCSPDevSoundObserver& aObserver ) + { + CSPSpeaker* self = new( ELeave ) CSPSpeaker( aObserver ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor. +// --------------------------------------------------------------------------- +// +CSPSpeaker::~CSPSpeaker() + { + } + +// --------------------------------------------------------------------------- +// Sets volume +// Volume needs to be converted from 0-10 scale to the volume scale used by +// DevSound 0 - MaxVolume(). +// No need to check aVolume value, because devsound takes care +// than illegal value are converted to legal, ie <0 are 0 and >MaxVolume +// are set to MaxVolume. +// --------------------------------------------------------------------------- +// +void CSPSpeaker::SetVolume( TInt aVolume ) + { + TInt vol( 0 ); + vol = iDevSound->MaxVolume() * aVolume / KMaxVolumeLevel; + iDevSound->SetVolume( vol ); + CSPLOGSTRING2(CSPINT, "CSPSpeaker::SetVolume() \ + vol=%d", vol ); + CSPLOGSTRING2(CSPINT, "CSPSpeaker::SetVolume() \ + maxVol=%d", iDevSound->MaxVolume() ); + } + +// --------------------------------------------------------------------------- +// Gives volume +// --------------------------------------------------------------------------- +// +TInt CSPSpeaker::Volume() + { + TInt devVol = iDevSound->Volume(); + CSPLOGSTRING2(CSPINT, "CSPSpeaker::Volume \ + vol from DevSound =%d", devVol ); + TInt vol = devVol * KMaxVolumeLevel / iDevSound->MaxVolume(); + + CSPLOGSTRING2(CSPINT, "CSPSpeaker::Volume() \ + vol=%d", vol ); + + return vol; + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Speaker stream has been activated successfully. +// --------------------------------------------------------------------------- +// +void CSPSpeaker::BufferToBeFilled( CMMFBuffer* /*aBuffer*/ ) + { + CSPLOGSTRING( CSPINT, "CSPSpeaker::BufferToBeFilled activated" ); + // We dont react to devsound messages unless we are activating. + if( IsActivationOngoing() ) + { + iActive = ETrue; + iActivationOngoing = EFalse; + iObserver.SpeakerActivatedSuccessfully(); + } + } + +// --------------------------------------------------------------------------- +// From class MDevSoundObserver +// Speaker stream activation failed +// --------------------------------------------------------------------------- +// +void CSPSpeaker::PlayError( TInt aError ) + { + CSPLOGSTRING( CSPINT, "CSPSpeaker::PlayError" ); + + // We dont react to devsound messages unless we are activating. + if( IsActivationOngoing() ) + { + CSPLOGSTRING( CSPINT, "CSPSpeaker::PlayError activation failed" ); + if( aError == KErrAccessDenied ) + { + iActivationOngoing = EFalse; + iObserver.SpeakerActivationFailed(); + } + } + } + +// --------------------------------------------------------------------------- +// From class CSPDevsound +// Tries to activate speaker stream. +// --------------------------------------------------------------------------- +// +void CSPSpeaker::DoActivateL() + { + iDevSound->PlayInitL(); + } + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- +// +CSPSpeaker::CSPSpeaker( + MCSPDevSoundObserver& aObserver ) : + CSPDevSound( aObserver ) + { + } + +// --------------------------------------------------------------------------- +// Second phase constructor +// --------------------------------------------------------------------------- +// +void CSPSpeaker::ConstructL() + { + CSPDevSound::ConstructL( + EMMFStatePlaying, + KAudioPrefCSCallDownlink, + KAudioPriorityCSCallDownlink ); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspsssettingshandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspsssettingshandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,321 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: implementation of CSPSsSettingsHandler class. +* +*/ + + +// INCLUDES +#include "cspsssettingshandler.h" +#include "csplogger.h" +#include "csppanic.pan" + +#include +#include + + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::CSPSsSettingsHandler +// C++ default constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- +// +CSPSsSettingsHandler::CSPSsSettingsHandler( const MCCPSsObserver& aObs ) : + iObserver( const_cast(aObs) ) + { + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::CSPSsSettingsHandler" ); + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::ConstructL +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +void CSPSsSettingsHandler::ConstructL() + { + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL <" ); + User::LeaveIfError( iSSSettings.Open() ); + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL Reg " ); + TInt errorCode = iSSSettings.Register( ESSSettingsAls, *this ); + CSPLOGSTRING2( CSPINT, + "CSPSsSettingsHandler::ConstructL > iSSSettings.Register, errorCode: %d", + errorCode ); + if ( errorCode == KErrNotSupported ) + { + CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::ConstructL, ALS not supported" ); + } + else if ( errorCode == KErrNotReady ) + { + // Try again after idle + iRegisterAlsNofify = CIdle::NewL( CActive::EPriorityHigh ); + RegisterAfterIdle(); + } + + RMobilePhone::TMobilePhoneALSLine alsLine; + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL GetALS" ); + GetALSLineL( alsLine ); + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL Notify " ); + iObserver.NotifyCurrentActiveALSLine( (TInt) alsLine ); + + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL >" ); + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::NewL +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +CSPSsSettingsHandler* CSPSsSettingsHandler::NewL( const MCCPSsObserver& aObs ) + { + CSPSsSettingsHandler* self = new ( ELeave ) CSPSsSettingsHandler( aObs ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::NewL" ); + return self; + } + +// Destructor +CSPSsSettingsHandler::~CSPSsSettingsHandler() + { + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::~CSPSsSettingsHandler <" ); + iSSSettings.Close(); + CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::~CSPSsSettingsHandler >" ); + if ( iRegisterAlsNofify ) + { + delete iRegisterAlsNofify; + } + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::GetALSLineL +// Sends synchronous request to get the ALS line and returns handle to access +// the status. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CSPSsSettingsHandler::GetALSLineL( + RMobilePhone::TMobilePhoneALSLine& aALSLine ) + { + TInt value; + User::LeaveIfError( iSSSettings.Get( ESSSettingsAls, value ) ); + + TSSSettingsAlsValue alsValue = + static_cast< TSSSettingsAlsValue > ( value ); + + switch( alsValue ) + { + case ESSSettingsAlsNotSupported: + aALSLine = RMobilePhone::EAlternateLineNotAvailable; + break; + case ESSSettingsAlsPrimary: + aALSLine = RMobilePhone::EAlternateLinePrimary; + break; + case ESSSettingsAlsAlternate: + aALSLine = RMobilePhone::EAlternateLineAuxiliary; + break; + default: + break; + } + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::SetALSLineL +// Sends synchronous request to set the ALS line and returns handle to access +// the status. +// ----------------------------------------------------------------------------- +// +void CSPSsSettingsHandler::SetALSLineL( + RMobilePhone::TMobilePhoneALSLine& aALSLine ) + { + TSSSettingsAlsValue alsValue = + static_cast ( aALSLine ); + + switch( aALSLine ) + { + case RMobilePhone::EAlternateLineUnknown: + case RMobilePhone::EAlternateLineNotAvailable: + alsValue = ESSSettingsAlsNotSupported; + break; + case RMobilePhone::EAlternateLinePrimary: + alsValue = ESSSettingsAlsPrimary; + break; + case RMobilePhone::EAlternateLineAuxiliary: + alsValue = ESSSettingsAlsAlternate; + break; + default: + CSPLOGSTRING( CSPINT, + "CSPSsSettingsHandler::SetALSLineL: Not valid value" ); + __ASSERT_DEBUG( EFalse, Panic( ECSPPanicInvalidRequest ) ); + break; + } + User::LeaveIfError( iSSSettings.Set( ESSSettingsAls, alsValue ) ); + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::GetClirL +// Sends synchronous request to get the CLIR value and returns handle to access +// the status. +// ----------------------------------------------------------------------------- +// +void CSPSsSettingsHandler::GetClirL( + RMobileCall::TMobileCallIdRestriction& aClir ) + { + TInt value; + User::LeaveIfError( iSSSettings.Get( ESSSettingsClir, value ) ); + + TSSSettingsClirValue clir = + static_cast ( value ); + CSPLOGSTRING2( CSPERROR, + "CSPSsSettingsHandler::GetClirL, clir: %d", clir ); + + switch( clir ) + { + case ESSSettingsClirNetworkDefault: + aClir = RMobileCall::EIdRestrictDefault; + break; + case ESSSettingsClirExplicitInvoke: + aClir = RMobileCall::EDontSendMyId; + break; + case ESSSettingsClirExplicitSuppress: + aClir = RMobileCall::ESendMyId; + break; + default: + CSPLOGSTRING2( CSPERROR, + "CSPSsSettingsHandler::GetClirL, NOT VALID aClir: %d", aClir ); + __ASSERT_DEBUG( EFalse, Panic( ECSPPanicInvalidRequest ) ); + break; + } + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::GetCugL +// Sends synchronous request to get the CUG index and returns handle to access +// the status. +// ----------------------------------------------------------------------------- +// +void CSPSsSettingsHandler::GetCugL( TInt& aCugIndex ) + { + CSPLOGSTRING2( CSPINT, + "CSPSsSettingsHandler::GetCugL, aCugIndex: %d", aCugIndex ); + User::LeaveIfError( iSSSettings.Get( ESSSettingsCug, aCugIndex ) ); + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::GetDefaultCugL +// Sends synchronous request to get the default CUG index +// ----------------------------------------------------------------------------- +// +void CSPSsSettingsHandler::GetDefaultCugL( TInt& aDefCug ) + { + User::LeaveIfError( iSSSettings.Get( ESSSettingsDefaultCug, aDefCug ) ); + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::IsValueValidCugIndex +// Sends synchronous request to check the CUG index +// ----------------------------------------------------------------------------- +// +TBool CSPSsSettingsHandler::IsValueValidCugIndex( const TInt& aValue ) const + { + return iSSSettings.IsValueValidCugIndex( aValue ); + } + +// --------------------------------------------------------- +// CSPSsSettingsHandler::PhoneSettingChanged +// --------------------------------------------------------- +// +void CSPSsSettingsHandler::PhoneSettingChanged( + TSSSettingsSetting aSetting, + TInt aNewValue ) + { + CSPLOGSTRING2( CSPINT, + "CSPSsSettingsHandler::PhoneSettingChanged, aNewValue : %d", + aNewValue ); + if ( aSetting == ESSSettingsAls ) + { + TSSSettingsAlsValue alsValue = + static_cast< TSSSettingsAlsValue > ( aNewValue ); + + RMobilePhone::TMobilePhoneALSLine + alsLine( RMobilePhone::EAlternateLineUnknown ); + + switch( alsValue ) + { + case ESSSettingsAlsNotSupported: + alsLine = RMobilePhone::EAlternateLineNotAvailable; + break; + case ESSSettingsAlsPrimary: + alsLine = RMobilePhone::EAlternateLinePrimary; + break; + case ESSSettingsAlsAlternate: + alsLine = RMobilePhone::EAlternateLineAuxiliary; + break; + default: + break; + } + + iObserver.NotifyCurrentActiveALSLine( (TInt) alsLine ); + } + } + +// ----------------------------------------------------------------------------- +// CSPSsSettingsHandler::RegisterAfterIdle +// ----------------------------------------------------------------------------- +// +void CSPSsSettingsHandler::RegisterAfterIdle() + { + CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::RegisterAfterIdle" ); + if ( !iRegisterAlsNofify->IsActive() ) + { + CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::RegisterAfterIdle > iRegisterAlsNofify->Star" ); + iRegisterAlsNofify->Start( + TCallBack( CIdleCallBack, this ) ); + } + } + +// ----------------------------------------------------------------------------- +// CSProvider::CIdleCallBack +// ----------------------------------------------------------------------------- +// +TInt CSPSsSettingsHandler::CIdleCallBack( TAny* aAny ) + { + CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::CIdleCallBack" ); + static_cast< CSPSsSettingsHandler* >( aAny )->Register(); + + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CSProvider::Register +// ----------------------------------------------------------------------------- +// +void CSPSsSettingsHandler::Register() + { + CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::Register" ); + TInt errorCode( KErrNotReady ); + + errorCode = iSSSettings.Register( ESSSettingsAls, *this ); + CSPLOGSTRING2( CSPINT, + "CSPSsSettingsHandler::Register > iSSSettings.Register, errorCode: %d", + errorCode ); + + if ( errorCode == KErrNotReady ) + { + // Try again + RegisterAfterIdle(); + } + } + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspsupplementaryservicesmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspsupplementaryservicesmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,109 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file contains the implementation of CSPSupplementaryServicesMonitor class +* member functions. +* +*/ + + + +#include "cspsupplementaryservicesmonitor.h" +#include "csprovider.h" +#include "csplogger.h" + + +// ----------------------------------------------------------------------------- +// CSPSupplementaryServicesMonitor::CSPSupplementaryServicesMonitor +// C++ default constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- +// +CSPSupplementaryServicesMonitor::CSPSupplementaryServicesMonitor + ( + CSProvider& aOwner, + RMmCustomAPI& aCustomAPI + ) : CActive( EPriorityStandard ), + iOwner( aOwner ), + iCustomAPI( aCustomAPI ) + { + CSPLOGSTRING( CSPOBJECT, + "CSPSupplementaryServicesMonitor::CSPSupplementaryServicesMonitor: complete" ); + CActiveScheduler::Add( this ); + } + +// Destructor +CSPSupplementaryServicesMonitor::~CSPSupplementaryServicesMonitor() + { + Cancel(); + CSPLOGSTRING( CSPOBJECT, + "CALL CSPSupplementaryServicesMonitor::~CSPSupplementaryServicesMonitor: Complete." ); + } + +// ----------------------------------------------------------------------------- +// CSPSupplementaryServicesMonitor::StartMonitoring +// Starts supplementary services monitoring +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CSPSupplementaryServicesMonitor::StartMonitoring() + { + if ( !IsActive() ) + { + CSPLOGSTRING( CSPREQOUT, + "CALL CSPSupplementaryServicesMonitor::StartMonitoring: RMMCustomAPI::NotifySsNetworkEvent() called" ); + iCustomAPI.NotifySsNetworkEvent( iStatus, iSsTypeAndMode, iSsInfo ); + SetActive(); + } + else + { + CSPLOGSTRING( CSPINT, + "CALL CSPSupplementaryServicesMonitor::StartMonitoring: Already active" ); + } + } + +// ----------------------------------------------------------------------------- +// CSPSupplementaryServicesMonitor::DoCancel +// Cancels active object requests +// Method calls CancelAsyncRequest from the CustomaEtel object +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CSPSupplementaryServicesMonitor::DoCancel() + { + iCustomAPI.CancelAsyncRequest( ECustomNotifySsNetworkEventIPC ); + CSPLOGSTRING( CSPINT, + "CALL CSPSupplementaryServicesMonitor::DoCancel: \ + RMMCustomAPI::CancelAsyncRequest( ECustomNotifySsRequestCompleteIPC ) called" ); + } + +// ----------------------------------------------------------------------------- +// CSPSupplementaryServicesMonitor::RunL +// CMethod gets notification from etel that asyncronous request is completed. +// ----------------------------------------------------------------------------- +// +void CSPSupplementaryServicesMonitor::RunL() + { + CSPLOGSTRING( CSPINT, "CSPSupplementaryServicesMonitor::RunL" ); + if ( iStatus == KErrNone ) + { + CSPLOGSTRING2( CSPINT, + "CSPSupplementaryServicesMonitor::RunL: iSsTypeAndMode.iSsType: %d", + iSsTypeAndMode.iSsType ); + + iOwner.NotifySsEvent( iSsTypeAndMode, iSsInfo ); + StartMonitoring(); + } + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/csptimer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/csptimer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,117 @@ +/* +* Copyright (c) 2006 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: Timer service +* +*/ + +#include "csptimer.h" +#include "mcsptimerobserver.h" +#include "csppanic.pan" + +// --------------------------------------------------------------------------- +// Static constructor +// --------------------------------------------------------------------------- +// +CSPTimer* CSPTimer::NewL() + { + CSPTimer* self = CSPTimer::NewLC(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Static constructor +// --------------------------------------------------------------------------- +// +CSPTimer* CSPTimer::NewLC() + { + CSPTimer* self = new( ELeave ) CSPTimer; + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CSPTimer::~CSPTimer() + { + Cancel(); + } + +// --------------------------------------------------------------------------- +// Starts notify request +// --------------------------------------------------------------------------- +// +void CSPTimer::NotifyAfter( TInt aTimeout, + MCSPTimerObserver& aTimerObserver ) + { + __ASSERT_ALWAYS( !IsNotifyOngoing(), Panic( ECSPPanicTimerAlreadyActive ) ); + After( aTimeout ); + iObserver = &aTimerObserver; + } + +// --------------------------------------------------------------------------- +// Cancels the outstancing request. +// --------------------------------------------------------------------------- +// +void CSPTimer::CancelNotify() + { + Cancel(); + } + +// --------------------------------------------------------------------------- +// Determines if there is active request outstanding. +// --------------------------------------------------------------------------- +// +TBool CSPTimer::IsNotifyOngoing() + { + return IsActive(); + } + +// --------------------------------------------------------------------------- +// From class CActive +// Notifies the observer about request. +// --------------------------------------------------------------------------- +// +void CSPTimer::RunL() + { + if( iObserver ) + { + iObserver->TimerEvent(); + } + } + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- +// +CSPTimer::CSPTimer() : + CTimer( CActive::EPriorityStandard ) + { + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Second phase constructor +// --------------------------------------------------------------------------- +// +void CSPTimer::ConstructL() + { + CTimer::ConstructL(); + } + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/csptransferprovider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/csptransferprovider.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,281 @@ +/* +* Copyright (c) 2007-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: Contains the implementation of class CSPTransferProvider +* +*/ + + +#include +#include +#include +#include +#include + +#include "csptransferprovider.h" +#include "csplogger.h" +#include "mcspcallerrorobserver.h" +#include "mcspcommoninfo.h" + + +// --------------------------------------------------------------------------- +// Two phased construction +// --------------------------------------------------------------------------- +// +CSPTransferProvider* CSPTransferProvider::NewL ( + RMobileCall& aCall, + MCSPCallErrorObserver& aErrorObserver, + MCSPCommonInfo& aCommonInfo ) + { + CSPTransferProvider* self = + new ( ELeave ) CSPTransferProvider( aCall, aErrorObserver, aCommonInfo ); + CleanupStack::PushL( self ); + self->ConstructL( ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor of the object. +// --------------------------------------------------------------------------- +// +CSPTransferProvider::~CSPTransferProvider() + { + Cancel(); + iObservers.Close(); + } + +// --------------------------------------------------------------------------- +// Transfers the call. CCE maps CS Transfer() to this method. +// (UnattendedTransfer and others are VoIP features) +// --------------------------------------------------------------------------- +// +TInt CSPTransferProvider::AttendedTransfer( MCCPCall& aTransferTargetCall ) + { + TInt err ( KErrNone ); + + if ( !IsActive() ) + { + if ( iCall.SubSessionHandle() != 0 ) + { + err = KErrNone; + // send async request to Etel + iCall.Transfer( iStatus ); + SetActive(); + if( aTransferTargetCall.State() == MCCPCallObserver::ECCPStateConnecting ) + { + iCommonInfo.DontReportTerminationError(); + } + } + else + { + // transfer not allowed + err = KErrNotSupported; + } + } + else + { + err = KErrInUse; + } + CSPLOGSTRING2( CSPREQOUT, + "CSPTransferProvider::AttendedTransfer: err: %d", err ); + // return error value + return err; + } + +// --------------------------------------------------------------------------- +// Transfers the call. CCE maps CS Transfer() to this method. +// (UnattendedTransfer and others are VoIP features) +// --------------------------------------------------------------------------- +// +TInt CSPTransferProvider::AttendedTransfer( const TDesC& /*aTransferTarget*/ ) + { + TInt err ( KErrNone ); + + if ( !IsActive() ) + { + if ( iCall.SubSessionHandle() != 0 ) + { + err = KErrNone; + // send async request to Etel + iCall.Transfer( iStatus ); + SetActive(); + } + else + { + // transfer not allowed + err = KErrNotSupported; + } + } + else + { + err = KErrInUse; + } + CSPLOGSTRING2( CSPREQOUT, + "CSPTransferProvider::AttendedTransfer: err: %d", err ); + // return error value + return err; + } + +// --------------------------------------------------------------------------- +// Not supported by CS Plug-in. This is a VoIP feature +// --------------------------------------------------------------------------- +// +TInt CSPTransferProvider::UnattendedTransfer( const TDesC& /*aTransferTarget*/ ) + { + return KErrNotSupported; + } + +// --------------------------------------------------------------------------- +// Not supported by CS Plug-in. This is a VoIP feature +// --------------------------------------------------------------------------- +// +TInt CSPTransferProvider::AcceptTransfer( const TBool /*aAccept*/ ) + { + return KErrNotSupported; + } + +// --------------------------------------------------------------------------- +// Not supported by CS Plug-in. This is a VoIP feature +// --------------------------------------------------------------------------- +// +const TDesC& CSPTransferProvider::TransferTarget() const + { + return KNullDesC; + } + +// --------------------------------------------------------------------------- +// Notify observers about an occurred transfer event +// --------------------------------------------------------------------------- +// +void CSPTransferProvider::TransferEventOccurred( + const MCCPTransferObserver::TCCPTransferEvent aEvent ) + { + CSPLOGSTRING2( CSPREQOUT, + "CSPTransferProvider::TransferEventOccurred: event: %d", aEvent ); + + for ( TInt i = 0; i < iObservers.Count(); i++ ) + { + MCCPTransferObserver *obs = iObservers[i]; + if ( obs ) + { + iObservers[i]->TransferEventOccurred( aEvent ); + } + } + } + +// --------------------------------------------------------------------------- +// Adds observer to array +// --------------------------------------------------------------------------- +// +void CSPTransferProvider::AddObserverL( const MCCPTransferObserver& aObserver ) + { + if ( iObservers.Find( &aObserver ) == KErrNotFound ) + { + iObservers.Append( &aObserver ); + } + } + +// --------------------------------------------------------------------------- +// Removes observer from array +// --------------------------------------------------------------------------- +// +TInt CSPTransferProvider::RemoveObserver( const MCCPTransferObserver& aObserver ) + { + TInt found = iObservers.Find( &aObserver ); + if ( found != KErrNotFound ) + { + iObservers.Remove( found ); + return KErrNone; + } + return found; + } + +// --------------------------------------------------------------------------- +// From CActive. +// Handles request completion. +// --------------------------------------------------------------------------- +// +void CSPTransferProvider::RunL() + { + CSPLOGSTRING2( CSPREQEND, + "CSPTransferProvider::RunL: status: %d", iStatus.Int() ); + + if ( iStatus == KErrNone ) + { + MCCPTransferObserver::TCCPTransferEvent event = + MCCPTransferObserver::ECCPLocalTransfer; + TransferEventOccurred( event ); + } + else + { + CSPLOGSTRING2( CSPERROR, "CSPTransferProvider::RunL: Error \ + %d", iStatus.Int() ); + + TInt error = iStatus.Int(); + if ( error == KErrGsmCCFacilityRejected ) + { + iErrorObserver.NotifyErrorOccurred( ECCPErrorRejected ); + } + else if( error != KErrCancel ) + { + iErrorObserver.NotifyErrorOccurred( ECCPTransferFailed ); + } + } + + CSPLOGSTRING( CSPREQEND, "CSPTransferProvider::RunL End of RunL." ); + } + +// --------------------------------------------------------------------------- +// Cancels the pending async request +// --------------------------------------------------------------------------- +// +void CSPTransferProvider::DoCancel() + { + if ( iStatus == KRequestPending ) + { + CSPLOGSTRING( CSPINT, + "CSPTransferProvider::DoCancel Canceling pending request.." ); + // cancel request + iCall.CancelAsyncRequest( EMobileCallTransfer ); + } + } + +// --------------------------------------------------------------------------- +// Default C++ constructor +// --------------------------------------------------------------------------- +// +CSPTransferProvider::CSPTransferProvider( + RMobileCall& aCall, + MCSPCallErrorObserver& aErrorObserver, + MCSPCommonInfo& aCommonInfo ) + : CActive( EPriorityStandard ), + iCall (aCall), + iErrorObserver( aErrorObserver ), + iCommonInfo( aCommonInfo ) + { + CSPLOGSTRING(CSPOBJECT, "CSPTransferProvider::CSPTransferProvider()" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Constructing 2nd phase +// --------------------------------------------------------------------------- +// +void CSPTransferProvider::ConstructL() + { + CSPLOGSTRING(CSPOBJECT, "CSPTransferProvider::ConstructL()" ); + } + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspuuimessagesender.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspuuimessagesender.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,103 @@ +/* +* Copyright (c) 2007 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: Sends UUI message. +* +*/ + + +#include "cspuuimessagesender.h" +#include "csplogger.h" + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- +// +CSPUUIMessageSender::CSPUUIMessageSender( + RMobileCall& aCall ) : + CActive( CActive::EPriorityStandard ), + iCall( aCall ), + iUUSRequestPckg( iUUSRequest ) + { + CActiveScheduler::Add( this ); + } + + +// --------------------------------------------------------------------------- +// 2nd phase constructor +// --------------------------------------------------------------------------- +// +void CSPUUIMessageSender::ConstructL() + { + } + + +// --------------------------------------------------------------------------- +// Static constructor +// --------------------------------------------------------------------------- +// +CSPUUIMessageSender* CSPUUIMessageSender::NewL( + RMobileCall& aCall ) + { + CSPUUIMessageSender* self = + new( ELeave ) CSPUUIMessageSender( aCall ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CSPUUIMessageSender::~CSPUUIMessageSender() + { + Cancel(); + } + +// --------------------------------------------------------------------------- +// Sends the UUI message. +// --------------------------------------------------------------------------- +// +void CSPUUIMessageSender::SendUUIMessage( const TDesC& aMessage ) + { + CSPLOGSTRING(CSPOBJECT, "CSPUUIMessageSender::SendUUIMessage start"); + Cancel(); + iUUSRequest.iServiceReq = RMobileCall::KUUS1Implicit; + iUUSRequest.iUUI = aMessage; + iCall.ActivateUUS( iStatus, iUUSRequestPckg ); + SetActive(); + } + +// --------------------------------------------------------------------------- +// From class CActive +// Cancels the outstanding request. +// --------------------------------------------------------------------------- +// +void CSPUUIMessageSender::DoCancel() + { + iCall.CancelAsyncRequest( EMobileCallActivateUUS ); + } + +// --------------------------------------------------------------------------- +// From class CActive +// No need to react the completion. The message is sent or not. +// --------------------------------------------------------------------------- +// +void CSPUUIMessageSender::RunL() + { + CSPLOGSTRING2(CSPINT, "CSPUUIMessageSender::RunL %d iStatus", iStatus.Int() ); + } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspuuimonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspuuimonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,111 @@ +/* +* Copyright (c) 2007 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: Monitor UUI messages. +* +*/ + +#include "csplogger.h" +#include "cspuuimonitor.h" +#include "mcspuusmessageobserver.h" + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- +// +CSPUUIMonitor::CSPUUIMonitor( + RMobileCall& aCall, + MCSPUUSMessageObserver& aUUIHandler ) + : CActive( CActive::EPriorityStandard ), + iCall( aCall ), + iObserver( aUUIHandler ) + { + CActiveScheduler::Add( this ); + } + + +// --------------------------------------------------------------------------- +// Second phase constructor +// --------------------------------------------------------------------------- +// +void CSPUUIMonitor::ConstructL() + { + } + +// --------------------------------------------------------------------------- +// Static constructor +// --------------------------------------------------------------------------- +// +CSPUUIMonitor* CSPUUIMonitor::NewL( + RMobileCall& aCall, + MCSPUUSMessageObserver& aUUIHandler ) + { + CSPUUIMonitor* self = + new( ELeave ) CSPUUIMonitor( aCall, aUUIHandler ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CSPUUIMonitor::~CSPUUIMonitor() + { + Cancel(); + } + +// --------------------------------------------------------------------------- +// Starts monitoring the UUI messages. +// --------------------------------------------------------------------------- +// +void CSPUUIMonitor::StartMonitor() + { + CSPLOGSTRING(CSPOBJECT, "CSPUUIMonitor::StartMonitor"); + Cancel(); + iCall.ReceiveUUI( iStatus, iUUI ); + SetActive(); + } + +// --------------------------------------------------------------------------- +// From class CActive +// Cancels out standign request +// --------------------------------------------------------------------------- +// +void CSPUUIMonitor::DoCancel() + { + iCall.CancelAsyncRequest( EMobileCallReceiveUUI ) ; + } + +// --------------------------------------------------------------------------- +// From class CActive +// Notifies observer. +// --------------------------------------------------------------------------- +// +void CSPUUIMonitor::RunL() + { + CSPLOGSTRING2(CSPINT, "CSPUUIMonitor::RunL %d iStatus", iStatus.Int() ); + if( iStatus == KErrNone ) + { + iObserver.UUSMessageReceived( iUUI ); + StartMonitor(); + } + else if( iStatus != KErrNotSupported ) + { + StartMonitor(); + } + } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspvideocall.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspvideocall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,372 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements class CSPVideoCall which provides video call +* functionality +* +*/ + + +#include +#include +#include +#include + +#include "cspvideocall.h" +#include "cspetelcallrequester.h" +#include "cspetelcalleventmonitor.h" +#include "cspetelcallstatusmonitor.h" +#include "cspetelvideocallcapsmonitor.h" +#include "csplogger.h" +#include "csppanic.pan" +#include "cspconsts.h" +#include "mcspcommoninfo.h" + + +// --------------------------------------------------------------------------- +// CSPVideoCall::NewL Two phased construction. +// --------------------------------------------------------------------------- +// +CSPVideoCall* CSPVideoCall::NewL( const TDesC& aName, + RMobileLine& aLine, TBool aMobileOriginated, + const CCCECallParameters& aParams, + MCSPCommonInfo& aCommonInfo ) + { + CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::NewL <"); + + CSPVideoCall* self = new (ELeave) CSPVideoCall( aLine, aMobileOriginated, + aName, aCommonInfo ); + CleanupStack::PushL( self ); + self->ConstructL( aParams ); + CleanupStack::Pop( self ); + CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::NewL >"); + return self; + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::~CSPVideoCall +// --------------------------------------------------------------------------- +// +CSPVideoCall::~CSPVideoCall() + { + CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::~CSPVideoCall <"); + // Stop monitoring events + delete iConnectionHandler; + delete iVideoCallCapsMonitor; + + CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::~CSPVideoCall >"); + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::NotifyCallStateChanged +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPVideoCall::NotifyCallStateChanged( + MCCPCallObserver::TCCPCallState aState ) + { + CSPLOGSTRING2(CSPINT, "CSPVideoCall::NotifyCallStateChanged %d", aState); + + TInt errorCode( KErrNone ); + iNextCallState = aState; + + if ( aState == MCCPCallObserver::ECCPStateConnected && + iParams->CallType() == CCPCall::ECallTypeVideo && + !iConnectionHandler->ConnectionInitialized() ) + { + // When connected message is received, call object must first open + // the socket connection and loan data port + CSPLOGSTRING(CSPINT, + "CSPVideoCall::NotifyCallStateChanged initializing connection"); + errorCode = iConnectionHandler->InitializeConnection(); + + __ASSERT_ALWAYS( errorCode == KErrNone, + Panic( ECSPPanicDataConnectionInitError ) ); + } + else if ( aState == MCCPCallObserver::ECCPStateIdle && + iParams->CallType() == CCPCall::ECallTypeVideo ) + { + // When idle message is received one can close the + // socket connections. + CSPLOGSTRING(CSPINT, + "CSPVideoCall::NotifyCallStateChanged releasing connection"); + iConnectionHandler->ReleaseConnection(); + } + + // Connected notify is not sent for video call before connection has + // been initialized. + if ( aState == MCCPCallObserver::ECCPStateConnected && + iParams->CallType() == CCPCall::ECallTypeVideo && + !iConnectionHandler->ConnectionInitialized() ) + { + CSPLOGSTRING(CSPINT, + "CSPVideoCall::NotifyCallStateChanged connection not initialized"); + } + else + { + CSPLOGSTRING(CSPINT, + "CSPVideoCall::NotifyCallStateChanged notifying state change"); + CSPCall::NotifyCallStateChanged( aState ); + } + + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::NotifyCallStateChangedWithInband +// Notifies observers about state changes +// --------------------------------------------------------------------------- +// +void CSPVideoCall::NotifyCallStateChangedWithInband( + MCCPCallObserver::TCCPCallState aState ) + { + CSPLOGSTRING2(CSPINT, + "CSPVideoCall::NotifyCallStateChangedWithInband %d", aState); + iNextCallState = aState; + + CSPCall::NotifyCallStateChangedWithInband( aState ); + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::ConnectionReady +// --------------------------------------------------------------------------- +// +void CSPVideoCall::ConnectionReady( TName aDataPortName ) + { + CSPLOGSTRING3(CSPINT, "CSPVideoCall::ConnectionReady \ + state = %d, next state: %d", iCallState, iNextCallState); + + // If still connecting + if ( iNextCallState == MCCPCallObserver::ECCPStateConnected ) + { + NotifyCallEventOccurred( MCCPCallObserver::ECCPCSDataPortLoaned ); + NotifyCallStateChanged( iNextCallState ); + iCommonInfo.NotifyDataPortName( aDataPortName ); + } + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::ConnectionEstablishingFailed +// --------------------------------------------------------------------------- +// +void CSPVideoCall::ConnectionEstablishingFailed(TInt /*aErr*/) + { + CSPLOGSTRING(CSPERROR, "CSPVideoCall::ConnectionEstablishingFailed"); + CSPCall::NotifyErrorOccurred( ECCPErrorVideoCallSetupFailed ); + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::VideoCallCapsChanged +// Receives data call caps changed notification from Etel data call caps monitor +// --------------------------------------------------------------------------- +// +void CSPVideoCall::DataCallCapsChanged( RMobileCall::TMobileCallDataCapsV1& aCaps ) + { + CSPLOGSTRING(CSPINT, "CSPVideoCall::DataCallCapsChanged"); + if ( aCaps.iProtocolCaps == RMobileCall::KCapsIsdnMultimedia ) + { + CSPLOGSTRING(CSPINT, "CSPVideoCall::DataCallCapsChanged type=video"); + iParams->SetCallType( CCPCall::ECallTypeVideo ); + } + else + { + CSPLOGSTRING(CSPINT, "CSPVideoCall::DataCallCapsChanged type=voice"); + iParams->SetCallType( CCPCall::ECallTypeCSVoice ); + } + } + +// --------------------------------------------------------------------------- +// Branches dial requests according to the flag. +// --------------------------------------------------------------------------- +// +TInt CSPVideoCall::DialFdnCond( TBool aFdnCheck ) + { + CSPLOGSTRING(CSPREQIN, "CSPVideoCall::DialFdnCond <"); + TInt err(KErrNone); + + SetDefaultCallParameters(); + + // Update internal call params + iCommonInfo.InitializeDataCallParameters( iDataCallParams ); + + // Set the call state to dialling + if ( iCall.SubSessionHandle() ) + { + CSPLOGSTRING(CSPINT, "CSPVideoCall::DialFdnCond make request"); + if ( aFdnCheck ) + { + err = iRequester->MakeDialRequest( + iDataCallParamsPckg, iRemotePartyNumber ); + } + else + { + err = iRequester->MakeDialNoFdnCheckRequest( + iDataCallParamsPckg, iRemotePartyNumber ); + } + + if ( err != KErrNone ) + { + CSPLOGSTRING2(CSPERROR, + "CSPVideoCall::DialFdnCond ERROR with Dial request: %d", err ); + } + } + else + { + CSPLOGSTRING2(CSPERROR, "CSPVideoCall::DialFdnCond() ERROR with iCall session: %d", &iCall ); + err = KErrGeneral; + } + + CSPLOGSTRING(CSPINT, "CSPVideoCall::DialFdnCond() >"); + return err; + } + +// --------------------------------------------------------------------------- +// From class MCCPCSCall +// CSPVideoCall::SwitchAlternatingCall +// --------------------------------------------------------------------------- +// +TInt CSPVideoCall::SwitchAlternatingCall() + { + CSPLOGSTRING(CSPREQIN, "CSPVideoCall::GetMobileCallInfo"); + return KErrNotSupported; + } + +// --------------------------------------------------------------------------- +// From class MCCPCSCall +// CSPVideoCall::GetMobileDataCallCaps +// --------------------------------------------------------------------------- +// +TInt CSPVideoCall::GetMobileDataCallCaps( TDes8& aCaps ) const + { + CSPLOGSTRING(CSPREQIN, "CSPVideoCall::GetMobileDataCallCaps"); + return iVideoCallCapsMonitor->GetMobileDataCallCaps( aCaps ); + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPVideoCall::IsSecured +// --------------------------------------------------------------------------- +// +TBool CSPVideoCall::IsSecured() const + { + CSPLOGSTRING(CSPREQIN, "CSPVideoCall::IsSecured"); + return CSPCall::IsSecured(); + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::CSPVideoCall +// --------------------------------------------------------------------------- +// +CSPVideoCall::CSPVideoCall( RMobileLine& aLine, + TBool aMobileOriginated, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo ) : + CSPCall( aLine, aMobileOriginated, aName, + aCommonInfo, EFalse ), + iDataCallParams(), + iDataCallParamsPckg (iDataCallParams) + + { + CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::CSPVideoCall"); + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::ConstructL +// Constructing CSPVideoCall for MT call. +// --------------------------------------------------------------------------- +// +void CSPVideoCall::ConstructL( const CCCECallParameters& aParams ) + { + CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::ConstructL <"); + + CSPCall::ConstructL( aParams ); + + iConnectionHandler = CSPVideoCallConnectionHandler::NewL( *this, iCall ); + iVideoCallCapsMonitor = CSPEtelVideoCallCapsMonitor::NewL( *this, iCall ); + iVideoCallCapsMonitor->StartMonitoring(); + + // Update call type info only for MT call. + if ( !iMobileOriginated ) + { + CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::ConstructL() selecting call type for MT call"); + CCPCall::TCallType callType = SelectCallTypeFromProtocolCaps(); + iParams->SetCallType( callType ); + } + + // Filter out illegal requests + if ( !CCPCall::ECallTypeVideo == iParams->CallType() ) + { + CSPLOGSTRING(CSPERROR, "CSPVideoCall::ConstructL() error invalid call type"); + User::Leave( KErrArgument ); + } + + CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::ConstructL >"); + } + +// ----------------------------------------------------------------------------- +// Set default call parameters. +// ----------------------------------------------------------------------------- +// +void CSPVideoCall::SetDefaultCallParameters() + { + // Set common call default parameters + iDataCallParams.iSpeakerControl = RMobileCall::EMonitorSpeakerControlAlwaysOn; + iDataCallParams.iSpeakerVolume = RMobileCall::EMonitorSpeakerVolumeMedium; + iDataCallParams.iInterval = KCSPDefaultInterval; + iDataCallParams.iWaitForDialTone = RMobileCall::EDialToneNoWait; + iDataCallParams.iIdRestrict = RMobileCall::EIdRestrictDefault; + iDataCallParams.iAutoRedial = KCSPDefaultAutoRedial; + // Set video call parameters + iDataCallParams.iService = RMobileCall::EServiceDataCircuitSync; + iDataCallParams.iSpeed = RMobileCall::ESpeed64000; + iDataCallParams.iProtocol = RMobileCall::EProtocolIsdnMultimedia; + iDataCallParams.iQoS = RMobileCall::EQoSTransparent; + iDataCallParams.iRLPVersion = RMobileCall::ERLPNotRequested; + iDataCallParams.iModemToMSWindowSize = 0x00; + iDataCallParams.iMSToModemWindowSize = 0x00; + iDataCallParams.iAckTimer = 0x00; + iDataCallParams.iRetransmissionAttempts = 0x00; + iDataCallParams.iResequencingPeriod = 0x00; + iDataCallParams.iV42bisReq = RMobileCall::EV42bisNeitherDirection; + iDataCallParams.iV42bisCodewordsNum = 0x00; + iDataCallParams.iV42bisMaxStringLength = 0x00; + iDataCallParams.iUseEdge = EFalse; + } + +// --------------------------------------------------------------------------- +// CSPVideoCall::SelectCallTypeFromProtocolCaps +// --------------------------------------------------------------------------- +// +CCPCall::TCallType CSPVideoCall::SelectCallTypeFromProtocolCaps() + { + CSPLOGSTRING(CSPREQIN, "CSPVideoCall::SelectCallTypeFromProtocolCaps <"); + + iVideoCallCapsMonitor->UpdateProtocolCaps(); + TUint protocolCaps = iVideoCallCapsMonitor->GetProtocolCaps(); + CCPCall::TCallType callType; + + if ( protocolCaps == RMobileCall::KCapsIsdnMultimedia ) + { + callType = CCPCall::ECallTypeVideo; + } + else + { + callType = CCPCall::ECallTypeCSVoice; + } + CSPLOGSTRING2(CSPINT, "CSPVideoCall::SelectCallTypeFromProtocolCaps >\ + call type: %d", callType ); + + return callType; + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspvideocallconnectionhandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspvideocallconnectionhandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,236 @@ +/* +* Copyright (c) 2007-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: Contains the implementation of class CSPDataCallConnectionHandler +* +*/ + + +#include +#include +#include + +#include "cspvideocallconnectionhandler.h" +#include "cspvideocall.h" +#include "csplogger.h" +#include "cspconsts.h" + + +// --------------------------------------------------------------------------- +// Constructs the connection handler via two phased constructing. +// --------------------------------------------------------------------------- +// +CSPVideoCallConnectionHandler* CSPVideoCallConnectionHandler::NewL( + CSPVideoCall& aObserver, + RMobileCall& aCall ) + { + CSPLOGSTRING(CSPOBJECT, "CSPDataCallConnectionHandler::NewL()" ); + CSPVideoCallConnectionHandler* self = new (ELeave) CSPVideoCallConnectionHandler( + aObserver, aCall ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor of the object. +// --------------------------------------------------------------------------- +// +CSPVideoCallConnectionHandler::~CSPVideoCallConnectionHandler( ) + { + CSPLOGSTRING(CSPOBJECT, "CSPVideoCallConnectionHandler::~CSPDataCallConnectionHandler()" ); + ReleaseConnection(); + Cancel(); + CloseConnection(); + } + +// --------------------------------------------------------------------------- +// CSPVideoCallConnectionHandler::InitializeConnection +// --------------------------------------------------------------------------- +// +TInt CSPVideoCallConnectionHandler::InitializeConnection( ) + { + TInt err = CreateSocketConnection(); + if ( !err ) + { + err = LoanDataPort(); + } + + CSPLOGSTRING2(CSPOBJECT, + "CSPVideoCallConnectionHandler::InitializeConnection err=%i", err ); + + return err; + } + +// --------------------------------------------------------------------------- +// CSPVideoCallConnectionHandler::ReleaseConnection +// --------------------------------------------------------------------------- +// +TInt CSPVideoCallConnectionHandler::ReleaseConnection( ) + { + CloseConnection(); + TInt err = iCall.RecoverDataPort(); + CSPLOGSTRING2(CSPOBJECT, + "CSPVideoCallConnectionHandler::ReleaseConnection err=%i", err ); + iConnectionInitialized = EFalse; + + return err; + } + +// --------------------------------------------------------------------------- +// CSPVideoCallConnectionHandler::InitializeConnection +// --------------------------------------------------------------------------- +// +TBool CSPVideoCallConnectionHandler::ConnectionInitialized( ) + { + return iConnectionInitialized; + } + +// ----------------------------------------------------------------------------- +// Creates socket connection. +// Enumerates connections and save Access Point Name of CSD connection. +// ----------------------------------------------------------------------------- +// +TInt CSPVideoCallConnectionHandler::CreateSocketConnection() + { + CSPLOGSTRING( CSPINT, "CSPVideoCallConnectionHandler::CreateSocketConnection() start"); + // Socket server connection to get Access Point Name + TInt errorCode = iSocketServer.Connect(); + CSPLOGSTRING2( CSPREQOUT, + "CSPVideoCallConnectionHandler::CreateSocketConnection: RSocketServ::Connect, error code: %d", + errorCode ); + + if ( KErrNone == errorCode ) + { + errorCode = iConnection.Open( iSocketServer ); + CSPLOGSTRING2( CSPREQOUT, + "CSPVideoCallConnectionHandler::CreateSocketConnection: RConnection::Open, errorcode: %d", + errorCode ); + if ( errorCode ) + { + iSocketServer.Close(); + } + } + return errorCode; + } + +// --------------------------------------------------------------------------- +// CSPVideoCallConnectionHandler::LoanDataPort +// --------------------------------------------------------------------------- +// +TInt CSPVideoCallConnectionHandler::LoanDataPort( ) + { + CSPLOGSTRING(CSPINT, "CSPVideoCallConnectionHandler::LoanDataPort"); + TInt ret( KErrNone ); + if ( !IsActive() ) + { + SetActive(); + iCall.LoanDataPort( iStatus, iCommPort ); + } + else + { + ret = KErrInUse; + CSPLOGSTRING2(CSPERROR, + "CSPVideoCallConnectionHandler::LoanDataPort Error!: %d", + ret); + } + + return ret; + } + +// ----------------------------------------------------------------------------- +// Close Socket Server connection, when the call is on Idle state. +// ----------------------------------------------------------------------------- +// +void CSPVideoCallConnectionHandler::CloseConnection() + { + CSPLOGSTRING( CSPINT, "CSPVideoCallConnectionHandler::CloseConnection" ); + iConnection.Close(); + iSocketServer.Close(); + } + +// --------------------------------------------------------------------------- +// CSPVideoCallConnectionHandler::RunL +// --------------------------------------------------------------------------- +// +void CSPVideoCallConnectionHandler::RunL() + { + // from CActive + CSPLOGSTRING2( CSPREQEND, + "CSPVideoCallConnectionHandler::RunL: status: %d", iStatus.Int() ); + + if ( iStatus == KErrNone ) + { + CSPLOGSTRING( CSPINT, + "CSPVideoCallConnectionHandler::RunL: LoanDataPort request OK" ); + iConnectionInitialized = ETrue; + iObserver.ConnectionReady( iCommPort.iPort ); + } + else + { + // Error situations + TInt err = iStatus.Int(); + CSPLOGSTRING2( CSPERROR, "CSPVideoCallConnectionHandler::RunL: request \ + completed with error: %d", err ); + + iObserver.ConnectionEstablishingFailed( err ); + } + } + +// --------------------------------------------------------------------------- +// CSPVideoCallConnectionHandler::DoCancel +// --------------------------------------------------------------------------- +// +void CSPVideoCallConnectionHandler::DoCancel() + { + CSPLOGSTRING( CSPREQOUT, "CSPVideoCallConnectionHandler::DoCancel" ); + if ( IsActive() ) + { + iCall.LoanDataPortCancel(); + } + else + { + CSPLOGSTRING( CSPERROR, + "CSPVideoCallConnectionHandler::DoCancel: Already active" ); + } + } + +// --------------------------------------------------------------------------- +// Constructs the requester. +// --------------------------------------------------------------------------- +// +CSPVideoCallConnectionHandler::CSPVideoCallConnectionHandler( + CSPVideoCall& aObserver, + RMobileCall& aCall ) : + CActive( EPriorityStandard ), + iObserver( aObserver ), + iCall( aCall ), + iConnectionInitialized( EFalse ) + { + CSPLOGSTRING(CSPOBJECT, "CSPVideoCallConnectionHandler::CSPVideoCallConnectionHandler" ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Constructing in the second phase. +// --------------------------------------------------------------------------- +// +void CSPVideoCallConnectionHandler::ConstructL() + { + // Empty implementation + } + + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/cspvoicecall.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/cspvoicecall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,244 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements class CSPVoiceCall which provides call functionality +* +*/ + + +#include +#include +#include +#include + +#include "cspvoicecall.h" +#include "cspetelcallrequester.h" +#include "cspetelcalleventmonitor.h" +#include "cspetelcallstatusmonitor.h" +#include "csplogger.h" +#include "csppanic.pan" +#include "cspconsts.h" +#include "mcspcommoninfo.h" + + +// --------------------------------------------------------------------------- +// CSPVoiceCall::NewL Two phased construction. +// --------------------------------------------------------------------------- +// +CSPVoiceCall* CSPVoiceCall::NewL( const TDesC& aName, + RMobileLine& aLine, TBool aMobileOriginated, + const CCCECallParameters& aParams, + MCSPCommonInfo& aCommonInfo, + TBool aIsEmergency ) + { + CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::NewL <"); + + CSPVoiceCall* self = new ( ELeave ) CSPVoiceCall( aLine, + aMobileOriginated, + aName, + aCommonInfo, + aIsEmergency ); + CleanupStack::PushL( self ); + self->ConstructL( aParams ); + CleanupStack::Pop( self ); + CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::NewL >"); + return self; + } + +// --------------------------------------------------------------------------- +// CSPVoiceCall::~CSPVoiceCall +// --------------------------------------------------------------------------- +// +CSPVoiceCall::~CSPVoiceCall() + { + CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::~CSPVoiceCall"); + } + +// --------------------------------------------------------------------------- +// CSPVoiceCall::GoOneToOneL +// Goes one to one from conference. +// --------------------------------------------------------------------------- +// +TInt CSPVoiceCall::GoOneToOne( ) + { + CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::GoOneToOne"); + return iRequester->MakeRequest( + CSPEtelCallRequester::ERequestTypeGoOneToOne ); + } + +// --------------------------------------------------------------------------- +// From class MCCPCSCall +// CSPVoiceCall::Dial +// --------------------------------------------------------------------------- +// +TInt CSPVoiceCall::DialFdnCond( TBool aFdnCond ) + { + CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::DialFdnCond <"); + + if ( !iMobileOriginated ) + { + CSPLOGSTRING(CSPINT, + "CSPVoiceCall::DialFdnCond MT CALL, Dial not supported"); + return KErrNotSupported; + } + + CSPLOGSTRING(CSPINT, "CSPVoiceCall::DialFdnCond making request"); + + SetDefaultCallParameters(); + iCommonInfo.InitializeCallParameters( iCallParams ); + iCallParams.iSubAddress = iParams->SubAddress(); + iCallParams.iBearerCap1 = iParams->Bearer(); + + if ( CCCECallParameters::ECCECallOriginSAT == iParams->Origin() ) + { + iCallParams.iCallParamOrigin = RMobileCall::EOriginatorSIM; + } + + TInt err(KErrNone); + if ( aFdnCond ) + { + err = iRequester->MakeDialRequest( iCallParamsPckg, iRemotePartyNumber ); + } + else + { + err = iRequester->MakeDialNoFdnCheckRequest( + iCallParamsPckg, iRemotePartyNumber ); + } + CSPLOGSTRING2(CSPINT, "CSPVoiceCall::DialFdnCond > res: %d", err ); + return err; + } + +// --------------------------------------------------------------------------- +// Make the DialEmergencyCall request to ETel ( impl. of MCCPEmergencyCall ) +// --------------------------------------------------------------------------- +// +TInt CSPVoiceCall::Dial( const TDesC& aEmergencyNumber ) + { + CSPLOGSTRING2(CSPREQIN, "CSPVoiceCall::Dial EMERGENCY %S", &aEmergencyNumber); + iDialCompletionCode = KErrNone; + iTerminationErrorNotified = EFalse; + iIsEmergencyCall = ETrue; + iEmergencyNumber.Zero(); + TInt emergencyNumberLength = aEmergencyNumber.Length(); + + if ( emergencyNumberLength > 0 && + emergencyNumberLength <= RMobileENStore::KEmergencyNumberSize ) + { + iEmergencyNumber.Append( aEmergencyNumber ); + } + else if ( emergencyNumberLength > RMobileENStore::KEmergencyNumberSize ) + { + CSPLOGSTRING(CSPERROR, "CSPVoiceCall::Dial invalid argument" ); + return KErrArgument; + } + + CSPLOGSTRING2(CSPREQIN, "CSPVoiceCall::Dial using %S", &iEmergencyNumber); + + TInt err( iRequester->MakeDialEmergencyRequest( iEmergencyNumber ) ); + + CSPLOGSTRING2(CSPINT, "CSPVoiceCall::Dial res %d", err ); + return err; + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPVoiceCall::Answer +// --------------------------------------------------------------------------- +// +TInt CSPVoiceCall::Answer() + { + CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::Answer"); + return CSPCall::Answer(); + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPCall::HangUp +// --------------------------------------------------------------------------- +// +TInt CSPVoiceCall::HangUp() + { + CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::HangUp"); + return CSPCall::HangUp(); + } + +// --------------------------------------------------------------------------- +// From class MCCPCall +// CSPVoiceCall::Cancel +// --------------------------------------------------------------------------- +// +TInt CSPVoiceCall::Cancel() + { + CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::Cancel"); + return CSPCall::Cancel(); + } + +// --------------------------------------------------------------------------- +// From class MCCPCSCall +// CSPVoiceCall::SwitchAlternatingCall +// --------------------------------------------------------------------------- +// +TInt CSPVoiceCall::SwitchAlternatingCall() + { + CSPLOGSTRING(CSPERROR, "CSPVoiceCall::SwitchAlternatingCall not supported!"); + return KErrNotSupported; + } + +// --------------------------------------------------------------------------- +// CSPVoiceCall::CSPVoiceCall +// --------------------------------------------------------------------------- +// +CSPVoiceCall::CSPVoiceCall( RMobileLine& aLine, + TBool aMobileOriginated, + const TDesC& aName, + MCSPCommonInfo& aCommonInfo, + TBool aIsEmergency ):CSPCall( aLine, + aMobileOriginated, aName, + aCommonInfo, aIsEmergency ), + iCallParams(), + iCallParamsPckg (iCallParams) + + { + CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::CSPVoiceCall"); + } + +// --------------------------------------------------------------------------- +// CSPVoiceCall::ConstructL +// Constructing CSPVoiceCall for MT call. +// --------------------------------------------------------------------------- +// +void CSPVoiceCall::ConstructL( const CCCECallParameters& aParams ) + { + CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::ConstructL <"); + CSPCall::ConstructL( aParams ); + CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::ConstructL >"); + } + +// --------------------------------------------------------------------------- +// CSPVoiceCall::SetDefaultCallParameters +// --------------------------------------------------------------------------- +// +void CSPVoiceCall::SetDefaultCallParameters() + { + CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::SetDefaultCallParameters"); + + //Set defaults + iCallParams.iSpeakerControl = RMobileCall::EMonitorSpeakerControlAlwaysOn; + iCallParams.iSpeakerVolume = RMobileCall::EMonitorSpeakerVolumeMedium; + iCallParams.iInterval = KCSPDefaultInterval; + iCallParams.iWaitForDialTone = RMobileCall::EDialToneNoWait; + iCallParams.iIdRestrict = RMobileCall::EIdRestrictDefault; + iCallParams.iAutoRedial = KCSPDefaultAutoRedial; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/rcsplinecontainer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/rcsplinecontainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,216 @@ +/* +* Copyright (c) 2002-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: Container for ETel line subsessions. +* +*/ + + + +// INCLUDES +#include +#include // tsy and phone names +#include +#include + +#include "rcsplinecontainer.h" +#include "csppanic.pan" +#include "csplogger.h" + +// ============================ MEMBER FUNCTIONS =============================== + +// Default c++ constructor +RCSPLineContainer::RCSPLineContainer() + { + } + +// --------------------------------------------------------- +// RCSPLineContainer::Open +// +// --------------------------------------------------------- +// +TInt RCSPLineContainer::Open( RMobilePhone& aPhone, TUint32 aServiceId ) + { + CSPLOGSTRING( CSPINT, "RCSPLineContainer::Open" ); + iServiceId = aServiceId; + + TInt error = iPrimaryLine.Open( aPhone, KMmTsyVoice1LineName); + if (error != KErrNone) + { + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::Open voice ERROR %d", error ); + return error; + } + + // Ignore errors on the rest of the lines - they are non-essential + error = iAls2Line.Open( aPhone, KMmTsyVoice2LineName ); + if ( error ) + { + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::Open voice2 ERROR %d", error ); + } + + error = iDataLine.Open( aPhone, KMmTsyDataLineName ); + if ( error ) + { + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::Open data ERROR %d", error ); + } + + error = iFaxLine.Open( aPhone, KMmTsyFaxLineName ); + if ( error ) + { + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::Open fax ERROR %d", error ); + } + return KErrNone; + } + +// --------------------------------------------------------- +// RCSPLineContainer::Close +// +// --------------------------------------------------------- +// +void RCSPLineContainer::Close() + { + CSPLOGSTRING( CSPINT, "RCSPLineContainer::Close" ); + iPrimaryLine.Close(); + iAls2Line.Close(); + iDataLine.Close(); + iFaxLine.Close(); + } + +// --------------------------------------------------------- +// RCSPLineContainer::LineByType +// +// --------------------------------------------------------- +// +RMobileLine& RCSPLineContainer::LineByType( TCSPLineId aLine ) + { + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType %d", aLine ); + switch(aLine) + { + case ECSPLineSpeech: + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType Speech %d", aLine ); + return iPrimaryLine; + case ECSPLineAuxSpeech: + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType AuxSpeech %d", aLine ); + return iAls2Line; + case ECSPLineData: + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType Data %d", aLine ); + return iDataLine; + case ECSPLineFax: + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType Fax %d", aLine ); + return iFaxLine; + default: + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::INVALID LINE ID %d", aLine ); + Panic( ECSPPanicInvalidParameter ); + return iPrimaryLine; + } + } + +// --------------------------------------------------------- +// True if the line matching the line id is open. +// --------------------------------------------------------- +// +TBool RCSPLineContainer::LineIsOpen( TCSPLineId aType ) + { + CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineIsOpen %d", aType ); + RMobileLine& line = LineByType(aType); + return (line.SubSessionHandle() != KNullHandle); + } + +// --------------------------------------------------------- +// Resolves line id based on service id, call type and line +// type. +// --------------------------------------------------------- +// +RCSPLineContainer::TCSPLineId RCSPLineContainer::ResolveLineIdL( + const CCCECallParameters& aCallParameters ) const + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::ResolveLineIdL"); + RCSPLineContainer::TCSPLineId lineId = RCSPLineContainer::ECSPLineSpeech; + + switch ( aCallParameters.CallType() ) + { + case CCPCall::ECallTypeCSVoice: + { + if ( aCallParameters.LineType() == CCCECallParameters::ECCELineTypeAux ) + { + lineId = RCSPLineContainer::ECSPLineAuxSpeech; + } + else if ( aCallParameters.LineType() == CCCECallParameters::ECCELineTypePrimary ) + { + lineId = RCSPLineContainer::ECSPLineSpeech; + } + else + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::ResolveLineIdL ERROR: Unknown line type."); + User::Leave( KErrNotSupported ); + } + break; + } + case CCPCall::ECallTypeVideo: // Fall through + { + lineId = RCSPLineContainer::ECSPLineData; + break; + } + + default: + { + CSPLOGSTRING(CSPOBJECT, "CSProvider::ResolveLineIdL ERROR: Unknown call type"); + User::Leave( KErrNotSupported ); + } + } + + return lineId; + } + +// --------------------------------------------------------- +// Resolves call type, service id and line type based on +// line id. +// --------------------------------------------------------- +// +TInt RCSPLineContainer::ResolveCallInfo( RCSPLineContainer::TCSPLineId aLineId, + TUint32& aServiceId, + CCPCall::TCallType& aCallType, + CCCECallParameters::TCCELineType& aLineType ) const + + { + TInt err(KErrNone); + aLineType = CCCECallParameters::ECCELineTypePrimary; + aServiceId = iServiceId; + + if ( aLineId == RCSPLineContainer::ECSPLineSpeech ) + { + aCallType = CCPCall::ECallTypeCSVoice; + } + else if ( aLineId == RCSPLineContainer::ECSPLineAuxSpeech ) + { + aCallType = CCPCall::ECallTypeCSVoice; + aLineType = CCCECallParameters::ECCELineTypeAux; + } + else if ( aLineId == RCSPLineContainer::ECSPLineData ) + { + aCallType = CCPCall::ECallTypeVideo; + } + else + { + CSPLOGSTRING(CSPOBJECT, "RCSPLineContainer::ResolveCallInfo() ERROR Unknown line id"); + err = KErrArgument; + } + CSPLOGSTRING2(CSPINT, "RCSPLineContainer::ResolveCallInfo() aCallType=%d", aCallType ); + CSPLOGSTRING2(CSPINT, "RCSPLineContainer::ResolveCallInfo() aLineType=%d", aLineType ); + + return err; + } + + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/csplugin/src/tcspskypeidparser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedcallengine/csplugin/src/tcspskypeidparser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,105 @@ +/* +* Copyright (c) 2007 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: Parses Skype id from UUI message. +* +*/ + + +#include "tcspskypeidparser.h" + +const TInt KMinSkypeIdUUILength = 3; +const TInt KMaxSkypeIdUUILength = 33; +const TInt KMaxSkypeIdLength = 32; +const TInt KStartOf31To32EncodingByte = 26; +const TInt KUUIMTDicriminator = 0x44; + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- +// +TCSPSkypeIdParser::TCSPSkypeIdParser() + { + } + +// --------------------------------------------------------------------------- +// Creates buffer to be used by client with parse method. +// --------------------------------------------------------------------------- +// +HBufC* TCSPSkypeIdParser::CreateSkypeIdBufferL() + { + return HBufC::NewL( KMaxSkypeIdLength ); + } + +// --------------------------------------------------------------------------- +// Parses skype id. +// SkypeID format: +// byte 0: Protocol discriminator: Always 0x00 +// byte 1: User-User Information Discriminator. +// For MT call this has to be 0x44 +// Byte 2: First skype id character a.k.a payload. MSB bit is zero. +// Byte 26-33 May have MSB bit set, which are bits of the last character. +// The 26 byte's MSB is the last characters MSB bit. +// --------------------------------------------------------------------------- +// +TInt TCSPSkypeIdParser::Parse( + const TDesC& aUUIMessage, + TDes& aSkypeId ) + { + const TInt messageLength( aUUIMessage.Length() ); + TInt error = KErrNone; + + const TBool messageSizeOk = (messageLength >= KMinSkypeIdUUILength && + messageLength <= KMaxSkypeIdUUILength); + + if( messageSizeOk && + ( aUUIMessage[1] ) == KUUIMTDicriminator ) // address type + { + + TUint lastChar = 0; + + // skypeId payload starts from the second byte. + TInt i = 2; + for( ; i < messageLength; i++ ) + { + TUint byte = aUUIMessage[i]; + if( i >= KStartOf31To32EncodingByte ) + { + // 31 to 32 encoding: last character is build from + // 7 last bytes. + lastChar = lastChar << 1; + lastChar |= (byte>>7)&0x01; + } + // MSB bit is not part of the character. + aSkypeId.Append( byte & 0x7F ); + + + } + + // Append the last char only if the aUUIMessage size was the maximum and there + // is content in the last char. + if( messageLength == KMaxSkypeIdUUILength && lastChar != 0 ) + { + aSkypeId.Append(lastChar); + } + + } + else + { + error = KErrNotSupported; + } + + return error; + } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/group/bld.inf --- a/convergedcallengine/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -27,6 +27,7 @@ #include "../spsettings/group/bld.inf" #include "../cenrepdatabase/group/bld.inf" #include "../serviceselector/group/bld.inf" +#include "../csplugin/group/bld.inf" PRJ_TESTMMPFILES diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/group/bld.inf --- a/convergedcallengine/serviceselector/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -34,7 +34,7 @@ ../rom/serviceselectorresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(serviceselectorresources.iby) // Stub sis file -../srcdata/serviceselector_stub.sis /epoc32/data/z/system/install/serviceselector_stub.sis +../srcdata/serviceselector_stub.sis /epoc32/data/z/system/install/serviceselector_stub.sis PRJ_MMPFILES serviceselector.mmp diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/group/serviceselector.mmp --- a/convergedcallengine/serviceselector/group/serviceselector.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/group/serviceselector.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -22,9 +22,9 @@ TARGET serviceselector.dll TARGETTYPE dll UID 0x1000008d 0x20019532 -VENDORID VID_DEFAULT +VENDORID VID_DEFAULT -CAPABILITY CAP_GENERAL_DLL +CAPABILITY CAP_GENERAL_DLL SOURCEPATH ../src @@ -37,8 +37,8 @@ SOURCE cssservicehandlervoip.cpp SOURCE csslistquerydialog.cpp SOURCE csssettingshandler.cpp -SOURCE cssnotedialog.cpp -SOURCE cssbshandler.cpp +SOURCE cssnotedialog.cpp +SOURCE cssbshandler.cpp SOURCE cssiconfileprovider.cpp USERINCLUDE ../inc @@ -59,18 +59,16 @@ LIBRARY euser.lib LIBRARY featmgr.lib // Feature manager. LIBRARY flogger.lib // For logging. -// <-- QT PHONE START --> -//LIBRARY cch.lib // Converged connection handler client API -// <-- QT PHONE END --> +LIBRARY cch.lib // Converged connection handler client API LIBRARY serviceprovidersettings.lib // For service settings LIBRARY avkon.lib // For UI queries LIBRARY eikdlg.lib // For UI queries -LIBRARY eikctl.lib // For UI queries -LIBRARY cone.lib +LIBRARY eikctl.lib // For UI queries +LIBRARY cone.lib LIBRARY eikcoctl.lib // menu bar -LIBRARY eikcore.lib -LIBRARY bafl.lib // For CDesArrays -LIBRARY commonengine.lib // For stringloader +LIBRARY eikcore.lib +LIBRARY bafl.lib // For CDesArrays +LIBRARY commonengine.lib // For stringloader LIBRARY aknicon.lib LIBRARY egul.lib LIBRARY bsclient.lib diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/inc/cssconnectionhandler.h --- a/convergedcallengine/serviceselector/inc/cssconnectionhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/inc/cssconnectionhandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,6 +22,7 @@ // INCLUDES #include +#include // FORWARD DECLARATIONS // None @@ -72,6 +73,8 @@ private: // Data + // Converged Connection Handler client interface + CCch* iCch; }; diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/inc/cssiconfileprovider.h --- a/convergedcallengine/serviceselector/inc/cssiconfileprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/inc/cssiconfileprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define C_SSICONFILEPROVIDER_H #include -#include +#include /** * Declarition of CSsIconFileProvider. @@ -65,7 +65,7 @@ /** * By default Symbian 2nd phase constructor is private. */ - void ConstructL( RFile& aFile ); + void ConstructL( RFile& aFile ); private: // data @@ -76,4 +76,4 @@ #endif // C_SSICONFILEPROVIDER_H -// End of File +// End of File \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/inc/cssservicehandlervoip.h --- a/convergedcallengine/serviceselector/inc/cssservicehandlervoip.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/inc/cssservicehandlervoip.h Wed Sep 01 12:15:03 2010 +0100 @@ -25,7 +25,7 @@ #include "cservicehandler.h" #include #include -#include +#include #include // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/rom/serviceselector.iby --- a/convergedcallengine/serviceselector/rom/serviceselector.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/rom/serviceselector.iby Wed Sep 01 12:15:03 2010 +0100 @@ -20,6 +20,6 @@ #define __SERVICESELECTOR_IBY__ file=ABI_DIR\BUILD_DIR\serviceselector.dll SHARED_LIB_DIR\serviceselector.dll -data=ZSYSTEM\install\serviceselector_stub.sis System\Install\serviceselector_stub.sis +data=ZSYSTEM\install\serviceselector_stub.sis System\Install\serviceselector_stub.sis #endif diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/src/cssbshandler.cpp --- a/convergedcallengine/serviceselector/src/cssbshandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/src/cssbshandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,9 +22,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "cssiconfileprovider.h" #include "cssbshandler.h" diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/src/cssconnectionhandler.cpp --- a/convergedcallengine/serviceselector/src/cssconnectionhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/src/cssconnectionhandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -57,11 +57,13 @@ // void CSsConnectionHandler::ConstructL() { + iCch = CCch::NewL(); } // Destructor CSsConnectionHandler::~CSsConnectionHandler() { + delete iCch; } // ----------------------------------------------------------------------------- @@ -71,11 +73,24 @@ // TBool CSsConnectionHandler::IsVoipServiceRegistered ( - TUint /*aServiceId */ + TUint aServiceId ) const { - - TBool registered( EFalse ); + TCchServiceStatus serviceStatus; + TBool registered( EFalse ); + CCchService* service = iCch->GetService( aServiceId ); + if ( service ) + { + service->GetStatus( ECCHVoIPSub, serviceStatus ); + registered = ( KErrNone == serviceStatus.Error() ) && + ( ECCHEnabled == serviceStatus.State() ); + } + + CSSLOGSTRING4("CSSelector::IsRegistered: id:%d ,enabled:%d ,error:%d", + (TInt) aServiceId, + (TInt) ECCHEnabled == serviceStatus.State(), + (TInt) serviceStatus.Error()); + return registered; } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/src/cssnotedialog.cpp --- a/convergedcallengine/serviceselector/src/cssnotedialog.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/src/cssnotedialog.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #include "cssuiutilities.h" #include "cssserviceutilities.h" #include "csslogger.h" -#include +#include #include // ================= MEMBER FUNCTIONS ======================================= @@ -91,7 +91,7 @@ } return ret; } - + // ================= OTHER EXPORTED FUNCTIONS =============================== // End of File diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/src/cssuiutilities.cpp --- a/convergedcallengine/serviceselector/src/cssuiutilities.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/src/cssuiutilities.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -26,8 +26,8 @@ #include #include #include // For resource dir definations -#include -#include +#include +#include #include // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/serviceselector/srcdata/serviceselector.rss --- a/convergedcallengine/serviceselector/srcdata/serviceselector.rss Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/serviceselector/srcdata/serviceselector.rss Wed Sep 01 12:15:03 2010 +0100 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "serviceselector.loc" diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/backuphelper/group/bld.inf --- a/convergedcallengine/spsettings/backuphelper/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/backuphelper/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ DEFAULT PRJ_EXPORTS -../data/backup_registration.xml z:/private/200286d2/backup_registration.xml +../data/backup_registration.xml z:/private/200286d2/backup_registration.xml // Stub files ../data/spsbackuphelper_stub.sis /epoc32/data/z/system/install/spsbackuphelper_stub.sis diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/backuphelper/group/spsbackuphelper.mmp --- a/convergedcallengine/spsettings/backuphelper/group/spsbackuphelper.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/backuphelper/group/spsbackuphelper.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -17,23 +17,22 @@ #include -TARGET spsbackuphelper.exe -TARGETTYPE exe +TARGET spsbackuphelper.exe +TARGETTYPE exe UID 0x100039CE 0x200286D2 CAPABILITY WriteDeviceData ReadDeviceData MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/connect -USERINCLUDE ../inc +USERINCLUDE ../inc USERINCLUDE ../../inc -SOURCEPATH ../src -SOURCE spsbackuphelpermain.cpp +SOURCEPATH ../src +SOURCE spsbackuphelpermain.cpp SOURCE spsbackuphelperperformer.cpp SOURCE spsbackuphelpermonitor.cpp -LIBRARY euser.lib +LIBRARY euser.lib LIBRARY serviceprovidersettings.lib LIBRARY centralrepository.lib -LIBRARY abclient.lib diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/backuphelper/inc/spsbackuphelpermonitor.h --- a/convergedcallengine/spsettings/backuphelper/inc/spsbackuphelpermonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/backuphelper/inc/spsbackuphelpermonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -68,11 +68,6 @@ TBool NoBackupRestore( TInt aBackupStateValue ); /** - * Check the sbs status - */ - void CheckStatusL(); - - /** * Subscribe P&S key */ void Subscribe(); @@ -91,11 +86,6 @@ private: /** - * Active backup client - */ - CActiveBackupClient* iABClient; - - /** * Performs restore finalization */ CSpsBackupHelperPerformer* iPerformer; diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/backuphelper/src/spsbackuphelpermonitor.cpp --- a/convergedcallengine/spsettings/backuphelper/src/spsbackuphelpermonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/backuphelper/src/spsbackuphelpermonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -44,7 +44,6 @@ Cancel(); iProperty.Close(); delete iPerformer; - delete iABClient; } // --------------------------------------------------------------------------- @@ -75,14 +74,6 @@ // Check current state to see if we were started for backup purposes iProperty.Get(backupStateValue); - if (!NoBackupRestore(backupStateValue)) - { - iABClient = CActiveBackupClient::NewL(); - - // Confirm that this data owner is ready for backup/restore operations - iABClient->ConfirmReadyForBURL(KErrNone); - } - // Subscribe to the P&S flag to catch transitions Subscribe(); @@ -152,8 +143,8 @@ { // Not set or no backup or restore ongoing TBool ret = - ( ( aBackupStateValue & KBURPartTypeMask ) == conn::EBURUnset || - ( aBackupStateValue & KBURPartTypeMask ) == conn::EBURNormal ); + ( ( aBackupStateValue == conn::EBURUnset ) || + ( aBackupStateValue == conn::EBURNormal ) ); return ret; } @@ -183,8 +174,10 @@ // re-subscribe to the flag to monitor future changes Subscribe(); - CheckStatusL(); + iProperty.Get(backupStateValue); + // Process the mode change accordingly + ProcessBackupStateL(backupStateValue); XSPSLOGSTRING( "CSpsBackupHelperMonitor::RunL OUT" ); } @@ -207,56 +200,5 @@ iProperty.Cancel(); } -void CSpsBackupHelperMonitor::CheckStatusL() - { - TInt backupInfo =0; - iProperty.Get(backupInfo); - - // Process the mode change accordingly - ProcessBackupStateL(backupInfo); - - if (NoBackupRestore(backupInfo)) - { - delete iABClient; - iABClient = NULL; - } - else - { - if (iABClient == NULL) - { - iABClient = CActiveBackupClient::NewL(); - } - - TDriveList driveList; - TBURPartType partType; - TBackupIncType incType; - TInt err; - TRAP(err, iABClient->BURModeInfoL(driveList, partType, incType)); - if (err != KErrNone) - { - XSPSLOGSTRING("BURModeInfoL error"); - } - - TBool amIaffected = ETrue; - - if (partType == EBURRestorePartial || partType == EBURBackupPartial) - { - TRAP(err, amIaffected = iABClient->DoesPartialBURAffectMeL()); - if (err != KErrNone) - { - User::After(5000000); - TRAP(err, amIaffected = iABClient->DoesPartialBURAffectMeL()); - } - } - - if (amIaffected) - { - // Confirm that this data owner is ready for backup/restore operations - iABClient->ConfirmReadyForBURL(KErrNone); - } - } - } - - // End of file diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/conf/spsettings.confml Binary file convergedcallengine/spsettings/conf/spsettings.confml has changed diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/group/bld.inf --- a/convergedcallengine/spsettings/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ // Public headers -../data/backup_registration.xml z:/private/10282e7e/backup_registration.xml +../data/backup_registration.xml z:/private/10282e7e/backup_registration.xml #if defined CORE_MW_LAYER_IBY_EXPORT_PATH ../rom/spsettings.iby CORE_MW_LAYER_IBY_EXPORT_PATH(spsettings.iby) @@ -32,7 +32,7 @@ // Generic configuration interface for component cenrep settings ../conf/spsettings.confml MW_LAYER_CONFML(spsettings.confml) -../conf/spsettings_10282E7F.crml MW_LAYER_CRML(spsettings_10282E7F.crml) +../conf/spsettings_10282E7F.crml MW_LAYER_CRML(spsettings_10282e7f.crml) PRJ_MMPFILES serviceprovidersettings.mmp diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/group/serviceprovidersettings.mmp --- a/convergedcallengine/spsettings/group/serviceprovidersettings.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/group/serviceprovidersettings.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -38,16 +38,14 @@ USERINCLUDE ../inc -// <-- QT PHONE START--> -MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END--> +APP_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY centralrepository.lib LIBRARY bafl.lib // CDesCArray LIBRARY flogger.lib // for logging -LIBRARY featmgr.lib -LIBRARY cenrepdatabase.lib +LIBRARY featmgr.lib +LIBRARY cenrepdatabase.lib //DEFFILE ?filename diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/inc/spsettingsengine.h --- a/convergedcallengine/spsettings/inc/spsettingsengine.h Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/inc/spsettingsengine.h Wed Sep 01 12:15:03 2010 +0100 @@ -40,238 +40,238 @@ NONSHARABLE_CLASS( CSPSettingsEngine ): public CBase { - public: // Constructors and destructor + public: // Constructors and destructor - /** - * Two-phased constructor. - */ - static CSPSettingsEngine* NewL(); + /** + * Two-phased constructor. + */ + static CSPSettingsEngine* NewL(); - /** - * Two-phased constructor. - */ - static CSPSettingsEngine* NewLC(); + /** + * Two-phased constructor. + */ + static CSPSettingsEngine* NewLC(); - /** - * Destructors. - */ - virtual ~CSPSettingsEngine(); + /** + * Destructors. + */ + virtual ~CSPSettingsEngine(); - public: // memeber functions - /** - * Starts transaction in repository - * - * @since S60 v3.2 - */ - TInt BeginTransactionLC(); + public: // memeber functions + /** + * Starts transaction in repository + * + * @since S60 v3.2 + */ + TInt BeginTransactionLC(); - /** - * Commits changes in repository - * - * @since S60 v3.2 - */ - TInt CommitTransaction(); - - /** - * Rollback changes in repository - * - * @since S60 v3.2 - */ - void RollbackTransaction(); + /** + * Commits changes in repository + * + * @since S60 v3.2 + */ + TInt CommitTransaction(); + + /** + * Rollback changes in repository + * + * @since S60 v3.2 + */ + void RollbackTransaction(); - /** - * Stores new service provider settings entry - * - * @since S60 v3.2 - * @param aEntry New service provider settings entry, on return service Id is filled in - */ - void AddEntryL( CSPEntry& aEntry ); + /** + * Stores new service provider settings entry + * + * @since S60 v3.2 + * @param aEntry New service provider settings entry, on return service Id is filled in + */ + void AddEntryL( CSPEntry& aEntry ); - /** - * Search service provider settings entry by service ID. - * - * @since S60 v3.2 - * @param aServiceId Id of requested xSP settings entry - * @param aEntry on return, SP settings entry corresponding to aServiceId. - * @return error code, KErrNone if succeeded, otherwise system wide error code - */ - TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry ); + /** + * Search service provider settings entry by service ID. + * + * @since S60 v3.2 + * @param aServiceId Id of requested xSP settings entry + * @param aEntry on return, SP settings entry corresponding to aServiceId. + * @return error code, KErrNone if succeeded, otherwise system wide error code + */ + TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry ); - /** - * Updates service provider settings entry to settings storage. - * - * @since S60 v3.2 - * @param aEntry Updated service provider settings entry - * @return error code, KErrNone if update succeeded, otherwise system wide error code - */ - TInt UpdateEntryL( const CSPEntry& aEntry ); + /** + * Updates service provider settings entry to settings storage. + * + * @since S60 v3.2 + * @param aEntry Updated service provider settings entry + * @return error code, KErrNone if update succeeded, otherwise system wide error code + */ + TInt UpdateEntryL( const CSPEntry& aEntry ); - /** - * Deletes service provider settings entry from storage by service ID. - * - * @since S60 v3.2 - * @param aEntryId Id of settings entry which is going to be deleted - * @return error code, KErrNone if delete succeeded, otherwise system wide error code - */ - TInt DeleteEntryL( TServiceId aServiceId ); + /** + * Deletes service provider settings entry from storage by service ID. + * + * @since S60 v3.2 + * @param aEntryId Id of settings entry which is going to be deleted + * @return error code, KErrNone if delete succeeded, otherwise system wide error code + */ + TInt DeleteEntryL( TServiceId aServiceId ); - /** - * Search property of service provider settings entry from storage. - * - * @since S60 v3.2 - * @param aServiceId The service ID of requested service entry - * @param aPropertyName property name to be found - * @param aProperty on return, requested property - * @return error code, KErrNone if succeeded, otherwise system wide error code - */ - TInt FindPropertyL( TServiceId aServiceId, - TServicePropertyName aPropertyName, - CSPProperty& aProperty ); + /** + * Search property of service provider settings entry from storage. + * + * @since S60 v3.2 + * @param aServiceId The service ID of requested service entry + * @param aPropertyName property name to be found + * @param aProperty on return, requested property + * @return error code, KErrNone if succeeded, otherwise system wide error code + */ + TInt FindPropertyL( TServiceId aServiceId, + TServicePropertyName aPropertyName, + CSPProperty& aProperty ); - /** - * Add or update properties of service provider settings entry to storage. - * If property name exists, update property. If property doesn't exist, - * - * @since S60 v3.2 - * @param aServiceId The ID of updated service entry - * @param aPropertyArray new properties to be added or updated - * @return error code, KErrNone if update succeeded, otherwise system wide error code - */ - TInt AddOrUpdatePropertiesL( TServiceId aServiceId, const RPropertyArray& aPropertyArray ); + /** + * Add or update properties of service provider settings entry to storage. + * If property name exists, update property. If property doesn't exist, + * + * @since S60 v3.2 + * @param aServiceId The ID of updated service entry + * @param aPropertyArray new properties to be added or updated + * @return error code, KErrNone if update succeeded, otherwise system wide error code + */ + TInt AddOrUpdatePropertiesL( TServiceId aServiceId, const RPropertyArray& aPropertyArray ); - /** - * Return count of service provider settings entries in storage. - * - * @since S60 v3.2 - * @return Count of stored service provider settings. - */ - TInt SettingsCountL(); + /** + * Return count of service provider settings entries in storage. + * + * @since S60 v3.2 + * @return Count of stored service provider settings. + */ + TInt SettingsCountL(); - /** - * Search all service provider IDs from storage - * - * @since S60 v3.2 - * @param aServiceIds An array containing returned service IDs - * @return error code - */ - TInt FindServiceIdsL( RIdArray& aServiceIds ); + /** + * Search all service provider IDs from storage + * + * @since S60 v3.2 + * @param aServiceIds An array containing returned service IDs + * @return error code + */ + TInt FindServiceIdsL( RIdArray& aServiceIds ); - /** - * Search all service names from settings storage by given service IDs. - * Removes service ID from given array if corresponding service name - * is not found. - * - * @since S60 v3.2 - * @param aServiceIds An array of service IDs - * @param aServiceNames on return, array which saves found service names - */ - void FindServiceNamesL( RIdArray& aServiceIds, CDesCArray& aServiceNames ); + /** + * Search all service names from settings storage by given service IDs. + * Removes service ID from given array if corresponding service name + * is not found. + * + * @since S60 v3.2 + * @param aServiceIds An array of service IDs + * @param aServiceNames on return, array which saves found service names + */ + void FindServiceNamesL( RIdArray& aServiceIds, CDesCArray& aServiceNames ); - /** - * Search subservice properties of requested service provider settings entry by ID. - * - * @since S60 v3.2 - * @param aServiceId The ID of requested service entry - * @param aPropertyType property type of sub service - * @param aPropertyArray on return, array which saves found subservice properties - * @return error code - */ - TInt FindSubServicePropertiesL( TServiceId aServiceId, - TSPItemType aPropertyType, - RPropertyArray& aPropertyArray ); + /** + * Search subservice properties of requested service provider settings entry by ID. + * + * @since S60 v3.2 + * @param aServiceId The ID of requested service entry + * @param aPropertyType property type of sub service + * @param aPropertyArray on return, array which saves found subservice properties + * @return error code + */ + TInt FindSubServicePropertiesL( TServiceId aServiceId, + TSPItemType aPropertyType, + RPropertyArray& aPropertyArray ); - /** - * Deletes service properties by service ID and property name. - * - * @since S60 v3.2 - * @param aServiceId The service ID of requested service entry - * @param aNameArray name of properties to be deleted - * @return error code - */ - TInt DeleteServicePropertiesL( TServiceId aServiceId, - const RPropertyNameArray& aNameArray ); - - /** - * Find service IDs with same properties - * - * @since S60 v3.2 - * @param aPropertyArray property array - * @param on return, service Ids with same properties - * @return error code - */ - void FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray, RIdArray& aServiceIds ); - - /** - * Check feature is supported or not - * - * @since S60 v3.2 - * @return SIP VoIP software version - */ - TBool IsFeatureSupportedL( TSPServiceFeature aFeature, - TBool aWriteAllowed ); - - - /** - * When service table is changed, update the P&S key - * - * @since S60 v3.2 - */ - void UpdateSupportFeaturePSKeyL(); + /** + * Deletes service properties by service ID and property name. + * + * @since S60 v3.2 + * @param aServiceId The service ID of requested service entry + * @param aNameArray name of properties to be deleted + * @return error code + */ + TInt DeleteServicePropertiesL( TServiceId aServiceId, + const RPropertyNameArray& aNameArray ); + + /** + * Find service IDs with same properties + * + * @since S60 v3.2 + * @param aPropertyArray property array + * @param on return, service Ids with same properties + * @return error code + */ + void FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray, RIdArray& aServiceIds ); + + /** + * Check feature is supported or not + * + * @since S60 v3.2 + * @return SIP VoIP software version + */ + TBool IsFeatureSupportedL( TSPServiceFeature aFeature, + TBool aWriteAllowed ); + + + /** + * When service table is changed, update the P&S key + * + * @since S60 v3.2 + */ + void UpdateSupportFeaturePSKeyL(); - /** - * Check if it is VoIP Service ID - * - * @since S60 v3.2.3 - * @return ETrue if yes - */ - TBool IsVoIPServiceL( TServiceId aServiceId ); + /** + * Check if it is VoIP Service ID + * + * @since S60 v3.2.3 + * @return ETrue if yes + */ + TBool IsVoIPServiceL( TServiceId aServiceId ); - /** - * Get Name array from Property array - * - * @since S60 v3.2.3 - */ - void NameArrayFromPropertyArrayL( RPropertyNameArray& aNameArray, const RPropertyArray& aPropertyArray ); + /** + * Get Name array from Property array + * + * @since S60 v3.2.3 + */ + void NameArrayFromPropertyArrayL( RPropertyNameArray& aNameArray, const RPropertyArray& aPropertyArray ); - /** - * Check if an array has call related property name in it - * - * @since S60 v3.2.3 - * @return ETrue if yes - */ - TBool HasCallPropertyName( const RPropertyNameArray& aNameArray ); - - /** - * Check if an array has VoIP or Vmbx related property name in it - * - * @since S60 v3.2.3 - * @return ETrue if yes - */ - TBool HasVoIPAndVmbxPropertyName( const RPropertyNameArray& aNameArray ); - - private: + /** + * Check if an array has call related property name in it + * + * @since S60 v3.2.3 + * @return ETrue if yes + */ + TBool HasCallPropertyName( const RPropertyNameArray& aNameArray ); + + /** + * Check if an array has VoIP or Vmbx related property name in it + * + * @since S60 v3.2.3 + * @return ETrue if yes + */ + TBool HasVoIPAndVmbxPropertyName( const RPropertyNameArray& aNameArray ); + + private: - /** - * C++ default constructor. - */ - CSPSettingsEngine(); + /** + * C++ default constructor. + */ + CSPSettingsEngine(); - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); - /** - * Walk through all the sevices and check there is any service match - * - * @since S60 v3.2 - * @param aMask attribute mask - * @param aValue value to be checked - */ - TBool CheckFeatureL( TInt aMask, TInt aValue ); - + /** + * Walk through all the sevices and check there is any service match + * + * @since S60 v3.2 + * @param aMask attribute mask + * @param aValue value to be checked + */ + TBool CheckFeatureL( TInt aMask, TInt aValue ); + void ConvertSpEntryToCenRepArrayL( const CSPEntry& aEntry, RIpAppPropArray& aArray ); @@ -283,9 +283,9 @@ RPropertyNameArray& aNameArray ); static void CleanupPointerArray( TAny* aPointer ); - - - private: // data + + + private: // data CCenRepDatabaseUtil* iCenRepUtils; }; diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/src/spentry.cpp --- a/convergedcallengine/spsettings/src/spentry.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/src/spentry.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -233,7 +233,7 @@ // --------------------------------------------------------------------------- // EXPORT_C TInt CSPEntry::GetProperty( const CSPProperty*& aProperty, - TServicePropertyName aPropertyName ) const + TServicePropertyName aPropertyName ) const { TInt index = SearchProperty( aPropertyName ); @@ -254,7 +254,7 @@ // --------------------------------------------------------------------------- // EXPORT_C TInt CSPEntry::GetProperty( const CSPProperty*& aProperty, - TInt aIndex ) const + TInt aIndex ) const { if ( iPropertyArray.Count() > aIndex && 0 <= aIndex ) { @@ -347,9 +347,9 @@ // --------------------------------------------------------------------------- // EXPORT_C void CSPEntry::Reset() - { - iServiceId = KSPNoId; - iServiceName.Close(); - iPropertyArray.ResetAndDestroy(); - } + { + iServiceId = KSPNoId; + iServiceName.Close(); + iPropertyArray.ResetAndDestroy(); + } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/src/spnotifychange.cpp --- a/convergedcallengine/spsettings/src/spnotifychange.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/src/spnotifychange.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -81,7 +81,7 @@ XSPSLOGSTRING( "CSPNotifyChange::~CSPNotifyChange() - IN" ); delete iData; Cancel(); - iIdArray.Reset(); + iIdArray.Reset(); iIdArray.Close(); iProperty.Close(); @@ -138,7 +138,7 @@ array.Close(); - XSPSLOGSTRING( "CSPNotifyChange::RunL() - OUT" ); + XSPSLOGSTRING( "CSPNotifyChange::RunL() - OUT" ); } // --------------------------------------------------------------------------- @@ -146,52 +146,52 @@ // --------------------------------------------------------------------------- // TInt CSPNotifyChange::RunError( TInt aError ) - { - XSPSLOGSTRING( "CSPNotifyChange::RunError() - IN" ); - - iObserver.HandleError( aError ); + { + XSPSLOGSTRING( "CSPNotifyChange::RunError() - IN" ); + + iObserver.HandleError( aError ); - Subscribe(); - - XSPSLOGSTRING( "CSPNotifyChange::RunError() - OUT" ); + Subscribe(); - return KErrNone; - } - + XSPSLOGSTRING( "CSPNotifyChange::RunError() - OUT" ); + + return KErrNone; + } + // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void CSPNotifyChange::NotifyChangeL( const RIdArray& aIdArray ) - { - XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeL() - IN" ); - - iIdArray.Reset(); - - TInt count = aIdArray.Count(); - - for( TInt i = 0; i < count; i++) - { - User::LeaveIfError( iIdArray.Append( aIdArray[i] ) ); - } - - Subscribe(); - - XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeL() - OUT" ); - } + { + XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeL() - IN" ); + + iIdArray.Reset(); + + TInt count = aIdArray.Count(); + + for( TInt i = 0; i < count; i++) + { + User::LeaveIfError( iIdArray.Append( aIdArray[i] ) ); + } + + Subscribe(); + + XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeL() - OUT" ); + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // EXPORT_C void CSPNotifyChange::NotifyChangeCancel() - { - XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeCancel() - IN" ); - - Cancel(); - - XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeCancel() - OUT" ); - } + { + XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeCancel() - IN" ); + + Cancel(); + + XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeCancel() - OUT" ); + } // --------------------------------------------------------------------------- // diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/src/spproperty.cpp --- a/convergedcallengine/spsettings/src/spproperty.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/src/spproperty.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -166,21 +166,21 @@ TInt value; TInt err = convert.Val( value ); if( err == KErrNone ) - { - if( value != EOONotSet && value != EOff && value != EOn ) - { - return KErrOverflow; - } - else - { - aValue = static_cast( value ); - return KErrNone; - } - } + { + if( value != EOONotSet && value != EOff && value != EOn ) + { + return KErrOverflow; + } + else + { + aValue = static_cast( value ); + return KErrNone; + } + } else - { - return err; - } + { + return err; + } } @@ -253,15 +253,15 @@ EXPORT_C void CSPProperty::CopyL( const CSPProperty& aSource ) { if( this != &aSource ) - { - User::LeaveIfError( SetName( aSource.GetName() ) ); - SetDataType( aSource.GetDataType() ); - SetPropertyType( aSource.GetPropertyType() ); + { + User::LeaveIfError( SetName( aSource.GetName() ) ); + SetDataType( aSource.GetDataType() ); + SetPropertyType( aSource.GetPropertyType() ); - iPropertyValue.Close(); - User::LeaveIfError( iPropertyValue.Create( KSPMaxDesLength ) ); - User::LeaveIfError( aSource.GetValue( iPropertyValue ) ); - } + iPropertyValue.Close(); + User::LeaveIfError( iPropertyValue.Create( KSPMaxDesLength ) ); + User::LeaveIfError( aSource.GetValue( iPropertyValue ) ); + } } @@ -317,38 +317,38 @@ EXPORT_C TSPItemType CSPProperty::PropertyType( TServicePropertyName aProperty ) { if ( ( aProperty >= ESubPropertyVoIPSettingsId && aProperty <= ESubPropertyVoIPTemporaryIAPId ) || - ( aProperty >= ESubPropertyVoIPRelNumber && aProperty <= ESubPropertyVoIPAddrScheme ) || - ( aProperty >= ESubPropertyVoIPEnabled && aProperty <= ESubPropertyVoIPEnabled ) ) + ( aProperty >= ESubPropertyVoIPRelNumber && aProperty <= ESubPropertyVoIPAddrScheme ) || + ( aProperty >= ESubPropertyVoIPEnabled && aProperty <= ESubPropertyVoIPEnabled ) ) { return EItemTypeVoIPSubProperty; } else if ( ( aProperty >= ESubPropertyPresenceSettingsId && aProperty <= ESubPropertyPresenceLaunchUid ) || - ( aProperty >= ESubPropertyPresenceAddrScheme && aProperty <= ESubPropertyPresenceAddrScheme ) || - ( aProperty >= ESubPropertyPresenceEnabled && aProperty <= ESubPropertyPresenceRequestPreference ) ) + ( aProperty >= ESubPropertyPresenceAddrScheme && aProperty <= ESubPropertyPresenceAddrScheme ) || + ( aProperty >= ESubPropertyPresenceEnabled && aProperty <= ESubPropertyPresenceRequestPreference ) ) { return EItemTypePresenceSubProperty; } else if ( ( aProperty >= ESubPropertyIMSettingsId && aProperty <= ESubPropertyIMLaunchUid ) || - ( aProperty >= ESubPropertyIMAddrScheme && aProperty <= ESubPropertyIMAddrScheme ) || - ( aProperty >= ESubPropertyIMEnabled && aProperty <= ESubPropertyIMEnabled ) ) + ( aProperty >= ESubPropertyIMAddrScheme && aProperty <= ESubPropertyIMAddrScheme ) || + ( aProperty >= ESubPropertyIMEnabled && aProperty <= ESubPropertyIMEnabled ) ) { return EItemTypeIMSubProperty; } else if ( ( aProperty >= ESubPropertyVMBXSettingsId && aProperty <= ESubPropertyVMBXLaunchUid ) || - ( aProperty >= ESubPropertyVMBXListenAddress && aProperty <= ESubPropertyVMBXAddrScheme ) || - ( aProperty >= ESubPropertyVMBXListenRegister && aProperty <= ESubPropertyVMBXEnabled ) ) + ( aProperty >= ESubPropertyVMBXListenAddress && aProperty <= ESubPropertyVMBXAddrScheme ) || + ( aProperty >= ESubPropertyVMBXListenRegister && aProperty <= ESubPropertyVMBXEnabled ) ) { return EItemTypeVMBXSubProperty; } else if( ( aProperty >= EPropertyServiceAttributeMask && aProperty <= EPropertyRingtoneTimeout ) || - ( aProperty >= EPropertyBrandId && aProperty <= EPropertyIncomingEmailserver ) ) + ( aProperty >= EPropertyBrandId && aProperty <= EPropertyIncomingEmailserver ) ) { return EItemTypeProperty; } else - { - return EItemTypeNotDefined; - } + { + return EItemTypeNotDefined; + } } @@ -363,17 +363,17 @@ RBuf tmp; TInt err = tmp.Create( KSPMaxDesLength ); if( err != KErrNone ) - { - return EFalse; - } + { + return EFalse; + } err = aProperty.GetValue( tmp ); if( err != KErrNone ) - { - return EFalse; - } + { + return EFalse; + } result = ( iPropertyType == aProperty.GetPropertyType() && - iPropertyName == aProperty.GetName() && + iPropertyName == aProperty.GetName() && iDataType == aProperty.GetDataType() && 0 == iPropertyValue.Compare( tmp ) ); tmp.Close(); @@ -387,19 +387,19 @@ // --------------------------------------------------------------------------- // EXPORT_C TSPItemType CSPProperty::GetPropertyType() const - { - return iPropertyType; - } + { + return iPropertyType; + } // --------------------------------------------------------------------------- // Set default value for property // --------------------------------------------------------------------------- // TInt CSPProperty::SetPropertyType( TSPItemType aPropertyType ) - { - iPropertyType = aPropertyType; - - return KErrNone; - } - + { + iPropertyType = aPropertyType; + + return KErrNone; + } + diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/src/spsbufferedpublisher.cpp --- a/convergedcallengine/spsettings/src/spsbufferedpublisher.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/src/spsbufferedpublisher.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -142,7 +142,7 @@ } // Start reading - while( lastModified != iIndex ) + while( lastModified != iIndex ) { iIndex++; @@ -151,7 +151,8 @@ // Skip index if real index is same as KRealGlobalIndex iIndex++; } - aData.AppendL( At(data, iIndex) ); + + aData.Append( At(data, iIndex) ); } } diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/src/spsettingsengine.cpp --- a/convergedcallengine/spsettings/src/spsettingsengine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/src/spsettingsengine.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include "spsettingsengine.h" @@ -192,10 +192,10 @@ } void CSPSettingsEngine::CleanupPointerArray( TAny* aPointer ) - { - RIpAppPropArray* array = static_cast( aPointer ); - array->ResetAndDestroy(); - } + { + RIpAppPropArray* array = static_cast( aPointer ); + array->ResetAndDestroy(); + } // --------------------------------------------------------------------------- // Stores new service provider settings entry @@ -207,14 +207,14 @@ // check the service name is not empty if( aEntry.GetServiceName().Length() == 0 ) - { - User::LeaveIfError( KErrArgument ); - } + { + User::LeaveIfError( KErrArgument ); + } // construct RIpAppPropArray RIpAppPropArray array; - TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); - CleanupStack::PushL( cleanup ); + TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); + CleanupStack::PushL( cleanup ); ConvertSpEntryToCenRepArrayL( aEntry, array ); @@ -237,8 +237,8 @@ XSPSLOGSTRING2( "CSPSettingsEngine::FindEntryL( %d ) - IN", aServiceId ); RIpAppPropArray array; - TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); - CleanupStack::PushL( cleanup ); + TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); + CleanupStack::PushL( cleanup ); TInt err = iCenRepUtils->FindEntryL( aServiceId, array ); @@ -292,21 +292,21 @@ // construct RIpAppPropArray RIpAppPropArray array; - TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); - CleanupStack::PushL( cleanup ); + TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); + CleanupStack::PushL( cleanup ); ConvertSpEntryToCenRepArrayL( aEntry, array ); TInt err = iCenRepUtils->UpdateEntryL( (TInt) serviceId, array ); CleanupStack::PopAndDestroy( &array ); - + XSPSLOGSTRING( "CSPSettingsEngine::UpdateEntry() - OUT" ); return err; } - + // --------------------------------------------------------------------------- // Deletes service provider settings entry by service ID // --------------------------------------------------------------------------- @@ -328,8 +328,8 @@ // --------------------------------------------------------------------------- // TInt CSPSettingsEngine::FindPropertyL( TServiceId aServiceId, - TServicePropertyName aPropertyName, - CSPProperty& aProperty ) + TServicePropertyName aPropertyName, + CSPProperty& aProperty ) { XSPSLOGSTRING2( "CSPSettingsEngine::FindPropertyL(%d) - IN", aServiceId ); @@ -355,14 +355,14 @@ // --------------------------------------------------------------------------- // TInt CSPSettingsEngine::AddOrUpdatePropertiesL( TServiceId aServiceId, - const RPropertyArray& aPropertyArray ) + const RPropertyArray& aPropertyArray ) { XSPSLOGSTRING2( "CSPSettingsEngine::AddOrUpdatePropertiesL(%d) - IN", aServiceId ); // construct RIpAppPropArray RIpAppPropArray array; - TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); - CleanupStack::PushL( cleanup ); + TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); + CleanupStack::PushL( cleanup ); ConvertSpArrayToCenRepArrayL( aPropertyArray, array ); @@ -543,7 +543,7 @@ // --------------------------------------------------------------------------- // TInt CSPSettingsEngine::FindSubServicePropertiesL( TServiceId aServiceId, - TSPItemType aPropertyType, + TSPItemType aPropertyType, RPropertyArray& aPropertyArray ) { XSPSLOGSTRING2( @@ -586,7 +586,7 @@ // --------------------------------------------------------------------------- // TInt CSPSettingsEngine::DeleteServicePropertiesL( TServiceId aServiceId, - const RPropertyNameArray& aNameArray ) + const RPropertyNameArray& aNameArray ) { XSPSLOGSTRING2( "CSPSettingsEngine::FindSubServicePropertyL( %d ) - IN", aServiceId ); @@ -616,16 +616,16 @@ // --------------------------------------------------------------------------- // void CSPSettingsEngine::FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray, - RIdArray& aServiceIds ) - { - XSPSLOGSTRING( "CSPSettingsEngine::FindServiceIdsFromPropertiesL() - IN" ); - + RIdArray& aServiceIds ) + { + XSPSLOGSTRING( "CSPSettingsEngine::FindServiceIdsFromPropertiesL() - IN" ); + RArray entryIds; CleanupClosePushL( entryIds ); RIpAppPropArray array; - TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); - CleanupStack::PushL( cleanup ); + TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array ); + CleanupStack::PushL( cleanup ); // todo custom cleanup stack ConvertSpArrayToCenRepArrayL( aPropertyArray, array ); @@ -647,8 +647,8 @@ CleanupStack::PopAndDestroy( &array ); CleanupStack::PopAndDestroy( &entryIds ); - XSPSLOGSTRING( "CSPSettingsEngine::FindServiceIdsFromPropertiesL() - OUT" ); - } + XSPSLOGSTRING( "CSPSettingsEngine::FindServiceIdsFromPropertiesL() - OUT" ); + } @@ -658,214 +658,214 @@ // TBool CSPSettingsEngine::IsFeatureSupportedL( TSPServiceFeature aFeature, TBool aWriteAllowed ) - { + { XSPSLOGSTRING( "CSPSettingsEngine::IsFeatureSupportedL() - IN" ); TBool ret = EFalse; - // First check P&S key, if P&S key is defined, use the value from P&S key. - // if not defined, then walk through all the sevices and check there is any service match - TInt mask = 0; - TInt value = 0; - TInt psFlag = 0; - TInt retProperty = 0; - + // First check P&S key, if P&S key is defined, use the value from P&S key. + // if not defined, then walk through all the sevices and check there is any service match + TInt mask = 0; + TInt value = 0; + TInt psFlag = 0; + TInt retProperty = 0; + switch( aFeature ) - { - case ESupportInternetCallFeature: - { - retProperty = RProperty::Get( KUidSystemCategory, KSPSupportInternetCallKey, psFlag ); - if( retProperty == KErrNone && psFlag != KSPInitFeatureValue ) - { - ret = psFlag; - } - else - { - mask = ESupportsInternetCall | ESupportsAlphanumericAddressing | EIsVisibleInCallMenu; - value = mask; - ret = CheckFeatureL( mask, value ); - if ( aWriteAllowed ) - { - User::LeaveIfError( RProperty::Set( KUidSystemCategory, - KSPSupportInternetCallKey, ret ) ); - } - } - - break; - } - case ESupportCallOutFeature: - { - retProperty = RProperty::Get( KUidSystemCategory, KSPSupportCallOutKey, psFlag ); - if( retProperty == KErrNone && psFlag != KSPInitFeatureValue ) - { - ret = psFlag; - } - else - { - mask = ESupportsInternetCall | ESupportsMSISDNAddressing | EIsVisibleInCallMenu; - value = mask; - ret = CheckFeatureL( mask, value ); - if ( aWriteAllowed ) - { - User::LeaveIfError( RProperty::Set( - KUidSystemCategory, - KSPSupportCallOutKey, ret ) ); - } - } - break; - } - - case ESupportVoIPSSFeature: - { - retProperty = RProperty::Get( KUidSystemCategory, KSPSupportVoIPSSKey, psFlag ); - if( retProperty == KErrNone && psFlag != KSPInitFeatureValue ) - { - ret = psFlag; - } - else - { - mask = ESupportVoIPSS; - value = mask; - ret = CheckFeatureL( mask, value ); - if ( aWriteAllowed ) - { - User::LeaveIfError( RProperty::Set( - KUidSystemCategory, - KSPSupportVoIPSSKey, ret ) ); - } - } - break; - } - - case ESupportVoIPFeature: - { - TBool bFeatureMgr = EFalse; - TBool bDynVoIP = EFalse; - TBool bSubVoIP = EFalse; - - //check FeatureManager - FeatureManager::InitializeLibL(); - bFeatureMgr = FeatureManager::FeatureSupported( KFeatureIdCommonVoip ); - FeatureManager::UnInitializeLib(); - - //check dynamic voip flag - CRepository* repository = CRepository::NewLC( KCRUidTelephonySettings ); - TInt value = 0; - TInt err = repository->Get( KDynamicVoIP, value ); - if( value != 0 ) - { - bDynVoIP = ETrue; - } - - CleanupStack::PopAndDestroy( repository ); - - //check subservice voip - RIdArray serviceIds; - CleanupClosePushL( serviceIds ); - FindServiceIdsL( serviceIds ); - CSPProperty* property = CSPProperty::NewLC(); - - for( TInt i = 0; i < serviceIds.Count(); i++ ) - { - TServiceId serviceId = serviceIds[i]; - TInt retProperty = FindPropertyL( serviceId, EPropertyVoIPSubServicePluginId, *property ); - if( retProperty == KErrNone ) - { - bSubVoIP = ETrue; - break; - } - } - CleanupStack::PopAndDestroy( property ); - CleanupStack::PopAndDestroy( &serviceIds ); - - ret = bFeatureMgr && bDynVoIP && bSubVoIP; - - break; - } - default: - { - User::Leave( KErrNotSupported ); - } - } + { + case ESupportInternetCallFeature: + { + retProperty = RProperty::Get( KUidSystemCategory, KSPSupportInternetCallKey, psFlag ); + if( retProperty == KErrNone && psFlag != KSPInitFeatureValue ) + { + ret = psFlag; + } + else + { + mask = ESupportsInternetCall | ESupportsAlphanumericAddressing | EIsVisibleInCallMenu; + value = mask; + ret = CheckFeatureL( mask, value ); + if ( aWriteAllowed ) + { + User::LeaveIfError( RProperty::Set( KUidSystemCategory, + KSPSupportInternetCallKey, ret ) ); + } + } + + break; + } + case ESupportCallOutFeature: + { + retProperty = RProperty::Get( KUidSystemCategory, KSPSupportCallOutKey, psFlag ); + if( retProperty == KErrNone && psFlag != KSPInitFeatureValue ) + { + ret = psFlag; + } + else + { + mask = ESupportsInternetCall | ESupportsMSISDNAddressing | EIsVisibleInCallMenu; + value = mask; + ret = CheckFeatureL( mask, value ); + if ( aWriteAllowed ) + { + User::LeaveIfError( RProperty::Set( + KUidSystemCategory, + KSPSupportCallOutKey, ret ) ); + } + } + break; + } + + case ESupportVoIPSSFeature: + { + retProperty = RProperty::Get( KUidSystemCategory, KSPSupportVoIPSSKey, psFlag ); + if( retProperty == KErrNone && psFlag != KSPInitFeatureValue ) + { + ret = psFlag; + } + else + { + mask = ESupportVoIPSS; + value = mask; + ret = CheckFeatureL( mask, value ); + if ( aWriteAllowed ) + { + User::LeaveIfError( RProperty::Set( + KUidSystemCategory, + KSPSupportVoIPSSKey, ret ) ); + } + } + break; + } + + case ESupportVoIPFeature: + { + TBool bFeatureMgr = EFalse; + TBool bDynVoIP = EFalse; + TBool bSubVoIP = EFalse; + + //check FeatureManager + FeatureManager::InitializeLibL(); + bFeatureMgr = FeatureManager::FeatureSupported( KFeatureIdCommonVoip ); + FeatureManager::UnInitializeLib(); + + //check dynamic voip flag + CRepository* repository = CRepository::NewLC( KCRUidTelephonySettings ); + TInt value = 0; + TInt err = repository->Get( KDynamicVoIP, value ); + if( value != 0 ) + { + bDynVoIP = ETrue; + } + + CleanupStack::PopAndDestroy( repository ); + + //check subservice voip + RIdArray serviceIds; + CleanupClosePushL( serviceIds ); + FindServiceIdsL( serviceIds ); + CSPProperty* property = CSPProperty::NewLC(); + + for( TInt i = 0; i < serviceIds.Count(); i++ ) + { + TServiceId serviceId = serviceIds[i]; + TInt retProperty = FindPropertyL( serviceId, EPropertyVoIPSubServicePluginId, *property ); + if( retProperty == KErrNone ) + { + bSubVoIP = ETrue; + break; + } + } + CleanupStack::PopAndDestroy( property ); + CleanupStack::PopAndDestroy( &serviceIds ); + + ret = bFeatureMgr && bDynVoIP && bSubVoIP; + + break; + } + default: + { + User::Leave( KErrNotSupported ); + } + } XSPSLOGSTRING( "CSPSettingsEngine::IsFeatureSupportedL() - OUT" ); return ret; - } + } // --------------------------------------------------------------------------- // When service table is changed, update the P&S key // --------------------------------------------------------------------------- // void CSPSettingsEngine::UpdateSupportFeaturePSKeyL() - { - TInt mask = 0; - TInt value = 0; - TBool ret = EFalse; - - //ESupportInternetCallFeature - //ESupportsInternetCall + ESupportsAlphanumericAddressing + EIsVisibleInCallMenu - mask = ESupportsInternetCall | ESupportsAlphanumericAddressing | EIsVisibleInCallMenu; - value = mask; - ret = CheckFeatureL( mask, value ); - User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportInternetCallKey, ret ) ); - - //ESupportCallOutFeature - //ESupportsInternetCall + ESupportsMSISDNAddressing + EIsVisibleInCallMenu - mask = ESupportsInternetCall | ESupportsMSISDNAddressing | EIsVisibleInCallMenu; - value = mask; - ret = CheckFeatureL( mask, value ); - User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportCallOutKey, ret ) ); - - //ESupportVoIPSSFeature - //ESupportVoIPSS - mask = ESupportVoIPSS; - value = mask; - ret = CheckFeatureL( mask, value ); - User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportVoIPSSKey, ret ) ); - } + { + TInt mask = 0; + TInt value = 0; + TBool ret = EFalse; + + //ESupportInternetCallFeature + //ESupportsInternetCall + ESupportsAlphanumericAddressing + EIsVisibleInCallMenu + mask = ESupportsInternetCall | ESupportsAlphanumericAddressing | EIsVisibleInCallMenu; + value = mask; + ret = CheckFeatureL( mask, value ); + User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportInternetCallKey, ret ) ); + + //ESupportCallOutFeature + //ESupportsInternetCall + ESupportsMSISDNAddressing + EIsVisibleInCallMenu + mask = ESupportsInternetCall | ESupportsMSISDNAddressing | EIsVisibleInCallMenu; + value = mask; + ret = CheckFeatureL( mask, value ); + User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportCallOutKey, ret ) ); + + //ESupportVoIPSSFeature + //ESupportVoIPSS + mask = ESupportVoIPSS; + value = mask; + ret = CheckFeatureL( mask, value ); + User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportVoIPSSKey, ret ) ); + } // --------------------------------------------------------------------------- // Walk through all the sevices and check there is any service match // --------------------------------------------------------------------------- // TBool CSPSettingsEngine::CheckFeatureL( TInt aMask, TInt aValue ) - { - RArray entryIds; - CleanupClosePushL( entryIds ); - iCenRepUtils->FindEntryIdsL( entryIds ); - CCenRepDatabaseProperty* property = CCenRepDatabaseProperty::NewLC(); - TBool ret = EFalse; - - for( TInt i = 0; i < entryIds.Count(); i++ ) - { - TInt entryId = entryIds[i]; - if( entryId == KSPDefaultVoIPServiceId ) - { - continue; - } - - TInt retProperty = iCenRepUtils->FindPropertyL( entryId, EPropertyServiceAttributeMask, *property ); - if( retProperty == KErrNone ) - { - TInt maskValue = 0; - TInt err = property->GetValue( maskValue ); - if( err == KErrNone ) - { - if( ( maskValue & aMask ) == (aValue & aMask) ) - { - // Find matched servcie - ret = ETrue; - break; - } - } - } - } - - CleanupStack::PopAndDestroy( property ); - CleanupStack::PopAndDestroy( &entryIds ); - return ret; - } + { + RArray entryIds; + CleanupClosePushL( entryIds ); + iCenRepUtils->FindEntryIdsL( entryIds ); + CCenRepDatabaseProperty* property = CCenRepDatabaseProperty::NewLC(); + TBool ret = EFalse; + + for( TInt i = 0; i < entryIds.Count(); i++ ) + { + TInt entryId = entryIds[i]; + if( entryId == KSPDefaultVoIPServiceId ) + { + continue; + } + + TInt retProperty = iCenRepUtils->FindPropertyL( entryId, EPropertyServiceAttributeMask, *property ); + if( retProperty == KErrNone ) + { + TInt maskValue = 0; + TInt err = property->GetValue( maskValue ); + if( err == KErrNone ) + { + if( ( maskValue & aMask ) == (aValue & aMask) ) + { + // Find matched servcie + ret = ETrue; + break; + } + } + } + } + + CleanupStack::PopAndDestroy( property ); + CleanupStack::PopAndDestroy( &entryIds ); + return ret; + } // --------------------------------------------------------------------------- // Check if it is VoIP Service ID @@ -960,7 +960,7 @@ // --------------------------------------------------------------------------- // void CSPSettingsEngine::NameArrayFromPropertyArrayL( RPropertyNameArray& aNameArray, - const RPropertyArray& aPropertyArray ) + const RPropertyArray& aPropertyArray ) { aNameArray.Reset(); diff -r 7d48bed6ce0c -r 987c9837762f convergedcallengine/spsettings/src/spsettingsvoiputils.cpp --- a/convergedcallengine/spsettings/src/spsettingsvoiputils.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/convergedcallengine/spsettings/src/spsettingsvoiputils.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -26,7 +26,7 @@ #include #include -#include +#include #include "spsapilogger.h" // For logging @@ -124,8 +124,8 @@ } err = iSettingsEngine->FindPropertyL( id, - EPropertyVoIPSubServicePluginId, - *property ); + EPropertyVoIPSubServicePluginId, + *property ); profileExists = ( KErrNone == err ? ETrue : EFalse ); } diff -r 7d48bed6ce0c -r 987c9837762f engines/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,22 @@ +/* +* 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: Build file for engines. +* +*/ + + +#include "../vmbxengine/group/bld.inf" + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/EABI/VMBXU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/EABI/VMBXU.DEF Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,48 @@ +EXPORTS + _ZN11RVmbxNumber11IsSimMemoryEv @ 1 NONAME + _ZN11RVmbxNumber11SelectTypeLEi @ 2 NONAME + _ZN11RVmbxNumber12QueryNumberLE14TVmbxQueryTypeR6TDes16i @ 3 NONAME + _ZN11RVmbxNumber13GetVmbxNumberER6TDes1616TVmbxNumberEntry @ 4 NONAME + _ZN11RVmbxNumber13QueryAddressLE14TVmbxQueryTypeR6TDes16 @ 5 NONAME + _ZN11RVmbxNumber14SaveVmbxNumberERK7TDesC1616TVmbxNumberEntry @ 6 NONAME + _ZN11RVmbxNumber15GetVmbxAddressLER6TDes16 @ 7 NONAME + _ZN11RVmbxNumber16SaveVmbxAddressLER6TDes16 @ 8 NONAME + _ZN11RVmbxNumber17GetVideoMbxNumberER6TDes1616TVmbxNumberEntry @ 9 NONAME + _ZN11RVmbxNumber18SaveVideoMbxNumberERK7TDesC1616TVmbxNumberEntry @ 10 NONAME + _ZN11RVmbxNumber19IsVoIPProfilesFoundEv @ 11 NONAME + _ZN11RVmbxNumber20NotifyAlsLineChangeLEP16MVmbxAlsObserver @ 12 NONAME + _ZN11RVmbxNumber20QueryVideoMbxNumberLE14TVmbxQueryTypeR6TDes16 @ 13 NONAME + _ZN11RVmbxNumber23NotifyVmbxNumberChangeLEP18MVmbxNotifyHandleri @ 14 NONAME + _ZN11RVmbxNumber24AllowedToChangeTheNumberEv @ 15 NONAME + _ZN11RVmbxNumber25NotifyAlsLineChangeCancelEv @ 16 NONAME + _ZN11RVmbxNumber28NotifyVmbxNumberChangeCancelEv @ 17 NONAME + _ZN11RVmbxNumber4OpenER12RMobilePhone @ 18 NONAME + _ZN11RVmbxNumber4OpenEv @ 19 NONAME + _ZN11RVmbxNumber5CloseEv @ 20 NONAME + _ZN11RVmbxNumberC1Ev @ 21 NONAME + _ZN11RVmbxNumberC2Ev @ 22 NONAME + _ZN11RVmbxNumberD0Ev @ 23 NONAME + _ZN11RVmbxNumberD1Ev @ 24 NONAME + _ZN11RVmbxNumberD2Ev @ 25 NONAME + _ZNK11RVmbxNumber10GetAlsLineERi @ 26 NONAME + _ZTI11RVmbxNumber @ 27 NONAME ; ## + _ZTI17CVMSimQueryDilaog @ 28 NONAME ; ## + _ZTI18CVmTextQueryDialog @ 29 NONAME ; ## + _ZTV11RVmbxNumber @ 30 NONAME ; ## + _ZTV17CVMSimQueryDilaog @ 31 NONAME ; ## + _ZTV18CVmTextQueryDialog @ 32 NONAME ; ## + _ZThn8_N11RVmbxNumberD0Ev @ 33 NONAME ; ## + _ZThn8_N11RVmbxNumberD1Ev @ 34 NONAME ; ## + _ZN11RVmbxNumber13GetServiceIdsER6RArrayIjE @ 35 NONAME + _ZN11RVmbxNumber14GetServiceInfoER16TVmbxServiceInfo @ 36 NONAME + _ZN11RVmbxNumber11SelectTypeLEiRj @ 37 NONAME + _ZN11RVmbxNumber14GetVmbxAddressER6TDes16j @ 38 NONAME + _ZN11RVmbxNumber15GetBrandedIconLERK6TDesC8RP10CFbsBitmapS5_ @ 39 NONAME + _ZN11RVmbxNumber19NotifyServiceChangeEP21MServiceNotifyHandler @ 40 NONAME + _ZN11RVmbxNumber22ConstructDefaultIconsLEP9CArrayPtrI8CGulIconE @ 41 NONAME + _ZN11RVmbxNumber24IsIpVoiceMailboxServicesEv @ 42 NONAME + _ZN11RVmbxNumber25NotifyServiceChangeCancelEv @ 43 NONAME + _ZN11RVmbxNumber8BrandIdLEiR5TDes8 @ 44 NONAME + _ZTI18CVmListQueryDialog @ 45 NONAME ; ## + _ZTV18CVmListQueryDialog @ 46 NONAME ; ## + diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/bwins/VMBXU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/bwins/VMBXU.DEF Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,35 @@ +EXPORTS + ??0RVmbxNumber@@QAE@XZ @ 1 NONAME ; RVmbxNumber::RVmbxNumber(void) + ??1RVmbxNumber@@UAE@XZ @ 2 NONAME ; RVmbxNumber::~RVmbxNumber(void) + ?AllowedToChangeTheNumber@RVmbxNumber@@QAEHXZ @ 3 NONAME ; int RVmbxNumber::AllowedToChangeTheNumber(void) + ?Close@RVmbxNumber@@QAEXXZ @ 4 NONAME ; void RVmbxNumber::Close(void) + ?GetAlsLine@RVmbxNumber@@QBEHAAH@Z @ 5 NONAME ; int RVmbxNumber::GetAlsLine(int &) const + ?GetVideoMbxNumber@RVmbxNumber@@QAEHAAVTDes16@@W4TVmbxNumberEntry@@@Z @ 6 NONAME ; int RVmbxNumber::GetVideoMbxNumber(class TDes16 &, enum TVmbxNumberEntry) + ?GetVmbxAddressL@RVmbxNumber@@QAEHAAVTDes16@@@Z @ 7 NONAME ; int RVmbxNumber::GetVmbxAddressL(class TDes16 &) + ?GetVmbxNumber@RVmbxNumber@@QAEHAAVTDes16@@W4TVmbxNumberEntry@@@Z @ 8 NONAME ; int RVmbxNumber::GetVmbxNumber(class TDes16 &, enum TVmbxNumberEntry) + ?IsSimMemory@RVmbxNumber@@QAEHXZ @ 9 NONAME ; int RVmbxNumber::IsSimMemory(void) + ?IsVoIPProfilesFound@RVmbxNumber@@QAEHXZ @ 10 NONAME ; int RVmbxNumber::IsVoIPProfilesFound(void) + ?NotifyAlsLineChangeCancel@RVmbxNumber@@QAEXXZ @ 11 NONAME ; void RVmbxNumber::NotifyAlsLineChangeCancel(void) + ?NotifyAlsLineChangeL@RVmbxNumber@@QAEXPAVMVmbxAlsObserver@@@Z @ 12 NONAME ; void RVmbxNumber::NotifyAlsLineChangeL(class MVmbxAlsObserver *) + ?NotifyVmbxNumberChangeCancel@RVmbxNumber@@QAEXXZ @ 13 NONAME ; void RVmbxNumber::NotifyVmbxNumberChangeCancel(void) + ?NotifyVmbxNumberChangeL@RVmbxNumber@@QAEXPAVMVmbxNotifyHandler@@H@Z @ 14 NONAME ; void RVmbxNumber::NotifyVmbxNumberChangeL(class MVmbxNotifyHandler *, int) + ?Open@RVmbxNumber@@QAEHAAVRMobilePhone@@@Z @ 15 NONAME ; int RVmbxNumber::Open(class RMobilePhone &) + ?Open@RVmbxNumber@@QAEHXZ @ 16 NONAME ; int RVmbxNumber::Open(void) + ?QueryAddressL@RVmbxNumber@@QAEHW4TVmbxQueryType@@AAVTDes16@@@Z @ 17 NONAME ; int RVmbxNumber::QueryAddressL(enum TVmbxQueryType, class TDes16 &) + ?QueryNumberL@RVmbxNumber@@QAEHW4TVmbxQueryType@@AAVTDes16@@H@Z @ 18 NONAME ; int RVmbxNumber::QueryNumberL(enum TVmbxQueryType, class TDes16 &, int) + ?QueryVideoMbxNumberL@RVmbxNumber@@QAEHW4TVmbxQueryType@@AAVTDes16@@@Z @ 19 NONAME ; int RVmbxNumber::QueryVideoMbxNumberL(enum TVmbxQueryType, class TDes16 &) + ?SaveVideoMbxNumber@RVmbxNumber@@QAEHABVTDesC16@@W4TVmbxNumberEntry@@@Z @ 20 NONAME ; int RVmbxNumber::SaveVideoMbxNumber(class TDesC16 const &, enum TVmbxNumberEntry) + ?SaveVmbxAddressL@RVmbxNumber@@QAEHAAVTDes16@@@Z @ 21 NONAME ; int RVmbxNumber::SaveVmbxAddressL(class TDes16 &) + ?SaveVmbxNumber@RVmbxNumber@@QAEHABVTDesC16@@W4TVmbxNumberEntry@@@Z @ 22 NONAME ; int RVmbxNumber::SaveVmbxNumber(class TDesC16 const &, enum TVmbxNumberEntry) + ?SelectTypeL@RVmbxNumber@@QAEHH@Z @ 23 NONAME ; int RVmbxNumber::SelectTypeL(int) + ?NotifyServiceChangeCancel@RVmbxNumber@@QAEXXZ @ 24 NONAME ; void RVmbxNumber::NotifyServiceChangeCancel(void) + ?SelectTypeL@RVmbxNumber@@QAEHHAAI@Z @ 25 NONAME ; int RVmbxNumber::SelectTypeL(int, unsigned int &) + ?BrandIdL@RVmbxNumber@@QAEXHAAVTDes8@@@Z @ 26 NONAME ; void RVmbxNumber::BrandIdL(int, class TDes8 &) + ?ConstructDefaultIconsL@RVmbxNumber@@QAEXPAV?$CArrayPtr@VCGulIcon@@@@@Z @ 27 NONAME ; void RVmbxNumber::ConstructDefaultIconsL(class CArrayPtr *) + ?IsIpVoiceMailboxServices@RVmbxNumber@@QAEHXZ @ 28 NONAME ; int RVmbxNumber::IsIpVoiceMailboxServices(void) + ?NotifyServiceChange@RVmbxNumber@@QAEXPAVMServiceNotifyHandler@@@Z @ 29 NONAME ; void RVmbxNumber::NotifyServiceChange(class MServiceNotifyHandler *) + ?GetBrandedIconL@RVmbxNumber@@QAEXABVTDesC8@@AAPAVCFbsBitmap@@1@Z @ 30 NONAME ; void RVmbxNumber::GetBrandedIconL(class TDesC8 const &, class CFbsBitmap * &, class CFbsBitmap * &) + ?GetServiceInfo@RVmbxNumber@@QAEHAAVTVmbxServiceInfo@@@Z @ 31 NONAME ; int RVmbxNumber::GetServiceInfo(class TVmbxServiceInfo &) + ?GetVmbxAddress@RVmbxNumber@@QAEHAAVTDes16@@I@Z @ 32 NONAME ; int RVmbxNumber::GetVmbxAddress(class TDes16 &, unsigned int) + ?GetServiceIds@RVmbxNumber@@QAEHAAV?$RArray@I@@@Z @ 33 NONAME ; int RVmbxNumber::GetServiceIds(class RArray &) + diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/conf/101F874F.txt Binary file engines/vmbxengine/conf/101F874F.txt has changed diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/conf/voicemailbox.confml Binary file engines/vmbxengine/conf/voicemailbox.confml has changed diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/conf/voicemailbox_101F874F.crml Binary file engines/vmbxengine/conf/voicemailbox_101F874F.crml has changed diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/group/backup_registration.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/group/backup_registration.xml Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,5 @@ + + + + + diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,55 @@ +/* +* 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: Build information file for project vmbxengine. +* +*/ + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +//Backup registartion file +backup_registration.xml /epoc32/data/z/private/100058F5/backup_registration.xml +backup_registration.xml /epoc32/release/winscw/udeb/z/private/100058F5/backup_registration.xml +backup_registration.xml /epoc32/release/winscw/urel/z/private/100058F5/backup_registration.xml + +// sis export +vmbx_stub.sis /epoc32/data/z/system/install/vmbx_stub.sis + +// iby export +../rom/vmbxengine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxengine.iby) +../rom/vmbxengineresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(vmbxengineresources.iby) + +// loc export +../loc/vmbx.loc MW_LAYER_LOC_EXPORT_PATH(vmbx.loc) + +// Generic configuration interface for component cenrep settings +../conf/voicemailbox.confml MW_LAYER_CONFML(voicemailbox.confml) +../conf/voicemailbox_101F874F.crml MW_LAYER_CRML(voicemailbox_101F874F.crml) + +PRJ_EXTENSIONS +START EXTENSION s60/mifconv + option TARGETFILE vm.mif + option HEADERFILE vm.mbg + option SOURCES -c8,8 qgn_menu_smsvo_cxt -c8,8 qgn_prop_nrtyp_sim_contact -c8,8 qgn_prop_empty -c8,8 qgn_prop_nrtyp_mobile -c8,8 qgn_prop_nrtyp_video -c8,8 qgn_prop_nrtyp_voip +END + +PRJ_MMPFILES +vmbxengine.mmp + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/group/vmbx.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/group/vmbx.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,30 @@ +; +; 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: For packing vmbx. +; +; Languages +&EN + +; Header +#{"vmbx"},(0x1000590f),1,1,0,TYPE=PU + +;Localised Vendor name +%{"Nokia"} + +; Unique Vendor name +:"Nokia" + +;Files +"\epoc32\RELEASE\armv5\UREL\vmbx.dll"-"c:\sys\bin\vmbx.dll" +"\epoc32\data\z\resource\apps\vmbx.rsc"-"c:\resource\vmbx.rsc" diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/group/vmbx.sis Binary file engines/vmbxengine/group/vmbx.sis has changed diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/group/vmbx_stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/group/vmbx_stub.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,30 @@ +; +; 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: For packing vmbx stub. +; +; Languages +&EN + +; Header +#{"vmbx"},(0x1000590f),1,0,0,TYPE=SA + +;Localised Vendor name +%{"Nokia"} + +; Unique Vendor name +:"Nokia" + +;Files +""-"z:\sys\bin\vmbx.dll" +""-"z:\resource\vmbx.rsc" diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/group/vmbx_stub.sis Binary file engines/vmbxengine/group/vmbx_stub.sis has changed diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/group/vmbxengine.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/group/vmbxengine.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,83 @@ +/* +* 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: This is a project specification file for the +* voice mailbox number interface. +* +*/ + +#include +#include + +TARGET vmbx.dll +TARGETTYPE dll +UID 0x1000008d 0x1000590F + +//We use default capabilities (from defaultcaps.hrh) +CAPABILITY CAP_GENERAL_DLL + +EPOCSTACKSIZE 0x5000 + +LANG SC + +SOURCEPATH ../src + +SOURCE vmnumber.cpp +SOURCE vmdialog.cpp +SOURCE vmspshandler.cpp +SOURCE vmlist.cpp +SOURCE vmbshandler.cpp +SOURCE vmsettingsuiiconfileprovider.cpp + +START RESOURCE vmbx.rss +TARGETPATH RESOURCE_FILES_DIR +HEADER +LANGUAGE_IDS +END //RESOURCE + +USERINCLUDE ../inc +SYSTEMINCLUDE ../../../inc + +// TEMPORARY DEFINITION FOR CONTACT FINDER HEADERS +SYSTEMINCLUDE ../../../../../app/phone/inc + +APP_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib +LIBRARY cone.lib +LIBRARY CommonEngine.lib +LIBRARY etel.lib +LIBRARY etelmm.lib +LIBRARY avkon.lib +LIBRARY aknicon.lib +LIBRARY egul.lib +LIBRARY bsclient.lib +LIBRARY aknskins.lib +LIBRARY bafl.lib +LIBRARY eikdlg.lib +LIBRARY eikcoctl.lib +LIBRARY eikcore.lib +LIBRARY sssettings.lib +LIBRARY phonecntfinder.lib // Phonebook Single Fetch View +LIBRARY phoneclient.lib // emergency call +LIBRARY charconv.lib // CnvUtfConverter +LIBRARY featmgr.lib +LIBRARY efsrv.lib + +LIBRARY satclient.lib +LIBRARY centralrepository.lib +LIBRARY cenrepnotifhandler.lib +LIBRARY flogger.lib +LIBRARY serviceprovidersettings.lib + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/inc/vmblogger.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/inc/vmblogger.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,118 @@ +/* +* Copyright (c) 2002 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: Provides macros for logging +* +*/ + + +#ifndef __VMBLOGGER_H__ +#define __VMBLOGGER_H__ + +// INCLUDES +#include + +/* +----------------------------------------------------------------------------- + + USER LOG SELECTION + +----------------------------------------------------------------------------- +*/ + + +#ifndef _DEBUG + +/*************************** +* Logging method variants: +* 0 = No logging +* 1 = Flogger +* 2 = RDebug +***************************/ + +#define VMB_LOGGING_METHOD 0 // UREL BUILD + +#else + +#ifdef __WINS__ +#define VMB_LOGGING_METHOD 1 // UDEB BUILD, WINS +#else +#define VMB_LOGGING_METHOD 1 // UDEB BUILD, HW +#endif // __WINS__ + +#endif // _DEBUG + + +// Next is for backward compatibility +#if VMB_LOGGING_METHOD > 0 + #define VMB_LOGGING_ENABLED +#endif //VMB_LOGGING_METHOD + + +/** +* +* FLOGGER SETTINGS +* +*/ +#if VMB_LOGGING_METHOD == 1 // Flogger + + #include + + _LIT(KVMBLogFolder, "vmbx"); + _LIT(KVMBLogFile, "vmbxengine.txt"); + +#elif VMB_LOGGING_METHOD == 2 // RDebug + + #include + +#endif //VMB_LOGGING_METHOD + + +/** +* +* LOGGING MACROs +* +* USE THESE MACROS IN YOUR CODE ! +* +*/ + +#if VMB_LOGGING_METHOD == 1 // Flogger + +#define VMBLOGTEXT(AAA) /*lint -save -e960 */ { RFileLogger::Write(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,AAA); } /*lint -restore */ +#define VMBLOGSTRING(AAA) /*lint -save -e960 */ { _LIT(tempLogDes,AAA); RFileLogger::Write(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,tempLogDes()); } /*lint -restore */ +#define VMBLOGSTRING2(AAA,BBB) /*lint -save -e960 -e437 */ { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,TRefByValue(tempLogDes()),BBB); } /*lint -restore */ +#define VMBLOGSTRING3(AAA,BBB,CCC) /*lint -save -e960 */ { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,TRefByValue(tempLogDes()),BBB,CCC); } /*lint -restore */ + +#elif VMB_LOGGING_METHOD == 2 // RDebug + +#define VMBLOGTEXT(AAA) RDebug::Print(AAA); +#define VMBLOGSTRING(AAA) RDebug::Print(_L(AAA)); +#define VMBLOGSTRING2(AAA,BBB) RDebug::Print(_L(AAA),BBB); +#define VMBLOGSTRING3(AAA,BBB,CCC) RDebug::Print(_L(AAA),BBB,CCC); + +#else // VMB_LOGGING_METHOD == 0 or invalid + +// Example: VMBLOGTEXT(own_desc); +#define VMBLOGTEXT(AAA) +// Example: VMBLOGSTRING("Test"); +#define VMBLOGSTRING(AAA) +// Example: VMBLOGSTRING("Test %i", aValue); +#define VMBLOGSTRING2(AAA,BBB) +// Example: VMBLOGSTRING("Test %i %i", aValue1, aValue2); +#define VMBLOGSTRING3(AAA,BBB,CCC) + +#endif // VMB_LOGGING_METHOD + +#endif // VMBLOGGER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/inc/vmbshandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/inc/vmbshandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,96 @@ +/* +* Copyright (c) 2007 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: Branding for voice mailbox + * +*/ + +#ifndef C_VMBSHANDLER_H +#define C_VMBSHANDLER_H + +// INCLUDES +#include +#include + +// CONSTANTS +// None + +// MACROS +// None + +// DATA TYPES +// None + +// FUNCTION PROTOTYPES +// None + +// FORWARD DECLARATIONS + + +// CLASS DECLARATION + +/** + * CVmBSHandler declaration. + * + * @since S60 3.2 + */ +NONSHARABLE_CLASS( CVmBSHandler ) : public CBase + { + +public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CVmBSHandler* NewL(); + + /** + * Two-phased constructor. + */ + static CVmBSHandler* NewLC(); + + /** + * Destructor. + */ + virtual ~CVmBSHandler(); + +public: // New functions + + /** + * Get branded icon + * @since S60 3.2 + * @param aBrandingId Brandind Id + * @param aBrandedBitmap Bitmap for branded icon + * @param aBrandedBitmapMask Mask to branded icon + */ + void GetBrandedIconL( const TDesC8& aBrandingId, + CFbsBitmap*& aBrandedBitmap, + CFbsBitmap*& aBrandedBitmapMask ) const; + +private: + + /** + * C++ default constructor. + */ + CVmBSHandler(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + }; + +#endif // C_VMBSHANDLER_H + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/inc/vmdialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/inc/vmdialog.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,160 @@ +/* +* Copyright (c) 2002 - 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: A text query where empty query can be approved. +* +*/ + + +#ifndef VMDIALOG_H +#define VMDIALOG_H + +// INCLUDES +#include + +// CLASS DECLARATION + +/** +* Text query dialog +* +* @lib vmbx.lib +* @since +*/ +class CVmTextQueryDialog : public CAknTextQueryDialog + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CVmTextQueryDialog* NewL( TDes& aDataText, const TDesC& aPrompt, + const TBool aSearchEnabled ); + + /** + * Destructor. + */ + virtual ~CVmTextQueryDialog(); + + public:// Functions from base classes + + /** + * From CCoeControl Key event handler + * @since + * @param aKeyEvent The key event + * @param aType The type of key event + * @return Response of the key event handling + */ + TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode aType ); + + public:// New method + + /** + * Dissmiss the dialog with EAknSoftkeyCancel + * @since 5.0 + */ + void DismissQueryDlg(); + + protected: // Functions from base classes + + /** + * From CEikdialog This function is called by the EIKON dialog framework + * just before the dialog is activated, after it has called + * PreLayoutDynInitL() and the dialog has been sized. + * Overridden method to enable accepting an empty query + * @since + */ + void PreLayoutDynInitL(); + + /** + * From MAknQueryControlObserver Gets called when editor sends + * state event. Overridden method to enable accepting an empty query + * @since + * @param aQueryControl Pointer to query control which sent the event + * @param aEventType Type of the event + * @param aStatus Editor validation status + * @return ETrue if success + */ + TBool HandleQueryEditorStateEventL( CAknQueryControl* aQueryControl, + TQueryControlEvent aEventType, + TQueryValidationStatus aStatus ); + + private: + + /** + * C++ default constructor. + */ + CVmTextQueryDialog( TDes& aDataText, const TBool aSearchEnabled ); + + private: // Data + + // Flag to allow search + TBool iSearchEnabled; + }; + + + +// CLASS DECLARATION + +/** +* Query dialog for sim +* added to fix JKAN-6KU5C2 +* +* @lib vmbx.lib +* @since +**/ +class CVMSimQueryDilaog:public CAknQueryDialog + { + + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CVMSimQueryDilaog* NewL(); + + /** + * Destructor. + */ + virtual ~CVMSimQueryDilaog(); + + public: // New functions + + /** + * Sets query caption on the screen asking for confirmation to copy voice + * mailbox number from sim. + * + * @since 3.0 + * @param aPrompt query heading to display on dialog. + **/ + void SetVMSimPromptL( const TDesC& aPrompt ); + + /** + * Destroys the query dialog. + * + * @since 3.0 + **/ + void VMSimDismissDialogL(); + + private: + + /** + * C++ default constructor. + */ + CVMSimQueryDilaog(); + + }; + +#endif // VMDIALOG_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/inc/vmlist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/inc/vmlist.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,58 @@ +/* +* Copyright (c) 2006 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: A list query where voice mail type can be selected. + * +*/ + + +#ifndef VMLIST_H +#define VMLIST_H + +// INCLUDES +#include + + +// CLASS DECLARATION + +/** +* ?one_line_short_description. +* ?other_description_lines +* +* @lib ?library +* @since ?Series60_version +*/ +class CVmListQueryDialog : public CAknListQueryDialog +{ + public: + static CVmListQueryDialog* NewL( TInt* aIndex ); + virtual ~CVmListQueryDialog(); + + public: + TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); + + + protected: + TBool OkToExitL(TInt aButtonId); + private: + CVmListQueryDialog( TInt* aIndex ); + + private: // Data + TBool iOkToExit; + +}; + + +#endif // VMLIST_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/inc/vmsettingsuiiconfileprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/inc/vmsettingsuiiconfileprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,79 @@ +/* +* Copyright (c) 2006-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 C_VMSETTINGSUIICONFILEPROVIDER +#define C_VMSETTINGSUIICONFILEPROVIDER + +#include +#include + +/** + * CVmSettingsUiIconFileProvider class + * Declarition of CVmSettingsUiIconFileProvider. + * + * @since S60 v3.2 + */ +NONSHARABLE_CLASS( CVmSettingsUiIconFileProvider ) : public CBase, + public MAknIconFileProvider + { + public: + + /** + * Two-phased constructor. + * @param aFile for handle to file + */ + static CVmSettingsUiIconFileProvider* NewL( RFile& aFile ); + + /** + * Destructor. + */ + virtual ~CVmSettingsUiIconFileProvider(); + + public: // from base class MAknIconFileProvider + + /** + * from MAknIconFileProvider. + */ + void RetrieveIconFileHandleL( RFile& aFile, const TIconFileType aType ); + + /** + * from MAknIconFileProvider. + */ + void Finished(); + + private: + + /** + * C++ default constructor. + */ + CVmSettingsUiIconFileProvider(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL( RFile& aFile ); + + private: // data + + // File handle. Own. + RFile iFile; + + }; + +#endif // C_VMSETTINGSUIICONFILEPROVIDER + +// End of File \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/inc/vmspshandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/inc/vmspshandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,219 @@ +/* +* Copyright (c) 2007-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: Service provider settings handler + * +*/ + +#ifndef C_VMSPSHANDLER_H +#define C_VMSPSHANDLER_H + +// INCLUDES +#include +#include +#include +#include + +// CONSTANTS +// None + +// MACROS +// None + +// DATA TYPES +// None + +// FUNCTION PROTOTYPES +// None + +// FORWARD DECLARATIONS +class CSPSettings; +class CSPNotifyChange; +class TVmbxServiceInfo; +class MServiceNotifyHandler; + +// CLASS DECLARATION + +/** + * CVmSPSHandler declaration. + * Service provider settings handler is used to access service and + * sub-service configuration data. + * + * @since S60 3.2 + */ +NONSHARABLE_CLASS( CVmSPSHandler ) : public CBase, + private MSPNotifyChangeObserver + { + +public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CVmSPSHandler* NewL(); + + /** + * Two-phased constructor. + */ + static CVmSPSHandler* NewLC(); + + /** + * Destructor. + */ + virtual ~CVmSPSHandler(); + +public: // New functions + + /** + * Get service ids + * @since S60 3.2 + * @param aServiceIds On completion contains service ids + */ + void GetServiceIdsL( RArray& aServiceIds ) const; + + /** + * Get service ids + * @since S60 3.2 + * @param aServiceInfo On completion contains service ids + */ + TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const; + + /** + * Get service's VMBX address + * @since S60 3.2 + * @param aServiceId Used Service + * @param aService On completion, contains service's address + */ + void GetVmAddressL( const TUint32 aServiceId, TDes& aAddress ) const; + + /** + * Get service's name + * @since S60 3.2 + * @param aServiceId Used Service + * @param aName On completion, contains service's name + */ + void GetServiceNameL( const TUint32 aServiceId, TDes& aName ) const; + + /** + * Get SNAP id + * @since S60 3.2 + * @param aServiceId Used Service + * @param aSNAPId On completion, contains SNAP Id + */ + void GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const; + + /** + * Get brand id + * @since S60 3.2 + * @param aServiceId Used Service + * @param aBrandId On completion, contains Brand Id + */ + void BrandIdL( TInt aServiceId, TDes8& aBrandId ); + + /** + * Check is given service already activated + * @since S60 3.2 + * @param aServiceId Used Service + * @return ETrue if Service is already activated + */ + TBool IsActivatedL( TInt aServiceId ); + + /** + * Issues a notify request on a Service profile change. + * @param aHandler user's notify handler + */ + void NotifyServiceChange( MServiceNotifyHandler* aHandler ); + + /** + * Cancels a notify request on a VoIP profile change. + */ + void NotifyServiceChangeCancel(); + + /** + * Check from SPSettings if there are VoIP profiles + * @since S60 3.2.3 + * @param None + * @return ETrue if VoIP profiles were found, otherwise EFalse + */ + TBool IsVoIPProfilesFound(); + +protected: + + /** + * Handle notify change event. + * From MSPNotifyChangeObserver; + * + * @since S60 3.2 + * @param aServiceId The service ID of changed service + */ + void HandleNotifyChange( TServiceId aServiceId ); + + /** + * Handle error + * + * @since S60 3.2 + */ + void HandleError( TInt aError ); + +private: + + /** + * Is VMBX supported + * @since S60 3.2 + * @param aServiceId Used Service + * @return ETrue if VMBX is supported + */ + TBool IsVbmxSupportedL( TUint32 aServiceId ) const; + + /** + * C++ default constructor. + */ + CVmSPSHandler(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + +private: // data + + /** + * CSPSettings. Own + */ + CSPSettings* iSettings; + + /** + * CSPSettingsVoIPUtils. Own + */ + CSPSettingsVoIPUtils* iSpsSettingsVoipUtils; + + /** + * Observer. Not own + */ + MServiceNotifyHandler* iObserver; + + /** + * Pointer to CSPNotifyChange + */ + CSPNotifyChange* iNotifier; + + /** + * Service id array + */ + RIdArray iServiceIds; + + }; + +#endif // C_VMSPSHANDLER_H + +// End of file diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/inc/voicemailboxprivatecrkeys.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/inc/voicemailboxprivatecrkeys.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,195 @@ +/* +* Copyright (c) 2002 - 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: Private keys for voice mailbox. +* +*/ + + +#ifndef VOICEMAILBOXPRIVATECRKEYS_H +#define VOICEMAILBOXPRIVATECRKEYS_H +#include + +/** VoiceMailbox Settings API */ +/** Provides access to the VoiceMailbox numbers and settings */ + +const TUid KCRUidVoiceMailbox = {0x101F874F}; + +/** Voice Mailbox number for primary line +* +* Integer type +* +* Default value: 0 +*/ +const TUint32 KVmbxNumberLineAuxiliary = 0x00000000; + +/** Voice Mailbox number for auxiliary line +* +* Integer type +* +* Default value: 0 +*/ +const TUint32 KVmbxNumberLinePrimary = 0x00000001; + +/** Voice Message Callback Number, a field in VMN for a direct callback Number +* +* Text type +* +* Default value: "" +**/ +const TUint32 KVmCallbackNumber = 0x00000002; + +/** +* Voicemail Summary Info Set flag, a field in VMN +* +* Integer type +* +* Possible values: +* 0 (not set) +* 1 (set) +* +* Default value: 0 +**/ +const TUint32 KVmSummaryInfoIsSet = 0x00000005; + +/** Local Variation key. Voice Mailbox Number default for CDMA operators. +* Default number can be Blank, MIN, MDN, and etc +* +* Integer type +* +* Possible values: +* 0 (EBlank) +* 1 (EDedicatedVMN) +* 2 (EMIN) +* 3 (EMDN) +* 4 (EOnePlusMIN) +* 5 (EOnePlusMDN) +* 6 (EMDNCustom) +* 7 (EOnePlusMDNCustom) +* +* Default value: 0 +**/ +const TUint32 KVmNumOpts = 0x00000009; + +/** + * Values for KVmNumOpts + */ +enum TVmNumOpts + { + // For GSM SIM- and CDMA RUIM-based voice mbox number. + EVmNumOptsBlank = 0, + EVmNumOptsDedicatedVMN, + EVmNumOptsMIN, + EVmNumOptsMDN, + EVmNumOptsOnePlusMIN, + EVmNumOptsOnePlusMDN, + EVmNumOptsMDNCustom, + EVmNumOptsOnePlusMDNCustom, + EVmNumOptsSharedData + }; + +/** Voice Message Option to configure UI related features. +* +* Integer type +* +* This is a bit flag pattern, whose value is specified by setting individual bits. +* For example if you want to set 3rd and 2nd bits: 0100b and 0010b ===> 0110b ==> +* 6 in decimal representation ==> use value 6. +* Possible values. +* Bit 1 = Set this bit to prevent user from defining or +* modifying the voice mailbox number, clear to allow. +* Rest of the bits are reserved for future use and currently not used. +* +* Default value: 2 +**/ +const TUint32 KVmUIOpts = 0x00000010; + +/** + * Values for KVmUIOpts + */ +enum TVmUiOpts + { + // Prevent all to change voice mail number + EUiNmbrChangeNotAllowed = 0x01 + }; + +/** Flag which decides where the vmbx number is to be stored. +* If this is Off (equals 0) the voice mailbox number is stored in SIM memory, +* else it is stored in Phone memory. +* +* Integer type +* +* Default value: 0 +*/ +const TUint32 KVmUsesSimMemory = 0x00000011; + +/** Video Mailbox number for primary line +* +* Text type +* +* Default value: "" +*/ +const TUint32 KVideoMbxNumberLinePrimary = 0x00000012; + +/** Video Mailbox number for auxiliary line +* +* Text type +* +* Default value: "" +*/ +const TUint32 KVideoMbxNumberLineAuxiliary = 0x00000013; + +/** Flag which decides if writing to sim allowed. +* If this is On (equals 1) writing to SIM is not allowed. +* Writing is allowed with value 0 +* Value +* Integer type +* +* Default value: 1 +*/ +const TUint32 KReadOnlySim = 0x00000016; + +/** Voice Mailbox number backup for primary line +* +* Integer type +* +* Default value: 0 +*/ +const TUint32 KVmbxTmpNumberLinePrimary = 0x000000017; +/** Voice Mailbox number for auxiliary line +* +* Integer type +* +* Default value: 0 +*/ +const TUint32 KVmbxTmpNumberLineAuxiliary = 0x000000018; + +/** Flag which indicates that user has edited primary number. +* If this is off (equals 0), number from SIM is used, +* when available. +* Integer type +* +* Default value: 0 +*/ +const TUint32 KUserEditedNumber = 0x00000019; + +/** Flag which indicates that user has edited auxiliary number. +* If this is off (equals 0), number from SIM is used, +* when available. +* Integer type +* +* Default value: 0 +*/ +const TUint32 KUserEditedNumberAuxiliary = 0x00000020; + +#endif // VOICEMAILBOXPRIVATECRKEYS_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/loc/vmbx.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/loc/vmbx.loc Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,163 @@ +/* +* Copyright (c) 2002-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: This file contains the localised strings for vmbx.dll +* +*/ + + +// LOCALISATION STRINGS + +// d: Prompt of the query for changing voice mailbox number. +// l: popup_query_data_window +// w: +// r:3.1 +// +#define qtn_smsvo_number_query "Define voice mailbox number:" + +// d: Note for invalid vmbx number. +// l: popup_note_window +// +#define qtn_smsvo_invalid_number "Invalid phone number." + +// d: Note for user entering empty value in vmbx number query. +// l: popup_note_window +// +#define qtn_smsvo_note_empty_number "Voice mailbox number not defined." + +// d: text for selecting mailbox query +// l: heading_pane_t1 +// w: +// r:3.0 +// +#define qtn_voip_call_to_voice_mailbox "Call to:" + +// d: text for selecting mailbox query +// l: heading_pane_t1 +// w: +// r:3.0 +// +#define qtn_voip_define_voice_mailbox "Define voice mailbox:" + +// d: text for selections in mailbox query +// d: voice mailbox +// l: list_single_pane_t1_cp2 +// w: +// r:3.0 +// +#define qtn_voip_cs_mailbox "Voice mailbox" + +// d: text for selections in mailbox query +// d: Internet call voice mailbox +// l: list_single_pane_t1_cp2 +// w: +// r:3.0 +// +#define qtn_voip_ps_mailbox "Internet call voice mailbox" + +// d: Note for displaying sim number for user. +// l: popup_note_window +// +#define qtn_smsvo_numb_from_sim_in_use "Voice mailbox number from SIM taken into use" + +// d: Note for successfully saved vmbx number to Sim card. +// l: popup_note_window +// +#define qtn_smsvo_saved_to_sim "Voice mailbox number saved to Sim card." + +// d: Note for successfully saved vmbx number to Phone memory. +// l: popup_note_window +// +#define qtn_smsvo_saved_to_phone "Voice mailbox number saved to Phone memory." + +// d: query asking user if he wants to take the sim number into use. +// l: popup_note_window + +#define qtn_smsvo_use_numb_from_sim "Voice mailbox number %U is saved to SIM. Do you want to take it into use?" + +//d: memory location heading for the vmbx number +//l: list_single_pane_t1_cp2 +// +#define qtn_smsvo_save_to "Save number to:" + +//d: memory location for the vmbx number +//l: list_single_pane_t1_cp2 +// +#define qtn_smsvo_sim_card "SIM card" + +//d: memory location for the vmbx number +//l: list_single_pane_t1_cp2 +// +#define qtn_smsvo_phone_memory "Phone Memory" + +// d: text for selecting mailbox query +// l: heading_pane_t1 +// w: +// r:3.1 +// +#define qtn_smsvi_define_vi_or_vo_mailbox "Define video or voice call mailbox:" + +// d: text for selections in mailbox query +// d: CS Video call mailbox +// l: list_single_pane_t1_cp2 +// w: +// r:3.1 +// +#define qtn_smsvi_video_mailbox "Video call mailbox" + +// d: text for selections in mailbox query when any mailbox is not defined +// d: CS voice call mailbox +// l: list_single_pane_t1_cp2 +// w: +// r:3.1 +// +#define qtn_voip_define_cs_mailbox "Voice mailbox" + +// d: text for selections in mailbox query when any mailbox is not defined +// d: CS Video call mailbox +// l: list_single_pane_t1_cp2 +// w: +// r:3.1 +// +#define qtn_smsvi_define_vt_mailbox "Video call mailbox" + +// d: Prompt of the query for changing video mailbox number. +// l: popup_query_data_window +// w: +// r:3.1 +// +#define qtn_smsvi_number_query "Define video call mailbox number:" + +// d: Note for succesfully saved video mailbox number. +// l: popup_note_window +// w: +// r:3.1 +// +#define qtn_smsvi_mailbox_saved "Video call mailbox saved." + +// d: Note for user when entering empty value in video mailbox number query. +// l: popup_note_window +// w: +// r:3.1 +// +#define qtn_smsvi_note_empty_number "No video call mailbox number defined." + +// d: Note for user when there is no voice mailbox number. +// l: popup_note_window +// w: +// r:5.2 +// +#define qtn_voice_no_vmbx_number "Voicemail number not provisioned" + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/rom/vmbxengine.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/rom/vmbxengine.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,28 @@ +/* +* 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: IBY file for Voice mailbox Engine + * +*/ + + +#ifndef __VMBXENGINE_IBY__ +#define __VMBXENGINE_IBY__ + +//vmbx.dll +file=ABI_DIR\BUILD_DIR\vmbx.dll SHARED_LIB_DIR\vmbx.dll + +// sis stub file +data=ZSYSTEM\install\vmbx_stub.sis System\Install\vmbx_stub.sis + +#endif // __VMBXENGINE_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/rom/vmbxengineresources.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/rom/vmbxengineresources.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,26 @@ +/* +* 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: IBY file for those parts of + * voice mailbox engine that needs localization + * +*/ + + +#ifndef __VMBXENGINERESOURCES_IBY__ +#define __VMBXENGINERESOURCES_IBY__ + +// wmbx.dll +data=DATAZ_\RESOURCE_FILES_DIR\VMBX.RSC RESOURCE_FILES_DIR\VMBX.RSC + +#endif // __VMBXENGINERESOURCES_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/src/vmbshandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/src/vmbshandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,184 @@ +/* +* Copyright (c) 2007 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: Implementation of CVmBSHandler class. + * +*/ + +// INCLUDE FILES +#include +#include +#include +#include +#include +#include +#include +#include + +#include "vmsettingsuiiconfileprovider.h" +#include "vmbshandler.h" +#include "vmblogger.h" + +// EXTERNAL DATA STRUCTURES +// None + +// EXTERNAL FUNCTION PROTOTYPES +// None + +// CONSTANTS +// Branding server & data constants. +const TInt KVmSettingsUiBrandingIconSize = 21; // icon size + +_LIT8( KVmSettingsUiBSApplicationId, "xsp" ); // application id +_LIT8( KVmSettingsUiBSIconId, "service_active_image_small" ); // icon id + +// MACROS +// None + +// LOCAL CONSTANTS AND MACROS +// None + +// MODULE DATA STRUCTURES +// None + +// LOCAL FUNCTION PROTOTYPES +// None + +// FORWARD DECLARATIONS +// None + +// ============================= LOCAL FUNCTIONS ============================= + +// ============================ MEMBER FUNCTIONS ============================= + +// --------------------------------------------------------------------------- +// CVmBSHandler::CVmBSHandler +// C++ default constructor can NOT contain any code, that might leave. +// --------------------------------------------------------------------------- +// +CVmBSHandler::CVmBSHandler() + { + // No implementation required + } + +// --------------------------------------------------------------------------- +// CVmBSHandler::ConstructL +// Symbian 2nd phase constructor can leave. +// --------------------------------------------------------------------------- +// +void CVmBSHandler::ConstructL() + { + } + +// --------------------------------------------------------------------------- +// CVmBSHandler::NewL +// Two-phased constructor. +// --------------------------------------------------------------------------- +// +CVmBSHandler* CVmBSHandler::NewL( ) + { + CVmBSHandler* self = CVmBSHandler::NewLC(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// CVmBSHandler::NewLC +// Two-phased constructor. +// --------------------------------------------------------------------------- +// +CVmBSHandler* CVmBSHandler::NewLC() + { + CVmBSHandler* self = new (ELeave) CVmBSHandler(); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// Destructor +CVmBSHandler::~CVmBSHandler() + { + } + +// --------------------------------------------------------------------------- +// CVmBSHandler::GetBrandedIconL +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVmBSHandler::GetBrandedIconL( + const TDesC8& aBrandingId, + CFbsBitmap*& aBrandedBitmap, + CFbsBitmap*& aBrandedBitmapMask ) const + { + VMBLOGSTRING( "VMBX: CVmBSHandler::CreateBrandedBitmapL: =>" ); + + // Create branding server factory and access to branding data. + CBSFactory* factory = CBSFactory::NewL( + aBrandingId, KVmSettingsUiBSApplicationId ); + CleanupStack::PushL( factory ); + + MBSAccess* access = factory->CreateAccessL( + aBrandingId, ELangInternationalEnglish ); + CleanupClosePushL( *access ); + + // Get structure which contains bitmap information. + MBSElement* element = access->GetStructureL( KVmSettingsUiBSIconId ); + CleanupClosePushL( *element ); + const CBSBitmap& bitmap = element->BitmapDataL(); + + // Open file which contains branded bitmaps. + RFile file; + CleanupClosePushL( file ); + access->GetFileL( bitmap.BitmapFileId(), file ); + + // Try to load a skinned bitmap. + if ( CCoeEnv::Static() ) + { + TAknsItemID itemId; + itemId.Set( bitmap.SkinIdMajor(), bitmap.SkinIdMinor() ); + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + TRAP_IGNORE( ( aBrandedBitmap = + AknsUtils::CreateBitmapL( skin, itemId ) ) ); + } + + // If skinned bitmaps was not found, try to load bitmaps manually. + if ( !aBrandedBitmap ) + { + CVmSettingsUiIconFileProvider* ifp = + CVmSettingsUiIconFileProvider::NewL( file ); + + AknIconUtils::CreateIconL( + aBrandedBitmap, + aBrandedBitmapMask, + *ifp, + bitmap.BitmapId(), + bitmap.BitmapMaskId() ); + } + + // Set sizes. + const TInt iconSize( KVmSettingsUiBrandingIconSize ); + AknIconUtils::SetSize( aBrandedBitmap, TSize( iconSize, iconSize ) ); + AknIconUtils::SetSize( aBrandedBitmapMask, TSize( iconSize, iconSize ) ); + + // Destroy some items. + CleanupStack::PopAndDestroy( &file ); + CleanupStack::PopAndDestroy( element ); + CleanupStack::PopAndDestroy( access ); + CleanupStack::PopAndDestroy( factory ); + + VMBLOGSTRING( "VMBX: CVmBSHandler::CreateBrandedBitmapL: <=" ); + } + +// ========================== OTHER EXPORTED FUNCTIONS ======================= + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/src/vmbx.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/src/vmbx.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,491 @@ +/* +* Copyright (c) 2002-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: This file contains all the resources for vmbx.dll. + * +*/ + + +// RESOURCE IDENTIFIER +NAME VMBX // 4 letter ID + +// INCLUDES +#include + +#include +#include +#include "eikon.rsg" +#include +#include +#include +#include +#include + +// RESOURCE DEFINITIONS + +// ----------------------------------------------------------------------------- +// +// RSS signature +// +// ----------------------------------------------------------------------------- +// +RESOURCE RSS_SIGNATURE {} + +// ----------------------------------------------------------------------------- +// +// A document name buffer. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF { buf=""; } + +// ----------------------------------------------------------------------------- +// +// r_define_number_prompt +// Prompt of the query for changing voice mailbox number. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_define_number_prompt + { + buf = qtn_smsvo_number_query; + } + +// ----------------------------------------------------------------------------- +// +// r_change_number_prompt +// Prompt of the query for changing voice mailbox number. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_change_number_prompt + { + buf = qtn_smsvo_number_query; + } + +// ----------------------------------------------------------------------------- +// +// r_vmbx_number_query +// Dialog for inserting/changing number +// +// ----------------------------------------------------------------------------- +// +RESOURCE DIALOG r_vmbx_number_query + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_DATA_QUERY + { + layout = EPhoneLayout; + control = EDWIN + { + flags = EEikEdwinNoHorizScrolling | + EEikEdwinResizable | + EEikEdwinAlternativeWrapping | + EEikEdwinAutoSelection; + width = 16; + lines = 1; + maxlength = 48; + default_input_mode = EAknEditorNumericInputMode; + allowed_input_modes = EAknEditorNumericInputMode; + numeric_keymap = EAknEditorStandardNumberModeKeymap; + special_character_table = 0; + }; + }; + } + }; + } + + +// ----------------------------------------------------------------------------- +// +// r_vmbx_softkeys_search_cancel_select +// for MSK CBA buttons +// +// ----------------------------------------------------------------------------- +// +RESOURCE CBA r_vmbx_softkeys_search_cancel_select + { + buttons = + { + CBA_BUTTON { id = EAknSoftkeySearch; txt = text_softkey_search; }, + CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; }, + CBA_BUTTON { id = EAknSoftkeySearch; txt = text_softkey_select; } + }; + } + +// ----------------------------------------------------------------------------- +// +// r_saved_note +// Note for succesfully saved vmbx number. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_saved_note + { + buf = qtn_smsvo_saved_note; + } + +// ----------------------------------------------------------------------------- +// +// r_note_empty_number +// Note for user entering empty value in vmbx number query. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_note_empty_number + { + buf = qtn_smsvo_note_empty_number; + } + +// ----------------------------------------------------------------------------- +// +// r_invalid_number_note +// Note for invalid vmbx number. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_invalid_number_note + { + buf = qtn_smsvo_invalid_number; + } + +// ----------------------------------------------------------------------------- +// +// r_sim_number_note +// Note for displaying sim number for user +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_sim_number_note + { + buf = qtn_smsvo_numb_from_sim_in_use; + } + +// ----------------------------------------------------------------------------- +// +// r_saved_note_sim_memory +// Note for successfully saved vmbx number to Sim card. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_saved_note_sim_memory + { + buf = qtn_smsvo_saved_to_sim; + } + +// ----------------------------------------------------------------------------- +// +// r_saved_note_phone_memory +// Note for successfully saved vmbx number to Phone memory. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_saved_note_phone_memory + { + buf = qtn_smsvo_saved_to_phone; + } + +// ----------------------------------------------------------------------------- +// +// r_saved_sim_number_into_use +// Query asking user if he wants to take the sim number into use. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_saved_sim_number_into_use + { + buf = qtn_smsvo_use_numb_from_sim; + } + + +// ----------------------------------------------------------------------------- +// +// r_vmbx_take_sim_number_into_use +// Dialog asking user if he wants to take the sim number into use. +// +// ----------------------------------------------------------------------------- +// +RESOURCE DIALOG r_vmbx_take_sim_number_into_use + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_YES_NO; + items= + { + DLG_LINE + { + type = EAknCtQuery; + itemflags = EEikDlgItemNonFocusing; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + label = ""; + }; + } + }; + } + + +// ----------------------------------------------------------------------------- +// +// r_vmbx_memory_list_query +// Query where to save number +// +// ----------------------------------------------------------------------------- +// +RESOURCE AVKON_LIST_QUERY r_vmbx_memory_list_query + { + //flags = EGeneralQueryFlags; + //softkeys = r_avkon_softkeys_ok_cancel; + items = + { + AVKON_LIST_QUERY_DLG_LINE + { + control = AVKON_LIST_QUERY_CONTROL + { + listtype = EAknCtSinglePopupMenuListBox; + listbox = AVKON_LIST_QUERY_LIST + { + array_id=r_vmbx_memory_save_number_to; + }; + heading = qtn_smsvo_save_to; + }; + } + }; + } + +// ----------------------------------------------------------------------------- +// +// r_vmbx_memory_save_number_to +// Options array for r_vmbx_memory_list_query +// +// ----------------------------------------------------------------------------- +// +RESOURCE ARRAY r_vmbx_memory_save_number_to + { + items= + { + LBUF {txt=qtn_smsvo_sim_card; } , + LBUF {txt=qtn_smsvo_phone_memory; } + }; + } + +// ----------------------------------------------------------------------------- +// +// r_video_saved_note +// Note for succesfully saved video mailbox number. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_video_saved_note + { + buf = qtn_smsvi_mailbox_saved; + } + +// ----------------------------------------------------------------------------- +// +// r_video_note_empty_number +// text for selections in mailbox query when any mailbox is not defined +// (Internet call voice mailbox) +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_video_note_empty_number + { + buf = qtn_smsvi_note_empty_number; + } + +// ----------------------------------------------------------------------------- +// +// r_video_define_number_prompt +// Prompt of the query for changing video mailbox number. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_video_define_number_prompt + { + buf = qtn_smsvi_number_query; + } + +// ----------------------------------------------------------------------------- +// +// r_video_change_number_prompt +// Prompt of the query for changing video mailbox number. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_video_change_number_prompt + { + buf = qtn_smsvi_number_query; + } + +// ----------------------------------------------------------------------------- +// +// r_callto_lbx_prompt +// text for selecting mailbox query +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_callto_lbx_prompt + { + buf = qtn_voip_call_to_voice_mailbox; + } + +// ----------------------------------------------------------------------------- +// +// r_callto_lbx_cs_mailbox_item +// text for selections in mailbox query +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_callto_lbx_cs_mailbox_item + { + buf = qtn_voip_cs_mailbox; + } + +// ----------------------------------------------------------------------------- +// +// r_callto_lbx_video_mailbox_item +// text for selections in mailbox query +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_callto_lbx_video_mailbox_item + { + buf = qtn_smsvi_video_mailbox; + } + + +// ----------------------------------------------------------------------------- +// +// r_define_voice_lbx_prompt +// text for selecting mailbox query +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_define_voice_lbx_prompt + { + buf = qtn_voip_define_voice_mailbox; + } + +// ----------------------------------------------------------------------------- +// +// r_define_video_or_voice_lbx_prompt +// text for selecting mailbox query +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_define_video_or_voice_lbx_prompt + { + buf = qtn_smsvi_define_vi_or_vo_mailbox; + } + +// ----------------------------------------------------------------------------- +// +// r_define_lbx_cs_mailbox_item +// text for selections in mailbox query when any mailbox is not defined +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_define_lbx_cs_mailbox_item + { + buf = qtn_voip_define_cs_mailbox; + } + +// ----------------------------------------------------------------------------- +// +// r_define_lbx_video_mailbox_item +// text for selections in mailbox query when any mailbox is not defined +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_define_lbx_video_mailbox_item + { + buf = qtn_smsvi_define_vt_mailbox; + } + +// ----------------------------------------------------------------------------- +// +// r_mailbox_listquery +// List query +// +// ----------------------------------------------------------------------------- +// +RESOURCE AVKON_LIST_QUERY r_mailbox_listquery + { + items = + { + AVKON_LIST_QUERY_DLG_LINE + { + control = AVKON_LIST_QUERY_CONTROL + { + listtype = EAknCtSinglePopupMenuListBox; + heading = qtn_voip_call_to_voice_mailbox; + listbox = AVKON_LIST_QUERY_LIST + { + }; + }; + } + }; + } + +// ----------------------------------------------------------------------------- +// +// r_voip_rel2_2_call_to +// Query for voice mailbox call, contains all configured vmbx services +// +// ----------------------------------------------------------------------------- +// +RESOURCE DIALOG r_voip_rel2_2_call_to + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtListQueryControl; + id = EListQueryControl; + control = AVKON_LIST_QUERY_CONTROL + { + listtype = EAknCtSingleGraphicPopupMenuListBox; + listbox = LISTBOX + { + //constructed dynamically + }; + heading = qtn_voip_call_to_voice_mailbox; + }; + } + }; + } + +// ----------------------------------------------------------------------------- +// +// r_voice_no_vmbx_number_note +// Notification about missing number +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_voice_no_vmbx_number_note + { + buf = qtn_voice_no_vmbx_number; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/src/vmdialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/src/vmdialog.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,248 @@ +/* +* Copyright (c) 2002 - 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: Implementation of CVmTextQueryDialog class. +* +*/ + + +// INCLUDE FILES +#include +#include +#include "vmdialog.h" +#include +#include "vmblogger.h" + + +// MEMBER FUNCTIONS + +// ----------------------------------------------------------------------------- +// CVmTextQueryDialog::CVmTextQueryDialog +// C++ default constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- +// +CVmTextQueryDialog::CVmTextQueryDialog( TDes& aDataText, + const TBool aSearchEnabled ) + : CAknTextQueryDialog( aDataText ), + iSearchEnabled( aSearchEnabled ) + { + // no tone as default + } + +// ----------------------------------------------------------------------------- +// CVmTextQueryDialog::~CVmTextQueryDialog +// Destructor +// ----------------------------------------------------------------------------- +// +CVmTextQueryDialog::~CVmTextQueryDialog() +{ + +} + +// ----------------------------------------------------------------------------- +// CVmTextQueryDialog::NewL +// Two-phased constructor +// ----------------------------------------------------------------------------- +// +CVmTextQueryDialog* CVmTextQueryDialog::NewL( TDes& aDataText, + const TDesC& aPrompt, + const TBool aSearchEnabled ) + { + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::NewL =>" ); + CVmTextQueryDialog* query = new( ELeave ) CVmTextQueryDialog( aDataText, + aSearchEnabled ); + CleanupStack::PushL( query ); + query->SetPromptL( aPrompt ); + CleanupStack::Pop( query ); + VMBLOGSTRING( "VMBX: CVmTextQueryDialog: <=:NewL " ); + return query; + } + +// ----------------------------------------------------------------------------- +// CVmTextQueryDialog::PreLayoutDynInitL +// Pre-layout dialog initialisation +// ----------------------------------------------------------------------------- +// +void CVmTextQueryDialog::PreLayoutDynInitL() + { + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL =>" ); + CAknTextQueryDialog::PreLayoutDynInitL(); + + // Change command buttons if needed + if ( iSearchEnabled && !QueryControl()->GetTextLength() ) + { + ButtonGroupContainer().SetCommandSetL( + R_VMBX_SOFTKEYS_SEARCH_CANCEL_SELECT ); + } + + MakeLeftSoftkeyVisible( ETrue ); + + // Set Pen support flags. + if ( FeatureManager::FeatureSupported( KFeatureIdPenSupport ) ) + { + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL Pen" ); + CAknQueryControl* control = QueryControl(); + if( control ) + { + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL ctr" ); + CCoeControl *controlByLayout = + control->ControlByLayoutOrNull( control->QueryType() ); + if ( controlByLayout ) + { + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL\ + edit" ); + CEikEdwin* numberEditor = + static_cast< CEikEdwin* > ( controlByLayout ); + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL\ + cast" ); + TInt flags = numberEditor->AknEdwinFlags() + | EAknEditorFlagDeliverVirtualKeyEventsToApplication; + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL\ + flag" ); + numberEditor->SetAknEditorFlags( flags ); + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL\ + set done" ); + } + } + } + + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL <=" ); + } + +// ----------------------------------------------------------------------------- +// CVmTextQueryDialog::HandleQueryEditorStateEventL +// Called when query editor event happens +// ----------------------------------------------------------------------------- +// +TBool CVmTextQueryDialog::HandleQueryEditorStateEventL( + CAknQueryControl* /*aQueryControl*/, + TQueryControlEvent /*aEventType*/, + TQueryValidationStatus /*aStatus*/ ) + { + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::HandleQueryEditorStateEventL =>" ); + MakeLeftSoftkeyVisible( ETrue ); + if ( iSearchEnabled ) + { + if ( !QueryControl()->GetTextLength() ) + { + ButtonGroupContainer().SetCommandSetL( + R_VMBX_SOFTKEYS_SEARCH_CANCEL_SELECT ); + } + else + { + ButtonGroupContainer().SetCommandSetL( + R_AVKON_SOFTKEYS_OK_CANCEL__OK ); + } + ButtonGroupContainer().DrawDeferred(); + } + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::HandleQueryEditorStateEventL <=" ); + return EFalse; + } + +// ----------------------------------------------------------------------------- +// CVmTextQueryDialog::OfferKeyEventL +// Handles key events +// ----------------------------------------------------------------------------- +// +TKeyResponse CVmTextQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::OfferKeyEventL =>" ); + TKeyResponse response = EKeyWasConsumed; + switch( aKeyEvent.iScanCode ) + { + case EStdKeyYes: + // Catch this key event. EStdKeyYes would leak to other controls. + break; + + default: + response = CAknTextQueryDialog::OfferKeyEventL( aKeyEvent, aType ); + break; + } + + VMBLOGSTRING( "VMBX: CVmTextQueryDialog::OfferKeyEventL <=" ); + return response; + } + +// ----------------------------------------------------------------------------- +// CVmTextQueryDialog::DissmissQueryDlg +// Dissmiss the query with cancel +// ----------------------------------------------------------------------------- +// +void CVmTextQueryDialog::DismissQueryDlg() + { + // try to dismiss query,leave will be ignored + TRAP_IGNORE( TryExitL( EAknSoftkeyCancel ) ); + } + +// ----------------------------------------------------------------------------- +// CVMSimQueryDilaog::NewL +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +CVMSimQueryDilaog* CVMSimQueryDilaog::NewL() + { + CVMSimQueryDilaog* query = new( ELeave )CVMSimQueryDilaog( ); + CleanupStack::PushL( query ); + + CleanupStack::Pop( query ); + return query; + } + + +// ----------------------------------------------------------------------------- +// CVMSimQueryDilaog::CVMSimQueryDilaog +// C++ default constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- +// +CVMSimQueryDilaog::CVMSimQueryDilaog(): CAknQueryDialog( + CAknQueryDialog::EConfirmationTone ) + { + // no tone as default + } + +// ----------------------------------------------------------------------------- +// CVMSimQueryDilaog:: ~CVMSimQueryDilaog +// Destructor +// ----------------------------------------------------------------------------- +// +CVMSimQueryDilaog:: ~CVMSimQueryDilaog() + { + + } + +// ----------------------------------------------------------------------------- +// CVMSimQueryDilaog::SetVMSimPromptL +// Sets query caption on the screen asking for confirmation to copy voice +// mailbox number from sim. +// ----------------------------------------------------------------------------- +// +void CVMSimQueryDilaog::SetVMSimPromptL( const TDesC& aDesC ) + { + SetPromptL( aDesC ); + } + +// ----------------------------------------------------------------------------- +// CVMSimQueryDilaog::VMSimDismissDialogL +// Destroys the query dialog +// ----------------------------------------------------------------------------- +// +void CVMSimQueryDilaog::VMSimDismissDialogL() + { + TryExitL( EEikBidCancel ); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/src/vmlist.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/src/vmlist.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,77 @@ +/* +* Copyright (c) 2006 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: Implementation of CVmListQueryDialog class. +* +*/ + + +// INCLUDE FILES +#include +#include "vmlist.h" +#include + +// MEMBER FUNCTIONS + +// ----------------------------------------------------------------------------- +// CVmListQueryDialog::CVmListQueryDialog() +// ----------------------------------------------------------------------------- +CVmListQueryDialog::CVmListQueryDialog( TInt* aIndex ):CAknListQueryDialog( aIndex ) + { + iOkToExit = EFalse; + } + +// ----------------------------------------------------------------------------- +// CVmListQueryDialog::~CVmListQueryDialog() +// ----------------------------------------------------------------------------- +CVmListQueryDialog::~CVmListQueryDialog() +{ +} + +// ----------------------------------------------------------------------------- +// CVmListQueryDialog::NewL() +// ----------------------------------------------------------------------------- +CVmListQueryDialog* CVmListQueryDialog::NewL( /*const TDesC& aPrompt,*/ TInt* aIndex ) + { + CVmListQueryDialog* query = new( ELeave ) CVmListQueryDialog( aIndex ); + return query; + } + +// ----------------------------------------------------------------------------- +// CVmListQueryDialog::OfferKeyEventL() +// ----------------------------------------------------------------------------- +TKeyResponse CVmListQueryDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) + { + RDebug::Print( _L("CVmListQueryDialog::OfferKeyEventL: %d" ), aType); + RDebug::Print( _L("CVmListQueryDialog::KeyCode: %d" ), aKeyEvent.iCode); + RDebug::Print( _L("CVmListQueryDialog::KeyCode: %d" ), aKeyEvent.iScanCode); + if( aKeyEvent.iCode == EKeyNo && aType == KErrNone ) + { + iOkToExit = ETrue; + RDebug::Print( _L("CVmListQueryDialog::OfferKeyEventL" )); + DismissQueryL(); + return EKeyWasConsumed; + } + return CAknListQueryDialog::OfferKeyEventL( aKeyEvent, aType ); + } + +TBool CVmListQueryDialog::OkToExitL(TInt aButtonId) + { + RDebug::Print( _L("CVmListQueryDialog::OkToExitL: %d" ), aButtonId); + if( iOkToExit ) + { + return ETrue; + } + return CAknListQueryDialog::OkToExitL(aButtonId); + } +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/src/vmnumber.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/src/vmnumber.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,4674 @@ +/* +* Copyright (c) 2002-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: Implementation of RVmbxNumber class. +* +*/ + + +// INCLUDE FILES + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// includes for phonebook search +#include +#include +#include +#include +#include + +#ifdef RD_STARTUP_CHANGE + #include //for KPSSimStatus +#endif + +#include + +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +#include +#include //CnvUtfConverter +#include "voicemailboxprivatecrkeys.h" +#include "voicemailboxdomaincrkeys.h" +#include +#include +#include "vmdialog.h" +#include "vmlist.h" +#include "vmblogger.h" +#include +#include "vmspshandler.h" +#include "vmbshandler.h" + +// CONSTANTS +const TInt KVmFlagOpened = 0x00000001; +const TInt KVmFlagPhoneOpened = 0x00000002; +const TInt KVmFlagSimReadSupport = 0x00000004; +const TInt KVmFlagPhoneModuleLoaded = 0x00000008; +const TInt KVmFlagNotifyRequested = 0x00000010; +const TInt KVmFlagNotifyOnActiveLineOnly = 0x00000020; +const TInt KVmFlagPhonebookBeingCached = 0x00000040; +const TInt KVmFlagSimWriteSupport = 0x00000080; +const TInt KVmFlagSimVmbxNumSupport = 0x00000100; +// Flag of external API saving number to phone +const TInt KForceSavedToPhoneMem = 0x00000400; + +//flag of CS defined number +const TInt KVmFlagCSNumberDefined = 0x00000001; +//flag of Vedio defined number +const TInt KVmFlagVideoNumberDefined = 0x00000002; +//flag of VoIP defined number +const TInt KVmFlagVoIpNumberDefined = 0x00000004; +// phone application uid +const TInt KPhoneApplicationUid = 0x100058B3; + +_LIT (KVmbxResourceFileDrive, "Z:"); +// The file directory is in literal KDC_RESOURCE_FILES_DIR +// (in data data_caging_path_literals.hrh) +_LIT (KVmbxResourceFileName, "Vmbx.rsc"); + +// Phonebook entry name +_LIT( KVmbxPhoneBookEntryName, "Vmbx" ); // If changed, remember to update +// the size of KVmbxPhoneBookEntryNameLength in VmNumber.h +const TInt KVmbxPhonebookRetriesIfInUse = 20; +const TInt KVmbxPhonebookRetryDelay = 100000; // 0.1s + +const TInt KVmbxPhonebookBufferSize = 150; // Estimated max size 128 + +_LIT( KVmbxOnePlus, "1" ); + +// Format of the IAP selection list query. +_LIT( KQueryItemFormat, "%d\t%S" ); +//for the mbm file +_LIT( KVmMbmDrive, "Z:" ); +_LIT( KVmLibMbmFile, "vm.mbm" ); + +const TInt KVmNumOverwrite = 1; + +const TInt KVmNamStoreMDNId = RMobileNamStore::EMobileDirectoryNumber; +// MIN is not included in mmetel std params. Third extended param +const TInt KVmNamStoreMINId = RMobileNamStore::ENumStandardNamParameters + 3; +const TInt KVmPhNumMinLength = 3; +const TInt KVmLbxItemsArraySize = 3; +const TInt KVmOriginalNumLength = 256; +const TInt KVmPhoneNumDigitsMinLength = 2; +const TInt KVmPhoneNumDigitsMaxLength = 40; +const TInt KVmbxOnlyDefinedOneNumber = 1; +const TInt KMailBoxLimitForPrompt = 1; + +_LIT (KVmbxIllegalSimCharacter, "w"); +_LIT (KTestNumber, "12345"); + +const TInt KVmExtFileSize = 20; +const TInt KVmMaxStoreSize = 48; + +const TInt KDefaultServiceId = 0; // default ServerId +const TInt KCSorVideoServiceId = 1; // CS or Video ServerId +const TInt KDefaultDefinedNumberCount = 0; // default defined number count + +// When the define VM_USE_TSY is set, SIM phonebook will be used and +// methods won't work if a compatible TSY/DOS environment is not present. + +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +// & +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ + +#ifndef __WINS__ // SIM phonebook stalls in WINS +#define VM_USE_TSY +#endif +// ================= MEMBER FUNCTIONS ========================================== + + + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// RVmbxNumber::RVmbxNumber +// C++ default constructor can NOT contain any code, that +// might leave. +// ----------------------------------------------------------------------------- +// +EXPORT_C RVmbxNumber::RVmbxNumber() : iNotifyCallBack( NULL ), + iUserAlsObserver( NULL ), + iPhoneBookInfoPckg( iPhoneBookInfo ), + iPhoneVoicemailInfoPckg( iPhoneVoicemailInfo ), + iRSatSession(), + iRSatClient( *this ), + iNotifyHandler( NULL ), + iSession( NULL ), + iResourceFileOffset( 0 ), + iFlags( KForceSavedToPhoneMem ), + iQuery( NULL ), + iClosedPtr( NULL ), + iCoeEnv( NULL ), + iVmNumOpts( EVmNumOptsBlank ), + iVmUiOpts( 0 ), + iSynchronize( EFalse ), + iType( EVmbxNone ), + iVMSimQueryDialog( NULL ), + iVideoQuery( NULL ), + iTypeSelectionQuery( NULL ), + iAlphaStringFound( EFalse ), + iAlphaStringFromSIM( NULL ), + iNumberFound( EFalse ), + iUSimFirstRoundTest( ETrue ), + iCntFetch( NULL ), + iVmSpsHandler( NULL ), + iVmBsHandler( NULL ), + iFeatMgrInitialized( EFalse ), + iSimCardFound( EFalse ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber =>" ); + + // Default sets to Phone memory, this can be changed in RVmbxNUmber::Open() + iMemoryLocation = EVmbxPhoneMemory; + + //Create repository and notify handler. + TRAPD( error, + FeatureManager::InitializeLibL(); + iFeatMgrInitialized = ETrue; + VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber: FeatureManager initialized" ); + + iSession = CRepository::NewL( KCRUidVoiceMailbox ); + VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber: CRepository created" ); + + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + iVmSpsHandler = CVmSPSHandler::NewL(); + VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber: CVmSPSHandler created" ); + } + + iVmBsHandler = CVmBSHandler::NewL(); + VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber: CVmBSHandler created" ); + ); + + if ( error != KErrNone ) + { + VMBLOGSTRING2( "VMBX: RVmbxNumber::RVmbxNumber : \ + Initialization error %I", error ); + _LIT(KVmbxConstructorPanicType,"RVmbxNumber::RVmbxNumber"); + User::Panic( KVmbxConstructorPanicType, error ); + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::~RVmbxNumber +// Destructor +// ----------------------------------------------------------------------------- +// +EXPORT_C RVmbxNumber::~RVmbxNumber() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::~RVmbxNumber =>" ); + + if ( iNotifyHandler ) + { + iNotifyHandler->StopListening(); + delete iNotifyHandler; + } + + delete iSession; + delete iAlphaStringFromSIM; + + delete iVmSpsHandler; + delete iVmBsHandler; + + if ( iFeatMgrInitialized ) + { + FeatureManager::UnInitializeLib(); + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::~RVmbxNumber <=" ); + } + + + +// ----------------------------------------------------------------------------- +// RVmbxNumber::Open +// Opens a new ETel connection +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +EXPORT_C TInt RVmbxNumber::Open() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::Open =>" ); + + TInt ret( KErrGeneral ); + // initialize the CenRep number in the bankup store + ret = BackUpSimNumber( KEmptyVoiceMailNumber, KVmbxTmpNumberLinePrimary ); + VMBLOGSTRING2( "RVmbxNumber::Open(): Clear KVmbxTmpNumberLinePrimary result = %d", + ret ); + ret = BackUpSimNumber( KEmptyVoiceMailNumber, KVmbxTmpNumberLineAuxiliary ); + VMBLOGSTRING2( "RVmbxNumber::Open(): Clear KVmbxTmpNumberLineAuxiliary result = %d", + ret ); + VMBLOGSTRING( "RVmbxNumber::Open(): Clear Tmp numbers from CenRep" ); + if ( iFlags & KVmFlagOpened ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: Opened already" ); + ret = KErrNone; + } + else + { + ret = ConnectETelServer(); + if ( !ret ) + { + // try to load ETel TSY module + ret = iTelServer.LoadPhoneModule( KMmTsyModuleName ); + if ( !ret ) + { + iFlags |= KVmFlagPhoneModuleLoaded; + + RTelServer::TPhoneInfo info; + ret = iTelServer.GetPhoneInfo( 0, info ); + if ( !ret ) + { + ret = iPhone.Open( iTelServer, info.iName ); + if ( !ret ) + { + iFlags |= KVmFlagPhoneOpened; + } + } + } + } + + if ( !ret ) + { + ret = Open( iPhone ); + } + else + { + Close(); + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::Open <=" ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::Open +// Opens a new ETel connection, when there is existing ETel connection already +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +EXPORT_C TInt RVmbxNumber::Open( RMobilePhone& aPhone ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::Open =>" ); + TInt result( KErrNone ); + TInt alsline( EAlsLine1 ); + + if ( iFlags & KVmFlagOpened ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: Opened already" ); + return KErrNone; + } + iPhone = aPhone; + + result = iSession->Get( KVmUsesSimMemory, iMemoryLocation ); + + if ( KErrNone != result ) + { + if ( KErrNotFound == result ) + { + iMemoryLocation = EVmbxPhoneMemory; + } + else + { + Close(); + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: Memory location error" ); + return result; + } + } + + VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation ); + + // Connect to system agent + RProperty property; + TInt psErr( KErrNone ); + +#ifdef RD_STARTUP_CHANGE + psErr = property.Attach( KPSUidStartup, KPSSimStatus ); +#else + psErr = property.Attach( KUidSystemCategory, KPSUidSimCStatusValue ); +#endif + if ( KErrNone != psErr ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: SIM status property error" ); + return psErr; + } + + result = iSsSettings.Open( NULL ); + + if ( KErrNone != result ) + { + Close(); + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: SS setting opening error" ); + return result; + } + + // ignore error + iSsSettings.Register( ESSSettingsAls, *this ); + + // get the current ALS line + if ( KErrNone != GetAlsLine( alsline ) ) + { + alsline = EAlsLine1; // if problems, assume primary line + } + +#ifdef VM_USE_TSY + + TInt nValue; + psErr = property.Get( nValue ); + TBool simStatus = EFalse; + + // Sim aceess test on startup + iStartUpTest = ETrue; +#ifdef RD_STARTUP_CHANGE + + if ( ( FeatureManager::FeatureSupported( KFeatureIdSimCard ) ) + && ( ESimNotPresent != nValue ) ) + { + simStatus = ETrue; + } + +#else //RD_STARTUP_CHANGE + + if ( ( FeatureManager::FeatureSupported( KFeatureIdSimCard ) ) + && ( EPSCSimRemoved != nValue ) ) + { + simStatus = ETrue; + } +#endif // RD_STARTUP_CHANGE + + VMBLOGSTRING2( "simStatus = %d", simStatus ); + if ( simStatus )//Is simCard supproted and it is not removed + { + iSimCardFound = ETrue; + + // Get identifiers from MBI-file + if ( EAlsLine1 == alsline ) + { + result = MailboxNumbersIdentifiers(); + VMBLOGSTRING2( "Identifier result = %d", result ); + if ( KErrPathNotFound == result ) + { + // try open vmbx-phonebook next + iPhoneBookType = EVMBXPhoneBook; + iMbdnPhonebookOk = EFalse; + VMBLOGSTRING( "no mbdn file is found, use vmbx phonebook" ); + } + else + { + iPhoneBookType = EMBDNPhoneBook; + iMbdnPhonebookOk = ETrue; + // if mbdn file can be found, set the entry index to EAlsLine1 + iPhoneVoicemailInfo.iVoice = EAlsLine1; + + // try to open mbdn-type phonebook + result = iPhoneBook.Open( iPhone, KETelIccMbdnPhoneBook ); + VMBLOGSTRING2( "Mbdn phonebook opening result = %I ", result ); + if ( KErrNone == result ) + { + // Get phonebook info + result = PhoneBookInfo(); + VMBLOGSTRING2( "Mbdn phonebook opening again \ + result = %I ", result ); + } + // close mbdn phonebook when error in opening or GetInfo + // to test vmbx-phonebook + if ( KErrNone != result ) + { + VMBLOGSTRING( "Close MBDN phonebook" ); + iPhoneBook.Close(); + iMbdnPhonebookOk = EFalse; + // try open vmbx-phonebook next + iPhoneBookType = EVMBXPhoneBook; + } + // close mbdn phonebook when no number found + // to test vmbx-phonebook + else if ( ( KErrNone == result ) && iNoNumberFound ) + { + VMBLOGSTRING( "mbdn close, number not found" ); + iMbdnPhonebookOk = ETrue; + iPhoneBook.Close(); + // try open vmbx-phonebook next + iPhoneBookType = EVMBXPhoneBook; + } + } + } + + if ( EAlsLine2 == alsline || EVMBXPhoneBook == iPhoneBookType ) + { + // the mbdn number is not used when line2 is active + // the number is only got from vmbx-phonebook + iMbdnPhonebookOk = EFalse; + // try to open vmbx-type phonebook + result = iPhoneBook.Open( iPhone, KETelIccVoiceMailBox ); + VMBLOGSTRING2( "Vmbx phonebook opening result = %I ", result ); + if ( KErrNone == result ) + { + // check that this phonebook supports reading + result = PhoneBookInfo(); + VMBLOGSTRING( "VmbxPhoneBook opened" ); + } + } + VMBLOGSTRING3( "VMBX: RVmbxNumber::Open: \ + iMbdnPhonebookOk: %I, iNoNumberFound: %I", iMbdnPhonebookOk, iNoNumberFound ); + // reopen mbdn-phonebook when vmbx-phonebook has no number + if ( iMbdnPhonebookOk && iNoNumberFound ) + { + VMBLOGSTRING( "reopen mbdn" ); + iPhoneBook.Close(); + // try open vmbx-phonebook next + iPhoneBookType = EMBDNPhoneBook; + // try to open mbdn-type phonebook + result = iPhoneBook.Open( iPhone, KETelIccMbdnPhoneBook ); + VMBLOGSTRING2( "Mbdn phonebook opening result = %I ", result ); + if ( KErrNone == result ) + { + // Get phonebook info + result = PhoneBookInfo(); + } + // close phonebook when error in opening or GetInfo + if ( KErrNone != result ) + { + VMBLOGSTRING( "Close MBDN phonebook" ); + iPhoneBook.Close(); + } + } + + // set readonly state if aquired + if ( IsReadOnlySIM() ) + { + iFlags &= ~KVmFlagSimWriteSupport; + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: ReadOnly set" ); + } + + if ( KErrNone != result && KErrInUse != result ) + { + // Fatal error + Close(); + property.Close(); + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: Phonebook info error" ); + + return result; + } + + // If no SIM support for vmbx numbers, we don't need + //ETel for anything. -> close all ETel resources + if ( !( iFlags & + (KVmFlagPhonebookBeingCached | KVmFlagSimReadSupport ) ) ) + { + CloseETel(); + } + } + // Sim access rights are tested only in start up + iStartUpTest = EFalse; +#endif // VM_USE_TSY + + property.Close(); + + if ( FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ) ) + { + result = iSession->Get( KVmNumOpts,iVmNumOpts ); + + if ( KErrNone != result ) + { + if ( KErrNotFound == result ) + { + iVmNumOpts = EVmNumOptsBlank; + } + else + { + Close(); + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: NumOpt error" ); + return result; + } + } + } + result = iSession->Get( KVmUIOpts, iVmUiOpts ); + + if ( KErrNone != result ) + { + if ( KErrNotFound == result ) + { + iVmUiOpts = 0; + } + else + { + Close(); + VMBLOGSTRING( "VMBX: RVmbxNumber::Open: NumOpt error" ); + return result; + } + } + + iCoeEnv = CEikonEnv::Static(); + + // load the resources for queries and notes + if ( iCoeEnv ) + { + __ASSERT_DEBUG( iCoeEnv, + User::Panic( KVmbxPanicCategory, EVmbxNoCoeEnv ) ); + + // load the resources for queries and notes + TInt tmpStatus; + TRAP( tmpStatus, LoadResourceL() ); + result = tmpStatus; + + if ( result ) + { + Close(); + } + else + { + iFlags |= KVmFlagOpened; + } + } + + HandleNumberStores( alsline ); + + VMBLOGSTRING( "VMBX: RVmbxNumber::Open <=" ); + return result; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::ConnectETelServer +// Connects to ETel server +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +TInt RVmbxNumber::ConnectETelServer() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::ConnectETelServer =>" ); + const TInt KRetryCount = 7; + const TInt KRetryTimeout = 100000; + TInt status( KErrNone ); + + for ( TInt i( 0 ); i < KRetryCount; i++ ) + { + status = iTelServer.Connect(); + if ( !status ) + { + break; + } + User::After( KRetryTimeout ); + } + VMBLOGSTRING( "VMBX: RVmbxNumber::ConnectETelServer <=" ); + return status; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetVmbxNumber +// Fetches the specified vmbx number +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +EXPORT_C TInt RVmbxNumber::GetVmbxNumber( TDes& aNumber, + TVmbxNumberEntry aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxNumber =>" ); + __ASSERT_DEBUG( iFlags & ( KVmFlagOpened ), + User::Panic(KVmbxPanicCategory, EVmbxNotConnected) ); + __ASSERT_DEBUG( aNumber.MaxLength() >= KVmbxMaxNumberLength, + User::Panic(KVmbxPanicCategory, EVmbxDescriptorTooSmall) ); + + TInt lineNumber( aEntry ); + + if ( aEntry == EAlsActiveLineEntry ) + { + // get the current ALS line + if ( GetAlsLine( lineNumber ) != KErrNone ) + { + lineNumber = EAlsLine1; // if problems, assume primary line + } + } + TInt ret( KErrNotFound ); + TBuf< KVmbxMaxNumberLength > number; + TBuf< KVmbxMaxNumberLength > line2AlsNumber; + + //VMN callback# + if ( FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ) && + ( iVmUiOpts & KVmNumOverwrite ) ) + { + ret = GetVmNumFromVMN( number ); + if ( ret == KErrNone ) + { + aNumber.Copy( number ); + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxNumber OK" ); + return ret; + } + else if ( ret != KErrNotFound ) + { + VMBLOGSTRING2( "VMBX: RVmbxNumber:: \ + GetVmbxNumber error = %I", ret ); + return ret; + } + } + + TBool isFromSD = EFalse; + TBool isFromSim = EFalse; + + // Get saved number + switch ( iVmNumOpts ) + { + case EVmNumOptsBlank: + { + // On ALS1 read number from sim, if sim is active + // On ALS2 always read number from sim when vmbx phone memory in use + if ( IsSimMemory() && ( ( EAlsLine1 == lineNumber ) + || ( EAlsLine2 == lineNumber ) ) ) + { + ret = GetVmNumFromSIM( number, lineNumber ); + isFromSim = ETrue; + // If there is no voice mailbox number available on SIM, + // a note(qtn_...) should be shown, + // when pressing '1' + 'send' key or long pressing '1' key + // to try to call voice mailbox by phone application. + if ( ( !UserEditNumber( lineNumber ) + || !IsPhoneMemForcedEdit( lineNumber ) ) && + ( ( KErrNotFound == ret ) || ( KErrNotSupported == ret ) ) + && !AllowedToChangeTheNumber() ) + { + // get current active process + RProcess curProcess; + TInt curProcessId( curProcess.SecureId().iId ); + VMBLOGSTRING2( "VMBX: RVmbxNumber:: Get cur process id: \ + curProcessId = %I", curProcessId ); + + if ( KPhoneApplicationUid == curProcessId ) + { + TBool thisClosed( EFalse ); + iClosedPtr = &thisClosed; + + // This check is done because phone client calls + // GetVmbxNumber and then SelectTypeL, + // which causes note qtn_... to be shown twice + if ( IsNoNumberNoteAllowed() ) + { + // show the information note to user + TRAP_IGNORE( + ShowInformationNoteL( R_VOICE_NO_VMBX_NUMBER_NOTE ) ) + } + + iClosedPtr = NULL; + if ( thisClosed ) + { + //End Key Pressed + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxNumber: \ + End key pressed" ); + return KErrCancel; + } + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxNumber \ + No voice mailbox number available on SIM" ); + } + } + if ( KErrNone == ret ) + { + ResetUserEditNumber( lineNumber ); + } + VMBLOGSTRING2( "GetVmNumFromSIM = %I", ret ); + } + else + { + ret = KErrNotFound; + } + break; + } + case EVmNumOptsDedicatedVMN: + { + ret = GetVmNumFromVMN( number ); + break; + } + case EVmNumOptsMIN: + case EVmNumOptsOnePlusMIN: + { + ret = GetVmNumFromNamStore( number, EVmbxMIN ); + break; + } + case EVmNumOptsMDN: + case EVmNumOptsOnePlusMDN: + { + ret = GetVmNumFromNamStore( number ); + break; + } + case EVmNumOptsMDNCustom: + case EVmNumOptsOnePlusMDNCustom: + { + ret = GetVmNumFromSD( number, lineNumber ); + if ( ret != KErrNone ) + { + ret = GetVmNumFromNamStore( number ); + } + break; + } + case EVmNumOptsSharedData: + { + ret = GetVmNumFromSD( number, lineNumber ); + isFromSD = ETrue; + break; + } + default: + // + break; + } + + // On ALS2, if number exists on SD, then use it + // if ALS2 number found in SIM, but not in phone memory, + // reset flag for automatic SIM number use. + // Number found from SIM is saved to SD later + + if ( lineNumber == EAlsLine2 ) + { + TInt alsReturnValue = GetVmNumFromSD( line2AlsNumber, lineNumber ); + if ( ( alsReturnValue == KErrNone ) && ( line2AlsNumber.Length() ) ) + { + VMBLOGSTRING( "GetVmbxNumber::ALS2 number found from CenRep" ); + number.Copy( line2AlsNumber ); + isFromSD = ETrue; + } + else + { + if ( ( KErrNone == ret ) && isFromSim ) + { + VMBLOGSTRING( "[VMBX] GetVmbxNumber::ALS 2 number found from SIM" ); + ResetUserEditNumber( lineNumber ); + } + else + { + number.Zero(); + } + } + } + + // No number retrieved so try to read SD for number + // (Phone memory in use) + if ( ret != KErrNone ) + { + switch( iVmNumOpts ) + { + case EVmNumOptsBlank: + case EVmNumOptsDedicatedVMN: + case EVmNumOptsMIN: + case EVmNumOptsOnePlusMIN: + case EVmNumOptsMDN: + case EVmNumOptsOnePlusMDN: + { + if ( !IsSimMemory() ) + { + ret = GetVmNumFromSD( number, lineNumber ); + VMBLOGSTRING2( "GetVmNumFromSD = %I", ret ); + isFromSD = ETrue; + } + else + { + aNumber.Copy( number ); + VMBLOGSTRING2( "number = %S", &number ); + } + break; + } + default: + break; + } + } + + if ( ret == KErrNone ) + { + if ( number.Length() ) + { + VMBLOGSTRING( "Number length > 0" ); + //Synchronize the number in storage with the retrieved number + if ( iVmNumOpts != EVmNumOptsMDNCustom && + iVmNumOpts != EVmNumOptsOnePlusMDNCustom && + !isFromSD ) + { + iSynchronize = ETrue; + + if ( ( iFlags & KVmFlagSimWriteSupport ) || + ( lineNumber == EAlsLine2 ) ) + { + TInt error( KErrNone ); + // If number is not fetched from SIM and SIM memory active + // on primary line, number saved to SIM. + if ( UsesSimMemory() ) + { + if ( !isFromSim ) + { + error = SaveVmbxNumberToSim( number, aEntry ); + VMBLOGSTRING2( "SaveVmbxNumberToSim = %I", error ); + } + } + else + { + error = SaveVmbxNumberToPhone( number, aEntry ); + VMBLOGSTRING2( "SaveVmbxNumberToPhone = %I", error ); + } + } + else + { + iFlags &= (~KForceSavedToPhoneMem); + SaveVmbxNumber( number, aEntry ); + } + } + + if ( iVmNumOpts == EVmNumOptsOnePlusMIN || + iVmNumOpts == EVmNumOptsOnePlusMDN ) + { + if ( KVmbxMaxNumberLength < number.Length() + 1 ) + { + VMBLOGSTRING( "GetVmbxNumber::Number too long" ); + return KErrTooBig; + } + // Add 1 plus + number.Insert( 0, KVmbxOnePlus ); + } + + aNumber.Copy( number ); + } + else + { + VMBLOGSTRING( "GetVmbxNumber::No number found." ); + ret = KErrNotFound; + } + } + + VMBLOGSTRING2( "VMBX: RVmbxNumber::GetVmbxNumber error = %I", ret ); + if ( ret != KErrNone ) + { + return KErrNotFound; + } + + if ( IsEmergencyNumberL( aNumber ) ) + { + aNumber.Zero(); + ret = KErrNotFound; + } + + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::QueryNumberL +// Check wether the voice mailbox number can be changed +// ----------------------------------------------------------------------------- +// +EXPORT_C TBool RVmbxNumber::QueryNumberL( TVmbxQueryType aQueryType, + TDes& aNumber, + TBool aShowQuery) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: =>" ); + __ASSERT_DEBUG( aNumber.MaxLength() >= KVmbxMaxNumberLength, + User::Panic( KVmbxPanicCategory, EVmbxDescriptorTooSmall ) ); + __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength, + User::Panic( KVmbxPanicCategory, EVmbxNumberTooLong ) ); + + VMBLOGSTRING2( "aQueryType = %d", aQueryType ); + VMBLOGSTRING2( "iPhoneBookType = %d", iPhoneBookType ); + + TBool result( EFalse ); + if ( EVmQueryProcess == iQueryingState ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \ + running forever case" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" ); + return result; + } + + if ( !AllowedToChangeTheNumber() ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \ + Number not allowed to change" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" ); + User::Leave( KErrAccessDenied ); + } + + // Vmbx type is set for FetchNumberFromPhonebookL + iType = EVmbx; + + __ASSERT_DEBUG( aNumber.MaxLength() >= KVmbxMaxNumberLength, + User::Panic( KVmbxPanicCategory, EVmbxDescriptorTooSmall ) ); + __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength, + User::Panic( KVmbxPanicCategory, EVmbxNumberTooLong ) ); + + // Close() sets thisClosed to ETrue + TBool thisClosed( EFalse ); + + TBuf vmbxNumber; + + TInt alsline( EAlsLine1 ); + // get the current ALS line + if ( GetAlsLine( alsline ) != KErrNone ) + { + // if problems, assume primary line + alsline = EAlsLine1; + } + VMBLOGSTRING2( "VMBX: RVmbxNumber::QueryNumberL: ALSline = %d", + alsline ); + + if ( iFlags & KVmFlagSimReadSupport ) + { + VMBLOGSTRING( "RVmbxNumber::QueryNumberL: SIM Read support" ) + TBool querySim( EFalse ); + + if ( alsline == EAlsLine1 ) + { + // Do sim query when not defined query + // or 6f17 Sim memory not active and query wanted + if ( ( aQueryType == EVmbxNotDefinedQuery ) || + ( !IsSimMemory() && aShowQuery && + ( iMemoryLocation == EVmbxPhoneMemory ) ) ) + { + VMBLOGSTRING( "RVmbxNumber::QueryNumberL: Query on line1" ); + querySim = ETrue; + } + } + else //EAlsLine2 + { + // Allways and only when vmbx phonebook in use + if ( iPhoneBookType == EVMBXPhoneBook ) + { + VMBLOGSTRING( "RVmbxNumber::QueryNumberL: Query on line2" ); + querySim = ETrue; + } + } + + if ( querySim ) + { + iClosedPtr = &thisClosed; + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: Q SIM number" ); + + TBool isSimNumber = QuerySimNumberL( vmbxNumber ); + + VMBLOGSTRING2( "VMBX: RVmbxNumber::QueryNumberL: SIM number %S", + &vmbxNumber ); + + iClosedPtr = NULL; + + if ( thisClosed ) + { + //End Key Pressed + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \ + End key pressed" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" ); + return EFalse; + } + + if ( isSimNumber ) + { + // save to phone memory when ALS2 in use + // or read-only sim on ALS1 + if ( ( alsline == EAlsLine2 ) || + ( ( alsline == EAlsLine1 ) && + !( iFlags & KVmFlagSimWriteSupport ) ) ) + { + VMBLOGSTRING( "Save number To Phone" ); + SaveVmbxNumberToPhone( vmbxNumber, EAlsActiveLineEntry ); + // confirmation note is not needed if number is taken + // from SIM automatically + if ( UserEditNumber( alsline ) || + IsPhoneMemForcedEdit( alsline ) ) + { + ResetUserEditNumber( alsline ); + ShowConfirmationNoteL( R_SIM_NUMBER_NOTE ); + } + } + else + { + // confirmation note is not needed if number is taken + // from SIM automatically + if ( UserEditNumber( alsline ) || + IsPhoneMemForcedEdit( alsline ) ) + { + ShowConfirmationNoteL( R_SIM_NUMBER_NOTE ); + } + } + aNumber.Copy( vmbxNumber ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL Number from \ + Sim accepted" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" ); + return ETrue; + } + } + } + + TBuf originalNumber; + originalNumber.Copy( aNumber ); + + iQueryingState = EVmQueryProcess; + //QueryNumberL dialog + FOREVER + { + vmbxNumber.Copy( aNumber ); + + // get the correct query prompt from resource file + HBufC* prompt = StringLoader::LoadLC( ( aQueryType == + EVmbxNotDefinedQuery + ? R_DEFINE_NUMBER_PROMPT + : R_CHANGE_NUMBER_PROMPT ), + iCoeEnv ); + + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL string loaded" ); + iClosedPtr = &thisClosed; + + // Convert output to accommodate the current locale + AknTextUtils::LanguageSpecificNumberConversion( vmbxNumber ); + + TInt ret; // return value of the query + + // ETrue to open the query again after closing single fetch dialog + TBool searchUsed; + + // enable search if number length is 0 + TBool searchEnabled( vmbxNumber.Length() ? EFalse : ETrue ); + + do + { + // show query with the correct prompt + iQuery = CVmTextQueryDialog::NewL( vmbxNumber, + *prompt, searchEnabled ); + + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL ExecuteLD" ); + ret = iQuery->ExecuteLD( R_VMBX_NUMBER_QUERY ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL ExecuteLD done" ); + + iQuery = NULL; + searchUsed = EFalse; + + if ( searchEnabled && ret && !vmbxNumber.Length() ) + { + searchUsed = ETrue; + // Show phonebook's single fetch dialog + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL Fetch from Pb" ); + TRAPD( error, FetchNumberFromPhonebook2L( vmbxNumber ) ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::QueryNumberL Fetch from Pb done \ + error = %d", error ); + + // If application is killed via FSW, contact selection query + // returns KLeaveExit. This should propagate to "root" + // application where it reaches the active scheduler loop + // and thus allows proper application exit when the loop exits. + // Therefore propagate the error to caller and do not ignore it. + if ( KLeaveExit == error ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL KLeaveExit" ); + User::Leave( error ); + } + + // user has pressed End Key + if ( thisClosed ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \ + End key pressed" ); + CleanupStack::PopAndDestroy( prompt ); + + iQueryingState = EVmQueryNormal; + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" ); + return EFalse; + } + + if ( error ) // Back pressed in Contact UI + { + // Now the phone book fetch dialog was closed, + // get out of the loop + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL Fetch done" ); + ret = 0; + break; + } + } + } while ( searchUsed ); + + iClosedPtr = NULL; + + CleanupStack::PopAndDestroy( prompt ); + + if ( ret != KErrNone ) + { + if ( !vmbxNumber.Length() ) + { + iFlags &= (~KForceSavedToPhoneMem); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL has number" ); + // Resets the flag that indicates that the user has edited VMBX number + ResetUserEditNumber( alsline ); + TInt status = + SaveVmbxNumber( vmbxNumber, EAlsActiveLineEntry ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL number save" ); + + if ( status == KErrNone ) + { + // If number does not exist, + // number from SIM is used if it's available + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL save ok" ); + if ( UseSimNumIfAvailable( vmbxNumber, alsline ) + && vmbxNumber.Length() ) + { + // If number is taken from SIM, + // show appropriate confirmation note + ShowConfirmationNoteL( R_SIM_NUMBER_NOTE ); + } + aNumber.Copy( vmbxNumber ); + if ( !vmbxNumber.Length() ) + { + // show "not defined" note + ShowConfirmationNoteL( R_NOTE_EMPTY_NUMBER ); + } + result = ETrue; + break; + } + else if ( status == KErrCancel ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL save \ + cancel" ); + + aNumber.Copy( vmbxNumber ); + continue; + } + else + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \ + Number saving error" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" ); + User::LeaveIfError( status ); + } + } + else + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL no number" ); + SetUserEditNumber( alsline ); + } + + // Convert back to western digits + ConvertToWesternDigits( vmbxNumber ); + + // check the given number here (emergency numbers not allowed) + if ( IsValidPhoneNumber( vmbxNumber ) + && !IsEmergencyNumberL( vmbxNumber ) ) + { + iFlags &= ~KForceSavedToPhoneMem; + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: save num 2" ); + TInt status = SaveVmbxNumber( vmbxNumber, EAlsActiveLineEntry ); + + if ( status == KErrNone ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: save \ + num 2 ok" ); + aNumber.Copy( vmbxNumber ); + if ( UsesSimMemory() ) + { + ShowConfirmationNoteL( + R_SAVED_NOTE_SIM_MEMORY ); + } + else + { + ShowConfirmationNoteL( + R_SAVED_NOTE_PHONE_MEMORY ); + } + result = ETrue; + break; + } + else if ( status == KErrCancel ) + {// The query number dialog was cancelled, so continue + aNumber.Copy( vmbxNumber ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: save \ + num 2 cancel" ); + continue; + } + else if ( status == KErrArgument ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: save \ + num 2 err arg" ); + result = EFalse; + } + else + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \ + Invalid number" ); + result = EFalse; + } + } + + if ( !result ) + { + // show "invalid number" note and wait + // for a short timeout + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: invalid \ + number show note" ); + + prompt = StringLoader::LoadLC( R_INVALID_NUMBER_NOTE, + iCoeEnv ); + + iClosedPtr = &thisClosed; + + CAknInformationNote* note = + new( ELeave ) CAknInformationNote( ETrue ); + note->ExecuteLD( *prompt ); + + iClosedPtr = NULL; + + CleanupStack::PopAndDestroy( prompt ); + + if ( !thisClosed ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: invalid \ + number query again" ); + continue; // the number was invalid -> query again. + } + } + } + + // retrieve the original number in the query + // as user has cancelled the query... + aNumber.Copy( originalNumber ); + break; // user canceled the query + } + iQueryingState = EVmQueryNormal; + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" ); + return result; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::QuerySimNumberL +// Routine to query and save SIM number from user +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::QuerySimNumberL( TDes& aNumber, TVmbxNumberEntry aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QuerySimNumberL: =>" ); + TInt lineNumber( aEntry ); + + if ( aEntry == EAlsActiveLineEntry ) + { + // get the current ALS line + if ( GetAlsLine( lineNumber ) != KErrNone ) + { + lineNumber = EAlsLine1; // if problems, assume primary line + } + } + TInt ret( KErrNotFound ); + + ret = GetVmNumFromSIM( aNumber, lineNumber ); + + if ( ret ) + { + return EFalse; + } + + VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation ); + + TBool doSimQuery( EFalse ); + if ( ( lineNumber == EAlsLine2 ) && ( iPhoneBookType == EVMBXPhoneBook ) ) + { + VMBLOGSTRING( "Sim query allowed on line2" ); + doSimQuery = ETrue; + } + else if ( ( iMemoryLocation == EVmbxPhoneMemory ) && + ( 0 != aNumber.Length() ) ) + { + VMBLOGSTRING( "Sim query allowed on line1" ); + doSimQuery = ETrue; + } + + if ( doSimQuery ) + { + TInt retVal = EVmbxSimNumNotAccepted; + // If number not defined, query is not needed as number + // found in SIM is used automatically + if ( VmbxNumDefInPhoneMemory( lineNumber ) ) + { + // If number found in SIM is the same as the number stored in phone memory, + // skip query + if ( !NumStoredInPhone( aNumber, lineNumber ) ) + { + HBufC* label = StringLoader::LoadLC( R_SAVED_SIM_NUMBER_INTO_USE, + aNumber ); + iVMSimQueryDialog = CVMSimQueryDilaog::NewL(); + iVMSimQueryDialog->SetVMSimPromptL( *label ); + CleanupStack::PopAndDestroy( label ); + //coverity static analysis tool generates a warning finding here + //ignore that + //coverity[deref_ptr_in_call] + retVal= iVMSimQueryDialog->ExecuteLD( + R_VMBX_TAKE_SIM_NUMBER_INTO_USE ); + //coverity static analysis tool generates a warning finding here + //ignore that + //coverity[check_after_deref] + if ( iVMSimQueryDialog == NULL ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QuerySimNumberL: \ + No number inserted" ); + return EFalse; + } + iVMSimQueryDialog = NULL; + if ( retVal ) + { + SetUserEditNumber( lineNumber ); + } + } + } + else + { + // IF VMBX number not defined and number found in SIM, + // number from SIM is used + retVal = EVmbxSimNumAccepted; + ResetUserEditNumber( lineNumber ); + } + + // sim number accepted on line 1 + if ( retVal && ( lineNumber == EAlsLine1 ) ) + { + VMBLOGSTRING( "sim number accepted on line 1" ); + // No write support on sim, use phone memory + if ( !( iFlags & KVmFlagSimWriteSupport ) ) + { + iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory ); + iMemoryLocation = EVmbxPhoneMemory; + } + else + { + iSession->Set( KVmUsesSimMemory, EVmbxSimMemory ); + iMemoryLocation = EVmbxSimMemory; + } + VMBLOGSTRING( "return ETrue" ); + return ETrue; + } + // sim number accepted on line 2 + else if ( retVal && ( lineNumber == EAlsLine2 ) ) + { + VMBLOGSTRING( "Sim number accepted on line2" ); + return ETrue; + } + // user selection "No" + else + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QuerySimNumberL: \ + No number inserted" ); + return EFalse; + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::QuerySimNumberL: <=" ); + return EFalse; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::ConvertToWesternDigits +// Converts a phone number to western format +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::ConvertToWesternDigits( TDes& aDes ) const + { + VMBLOGSTRING( "VMBX: RVmbxNumber::ConvertToWesternDigits: =>" ); + AknTextUtils::ConvertDigitsTo( aDes, EDigitTypeWestern ); + VMBLOGSTRING( "VMBX: RVmbxNumber::ConvertToWesternDigits: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SaveVmbxNumber +// Saves vmbx number to phone or sim memory +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +EXPORT_C TInt RVmbxNumber::SaveVmbxNumber( const TDesC& aNumber, + TVmbxNumberEntry aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: =>" ); + TInt status( KErrNone ); + TInt alsline( EAlsLine1 ); + // get the current ALS line + if ( GetAlsLine( alsline ) != KErrNone ) + { + alsline = EAlsLine1; // if problems, assume primary line + } + + if ( EAlsLine1 == alsline) + { + // Ask place to save if sim available for saving + if ( iFlags & KVmFlagSimWriteSupport ) + { + TInt index( 0 ); + TInt ret( 0 ); + + CAknListQueryDialog* dlg( NULL ); + TRAP_IGNORE( dlg = new( ELeave ) CAknListQueryDialog( &index ) ); + + if ( dlg ) + { + TRAP_IGNORE( ret = dlg->ExecuteLD( R_VMBX_MEMORY_LIST_QUERY ) ); + dlg = NULL; + } + + if ( ret ) + { + // user selected to save number to Sim + if ( EVmbxSimMemory == index ) + { + iMemoryLocation = EVmbxSimMemory; + iSession->Set( KVmUsesSimMemory, EVmbxSimMemory ); + + status = SaveVmbxNumberToSim( aNumber, aEntry ); + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: \ + Number saved to Sim" ); + } + // user selected to save number to Phone memory + else if ( EVmbxPhoneMemory == index ) + { + iMemoryLocation = EVmbxPhoneMemory; + iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory ); + if ( iFlags & KForceSavedToPhoneMem ) + { + SetPhoneMemForcedEdit( alsline ); + } + + status = SaveVmbxNumberToPhone( aNumber, aEntry ); + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: \ + Number saved to phone memory" ); + } + } + else// The user has selected Cancel.. so no changes, return KErrCancel + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: canceled" ); + status = KErrCancel; + } + } + // Line1 in use and no sim available, so use Phone memory + else + { + // Sim write not support and external clients invoke the function + // set phone memory forced edit + if ( iFlags & KForceSavedToPhoneMem ) + { + SetPhoneMemForcedEdit( alsline ); + } + iMemoryLocation = EVmbxPhoneMemory; + iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory ); + status = SaveVmbxNumberToPhone( aNumber, EAlsActiveLineEntry ); + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: \ + Number saved to phone memory" ); + } + } + // EAlsLine2 + else + { + // Sim write not support and external clients invoke the function + // set phone memory forced edit + if ( ( iFlags & KForceSavedToPhoneMem ) && + ! ( iFlags & KVmFlagSimWriteSupport ) ) + { + SetPhoneMemForcedEdit( alsline ); + } + status = SaveVmbxNumberToPhone( aNumber, EAlsActiveLineEntry ); + } + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: <=" ); + return status; + } + + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SaveVmbxNumberToSim +// Saves vmbx number to sim memory +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +TInt RVmbxNumber::SaveVmbxNumberToSim( const TDesC& aNumber, + TVmbxNumberEntry aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumberToSim: =>" ); + + // AllowedToChangeTheNumber() check not done in this method + // in order to always allow saving. + TInt alsline( EAlsLine1 ); + // get the current ALS line + if ( GetAlsLine( alsline ) != KErrNone ) + { + alsline = EAlsLine1; // if problems, assume primary line + } + // ALS line2 not supported when saving to SIM + if ( alsline == EAlsLine2 ) + { + VMBLOGSTRING( "Sim usage for ALS Line2 not supported, \ + return KErrArgument " ); + return KErrArgument; + } + + // number containing "w"-character not allowed to save to sim + if ( aNumber.Find( KVmbxIllegalSimCharacter ) != KErrNotFound ) + { + VMBLOGSTRING( "w-char not allowed, return KErrArgument " ); + return KErrArgument; + } + + __ASSERT_DEBUG( iFlags & KVmFlagOpened, + User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) ); + __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength, + User::Panic( KVmbxPanicCategory, EVmbxNumberTooLong ) ); + + TInt lineNumber( aEntry ); + TInt error( KErrNone ); + + if ( aEntry == EAlsActiveLineEntry ) + { + // get the active ALS line + lineNumber = alsline; + } + +#ifdef VM_USE_TSY + // Update maxLength info + // First read number from sim. + // Then get info of the max size. + // Finally determine actual max size using retrieved info. + // Note! GetInfo reads data from cache, which is updated when write + // attempt is done. So if Ext-files are taken into use by some + // other application while Vmbx is opened, then correct info + // cannot fetch by GetInfo. (This appears when trying to save + // long number twice and first one fails and second is saved + // successfully.) + TBuf numberOnSim; + // return value ignored here, because no meaning for size determination + GetVmNumFromSIM( numberOnSim, lineNumber ); + + TInt ret = DoPhonebookOperation( EVmbxPhonebookGetInfo ); + + if ( ret != KErrNone ) + { + VMBLOGSTRING2( "DoPhonebookOperation getinfo retval = %I", ret ); + return ret; + } + else + { + CalculateActualMaxLengthOnSim( numberOnSim.Length() ); + } + + // store in SIM phonebook + if ( iVmNumOpts == EVmNumOptsBlank ) + { + if ( aNumber.Length() <= iPhoneBookInfo.iMaxNumLength ) + { + VMBLOGSTRING( "SaveVmbxNumberToSim::Num length <= maxNumLength" ); + if ( iFlags & KVmFlagPhonebookBeingCached ) + { + error = DoPhonebookOperation( EVmbxPhonebookGetInfo ); + } + + if ( !error && ( iFlags & KVmFlagSimWriteSupport ) ) + { + TVmbxEntry entry; + entry.iIndex = lineNumber; + + if ( aNumber.Length() ) + { + entry.iTelNumber.Copy( aNumber ); + entry.iText.Copy( KVmbxPhoneBookEntryName ); + entry.iText.AppendNum( lineNumber ); + error = DoPhonebookOperation( EVmbxPhonebookWrite, + &entry ); + VMBLOGSTRING3( "VMBX: RVmbxNumber::SaveVmbxNumberToSim: \ + Write SIM entry %I, status: %I", lineNumber, error ); + } + else + { + error = DoPhonebookOperation( EVmbxPhonebookDelete, + &entry ); + VMBLOGSTRING3( "VMBX: RVmbxNumber::SaveVmbxNumberToSim: \ + Delete SIM entry %I, status: %I", lineNumber, error ); + } + } + } + else + { + error = KErrArgument; + } + } + else + { + error = KErrNotFound; + } +#else // <= VM_USE_TSY + error = KErrNotFound; +#endif // VM_USE_TSY + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumberToSim: <=" ); + return error; //to be removed + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SaveVmbxNumberToPhone() +// Saves vmbx number to phone memory +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +TInt RVmbxNumber::SaveVmbxNumberToPhone( const TDesC& aNumber, + TVmbxNumberEntry aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumberToPhone: =>" ); + + __ASSERT_DEBUG( iFlags & KVmFlagOpened, + User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) ); + __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength, + User::Panic( KVmbxPanicCategory, EVmbxNumberTooLong ) ); + + // AllowedToChangeTheNumber() check not done in this method + // in order to always allow saving. + TInt lineNumber( aEntry ); + TInt error( KErrNone ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::SaveVmbxNumberToPhone \ + the number is from phone or SIM aNumber = %S", &aNumber ); + + if ( aEntry == EAlsActiveLineEntry ) + { + // get the current ALS line + if ( GetAlsLine( lineNumber ) != KErrNone ) + { + lineNumber = EAlsLine1; // if problems, assume primary line + } + } + + TUint32 keyword = lineNumber == + EAlsLine1Entry ? KVmbxNumberLinePrimary: KVmbxNumberLineAuxiliary; + error = iSession->Set( keyword, aNumber ); + + if ( !error ) + { + // Client will generate the event itself on request. + if ( iFlags & KVmFlagNotifyRequested ) + { + HandleNotifyString( keyword, aNumber ); + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumberToPhone: <=" ); + return error; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::NotifyVmbxNumberChangeL +// Issues a notify request on a vmbx number change +// ----------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::NotifyVmbxNumberChangeL( + MVmbxNotifyHandler* aHandler, TBool aNotifyOnActiveLineOnly ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyVmbxNumberChangeL: =>" ); + __ASSERT_DEBUG( iFlags & ( KVmFlagOpened ), + User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) ); + + iNotifyCallBack = aHandler; + SubscribeSATNotificationsL(); // subscribe SAT notifications + + // only issue a new notify request if there isn't one already + if ( !( iFlags & KVmFlagNotifyRequested ) ) + { + iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iSession ); + iNotifyHandler->StartListeningL(); + + iFlags |= KVmFlagNotifyRequested; + } + + if ( aNotifyOnActiveLineOnly ) + { + iFlags |= KVmFlagNotifyOnActiveLineOnly; + } + else + { + iFlags &= ( ~KVmFlagNotifyOnActiveLineOnly ); + } + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyVmbxNumberChangeL: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SubscribeSATNotificationsL +// Subscribe SAT notifications +// ----------------------------------------------------------------------------- +void RVmbxNumber::SubscribeSATNotificationsL() + { + if ( iPhoneBookType == EMBDNPhoneBook ) + { + iRSatSession.ConnectL(); + iRSatClient.OpenL( iRSatSession ); + iObservedFileList.Append( KMbdnEf ); + iObservedFileList.Append( KMbiEf ); + iRSatClient.NotifyFileChangeL( iObservedFileList ); + } + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::NotifyVmbxNumberChangeCancel +// Cancels a notify request on a vmbx number change. +// ----------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::NotifyVmbxNumberChangeCancel() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyVmbxNumberChangeCancel: =>" ); + __ASSERT_DEBUG( iFlags & KVmFlagOpened, + User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) ); + + iNotifyHandler->StopListening(); + + iFlags &= ( ~KVmFlagNotifyRequested ); + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyVmbxNumberChangeCancel: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::NotifyAlsLineChangeL +// Issues a notify request on active ALS line change +// ----------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::NotifyAlsLineChangeL( MVmbxAlsObserver* aObserver ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyAlsLineChangeL: =>" ); + __ASSERT_DEBUG( iFlags & KVmFlagOpened, + User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) ); + iUserAlsObserver = aObserver; + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyAlsLineChangeL: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::NotifyAlsLineChangeCancel +// Cancels a notify request on ALS line change +// ----------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::NotifyAlsLineChangeCancel() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyAlsLineChangeCancel: =>" ); + __ASSERT_DEBUG( iFlags & KVmFlagOpened, + User::Panic(KVmbxPanicCategory, EVmbxNotConnected) ); + iUserAlsObserver = NULL; + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyAlsLineChangeCancel: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::Close +// Closes the resources allocated in Open +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +EXPORT_C void RVmbxNumber::Close() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::Close: =>" ); + if ( iCntFetch ) + { + delete iCntFetch; + iCntFetch = NULL; + } + + iRSatClient.Cancel(); + iRSatClient.Close(); + iRSatSession.Close(); + if ( iClosedPtr ) + { + *iClosedPtr = ETrue; + iClosedPtr = NULL; + } + + if ( iVMSimQueryDialog ) + { + TRAP_IGNORE( iVMSimQueryDialog->VMSimDismissDialogL() ); + iVMSimQueryDialog = NULL; + } + + if ( iQuery ) + { + delete iQuery; + iQuery = NULL; + } + + if ( iVideoQuery ) + { + delete iVideoQuery; + iVideoQuery = NULL; + } + // Type selection query + if ( iTypeSelectionQuery ) + { + delete iTypeSelectionQuery; + iTypeSelectionQuery = NULL; + } + + iVmbxServiceSelection.Close(); + if ( iResourceFileOffset ) + { + iCoeEnv->DeleteResourceFile( iResourceFileOffset ); + iResourceFileOffset = 0; + } + + CloseETel(); + + iUserAlsObserver = NULL; + + // these automatically cancel all observations as well + + iSsSettings.Close(); + + iFlags = 0; + VMBLOGSTRING( "VMBX: RVmbxNumber::Close: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::LoadResourceL +// Loads the resources needed for queries and confirmation notes +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::LoadResourceL() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::LoadResourceL: =>" ); + TFileName fileName; + fileName += KVmbxResourceFileDrive; + fileName += KDC_RESOURCE_FILES_DIR; + fileName += KVmbxResourceFileName; + BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName ); + iResourceFileOffset = iCoeEnv->AddResourceFileL( fileName ); + VMBLOGSTRING( "VMBX: RVmbxNumber::LoadResourceL: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::AllowedToChangeTheNumber +// Check wether the voice mailbox number can be changed +// ----------------------------------------------------------------------------- +// +EXPORT_C TBool RVmbxNumber::AllowedToChangeTheNumber() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::AllowedToChangeTheNumber: =>" ); + TBool ret( ETrue ); + + if ( EUiNmbrChangeNotAllowed & iVmUiOpts ) + { + ret = EFalse; + } + VMBLOGSTRING2( "RVmbxNumber::AllowedToChangeTheNumber \ + iVmUiOpts = %M", iVmUiOpts ); + VMBLOGSTRING( "VMBX: RVmbxNumber::AllowedToChangeTheNumber: <=" ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::HandleNotifyString +// To notify the client about changes for string value keys +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::HandleNotifyString( TUint32 aKey, const TDesC16& aValue ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyString: =>" ); + TInt alsline( EAlsLine1 ); + + // get the current ALS line + if ( GetAlsLine( alsline ) != KErrNone ) + { + alsline = EAlsLine1; // if problems, assume primary line + } + if ( iNotifyCallBack ) + { + TInt notifyLine( 0 ); + + if ( aKey == KVmbxNumberLinePrimary ) + { + notifyLine = EAlsLine1Entry; + } + else if ( aKey == KVmbxNumberLineAuxiliary ) + { + notifyLine = EAlsLine2Entry; + } + + if ( ( iFlags & KVmFlagNotifyOnActiveLineOnly ) && alsline != notifyLine ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyString: \ + Line not notifyline" ); + return; + } + + if ( notifyLine == EAlsLine1Entry || notifyLine == EAlsLine2Entry ) + { + TRAPD( err, iNotifyCallBack->HandleNotifyL( notifyLine, aValue ) ); + if ( err != KErrNone ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyString: \ + Notify handle error" ); + _LIT( KVmbxPanicType,"iNotifyCallBack->HandleNotifyL" ); + User::Panic( KVmbxPanicType, err ); + } + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyString: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::HandleNotifyGeneric +// To notify the client about changes in keys when the whole repository +// is listened for. +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::HandleNotifyGeneric( TUint32 aKey ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyGeneric: =>" ); + if ( aKey == NCentralRepositoryConstants::KInvalidNotificationId ) + { + + // We have to check which keys have changed. + } + else + { + + //Check the key value of the particular key being changed and + //do further processing. + } + + if ( iQuery ) + { + // if the vmbx number is saved,notify to dismiss the query. + iQuery->DismissQueryDlg(); + } + if ( iVideoQuery ) + { + // if the video number is saved,notify to dismiss the query. + iVideoQuery->DismissQueryDlg(); + } + VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyGeneric: <=" ); + } + + +// ----------------------------------------------------------------------------- +// RVmbxNumber::PhoneSettingChanged +// To notify changes in SS settings in phone +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::PhoneSettingChanged( TSSSettingsSetting aSetting, + TInt aNewValue ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::PhoneSettingChanged: =>" ); + TInt alsline( EAlsLine1 ); + if ( aSetting == ESSSettingsAls ) + { + alsline = ( aNewValue == + ESSSettingsAlsAlternate ? EAlsLine2Entry : EAlsLine1Entry ); + + if ( iUserAlsObserver ) + { + TRAP_IGNORE( iUserAlsObserver->HandleAlsChangeL( + ( TVmbxAlsLine ) alsline ) ); + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::PhoneSettingChanged: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetAlsLine +// Fetches ALS line from SS settings +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::GetAlsLine( TInt& aLineNumber ) const + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetAlsLine: =>" ); + aLineNumber = EAlsLine1; + + TInt alsline( ESSSettingsAlsPrimary ); + + TInt ret = CONST_CAST( RVmbxNumber*, this )->iSsSettings.Get( + ESSSettingsAls, alsline ); + + if ( alsline == ESSSettingsAlsAlternate ) + { + aLineNumber = EAlsLine2; + } + VMBLOGSTRING( "VMBX: RVmbxNumber::GetAlsLine: <=" ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::ShowConfirmationNoteL +// Shows confirmation note to user +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::ShowConfirmationNoteL( TInt aResourceId ) const + { + VMBLOGSTRING( "VMBX: RVmbxNumber::ShowConfirmationNoteL: =>" ); + HBufC* prompt = StringLoader::LoadLC( aResourceId, iCoeEnv ); + + CAknConfirmationNote* note = new( ELeave ) CAknConfirmationNote( ETrue ); + + note->ExecuteLD( *prompt ); + + CleanupStack::PopAndDestroy( prompt ); + VMBLOGSTRING( "VMBX: RVmbxNumber::ShowConfirmationNoteL: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::IsValidPhoneNumber +// Validates phone number +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::IsValidPhoneNumber( const TDesC& aNumber ) const + { + VMBLOGSTRING( "VMBX: RVmbxNumber::IsValidPhoneNumber: =>" ); + TBool isValid( EFalse ); + + if ( aNumber.Length() >= KVmPhNumMinLength ) + { + TInt index( 0 ); + TInt digits( 0 ); + + // Skip the possible '*'s and '#'s in the beginning. + while ( index < aNumber.Length() && + ( aNumber[ index ] == '#' || aNumber[ index ] == '*' || + aNumber[ index ] == ' ') ) + { + index++; + } + + // Skip the possible '+'. + if ( index < aNumber.Length() && aNumber[ index ] == '+' ) + { + index++; + } + + // Count the digits. + // For this let's use another index so that the following + // operation will start from the beginning of the actual + // vmbx number + TInt loopindex = index; + + while ( loopindex < aNumber.Length() && + ( aNumber[ loopindex ] >= '0' && aNumber[ loopindex ] <= '9' + || aNumber[ loopindex ] == ' ') ) + { + if ( aNumber[ loopindex ] != ' ' ) + { + digits++; + } + loopindex++; + } + + // Check that there are only allowed characters in the remaining string. + while ( index < aNumber.Length() ) + { + TText t = aNumber[ index ]; + + if ( (t < '0' && t > '9') || t == ' ' ) + { + break; + } + index++; + } + + // If only legal characters were encountered, index is now same as + // the length of the string. + + // phone number part must have 2...41 digits + // '+' is only allowed as the first character in the string + if ( digits >= KVmPhoneNumDigitsMinLength && + digits <= KVmPhoneNumDigitsMaxLength && + index == aNumber.Length()) + { + isValid = ETrue; + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::IsValidPhoneNumber: <=" ); + return isValid; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::IsEmergencyNumberL +// Checks if a number is an emergency number. +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::IsEmergencyNumberL( const TDesC& aNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::IsEmergencyNumberL: =>" ); + TBool isEmergency = EFalse; + + // Emergency Call API does not strip invalid characters like Call UI does, so it is done manually here. + TPhCltTelephoneNumber number( aNumber.Left( KPhCltTelephoneNumberLength ) ); + PhCltUtils::RemoveInvalidChars( number ); + + CPhCltEmergencyCall* emergencyCall = CPhCltEmergencyCall::NewL( this ); + + TInt result = emergencyCall->IsEmergencyPhoneNumber( number, isEmergency ); + delete emergencyCall; + if ( result != KErrNone ) + { + return EFalse; + } + VMBLOGSTRING( "VMBX: RVmbxNumber::IsEmergencyNumberL: <=" ); + return isEmergency; + } + +// --------------------------------------------------------- +// RVmbxNumber::HandleEmergencyDialL() +// --------------------------------------------------------- +// +void RVmbxNumber::HandleEmergencyDialL( const TInt /*aStatus*/ ) + { + // No action + } + + +// ----------------------------------------------------------------------------- +// RVmbxNumber::PhoneBookInfo +// Fetches information about the SIM phonebook for vmbx numbers +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +TInt RVmbxNumber::PhoneBookInfo() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::PhoneBookInfo: =>" ); + TRequestStatus status( KErrNone ); + TInt alsline( EAlsLine1 ); + + // get the current ALS line + if ( GetAlsLine( alsline ) != KErrNone ) + { + alsline = EAlsLine1; // if problems, assume primary line + } + + // This may return KErrInUse if phonebook is being cached + iPhoneBook.GetInfo( status, iPhoneBookInfoPckg ); + User::WaitForRequest( status ); // Wait for asynchronous call to finish + + VMBLOGSTRING2( "VMBX: RVmbxNumber::PhoneBookInfo: \ + SIM Phonebook info read, status: %I", status.Int() ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::PhoneBookInfo: \ + SIM Phonebook write access = %I", + iPhoneBookInfo.iCaps & RMobilePhoneBookStore::KCapsWriteAccess ? 1 : 0); + iFlags &= ~KVmFlagPhonebookBeingCached; + iFlags &= ~KVmFlagSimVmbxNumSupport; + + VMBLOGSTRING2( "MaxNum length from sim: %I", iPhoneBookInfo.iMaxNumLength ); + if ( status == KErrInUse || status == KErrNotReady ) + { + iFlags |= KVmFlagPhonebookBeingCached; + VMBLOGSTRING( "Phonebook Being Cached" ); + } + else if ( status == KErrNone ) + { + //If read access, only then write access possible + if ( iPhoneBookInfo.iCaps & RMobilePhoneBookStore::KCapsReadAccess ) + { + VMBLOGSTRING( "ReadAccess ok" ); + iFlags |= KVmFlagSimReadSupport; + + if ( iPhoneBookInfo.iCaps & RMobilePhoneBookStore::KCapsWriteAccess ) + { + VMBLOGSTRING( "WriteAccess ok" ); + iFlags |= KVmFlagSimWriteSupport; + iFlags |= KVmFlagSimVmbxNumSupport; + } + // Sim access rights are tested only in start up + if ( iStartUpTest ) + { + TestAndSetSimAccessFlags(); + } + } + //As there is no sim support set the memory to phone memory + else + { + // No write capability and line1 in use + if ( ( iMemoryLocation != EVmbxPhoneMemory ) && + ( alsline == EAlsLine1 ) ) + { + iMemoryLocation = EVmbxPhoneMemory; + iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory ); + } + iFlags &= ~KVmFlagSimReadSupport; + } + } + // no caps fetched + else + { + if ( ( iMemoryLocation != EVmbxPhoneMemory ) && + ( alsline == EAlsLine1 ) ) + {//as there is no sim support set the memory to phone memory + iMemoryLocation = EVmbxPhoneMemory; + iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory ); + } + iFlags &= ~KVmFlagSimReadSupport; + VMBLOGSTRING( "USim not supported" ); + status = KErrNone; + } + VMBLOGSTRING( "VMBX: RVmbxNumber::PhoneBookInfo: <=" ); + return status.Int(); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::IsReadOnlySIM +// Checks if writing to sim is prohibited +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::IsReadOnlySIM() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::IsReadOnlySIM. =>" ); + + TBool readOnlySIM = EFalse; + iSession->Get( KReadOnlySim, readOnlySIM ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::IsReadOnlySIM: \ + read only flag = %I", readOnlySIM ); + return readOnlySIM; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::DoPhonebookOperation +// Does a vmbx phonebook operation +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::DoPhonebookOperation( TVmbxPhonebookOperation aOperation, + TVmbxEntry* aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::DoPhonebookOperation: =>" ); + TInt result( KErrNone ); + TInt retryCounter( KVmbxPhonebookRetriesIfInUse ); + + FOREVER + { + retryCounter--; + + switch ( aOperation ) + { + case EVmbxPhonebookGetInfo: + { + result = PhoneBookInfo(); + break; + } + case EVmbxPhonebookRead: + { + TRAPD( readErr, PhonebookReadL( *aEntry ) ); + if ( readErr != KErrNone && readErr != KErrNotFound ) + { + result = KErrNotSupported; + } + break; + } + case EVmbxPhonebookWrite: + { + result = PhonebookWrite( *aEntry ); + break; + } + case EVmbxPhonebookDelete: + { + result = PhonebookDelete( *aEntry ); + break; + } + default: + { + __ASSERT_DEBUG( 0, User::Panic( KVmbxPanicCategory, + EVmbxUnhandledOperation) ); + break; + } + } + + if ( result != KErrInUse || retryCounter <= 0 ) + { + break; + } + + iFlags |= KVmFlagPhonebookBeingCached; + User::After( KVmbxPhonebookRetryDelay ); + } + // set readonly state if aquired + if ( IsReadOnlySIM() ) + { + iFlags &= ~KVmFlagSimWriteSupport; + VMBLOGSTRING( "VMBX: RVmbxNumber::DoPhonebookOperation: ReadOnly set" ); + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::DoPhonebookOperation: <=" ); + return result; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::PhonebookReadL +// Reads an entry from the ICC-based phonebook +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +void RVmbxNumber::PhonebookReadL( TVmbxEntry& aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: =>" ); + TRequestStatus status( KErrNone ); + TInt numEntries( 1 ); + TBuf8 pbData; + pbData.FillZ(); + pbData.Zero(); + TInt result( KErrNone ); + + // Reset variables + iNumberFound = EFalse; + if ( iAlphaStringFound ) + { + delete iAlphaStringFromSIM; + iAlphaStringFromSIM = NULL; + } + iAlphaStringFound = EFalse; + + TInt lineNumber( EAlsLine1 ); + if ( KErrNone != GetAlsLine( lineNumber ) ) + { + lineNumber = EAlsLine1; + } + + if ( ( iPhoneBookType == EMBDNPhoneBook ) && ( EAlsLine1 == lineNumber ) ) + { + VMBLOGSTRING( "start MBDN PhoneBook read" ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::PhonebookReadL: \ + iPhoneVoicemailInfo.iVoice = %I", iPhoneVoicemailInfo.iVoice ); + iPhoneBook.Read( status, iPhoneVoicemailInfo.iVoice, + numEntries, pbData ); + } + else + { + // Record#1 in sim is for line1 number and Record#2 in sim is for + // line2 number so line is used to fetch + VMBLOGSTRING( "start VMBX PhoneBook read" ); + iPhoneBook.Read( status, aEntry.iIndex, numEntries, pbData ); + } + + User::WaitForRequest( status ); // Wait for asynchronous call to finish + VMBLOGSTRING2( "PhoneBook read status = %I", status.Int() ); + + if ( status == KErrNone || status == KErrNotFound ) + { + if ( pbData.Length() ) + { + // -> Search Tags "ETagPBNumber" and "ETagPBText" + // and read (decode) them + TUint8 tagValue(0); + CPhoneBookBuffer::TPhBkTagType dataType( + CPhoneBookBuffer::EPhBkTypeNoData ); + + CPhoneBookBuffer* pbkBuffer = NULL; + TRAPD( err, pbkBuffer = new(ELeave) CPhoneBookBuffer() ); + if ( err != KErrNone ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: \ + Phonebook creation error" ); + User::Leave( err ); + } + + pbkBuffer->Set( &pbData ); + pbkBuffer->StartRead(); + + // Read first "new-entry-tag" + result = pbkBuffer->GetTagAndType( tagValue, dataType ); + + if ( result != KErrNone || tagValue != RMobilePhoneBookStore::ETagPBNewEntry) + { + delete pbkBuffer; + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: \ + Unknown error" ); + User::Leave( KErrUnknown ); // Something wrong in TLV + } + + // search number and text fields from TLV entry + result = pbkBuffer->GetTagAndType( tagValue, dataType ); + + while ( result == KErrNone && pbkBuffer->RemainingReadLength() > 0 ) + { + VMBLOGSTRING2("VMBX: RVmbxNumber::PhonebookReadL(): tagValue: %d", tagValue ) + VMBLOGSTRING2("VMBX: RVmbxNumber::PhonebookReadL(): dataType: %d", dataType ) + + // Check for text field + if ( tagValue == RMobilePhoneBookStore::ETagPBText ) + { + // Alpha string field found from TLV entry, + // assuming 16bit data + TPtrC16 alphaPtrC; + result = pbkBuffer->GetValue( alphaPtrC ); + if ( result == KErrNone ) + { + iAlphaStringFromSIM = alphaPtrC.AllocL(); + iAlphaStringFound = ETrue; + VMBLOGSTRING2("VMBX: RVmbxNumber::PhonebookReadL(): iAlphaStringFromSIM: %S", iAlphaStringFromSIM ) + } + } + // Check for number field + else if ( tagValue == RMobilePhoneBookStore::ETagPBNumber ) + { + // Number field found from TLV entry, assuming 16bit data + TPtrC16 numberPtrC; + result = pbkBuffer->GetValue( numberPtrC ); + iNumberFound = ETrue; + VMBLOGSTRING("VMBX: RVmbxNumber::PhonebookReadL(): ETagPBNumber found."); + + if ( result == KErrNone ) + { + // Error code is returned if number not fit to + // local buffer. + if ( numberPtrC.Length() > aEntry.iTelNumber.MaxLength() ) + { + delete pbkBuffer; + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: \ + Overflow error" ); + User::Leave( KErrOverflow ); + } + else + { + // copy number to local buffer + aEntry.iTelNumber.Copy( numberPtrC ); + VMBLOGSTRING2("VMBX: RVmbxNumber::PhonebookReadL(): ETagPBNumber found. Number: %S", &aEntry.iTelNumber ); + } + } + } + else + { + // skip field + pbkBuffer->SkipValue( dataType ); + } + // Read next field type + result = pbkBuffer->GetTagAndType( tagValue, dataType ); + } + + // Number and Alpha fields not found from TLV entry + if ( !iAlphaStringFound && !iNumberFound ) + { + delete pbkBuffer; + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: \ + Not found error" ); + User::Leave( KErrNotFound ); + } + delete pbkBuffer; + } + else + { + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: Not found error" ); + iNumberFromSim.FillZ(); + iNumberFromSim.Zero(); + User::Leave( KErrNotFound ); + } + } + else + { + // sim read-only and number fetched by GetPhonebookInfo + // so return number + if ( iNumberFromSim.Length() && !( iFlags & KVmFlagSimWriteSupport ) ) + { + aEntry.iTelNumber.Copy( iNumberFromSim ); + iMemoryLocation = EVmbxPhoneMemory; + iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory ); + VMBLOGSTRING2( "Number value = %S", &iNumberFromSim ); + VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation ); + VMBLOGSTRING( "Startuptest ongoing, read only sim, number fetched" ); + } + else + { + User::Leave( status.Int() ); + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::PhonebookWrite +// Writes an entry into ICC-based phonebook +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +TInt RVmbxNumber::PhonebookWrite( TVmbxEntry& aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookWrite: =>" ); + TRequestStatus status( KErrNone ); + TBuf8 pbData; + pbData.FillZ(); + + CPhoneBookBuffer* pbkBuffer = NULL; + TRAPD( err, pbkBuffer = new(ELeave) CPhoneBookBuffer() ); + if (err != KErrNone) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookWrite: \ + Phonebook creation error" ); + return err; + } + + pbkBuffer->Set( &pbData ); + + // New entry + status = pbkBuffer->AddNewEntryTag(); + + // Add index + // Type of index is TUint16 in Multimode ETel and TInt in old ETel. + status = pbkBuffer->PutTagAndValue( RMobilePhoneBookStore::ETagPBAdnIndex, + (TUint16)aEntry.iIndex ); + + // Add name if it existed on SIM card + // Type of ETagPBText is TDes16 + if ( iAlphaStringFound ) + { + status = pbkBuffer->PutTagAndValue( RMobilePhoneBookStore::ETagPBText, + *iAlphaStringFromSIM ); + } + + // Add number + // Type of ETagPBNumber is TDes16 + status = pbkBuffer->PutTagAndValue( RMobilePhoneBookStore::ETagPBNumber, + aEntry.iTelNumber ); + if ( iPhoneBookType == EMBDNPhoneBook ) + { + TInt index = iPhoneVoicemailInfo.iVoice; + VMBLOGSTRING2( "VMBX: RVmbxNumber::PhonebookWrite: \ + iPhoneVoicemailInfo.iVoice index = %I", index ); + iPhoneBook.Write( status, pbData, index ); + VMBLOGSTRING( "Mbdn writing" ); + } + else + { + iPhoneBook.Write( status, pbData, aEntry.iIndex ); + VMBLOGSTRING( "6f17 writing" ); + } + User::WaitForRequest( status ); // Wait for asynchronous call to finish + VMBLOGSTRING2( "PhonebookWrite: status=%I", status.Int() ); + + delete pbkBuffer; + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookWrite: <=" ); + return status.Int(); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::PhonebookDelete +// Removes an entry from ICC-based phonebook +// ----------------------------------------------------------------------------- +// +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +TInt RVmbxNumber::PhonebookDelete( TVmbxEntry& aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookDelete: =>" ); + TInt lineNumber( EAlsLine1 ); + if ( KErrNone != GetAlsLine( lineNumber ) ) + { + lineNumber = EAlsLine1; + } + + TRequestStatus status( KErrNone ); + if ( ( iPhoneBookType == EMBDNPhoneBook ) && ( EAlsLine1 == lineNumber ) ) + { + TInt index = iPhoneVoicemailInfo.iVoice; + iPhoneBook.Delete( status, index ); + } + else + { + iPhoneBook.Delete( status, aEntry.iIndex ); + } + User::WaitForRequest( status ); // Wait for asynchronous call to finish + VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookDelete: <=" ); + return status.Int(); + } + + +// ----------------------------------------------------------------------------- +// RVmbxNumber::FetchNumberFromPhonebook2L +// Create and show Phonebook's Single Fetch Dialog +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::FetchNumberFromPhonebook2L( TDes& aPhoneNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::FetchNumberFromPhonebook2L: =>" ); + + CPhCntFactory* contactFactory = CreateCntFactoryL(); + CleanupStack::PushL( contactFactory ); + iCntFetch = NULL; + iCntFetch = contactFactory->CreateSingleItemFetchL(); + CPhCntSelection* contactSelect = NULL; + + TRAPD( error, contactSelect = iCntFetch->SelectPhoneNumberLD() ); + // Task swapper close activated + if ( error != KErrNone ) + { + contactSelect = NULL; + iCntFetch = NULL; + User::Leave( error ); //close application + } + + // This check is needed because contactselect is NULL in case of user + // presses back in contact fetch dialog. It will NOT leave. + if ( contactSelect ) + { + if ( contactSelect->Number().Length() ) + { + aPhoneNumber = contactSelect->Number().Left( KVmbxMaxNumberLength ); + } + delete contactSelect; + contactSelect = NULL; + } + + iCntFetch = NULL; + CleanupStack::PopAndDestroy( contactFactory ); + + //for removing special chars from number fetched from phone book + TText ch = 0; + TInt len = aPhoneNumber.Length(); + for ( TInt cnt = 0; cnt < len; cnt++ ) + { + ch = aPhoneNumber[cnt]; + switch ( ch ) + { + case '(': + case ')': + case '-': + case ' ': + { + aPhoneNumber.Delete( cnt, 1 ); + cnt--; + len = aPhoneNumber.Length(); + break; + } + default: + break; + } + } + + + VMBLOGSTRING( "VMBX: RVmbxNumber::FetchNumberFromPhonebook2L: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetVmNumFromSIM +// Retrieves voice mailbox number from SIM/R-UIM +// ----------------------------------------------------------------------------- +// +#ifdef VM_USE_TSY +TInt RVmbxNumber::GetVmNumFromSIM( TDes& aNumber, TInt aLineNumber ) +#else +TInt RVmbxNumber::GetVmNumFromSIM( TDes& /*aNumber*/, TInt /*aLineNumber*/ ) +#endif + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromSIM: =>" ); + TInt ret( KErrNotFound ); + +#ifdef VM_USE_TSY + + if ( iFlags & KVmFlagPhonebookBeingCached ) + { + ret = DoPhonebookOperation( EVmbxPhonebookGetInfo ); + + if ( ret != KErrNone ) + { + VMBLOGSTRING2( "DoPhonebookOperation getinfo retval = %I", ret ); + return ret; + } + } + + // Now we have SIM support information updated + if ( iFlags & KVmFlagSimReadSupport ) + { + TVmbxEntry entry; + entry.iIndex = aLineNumber; // 1 or 2 + ret = DoPhonebookOperation( EVmbxPhonebookRead, &entry ); + VMBLOGSTRING3( "VMBX: RVmbxNumber::GetVmNumFromSIM: \ + Read SIM entry %I, status: %I", aLineNumber, ret ); + + if ( ret == KErrNone ) + { + if ( !entry.iTelNumber.Length() ) + { + ret = KErrNotFound; + } + else + { + aNumber.Copy( entry.iTelNumber ); + } + } + } + else + { + ret = KErrNotSupported; + } + + if ( IsEmergencyNumberL( aNumber ) ) + { + aNumber.Zero(); + ret = KErrNotFound; + } + + VMBLOGSTRING2( "Number = %S", &aNumber ); +#endif // VM_USE_TSY + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromSIM: <=" ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetVmNumFromVMN +// Retrieves voice mailbox number from VMN summary info +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::GetVmNumFromVMN( TDes& aNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromVMN: =>" ); + TBuf number; + TInt ret( KErrNotFound ); + TInt value = 0; + + ret = iSession->Get( KVmSummaryInfoIsSet, value ); + + if ( !ret && value == 1 ) + { + ret = iSession->Get( KVmCallbackNumber, number ); + if ( !ret ) + { + if ( number.Length() ) + { + aNumber.Copy( number ); + } + else + { + ret = KErrNotFound; + } + } + } + + if ( IsEmergencyNumberL( aNumber ) ) + { + aNumber.Zero(); + ret = KErrNotFound; + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromVMN: <=" ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetVmNumFromNamStore +// Retrieves voice mailbox number from NAM +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::GetVmNumFromNamStore( TDes& aNumber, TInt aNumType ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromNamStore: =>" ); + TRequestStatus ret( KErrNotFound ); + RMobileNamStore namStore; + + ret = namStore.Open( iPhone ); + if ( ret != KErrNone ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromNamStore: \ + NameStore error %I, ret.Int()" ); + return ret.Int(); + } + + RMobileNamStore::TMobileNamStoreInfoV1 namInfo; + RMobileNamStore::TMobileNamStoreInfoV1Pckg namInfoPckg( namInfo ); + + namStore.GetInfo( ret, namInfoPckg ); + User::WaitForRequest( ret ); + if ( ret == KErrNone ) + { + RMobileNamStore::TMobileNamEntryV1 namEntry; + RMobileNamStore::TMobileNamEntryV1Pckg namEntryPckg( namEntry ); + + namEntry.iNamId = namInfo.iActiveNam; + + switch ( aNumType ) + { + case EVmbxMDN: + { + namEntry.iParamIdentifier = KVmNamStoreMDNId; + break; + } + case EVmbxMIN: + { + namEntry.iParamIdentifier = KVmNamStoreMINId; + break; + } + default: + break; + } + + namStore.Read( ret, namEntryPckg ); + User::WaitForRequest( ret ); + if ( ret == KErrNone ) + { + ret = CnvUtfConverter::ConvertToUnicodeFromUtf8( + aNumber, // Unicode + namEntry.iData ); // Utf8 + } + } + + if ( IsEmergencyNumberL( aNumber ) ) + { + aNumber.Zero(); + ret = KErrNotFound; + } + + namStore.Close(); + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromNamStore: <=" ); + return ret.Int(); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetVmNumFromSD +// Retrieves voice mailbox number from Shared Data +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::GetVmNumFromSD( TDes& aNumber, TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromSD: =>" ); + TBuf< KVmbxMaxNumberLength > number; + TInt ret( KErrNotFound ); + + TUint32 keyword = aLineNumber == + EAlsLine1Entry?KVmbxNumberLinePrimary: KVmbxNumberLineAuxiliary; + ret = iSession->Get( keyword, number ); + + if ( !ret ) + { + if ( number.Length() ) + { + aNumber.Copy( number ); + } + else + { + ret = KErrNotFound; + } + } + if ( IsEmergencyNumberL( aNumber ) ) + { + aNumber.Zero(); + ret = KErrNotFound; + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromSD: <=" ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::CloseETel +// Closes all ETel resources +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::CloseETel() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::CloseETel: =>" ); + iPhoneBook.Close(); + + if ( iFlags & KVmFlagPhoneOpened ) + { + iPhone.Close(); + } + + if ( iFlags & KVmFlagPhoneModuleLoaded ) + { + iTelServer.UnloadPhoneModule( KMmTsyModuleName ); + } + iTelServer.Close(); + + // Clear corresponding flags + iFlags &= ~KVmFlagSimReadSupport; + iFlags &= ~KVmFlagSimWriteSupport; + iFlags &= ~KVmFlagPhoneModuleLoaded; + iFlags &= ~KVmFlagPhoneOpened; + iFlags &= ~KVmFlagPhonebookBeingCached; + VMBLOGSTRING( "VMBX: RVmbxNumber::CloseETel: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::AppendStrToArrayL +// Appends string from resourse to descriptor array +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::AppendStrToArrayL( TInt aResourceId, CDesCArray& aArray ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::AppendStrToArrayL: =>" ); + HBufC* tmp = StringLoader::LoadLC( aResourceId, iCoeEnv ); + aArray.AppendL( *tmp ); + CleanupStack::PopAndDestroy( tmp ); + VMBLOGSTRING( "VMBX: RVmbxNumber::AppendStrToArrayL: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SetHeaderFromResourceL +// Set query dialog header text from resource string +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::SetHeaderFromResourceL( TInt aResourceId, + CAknQueryDialog& aDlg ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SetHeaderFromResourceL: =>" ); + HBufC* headingText = StringLoader::LoadLC( aResourceId, iCoeEnv ); + aDlg.SetHeaderTextL( *headingText ); + CleanupStack::PopAndDestroy( headingText ); + VMBLOGSTRING( "VMBX: RVmbxNumber::SetHeaderFromResourceL: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::QueryAddressL +// Fetches Voip address (returns ETrue when success) +// ----------------------------------------------------------------------------- +// +EXPORT_C TBool RVmbxNumber::QueryAddressL( TVmbxQueryType /*aQueryType*/, + TDes& /*aNumber*/ ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryAddressL: =>" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryAddressL: METHOD NOT SUPPORTED ANYMORE" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryAddressL: <=" ); + return EFalse; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SelectTypeL +// Select which type of Vmbx +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::SelectTypeL( TBool aTitle ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: =>" ); + if ( !AllowedToChangeTheNumber() && EVmbxDefine == aTitle ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: \ + Not Allow to define voice mail number" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" ); + return EVmbxNone; + } + + if ( VideoSupported() ) + { + TInt index( 0 ); + + RArray vmbxTypeArray; + CleanupClosePushL( vmbxTypeArray ); + + iTypeSelectionQuery = CVmListQueryDialog::NewL( &index ); + iTypeSelectionQuery->PrepareLC( R_MAILBOX_LISTQUERY ); + + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: Not only Voice" ); + + // Select which type voice mailbox number to call, CS or Video + if ( EVmbxCall == aTitle ) + { + // Set prompt + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: aTitle = call" ); + + SetHeaderFromResourceL( R_CALLTO_LBX_PROMPT, *iTypeSelectionQuery ); + + // Fill items to array + CDesCArrayFlat* lbxItems = + new (ELeave) CDesCArrayFlat( KVmLbxItemsArraySize ); + CleanupStack::PushL( lbxItems ); + + TBuf vmbxNumber; + + // Check CS number + if ( KErrNone == GetVmbxNumber( vmbxNumber ) ) + { + AppendStrToArrayL( R_CALLTO_LBX_CS_MAILBOX_ITEM, *lbxItems ); + User::LeaveIfError( vmbxTypeArray.Append( EVmbx ) ); + iType = EVmbx; + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: EVmbx" ); + } + // Check Video number + if ( VideoSupported() && + KErrNone == GetVideoMbxNumber( vmbxNumber ) ) + { + AppendStrToArrayL( R_CALLTO_LBX_VIDEO_MAILBOX_ITEM, + *lbxItems ); + User::LeaveIfError( vmbxTypeArray.Append( EVmbxVideo ) ); + iType = EVmbxVideo; + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: EVmbxVideo" ); + } + + iTypeSelectionQuery->SetItemTextArray( lbxItems ); + // vest ownership to lbx + iTypeSelectionQuery->SetOwnershipType( ELbmOwnsItemArray ); + CleanupStack::Pop( lbxItems ); + } + // Select which type of VMBX number to define, CS or Video + else + { + // Set prompt + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: aTitle = define" ); + + SetHeaderFromResourceL( R_DEFINE_VIDEO_OR_VOICE_LBX_PROMPT, + *iTypeSelectionQuery ); + + // Fill items to array + CDesCArrayFlat* lbxItems = + new (ELeave) CDesCArrayFlat( KVmLbxItemsArraySize ); + CleanupStack::PushL( lbxItems ); + + AppendStrToArrayL( R_DEFINE_LBX_CS_MAILBOX_ITEM, *lbxItems ); + User::LeaveIfError( vmbxTypeArray.Append( EVmbx ) ); + + if ( VideoSupported() ) + { + AppendStrToArrayL( R_DEFINE_LBX_VIDEO_MAILBOX_ITEM, + *lbxItems ); + User::LeaveIfError( vmbxTypeArray.Append( EVmbxVideo ) ); + } + + iTypeSelectionQuery->SetItemTextArray( lbxItems ); + // vest ownership to lbx + iTypeSelectionQuery->SetOwnershipType( ELbmOwnsItemArray ); + CleanupStack::Pop( lbxItems ); + } + + VMBLOGSTRING2( "VMBX: RVmbxNumber::SelectTypeL array count %d", + vmbxTypeArray.Count()); + + if ( ( EVmbxCall == aTitle ) && + ( KVmbxOnlyDefinedOneNumber == vmbxTypeArray.Count() ) ) + { + // call directly + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: Only one" ); + CleanupStack::PopAndDestroy( iTypeSelectionQuery ); + } + else + { + if ( iTypeSelectionQuery->RunLD() ) + { + iType = vmbxTypeArray[ index ]; + } + else + { + iType = EVmbxNone; + } + } + + iTypeSelectionQuery = NULL; + //close and destroy vmbxTypeArray + CleanupStack::PopAndDestroy( &vmbxTypeArray ); + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" ); + return iType; + } + // Only supported CS + else + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" ); + return EVmbx; + } + } + + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SaveVmbxAddressL +// Save voice mailbox address to RCSC +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::SaveVmbxAddressL( TDes& /*aAddress*/ ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxAddressL(TDes& aAddress): Method deprecated" ); + return KErrNotSupported; + } + + +// ---------------------------------------------------------------------------- +// RVmbxNumber::IsVoIPProfilesFound +// Check if VoIP profiles is found. +// ---------------------------------------------------------------------------- +// +EXPORT_C TBool RVmbxNumber::IsVoIPProfilesFound() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::IsVoIPProfilesFound" ); + + return iVmSpsHandler->IsVoIPProfilesFound(); + } + + +EXPORT_C TBool RVmbxNumber::IsIpVoiceMailboxServices() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::IsIpVoiceMailboxServices: =>" ); + + TBool ret( EFalse ); + + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + RArray profileIds; + + GetServiceIds( profileIds ); + + TInt count = profileIds.Count(); + + profileIds.Close(); + + if ( count > 0 ) + { + ret = ETrue; + } + else + { + ret = EFalse; + } + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::IsIpVoiceMailboxServices: <=" ); + return ret; + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::IsSimMemory +// Returns if the memory location for vmbx is sim memory +// ---------------------------------------------------------------------------- +// +EXPORT_C TBool RVmbxNumber::IsSimMemory() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::IsSimMemory: =>" ); + TBool ret( EFalse ); + TInt alsLine( EAlsLine1 ); + // get the current ALS line + if ( GetAlsLine( alsLine ) != KErrNone ) + { + alsLine = EAlsLine1; // if problems, assume primary line + } + if ( iSimCardFound ) + { + // if number automatically fetched from read only SIM + // or ALS2 is active + if ( ( !( iFlags & KVmFlagSimWriteSupport ) ) || EAlsLine2 == alsLine ) + { + ret = ( !UserEditNumber( alsLine ) && + !IsPhoneMemForcedEdit( alsLine ) ); + } + // if number stored in writable SIM + else + { + ret = UsesSimMemory(); + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::IsSimMemory: <=" ); + VMBLOGSTRING3( "VMBX: RVmbxNumber::IsSimMemory: sim memory is used \ + iSimCardFound: %I, ret: %I", iSimCardFound, ret ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetVideoMbxNumber +// Fetches the specified video mailbox number +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::GetVideoMbxNumber( TDes& aNumber, + TVmbxNumberEntry aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVideoMbxNumber: =>" ); + TInt ret = VideoSupported(); + + if ( ret ) + { + TInt lineNumber( aEntry ); + TBuf< KVmbxMaxNumberLength > number; + if ( EAlsActiveLineEntry == aEntry ) + { + // get the current ALS line + if ( KErrNone != GetAlsLine( lineNumber ) ) + { + lineNumber = EAlsLine1; // if problems, assume primary line + } + } + + TUint32 keyword = lineNumber == + EAlsLine1Entry ? KVideoMbxNumberLinePrimary : KVideoMbxNumberLineAuxiliary; + ret = iSession->Get( keyword, number ); + + if ( KErrNone == ret ) + { + if ( number.Length() ) + { + aNumber.Copy( number ); + } + else + { + ret = KErrNotFound; + } + } + + if ( IsEmergencyNumberL( aNumber ) ) + { + aNumber.Zero(); + ret = KErrNotFound; + } + } + else + { + ret = KErrNotFound; + } + VMBLOGSTRING2( "VMBX: RVmbxNumber::GetVideoMbxNumber:<=\ + Video supported = %d", ret ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::QueryVideoMbxNumberL +// Queries a video mailbox number +// ----------------------------------------------------------------------------- +// +EXPORT_C TBool RVmbxNumber::QueryVideoMbxNumberL( TVmbxQueryType aQueryType, + TDes& aNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: =>" ); + TBool result( EFalse ); + + __ASSERT_DEBUG( aNumber.MaxLength() >= KVmbxMaxNumberLength, + User::Panic(KVmbxPanicCategory, EVmbxDescriptorTooSmall) ); + __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength, + User::Panic(KVmbxPanicCategory, EVmbxNumberTooLong) ); + + if ( !AllowedToChangeTheNumber() ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: \ + Video number not allowed to change" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: <=" ); + User::Leave( KErrAccessDenied ); + } + + TBuf< KVmbxMaxNumberLength > number; + TBool thisClosed( EFalse ); + // Close() sets thisClosed to ETrue + + FOREVER + { + number.Copy( aNumber ); + + // get the correct query prompt from resource file + HBufC* prompt = StringLoader::LoadLC( + ( aQueryType == EVmbxNotDefinedQuery ? + R_VIDEO_DEFINE_NUMBER_PROMPT : + R_VIDEO_CHANGE_NUMBER_PROMPT), + iCoeEnv ); + + iClosedPtr = &thisClosed; + + // Convert output to accommodate the current locale + AknTextUtils::LanguageSpecificNumberConversion( number ); + + TInt ret; // return value of the query + TBool searchUsed; // ETrue to open the query again after + //closing single fetch dialog + + // enable search if number length is 0 + TBool searchEnabled( number.Length() ? EFalse : ETrue ); + + do + { + // show query with the correct prompt + iVideoQuery = CVmTextQueryDialog::NewL( number, + *prompt, searchEnabled ); + + ret = iVideoQuery->ExecuteLD( R_VMBX_NUMBER_QUERY ); + + iVideoQuery = NULL; + searchUsed = EFalse; + + if ( searchEnabled && ret && !number.Length() ) + { + searchUsed = ETrue; + // Show phonebook's single fetch dialog + TRAPD( error, FetchNumberFromPhonebook2L( number ) ); + + // user has pressed End Key + if ( thisClosed ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: \ + End key pressed" ); + CleanupStack::PopAndDestroy( prompt ); + return EFalse; + } + + if ( error ) // Back pressed in Contact UI + { + // Now the phone book fetch dialog + // was closed, get out of the loop + ret = EFalse; + break; + } + } + } while( searchUsed ); + + iClosedPtr = NULL; + + CleanupStack::PopAndDestroy( prompt ); + + if ( ret ) + { + if ( !number.Length() ) + { + User::LeaveIfError( SaveVideoMbxNumber( number, + EAlsActiveLineEntry ) ); + aNumber.Copy( number ); + + // show "not defined" note + ShowConfirmationNoteL( R_VIDEO_NOTE_EMPTY_NUMBER ); + result = ETrue; + break; + } + + // Convert back to western digits + ConvertToWesternDigits( number ); + + // check the given number here (emergency numbers not allowed) + if ( IsValidPhoneNumber( number ) && !IsEmergencyNumberL( number ) ) + { + TInt status = SaveVideoMbxNumber( number, EAlsActiveLineEntry ); + + if ( status == KErrNone ) + { + aNumber.Copy( number ); + ShowConfirmationNoteL( R_VIDEO_SAVED_NOTE ); + result = ETrue; + break; + } + } + + if ( !result ) + { + // show "invalid number" note and wait for a short timeout + prompt = StringLoader::LoadLC( R_INVALID_NUMBER_NOTE, iCoeEnv ); + + iClosedPtr = &thisClosed; + + CAknInformationNote* note = + new( ELeave ) CAknInformationNote( ETrue ); + note->ExecuteLD( *prompt ); + + iClosedPtr = NULL; + + CleanupStack::PopAndDestroy( prompt ); + + if ( !thisClosed ) + { + continue; // the number was invalid -> query again. + } + } + } + break; // user canceled the query + } + VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: <=" ); + return result; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SaveVideoMbxNumber +// Saves the vmbx number. (in phone file system) +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::SaveVideoMbxNumber( const TDesC& aNumber, + TVmbxNumberEntry aEntry ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVideoMbxNumber: =>" ); + TInt error( KErrNone ); + __ASSERT_DEBUG( iFlags & KVmFlagOpened, + User::Panic(KVmbxPanicCategory, EVmbxNotConnected) ); + __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength, + User::Panic(KVmbxPanicCategory, EVmbxNumberTooLong) ); + + TInt lineNumber( aEntry ); + if ( aEntry == EAlsActiveLineEntry ) + { + // get the current ALS line + if ( GetAlsLine( lineNumber ) != KErrNone ) + { + lineNumber = EAlsLine1; // if problems, assume primary line + } + } + TUint32 keyword = lineNumber == + EAlsLine1Entry ? KVideoMbxNumberLinePrimary: KVideoMbxNumberLineAuxiliary; + + error = iSession->Set( keyword, aNumber ); + if ( !error ) + { + // Client will generate the event itself on request. + if ( iFlags & KVmFlagNotifyRequested ) + { + HandleNotifyString( keyword, aNumber ); + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVideoMbxNumber: <=" ); + return error; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::IsUsimSupport +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// Series 60 Customer / MSatRefreshOserver +// Series 60 MSatRefreshObserver API +// ----------------------------------------------------------------------------- +TBool RVmbxNumber::AllowRefresh( + TSatRefreshType aType, const TSatRefreshFiles& aFiles ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::AllowRefresh: =>" ); + TBool allowRefresh( ETrue ); + if ( aType == EFileChangeNotification ) + { + const TInt elFile1( aFiles.Locate( KMbdnEf ) ); + const TInt elFile2( aFiles.Locate( KMbiEf) ); + + if ( ( KErrNotFound == elFile1) && + ( KErrNotFound == elFile2 ) ) + { + allowRefresh = EFalse; + } + + } + else + { + allowRefresh = EFalse; + } + VMBLOGSTRING( "VMBX: RVmbxNumber::AllowRefresh: <=" ); + return allowRefresh; + } + +// ----------------------------------------------------------------------------- +// Series 60 Customer / MSatRefreshOserver +// Series 60 MSatRefreshObserver API +// ----------------------------------------------------------------------------- + void RVmbxNumber::Refresh( TSatRefreshType aType, + const TSatRefreshFiles& aFiles ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::Refresh: =>" ); + if ( aType == EFileChangeNotification ) + { + const TInt elFile1( aFiles.Locate( KMbdnEf ) ); + const TInt elFile2( aFiles.Locate( KMbiEf ) ); + + if ( ( KErrNotFound != elFile1) || ( KErrNotFound != elFile2 ) ) + { + //do phone book getInfo + TInt error( KErrNone ); + error = DoPhonebookOperation( EVmbxPhonebookGetInfo ); + if ( !error ) + { + TVmbxEntry entry; + entry.iIndex = 1; + TInt ret = DoPhonebookOperation( EVmbxPhonebookRead, &entry ); + + // Notify SAT Server that refresh initiated file read is done + iRSatClient.RefreshEFRead( EFalse ); + + if ( ( iNotifyCallBack ) && ( entry.iTelNumber.Length() > 0 ) + && ( iMemoryLocation == EVmbxSimMemory ) ) + { + TInt notifyLine( 0 ); + TRAPD( err, iNotifyCallBack->HandleNotifyL( notifyLine, + entry.iTelNumber ) ); + if ( err ) + { + _LIT(KVmbxPanicType,"iNotifyCallBack->HandleNotifyL"); + User::Panic( KVmbxPanicType, err ); + } + } + } + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::Refresh: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::MailboxNumbersIdentifiers +// Gets identifiers of the records in sim from MBI-file in sim +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::MailboxNumbersIdentifiers() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::MailboxNumbersIdentifiers: =>" ); + TRequestStatus status; + + // Get identifiers + iPhone.GetMailboxNumbers( status, iPhoneVoicemailInfoPckg ); + + // Wait for asynchronous call to finish + User::WaitForRequest( status ); + VMBLOGSTRING2( "Identifier read status = %I", status.Int() ); + VMBLOGSTRING2( "iVoice value: %d", iPhoneVoicemailInfo.iVoice ); + VMBLOGSTRING( "VMBX: RVmbxNumber::MailboxNumbersIdentifiers: <=" ); + return status.Int(); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::MailboxNumbersIdentifiers +// Gets identifiers of the records in sim from MBI-file in sim +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::TestAndSetSimAccessFlags() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::TestAndSetSimAccessFlags: =>" ); + // Caps are not valid for read-only Sim, so check if writing + // to sim fails. + // Assume that a number exist + iNoNumberFound = EFalse; + TBool isTestNumberUsed = EFalse; + // read sim data first + TVmbxEntry entry; + entry.iIndex = EAlsLine1; + + TInt readError = DoPhonebookOperation( EVmbxPhonebookRead, &entry ); + + // KErrNotFound is returned when number length is zero, then + // testnumber is used to test write support + if ( readError == KErrNone || readError == KErrNotFound ) + { + // save number for later use + if ( entry.iTelNumber.Length() ) + { + iNumberFromSim.Copy( entry.iTelNumber ); + } + // number not found, test with testnumber + else if ( entry.iTelNumber.Length() == 0 ) + { + // no number found + iNoNumberFound = ETrue; + VMBLOGSTRING( "Use test number for testing write support" ); + entry.iTelNumber.Copy( KTestNumber ) ; + isTestNumberUsed = ETrue; + } + + VMBLOGSTRING( "Try writing" ); + + TInt writeError = DoPhonebookOperation( EVmbxPhonebookWrite, &entry ); + VMBLOGSTRING2( "Write: %I", writeError ); + + // write error, set write flag to not supported + // and phone memory in use + if ( writeError ) + { + VMBLOGSTRING( "WriteAccess not ok" ); + iFlags &= ~KVmFlagSimWriteSupport; + } + // tested with and sim has write access so delete test number from sim + else if ( isTestNumberUsed && writeError == KErrNone ) + { + VMBLOGSTRING( "Remove test number from sim" ); + DoPhonebookOperation( EVmbxPhonebookDelete, &entry ); + } + } + // read error, set read and write flag to not supported + // and phone memory in use + else + { + VMBLOGSTRING( "ReadAccess not ok" ); + iFlags &= ~KVmFlagSimReadSupport; + + VMBLOGSTRING( "WriteAccess not ok" ); + iFlags &= ~KVmFlagSimWriteSupport; + // The first USim phonebook type is tested, + // keep memorylocation unchanged + if ( iUSimFirstRoundTest ) + { + VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation ); + iUSimFirstRoundTest = EFalse; + } + else + { + iMemoryLocation = EVmbxPhoneMemory; + iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory ); + VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation ); + } + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::TestAndSetSimAccessFlags: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::MailboxNumbersIdentifiers +// Gets identifiers of the records in sim from MBI-file in sim +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::CalculateActualMaxLengthOnSim( TInt aSimNumberLength ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::CalculateActualMaxLength: =>" ); + VMBLOGSTRING2("iPhoneBookInfo.iMaxNumLength = %I", iPhoneBookInfo.iMaxNumLength ); + VMBLOGSTRING2("aSimNumberLength = %I", aSimNumberLength ); + + // If max length is less than 20 or -1 returned, then + // max length must be detemined from number length that is + // saved on sim. + if ( iPhoneBookInfo.iMaxNumLength == KVmExtFileSize || + iPhoneBookInfo.iMaxNumLength == -1 ) + { + // number on sim is less than 21 + if ( aSimNumberLength <= KVmExtFileSize ) + { + iPhoneBookInfo.iMaxNumLength = KVmExtFileSize; + } + // number on sim is more than 20 but less than 40 + else if ( KVmExtFileSize < aSimNumberLength && + aSimNumberLength <= KVmPhoneNumDigitsMaxLength ) + { + iPhoneBookInfo.iMaxNumLength = KVmPhoneNumDigitsMaxLength; + } + // number on sim is more than 40 + else + { + iPhoneBookInfo.iMaxNumLength = KVmMaxStoreSize; + } + } + // If max length is 40, and number length on sim is more + // than 20 but less than 41, then 48 is available on sim. + else if ( iPhoneBookInfo.iMaxNumLength == KVmPhoneNumDigitsMaxLength && + KVmExtFileSize < aSimNumberLength && + aSimNumberLength <= KVmPhoneNumDigitsMaxLength ) + { + iPhoneBookInfo.iMaxNumLength = KVmMaxStoreSize; + } + VMBLOGSTRING2("iPhoneBookInfo.iMaxNumLength = %I", iPhoneBookInfo.iMaxNumLength ); + + VMBLOGSTRING( "VMBX: RVmbxNumber::CalculateActualMaxLength: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::VideoSupported +// Returns video support state +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::VideoSupported() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::VideoSupported: =>" ); + + TBool supported( EFalse ); + + if ( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) ) + { + TInt result = iSession->Get( KVideoMbxSupport, supported ); + if ( result != KErrNone ) + { + supported = EFalse; + } + } + + VMBLOGSTRING2("VMBX: RVmbxNumber::VideoSupported: supported = %d", supported ); + return supported; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetVmbxAddressL +// Retrieves voice mailbox address from RCSC +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::GetVmbxAddressL( TDes& /*aAddress*/ ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxAddressL(TDes& aAddress): Method deprecated" ); + VMBLOGSTRING( "Use GetVmbxAddressL(TDes& aAddress, TUint aServiceId) instead" ); + + return KErrNotSupported; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::GetVmbxAddress +// Retrieves voice mailbox address from SPS +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::GetVmbxAddress( TDes& aAddress, TUint aServiceId ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxAddress: =>" ); + TInt ret( KErrNotSupported ); + + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + TVmbxServiceInfo serviceInfo; + serviceInfo.iServiceId = aServiceId; + ret = GetServiceInfo( serviceInfo ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::GetVmbxAddress: error: %d", ret ); + if ( KErrNone == ret ) + { + if ( serviceInfo.iAddress.Length() > aAddress.MaxLength() ) + { + ret = KErrOverflow; + } + else + { + aAddress.Copy( serviceInfo.iAddress ); + } + } + VMBLOGSTRING2( "VMBX: RVmbxNumber::GetVmbxAddress: error: %d", ret ); + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxAddress: <=" ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SelectTypeL +// +// ----------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::SelectTypeL( TBool aTitle, TUint& aServiceId ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: =>" ); + + if ( !AllowedToChangeTheNumber() && EVmbxDefine == aTitle ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: \ + Not Allow to define voice mail number" ); + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" ); + return EVmbxNone; + } + + if ( EVmbxCall != aTitle ) + { + User::Leave( KErrNotSupported ); + } + // the sum of defined numbers + TInt definedNumber( 0 ); + TInt definedFlag( 0 ); + CheckDefinedNumberCountL(definedNumber, definedFlag, aServiceId ); + + // Pop up selection dialog only if there are more than 2 defined numbers + if ( KMailBoxLimitForPrompt < definedNumber ) + { + TInt index( 0 ); + // Clear the old service information + iVmbxServiceSelection.Reset(); + + // Create selection list query and show it. + iTypeSelectionQuery = new (ELeave) CAknListQueryDialog( &index ); + iTypeSelectionQuery->PrepareLC( R_VOIP_REL2_2_CALL_TO ); + + // Create descriptor array for connection networks, connection networks + // icons and load connection network images to memory.. + CDesCArrayFlat* lbxItems = + new (ELeave) CDesCArrayFlat( KVmLbxItemsArraySize ); + CleanupStack::PushL( lbxItems ); + CArrayPtr* icons = + new (ELeave) CAknIconArray( KVmLbxItemsArraySize ); + CleanupStack::PushL( icons ); + + ConstructDefaultIconsL( icons ); + + // Create final list box item data. + TBuf<512> queryItem( KNullDesC ); + if( definedFlag & KVmFlagCSNumberDefined ) + { + HBufC* csName = StringLoader::LoadLC( R_CALLTO_LBX_CS_MAILBOX_ITEM, + iCoeEnv ); + queryItem.Format( KQueryItemFormat, 0, csName ); + CleanupStack::PopAndDestroy( csName ); + + // Append text to the item array. + lbxItems->AppendL( queryItem ); + // CS's hardcoded service value is 1 + User::LeaveIfError( iVmbxServiceSelection.Append( + TVmbxServiceSelection( EVmbx, 1 ) ) ); + } + + if( definedFlag & KVmFlagVideoNumberDefined ) + { + HBufC* videoName = + StringLoader::LoadLC( R_CALLTO_LBX_VIDEO_MAILBOX_ITEM, + iCoeEnv ); + // Create final list box item data. + queryItem.Format( KQueryItemFormat, 1, videoName ); + CleanupStack::PopAndDestroy( videoName ); + + // Append text to the item array. + lbxItems->AppendL( queryItem ); + // Video's hardcoded service value is 1 + User::LeaveIfError( iVmbxServiceSelection.Append( + TVmbxServiceSelection( EVmbxVideo, 1 ) ) ); + } + if( definedFlag & KVmFlagVoIpNumberDefined ) + { + // Get all Service Ids + RArray profileIds; + CleanupClosePushL( profileIds ); + GetServiceIds( profileIds ); + + for ( TInt i( 0 ); i < profileIds.Count(); i++ ) + { + TVmbxServiceInfo serviceInfo; + serviceInfo.iServiceId = profileIds[ i ]; + GetServiceInfo( serviceInfo ); + + HBufC* voipName = HBufC::NewLC( serviceInfo.iName.Length() ); + voipName->Des().Copy( serviceInfo.iName ); + + TInt iconId( KErrNotFound ); + TRAPD( error, AddBrandIconL( icons, profileIds[ i ], iconId ) ); + + // If branded icon is not available, use hardcoded value 2 which is + // default VoIP icons value + if ( KErrNone != error || KErrNotFound == iconId ) + { + iconId = 2; + } + + // Create final list box item data. + queryItem.Format( KQueryItemFormat, iconId, voipName ); + CleanupStack::PopAndDestroy( voipName ); + + //Append text to the item array. + lbxItems->AppendL( queryItem ); + User::LeaveIfError( iVmbxServiceSelection.Append( + TVmbxServiceSelection( EVmbxIP, serviceInfo.iServiceId ) ) ); + } + + CleanupStack::PopAndDestroy( &profileIds ); + } + + iTypeSelectionQuery->SetIconArrayL( icons ); + iTypeSelectionQuery->SetItemTextArray( lbxItems ); + iTypeSelectionQuery->SetOwnershipType( ELbmOwnsItemArray ); + + CleanupStack::Pop( icons ); + CleanupStack::Pop( lbxItems ); + + if ( iTypeSelectionQuery->RunLD() ) + { + TVmbxServiceSelection serviceType = iVmbxServiceSelection[ index ]; + iType = serviceType.iServiceType; + aServiceId = serviceType.iServiceId; + VMBLOGSTRING2( "VMBX: RVmbxNumber::VoIP vmbx with service id %d selected", aServiceId ); + } + else + { + iType = EVmbxNone; + aServiceId = 0; + } + iTypeSelectionQuery = NULL; + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" ); + return iType; + } +// ----------------------------------------------------------------------------- +// RVmbxNumber::CheckDefinedNumberCountL +// +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::CheckDefinedNumberCountL( TInt& aDefinedNumber, + TInt& aDefinedFlag, TUint& aServiceId ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: =>" ); + iType = EVmbxNone; + aServiceId = KDefaultServiceId; + // the sum of defined numbers + TInt definedNumber( KDefaultDefinedNumberCount ); + TInt definedServiceTypes( 0 ); + TInt definedFlag( 0 ); + + TBuf tmpNumber(KNullDesC); + + // First check what mailboxes are defined. + // Skip querying if only one mailbox with number/address defined. + // 1. Get voice number + if ( KErrNone == GetVmbxNumber( tmpNumber ) ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: CS vmbx number defined"); + definedNumber++; + definedServiceTypes++; + iType = EVmbx; + aServiceId = KCSorVideoServiceId; + definedFlag |= KVmFlagCSNumberDefined; + } + + // 2. Get video number + if ( VideoSupported() && KErrNone == GetVideoMbxNumber( tmpNumber ) ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: Video mbx number defined"); + definedNumber++; + definedServiceTypes++; + if( KMailBoxLimitForPrompt == definedNumber) + { + iType = EVmbxVideo; + } + aServiceId = KCSorVideoServiceId; + definedFlag |= KVmFlagVideoNumberDefined; + } + + // 3. Get count of all Service Ids of VoIP + RArray profileIds; + CleanupClosePushL( profileIds ); + + if ( KErrNone == GetServiceIds( profileIds ) ) + { + TInt idCount( profileIds.Count() ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: %d IP vmbx services defined", idCount ); + + if ( idCount ) + { + definedNumber += idCount; + definedServiceTypes++; + // If only VoIP and only one service support Vmbx, + // then use it directly without prompting. + if ( KMailBoxLimitForPrompt == definedNumber ) + { + iType = EVmbxIP; + aServiceId = profileIds[ 0 ]; + } + definedFlag |= KVmFlagVoIpNumberDefined; + } + } + + CleanupStack::PopAndDestroy( &profileIds ); + aDefinedNumber = definedNumber; + aDefinedFlag = definedFlag; + VMBLOGSTRING2( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: definedNumber = %d", + definedNumber ); + VMBLOGSTRING( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: <=" ); + + if ( 1 < definedServiceTypes ) + { + iType = EVmbxNone; + } + return iType; + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::GetServiceIds +// +// ---------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::GetServiceIds( RArray& aProfileIds ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetServiceIds: =>" ); + TInt ret( KErrNotFound ); + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + TRAP( ret, iVmSpsHandler->GetServiceIdsL( aProfileIds ) ); + } + VMBLOGSTRING( "VMBX: RVmbxNumber::GetServiceIds: <=" ); + return ret; + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::GetServiceInfo +// +// ---------------------------------------------------------------------------- +// +EXPORT_C TInt RVmbxNumber::GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetServiceInfo: =>" ); + TInt ret( KErrNotFound ); + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + ret = iVmSpsHandler->GetServiceInfo( aServiceInfo ); + } + VMBLOGSTRING( "VMBX: RVmbxNumber::GetServiceInfo: <=" ); + return ret; + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::NotifyServiceChange +// +// ---------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::NotifyServiceChange( + MServiceNotifyHandler* aHandler ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyServiceChange: =>" ); + + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + iVmSpsHandler->NotifyServiceChange( aHandler ); + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyServiceChange: <=" ); + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::NotifyServiceChangeCancel +// +// ---------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::NotifyServiceChangeCancel() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyServiceChangeCancel: =>" ); + + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + iVmSpsHandler->NotifyServiceChangeCancel(); + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyServiceChangeCancel: <=" ); + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::BrandIdL +// +// ---------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::BrandIdL( TInt aServiceId, TDes8& aBrandId ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::BrandIdL: =>" ); + + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + iVmSpsHandler->BrandIdL( aServiceId, aBrandId ); + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::BrandIdL: <=" ); + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::GetBrandedIconL +// +// ---------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::GetBrandedIconL( + const TDesC8& aBrandingId, + CFbsBitmap*& aBrandedBitmap, + CFbsBitmap*& aBrandedBitmapMask ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::GetBrandedIconL: =>" ); + + iVmBsHandler->GetBrandedIconL( + aBrandingId, aBrandedBitmap, aBrandedBitmapMask ); + + VMBLOGSTRING( "VMBX: RVmbxNumber::GetBrandedIconL: <=" ); + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::ConstructDefaultIconsL +// +// ---------------------------------------------------------------------------- +// +EXPORT_C void RVmbxNumber::ConstructDefaultIconsL( + CArrayPtr* aIcons ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::ConstructDefaultIconsL: =>" ); + + CFbsBitmap* bitmap; + CFbsBitmap* mask; + + //Get the mbm file path + TFileName mbmfile( KVmMbmDrive ); + mbmfile.Append( KDC_APP_BITMAP_DIR ); + mbmfile.Append( KVmLibMbmFile ); + + //default CS icon + AknIconUtils::CreateIconL( bitmap, mask, mbmfile, + EMbmVmQgn_prop_nrtyp_mobile, + EMbmVmQgn_prop_nrtyp_mobile_mask ); + + aIcons->AppendL( CGulIcon::NewL( bitmap, mask ) ); + + //default Video icon + AknIconUtils::CreateIconL( bitmap, mask, mbmfile, + EMbmVmQgn_prop_nrtyp_video, + EMbmVmQgn_prop_nrtyp_video_mask ); + + aIcons->AppendL( CGulIcon::NewL( bitmap, mask ) ); + + //default VoIP icon + AknIconUtils::CreateIconL( bitmap, mask, mbmfile, + EMbmVmQgn_prop_nrtyp_voip, + EMbmVmQgn_prop_nrtyp_voip_mask ); + + aIcons->AppendL( CGulIcon::NewL( bitmap, mask ) ); + + VMBLOGSTRING( "VMBX: RVmbxNumber::ConstructDefaultIconsL: <=" ); + } +// ----------------------------------------------------------------------------- +// RVmbxNumber::AddBrandIconL +// +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::AddBrandIconL( + CArrayPtr* aIcons, + TUint aServiceId, + TInt& aIconId ) + { + // Set branding icon to context pane if available. + TBuf8 brandId( KNullDesC8 ); + + BrandIdL( aServiceId, brandId ); + + CFbsBitmap* brandedBitmap = NULL; + CFbsBitmap* brandedBitmapMask = NULL; + + // Get branded bitmap + TRAPD( err, GetBrandedIconL( brandId, brandedBitmap, brandedBitmapMask ) ); + + if ( KErrNone == err ) + { + // The count of list icons(before adding branding icon to the list) + // must be the branded icon list id + aIconId = aIcons->Count(); + // Create new icon and add it to the icon list + aIcons->AppendL( CGulIcon::NewL( brandedBitmap, brandedBitmapMask ) ); + } + else + { + delete brandedBitmap; + delete brandedBitmapMask; + } + } + + +// ----------------------------------------------------------------------------- +// RVmbxNumber::VmbxNumDefInPhoneMemory +// Checks is VMBX number defined in phone memory +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::VmbxNumDefInPhoneMemory( TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::VmbxNumDefInPhoneMemory: =>" ); + TBool numDefined( EFalse ); + TBuf< KVmbxMaxNumberLength > number; + TUint32 lineNumber = aLineNumber == + EAlsLine1 ? KVmbxNumberLinePrimary: KVmbxNumberLineAuxiliary; + + if ( KErrNone == iSession->Get( lineNumber, number ) ) + { + if ( aLineNumber == EAlsLine1 ) + { + if ( iMemoryLocation == EVmbxPhoneMemory && + number.Length() ) + { + numDefined = ETrue; + } + } + else if ( aLineNumber == EAlsLine2 && number.Length() ) + { + numDefined = ETrue; + } + } + + VMBLOGSTRING2("VMBX: RVmbxNumber::VmbxNumDefInPhoneMemory: numDefined = %d", + numDefined ); + return numDefined; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::NumStoredInPhone +// Checks is the given number stored in phone memory +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::NumStoredInPhone( const TDesC& aNumber, TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::NumStoredInPhone: =>" ); + TBool numStoredInPhone( EFalse ); + TBuf< KVmbxMaxNumberLength > number; + TUint32 lineNumber = aLineNumber == + EAlsLine1 ? KVmbxNumberLinePrimary : KVmbxNumberLineAuxiliary; + + if ( KErrNone == iSession->Get( lineNumber, number ) ) + { + if ( !( number.Compare( aNumber ) ) ) + { + numStoredInPhone = ETrue; + } + } + + VMBLOGSTRING2( "VMBX: RVmbxNumber::NumStoredInPhone: numStoredInPhone = %d", + numStoredInPhone ); + return numStoredInPhone; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::BackUpSimNumber +// Saves VMBX number to the backup store +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::BackUpSimNumber( const TDesC& aNumber, TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::BackUpSimNumber: =>" ); + TUint32 lineNumber = aLineNumber == EAlsLine1 ? + KVmbxTmpNumberLinePrimary : KVmbxTmpNumberLineAuxiliary; + + VMBLOGSTRING( "VMBX: RVmbxNumber::BackUpSimNumber: <=" ); + return ( iSession->Set( lineNumber, aNumber )); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::FetchSimNumberBackUp +// Fetches VMBX number from backup store +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::FetchSimNumberBackUp( TDes& aNumber, TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::FetchSimNumberBackUp: =>" ); + TUint32 lineNumber = aLineNumber == EAlsLine1 ? + KVmbxTmpNumberLinePrimary : KVmbxTmpNumberLineAuxiliary; + + VMBLOGSTRING( "VMBX: RVmbxNumber::FetchSimNumberBackUp: <=" ); + return ( iSession->Get( lineNumber, aNumber )); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::ClearVMBXNumberFromPhone +// Clear VMBX number is from SIM from the phone memory +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::ClearVMBXNumberFromPhone( TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::ClearVMBXNumberFromPhone: =>" ); + + TInt error( KErrNone ); + + if ( aLineNumber == EAlsLine1 ) + { + error = SaveVmbxNumberToPhone( KEmptyVoiceMailNumber, EAlsLine1Entry ); + if ( KErrNone == error && + ( KErrNone == iSession->Set( KVmUsesSimMemory, EVmbxSimMemory ) ) ) + { + iMemoryLocation = EVmbxSimMemory; + VMBLOGSTRING( + "VMBX: RVmbxNumber::ClearVMBXNumberFromPhone: Line 1" ); + } + } + else if ( aLineNumber == EAlsLine2 ) + { + error = SaveVmbxNumberToPhone( KEmptyVoiceMailNumber, EAlsLine2Entry ); + if ( KErrNone == error ) + { + VMBLOGSTRING( + "VMBX: RVmbxNumber::ClearVMBXNumberFromPhone: Line 2"); + } + } + else + { + error = KErrArgument; + } + VMBLOGSTRING( "VMBX: RVmbxNumber::ClearVMBXNumberFromPhone: <=" ); + return error; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::UserEditNumber +// Indicates if user has edited VMBX number +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::UserEditNumber( TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::UserEditNumber: =>" ); + TBool nbrEdited( EFalse ); + + TUint32 lineNumber = aLineNumber == EAlsLine1 ? + KUserEditedNumber : KUserEditedNumberAuxiliary; + + iSession->Get( lineNumber, nbrEdited ); + + VMBLOGSTRING2( "VMBX: RVmbxNumber::UserEditNumber: result = %d", + nbrEdited ); + return EVmbxUserEdit == nbrEdited; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SetUserEditNumber +// Sets the flag indicating that the user has edited VMBX number +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::SetUserEditNumber( TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SetUserEditNumber: =>" ); + + TUint32 lineNumber = aLineNumber == EAlsLine1 ? + KUserEditedNumber : KUserEditedNumberAuxiliary; + + VMBLOGSTRING( "VMBX: RVmbxNumber::SetUserEditNumber: <=" ); + return ( iSession->Set( lineNumber, EVmbxUserEdit ) ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::ResetUserEditNumber +// Resets the flag that indicates that the user has edited VMBX number +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::ResetUserEditNumber( TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::ResetUserEditNumber: =>" ); + + TUint32 lineNumber = aLineNumber == EAlsLine1 ? + KUserEditedNumber : KUserEditedNumberAuxiliary; + + VMBLOGSTRING( "VMBX: RVmbxNumber::ResetUserEditNumber: <=" ); + return ( iSession->Set( lineNumber, EVmbxNotUserEdit ) ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::UseSimNumIfAvailable +// Fetches VMBX number stored in SIM if number is available +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::UseSimNumIfAvailable( TDes& aNumber, TInt aLineNumber ) + { + TBuf< KVmbxMaxNumberLength > number; + TBool ret( EFalse ); + TInt error( KErrNone ); + TVmbxNumberEntry numberEntry = aLineNumber == EAlsLine1 ? + EAlsLine1Entry : EAlsLine2Entry; + + VMBLOGSTRING( "VMBX: RVmbxNumber::UseSimNumIfAvailable: =>" ); + + // If readonly SIM which supports VMBX number + // number is fetched from the backup store + if ( ( !( iFlags & KVmFlagSimWriteSupport ) && ( iFlags & KVmFlagSimVmbxNumSupport ) ) + && ( ( aLineNumber == EAlsLine1 && EVmbxPhoneMemory == iMemoryLocation ) || + aLineNumber == EAlsLine2 ) ) + { + error = FetchSimNumberBackUp( number, aLineNumber ); + VMBLOGSTRING2( "VMBX: RVmbxNumber:: UseSimNumIfAvailable: number = %S", + &number ); + if ( KErrNone == error ) + { + aNumber.Copy( number ); + SaveVmbxNumberToPhone( aNumber, numberEntry ); + VMBLOGSTRING( + "VMBX: RVmbxNumber::UseSimNumIfAvailable: number from backup store" ); + ret = ETrue; + } + } + // If writable SIM which supports VMBX number + // number is fetched from SIM + else if ( iFlags & KVmFlagSimWriteSupport && + ( ( aLineNumber == EAlsLine1 && EVmbxPhoneMemory == iMemoryLocation ) || + aLineNumber == EAlsLine2 ) ) + { + error = GetVmNumFromSIM( number, aLineNumber ); + if ( KErrNone == error ) + { + aNumber.Copy( number ); + if ( EAlsLine1 == aLineNumber ) + { + iMemoryLocation = EVmbxSimMemory; + iSession->Set( KVmUsesSimMemory, EVmbxSimMemory ); + } + VMBLOGSTRING( + "VMBX: RVmbxNumber::UseSimNumIfAvailable: number from SIM" ); + ret = ETrue; + } + } + VMBLOGSTRING( "VMBX: RVmbxNumber::UseSimNumIfAvailable: <=" ); + return ret; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::HandleNumberStores +// Handles the updating of a number stores in phone memory +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::HandleNumberStores( TInt aLineNumber ) + { + TInt error( KErrNone ); + TBuf< KVmbxMaxNumberLength > line2number; + + TInt inactiveLineNumber( EAlsLine2 ); + + VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNumberStores: =>" ); + + // backup the number from the SIM card to the backup store. + if ( !( iFlags & KVmFlagSimWriteSupport ) ) + { + if ( aLineNumber == EAlsLine2 ) + { + error = GetVmNumFromSIM( line2number, EAlsLine2Entry ); + if ( KErrNone == error ) + { + error = BackUpSimNumber( line2number, aLineNumber ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::HandleNumberStores: \ + Back up ALS 2 Sim number, error = %d", error ); + } + } + else + { + error = BackUpSimNumber( iNumberFromSim, aLineNumber ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::HandleNumberStores: \ + Back up ALS 1 Sim number, error = %d", error ); + } + } + // If number found in SIM, old stored number is erased if + // it's not defined by the user or updated via external clients + if ( !UserEditNumber( aLineNumber ) && + !IsPhoneMemForcedEdit( aLineNumber ) ) + { + ClearVMBXNumberFromPhone( aLineNumber ); + // if the number was not edited in inactive line, + // and do clearing opreration. + // The old stored number from SIM is erased. + // otherwise, the edited number was + // defined as the inactive line number. + // the number should be kept + if ( !IsInactiveLineEdited( inactiveLineNumber ) ) + { + ClearVMBXNumberFromPhone( inactiveLineNumber ); + } + + VMBLOGSTRING( "[VMBX]: RVmbxNumber::HandleNumberStores: Clear old VMBX number" ); + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNumberStores: <=" ); + return error; + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::UsesSimMemory +// Returns if the SIM memory is used on ALS 1 +// ---------------------------------------------------------------------------- +// +TBool RVmbxNumber::UsesSimMemory() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::UsesSimMemory: =>" ); + TBool ret( EFalse ); + TInt alsline( EAlsLine1 ); + // get the current ALS line + if ( GetAlsLine( alsline ) != KErrNone ) + { + alsline = EAlsLine1; // if problems, assume primary line + } + + iSession->Get( KVmUsesSimMemory, iMemoryLocation ); + if ( ( iMemoryLocation == EVmbxSimMemory ) && ( alsline == EAlsLine1 ) ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::UsesSimMemory: SimMemory active" ); + ret = ETrue; + } + VMBLOGSTRING( "VMBX: RVmbxNumber::UsesSimMemory: <=" ); + return ret; + } + +// ---------------------------------------------------------------------------- +// RVmbxNumber::IsPhoneMemForcedEdit +// Returns if VMBX number stored in phone memory via external clients +// ---------------------------------------------------------------------------- +// +TBool RVmbxNumber::IsPhoneMemForcedEdit( const TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber:: IsPhoneMemForcedEdit: =>" ); + TInt nbrEdited( NULL ); + + TUint32 lineNumber = aLineNumber == EAlsLine1 ? + KUserEditedNumber : KUserEditedNumberAuxiliary; + + iSession->Get( lineNumber, nbrEdited ); + + VMBLOGSTRING2( "VMBX: RVmbxNumber:: IsPhoneMemForcedEdit: value = %d", + nbrEdited ); + return EvmbxPhoneMemForcedEdit == nbrEdited; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::SetPhoneMemForcedEdit +// Sets the flag indicating that external clients have edited VMBX number +// ----------------------------------------------------------------------------- +// +TInt RVmbxNumber::SetPhoneMemForcedEdit( TInt aLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::SetPhoneMemForcedEdit: =>" ); + + TUint32 lineNumber = aLineNumber == EAlsLine1 ? + KUserEditedNumber : KUserEditedNumberAuxiliary; + + VMBLOGSTRING( "VMBX: RVmbxNumber::SetPhoneMemForcedEdit: <=" ); + return iSession->Set( lineNumber, EvmbxPhoneMemForcedEdit ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::ShowInformationNoteL +// Shows information note to user +// ----------------------------------------------------------------------------- +// +void RVmbxNumber::ShowInformationNoteL( const TInt aResourceId ) const + { + VMBLOGSTRING( "VMBX: RVmbxNumber::ShowInformationNoteL: =>" ); + HBufC* prompt = StringLoader::LoadLC( aResourceId, iCoeEnv ); + + CAknInformationNote* note = new ( ELeave ) CAknInformationNote ( ETrue ); + note->ExecuteLD( *prompt ); + + CleanupStack::PopAndDestroy( prompt ); + VMBLOGSTRING( "VMBX: RVmbxNumber::ShowInformationNoteL: <=" ); + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::IsNoNumberNoteAllowed +// check whether the note should be shown +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::IsNoNumberNoteAllowed() + { + VMBLOGSTRING( "VMBX: RVmbxNumber::IsNoNumberNoteAllowed: =>" ); + TBool result( EFalse ); + + TInt videoRet( KErrNotFound ); + TBool isVideoSupport( VideoSupported() ); + TBool isVoipSupport( IsIpVoiceMailboxServices() ); + TBool psAddressFound( EFalse ); + + if ( isVideoSupport ) + { + HBufC* tmpNumber = HBufC::New( KVmbxMaxNumberLength ); + if ( tmpNumber ) + { + TPtr tmpPrt( tmpNumber->Des() ); + videoRet = GetVideoMbxNumber( tmpPrt ); + VMBLOGSTRING2( "VMBX: RVmbxNumber::IsNoNumberNoteAllowed \ + get videonum result=%d", videoRet ); + } + delete tmpNumber; + tmpNumber = NULL; + } + + if ( isVoipSupport ) + { + RArray profileIds; + GetServiceIds( profileIds ); + + TVmbxServiceInfo serviceInfo; + serviceInfo.iAddress.Zero(); + for ( TInt i = 0; i < profileIds.Count() + && !psAddressFound; i++ ) + { + serviceInfo.iServiceId = profileIds[ i ]; + GetServiceInfo( serviceInfo ); + + VMBLOGSTRING2( "VMBX: RVmbxNumber::IsNoNumberNoteAllowed \ + PS address length=%d", serviceInfo.iAddress.Length() ); + if ( serviceInfo.iAddress.Length() ) + { + psAddressFound = ETrue; + } + } + + profileIds.Close(); + } + + // This check is done because phone client calls GetVmbxNumber + // and then SelectTypeL, which causes note qtn_... to be shown twice + // so the note can be shown in below several condition: + // the voice mailbox number is not defined, + // when video feature and + // voip feature are not supported. + // the video number is not defined, when video feature + // is supported but voip feature is not supported. + // the voip address is not defined, when voip feature + // is supported but video feature is not supported. + // both the video number and the voip address are not + // defined, when both video feature and + // voip feature are supported. + + if ( ( !isVideoSupport && !isVoipSupport ) + || ( ( isVideoSupport && KErrNotFound == videoRet ) + && !isVoipSupport ) + || ( ( isVoipSupport && !psAddressFound + && !isVideoSupport ) ) + || ( isVideoSupport && isVoipSupport + && KErrNotFound == videoRet && + !psAddressFound ) ) + { + result = ETrue; + } + + VMBLOGSTRING( "VMBX: RVmbxNumber::IsNoNumberNoteAllowed: <=" ); + return result; + } + +// ----------------------------------------------------------------------------- +// RVmbxNumber::IsInactiveLineEdited +// Check whether the number had been edited in inactive line +// ----------------------------------------------------------------------------- +// +TBool RVmbxNumber::IsInactiveLineEdited( TInt& aInactiveLineNumber ) + { + VMBLOGSTRING( "VMBX: RVmbxNumber::IsInactiveLineEdited: =>" ); + TBool result( EFalse ); + + TInt activeLineNumber( EAlsLine1 ); + TInt inactiveLineNumber( aInactiveLineNumber ); + + // get the current ALS line + if ( KErrNone != GetAlsLine( activeLineNumber ) ) + { + activeLineNumber = EAlsLine1; + } + else + { + // get the inactive line + if ( EAlsLine1 == activeLineNumber ) + { + inactiveLineNumber = EAlsLine2; + } + else + { + inactiveLineNumber = EAlsLine1; + } + // check whether the number had been edited in inactive line before + if ( UserEditNumber( inactiveLineNumber ) + || IsPhoneMemForcedEdit( inactiveLineNumber ) ) + { + result = ETrue; + } + } + // get the inactive line number, make it be the output argument + aInactiveLineNumber = inactiveLineNumber; + + VMBLOGSTRING2( "VMBX: RVmbxNumber::IsInactiveLineEdited: result = %d", + result ); + return result; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/src/vmsettingsuiiconfileprovider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/src/vmsettingsuiiconfileprovider.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,89 @@ +/* +* Copyright (c) 2007-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: Implementation of CVmSettingsUiIconFileProvider class. +* +*/ + +#include "vmsettingsuiiconfileprovider.h" + +// ================= MEMBER FUNCTIONS ========================================== + +// ----------------------------------------------------------------------------- +// CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider +// +// ----------------------------------------------------------------------------- +// +CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider() + { + } + +// ----------------------------------------------------------------------------- +// CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider +// +// ----------------------------------------------------------------------------- +// +CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider() + { + iFile.Close(); + } + +// ----------------------------------------------------------------------------- +// CVmSettingsUiIconFileProvider::ConstructL +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +void CVmSettingsUiIconFileProvider::ConstructL( RFile& aFile ) + { + User::LeaveIfError( iFile.Duplicate( aFile ) ); + } + +// ---------------------------------------------------------------------------- +// CVmSettingsUiIconFileProvider::NewL +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +CVmSettingsUiIconFileProvider* CVmSettingsUiIconFileProvider::NewL( + RFile& aFile ) + { + CVmSettingsUiIconFileProvider* self = + new ( ELeave ) CVmSettingsUiIconFileProvider(); + CleanupStack::PushL( self ); + self->ConstructL( aFile ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// From MAknIconFileProvider +// +// --------------------------------------------------------------------------- +// +void CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL( + RFile& aFile, const TIconFileType /*aType*/ ) + { + // duplicate the file's handle + User::LeaveIfError( aFile.Duplicate( iFile ) ); + } + +// --------------------------------------------------------------------------- +// From MAknIconFileProvider +// +// --------------------------------------------------------------------------- +// +void CVmSettingsUiIconFileProvider::Finished() + { + delete this; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f engines/vmbxengine/src/vmspshandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engines/vmbxengine/src/vmspshandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,446 @@ +/* +* Copyright (c) 2007-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: Implementation of CVmSPSHandler class. +* +*/ + +// INCLUDE FILES +#include +#include +#include +#include +#include +#include +#include "vmspshandler.h" +#include "vmblogger.h" + +// EXTERNAL DATA STRUCTURES +// None + +// EXTERNAL FUNCTION PROTOTYPES +// None + +// CONSTANTS +/** Maximum length of descriptor data */ +const TInt KVmbxMaxDesLength = 512; + +// MACROS +// None + +// LOCAL CONSTANTS AND MACROS +// None + +// MODULE DATA STRUCTURES +// None + +// LOCAL FUNCTION PROTOTYPES +// None + +// FORWARD DECLARATIONS +// None + +// ============================= LOCAL FUNCTIONS ============================= + +// ============================ MEMBER FUNCTIONS ============================= + +// --------------------------------------------------------------------------- +// CVmSPSHandler::CVmSPSHandler +// C++ default constructor can NOT contain any code, that might leave. +// --------------------------------------------------------------------------- +// +CVmSPSHandler::CVmSPSHandler() + { + // No implementation required + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::ConstructL +// Symbian 2nd phase constructor can leave. +// --------------------------------------------------------------------------- +// +void CVmSPSHandler::ConstructL() + { + iSettings = CSPSettings::NewL(); + iSpsSettingsVoipUtils = CSPSettingsVoIPUtils::NewL(); + + iNotifier = CSPNotifyChange::NewL( *this ); + + // Subscribe to service change notifies + // Empty array so that new services will be notified also + RIdArray array; + CleanupClosePushL( array ); + //iNotifier->NotifyChangeL( iServiceIds ); + iNotifier->NotifyChangeL( array ); + CleanupStack::PopAndDestroy( &array ); + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::NewL +// Two-phased constructor. +// --------------------------------------------------------------------------- +// +CVmSPSHandler* CVmSPSHandler::NewL( ) + { + CVmSPSHandler* self = CVmSPSHandler::NewLC(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::NewLC +// Two-phased constructor. +// --------------------------------------------------------------------------- +// +CVmSPSHandler* CVmSPSHandler::NewLC() + { + CVmSPSHandler* self = new (ELeave) CVmSPSHandler(); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// Destructor +CVmSPSHandler::~CVmSPSHandler() + { + iObserver = NULL; + + if ( iNotifier ) + { + iNotifier->Cancel(); + delete iNotifier; + } + + delete iSettings; + + delete iSpsSettingsVoipUtils; + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::GetServiceIdsL +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVmSPSHandler::GetServiceIdsL( RArray& aServiceIds ) const + { + RArray serviceIds; + CleanupClosePushL( serviceIds ); + // Get all service Ids and.. + iSettings->FindServiceIdsL( serviceIds ); + // ..remove service if VMBX is not defined or if VMBX address is empty + for ( TInt i( 0 ); i < serviceIds.Count(); i++ ) + { + if ( IsVbmxSupportedL( serviceIds[ i ] ) ) + { + aServiceIds.Append( serviceIds[ i ] ); + } + } + + VMBLOGSTRING2( "VMBX: found %d IP mailbox services", aServiceIds.Count() ); + + CleanupStack::PopAndDestroy( &serviceIds ); + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::IsVbmxSupportedL +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +TBool CVmSPSHandler::IsVbmxSupportedL( TUint32 aServiceId ) const + { + TBool supported( EFalse ); + + // Get entry + CSPEntry* entry = CSPEntry::NewLC(); + iSettings->FindEntryL( aServiceId, *entry ); + + // Get all service properties a.k.a subservices + RPropertyArray properties; + properties = entry->GetAllProperties(); + + TServicePropertyName propertyName; + + for ( TInt i( 0 ); i < properties.Count() && !supported; i++ ) + { + propertyName = properties[ i ]->GetName(); + + supported = propertyName == EPropertyVMBXSubServicePluginId; + + if ( supported ) + { + TVmbxServiceInfo serviceInfo; + TRAPD( found, GetVmAddressL( aServiceId, serviceInfo.iAddress ) ); + + supported = KErrNotFound != found; + } + } + + CleanupStack::PopAndDestroy( entry ); + + VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsVbmxSupportedL: %d", supported ); + return supported; + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::GetServiceInfo +// (other items were commented in a header). +// --------------------------------------------------------------------------- +TInt CVmSPSHandler::GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceInfo: =>" ); + TInt ret( KErrNone ); + + TRAP( ret, + { + GetServiceNameL( aServiceInfo.iServiceId, aServiceInfo.iName ); + + GetVmAddressL( aServiceInfo.iServiceId, aServiceInfo.iAddress ); + + TInt snap( 0 ); + GetSNAPIdL( aServiceInfo.iServiceId, snap ); + aServiceInfo.iSnapId = static_cast ( snap ); + } ); + + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceInfo: <=" ); + return ret; + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::GetVmAddressL +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVmSPSHandler::GetVmAddressL( const TUint32 aServiceId, + TDes& aAddress ) const + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetVmAddressL: =>" ); + RBuf buffer; + CleanupClosePushL( buffer ); + buffer.ReAllocL( KVmbxMaxDesLength ); + + CSPEntry* entry = CSPEntry::NewLC(); + const CSPProperty* property = NULL; + + iSettings->FindEntryL( aServiceId, *entry ); + + // Find correct subservice + User::LeaveIfError( + entry->GetProperty( property, ESubPropertyVMBXListenAddress ) ); + + property->GetValue( buffer ); + buffer.Length() > aAddress.MaxLength() ? + User::Leave( KErrOverflow ) : aAddress.Copy( buffer ); + + CleanupStack::PopAndDestroy( entry ); + CleanupStack::PopAndDestroy( &buffer ); + + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetVmAddressL: <=" ); + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::GetServiceNameL +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVmSPSHandler::GetServiceNameL( const TUint32 aServiceId, + TDes& aName ) const + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: =>" ); + RBuf buffer; + CleanupClosePushL( buffer ); + buffer.ReAllocL( KVmbxMaxDesLength ); + + // Get entry + CSPEntry* entry = CSPEntry::NewLC(); + + iSettings->FindEntryL( aServiceId, *entry ); + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: 1" ); + // Read service id and service name + buffer.Copy( entry->GetServiceName() ); + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: 2" ); + buffer.Length() > aName.MaxLength() ? + User::Leave( KErrOverflow ) : aName.Copy( buffer ); + + CleanupStack::PopAndDestroy( entry ); + CleanupStack::PopAndDestroy( &buffer ); + + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: <=" ); + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::GetSNAPIdL +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVmSPSHandler::GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetSNAPIdL: =>" ); + + CSPEntry* entry = CSPEntry::NewLC(); + const CSPProperty* property = NULL; + + iSettings->FindEntryL( aServiceId, *entry ); + + // Find correct subservice + TInt error( + entry->GetProperty( property, ESubPropertyVMBXPreferredSNAPId ) ); + + if ( KErrNotFound != error ) + { + property->GetValue( aSNAPId ); + } + + CleanupStack::PopAndDestroy( entry ); + + VMBLOGSTRING( "VMBX: CVmSPSHandler::GetSNAPIdL: <=" ); + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::BrandIdL +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVmSPSHandler::BrandIdL( TInt aServiceId, TDes8& aBrandId ) + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::BrandIdL: =>" ); + + CSPEntry* entry = CSPEntry::NewLC(); + const CSPProperty* property; + TBuf brandId( KNullDesC ); + + User::LeaveIfError( + iSettings->FindEntryL( aServiceId, *entry ) ); + + User::LeaveIfError( + entry->GetProperty( property, EPropertyBrandId ) ); + + if ( property ) + { + property->GetValue( brandId ); + } + + if ( brandId.Length() ) + { + aBrandId.Copy( brandId ); + } + + CleanupStack::PopAndDestroy( entry ); + + VMBLOGSTRING( "VMBX: CVmSPSHandler::BrandIdL: <=" ); + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::IsActivatedL +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +TBool CVmSPSHandler::IsActivatedL( TInt aServiceId ) + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::IsActivatedL: =>" ); + + TBool enabled( EFalse ); + + CSPEntry* entry = CSPEntry::NewLC(); + const CSPProperty* property = NULL; + + iSettings->FindEntryL( aServiceId, *entry ); + + // Find correct subservice + TInt error( + entry->GetProperty( property, ESubPropertyVMBXEnabled ) ); + + if ( KErrNotFound != error ) + { + TOnOff onOff( EOONotSet ); + property->GetValue( onOff ); + enabled = onOff == EOn; + } + + CleanupStack::PopAndDestroy( entry ); + + VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsActivatedL: %d", enabled ); + VMBLOGSTRING( "VMBX: CVmSPSHandler::IsActivatedL: <=" ); + + return enabled; + } + +// ---------------------------------------------------------------------------- +// CVmSPSHandler::NotifyServiceChange +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +void CVmSPSHandler::NotifyServiceChange( MServiceNotifyHandler* aHandler ) + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChange: =>" ); + + iObserver = aHandler; + + VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChange: <=" ); + } + +// ---------------------------------------------------------------------------- +// CVmSPSHandler::NotifyServiceChangeCancel +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +void CVmSPSHandler::NotifyServiceChangeCancel() + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChangeCancel: =>" ); + + iObserver = NULL; + + VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChangeCancel: <=" ); + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::HandleNotifyChange +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVmSPSHandler::HandleNotifyChange( TServiceId /*ServiceId*/ ) + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::HandleNotifyChange: =>" ); + if ( iObserver ) + { + TRAP_IGNORE( iObserver->HandleServiceNotifyL() ); + } + VMBLOGSTRING( "VMBX: CVmSPSHandler::HandleNotifyChange: <=" ); + } + +// --------------------------------------------------------------------------- +// CVmSPSHandler::HandleError +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVmSPSHandler::HandleError( TInt /*aError*/ ) + { + } + +TBool CVmSPSHandler::IsVoIPProfilesFound() + { + VMBLOGSTRING( "VMBX: CVmSPSHandler::IsVoIPProfilesFound" ); + + TBool ret( EFalse ); + + if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + { + TRAP_IGNORE( ret = iSpsSettingsVoipUtils->VoIPProfilesExistL() ); + } + + VMBLOGSTRING2( "VMBX: CVmContainer::IsVoIPProfilesFound: return %I", ret ); + return ret; + } + +// ========================== OTHER EXPORTED FUNCTIONS ======================= + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f group/bld.inf --- a/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -20,6 +20,7 @@ #include "../cbs/group/bld.inf" #include "../cellular/group/bld.inf" #include "../convergedcallengine/group/bld.inf" +#include "../engines/group/bld.inf" #include "../networkhandling/group/bld.inf" #include "../phoneclientserver/group/bld.inf" #include "../satengine/group/bld.inf" @@ -27,5 +28,6 @@ #include "../phonesrv_plat/group/bld.inf" #include "../phonesrv_pub/group/bld.inf" #include "../phonecmdhandler/group/bld.inf" +#include "../nwnotifier/group/bld.inf" // End of File diff -r 7d48bed6ce0c -r 987c9837762f layers.sysdef.xml --- a/layers.sysdef.xml Tue Aug 31 15:45:17 2010 +0300 +++ b/layers.sysdef.xml Wed Sep 01 12:15:03 2010 +0100 @@ -1,13 +1,13 @@ - ]> - + - + @@ -22,7 +22,7 @@ - + diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmMessageHandler.h --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmMessageHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmMessageHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define CNWGSMMESSAGEHANDLER_H // INCLUDES -#include +#include "NWHandlingEngine.h" #include "CNWMessageHandler.h" #include "CNWGsmSessionImplementation.h" #include "CNWGsmNetworkCellReselectionHandler.h" diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmNetworkCellReselectionHandler.h --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmNetworkCellReselectionHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmNetworkCellReselectionHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,9 @@ #define CNWGSMNETWORKCELLRESELECTIONHANDLER_H // INCLUDES -#include +#include "NWHandlingEngine.h" #include -#include +#include #include // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmSessionImplementation.h --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmSessionImplementation.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWGsmSessionImplementation.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ #define CNWGSMSESSIONIMPLEMENTATION_H // INCLUDES -#include -#include +#include "CNWSession.h" +#include "NWHandlingEngine.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkMCNEngine.h --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkMCNEngine.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkMCNEngine.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CNWNETWORKMCNENGINE_H // INCLUDES -#include //For MCbsMcnObserver +#include "MCbsMcnObserver.h" //For McbsMcnObserver #include "MNWNetworkTimer.h" #include #include diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkSystemEventMonitor.h --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkSystemEventMonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkSystemEventMonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ #include -#include +#include "NetworkHandlingDomainPSKeys.h" #include // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagBaseEngine.h --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagBaseEngine.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagBaseEngine.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define CNWNETWORKVIAGBASEENGINE_H // INCLUDES -#include +#include "NWHandlingEngine.h" #include "CNWMessageHandler.h" #include "CNWNetworkMonitorBase.h" diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagCbEngine.h --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagCbEngine.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagCbEngine.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,11 +22,11 @@ // INCLUDES #include "MNWNetworkTimer.h" -#include +#include "NWHandlingEngine.h" #include "CNWGsmMessageHandler.h" #include "CNWNetworkHZCbCacheHandler.h" #include "MHZCachesInitialisationObserver.h" -#include //For McbsMcnObserver +#include //For McbsMcnObserver #include #include diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagLcEngine.h --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagLcEngine.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmInc/CNWNetworkViagLcEngine.h Wed Sep 01 12:15:03 2010 +0100 @@ -27,9 +27,9 @@ // OLD INCLUDES #include "MNWNetworkTimer.h" -#include +#include "NWHandlingEngine.h" #include "CNWGsmMessageHandler.h" -#include //For McbsMcnObserver +#include //For McbsMcnObserver #include #include diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmMessageHandler.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmMessageHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmMessageHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES -#include +#include "NWHandlingEngine.h" #include "CNWGsmMessageHandler.h" #include "CNWNetworkFailureMonitor.h" #include "NWLogger.h" diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmNetworkCellReselectionHandler.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmNetworkCellReselectionHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmNetworkCellReselectionHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -209,7 +209,11 @@ // CMcn* CNWGsmNetworkCellReselectionHandler::GetMcnPtr() { + NWLOGSTRING( KNWMESOUT, "NW: CNWGsmMessageHandler::GetMcnPtr() Begin " ); + return iMcn; + + NWLOGSTRING( KNWMESOUT, "NW: CNWGsmMessageHandler::GetMcnPtr() End " ); } // ---------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmSessionImplementation.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmSessionImplementation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWGsmSessionImplementation.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDE FILES #include "CNWGsmSessionImplementation.h" #include "CNWGsmMessageHandler.h" -#include +#include "NWHandlingEngine.h" #include "NWLogger.h" diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkMCNEngine.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkMCNEngine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkMCNEngine.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -23,8 +23,8 @@ #include "CNWNetworkMcnTimer.h" #include "NWPanic.pan" #include "NWLogger.h" -#include -#include +#include +#include #include #include diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagBaseEngine.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagBaseEngine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagBaseEngine.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -32,7 +32,7 @@ #include "CNWNetworkSystemEventMonitor.h" #include "CNWGsmMessageHandler.h" #include "NWPanic.pan" -#include +#include "NetworkHandlingDomainPSKeys.h" #include "CNWNetworkViagTimer.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagCbEngine.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagCbEngine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagCbEngine.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -23,10 +23,10 @@ #include "CNWNetworkViagBaseEngine.h" #include "CNWNetworkViagTimer.h" #include "NWPanic.pan" -#include +#include "NetworkHandlingDomainPSKeys.h" #include "NWLogger.h" -#include -#include +#include +#include // CONSTANTS const TUint KNWzero = 0; diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagLcEngine.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagLcEngine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkViagLcEngine.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ #include "CNWNetworkViagBaseEngine.h" #include "CNWNetworkViagTimer.h" #include "NWPanic.pan" -#include +#include "NetworkHandlingDomainPSKeys.h" #include "NWLogger.h" //TEST @@ -1310,6 +1310,9 @@ values not match " ); return KErrNotFound; } + + NWLOGSTRING( KNWOBJECT, + "NW: CNWNetworkViagLcEngine::CompareTIntCellIdValues() End " ); } // End of File diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/GsmNetworkHandlingProxy.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/GsmNetworkHandlingProxy.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/GsmNetworkHandlingProxy.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include +#include "NetworkHandlingProxy.h" #include "CNWGsmSessionImplementation.h" #include "NWLogger.h" diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingInc/CNWMessageHandler.h --- a/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWMessageHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWMessageHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ #define CNWMESSAGEHANDLER_H // INCLUDES -#include -#include +#include "NWHandlingEngine.h" +#include "CNWSession.h" #include #include #include diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkModeMonitor.h --- a/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkModeMonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkModeMonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include "CNWNetworkMonitorBase.h" -#include +#include "NetworkHandlingDomainPSKeys.h" #include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkMonitorBase.h --- a/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkMonitorBase.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkMonitorBase.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CNWNETWORKMONITORBASE_H // INCLUDES -#include +#include "NWHandlingEngine.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkRegistrationStatusReceiver.h --- a/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkRegistrationStatusReceiver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWNetworkRegistrationStatusReceiver.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CNWNETWORKREGISTRATIONSTATUSRECEIVER_H // INCLUDES -#include +#include "NWHandlingEngine.h" // FORWARD DECLARATIONS class CNWNetworkRegistrationStatusMonitor; diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingInc/CNWProgrammableOperatorNameCommand.h --- a/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWProgrammableOperatorNameCommand.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingInc/CNWProgrammableOperatorNameCommand.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #define CNWPROGRAMMABLEOPERATORNAMECOMMAND_H // INCLUDES -#include +#include "NWHandlingEngine.h" #include #include diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingInc/cnwnetworkselectionsettingmonitor.h --- a/networkhandling/networkhandlingengine/NetworkHandlingInc/cnwnetworkselectionsettingmonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingInc/cnwnetworkselectionsettingmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include "CNWNetworkMonitorBase.h" -#include +#include "NetworkHandlingDomainPSKeys.h" #include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWMessageHandler.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWMessageHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWMessageHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include +#include "NWHandlingEngine.h" #include "CNWMessageHandler.h" #include "CNWNetworkCurrentNetworkMonitor.h" #include "CNWNetworkRegistrationStatusMonitor.h" diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWNetworkModeMonitor.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWNetworkModeMonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWNetworkModeMonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include "CNWMessageHandler.h" #include "CNWNetworkModeMonitor.h" -#include +#include "NWHandlingEngine.h" #include "NWPanic.pan" #include "NWLogger.h" diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWNetworkRegistrationStatusMonitor.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWNetworkRegistrationStatusMonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWNetworkRegistrationStatusMonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #include #include "CNWNetworkRegistrationStatusMonitor.h" #include "CNWMessageHandler.h" -#include +#include "NetworkHandlingDomainPSKeys.h" #include "NWPanic.pan" #include "NWLogger.h" #include "CNWNetworkRegistrationStatusReceiver.h" diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWSession.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWSession.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingSrc/CNWSession.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include +#include "CNWSession.h" // ============================ MEMBER FUNCTIONS ============================== diff -r 7d48bed6ce0c -r 987c9837762f networkhandling/networkhandlingengine/NetworkHandlingSrc/cnwnetworkselectionsettingmonitor.cpp --- a/networkhandling/networkhandlingengine/NetworkHandlingSrc/cnwnetworkselectionsettingmonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/networkhandling/networkhandlingengine/NetworkHandlingSrc/cnwnetworkselectionsettingmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDE FILES #include "CNWMessageHandler.h" #include "cnwnetworkselectionsettingmonitor.h" -#include +#include "NWHandlingEngine.h" #include "NWPanic.pan" #include "NWLogger.h" diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/data/nwnotifier.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/data/nwnotifier.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,59 @@ +/* +* 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: Resource file of NWNotifier +* +*/ + +// INCLUDES +#include +#include + +NAME NWNS + +// RESOURCE DEFINITIONS +// ----------------------------------------------------------------------------- +// +// Define the resource file signature +// This resource should be empty. +// +// ----------------------------------------------------------------------------- +// +RESOURCE RSS_SIGNATURE + { + } + + +// +// Localisation +/////////////////////////////// +STRUCT STRING + { + LTEXT text; + } + + +// ----------------------------------------------------------------------------- +// +// Resources for messages. +// +// ----------------------------------------------------------------------------- +// +RESOURCE STRING r_sim_not_prov_mm2 { text=qtn_note_smartchip_mm2; } +RESOURCE STRING r_sim_not_allow_mm3 { text=qtn_note_smartchip_mm3; } +RESOURCE STRING r_call_failed_mm4 { text=qtn_note_call_failed_mm4; } +RESOURCE STRING r_phone_not_allow_mm5 { text=qtn_note_phone_not_allow_mm5; } +RESOURCE STRING r_phone_not_allow_mm6 { text=qtn_note_phone_not_allow_mm6; } +RESOURCE STRING r_sim_not_allow { text=qtn_note_smartchip_not_allow; } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -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: +* +*/ + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_MMPFILES +nwnotifier.mmp + +PRJ_EXPORTS + +//IBY +../rom/nwnotifier.iby CORE_MW_LAYER_IBY_EXPORT_PATH(nwnotifier.iby) +../rom/nwnotifierresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(nwnotifierresources.iby) + +// For EE texts +../rom/nwnotifierresources.iby CORE_APP_LAYER_IBY_EXPORT_PATH(nwnotifierresources.iby) + +//LOC +../loc/networknotifier.loc MW_LAYER_LOC_EXPORT_PATH(networknotifier.loc) diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/group/nwnotifier.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/group/nwnotifier.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,58 @@ +/* +* 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: Project specification file for nwnotifier.exe +* +*/ + +#include +#include + +MW_LAYER_SYSTEMINCLUDE + +TARGET nwnotifier.exe +TARGETTYPE exe +UID 0x1000008d 0x20026826 +SECUREID 0x20026826 + +SOURCEPATH ../data + +// Application Resource +START RESOURCE nwnotifier.rss +HEADER +TARGET nwnotifier_0x20026826 +TARGETPATH APP_RESOURCE_DIR +LANGUAGE_IDS +END //RESOURCE + +USERINCLUDE ../inc + +LIBRARY euser.lib +LIBRARY aknnotify.lib // conf query +LIBRARY eiksrv.lib // conf query +LIBRARY bafl.lib +LIBRARY efsrv.lib // file +LIBRARY etel.lib // +LIBRARY etelmm.lib +LIBRARY platformenv.lib + +VENDORID VID_DEFAULT + +CAPABILITY CAP_SERVER + +SOURCEPATH ../src +SOURCE networknotifiernotewrapper.cpp +SOURCE nwnotifier.cpp +SOURCE nwregistrationstatusmonitor.cpp + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/inc/networknotifiernotewrapper.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/inc/networknotifiernotewrapper.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,134 @@ +/* +* 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: Active object wrapper to handle popup note. +* +*/ + +#ifndef __NETWORKNOTIFIER_WRAPPER_H__ +#define __NETWORKNOTIFIER_WRAPPER_H__ + +// SYSTEM INCLUDES +#include +#include + +// INCLUDES +#include + +// FORWARD CLASS DECLARATIONS +class CAknGlobalConfirmationQuery; + +// CONSTANTS + +_LIT( KResFile, "\\resource\\apps\\NWNotifier_0x20026826.rsc" ); + + +// OBSERVER DECLARATION +class MNoteWrapperObserver + { + public: + + virtual void PopupNoteClosed( ) = 0; + }; + +// CLASS DECLARATION +/** + * This Class provides implementation for handling the error notes + */ + +class CNetworkNotifierNoteWrapper : public CActive + { + public: + + /** + * Two-phased constructor. + */ + static CNetworkNotifierNoteWrapper* NewL( MNoteWrapperObserver& aObserver, + TInt aResID ); + + /** + * Destructor. + */ + ~CNetworkNotifierNoteWrapper(); + + /** + * Monitor inserts the latest error notification err# from ETEL to this stack. + * @param aResID Resource id of the note to be added to the notestack. + */ + void AppendNote( const TInt aResID ); + + + private: + + /** + * C++ default constructor. + * @param aObserver Reference to observer class. CNWRegistrationStatus is listening. + * @param aResID Resource id number to be inserted into the notestack. + */ + CNetworkNotifierNoteWrapper( MNoteWrapperObserver& aObserver, + TInt aResID ); + + /** + * Second-phase constructor. + * + */ + void ConstructL(); + + /** + * Informs object that asyncronous request is ready. + * + */ + void RunL(); + + /** + * Cancels asyncronous request(s). + * + */ + void DoCancel(); + + /** + * From CActive, RunError. + * Processes any errors. + * @param aError The leave code reported. + * @result return KErrNone if leave is handled. + */ + TInt RunError( TInt aError ); + + /** + * Reads the localized error strings from resource. + * @return The localized error string. + */ + HBufC* ReadResourceLC(); + + /** + * Displays the error note passed as a parameter. + * @param aNote Pointer to the note. + */ + void DisplayPopupNoteL( HBufC* aNote ); + + private: // Data + + // Handle to file server + RFs iFs; + + // Note + CAknGlobalConfirmationQuery* iGlobalQuery; + + // Callback receiver + MNoteWrapperObserver& iObserver; + + // Error note stack + RArray iErrNotes; + }; + +#endif // __NETWORKNOTIFIER_WRAPPER_H__ diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/inc/nwregistrationstatusmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/inc/nwregistrationstatusmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,137 @@ +/* +* 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: This file contains the header file of the NWRegistrationStatusMonitor class. +* +*/ + +#ifndef NWREGISTRATION_STATUS_H +#define NWREGISTRATION_STATUS_H + +// SYSTEM INCLUDES +#include +#include +#include + +// INCLUDES +#include "networknotifiernotewrapper.h" + +// FORWARD DECLARATIONS + +// CLASS DECLARATION +/** +* Monitors network registration status change event +* from MMEtel +*/ +class CNWRegistrationStatusMonitor : public CActive, + MNoteWrapperObserver + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CNWRegistrationStatusMonitor* NewL(); + + /** + * Destructor. + */ + virtual ~CNWRegistrationStatusMonitor(); + + + protected: // Functions from CActive + + /** + * Cancels asyncronous request(s). + * + */ + void DoCancel(); + + /** + * Informs object that asyncronous request is ready. + * + */ + void RunL(); + + /** + * From CActive, RunError. + * Processes any errors. + * @param aError The leave code reported. + * @result return KErrNone if leave is handled. + */ + TInt RunError( TInt aError ); + + private: + + /** + * C++ default constructor. + * + */ + CNWRegistrationStatusMonitor(); + + /** + * Second-phase constructor. + * + */ + void ConstructL(); + + /** + * Issues a request to ETel to provide NW registration + * status information. + * + */ + void IssueRequest(); + + /** + * Maps network registration status errors to resource ids. + * + */ + void ParseErrCode(); + + // from MNoteWrapperObserver + void PopupNoteClosed(); + + /** + * Open the connection to RMobilePhone + * + */ + void OpenConnectionL(); + + /** + * Closes the connection to RMobilePhone + * + */ + void CloseConnection(); + + + private: // Data + + // Current registration status info. + RMobilePhone::TMobilePhoneRegistrationStatus iRegistrationStatus; + + // Handle to RMobilePhone + RMobilePhone iPhone; + + // Handle to Telephony server + RTelServer iTelServer; + + // Parsed res id# + TInt iResID; + + // Note wrapper + CNetworkNotifierNoteWrapper* iNoteWrapper; + }; +#endif // NWREGISTRATION_STATUS_H + +// End of File + diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/loc/networknotifier.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/loc/networknotifier.loc Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,55 @@ +/* +* 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: Resource localisation file. +* +*/ + +// LOCALIZATION STRINGS + +// d:Popup menu for the sim not provisioned error +// l:popup_note_window/opt1 +// r:5.0 +// +#define qtn_note_smartchip_mm2 "SIM not provisioned MM #2" + + +// d:Popup menu for the sim not provisioned error +// l:popup_note_window/opt1 +// r:5.0 +// +#define qtn_note_smartchip_mm3 "SIM not allowed MM #3" + +// d:Popup menu for the sim not provisioned error +// l:popup_note_window/opt1 +// r:5.0 +// +#define qtn_note_call_failed_mm4 "Call Failed MM #4" + +// d:Popup menu for the sim not provisioned error +// l:popup_note_window/opt1 +// r:5.0 +// +#define qtn_note_phone_not_allow_mm5 "Phone not allowed MM #5" + +// d:Popup menu for the sim not provisioned error +// l:popup_note_window/opt1 +// r:5.0 +// +#define qtn_note_phone_not_allow_mm6 "Phone not allowed MM #6" + +// d:Popup menu for the sim not provisioned error +// l:popup_note_window/opt1 +// r:5.0 +// +#define qtn_note_smartchip_not_allow "SIM not allowed" diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/rom/nwnotifier.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/rom/nwnotifier.iby Wed Sep 01 12:15:03 2010 +0100 @@ -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: IBY file of NWNotifier +* +*/ + +#ifndef NWNOTIFIER_IBY +#define NWNOTIFIER_IBY + +file=ABI_DIR\BUILD_DIR\nwnotifier.exe PROGRAMS_DIR\nwnotifier.exe + +#endif // NWNOTIFIER_IBY + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/rom/nwnotifierresources.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/rom/nwnotifierresources.iby Wed Sep 01 12:15:03 2010 +0100 @@ -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: IBY file of NWNotifier resources +* +*/ + +#ifndef NWNOTIFIERRESOURCES_IBY +#define NWNOTIFIERRESOURCES_IBY + +#include + +data = DATAZ_\APP_RESOURCE_DIR\NWNotifier_0x20026826.rsc APP_RESOURCE_DIR\NWNotifier_0x20026826.rsc + +#endif // NWNOTIFIERRESOURCES_IBY + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/src/networknotifiernotewrapper.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/src/networknotifiernotewrapper.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,259 @@ +/* +* 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: Active object wrapper to handle popup note. +* +*/ + +// System includes +#include +#include +#include +#include + +// Includes +#include "networknotifiernotewrapper.h" + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::NewLC() +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +CNetworkNotifierNoteWrapper* CNetworkNotifierNoteWrapper::NewL( MNoteWrapperObserver& aObserver, + TInt aResID ) + { + CNetworkNotifierNoteWrapper* self = new( ELeave ) CNetworkNotifierNoteWrapper( aObserver, + aResID ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::ConstructL +// +// ----------------------------------------------------------------------------- +// +void CNetworkNotifierNoteWrapper::ConstructL() + { + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::ConstructL() -START") ); + + User::LeaveIfError( iFs.Connect() ); + + HBufC* note = ReadResourceLC(); + + if( note ) + { + DisplayPopupNoteL( note ); + CleanupStack::PopAndDestroy( note ); + } + + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::ConstructL() -END") ); + } + + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::CNetworkNotifierNoteWrapper +// +// ----------------------------------------------------------------------------- +// +CNetworkNotifierNoteWrapper::CNetworkNotifierNoteWrapper( MNoteWrapperObserver& aObserver, + TInt aResID ) : + CActive( EPriorityStandard ), + iObserver( aObserver ) + { + iErrNotes.Insert( aResID, 0 ); + CActiveScheduler::Add( this ); + } + + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::~CNetworkNotifierNoteWrapper +// +// ----------------------------------------------------------------------------- +// +CNetworkNotifierNoteWrapper::~CNetworkNotifierNoteWrapper() + { + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::~CNetworkNotifierNoteWrapper() -START") ); + + iFs.Close(); + iErrNotes.Close(); // cleanup and close + + Cancel(); + delete iGlobalQuery; + + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::~CNetworkNotifierNoteWrapper() -END") ); + } + + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::AppendNote +// +// Monitor inserts the latest error notification err# from ETEL to this stack +// ----------------------------------------------------------------------------- +// +void CNetworkNotifierNoteWrapper::AppendNote( const TInt aResID ) + { + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::AppendNote() -START") ); + iErrNotes.Insert( aResID, 0 ); + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::AppendNote() -END") ); + } + + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::DisplayPopupNoteL +// +// ----------------------------------------------------------------------------- +// +void CNetworkNotifierNoteWrapper::DisplayPopupNoteL( HBufC* aNote ) + { + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::DisplayPopupNoteL() -START") ); + + if( !IsActive() ) + { + if( !iGlobalQuery ) + { + iGlobalQuery = CAknGlobalConfirmationQuery::NewL(); + } + if( aNote ) + { + iGlobalQuery->ShowConfirmationQueryL( iStatus, + *aNote, + R_AVKON_SOFTKEYS_OK_EMPTY, + R_QGN_NOTE_WARNING_ANIM ); + } + + SetActive(); + } + + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::DisplayPopupNoteL() -END") ); + } + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::ReadResourceLC +// +// Just to read localized error strings from resource +// +// ----------------------------------------------------------------------------- +// +HBufC* CNetworkNotifierNoteWrapper::ReadResourceLC() + { + RDebug::Print( + _L("NW: CNetworkNotifierNoteWrapper::ReadResourceLC() -START") ); + + TInt resId; + RResourceFile resFile; + TResourceReader reader; + + TFileName fullFileName; + TDriveUnit driveNum = PathInfo::RomRootPath(); + + fullFileName.Insert( 0, driveNum.Name() ); + fullFileName.Append( KResFile ); + + TFileName file( fullFileName ); + HBufC16* textBuffer = NULL; + + // We are interested in the most recent err note at a time + resId = iErrNotes[0]; + + // Err# can be removed from the stack now + iErrNotes.Remove( 0 ); + + BaflUtils::NearestLanguageFile( iFs, file ); + resFile.OpenL( iFs, file ); + // According to SDK docs, resFile will be closed if this function leaves + resFile.ConfirmSignatureL(); + + HBufC8* readBuffer = resFile.AllocReadLC( resId ); + reader.SetBuffer( readBuffer ); + + TPtrC textdata = reader.ReadTPtrC(); + textBuffer = HBufC16::NewL( textdata.Length() ); + *textBuffer = textdata; + + CleanupStack::PopAndDestroy( readBuffer ); + CleanupStack::PushL( textBuffer ); + + resFile.Close(); + + RDebug::Print( + _L("NW: CNetworkNotifierNoteWrapper::ReadResourceLC() -END")); + return textBuffer; + } + + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::RunL +// Pure virtuals from CActive implemented in this derived class. +// iStatus error handling is not needed here, since the service provider for +// this AO (in DisplayPopupNoteL) will leave in case of an error, and will +// therefore be handled in RunError. +// ----------------------------------------------------------------------------- +// +void CNetworkNotifierNoteWrapper::RunL() + { + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::RunL -START") ); + + if( iErrNotes.Count() ) // There are more errors to display: + { + HBufC* note = ReadResourceLC(); + + if ( note ) + { + DisplayPopupNoteL( note ); + CleanupStack::PopAndDestroy( note ); + } + } + else + { + // Error note stack is empty, since this task has completed and let monitor + // to destruct this instance + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::RunL : No more notes to display") ); + iObserver.PopupNoteClosed(); + } + } + + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::DoCancel +// +// ----------------------------------------------------------------------------- +// +void CNetworkNotifierNoteWrapper::DoCancel() + { + if( iGlobalQuery ) + { + iGlobalQuery->CancelConfirmationQuery(); + } + } + +// ----------------------------------------------------------------------------- +// CNetworkNotifierNoteWrapper::RunError() +// +// ----------------------------------------------------------------------------- +// +TInt CNetworkNotifierNoteWrapper::RunError( TInt aError ) + { + // Resource reader failed in ReadResourceLC + // Just reissue the request + if ( aError ) + { + RDebug::Print( _L("NW: CNetworkNotifierNoteWrapper::RunError: Showing of the note failed!") ); + } + + return KErrNone; + } + +// end of file diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/src/nwnotifier.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/src/nwnotifier.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,86 @@ +/* +* 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: This module contains the implementation of CNWNotifier +* class member functions. +* +*/ + +// SYSTEM INCLUDE FILES + +// INCLUDE FILES +#include "nwregistrationstatusmonitor.h" + +// Global Variables + +// CONSTANTS +_LIT( KNWNotifierThreadName,"NWNotifierThread" ); + +// Local Functions + +// ----------------------------------------------------------------------------- +// DoStartL() +// +// ----------------------------------------------------------------------------- +// +LOCAL_C void DoStartL() + { + // Rename thread as + User::RenameThread( KNWNotifierThreadName ); + + // Create active scheduler (to run active objects) + CActiveScheduler* threadScheduler = new (ELeave) CActiveScheduler; + CleanupStack::PushL( threadScheduler ); + CActiveScheduler::Install( threadScheduler ); + + // Create an instance of status monitoring component. Start monitoring instantly. + CNWRegistrationStatusMonitor* statusMonitor = CNWRegistrationStatusMonitor::NewL(); + + //Starts the scheduler. Thread remains in this loop until this process is terminated. + CActiveScheduler::Start(); + + delete statusMonitor; + + // Delete active scheduler + CleanupStack::PopAndDestroy( threadScheduler ); + } + +// Global Functions + +// ----------------------------------------------------------------------------- +// E32Main() +// Provides the API for the operating system to start the executable. +// Returns the address of the function to be called. +// ----------------------------------------------------------------------------- +// +GLDEF_C TInt E32Main() + { + // Create cleanup stack + __UHEAP_MARK; + CTrapCleanup* cleanup = CTrapCleanup::New(); + + if( !cleanup ) + { + return KErrNoMemory; + } + + // Run application code inside TRAP harness + TRAPD( mainErr, DoStartL() ); + + delete cleanup; + __UHEAP_MARKEND; + + return mainErr; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f nwnotifier/src/nwregistrationstatusmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nwnotifier/src/nwregistrationstatusmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,295 @@ +/* +* 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: This module contains the implementation of CNWRegistrationStatusMonitor +* class member functions. +* +*/ + +// INCLUDE FILES +#include "nwregistrationstatusmonitor.h" +// System +#include +#include // KMmTsyModuleName +#include + +// ================= MEMBER FUNCTIONS ======================================= + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::CNWRegistrationStatusMonitor +// C++ default constructor can NOT contain any code, that +// might leave. +// +// ----------------------------------------------------------------------------- +// +CNWRegistrationStatusMonitor::CNWRegistrationStatusMonitor() : + CActive( EPriorityStandard ) + { + } + + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::ConstructL +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +void CNWRegistrationStatusMonitor::ConstructL() + { + // Add to scheduler. + CActiveScheduler::Add( this ); + + // Open connection to ETel + OpenConnectionL(); + + // Start monitoring + IssueRequest(); + } + + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::NewL +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +CNWRegistrationStatusMonitor* CNWRegistrationStatusMonitor::NewL() + { + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::NewL -START") ); + + CNWRegistrationStatusMonitor* self = new ( ELeave ) CNWRegistrationStatusMonitor(); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::NewL -END") ); + return self; + } + + +// ----------------------------------------------------------------------------- +// Destructor +// +// ----------------------------------------------------------------------------- +// +CNWRegistrationStatusMonitor::~CNWRegistrationStatusMonitor() + { + Cancel(); + + CloseConnection(); + + delete iNoteWrapper; + } + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::OpenConnectionL() +// Open connection to ETel +// ----------------------------------------------------------------------------- +// +void CNWRegistrationStatusMonitor::OpenConnectionL() + { + // Connect ETel server + User::LeaveIfError( iTelServer.Connect() ); + + // Load ETel TSY module + User::LeaveIfError( iTelServer.LoadPhoneModule( KMmTsyModuleName ) ); + + // Set this session to receive detailed errors + User::LeaveIfError( iTelServer.SetExtendedErrorGranularity( + RTelServer::EErrorExtended ) ); + + // Opens a phone subsession by name, + User::LeaveIfError( iPhone.Open( iTelServer, KMmTsyPhoneName ) ); + } + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::CloseConnection() +// Closes the connection to ETel +// ----------------------------------------------------------------------------- +// +void CNWRegistrationStatusMonitor::CloseConnection() + { + iPhone.Close(); + + if ( iTelServer.Handle() ) + { + iTelServer.UnloadPhoneModule( KMmTsyModuleName ); + iTelServer.Close(); + } + } + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::DoCancel +// Cancels the pending async. command. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CNWRegistrationStatusMonitor::DoCancel() + { + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::DoCancel -START") ); + + iPhone.CancelAsyncRequest( EMobilePhoneNotifyNetworkRegistrationStatusChange ); + + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::DoCancel -END") ); + } + + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::RunL +// Receives the completion of the pending async. command, +// saves possible values from async. +// +// ----------------------------------------------------------------------------- +// +void CNWRegistrationStatusMonitor::RunL() + { + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::RunL -START") ); + + if( iStatus.Int() != KErrNone ) // Display only errors + { + // Parse error code to iResId + ParseErrCode(); + + if( !iNoteWrapper ) + { // Instantiate a notewrapper and pass err code to be displayed + iNoteWrapper = CNetworkNotifierNoteWrapper::NewL( *this, iResID ); + } + else // If note wrapper exists already, add error code -stack in wrapper + { + iNoteWrapper->AppendNote( iResID ); + } + } + else + { + if( iStatus.Int() == KErrBadHandle || + iStatus.Int() == KErrServerBusy ) + { + // Close the session to ETel + CloseConnection(); + // Reconnect + OpenConnectionL(); + } + } + + // Keep monitoring + IssueRequest(); + + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::RunL -END") ); + } + + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::ParseErrorCode() +// +// ----------------------------------------------------------------------------- +// +void CNWRegistrationStatusMonitor::ParseErrCode() + { + switch( iStatus.Int() ) + { + case KErrGsmMMImsiUnknownInHlr: + { + iResID = R_SIM_NOT_PROV_MM2; + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::ParseErrCode() : R_SIM_NOT_PROV_MM2") ); + break; + } + case KErrGsmMMIllegalMs: + { + iResID = R_SIM_NOT_ALLOW_MM3; + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::ParseErrCode() : R_SIM_NOT_ALLOW_MM3") ); + break; + } + case KErrGsmMMImsiUnknownInVlr: + { + iResID = R_CALL_FAILED_MM4; + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::ParseErrCode() : R_CALL_FAILED_MM4") ); + break; + } + case KErrGsmMMImeiNotAccepted: + { + iResID = R_PHONE_NOT_ALLOW_MM5; + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::ParseErrCode() : R_PHONE_NOT_ALLOW_MM5") ); + break; + } + case KErrGsmMMIllegalMe: + { + iResID = R_PHONE_NOT_ALLOW_MM6; + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::ParseErrCode() : R_PHONE_NOT_ALLOW_MM6") ); + break; + } + case KErrMMEtelAuthenticateFailed: + { + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::ParseErrCode() : R_SIM_NOT_ALLOW") ); + iResID = R_SIM_NOT_ALLOW; + break; + } + default: + break; + } + } + + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::IssueRequest +// Executes the async. NotifyNetworkRegistrationStatusChange function. +// +// ----------------------------------------------------------------------------- +// +void CNWRegistrationStatusMonitor::IssueRequest() + { + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::IssueRequest -START") ); + + if ( !IsActive() ) + { + iPhone.NotifyNetworkRegistrationStatusChange( iStatus, iRegistrationStatus ); + SetActive(); + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::IssueRequest : NotifyChange()-request set active - pending !") ); + } + + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::IssueRequest -END") ); + } + + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::PopupNoteClosed +// +// Callback from note wrapper class : all error notes are displayed since this monitor +// class can destruct note wrapper +// ----------------------------------------------------------------------------- +// +void CNWRegistrationStatusMonitor::PopupNoteClosed() + { + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::PopupNoteClosed -START") ); + + delete iNoteWrapper; + iNoteWrapper = NULL; + + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::PopupNoteClosed -END") ); + } + + +// ----------------------------------------------------------------------------- +// CNWRegistrationStatusMonitor::RunError() +// Processes any errors. +// ----------------------------------------------------------------------------- +// +TInt CNWRegistrationStatusMonitor::RunError( TInt /*aError*/ ) + { + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::RunError -START") ); + + // Keep monitoring + IssueRequest(); + + RDebug::Print( _L("NW: CNWRegistrationStatusMonitor::RunError -END") ); + return KErrNone; // Handled the error fully + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/BMARM/DIALUTILSU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneclientserver/CallUI/BMARM/DIALUTILSU.DEF Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,3 @@ +EXPORTS + CreateDialUtilsFactoryL__Fv @ 1 NONAME R3UNUSED ; CreateDialUtilsFactoryL(void) + diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/BWINS/DIALUTILSU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneclientserver/CallUI/BWINS/DIALUTILSU.DEF Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,3 @@ +EXPORTS + ?CreateDialUtilsFactoryL@@YAPAVCDialUtilsFactory@@XZ @ 1 NONAME ; class CDialUtilsFactory * __cdecl CreateDialUtilsFactoryL(void) + diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Data/101F868E.rss --- a/phoneclientserver/CallUI/Data/101F868E.rss Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Data/101F868E.rss Wed Sep 01 12:15:03 2010 +0100 @@ -19,8 +19,8 @@ // INCLUDES #include -#include -#include "caui.hrh" +#include +#include "CaUI.hrh" // RESOURCE DEFINITIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Data/CallUI.rss --- a/phoneclientserver/CallUI/Data/CallUI.rss Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Data/CallUI.rss Wed Sep 01 12:15:03 2010 +0100 @@ -27,9 +27,9 @@ #include #include -#include "caui.hrh" +#include "CaUI.hrh" #include -#include +#include @@ -428,7 +428,7 @@ #endif //__MMS #else // RD_UNIFIED_EDITOR NEW_MESSAGE_MTM_TYPE - { + { id = 0x102072D6; name = qtn_tel_retry_message_call_item; } @@ -443,7 +443,7 @@ #endif //__EMAIL_UI , NEW_MESSAGE_MTM_TYPE - { + { id = 0x10207245; name = qtn_mce_pop_up_PostCard; } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Group/CaUiEngine.mmp --- a/phoneclientserver/CallUI/Group/CaUiEngine.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Group/CaUiEngine.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -26,21 +26,21 @@ TARGETTYPE dll UID 0x1000008d 0x101F868F -SOURCEPATH ../src/cauiengine -SOURCE cauiengfactimpl.cpp +SOURCEPATH ../Src/CaUiEngine +SOURCE CaUiEngFactImpl.cpp -SOURCE cauiquery.cpp -SOURCE cauiengine.cpp -SOURCE cauiactiveobject.cpp -SOURCE cauimessagesender.cpp -SOURCE cauidialogs.cpp +SOURCE CaUiQuery.cpp +SOURCE CaUiEngine.cpp +SOURCE CaUiActiveObject.cpp +SOURCE CaUiMessageSender.cpp +SOURCE CaUiDialogs.cpp -SOURCE cauivoipextension.cpp +SOURCE CaUiVoIPExtension.cpp SOURCE ccauireconnectquery.cpp SOURCE ccauireconnectqueryimpl.cpp -SOURCEPATH ../data -START RESOURCE callui.rss +SOURCEPATH ../Data +START RESOURCE CallUI.rss HEADER TARGETPATH RESOURCE_FILES_DIR END @@ -48,9 +48,9 @@ // TEMPORARY DEFINITION FOR CONTACT FINDER HEADERS SYSTEMINCLUDE ../../../../../app/phone/inc -USERINCLUDE ../inc -USERINCLUDE ../inc/cauiengine -USERINCLUDE ../data +USERINCLUDE ../Inc +USERINCLUDE ../Inc/CaUiEngine +USERINCLUDE ../Data USERINCLUDE ../loc APP_LAYER_SYSTEMINCLUDE diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Group/CaUiPlugin.mmp --- a/phoneclientserver/CallUI/Group/CaUiPlugin.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Group/CaUiPlugin.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -26,20 +26,20 @@ UID 0x10009D8D 0x101F868E -SOURCEPATH ../src/cauiplugin -SOURCE cauiplugin.cpp -SOURCE cauimain.cpp +SOURCEPATH ../Src/CaUiPlugin +SOURCE CaUiPlugin.cpp +SOURCE CaUIMain.cpp -SOURCEPATH ../data +SOURCEPATH ../Data -START RESOURCE 101f868e.rss +START RESOURCE 101F868E.rss TARGET cauiplugin.rsc END -USERINCLUDE ../inc -USERINCLUDE ../inc/cauiplugin +USERINCLUDE ../Inc +USERINCLUDE ../Inc/CaUiPlugin MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/ecom @@ -47,8 +47,9 @@ LIBRARY euser.lib LIBRARY servicehandler.lib -LIBRARY flogger.lib +LIBRARY flogger.lib LIBRARY commonengine.lib +LIBRARY featmgr.lib // FeatureManager LANGUAGE_IDS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Group/bld.inf --- a/phoneclientserver/CallUI/Group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,27 +24,27 @@ PRJ_EXPORTS // Private -../inc/cauiengine/cauidialresultobserver.h |../inc/cauidialresultobserver.h -../inc/cauiengine/cauilogger.h |../inc/cauilogger.h -../inc/cauiengine/cauieng.h |../inc/cauieng.h +../Inc/CaUiEngine/CaUiDialResultObserver.h |../inc/cauidialresultobserver.h +../Inc/CaUiEngine/CaUiLogger.h |../inc/cauilogger.h +../Inc/CaUiEngine/CaUiEng.h |../inc/cauieng.h // Internal -../inc/caui.hrh |../../../inc/caui.hrh +../Inc/CaUI.hrh |../../../inc/caui.hrh -../group/callui_stub.sis /epoc32/data/z/system/install/callui_stub.sis +../Group/callui_stub.SIS /epoc32/data/z/system/install/callui_stub.sis // LOC files ../loc/callui.loc MW_LAYER_LOC_EXPORT_PATH(callui.loc) // IBY files -../rom/callui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(callui.iby) -../rom/callui_variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(callui_variant.iby) -../rom/calluiresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(calluiresources.iby) +../Rom/CallUI.iby CORE_MW_LAYER_IBY_EXPORT_PATH(CallUI.iby) +../Rom/CallUI_Variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(CallUI_Variant.iby) +../Rom/CallUIResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(CallUIResources.iby) PRJ_MMPFILES -../group/cauiengine.mmp -../group/cauiplugin.mmp +../Group/CaUiEngine.mmp +../Group/CaUiPlugin.mmp // End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiEngine/CaUiActiveObject.h --- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiActiveObject.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiActiveObject.h Wed Sep 01 12:15:03 2010 +0100 @@ -194,10 +194,10 @@ CPhCntMatcher* iPhCntMatcher; // Is CPhCntMatcher owned. - TBool iOwnMatcher; + TBool iOwnMatcher; // Message sender - CCaUiMessageSender* iMessageSender; + CCaUiMessageSender* iMessageSender; }; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialDataContainer.h --- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialDataContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialDataContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ #define CAUIDIALDATACONTAINER_H // INCLUDES -#include -#include +#include +#include /** diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialogs.h --- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialogs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialogs.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,8 @@ // Includes -#include "phclttypes.h" -#include "cauivoipextension.h" - +#include "PhCltTypes.h" +#include "CaUiVoIPExtension.h" // Forward declarations class CCaUiEngine; @@ -59,16 +58,16 @@ public: - /** + /** * Two-phased constructor. * @return an instance of CCaUiDialogs. */ - static CCaUiDialogs* NewL( CCaUiEngine& aCaUiEngine ); + static CCaUiDialogs* NewL( CCaUiEngine& aCaUiEngine ); - /** - * Destructor. - */ - virtual ~CCaUiDialogs(); + /** + * Destructor. + */ + virtual ~CCaUiDialogs(); /** * Launch a query whether video call will be created with long @@ -76,8 +75,8 @@ * * @return The selection user made */ - TInt QueryVideoCallDefaultActionL(); - + TInt QueryVideoCallDefaultActionL(); + /** * Launch a list query asking what type of call the caller wants * to make. diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEng.h --- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEng.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEng.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include #include //RIdArray -#include "caui.hrh" +#include "CaUI.hrh" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngFactImpl.h --- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngFactImpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngFactImpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES -#include "cauieng.h" +#include "cauieng.h" /** diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngine.h --- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngine.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngine.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,15 +21,15 @@ // INCLUDES #include -#include // RconeResourceLoader. -#include // MPhCltExtPhoneObserver. -#include "cauieng.h" -#include "cauidialresultobserver.h" -#include "cauiqueryobserver.h" -#include -#include +#include // RConeResourceLoader. +#include // MPhCltExtPhoneObserver. +#include "cauieng.h" +#include "cauidialresultobserver.h" +#include "CaUiQueryObserver.h" +#include +#include #include // MPhCntSelectionObserver -#include // CPhCltEmergencyCall +#include // CPhCltEmergencyCall #include #include #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiEngine/CaUiMessageSender.h --- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiMessageSender.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiMessageSender.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include #include -#include // CUidNameArray +#include // CUidNameArray // CLASS DECLARATION class CMsvSession; @@ -61,17 +61,17 @@ * @param aMessageType mtmUid indicate the message type * aRealAddress address list to send message */ - void CreateNewMessageL( TInt aMessageType, - MDesC16Array* aRealAddress, - MDesC16Array* aAliases, - CRichText* aRichText ); + void CreateNewMessageL( TInt aMessageType, + MDesC16Array* aRealAddress, + MDesC16Array* aAliases, + CRichText* aRichText ); /** * Get messgae types array - */ - const CUidNameArray& MessageTypesArrayL(); - - private: + */ + const CUidNameArray& MessageTypesArrayL(); + + private: /** * C++ constructor. @@ -84,7 +84,7 @@ /** * Create SendUi */ - void CreateSendUiL(); + void CreateSendUiL(); /** * Get message types from mtm registry @@ -92,17 +92,17 @@ * @param aMsgTypes array of UIDs (MTM types) * */ - void UpdateMessageTypesArrayL( CUidNameArray* aMsgTypes ); + void UpdateMessageTypesArrayL( CUidNameArray* aMsgTypes ); /** * Check if mail box is defined - */ - TBool IsMailboxDefinedL(); + */ + TBool IsMailboxDefinedL(); /** * Create connection to message service */ - void CreateMessageServiceConnectionL(); + void CreateMessageServiceConnectionL(); protected: // Functions from base classes @@ -112,16 +112,16 @@ virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); - private: - - // Message service session + private: + + // Message service session CMsvSession* iSession; // Send UI CSendUi* iSendUi; // Array of MTM types - CUidNameArray* iMsgTypes; + CUidNameArray* iMsgTypes; }; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiEngine/CaUiVoIPExtension.h --- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiVoIPExtension.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiVoIPExtension.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include #include -#include +#include #include //RIdArray /** diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Inc/CaUiPlugin/CaUiPlugin.h --- a/phoneclientserver/CallUI/Inc/CaUiPlugin/CaUiPlugin.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Inc/CaUiPlugin/CaUiPlugin.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,11 +21,11 @@ // INCLUDES -#include -#include // AIW dialdata. +#include +#include // AIW dialdata. #include //TServiceId #include "cauidialresultobserver.h" -#include "caui.hrh" +#include "CaUI.hrh" // FORWARD DECLARATIONS class CCaUiEngApi; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Rom/CallUI.iby --- a/phoneclientserver/CallUI/Rom/CallUI.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Rom/CallUI.iby Wed Sep 01 12:15:03 2010 +0100 @@ -20,10 +20,10 @@ #define __CALLUI_IBY__ REM CallUI Plugin -ECOM_PLUGIN(cauiplugin.dll,101f868e.rsc) +ECOM_PLUGIN(CaUiPlugin.dll,101F868E.rsc) REM CallUI Engine -file=ABI_DIR\BUILD_DIR\cauiengine.dll SHARED_LIB_DIR\cauiengine.dll +file=ABI_DIR\BUILD_DIR\CaUiEngine.dll SHARED_LIB_DIR\CaUiEngine.dll REM Enabler for exlipsing ROM binaries data=ZSYSTEM\install\callui_stub.sis system\install\callui_stub.sis diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Rom/CallUI_Variant.iby --- a/phoneclientserver/CallUI/Rom/CallUI_Variant.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Rom/CallUI_Variant.iby Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define __CALLUI_VARIANT_IBY__ #ifdef __JAPAN_PREFIX_CHANGE -file=ABI_DIR\BUILD_DIR\dialutils.dll SHARED_LIB_DIR\dialutils.dll +file=ABI_DIR\BUILD_DIR\DialUtils.dll SHARED_LIB_DIR\DialUtils.dll #endif // __JAPAN_PREFIX_CHANGE #endif diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/CaUiActiveObject.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiActiveObject.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiActiveObject.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,16 +19,16 @@ // INCLUDE FILES -#include "cauiactiveobject.h" -#include "cauiqueryobserver.h" +#include "CaUiActiveObject.h" +#include "CaUiQueryObserver.h" #include #include #include -#include -#include -#include "cauimessagesender.h" -#include "cauilogger.h" +#include +#include +#include "CaUiMessageSender.h" +#include "cauilogger.h" // CONSTANTS @@ -366,8 +366,8 @@ break; } - CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Message type: %d", messageType); - CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Launch query: %d", launchQuery); + CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Message type: %d", messageType); + CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Launch query: %d", launchQuery); // If the editor type was valid, launch the editor. if ( launchQuery ) diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialDataContainer.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialDataContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialDataContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "cauidialdatacontainer.h" +#include "CaUiDialDataContainer.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialogs.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialogs.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialogs.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -21,19 +21,19 @@ #include #include #include -#include -#include // Resources. +#include +#include // Resources. #include #include -#include -#include +#include +#include #include -#include "cauidialogs.h" -#include "cauilogger.h" -#include "cauiquery.h" -#include "cauiengine.h" -#include "cphcntmatcher.h" -#include "cauiactiveobject.h" +#include "CaUiDialogs.h" +#include "cauilogger.h" +#include "CaUiQuery.h" +#include "CaUiEngine.h" +#include "cphcntmatcher.h" +#include "CaUiActiveObject.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngFactImpl.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngFactImpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngFactImpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cauiengfactimpl.h" -#include "cauiengine.h" +#include "CaUiEngFactImpl.h" +#include "CaUiEngine.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngine.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngine.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,43 +17,43 @@ // INCLUDE FILES -#include "cauiengine.h" -#include "cauiquery.h" // CCaUiQuery. +#include "CaUiEngine.h" +#include "CaUiQuery.h" // CCaUiQuery. #include // MCaUiReconnectQueryObserver. -#include // Resources. -#include // CPhcltDialer. +#include // Resources. +#include // CPhCltDialer. #include #include #include -#include -#include // CPhCltExtPhoneDialData +#include +#include // CPhCltExtPhoneDialData #include "callui.loc" // Localized strings. -#include // String Loader. +#include // String Loader. #include // CAknInformationNote. -#include // CAknGloballistQuery. +#include // CAknGlobalListQuery. #include // FeatureManager. -#include // Confirmation query. +#include // Confirmation query. -#include // Character removal. -#include // AIW dialdata. +#include // Character removal. +#include // AIW dialdata. -#include +#include #include // Pub&Sub functionality. -#include "cauivoipextension.h" // VoIP/SCCP profile store +#include "CaUiVoIPExtension.h" // VoIP/SCCP profile store #include -#include -#include "cauilogger.h" // Call Ui Logger +#include +#include "cauilogger.h" // Call Ui Logger #include -#include +#include #include -#include +#include -#include "cauidialogs.h" +#include "CaUiDialogs.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/CaUiMessageSender.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiMessageSender.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiMessageSender.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,17 +19,17 @@ // INCLUDES -#include "cauimessagesender.h" +#include "CaUiMessageSender.h" -#include // CCoeEnv -#include // Resources. +#include // CCoeEnv +#include // Resources. -#include // KUidMsvLocalServiceMtmValue +#include // KUidMsvLocalServiceMtmValue -#include // CSendAppUi, CSendUi -#include // Message data for CSendUi -#include // Feature manager -#include "cauilogger.h" // Call Ui Logger +#include // CSendAppUi, CSendUi +#include // Message data for CSendUi +#include // Feature manager +#include "cauilogger.h" // Call Ui Logger // CONSTANTS // The reconnect query options granularity. @@ -81,7 +81,7 @@ if( iSendUi ) { - delete iSendUi; + delete iSendUi; } CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::~CCaUiMessageSender()"); @@ -100,9 +100,9 @@ CAUILOGSTRING("CALLUI: >>> CCaUiMessageSender::NewL()"); CCaUiMessageSender* self = new( ELeave ) CCaUiMessageSender (); - - CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::NewL()"); - + + CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::NewL()"); + return self; } @@ -122,7 +122,7 @@ TRAPD( err, CreateSendUiL()); if ( err != KErrNone ) - User::Leave( KErrGeneral ); + User::Leave( KErrGeneral ); //Launch message editor standalone TUid mtmUid = { aMessageType }; @@ -201,7 +201,7 @@ CleanupStack::Pop(); iMsgTypes = msgTypes; - CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::MessageTypesArrayL()"); + CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::MessageTypesArrayL()"); return *iMsgTypes; } @@ -332,7 +332,7 @@ CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::HandleSessionEventL(): case: EMsvCloseSession"); break; default: - CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::HandleSessionEventL(): case: default"); + CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::HandleSessionEventL(): case: default"); break; } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/CaUiQuery.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiQuery.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiQuery.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES -#include "cauiquery.h" +#include "CaUiQuery.h" // ----------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/CaUiVoIPExtension.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiVoIPExtension.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiVoIPExtension.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,12 +18,12 @@ // INCLUDE FILES -#include "cauivoipextension.h" -#include +#include "CaUiVoIPExtension.h" +#include #include #include #include -#include // String Loader. +#include // String Loader. @@ -90,7 +90,7 @@ } CleanupStack::PopAndDestroy( &voipServiceIds ); - return isProfiles; + return isProfiles; } // ----------------------------------------------------------------------------- @@ -117,22 +117,25 @@ // of them supports internet call for ( TInt i = 0; idArray.Count() > i; i++) { - // check if the service supports internet call + // check if the service supports internet call CSPProperty* property = CSPProperty::NewLC(); // get attribute mask of the service - User::LeaveIfError( settingsApi->FindPropertyL( idArray[i], - EPropertyServiceAttributeMask, *property ) ); - + + TInt error = settingsApi->FindPropertyL( idArray[i], + EPropertyServiceAttributeMask, *property ); // read the value of mask property - TInt mask = 0; - if ( KErrNone == property->GetValue( mask ) ) + if ( KErrNone == error ) { - if ( ( mask & ESupportsInternetCall ) - && ( mask & EIsVisibleInCallMenu ) ) + TInt mask = 0; + if ( KErrNone == property->GetValue( mask ) ) { - aVoipServiceIds.Append( idArray[i] ); + if ( ( mask & ESupportsInternetCall ) + && ( mask & EIsVisibleInCallMenu ) ) + { + aVoipServiceIds.Append( idArray[i] ); + } } - } + } CleanupStack::PopAndDestroy( property ); } } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiEngine/ccauireconnectqueryimpl.cpp --- a/phoneclientserver/CallUI/Src/CaUiEngine/ccauireconnectqueryimpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiEngine/ccauireconnectqueryimpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include "ccauireconnectqueryimpl.h" -#include "cauiengine.h" +#include "CaUiEngine.h" CCaUiReconnectQueryImpl* CCaUiReconnectQueryImpl::NewL( MCaUiReconnectQueryObserver& aObserver ) diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiPlugin/CaUIMain.cpp --- a/phoneclientserver/CallUI/Src/CaUiPlugin/CaUIMain.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiPlugin/CaUIMain.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ // INCLUDE FILES #include #include -#include "caui.hrh" -#include "cauiplugin.h" +#include "CaUI.hrh" +#include "CaUiPlugin.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/Src/CaUiPlugin/CaUiPlugin.cpp --- a/phoneclientserver/CallUI/Src/CaUiPlugin/CaUiPlugin.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/Src/CaUiPlugin/CaUiPlugin.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,17 +18,18 @@ // INCLUDE FILES -#include "cauiplugin.h" // This class interface. -#include "cauieng.h" // CaUiEngine. -#include // AIW constants. -#include "caui.hrh" // CallUI constants. -#include // AIW Menu pane. +#include "CaUiPlugin.h" // This class interface. +#include "cauieng.h" // CaUiEngine. +#include // AIW constants. +#include "CaUI.hrh" // CallUI constants. +#include // AIW Menu pane. -#include -#include // PhoneClient types. -#include "cauilogger.h" // Call Ui Logger -#include -#include +#include +#include // PhoneClient types. +#include "cauilogger.h" // Call Ui Logger +#include +#include +#include // FeatureManager. // CONSTANTS @@ -36,7 +37,7 @@ _LIT( KCaUiNullResFile, "" ); // The library to be loaded. -_LIT( KCaUiLoadedLib, "cauiengine.dll" ); +_LIT( KCaUiLoadedLib, "CaUiEngine.dll" ); @@ -246,7 +247,13 @@ } } } - + + if ( csVideoMenuItemAvailable && + !FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) ) + { + csVideoMenuItemAvailable = EFalse; + } + // Add menu items TInt menuIndex = aIndex; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/CallUI/loc/callui.loc --- a/phoneclientserver/CallUI/loc/callui.loc Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/CallUI/loc/callui.loc Wed Sep 01 12:15:03 2010 +0100 @@ -5,7 +5,7 @@ * 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. * diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Group/DOSENPolicy.mmp --- a/phoneclientserver/EnPolicy/Group/DOSENPolicy.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Group/DOSENPolicy.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -27,11 +27,11 @@ TARGETTYPE DLL UID 0x101F86D1 0x101F86D2 -SOURCEPATH ../src/dosenpolicy -SOURCE cdosemergencynumberpolicy.cpp +SOURCEPATH ../Src/DosEnPolicy +SOURCE CDOSEmergencyNumberPolicy.cpp -USERINCLUDE . ../inc -USERINCLUDE ../inc/dosenpolicy +USERINCLUDE . ../Inc +USERINCLUDE ../Inc/DosEnPolicy MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE ../../../inc diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Group/SOSENPolicy.mmp --- a/phoneclientserver/EnPolicy/Group/SOSENPolicy.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Group/SOSENPolicy.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -27,26 +27,26 @@ TARGETTYPE DLL UID 0x101F86D1 0x101F86D3 -SOURCEPATH ../src/sosenpolicy -SOURCE csosemergencynumberpolicymanager.cpp -SOURCE csosemergencynumberpolicyhandler.cpp -SOURCE csosenpolicyenlisthandler.cpp -SOURCE csosenpolicysimstatusmonitor.cpp -SOURCE csosenpolicysatrefresh.cpp +SOURCEPATH ../Src/SosEnPolicy +SOURCE CSosEmergencyNumberPolicyManager.cpp +SOURCE CSosEmergencyNumberPolicyHandler.cpp +SOURCE CSosEnPolicyENListHandler.cpp +SOURCE CSosEnPolicySimStatusMonitor.cpp +SOURCE CSosEnPolicySatRefresh.cpp -USERINCLUDE . ../inc -USERINCLUDE ../inc/sosenpolicy +USERINCLUDE . ../Inc +USERINCLUDE ../Inc/SosEnPolicy MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE ../../../inc -SYSTEMINCLUDE ../../inc // for rphcltemergencycall.h +SYSTEMINCLUDE ../../inc // for RPhCltEmergencyCall.h LIBRARY euser.lib LIBRARY etel.lib LIBRARY etelmm.lib LIBRARY commonengine.lib LIBRARY featmgr.lib -LIBRARY satclient.lib // for sat refresh +LIBRARY satclient.lib // for sat refresh LIBRARY centralrepository.lib LIBRARY cenrepnotifhandler.lib diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Group/bld.inf --- a/phoneclientserver/EnPolicy/Group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -22,19 +22,19 @@ PRJ_EXPORTS -../inc/cemergencynumberpolicy.h |../../../inc/cemergencynumberpolicy.h +../Inc/CEmergencyNumberPolicy.h |../../../inc/cemergencynumberpolicy.h #ifdef __EN_POLICY_DOS -dosenpolicy_stub.sis /epoc32/data/z/system/install/dosenpolicy_stub.sis +DosEnPolicy_stub.SIS /epoc32/data/z/system/install/dosenpolicy_stub.sis #else -sosenpolicy_stub.sis /epoc32/data/z/system/install/sosenpolicy_stub.sis +SosEnPolicy_stub.sis /epoc32/data/z/system/install/SosEnPolicy_stub.sis #endif // IBY files ../rom/enpolicy.iby CORE_MW_LAYER_IBY_EXPORT_PATH(enpolicy.iby) PRJ_MMPFILES -../group/dosenpolicy.mmp -../group/sosenpolicy.mmp +../Group/DOSENPolicy.mmp +../Group/SOSENPolicy.mmp PRJ_TESTMMPFILES // specify the .mmp files required for building any test programs here diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Inc/CEmergencyNumberPolicy.h --- a/phoneclientserver/EnPolicy/Inc/CEmergencyNumberPolicy.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Inc/CEmergencyNumberPolicy.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,8 +23,8 @@ // INCLUDES #include -#include -#include +#include +#include // CONSTANTS const TUid KEnPolicyUid={ 0x101F86D1 }; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Inc/DosEnPolicy/CDOSEmergencyNumberPolicy.h --- a/phoneclientserver/EnPolicy/Inc/DosEnPolicy/CDOSEmergencyNumberPolicy.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Inc/DosEnPolicy/CDOSEmergencyNumberPolicy.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define CDOSEMERGENCYNUMBERPOLICY_H // INCLUDES -#include +#include #include #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyHandler.h --- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,9 @@ #define CSOSEMERGENCYNUMBERPOLICYHANDLER_H // INCLUDES -#include "csosemergencynumberpolicymanager.h" -#include "csosenpolicysimstatusmonitor.h" -#include "csosenpolicyenlisthandler.h" +#include "CSOSEmergencyNumberPolicyManager.h" +#include "CSosEnPolicySimStatusMonitor.h" +#include "CSosEnPolicyENListHandler.h" #include #include @@ -211,7 +211,7 @@ //Sim state TInt iSimState; - + }; #endif // CSOSEMERGENCYNUMBERPOLICYHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyManager.h --- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define CSOSEMERGENCYNUMBERPOLICYMANAGER_H // INCLUDES -#include +#include // FORWARD DECLARATIONS class CSosEmergencyNumberPolicyHandler; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicyENListHandler.h --- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicyENListHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicyENListHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES -#include "csosemergencynumberpolicyhandler.h" -#include +#include "CSOSEmergencyNumberPolicyHandler.h" +#include #include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySatRefresh.h --- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySatRefresh.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySatRefresh.h Wed Sep 01 12:15:03 2010 +0100 @@ -102,18 +102,18 @@ */ void RunL(); - private: // Data - - // Reference to cbsserver - CSosEmergencyNumberPolicyHandler& iCSosEmergencyNumberPolicyHandler; - // Sat session connection. - RSatSession* iSatSession; - // Sat refresh connection - RSatRefresh* iSatRefresh; - // Is refresh allowed to do. - TBool iAllowRefresh; - // The RProperty to listen system global state.. - RProperty iProperty; + private: // Data + + // Reference to cbsserver + CSosEmergencyNumberPolicyHandler& iCSosEmergencyNumberPolicyHandler; + // Sat session connection. + RSatSession* iSatSession; + // Sat refresh connection + RSatRefresh* iSatRefresh; + // Is refresh allowed to do. + TBool iAllowRefresh; + // The RProperty to listen system global state.. + RProperty iProperty; }; #endif // CSOSENPOLICYSATREFRESH_H diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySimStatusMonitor.h --- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySimStatusMonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySimStatusMonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES -#include "csosemergencynumberpolicyhandler.h" +#include "CSOSEmergencyNumberPolicyHandler.h" #include // CActive #include // RProperty diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Src/DosEnPolicy/CDOSEmergencyNumberPolicy.cpp --- a/phoneclientserver/EnPolicy/Src/DosEnPolicy/CDOSEmergencyNumberPolicy.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Src/DosEnPolicy/CDOSEmergencyNumberPolicy.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include "cdosemergencynumberpolicy.h" +#include "CDOSEmergencyNumberPolicy.h" #include #include @@ -319,21 +319,21 @@ } } - //match is wrong, only part of ememergency number is matched - int newmatchlen = 0; - for (int i = place; i < iProductSpecificList.Length(); i++) - { - if(iProductSpecificList [i] != KEnPolicySDNumberSeparator ) - newmatchlen++; - else - break; - } - - if (length != newmatchlen) - { - return EFalse; - } - + //match is wrong, only part of ememergency number is matched + int newmatchlen = 0; + for (int i = place; i < iProductSpecificList.Length(); i++) + { + if(iProductSpecificList [i] != KEnPolicySDNumberSeparator ) + newmatchlen++; + else + break; + } + + if (length != newmatchlen) + { + return EFalse; + } + // if we get so far, its ok. return ETrue; @@ -349,22 +349,22 @@ // void CDosEmergencyNumberPolicy::ParseNumber( TPhCltTelephoneNumber& aTelNumber ) { - // Does number contains prefix. If yes then remove it - + // Does number contains prefix. If yes then remove it + if ( 0 == aTelNumber.FindC( KSipPrefix ) || 0 == aTelNumber.FindC( KTelPrefix ) || - 0 == aTelNumber.FindC( KSosPrefix ) ) + 0 == aTelNumber.FindC( KSosPrefix ) ) { aTelNumber.Delete( 0, KPrefixLength ); - } - // Does Number contains domain part. If yes remove it at beging of @ character. + } + // Does Number contains domain part. If yes remove it at beging of @ character. TInt atIndex = aTelNumber.Find( KAt ); TInt telNumberLength = aTelNumber.Length(); - if ( 0 < atIndex && - atIndex < telNumberLength ) + if ( 0 < atIndex && + atIndex < telNumberLength ) { - aTelNumber.Delete( atIndex, telNumberLength - atIndex ); - } + aTelNumber.Delete( atIndex, telNumberLength - atIndex ); + } } // ----------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyHandler.cpp --- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,14 +18,14 @@ // INCLUDE FILES -#include "csosemergencynumberpolicyhandler.h" +#include "CSOSEmergencyNumberPolicyHandler.h" #include #include #include #include #include #include -#include "csosenpolicysatrefresh.h" +#include "CSosEnPolicySatRefresh.h" // CONSTANTS // The default emergency numbers. @@ -143,7 +143,7 @@ // Create sat refresh listener iSatRefresh = CSosEnPolicySatRefresh::NewL( *this ); - + iSimMonitor = CSosEnPolicySimStatusMonitor::NewL( *this ); iENListHandler = CSosEnPolicyENListHandler::NewL() ; @@ -173,7 +173,7 @@ { aIsEmergencyNumber = iENListHandler->IsInListByNormalMode( aTelNumber ); } - + return KErrNone; } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyManager.cpp --- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,8 +19,8 @@ // INCLUDE FILES -#include "csosemergencynumberpolicymanager.h" -#include "csosemergencynumberpolicyhandler.h" +#include "CSOSEmergencyNumberPolicyManager.h" +#include "CSOSEmergencyNumberPolicyHandler.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicyENListHandler.cpp --- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicyENListHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicyENListHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDES -#include "csosenpolicyenlisthandler.h" +#include "CSosEnPolicyENListHandler.h" #include #include #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySatRefresh.cpp --- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySatRefresh.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySatRefresh.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,11 +20,11 @@ // INCLUDE FILES #include -#include "csosemergencynumberpolicyhandler.h" -#include "csosenpolicysatrefresh.h" +#include "CSOSEmergencyNumberPolicyHandler.h" +#include "CSosEnPolicySatRefresh.h" -#include -#include +#include +#include #include // Property values @@ -40,7 +40,7 @@ // ----------------------------------------------------------------------------- // CSosEnPolicySatRefresh::CSosEnPolicySatRefresh( CSosEmergencyNumberPolicyHandler& aCSosEmergencyNumberPolicyHandler ): - CActive( EPriorityStandard ), iCSosEmergencyNumberPolicyHandler ( aCSosEmergencyNumberPolicyHandler ) + CActive( EPriorityStandard ), iCSosEmergencyNumberPolicyHandler ( aCSosEmergencyNumberPolicyHandler ) { CActiveScheduler::Add( this ); } @@ -82,17 +82,17 @@ if ( iSatRefresh ) { // Cancel notifications. - iSatRefresh->Cancel(); + iSatRefresh->Cancel(); // Close SubSession. iSatRefresh->Close(); } - delete iSatRefresh; - - if ( iSatSession ) - { - iSatSession->Close(); - } - delete iSatSession; + delete iSatRefresh; + + if ( iSatSession ) + { + iSatSession->Close(); + } + delete iSatSession; Cancel(); iProperty.Close(); @@ -104,9 +104,9 @@ // ----------------------------------------------------------------------------- // TBool CSosEnPolicySatRefresh::AllowRefresh( TSatRefreshType /*aType*/, const TSatRefreshFiles& /*aFiles*/ ) - { - // Refresh is always allowed - return ETrue; + { + // Refresh is always allowed + return ETrue; } // ----------------------------------------------------------------------------- @@ -116,12 +116,12 @@ // ----------------------------------------------------------------------------- // void CSosEnPolicySatRefresh::Refresh( TSatRefreshType /*aType*/, const TSatRefreshFiles& /*aFiles*/ ) - { - // Reload SIM Topics in case of refresh + { + // Reload SIM Topics in case of refresh iCSosEmergencyNumberPolicyHandler.CpsssmHandleSimStatusEvent( CSosEmergencyNumberPolicyHandler::ESosEnPolicySimEmergencyNumberRead ); iSatRefresh->RefreshEFRead( EFalse ); - } - + } + // ----------------------------------------------------------------------------- // CSosEnPolicySimStatusMonitor::IssueRequest @@ -155,11 +155,11 @@ case KErrNone: { iSatSession->ConnectL(); - iSatRefresh->OpenL( *iSatSession ); + iSatRefresh->OpenL( *iSatSession ); TSatRefreshFiles file; file.Append( KEccEf ); iSatRefresh->NotifyFileChangeL( file ); - break; + break; } default: break; @@ -167,7 +167,7 @@ } else { - IssueRequest(); + IssueRequest(); } } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySimStatusMonitor.cpp --- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySimStatusMonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySimStatusMonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDES -#include "csosenpolicysimstatusmonitor.h" +#include "CSosEnPolicySimStatusMonitor.h" #include // Property values -#include +#include @@ -194,15 +194,15 @@ { switch ( aState ) { - case ESimUsable: - case ESimReadable: - return ETrue; - case ESimStatusUninitialized: - case ESimNotReady: - case ESimNotSupported: - case ESimNotPresent: - return EFalse; - default: + case ESimUsable: + case ESimReadable: + return ETrue; + case ESimStatusUninitialized: + case ESimNotReady: + case ESimNotSupported: + case ESimNotPresent: + return EFalse; + default: return EFalse; } } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/EnPolicy/rom/enpolicy.iby --- a/phoneclientserver/EnPolicy/rom/enpolicy.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/EnPolicy/rom/enpolicy.iby Wed Sep 01 12:15:03 2010 +0100 @@ -20,11 +20,11 @@ #define __ENPOLICY_IBY__ #ifdef __EN_POLICY_DOS -file = ABI_DIR\BUILD_DIR\dosenpolicy.dll SHARED_LIB_DIR\dosenpolicy.dll -data=ZSYSTEM\install\dosenpolicy_stub.sis system\install\dosenpolicy_stub.sis +file = ABI_DIR\BUILD_DIR\DOSENPOLICY.DLL SHARED_LIB_DIR\DOSENPOLICY.DLL +data=ZSYSTEM\install\DosEnPolicy_stub.sis system\install\DosEnPolicy_stub.sis #else -file = ABI_DIR\BUILD_DIR\sosenpolicy.dll SHARED_LIB_DIR\sosenpolicy.dll -data=ZSYSTEM\install\sosenpolicy_stub.sis system\install\sosenpolicy_stub.sis +file = ABI_DIR\BUILD_DIR\SOSENPOLICY.DLL SHARED_LIB_DIR\SOSENPOLICY.DLL +data=ZSYSTEM\install\SosEnPolicy_stub.sis system\install\SosEnPolicy_stub.sis #endif #endif // __ENPOLICY_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/aiwdialdata/group/aiwdialdata.mmp --- a/phoneclientserver/aiwdialdata/group/aiwdialdata.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/aiwdialdata/group/aiwdialdata.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -33,7 +33,7 @@ SOURCE aiwinternaldialdata.cpp USERINCLUDE ../inc -SYSTEMINCLUDE ../../../inc +SYSTEMINCLUDE ../../../inc MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/aiwdialdata/group/bld.inf --- a/phoneclientserver/aiwdialdata/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/aiwdialdata/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,8 +24,8 @@ ../inc/aiwinternaldialdata.h |../../../inc/aiwinternaldialdata.h -../group/aiwdialdata_stub.sis\ - /epoc32/data/z/system/install/aiwdialdata_stub.sis +../group/aiwdialdata_stub.SIS\ + /epoc32/data/z/system/install/aiwdialdata_stub.SIS // IBY files ../rom/aiwdialdata.iby CORE_MW_LAYER_IBY_EXPORT_PATH(aiwdialdata.iby) diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/aiwdialdata/inc/aiwinternaldialdata.h --- a/phoneclientserver/aiwdialdata/inc/aiwinternaldialdata.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/aiwdialdata/inc/aiwinternaldialdata.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include #include "aiwdialdata.h" /** Constants used by aiwinternaldialdata interface. */ diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/aiwdialdata/rom/aiwdialdata.iby --- a/phoneclientserver/aiwdialdata/rom/aiwdialdata.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/aiwdialdata/rom/aiwdialdata.iby Wed Sep 01 12:15:03 2010 +0100 @@ -20,6 +20,6 @@ #define __AIWDIALDATA_IBY__ file=ABI_DIR\BUILD_DIR\aiwdialdata.dll SHARED_LIB_DIR\aiwdialdata.dll -data=ZSYSTEM\install\aiwdialdata_stub.sis System\Install\aiwdialdata_stub.sis +data=ZSYSTEM\install\aiwdialdata_stub.SIS System\Install\aiwdialdata_stub.SIS #endif // __AIWDIALDATA_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/callui/inc/cauiengine/cauimessagesenderstub.h --- a/phoneclientserver/callui/inc/cauiengine/cauimessagesenderstub.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2004-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: Message sender stub. -* -*/ - - -#ifndef CAUIMESSAGESENDER_H -#define CAUIMESSAGESENDER_H - -// INCLUDES -#include -#include // cuidnamearray - -// CLASS DECLARATION - -/** -* CaUIMessageSender implementation. -* -* @lib CaUiEngine.lib -* @since 3.1 -*/ -class CCaUiMessageSender : - public CBase - { - public: // Constructors and destructor - - /** - * Destructor. - */ - ~CCaUiMessageSender(); - - /** - * Two-phased constructor. - * @return an instance of CCaUiMessageSender. - */ - static CCaUiMessageSender* NewL(); - - public: // New functions - - /** - * Create new message by given Id. The message editor will always - * be lauched stand alone. - * @param aMessageType mtmUid indicate the message type - * aRealAddress address list to send message - */ - void CreateNewMessageL( TInt aMessageType, - MDesC16Array* aRealAddress, - MDesC16Array* aAliases, - CRichText* aRichText ); - - private: - - /** - * C++ constructor. - * - * @param aIndex After the query is dismissed, the index will hold - * the value of selected item. - */ - CCaUiMessageSender( ); - - /** - * Create SendUi - */ - void CreateSendUiL(); - - /** - * Get message types from mtm registry - * - * @param aMsgTypes array of UIDs (MTM types) - * - */ - void UpdateMessageTypesArrayL( CUidNameArray* aMsgTypes ); - - /** - * Check if mail box is defined - */ - TBool IsMailboxDefinedL(); - - /** - * Create connection to message service - */ - void CreateMessageServiceConnectionL(); - - private: - - }; - -#endif // CAUIMESSAGESENDER_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/callui/src/cauiengine/cauienginestub.cpp --- a/phoneclientserver/callui/src/cauiengine/cauienginestub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,656 +0,0 @@ -/* -* Copyright (c) 2004-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: Implementation of CallUIEngine, stub version. -* -*/ - - - -// INCLUDE FILES -#include "cauiengine.h" -#include "cauidialogs.h" - -#include // resources. -#include // cphcltdialer. -#include -#include -#include -#include // cphcltextphonedialdata - -#include "callui.loc" // localized strings. - -#include // string loader. -#include // featuremanager. - -#include // character removal. -#include // aiw dialdata. - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CCaUiEngine::CCaUiEngine -// -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -// -CCaUiEngine::CCaUiEngine() -: iResourceLoader( *CCoeEnv::Static() ) -#ifndef RD_PHONE_NG - ,iResourceLoaderPhoneApE( *CCoeEnv::Static() ) -#endif - { - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::ConstructL -// -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::ConstructL() - { - // Sets up TLS, must be done before FeatureManager is used. - FeatureManager::InitializeLibL(); - - if( CCoeEnv::Static() ) - { - // Open CallUI resource file. - TFileName* name = new ( ELeave ) TFileName( KCallUIResFile ); - CleanupStack::PushL( name ); - User::LeaveIfError( iResourceLoader.Open( *name ) ); - CleanupStack::PopAndDestroy( name ); - } - } - -// ----------------------------------------------------------------------------- -// CCaUiEngine::NewL -// -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCaUiEngine* CCaUiEngine::NewL() - { - CCaUiEngine* self = new( ELeave ) CCaUiEngine; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::~CCaUEngine -// -// Destructor. -// ----------------------------------------------------------------------------- -// -CCaUiEngine::~CCaUiEngine() - { - delete iContactSelector; - delete iFactory; - - // Clear dial components. - ClearDialContents(); - - if( CCoeEnv::Static() ) - { - // Close resource loader. - iResourceLoader.Close(); - -#ifndef RD_PHONE_NG - // Release PhoneAppEngine resources. - iResourceLoaderPhoneApE.Close(); -#endif - } - - // Delete the menubuffer. - delete iBuf; - iBuf = NULL; - - // Frees the TLS! Must be done after FeatureManager is used. - FeatureManager::UnInitializeLib(); - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::GetResources -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::GetResources( - const TCaUiEngResource aResource, - TFileName& aResFile, - TInt& aResId ) - { - aResFile = KCallUIResFile; - if ( aResource == ECaUiResOnlyInternet ) - { - aResId = 0; - } - else - { - // Return pure voice menu item. - aResId = R_CALLUI_CALL_MENU; - } - } - -// ----------------------------------------------------------------------------- -// CCaUiEngine::DialL -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::DialL( - MCaUiDialResultObserver& aObserver, - const TDesC8& aDialData, - const TCaUiCallType aCallType ) - { - TInt length = aDialData.Length(); - - // If iPhCltDialer and iDialDataContainer exist, - // destroy them and create new ones. This clears the dial data. - ClearDialContents(); - iPhCltDialer = CPhCltExtPhoneBase::NewL( this ); - iObserver = &aObserver; - - iDialData = CPhCltExtPhoneDialData::NewL(); - CAiwInternalDialData* aiwDialData = CAiwInternalDialData::NewLC( aDialData ); - - // Convert AIW dial data to PhoneClient format. - - ConvertDialDataL( *aiwDialData ); - - iDialData->SetCallType( EPhCltVoice ); - - //a call type is still unknown if the dialing is made via phonebook - //send key (doesn't use HandleMenuCmdL, check the call type in - //aiwDialData to make sure if unknown is really unknown - //only do if call type unknown - TCaUiCallType callType = aCallType; - if ( callType == ECaUiCallTypeUnknown ) - { - CAiwDialData::TCallType aiwCalltype = aiwDialData->CallType(); - - switch ( aiwCalltype ) - { - case CAiwDialData::EAIWVoice: - callType = ECaUiCallTypeVoice; - break; - case CAiwDialData::EAIWVideo: - case CAiwDialData::EAIWForcedVideo: - callType = ECaUiCallTypeVideo; - break; - case CAiwDialData::EAIWVoiP: - callType = ECaUiCallTypeInternet; - break; - default: - //already unknown - break; - } - } - - //aiwDialData not needed anymore, remove from stack - CleanupStack::PopAndDestroy( aiwDialData ); - - // If Contact link is provided fetch field link from Phone Book. - if ( iDialData->ContactLink() != KNullDesC8() ) - { - // Launch address select. - // aCallType describes which selector is used. ( VoIP/PhoneNumber ) - LaunchAddressSelectL( - iDialData->ContactLink(), - callType ); - } - - - else - { - iPhCltDialer->DialL( *iDialData ); - } - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::LaunchNoNetSupNoteL -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::LaunchNoNetSupNoteL() - { - User::Leave( KErrNotSupported ); - } - - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::LaunchReconConfQueryL -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::LaunchReconConfQueryL( - MCaUiReconnectQueryObserver& /*aObserver*/, - CPhCntMatcher* /*aPhCntMatcher*/, - const TPtrC /*aPhoneNumber*/, - const TBool /*aIncludeVideoCallOption*/ ) - { - User::Leave( KErrNotSupported ); - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::CancelReconConfQuery -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::CancelReconConfQuery() - { - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::LaunchNoteAndReconConfQueryL -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::LaunchNoteAndReconConfQueryL( - MCaUiReconnectQueryObserver& /*aObserver*/, - CPhCntMatcher* /*aPhCntMatcher*/, - const TPtrC /*aPhoneNumber*/, - const TBool /*aIncludeVideoCallOption*/, - const TPtrC /*aNoteText*/ ) - { - User::Leave( KErrNotSupported ); - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::CancelNoteAndReconConfQuery -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::CancelNoteAndReconConfQuery() - { - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::LaunchAddressSelectL -// -// -// ----------------------------------------------------------------------------- -// -TBool CCaUiEngine::LaunchAddressSelectL( - TDes& aTelNum, - const TInt aContactId, - const TBool aVoIPAddressSelect ) - { - if ( aVoIPAddressSelect ) - { - User::Leave( KErrNotSupported ); - } - - TBool addressSelected( EFalse ); - TCaUiCallType callType( ECaUiCallTypeVoice ); - - addressSelected = LaunchAddressSelectL( aTelNum, aContactId, callType ); - - return addressSelected; - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::CancelAddressSelect -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::CancelAddressSelect() - { - } - -// ----------------------------------------------------------------------------- -// From MPhCntStoreLoaderObserver. -// CCaUiEngine::ContactStoreLoadingCompleted -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::ContactStoreLoadingCompleted( - MVPbkContactStore* /*aStore*/, TInt /*aErrorCode*/ ) - { - } - - -// ----------------------------------------------------------------------------- -// CCaUiEngine::HandleDialL -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::HandleDialL( const TInt aStatus ) - { - if ( iObserver ) - { - iObserver->HandleDialResultL( aStatus ); - } - - ClearDialContents(); - } - -// ----------------------------------------------------------------------------- -// From base class MCaUiReconnectQueryObserver -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::OptionSelected( - MCaUiReconnectQueryObserver::TCaUiReconType /*aReconType*/ ) - { - } - -// ----------------------------------------------------------------------------- -// CCaUiEngine::ConvertDialData -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::ConvertDialDataL( - const CAiwInternalDialData& aAiwDialData ) - { - // Telephony number. - iDialData->SetTelephoneNumber( aAiwDialData.PhoneNumber().Left( - iDialData->TelephoneNumber().MaxLength() ) ); - - // Call type. - CAiwDialData::TCallType aiwCallType = aAiwDialData.CallType(); - TPhCltCallType phCltCallType = EPhCltVoice; - - // After this the call type should be correct one. - if ( aiwCallType == CAiwDialData::EAIWVideo ) - { - phCltCallType = EPhCltVideo; - iDialData->SetCallType( phCltCallType ); - } - else if ( aiwCallType == CAiwDialData::EAIWForcedVideo ) - { - phCltCallType = EPhCltForcedVideo; - iDialData->SetCallType( phCltCallType ); - } - else if ( aiwCallType == CAiwDialData::EAIWVoiP ) - { - phCltCallType = EPhCltCallVoIP; - iDialData->SetCallType( phCltCallType ); - } - - // Name. - iDialData->SetNameL( aAiwDialData.Name().Left( - iDialData->Name().MaxLength() ) ); - - // Contact link. - iDialData->SetContactLinkL( aAiwDialData.ContactLink() ); - - // Window group. - iDialData->SetWindowGroup( aAiwDialData.WindowGroup() ); - - // Redial. - iDialData->SetRedial( aAiwDialData.Redial() ); - - // Redial maximum duration. - iDialData->SetRedialMaximumDuration( aAiwDialData.RedialMaximumDuration() ); - - // Show number. - iDialData->SetShowNumber( aAiwDialData.ShowNumber() ); - - // Match. - iDialData->SetAllowMatch( aAiwDialData.AllowMatch() ); - - // End other calls. - iDialData->SetEndOtherCalls( aAiwDialData.EndOtherCalls() ); - - // Subaddress. - iDialData->SetSubAddressL( aAiwDialData.SubAddress().Left( - iDialData->SubAddress().MaxLength() ) ); - - // SAT call. - iDialData->SetSATCall( aAiwDialData.SATCall() ); - - // Bearer. - iDialData->SetBearerL( aAiwDialData.Bearer().Left( - iDialData->Bearer().MaxLength() ) ); - - TPhCltTelephoneNumber telnum; - telnum.Zero(); - telnum = iDialData->TelephoneNumber(); - PhCltUtils::RemoveInvalidChars( telnum ); - iDialData->SetTelephoneNumber( telnum ); - - } - -// ----------------------------------------------------------------------------- -// CCaUiEngine::ClearDialContents -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::ClearDialContents() - { - if ( iPhCltDialer ) - { - delete iPhCltDialer; - iPhCltDialer = NULL; - } - - if ( iDialData ) - { - delete iDialData; - iDialData = NULL; - } - - // Not owned, so just set to NULL. - iObserver = NULL; - } - -// ----------------------------------------------------------------------------- -// CCaUiEngine::LaunchAddressSelectL -// -// -// ----------------------------------------------------------------------------- -// -void CCaUiEngine::LaunchAddressSelectL( - const TDesC8& aContactLink, - const TCaUiCallType aCallType ) - { - if ( aCallType != ECaUiCallTypeVoice ) - { - HandleDialL( KErrNotSupported ); - } - - else - { - if ( !iFactory ) - { - iFactory = CreateCntFactoryL(); - } - if ( !iContactSelector ) - { - iContactSelector = iFactory->CreateContactDataSelectionL(); - } - - CPhCntContactDataSelection::TCallType callType; - - if ( aCallType == ECaUiCallTypeVoice ) - { - callType = CPhCntContactDataSelection::ECallPhoneNumber; - } - else if ( aCallType == ECaUiCallTypeVideo ) - { - callType = CPhCntContactDataSelection::ECallVideoNumber; - } - else if ( aCallType == ECaUiCallTypeInternet ) - { - callType = CPhCntContactDataSelection::ECallVoip; - } - else - { - callType = CPhCntContactDataSelection::ECallPhoneNumber; - } - - iContactSelector->Cancel(); - iContactSelector->SelectPhoneNumberForCallL( aContactLink, callType, *this ); - - } - - } - -// --------------------------------------------------------- -// CCaUiEngine::HandleEmergencyDialL() -// --------------------------------------------------------- -// -void CCaUiEngine::HandleEmergencyDialL( const TInt /*aStatus*/ ) - { - // Do nothing - } - -// --------------------------------------------------------- -// CCaUiEngine::SelectionDone() -// --------------------------------------------------------- -// -void CCaUiEngine::SelectionDone( CPhCntSelectedData* aContactData, - TInt aErrorCode ) - { - if ( aErrorCode == KErrNone ) - { - TPhCltTelephoneNumber phoneNumber; - HBufC8* fieldLink = NULL; - - if ( iDialData->TelephoneNumber() == KNullDesC ) - { - phoneNumber = aContactData->Data(); - PhCltUtils::RemoveInvalidChars( phoneNumber ); - iDialData->SetTelephoneNumber( phoneNumber ); - } - if ( aContactData->FieldLink().Length() > 0 ) - { - fieldLink = aContactData->FieldLink().Alloc(); - } - - TRAP( aErrorCode, PhoneClientDialL( fieldLink ) ); - - delete fieldLink; - fieldLink = NULL; - } - - if ( aErrorCode != KErrNone ) - { - TRAP_IGNORE( HandleDialL( aErrorCode ) ); - } - } - -// --------------------------------------------------------- -// CCaUiEngine::PhoneClientDialL() -// --------------------------------------------------------- -// -void CCaUiEngine::PhoneClientDialL( const TDesC8* aFieldLink ) - { - - TBool createCall( ETrue ); - TInt error( KErrNone ); - - if ( aFieldLink ) - { - iDialData->SetContactLinkL( *aFieldLink ); - } - - // Check if number is emergency number and if it is - // then call emeregency call - if ( !iEmergencyCall ) - { - iEmergencyCall = CPhCltEmergencyCall::NewL( this ); - } - if ( IsEmergencyNumber() ) - { - createCall = EFalse; - if ( aFieldLink ) - { - error = KErrNone; - iEmergencyCall->DialEmergencyCallL( iDialData->TelephoneNumber() ); - } - else - { - error = KErrNotSupported; - } - } - - // Here note launch + query if this is video call and we - // are not in 3G network. - - if ( createCall ) - { - if ( ( iDialData->CallType() == EPhCltVideo ) || - ( iDialData->CallType() == EPhCltForcedVideo ) || - ( iDialData->CallType() == EPhCltCallVoIP ) ) - { - createCall = EFalse; - error = KErrNotSupported; - } - - } - if ( createCall ) - { - iPhCltDialer->DialL( *iDialData ); - } - else - { - //User cancelled. Need to inform client. - if ( error != KErrNone ) // Emergency call does not need to inform client. - { - HandleDialL( error ); - } - } - } - -// --------------------------------------------------------- -// CCaUiEngine::IsEmergencyNumber() -// --------------------------------------------------------- -// -TBool CCaUiEngine::IsEmergencyNumber() - { - TBool isEmergencyNumber( EFalse ); - - // get phonenumber from iDialData and heck number using phoneclient - // emergencycall api - TInt result = iEmergencyCall->IsEmergencyPhoneNumber( - iDialData->TelephoneNumber(), - isEmergencyNumber ); - - return isEmergencyNumber; - } - -// ----------------------------------------------------------------------------- -// CCaUiEngine::IsVoIPProfiles() -// -// -// ----------------------------------------------------------------------------- -// -TBool CCaUiEngine::IsVoIPProfiles() - { - return EFalse; - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/callui/src/cauiengine/cauimessagesenderstub.cpp --- a/phoneclientserver/callui/src/cauiengine/cauimessagesenderstub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Message sender stub -* -*/ - - -// INCLUDES -#include "cauimessagesenderstub.h" - -// ----------------------------------------------------------------------------- -// CCaUiMessageSender::CCaUiMessageSender -// -// C++ constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CCaUiMessageSender::CCaUiMessageSender() - { - } - - -// ----------------------------------------------------------------------------- -// CCaUiMessageSender::~CCaUiMessageSender -// -// Destructor. -// ----------------------------------------------------------------------------- -// -CCaUiMessageSender::~CCaUiMessageSender() - { - } - - -// ----------------------------------------------------------------------------- -// CCaUiMessageSender::NewL -// -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCaUiMessageSender* CCaUiMessageSender::NewL() - { - CCaUiMessageSender* self = new( ELeave ) CCaUiMessageSender (); - - return self; - } - -// --------------------------------------------------------- -// CCaUiMessageSender::CreateNewMessageL -// Create a new message of the given type, in the given location -// --------------------------------------------------------- -// -void CCaUiMessageSender::CreateNewMessageL( - TInt /*aMessageType*/, - MDesC16Array* /*aRealAddress*/, - MDesC16Array* /*aAliases*/, - CRichText* /*aRichText*/ ) - { - } - -// --------------------------------------------------------- -// CCaUiMessageSender::CreateSendUiL -// --------------------------------------------------------- -// -void CCaUiMessageSender::CreateSendUiL() - { - } - - -// --------------------------------------------------------- -// CCaUiMessageSender::UpdateMessageTypesArrayL -// Updates the array of UIDs which defines the MTM types for which the user -// can create new messages. -// --------------------------------------------------------- -void CCaUiMessageSender::UpdateMessageTypesArrayL( - CUidNameArray* /*aMsgTypes*/ ) - { - } - -// --------------------------------------------------------- -// CCaUiMessageSender::CreateMessageServiceConnectionL -// --------------------------------------------------------- -// -void CCaUiMessageSender::CreateMessageServiceConnectionL() - { - } - -// --------------------------------------------------------- -// CCaUiMessageSender::IsMailboxDefinedL -// --------------------------------------------------------- -// -TBool CCaUiMessageSender::IsMailboxDefinedL() - { - TBool isDefined( EFalse ); - return isDefined; - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/dialutils/group/bld.inf --- a/phoneclientserver/dialutils/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/dialutils/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ PRJ_EXPORTS // Domain -../group/dialutils_stub.sis /epoc32/data/z/system/install/dialutils_stub.sis +../group/dialutils_stub.sis /epoc32/data/z/system/install/dialutils_stub.sis PRJ_MMPFILES ../group/dialutils.mmp diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/dialutils/group/dialutils.mmp --- a/phoneclientserver/dialutils/group/dialutils.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/dialutils/group/dialutils.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -24,8 +24,8 @@ UID 0x1000008d 0x101F8747 SOURCEPATH ../src -SOURCE dialutilsimpl.cpp -SOURCE dialutilsfactimpl.cpp +SOURCE DialUtilsImpl.cpp +SOURCE DialUtilsFactImpl.cpp USERINCLUDE ../inc diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/dialutils/inc/DialUtilsFactImpl.h --- a/phoneclientserver/dialutils/inc/DialUtilsFactImpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/dialutils/inc/DialUtilsFactImpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES -#include +#include /** diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/dialutils/inc/DialUtilsImpl.h --- a/phoneclientserver/dialutils/inc/DialUtilsImpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/dialutils/inc/DialUtilsImpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/dialutils/src/DialUtilsFactImpl.cpp --- a/phoneclientserver/dialutils/src/DialUtilsFactImpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/dialutils/src/DialUtilsFactImpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include -#include "dialutilsfactimpl.h" -#include "dialutilsimpl.h" +#include +#include "DialUtilsFactImpl.h" +#include "DialUtilsImpl.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/dialutils/src/DialUtilsImpl.cpp --- a/phoneclientserver/dialutils/src/DialUtilsImpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/dialutils/src/DialUtilsImpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,10 +20,10 @@ // INCLUDE FILES #include // Feature Manager. -#include "dialutilsimpl.h" // Interface. +#include "DialUtilsImpl.h" // Interface. #include // Central repository -#include // Settings Central Repository keys. +#include // Settings Central Repository keys. // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/dialutils/tsrc/public/basic/DialUtilsTests/src/DialUtilsTestsCases.cpp --- a/phoneclientserver/dialutils/tsrc/public/basic/DialUtilsTests/src/DialUtilsTestsCases.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/dialutils/tsrc/public/basic/DialUtilsTests/src/DialUtilsTestsCases.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #include #include "DialUtilsTests.h" -#include +#include // EXTERNAL DATA STRUCTURES //extern ?external_data; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/group/bld.inf --- a/phoneclientserver/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -16,10 +16,12 @@ */ -#include "../enpolicy/group/bld.inf" +#include "../EnPolicy/Group/bld.inf" #include "../aiwdialdata/group/bld.inf" #include "../dialutils/group/bld.inf" -#include "../phoneclient/group/bld.inf" -#include "../phoneserver/group/bld.inf" +#include "../phoneclient/Group/bld.inf" +#include "../phoneserver/Group/bld.inf" +#include "../CallUI/Group/bld.inf" + // End of File \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/inc/cphcltdialer.h --- a/phoneclientserver/inc/cphcltdialer.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2002 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: It is dialer class. -* -*/ - - -#ifndef CPHCLTDIALER_H -#define CPHCLTDIALER_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATIONS -class CPhCltDialerDlg; - -// CLASS DECLARATION - -/** -* It is dialer class. -* -* @lib phoneclient.lib -* @since 1.0 -*/ -class CPhCltDialer - : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * - * @return Pointer to created CPhCltDialer instance. - */ - IMPORT_C static CPhCltDialer* NewL(); - - /** - * Destructor. - */ - ~CPhCltDialer(); - - - public: // New functions - - /** - * Dial parameters. - * - * @return Returns dial data. - */ - IMPORT_C CPhCltExtPhoneDialData& DialData(); - - /** - * Performs dialing with the dial data. - */ - IMPORT_C void ExecuteLD(); - - - private: - - /** - * C++ constructor. - */ - CPhCltDialer(); - - /** - * Symbian OS constructor. - */ - void ConstructL(); - - /** - * Cleanup action. Clears iDestroyed & iDialDlg. - */ - static void DoClear( TAny* aAny ); - - - private: // Data - - // Pointer to boolean indicating if this has been destroyed already. - TBool* iDestroyed; - - // Dialer dialog - CPhCltDialerDlg* iDialDlg; - - }; - -#endif // CPHCLTDIALER_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/inc/cphcltextphonebase.h --- a/phoneclientserver/inc/cphcltextphonebase.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* -* Copyright (c) 2002 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: It defines dial interface for phone client. -* -*/ - - -#ifndef CPHCLTEXTPHONEBASE_H -#define CPHCLTEXTPHONEBASE_H - -// INCLUDES -#include -#include "phclttypes.h" - -// FORWARD DECLARATIONS -class MPhCltExtPhoneObserver; -class CPhCltExtPhoneDialData; - -// CLASS DECLARATION - -/** -* It defines dial interface for phone client. -* -* Usage: -* -* To dial, you must have a string of characters from set -* { 0, 1, 2, .. 9, #, *, +, p, P, w, W }. It is the only -* mandatory parameter. String may also contain other characters, -* but then only a note is displayed. So you should proceed as follows: -* 1. Check that string is acceptable. -* (application specific grammar) -* 2. If not, stop. Otherwise continue. -* 3. Convert to string acceptable by phoneclient. -* Note PhCltUtils class may help. -* 4. Dial using the class. -* -* Note that dialling does not always mean creating a call. -* (E.g. *#43# makes phone to interrogate status of call waiting.) -* -* In order to dial, you need instance of CPhCltExtPhoneBase. You -* can create one as follows: -* iExtCall = CPhCltExtPhoneBase::NewL( this ); -* (the parameter is pointer to observer) -* -* Then you must fill dial parameters to instance of TPhCltExtPhoneDialData. -* (you can read more details from its header) -* -* TPhCltExtPhoneDialData data; -* data.SetTelephoneNumber( .. ); -* .. -* -* And finally, you can dial. Note that the method is asynchronous and -* observer will be informed when phone starts dialing. -* -* iExtCall->DialL( data ); -* -* Finally, you can delete the instance. If dialing is ongoing, this should -* be done after observer has been informed. You can also delete before that, -* but then the request might also be canceled. -* -* @lib phoneclient.lib -* @since 1.0 -*/ -class CPhCltExtPhoneBase : public CActive - { - public: // Constructors and destructor - - /** - * Create an instance that implements the interface. - * - * @param aObserver It is the observer for the instance. - * @return Returns the created instance. - */ - IMPORT_C static CPhCltExtPhoneBase* NewL( - MPhCltExtPhoneObserver* aObserver ); - - - public: // New fuctions - - - /** - * Makes a new call. This is the preferred way of dialling! - * - * @param aData The object containing the parameters for - * the dial request. - */ - virtual void DialL( CPhCltExtPhoneDialData& aData ) = 0; - - - protected: - - /** - * C++ constructor. - */ - CPhCltExtPhoneBase( MPhCltExtPhoneObserver* aObserver ); - - - protected: // Data - - // Observer to handle events. - MPhCltExtPhoneObserver* iObserver; - - }; - -#endif // CPHCLTEXTPHONEBASE_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/inc/cphcltextphonedialdata.h --- a/phoneclientserver/inc/cphcltextphonedialdata.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,575 +0,0 @@ -/* -* Copyright (c) 2002-2007 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: It defines dial data. -* -*/ - - -#ifndef CPHCLTEXTPHONEDIALDATA_H -#define CPHCLTEXTPHONEDIALDATA_H - - -// INCLUDES -#include -#include -#include -#include "phclttypes.h" -#include // Phone Client Notify API - - -// Other constants used in TPhCltExtPhoneDialData ( default values ) -const TBool KPhCltDefaultAllowMatch = ETrue; // Match is allowed -const TBool KPhCltDefaultNumberEntry = EFalse; // No return to number entry. -const TInt KPhCltDefaultNumberType = -1; // No number type. - - -// CONSTANTS -//None. - - -// FORWARD DECLARATIONS -//None - -// CLASS DECLARATION -/** -* It defines the structure containing dial information. -* -* Fields: -* -* window group - When call is ended, set window group is actived. -* -* show number - Permission to show number. ETrue if it is allowed. -* -* redial - Automatic redial override. -* -* name - Name corresponding to number. Name must be defined -* if shown number equals to EFalse. -* contact link - Contact link. you should put always when you are dialing -* from phonebook contact. -* tel number - String that is to be dialled. -* number fields are supported. -* allow match - Permission to allow match. ETrue if match is to be done. -* If you are dialing from sim pd or fdn, then this should -* be EFalse. -* number entry - Returns whether to return to the number entry on failure -* -* end other calls - Information if the existing calls are ended before -* this new one is made. -* Not mandatory. Set only if you know that the call is an -* emergency call. -* subaddress - The calling party subaddress. Supports SAT features. -* Defined in ITU-T I.330 and 3GPP TS 11.14. -* SATCall - Set whether this is SAT originated call or not. -* Supports SAT features. -* bearer - Bearer capabilities. Supports SAT features. -* -* CallType - The type of the call, i.e. voice (default) or video. -* -* SendKey - Call made with SendKey, optional. -* -* Redial maximum duration - Automatic redial maximum duration -* -* Initiate call - true if iniate call false otherwise -* -* UUI - User to user information sent on call setup phase. -* -* @lib phoneclient.lib -* @since 3.2 -*/ -/** -* Dial data set for PhoneClient. -* -* @lib ServiceHandler.lib -* @since Series 60 3.2 -*/ -NONSHARABLE_CLASS( CPhCltExtPhoneDialData ): public CPhCltDialData - { - - public: - /* - * TBools combined to one uint. - * - * EPhCltCallFlagsDefault - * Default flags, if nothing is not specified. - * EPhCltCallFlagsAllowNumberShowing - * Number showing is allowed. - * EPhCltCallFlagsReturnToNumberEntryOnFailure - * Return to Number Entry if there is an error. - * EPhCltCallFlagsAllowPersonalDirectoryMatching - * The number is matched to Personal Directory. - * EPhCltCallFlagsEndBeforeDial - * Other calls are ended before the new one is done. - * EPhCltCallFlagsSAT - * If set means that SAT has originated the call. - * EPhCltCallFlagsVideoCall - * If set means that this is video call. - * Otherwise means normal, i.e. voice call. - * EPhCltCallFlagsVoIPCall - * If set means that this is VoIP call. - * Otherwise means normal, i.e. voice call. - * EPhCltCallFlagsSendKey - * If set means that call made with SendKey. - */ - enum TPhCltCallFlags - { - EPhCltCallFlagsDefault = 0x0000, - EPhCltCallFlagsAllowNumberShowing = 0x0001, - EPhCltCallFlagsReturnToNumberEntryOnFailure = 0x0002, - EPhCltCallFlagsAllowPersonalDirectoryMatching = 0x0004, - EPhCltCallFlagsEndBeforeDial = 0x0008, - EPhCltCallFlagsSAT = 0x0020, - EPhCltCallFlagsVideoCall = 0x0040, - EPhCltCallFlagsVoIPCall = 0x0080, - EPhCltCallFlagsSendKey = 0x0100 - }; - - /** - * Two-phased constructor. - */ - IMPORT_C static CPhCltExtPhoneDialData* NewL(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CPhCltExtPhoneDialData* NewLC(); - - - /** - * Two-phased constructor. - */ - IMPORT_C static CPhCltExtPhoneDialData* NewL( const TDesC8& aPackage ); - - /** - * Two-phased constructor. - */ - IMPORT_C static CPhCltExtPhoneDialData* NewLC( const TDesC8& aPackage ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CPhCltExtPhoneDialData(); - - public: // New functions - - /** - * Fills the parameter list. - * @since Series 60 3.2 - * @param aInParamList In parameter used with CAiwService. - */ - IMPORT_C HBufC8* PackLC(); - - - // Calculates dialdata package size - IMPORT_C TInt CalculatePackageSize() const; - - // Sets dial data parameters to CPhCltExtPhoneDialData object - void SetParamsL( const TDesC8& aPackage ); - - - public: // Access - Getters - - - /** - * Defines if mathing is allowed. - * @since Series 60 3.2 - * @return Returns the allow match setting information. - */ - IMPORT_C TBool AllowMatch() const; - - /** - * Bearer capability. - * @since Series 60 3.2 - * @return Returns bearer capability. - */ - IMPORT_C const TPhCltBearerCapability& Bearer() const; - - /** - * Gives the current call type. - * @since Series 60 3.2 - * @return Current call type. - */ - IMPORT_C TPhCltCallType CallType() const ; - - /** - * Contact link field. - * @since Series 60 3.2 - * @return Returns contack link item. - */ - IMPORT_C const TDesC8& ContactLink() const; - - - /** - * End other calls param. - * @since Series 60 3.2 - * @return Returns ETrue if other calls will be terminated. - * EFalse if calls are not terminated. - */ - IMPORT_C TBool EndOtherCalls() const; - - /** - * Intiate Call - * @since Series 60 3.2 - * @return Returns ETrue if call is itiate call EFalse otherwise - */ - IMPORT_C TBool InitiateCall() const; - - /** - * Name. - * @since Series 60 3.2 - * @return Returns name. - */ - IMPORT_C const TPhCltNameBuffer& Name() const; - - - /** - * Redial information. - * @since Series 60 3.2 - * @return Return the redial status, - */ - IMPORT_C TInt Redial() const; - - /** - * Redial maximum duration - * @since Series 60 3.2 - * @return Returns redial max duration. - */ - IMPORT_C const TTimeIntervalSeconds RedialMaximumDuration() const; - - - /** - * Return in failure. - * @since Series 60 3.2 - * @return Returns whether to return to the number entry. - */ - //IMPORT_C TBool ReturnToNumberEntryOnFailure() const; - - /** - * SAT Call. - * @since Series 60 3.2 - * @return Returns ETrue if SAT call EFalse if not. - */ - IMPORT_C TBool SATCall() const; - - /** - * SendKey pressed. - * @since Series 60 3.2 - * @return Return ETrue if SendKey used. - */ - IMPORT_C TBool SendKeyPressed() const; - - /** - * Show Number. - * @since Series 60 3.2 - * @return Returns the number visibility. - */ - IMPORT_C TBool ShowNumber() const; - - /** - * Sub address. - * @since Series 60 3.2 - * @return Returns SAT call sub address. - */ - IMPORT_C const TPhCltSubAddress& SubAddress() const; - - /** - * Gives the current phone number. - * @since Series 60 3.2 - * @return Telephone number. - */ - IMPORT_C const TPhCltTelephoneNumber& TelephoneNumber() const; - - /** - * Gives the current window group id. - * @since Series 60 3.2 - * @return Window group id. - */ - IMPORT_C TInt WindowGroup() const; - - /** - * Gives the user to user information. - * @since S60 v3.2 - * @return User to user information. - */ - IMPORT_C const TDesC& UUI() const; - - public: // Access - Setters - - /** - * Set whether the name entered in SetName should be matched - * against the personal directory. - * @since Series 60 3.2 - * This should be set EFalse only if phone number has not been - * taken from phonebook. - * - * @param aAllowMatch Whether to allow matches. - */ - IMPORT_C void SetAllowMatch( TBool aAllowMatch ); - - /** - * Set the bearer capability. - * @since Series 60 3.2 - * @param aBearer The bearer capabilities as defined in GSM 04.08. - * @leaves KErrArgument if aBearer's length is longer than KAiwBearerLength - */ - IMPORT_C void SetBearerL( const TPhCltBearerCapability& aBearer ); - - /** - * Sets call type. - * @since Series 60 3.2 - * @param aCallType calls' type. - */ - IMPORT_C void SetCallType( TPhCltCallType aCallType ); - - /** - * Set contact link. - * @since Series 60 3.2 - * @param aContactLink Contact link information. - */ - IMPORT_C void SetContactLinkL( const TDesC8& aContactLink ); - - - /** - * Set parameter for end other calls. - * @since Series 60 3.2 - * If this is set to ETrue, other calls will be terminated before - * dial. Default is EFalse. - * @param aEndCalls Are the other calls ended. - */ - IMPORT_C void SetEndOtherCalls( TBool aEndCalls ); - - /** - * Set Initiate call Etrue or EFalse - *@since Series 60 3.2 - * @param aInitCall ETrue if call is intiate call - */ - IMPORT_C void SetInitiateCall( TBool aInitCall ); - - - /** - * Set the name of the person who is to be called. - * @since Series 60 3.2 - * @param aName The name of the person being called. - * @leaves KErrArgument if aName length is over 50 characters. - */ - IMPORT_C void SetNameL( const TPhCltNameBuffer& aName ); - - - /** - * Change the redial mode. - * @since Series 60 3.2 - * @param aRedial The new redial status - */ - - IMPORT_C void SetRedial( TInt aRedial ); - - /** - * Set redial max duration. - * @since Series 60 3.2 - * @param aDuration redial max duration. - */ - IMPORT_C void SetRedialMaximumDuration( TTimeIntervalSeconds aMaximumRedialDuration ); - - - /** - * Set whether to return to number entry. - * - * @param aReturn Whether to return to the number entry editor. - */ - IMPORT_C void SetReturnToNumberEntryOnFailure( TBool aReturn ); - - /** - * Set wheteher this is a SAT originated call or not. - * If this function is not called, the originator is assumed to - * be other than SAT. - * @since Series 60 3.2 - * @param aSATCall ETrue if SAT originated the call, EFalse otherwise. - */ - IMPORT_C void SetSATCall( TBool aSATCall ); - - - /** - * Set the value of SendKey. - * @since Series 60 3.2 - * @param aSendKey The value of SendKey. - */ - IMPORT_C void SetSendKeyPressed( TBool aSendKey ); - - /** - * Set the number visibility in the phone app. - * @since Series 60 3.2 - * If this is set to EFalse, then number is not shown or written to - * log event. - * @param aShowNumber Whether or not to show the number. - */ - IMPORT_C void SetShowNumber( TBool aShowNumber ); - - /** - * Set the calling party subaddress. - * Defined in ITU-T I.330 and 3GPP TS 11.14. - * @since Series 60 3.2 - * @param aSubAddress The calling party subaddress. - * @leaves KErrArgument if aSubAddress length is longer than - * KAiwSubAddressLength - */ - IMPORT_C void SetSubAddressL( const TPhCltSubAddress& aSubAddress ); - - /** - * Sets the phone number. - * @since Series 60 3.2 - * @param aNumber Phone number, which maximum length is - * KMaximumPhoneNumberLength. - * @leaves KErrArgument if aPhoneNumber length is over KMaximumPhoneNumberLength - */ - IMPORT_C void SetTelephoneNumber( const TPhCltTelephoneNumber& aNumber ); - - /** - * Sets the window group identifier. When call is ended, set window group is actived. - * @since Series 60 3.2 - * @param aWindowGroup Window group id. - */ - IMPORT_C void SetWindowGroup( TInt aWindowGroup ); - - /** - * Set the value of xSP Service Id. - * - * @param aServiceId The value of Service Id. - */ - IMPORT_C void SetServiceId( TUint32 aServiceId ); - - - /** - * Service Id. VoIP2.2 implementation - * @return Return service id or zero. - */ - IMPORT_C TUint32 ServiceId() const; - - - /** - * Sets user to user information. Maximum length is - * KPhCltUUILength. - * @param aUUI User to user information. - * @since S60 v3.2 - */ - IMPORT_C void SetUUIL( const TDesC& aUUI ); - - - - - - // Constructors - - private: - - /** - * C++ default constructor. - * @since Series 60 3.2 - */ - CPhCltExtPhoneDialData(); - - /** - * By default Symbian 2nd phase constructor is private. - * @since Series 60 3.2 - */ - void ConstructL(); - - /** - * By default Symbian 2nd phase constructor is private. - * @since Series 60 3.2 - * @param aPackage including dial data - */ - void ConstructL( const TDesC8& aPackage ); - - - //Private functions - - private: - /** - * Calculates variable descriptor size - * @since Series 60 3.2 - * @param aDescriptor which size is calculated - */ - TInt CalculateDescriptorSize( const TDesC& aDescriptor ) const; - - /** - * Calculates variable descriptor size - * @since Series 60 3.2 - * @param aDescriptor which size is calculated - */ - TInt CalculateDescriptorSize( const TDesC8& aDescriptor ) const; - - /** - * Read descriptor value from stream - * @since Series 60 3.2 - * @param aStream used stream - * @param aDescriptor which is read from stream - */ - void ReadDescriptorFromStreamL( RDesReadStream& aStream, HBufC8*& aDescriptor ); - - /** - * Read descriptor value from stream - * @since Series 60 3.2 - * @param aStream used stream - * @param aDescriptor which is read from stream - */ - void ReadDescriptorFromStreamL( RDesReadStream& aStream, HBufC*& aDescriptor ); - - /** - * Write descriptor value to stream - * @since Series 60 3.2 - * @param aStream used stream - * @param aDescriptor which value is write to stream - */ - void WriteDescriptorToStreamL( RDesWriteStream& aStream, const TDesC8& aDescriptor ); - - /** - * Write descriptor value to stream - * @since Series 60 3.2 - * @param aStream used stream - * @param aDescriptor which value is write to stream - */ - void WriteDescriptorToStreamL( RDesWriteStream& aStream, const TDesC& aDescriptor ); - - - /** - * Copy descriptor value to member descriptor - * @since Series 60 3.2 - * @param aSource which is as copy source - * @param aMemberDescriptor is as copy destination - */ - void CopyDescriptorToMemberDescriptorL( const TDesC& aSource, HBufC*& aMemberDescriptor ); - - /** - * Copy descriptor value to member descriptor - * @since Series 60 3.2 - * @param aSource which is as copy source - * @param aMemberDescriptor is as copy destination - */ - void CopyDescriptorToMemberDescriptorL( const TDesC8& aSource, HBufC8*& aMemberDescriptor ); - - - /** - * Check descriptor max length - * Leaves with KErrArgument if aDescriptorLength is greated that aMaxAllowedDescriptorLenght - * @since Series 60 3.2 - * @param aDescriptorLength is descriptor length - * @param aMaxAllowedDescriptorLength maximum allowed descriptor length - */ - void CheckDescriptorMaxLengthL( TInt aDescriptorLength, TInt aMaxAllowedDescriptorLength ) const; - - - }; - -#endif // CPHCLTEXTPHONEDIALDATA_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/inc/mphcltextphoneobserver.h --- a/phoneclientserver/inc/mphcltextphoneobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002 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: It defines the interface for the observers of -* the CPhCltExtPhoneBase. -* -*/ - - -#ifndef MPHCLTEXTPHONEOBSERVER_H -#define MPHCLTEXTPHONEOBSERVER_H - -// CLASS DECLARATION - -/** -* Defines the interface for the observers of the CPhCltExtPhoneBase. -* -* @lib phoneclient.lib -* @since 1.0 -*/ -class MPhCltExtPhoneObserver - { - public: // New functions - - /** - * It is called whenever client's dial request is completed. - * - * @param aStatus It is the status of the operation. - * <0 means Symbian OS error code. - */ - virtual void HandleDialL( const TInt aStatus ) = 0; - - }; - -#endif // MPHCLTEXTPHONEOBSERVER_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/inc/rphcltemergencycall.h --- a/phoneclientserver/inc/rphcltemergencycall.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,233 +0,0 @@ -/* -* Copyright (c) 2002-2006 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: Client side access to emergency call -* -*/ - - -#ifndef RPhCltEmergencyCall_H -#define RPhCltEmergencyCall_H - -// INCLUDES -#include -#include "phclttypes.h" -#include "rphcltserver.h" - -/** -* Emergency number query mode -*/ -enum TPhCltEmergencyNumberQueryMode - { - EPhCltEmergencyNumberQueryModeNormal = 0, // Normal mode - EPhCltEmergencyNumberQueryModeAdvanced, // advanced mode - EPhCltEmergencyNumberQueryModeNormalWriteback // Same as "normal", but writes back emergency number - }; - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Client side access to emergency call -* -* @lib phoneclient.lib -* @since Series60_1.0 -*/ -class RPhCltEmergencyCall : public RSubSessionBase - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - RPhCltEmergencyCall(); - - - public: // New functions - - /** - * Opens the subsession. - * - * @param aServer It is the session of which subsession this is. - * @return Returns error code. - */ - TInt Open( RPhCltServer& aServer ); - - /** - * Closes the subsession. - */ - void Close(); - - - public: - - /** - * Returns information whether the number specified was an emergency number. - * - * @param aNumber Number to be queried. aNumber might contain prefix (SS code) - * and/or postfix (DTMF part). - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumber, which is equivalent to a - * TBuf< KPhCltEmergencyNumberSize > where - * KPhCltEmergencyNumberSize is defined as 100. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber - * parameter included emergency number. - * @return Returns error code of the success of the operation. - */ - TInt IsEmergencyPhoneNumber( - const TDesC& aNumber, - TBool& aIsEmergencyNumber ); - - /** - * Method can be used to check if the number specified contains - * a valid emergency number in the end of the number. - * - * @param aNumber Number to be queried, matched emergency number - * is returned in this parameter. - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltTelephoneNumberwhich is equivalent to a - * TBuf< KPhCltTelephoneNumberLength > where - * KPhCltTelephoneNumberLength is defined as 100. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber parameter - * was emergency number. - * @return Returns error code of the success of the operation. - */ - TInt FindEmergencyPhoneNumber( - TDes& aNumber, - TBool& aIsEmergencyNumber ); - - /** - * Initiates an emergency call. - * - * @param aReqStatus On return, KErrNone if the emergency call successfully reaches - * the connected state. If the call set-up fails, the function - * member will complete with an error. - * - * @param aNumber Emergency number to be dialed (optional). - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumber,which is equivalent to a - * TBuf< KPhCltEmergencyNumberSize > where - * KPhCltEmergencyNumberSize is defined as 100. - * - * If the aNumber parameter supplies an "empty" buffer - * the call is created either dialing the default emergency - * phone number or use the SET UP EMERGENCY request - * that does not contain a dialling number. - * - * @pre IsActive() returns EFalse, otherwise leaves with KErrInUse. - */ - void DialEmergencyCall( TRequestStatus& aReqStatus, TDesC8& aNumber ); - - /** - * Cancels an emergency call. - * - */ - void CancelDialEmergencyCall(); - - /** - * Returns information whether the number specified was an emergency - * number and also returns the plain emergency number. - * - * @param aNumber Number to be queried.aNumber might contain prefix (SS code) - * and/or postfix (DTMF part). - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumberwhich is equivalent to a - * TBuf< KPhCltEmergencyNumberSize > where - * KPhCltEmergencyNumberSize is defined as 100. - * - * @param aMatchedEmergencyNumber Matched emergencynumber without prefix or - * postfix is returned in this parameter. The aMatchedEmergencyNumber - * parameter should be a buffer and the clients are - * provided with atypedef called TPhCltEmergencyNumber, - * which is equivalent to a TBuf< KPhCltEmergencyNumberSize > - * where KPhCltEmergencyNumberSize is defined as 100. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber - * parameter included emergency number. - * - * @return Returns error code of the success of the operation. - */ - TInt IsEmergencyPhoneNumber( - const TDesC& aNumber, - TDes& aMatchedEmergencyNumber, - TBool& aIsEmergencyNumber ); - - private: - - /** - * Extract telephone number from string. If EFalse is returned - * then aString does not contain valid emergency number - * - * @param aString string from which those characters are removed. - * - * @return ETrue - aString can be emergency number and aString - * contains a telephone number - * EFalse - aString cannot be emergency number and aString - * does not contain a number that can be emergency number - */ - TBool ExtractTelephoneNumber( TDes& aString ); - - /** - * Finds start of dtmf string in string. - * - * @param aString Telephone number - * - * @return Index where dtmf string starts or KErrNotFound if no - * dtmf found. - * - */ - TInt FindStartOfDtmfString( const TDesC& aString ); - - /** - * Removes CLIR ss code from beginning of the string if CLIR is - * found from string. - * - * @param aString Telephone number - */ - void RemoveCLIR( TDes& aString ); - - /** - * Removes DTMF string from string. - * - * @param aString Telephone number. - */ - void RemoveDTMF( TDes& aString ); - - /** - * Executes checks to given phone number to find out if it is a valid - * emergency number. - * - * @param aString Telephone number - * @param aIsEmergencyNumber If ETrue, then the aNumber parameter - * was a valid emergency number. - * - * @return Returns error code of the success of the operation. - * - */ - TInt ValidateNumber( TDes& aString, TBool& aIsEmergencyNumber, - const TBool aWriteEmergencyNumBack ); - - - - }; - -#endif // RPhCltEmergencyCall_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Data/PhoneClient.rss --- a/phoneclientserver/phoneclient/Data/PhoneClient.rss Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Data/PhoneClient.rss Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ #include #include -#include "phoneclient.hrh" +#include "PhoneClient.hrh" #include "eikon.rsg" #include #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Group/PhoneClient.mmp --- a/phoneclientserver/phoneclient/Group/PhoneClient.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Group/PhoneClient.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2004 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" @@ -28,94 +28,96 @@ TARGETTYPE dll UID 0x1000008d 0x1000084F -SOURCEPATH ../src/notifier/notifier_aiw -SOURCE cphcltcallnotify.cpp -SOURCE rphcltcallnotify.cpp +SOURCEPATH ../Src/Notifier/Notifier_Aiw +SOURCE CPhCltCallNotify.cpp +SOURCE RPhCltCallNotify.cpp SOURCE cphcltdialrequestmonitor.cpp SOURCE cphcltdialemergencyrequestmonitor.cpp SOURCE cphcltcomhandrequestmonitor.cpp -SOURCEPATH ../src/extcall/extcall_aiw -SOURCE rphcltextcall.cpp -SOURCE cphcltextphonedialdata.cpp +SOURCEPATH ../Src/ExtCall/ExtCall_Aiw +SOURCE RPhCltExtCall.cpp +SOURCE CPhCltExtPhoneDialData.cpp SOURCE cphcltdialdata.cpp -SOURCEPATH ../src/extcallwrapper/extcallwrapper_aiw -SOURCE cphcltextphone.cpp -SOURCE cphcltextphonebase.cpp +SOURCEPATH ../Src/ExtCallWrapper/ExtCallWrapper_Aiw +SOURCE CPhCltExtPhone.cpp +SOURCE CPhCltExtPhoneBase.cpp -SOURCEPATH ../src/ussd/ussd_ext +SOURCEPATH ../Src/Ussd/ussd_ext SOURCE rphcltussd.cpp -SOURCEPATH ../src/ussdwrapper -SOURCE cphcltussdrequesthandler.cpp +SOURCEPATH ../Src/UssdWrapper +SOURCE CPhCltUssdRequestHandler.cpp -SOURCE cphcltussdsatclient.cpp +SOURCE CPhCltUssdSatClient.cpp -SOURCE cphcltussdint.cpp -SOURCE cphcltussdimp.cpp -SOURCE cphcltussdext.cpp +SOURCE CPhCltUssdInt.cpp +SOURCE CPhCltUssdImp.cpp +SOURCE CPhCltUssdExt.cpp -SOURCE cphcltussdnotecontroller.cpp +SOURCE CPhCltUssdNoteController.cpp -SOURCEPATH ../src/emergencynumber/emergencynumber_aiw -SOURCE cphcltemergencycall.cpp -SOURCE rphcltemergencycall.cpp -SOURCE cphcltemergencycallimpl.cpp +SOURCEPATH ../Src/EmergencyNumber/EmergencyNumber_Aiw +SOURCE CPhCltEmergencyCall.cpp +SOURCE RPhCltEmergencyCall.cpp +SOURCE CPhCltEmergencyCallImpl.cpp -SOURCEPATH ../src/session -SOURCE rphcltserver.cpp +SOURCEPATH ../Src/Session +SOURCE RPhCltServer.cpp -SOURCEPATH ../src -SOURCE phcltutils.cpp -SOURCE rphcltresourcefile.cpp +SOURCEPATH ../Src +SOURCE PhCltUtils.cpp +SOURCE RPhCltResourceFile.cpp -SOURCEPATH ../src/commandhandler -SOURCE cphcltcommandhandler.cpp -SOURCE cphcltcomhandimplementation.cpp -SOURCE rphcltcommandhandler.cpp -SOURCEPATH ../src/imagehandler -SOURCE cphcltimagehandler.cpp -SOURCE cphcltbaseimageparams.cpp -SOURCE cphcltoperatorlogocontainer.cpp -SOURCE cphcltimagehandlerimplementation.cpp -SOURCE rphcltimagehandler.cpp -SOURCEPATH ../src/messenger -SOURCE cphcltmessenger.cpp -SOURCE rphcltmessenger.cpp -SOURCE cphcltmessengerimplementation.cpp +SOURCEPATH ../Src/CommandHandler +SOURCE CPhCltCommandHandler.cpp +SOURCE CPhCltComHandImplementation.cpp +SOURCE RPhCltCommandHandler.cpp +SOURCEPATH ../Src/ImageHandler +SOURCE CPhCltImageHandler.cpp +SOURCE CPhCltBaseImageParams.cpp +SOURCE CPhCltOperatorLogoContainer.cpp +SOURCE CPhCltImageHandlerImplementation.cpp +SOURCE RPhCltImageHandler.cpp +SOURCEPATH ../Src/Messenger +SOURCE CPhCltMessenger.cpp +SOURCE RPhCltMessenger.cpp +SOURCE CPhCltMessengerImplementation.cpp -SOURCEPATH ../src +SOURCEPATH ../Src +START RESOURCE ../Data/PhoneClient.rss +HEADER +TARGETPATH RESOURCE_FILES_DIR +LANGUAGE_IDS +END // RESOURCE MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE ../../../inc -SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets -SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore -SYSTEMINCLUDE /epoc32/include/platform/mw/loc -SYSTEMINCLUDE /epoc32/include/platform/mw/loc/sc -USERINCLUDE ../inc/extcall/extcall_aiw -USERINCLUDE ../inc/notifier/notifier_aiw -USERINCLUDE ../inc/extcallwrapper/extcallwrapper_aiw -USERINCLUDE ../inc/emergencynumber/emergencynumber_aiw +USERINCLUDE ../Inc/ExtCall/ExtCall_Aiw +USERINCLUDE ../Inc/Notifier/Notifier_Aiw +USERINCLUDE ../Inc/ExtCallWrapper/ExtCallWrapper_Aiw +USERINCLUDE ../Inc/EmergencyNumber/EmergencyNumber_Aiw -USERINCLUDE ../inc/session -USERINCLUDE ../inc/sharedclientserver +USERINCLUDE ../Inc/Session +USERINCLUDE ../Inc/SharedClientServer -USERINCLUDE ../inc/ussdwrapper/ussd_ext -USERINCLUDE ../inc/ussd/ussd_ext -USERINCLUDE ../inc/commandhandler -USERINCLUDE ../inc/imagehandler -USERINCLUDE ../inc/messenger -USERINCLUDE ../inc/ussdwrapper -USERINCLUDE ../inc +USERINCLUDE ../Inc/UssdWrapper/Ussd_Ext +USERINCLUDE ../Inc/Ussd/ussd_ext +USERINCLUDE ../Inc/CommandHandler +USERINCLUDE ../Inc/ImageHandler +USERINCLUDE ../Inc/Messenger +USERINCLUDE ../Inc/UssdWrapper +USERINCLUDE ../Inc LIBRARY euser.lib LIBRARY aknnotify.lib +LIBRARY avkon.lib LIBRARY cone.lib LIBRARY estor.lib LIBRARY commonengine.lib @@ -126,15 +128,12 @@ LIBRARY efsrv.lib LIBRARY charconv.lib LIBRARY fbscli.lib -LIBRARY hbwidgets.lib -LIBRARY flogger.lib -LIBRARY hbcore.lib #ifdef WINSCW - DEFFILE ../bwins/phoneclient_aiwext.def + DEFFILE ../Bwins/PHONECLIENT_AiwExt.DEF #else - DEFFILE ../eabi/phoneclient_aiwext.def + DEFFILE ../EABI/PHONECLIENT_AiwExt.DEF #endif // End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Group/bld.inf --- a/phoneclientserver/phoneclient/Group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -23,26 +23,26 @@ PRJ_EXPORTS - ../inc/emergencynumber/emergencynumber_aiw/rphcltemergencycall.h |../../inc/rphcltemergencycall.h - ../inc/misc/telservicesinternalcrkeys.h |../../../inc/telservicesinternalcrkeys.h - ../inc/misc/telservicesvariant.hrh |../../../inc/telservicesvariant.hrh - ../inc/extcall/extcall_aiw/cphcltextphonedialdata.h |../../inc/cphcltextphonedialdata.h - ../inc/extcallwrapper/extcallwrapper_aiw/mphcltextphoneobserver.h |../../inc/mphcltextphoneobserver.h - ../inc/extcallwrapper/extcallwrapper_aiw/cphcltextphonebase.h |../../inc/cphcltextphonebase.h - ../inc/extcallwrapper/extcallwrapper_aiw/cphcltdialer.h |../../inc/cphcltdialer.h + ../Inc/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.h |../../inc/rphcltemergencycall.h + ../Inc/misc/telservicesinternalcrkeys.h |../../../inc/telservicesinternalcrkeys.h + ../Inc/misc/telservicesvariant.hrh |../../../inc/telservicesvariant.hrh + ../Inc/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.h |../../inc/cphcltextphonedialdata.h + ../Inc/ExtCallWrapper/ExtCallWrapper_Aiw/MPhCltExtPhoneObserver.h |../../inc/mphcltextphoneobserver.h + ../Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.h |../../inc/cphcltextphonebase.h + ../Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.h |../../inc/cphcltdialer.h -../data/phoneclient_stub.sis /epoc32/data/z/system/install/phoneclient_stub.sis +../Data/Phoneclient_stub.SIS /epoc32/data/z/system/install/phoneclient_stub.sis // IBY files -../rom/phoneclient.iby CORE_MW_LAYER_IBY_EXPORT_PATH(phoneclient.iby) +../rom/PhoneClient.iby CORE_MW_LAYER_IBY_EXPORT_PATH(PhoneClient.iby) // Generic configuration interface for component cenrep settings ../conf/telephonyservices.confml MW_LAYER_CONFML(telephonyservices.confml) -../conf/telephonyservices_102029ac.crml MW_LAYER_CRML(telephonyservices_102029ac.crml) -../conf/telephonyservices_102078f1.crml MW_LAYER_CRML(telephonyservices_102078f1.crml) +../conf/telephonyservices_102029AC.crml MW_LAYER_CRML(telephonyservices_102029AC.crml) +../conf/telephonyservices_102078F1.crml MW_LAYER_CRML(telephonyservices_102078F1.crml) PRJ_MMPFILES -../group/phoneclient.mmp +../Group/PhoneClient.mmp PRJ_TESTMMPFILES // specify the .mmp files required for building any test programs here diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/CommandHandler/CPhCltComHandImplementation.h --- a/phoneclientserver/phoneclient/Inc/CommandHandler/CPhCltComHandImplementation.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/CommandHandler/CPhCltComHandImplementation.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,9 +23,9 @@ // INCLUDES -#include "rphcltcommandhandler.h" -#include "rphcltcommandhandlernotify.h" -#include "rphcltserver.h" +#include "RPhCltCommandHandler.h" +#include "RPhCltCommandHandlerNotify.h" +#include "RPhCltServer.h" // CLASS DECLARATION @@ -59,7 +59,7 @@ /** * @see CPhCltCommandHandler. */ - void Atd( + void Atd( TRequestStatus& aStatus, const TPhCltTelephoneNumber& aTelephoneNumber ); diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/CommandHandler/RPhCltCommandHandler.h --- a/phoneclientserver/phoneclient/Inc/CommandHandler/RPhCltCommandHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/CommandHandler/RPhCltCommandHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,9 +23,9 @@ // INCLUDES #include -#include -//#include "cphcltcommandhandlernotify.h" -#include "cphcltcommandhandler.h" +#include +//#include "CPhCltCommandHandlerNotify.h" +#include "CPhCltCommandHandler.h" // FORWARD DECLARATIONS class RPhCltServer; @@ -77,10 +77,10 @@ * @param aTelephoneNumber The telephony number . */ - void Atd( + void Atd( TRequestStatus& aStatus, const TPhCltTelephoneNumber& aTelephoneNumber ); - + /** * Answer the call. diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/EmergencyNumber/CPhCltEmergencyTelNumber.h --- a/phoneclientserver/phoneclient/Inc/EmergencyNumber/CPhCltEmergencyTelNumber.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/EmergencyNumber/CPhCltEmergencyTelNumber.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES #include -#include "phclttypes.h" -#include "rphcltserver.h" +#include "PhCltTypes.h" +#include "RPhCltServer.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.h --- a/phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,9 @@ // INCLUDES #include -#include "rphcltserver.h" -#include "cphcltemergencycall.h" -#include "rphcltemergencycall.h" +#include "RPhCltServer.h" +#include "CPhCltEmergencyCall.h" +#include "RPhCltEmergencyCall.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.h --- a/phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES #include -#include "phclttypes.h" -#include "rphcltserver.h" +#include "PhCltTypes.h" +#include "RPhCltServer.h" /** * Emergency number query mode @@ -169,8 +169,8 @@ TDes& aMatchedEmergencyNumber, TBool& aIsEmergencyNumber ); - private: - + private: + /** * Extract telephone number from string. If EFalse is returned * then aString does not contain valid emergency number @@ -214,9 +214,9 @@ * Executes checks to given phone number to find out if it is a valid * emergency number. * - * @param aString Telephone number - * @param aIsEmergencyNumber If ETrue, then the aNumber parameter - * was a valid emergency number. + * @param aString Telephone number + * @param aIsEmergencyNumber If ETrue, then the aNumber parameter + * was a valid emergency number. * * @return Returns error code of the success of the operation. * diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/EmergencyNumber/RPhCltEmergencyNumber.h --- a/phoneclientserver/phoneclient/Inc/EmergencyNumber/RPhCltEmergencyNumber.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/EmergencyNumber/RPhCltEmergencyNumber.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ #define RPHCLTEMERGENCYNUMBER_H // INCLUDES -#include "phclttypes.h" -#include "rphcltserver.h" +#include "PhCltTypes.h" +#include "RPhCltServer.h" #include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.h --- a/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ #include #include #include -#include "phclttypes.h" +#include "PhCltTypes.h" #include // Phone Client Notify API @@ -145,12 +145,12 @@ IMPORT_C static CPhCltExtPhoneDialData* NewLC(); - /** + /** * Two-phased constructor. */ IMPORT_C static CPhCltExtPhoneDialData* NewL( const TDesC8& aPackage ); - /** + /** * Two-phased constructor. */ IMPORT_C static CPhCltExtPhoneDialData* NewLC( const TDesC8& aPackage ); @@ -160,7 +160,7 @@ */ IMPORT_C virtual ~CPhCltExtPhoneDialData(); - public: // New functions + public: // New functions /** * Fills the parameter list. @@ -213,7 +213,7 @@ * End other calls param. * @since Series 60 3.2 * @return Returns ETrue if other calls will be terminated. - * EFalse if calls are not terminated. + * EFalse if calls are not terminated. */ IMPORT_C TBool EndOtherCalls() const; @@ -303,9 +303,9 @@ */ IMPORT_C const TDesC& UUI() const; - public: // Access - Setters - - /** + public: // Access - Setters + + /** * Set whether the name entered in SetName should be matched * against the personal directory. * @since Series 60 3.2 @@ -315,8 +315,8 @@ * @param aAllowMatch Whether to allow matches. */ IMPORT_C void SetAllowMatch( TBool aAllowMatch ); - - /** + + /** * Set the bearer capability. * @since Series 60 3.2 * @param aBearer The bearer capabilities as defined in GSM 04.08. @@ -469,9 +469,9 @@ // Constructors - private: - - /** + private: + + /** * C++ default constructor. * @since Series 60 3.2 */ diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltCallNotify.h --- a/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltCallNotify.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltCallNotify.h Wed Sep 01 12:15:03 2010 +0100 @@ -69,7 +69,7 @@ */ void NotifyCallAttempt( TRequestStatus& aStatus, - TPckg< TInt >& aDataLength ); + TPckg< TInt >& aDataLength ); /** * Cancel pending call attempt notification. */ @@ -94,7 +94,7 @@ void NotifyEmergencyCall( TRequestStatus& aStatus, TDes8& aEmergencyNumber - ); + ); /** * Cancel pending call attempt notification. */ diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltExtCall.h --- a/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltExtCall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltExtCall.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES #include -#include "phclttypes.h" -#include "rphcltserver.h" +#include "PhCltTypes.h" +#include "RPhCltServer.h" // FORWARD DECLARATIONS class CPhCltExtPhoneDialData; @@ -59,7 +59,7 @@ * Closes the subsession. */ void Close(); - + /** * Makes a call (asynchronous). * @@ -84,7 +84,7 @@ // Prohibit assigment operator RPhCltExtCall& operator= ( const RPhCltExtCall& ); - + diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCall/RPhCltExtCall.h --- a/phoneclientserver/phoneclient/Inc/ExtCall/RPhCltExtCall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCall/RPhCltExtCall.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES #include -#include "phclttypes.h" -#include "rphcltserver.h" +#include "PhCltTypes.h" +#include "RPhCltServer.h" // FORWARD DECLARATIONS class TPhCltExtPhoneDialData; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCall/TPhCltExtPhoneDialData.h --- a/phoneclientserver/phoneclient/Inc/ExtCall/TPhCltExtPhoneDialData.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCall/TPhCltExtPhoneDialData.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include "phclttypes.h" +#include "PhCltTypes.h" // Constant used as window group id to indicate that we wish to go to idle. const TInt KPhCltGoToIdle = 0; @@ -30,7 +30,7 @@ const TInt KPhCltRedialDefault = -1; // Default redial. const TInt KPhCltRedialOff = -2; // Redial is off. const TInt KPhCltRedialWithDefaultTime = -3; // Redial on, with default time. -const TInt KPhCltRedial = 0; // Forced redial. +const TInt KPhCltRedial = 0; // Forced redial. // Other constants used in TPhCltExtPhoneDialData ( default values ) const TBool KPhCltDefaultAllowMatch = ETrue; // Match is allowed diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.h --- a/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPHCLTDIALER_H // INCLUDES -#include -#include +#include +#include // FORWARD DECLARATIONS class CPhCltDialerDlg; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.h --- a/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,9 @@ // INCLUDES #include -#include "mphcltextphoneobserver.h" -#include "cphcltextphonebase.h" -#include +#include "MPhCltExtPhoneObserver.h" +#include "CPhCltExtPhoneBase.h" +#include // FORWARD DECLARATIONS class CPhCltExtPhoneBase; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.h --- a/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,9 @@ // INCLUDES #include -#include "cphcltextphonebase.h" -#include "rphcltserver.h" -#include "rphcltextcall.h" +#include "CPhCltExtPhoneBase.h" +#include "RPhCltServer.h" +#include "RPhCltExtCall.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.h --- a/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include "phclttypes.h" +#include "PhCltTypes.h" // FORWARD DECLARATIONS class MPhCltExtPhoneObserver; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/Ihf/RPhCltIhf.h --- a/phoneclientserver/phoneclient/Inc/Ihf/RPhCltIhf.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/Ihf/RPhCltIhf.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include // ETel -#include "phclttypes.h" +#include "PhCltTypes.h" // FORWARD DECLARATIONS class RWsSession; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltImageHandlerImplementation.h --- a/phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltImageHandlerImplementation.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltImageHandlerImplementation.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,9 +22,9 @@ // INCLUDES -#include -#include "rphcltimagehandler.h" -#include "rphcltserver.h" +#include +#include "RPhCltImageHandler.h" +#include "RPhCltServer.h" /** * Implementation of image handler interface. diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltOperatorLogoContainer.h --- a/phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltOperatorLogoContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltOperatorLogoContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #define CPHCLTOPERATORLOGOCONTAINER_H // INCLUDES -#include +#include #include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/ImageHandler/RPhCltImageHandler.h --- a/phoneclientserver/phoneclient/Inc/ImageHandler/RPhCltImageHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/ImageHandler/RPhCltImageHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,9 +20,9 @@ // INCLUDES #include -#include -#include "cphcltoperatorlogocontainer.h" -#include "cphcltbaseimageparams.h" +#include +#include "CPhCltOperatorLogoContainer.h" +#include "CPhCltBaseImageParams.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/Messenger/CPhCltMessengerImplementation.h --- a/phoneclientserver/phoneclient/Inc/Messenger/CPhCltMessengerImplementation.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/Messenger/CPhCltMessengerImplementation.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,9 +22,9 @@ // INCLUDES -#include -#include "rphcltmessenger.h" -#include "rphcltserver.h" +#include +#include "RPhCltMessenger.h" +#include "RPhCltServer.h" /** * Implementation of the CPhCltMessenger interface. diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/Messenger/RPhCltMessenger.h --- a/phoneclientserver/phoneclient/Inc/Messenger/RPhCltMessenger.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/Messenger/RPhCltMessenger.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS class RPhCltServer; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.h --- a/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.h --- a/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS @@ -69,7 +69,7 @@ * * @param aResultCode Result of the response. */ - TInt RespondEmergencyToClient( const TInt aResultCode ); + TInt RespondEmergencyToClient( const TInt aResultCode ); private: diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.h --- a/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS class RPhCltServer; @@ -60,7 +60,7 @@ * @param aObserver dial request observer */ void NotifyDialRequest( - MPhCltDialRequestObserver* aObserver ); + MPhCltDialRequestObserver* aObserver ); /** * Respond to client request to make a call diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/SharedClientServer/PhCltClientServer.h --- a/phoneclientserver/phoneclient/Inc/SharedClientServer/PhCltClientServer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/SharedClientServer/PhCltClientServer.h Wed Sep 01 12:15:03 2010 +0100 @@ -58,7 +58,7 @@ _LIT( KPhClientAndServerResourceFileName, "PhoneServer" ); _LIT( KPhCltServerZDrive, "z:" ); -_LIT( KPhClientAndServerResourceFileExtensionWild, ".R??" ); +_LIT( KPhClientAndServerResourceFileExtensionWild, ".R*" ); _LIT( KPhClientAndServerResourceFileExtensionNoWild, ".RSC" ); const TInt KPhSrvMagicResourceFileSignature = 0; @@ -267,7 +267,7 @@ enum TPhCltImageHandlerRequest { EPhoneServerImageHandlerSubSessionOpen = EPhoneServerExtensionBase + 300, - EPhoneServerImageHandlerSubSessionClose, // Closes image handler subsession. + EPhoneServerImageHandlerSubSessionClose, // Closes image handler subsession. EPhoneServerImageHandlerSubSessionSave, // SaveImages (deprecated for VT) EPhoneServerImageHandlerSubSessionLoad, // LoadImages (deprecated for VT) EPhoneServerImageHandlerSubSessionCommitLoad, // Finalize load operation diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/Ussd/ussd_ext/rphcltussd.h --- a/phoneclientserver/phoneclient/Inc/Ussd/ussd_ext/rphcltussd.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/Ussd/ussd_ext/rphcltussd.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ // INCLUDES #include -#include -#include +#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdNoteController.h --- a/phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdNoteController.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdNoteController.h Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +* 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" @@ -21,10 +21,11 @@ // INCLUDES #include -#include -#include "mphcltussdnotecontrollercallback.h" -#include "cphcltussdcommonconstant.h" +#include "MPhCltUssdNoteControllerCallBack.h" +// FORWARD DECLARATIONS +class CAknGlobalNote; +class RConeResourceLoader; // CLASS DECLARATION @@ -32,12 +33,12 @@ * Encapsulates an active object used in controlling notes. * * @lib phoneclient.lib +* @since 9.1 */ -NONSHARABLE_CLASS( CPhCltUssdNoteController ) : public CBase, - public MHbDeviceProgressDialogObserver +NONSHARABLE_CLASS( CPhCltUssdNoteController ) : public CActive { public: // Constructor and destructor - + /** * Two-phased constructor. * @@ -46,67 +47,87 @@ * @return Pointer to created CPhCltUssdImp instance. */ static CPhCltUssdNoteController* NewL( - MPhCltUssdNoteControllerCallBack& aCallBack ); - + MPhCltUssdNoteControllerCallBack& aCallBack, + TInt aPriority ); + /** * Destructor. */ ~CPhCltUssdNoteController(); + public: - - /** - * Shows global Information note. - */ - void ShowGlobalInformationNoteL( const TPhCltUssdInformationType aInfoType ); - - /** - * Shows global wait note. - */ - void ShowGlobalWaitNoteL(); - - /** - * Destroys global wait note. - */ + + // Shows information note. + void ShowInformationNoteL( TInt aResourceId ); + + // Shows global information note. + void ShowGlobalInformationNoteL( TInt aResourceId ); + + // Shows global confirmation note. + void ShowGlobalConfirmationNoteL( TInt aResourceId ); + + // Shows global wait note. + void ShowGlobalWaitNoteL( TInt aResourceId, TInt aSoftkeyResourceId = 0 ); + + // Destroys global wait note. void DestroyGlobalWaitNote(); - - /** - * From base class MHbDeviceProgressDialogObserver - */ - void ProgressDialogCancelled( - const CHbDeviceProgressDialogSymbian* aProgressDialog); - - /** - * From base class MHbDeviceProgressDialogObserver - */ - void ProgressDialogClosed( - const CHbDeviceProgressDialogSymbian* aProgressDialog); - - private: - + + private: + /** * C++ constructor. */ CPhCltUssdNoteController( - MPhCltUssdNoteControllerCallBack& aCallBack ); + MPhCltUssdNoteControllerCallBack& aCallBack, + TInt aPriority ); + + // Symbian 2nd phase constructor. + void ConstructL(); + + // The note type enumeration, used inside the class. + enum TPhCltUssdNoteType + { + EPhCltUssdInformationNote, + EPhCltUssdGlobalInformationNote, + EPhCltUssdGlobalConfirmationNote + }; - /** - * Symbian 2nd phase constructor. + // Shows the note of given type. + void ShowNoteL( TPhCltUssdNoteType aType, TInt aResourceId ); + + // Loads the resource file. + void LoadResourceFileL(); + + // From base classes + + /* + * From CActive. Called when dialog is dismissed by soft key. */ - void ConstructL(); - - private: // Data + void RunL(); /** - * Own,Global wait note. + * From CActive. */ - CHbDeviceProgressDialogSymbian* iGlobalWaitNote; + void DoCancel(); + - /** - * Not own,callback to be notified when wait note is dismissed. - */ + private: // Data + + // Buffer for messages. + HBufC* iMessageBuffer; + + // Global wait note. + CAknGlobalNote* iGlobalWaitNote; + + // Id of an active wait note. + TInt iWaitNoteId; + + // The callback to be notified when wait note is dismissed. MPhCltUssdNoteControllerCallBack& iCallBack; + // Resource loader. + RConeResourceLoader* iResourceLoader; }; #endif // CPHCLTUSSDNOTECONTROLLER_H diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdRequestHandler.h --- a/phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdRequestHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdRequestHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include #include "rphcltussd.h" -#include "rphcltserver.h" +#include "RPhCltServer.h" // FORWARD DECLARATIONS class MPhCltUssdRequestHandler; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/UssdWrapper/MPhCltUssdNoteControllerCallBack.h --- a/phoneclientserver/phoneclient/Inc/UssdWrapper/MPhCltUssdNoteControllerCallBack.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/UssdWrapper/MPhCltUssdNoteControllerCallBack.h Wed Sep 01 12:15:03 2010 +0100 @@ -27,7 +27,7 @@ /** * Abstract interface for handling the notify events from note controller. -* User derives his class from this and implements GlobalWaitNoteHidden(). +* User derives his class from this and implements GlobalWaitNoteDismissedL(). * * @lib phoneclient.lib * @since 9.1 @@ -39,11 +39,11 @@ public: // New functions /** - * Called when global wait note is hidden, to background. + * Called when global wait note is dismissed. * * @param aError Error code. */ - virtual void GlobalWaitNoteHidden() = 0; + virtual void GlobalWaitNoteDismissedL( const TInt aError ) = 0; }; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Inc/UssdWrapper/Ussd_Ext/CPhCltUssdImp.h --- a/phoneclientserver/phoneclient/Inc/UssdWrapper/Ussd_Ext/CPhCltUssdImp.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Inc/UssdWrapper/Ussd_Ext/CPhCltUssdImp.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,12 +21,12 @@ // INCLUDES #include -#include "mphcltussdrequesthandler.h" -#include "mphcltussdnotecontrollercallback.h" +#include "MPhCltUssdRequestHandler.h" +#include "MPhCltUssdNoteControllerCallBack.h" #include "rphcltussd.h" -#include "rphcltserver.h" -#include "cphcltussdint.h" +#include "RPhCltServer.h" +#include "CPhCltUssdInt.h" // FORWARD DECLARATIONS @@ -171,8 +171,8 @@ // Called when send completes. void HandleSendEventL( const TInt aError ); - // Hidden when the user cancel the wait dialog. - void GlobalWaitNoteHidden(); + // Called when the user cancel the wait dialog. + void GlobalWaitNoteDismissedL( TInt aButtonId ); @@ -188,7 +188,7 @@ void EncodeL( const TDesC& aSrc, TDes8& aDes ); // Finds CR character - void FindFirstCarriageReturnL( + void CPhCltUssdImp::FindFirstCarriageReturnL( const TDesC& aBuffer , TUint& aSkipChars , TUint& aStartBit ); @@ -201,8 +201,8 @@ // Wait scheduler used in this class. CActiveSchedulerWait* iWait; - // TInt to sending error store place. - TInt iSendError; + // Pointer to sending error store place. + TInt* iSendError; // Data coding scheme value TUint8 iDCS; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/CommandHandler/CPhCltComHandImplementation.cpp --- a/phoneclientserver/phoneclient/Src/CommandHandler/CPhCltComHandImplementation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/CommandHandler/CPhCltComHandImplementation.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "cphcltcomhandimplementation.h" +#include "CPhCltComHandImplementation.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/CommandHandler/CPhCltCommandHandler.cpp --- a/phoneclientserver/phoneclient/Src/CommandHandler/CPhCltCommandHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/CommandHandler/CPhCltCommandHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphcltcommandhandler.h" -#include "cphcltcomhandimplementation.h" +#include "CPhCltCommandHandler.h" +#include "CPhCltComHandImplementation.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandler.cpp --- a/phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,10 +20,10 @@ // INCLUDES -#include "rphcltcommandhandler.h" -#include -#include -#include "phcltclientserver.h" +#include "RPhCltCommandHandler.h" +#include +#include +#include "PhCltClientServer.h" #include #include @@ -90,7 +90,7 @@ // This is Atd function call. iComHandParams().iCommandHandlerCommand = EPhCltCommandAtd; - iComHandParams().iTelNumber = aTPhCltTelephoneNumber; + iComHandParams().iTelNumber = aTPhCltTelephoneNumber; SendReceive( EPhoneServerComHandSubSessionAtd, TIpcArgs( &iComHandParams ), diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandlerNotify.cpp --- a/phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandlerNotify.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandlerNotify.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,10 +20,10 @@ // INCLUDES -#include "rphcltcommandhandlernotify.h" -#include -#include -#include "phcltclientserver.h" +#include "RPhCltCommandHandlerNotify.h" +#include +#include +#include "PhCltClientServer.h" #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCall.cpp --- a/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "cphcltemergencycall.h" -#include "cphcltemergencycallimpl.h" -#include "phclttypes.h" +#include "CPhCltEmergencyCall.h" +#include "CPhCltEmergencyCallImpl.h" +#include "PhCltTypes.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.cpp --- a/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "rphcltserver.h" -#include "cphcltemergencycallimpl.h" -#include "mphcltemergencycallobserver.h" +#include "RPhCltServer.h" +#include "CPhCltEmergencyCallImpl.h" +#include "MPhCltEmergencyCallObserver.h" _LIT( KEmNumber, "112" ); @@ -82,10 +82,7 @@ void CPhCltEmergencyCallImpl::RunL() { // inform observer - if(iObserver) - { - iObserver->HandleEmergencyDialL( iStatus.Int() ); - } + iObserver->HandleEmergencyDialL( iStatus.Int() ); } // ----------------------------------------------------------------------------- @@ -108,8 +105,8 @@ TBool& aIsEmergencyNumber ) { return iEmergencyCall.IsEmergencyPhoneNumber( - aNumber, - aIsEmergencyNumber ); + aNumber, + aIsEmergencyNumber ); } // ----------------------------------------------------------------------------- @@ -124,9 +121,9 @@ { return iEmergencyCall.IsEmergencyPhoneNumber( - aNumber, + aNumber, aMatchedEmergencyNumber, - aIsEmergencyNumber ); + aIsEmergencyNumber ); } // ----------------------------------------------------------------------------- @@ -139,8 +136,8 @@ TBool& aIsEmergencyNumber ) { return iEmergencyCall.FindEmergencyPhoneNumber( - aNumber, - aIsEmergencyNumber ); + aNumber, + aIsEmergencyNumber ); } // ----------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.cpp --- a/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDE FILES -#include // for TPhCltEmergencyNumber -#include "rphcltemergencycall.h" -#include "phcltclientserver.h" -#include "phcltutils.h" +#include // for TPhCltEmergencyNumber +#include "RPhCltEmergencyCall.h" +#include "PhCltClientServer.h" +#include "PhCltUtils.h" // CONSTANTS _LIT( KPhCltDtmfCharp, "p" ); @@ -176,8 +176,8 @@ // ----------------------------------------------------------------------------- // void RPhCltEmergencyCall::DialEmergencyCall( - TRequestStatus& aReqStatus, - TDesC8& aNumber ) + TRequestStatus& aReqStatus, + TDesC8& aNumber ) { return SendReceive( EPhoneServerEmergencyNumberSubsessionEmergencyDial, @@ -192,11 +192,11 @@ // ----------------------------------------------------------------------------- // void RPhCltEmergencyCall::CancelDialEmergencyCall() - { - SendReceive( - EPhoneServerEmergencyNumberSubsessionEmergencyDialCancel, - TIpcArgs() ); - } + { + SendReceive( + EPhoneServerEmergencyNumberSubsessionEmergencyDialCancel, + TIpcArgs() ); + } // ----------------------------------------------------------------------------- // Extracts telephone number out of string. Valid emergency number can @@ -322,8 +322,8 @@ // ----------------------------------------------------------------------------- // TInt RPhCltEmergencyCall::ValidateNumber( TDes& aString, - TBool& aIsEmergencyNumber, - const TBool aWriteEmergencyNumBack ) + TBool& aIsEmergencyNumber, + const TBool aWriteEmergencyNumBack ) { TPckg pIsEmergencyNumber( aIsEmergencyNumber ); diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.cpp --- a/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "cphcltextphonedialdata.h" +#include "CPhCltExtPhoneDialData.h" #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/RPhCltExtCall.cpp --- a/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/RPhCltExtCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/RPhCltExtCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDE FILES -#include "rphcltserver.h" -#include "rphcltextcall.h" -#include "cphcltextphonedialdata.h" -#include "phcltclientserver.h" +#include "RPhCltServer.h" +#include "RPhCltExtCall.h" +#include "CPhCltExtPhoneDialData.h" +#include "PhCltClientServer.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/cphcltdialdata.cpp --- a/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/cphcltdialdata.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/cphcltdialdata.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include "cphcltextphonedialdata.h" // For correct default values +#include "CPhCltExtPhoneDialData.h" // For correct default values // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCall/RPhCltExtCall.cpp --- a/phoneclientserver/phoneclient/Src/ExtCall/RPhCltExtCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCall/RPhCltExtCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDE FILES -#include "rphcltserver.h" -#include "rphcltextcall.h" -#include "tphcltextphonedialdata.h" -#include "phcltclientserver.h" +#include "RPhCltServer.h" +#include "RPhCltExtCall.h" +#include "TPhCltExtPhoneDialData.h" +#include "PhCltClientServer.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCall/TPhCltExtPhoneDialData.cpp --- a/phoneclientserver/phoneclient/Src/ExtCall/TPhCltExtPhoneDialData.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCall/TPhCltExtPhoneDialData.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "tphcltextphonedialdata.h" +#include "TPhCltExtPhoneDialData.h" // ============================ MEMBER FUNCTIONS =============================== @@ -600,7 +600,7 @@ aReturn.iNumberType = iNumberType; aReturn.iSubAddress = iSubAddress; aReturn.iBearer = iBearer; - aReturn.iRedialMaximumDuration = iRedialMaximumDuration; + aReturn.iRedialMaximumDuration = iRedialMaximumDuration; // Flags aReturn.iFlags = TPhCltCallArgs::EPhCltCallFlagsDefault; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialer.cpp --- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphcltdialer.h" -#include "cphcltdialerdlg.h" +#include "CPhCltDialer.h" +#include "CPhCltDialerDlg.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialerDlg.cpp --- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialerDlg.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialerDlg.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "cphcltdialerdlg.h" +#include "CPhCltDialerDlg.h" #include -#include +#include #include @@ -54,15 +54,15 @@ { TInt error = KErrNone; iError = &error; - if (!iData.Emergency()) - { - ExecuteLD( R_PHCLT_BLANK_DLG ); - } + if (!iData.Emergency()) + { + ExecuteLD( R_PHCLT_BLANK_DLG ); + } else - { - iPhoneClient = CPhCltExtPhoneBase::NewL( this ); - iPhoneClient->DialL( iData ); - } + { + iPhoneClient = CPhCltExtPhoneBase::NewL( this ); + iPhoneClient->DialL( iData ); + } User::LeaveIfError( error ); } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhone.cpp --- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhone.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhone.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,10 +19,10 @@ // INCLUDE FILES #include -#include "rphcltextcall.h" -#include "rphcltserver.h" -#include "mphcltextphoneobserver.h" -#include "cphcltextphone.h" +#include "RPhCltExtCall.h" +#include "RPhCltServer.h" +#include "MPhCltExtPhoneObserver.h" +#include "CPhCltExtPhone.h" // LOCAL CONSTANTS AND MACROS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhoneBase.cpp --- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhoneBase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhoneBase.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "cphcltextphonebase.h" -#include "cphcltextphone.h" -#include "phclttypes.h" +#include "CPhCltExtPhoneBase.h" +#include "CPhCltExtPhone.h" +#include "PhCltTypes.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.cpp --- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphcltdialer.h" -#include "cphcltdialerdlg.h" +#include "CPhCltDialer.h" +#include "CPhCltDialerDlg.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.cpp --- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "cphcltdialerdlg.h" +#include "CPhCltDialerDlg.h" #include -#include +#include #include @@ -54,15 +54,15 @@ { TInt error = KErrNone; iError = &error; - if (!iData->Emergency()) - { - ExecuteLD( R_PHCLT_BLANK_DLG ); - } + if (!iData->Emergency()) + { + ExecuteLD( R_PHCLT_BLANK_DLG ); + } else - { - iPhoneClient = CPhCltExtPhoneBase::NewL( this ); - iPhoneClient->DialL( *iData ); - } + { + iPhoneClient = CPhCltExtPhoneBase::NewL( this ); + iPhoneClient->DialL( *iData ); + } User::LeaveIfError( error ); } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.cpp --- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,9 +19,9 @@ // INCLUDE FILES #include -#include "mphcltextphoneobserver.h" -#include "cphcltextphone.h" -#include "cphcltextphonedialdata.h" +#include "MPhCltExtPhoneObserver.h" +#include "CPhCltExtPhone.h" +#include "CPhCltExtPhoneDialData.h" // LOCAL CONSTANTS AND MACROS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.cpp --- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "cphcltextphonebase.h" -#include "cphcltextphone.h" -#include "phclttypes.h" +#include "CPhCltExtPhoneBase.h" +#include "CPhCltExtPhone.h" +#include "PhCltTypes.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Ihf/RPhCltIhf.cpp --- a/phoneclientserver/phoneclient/Src/Ihf/RPhCltIhf.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Ihf/RPhCltIhf.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "rphcltserver.h" -#include "rphcltihf.h" +#include "RPhCltServer.h" +#include "RPhCltIhf.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Ihf/RPhCltIhfStub.cpp --- a/phoneclientserver/phoneclient/Src/Ihf/RPhCltIhfStub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Ihf/RPhCltIhfStub.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "rphcltserver.h" -#include "rphcltihf.h" +#include "RPhCltServer.h" +#include "RPhCltIhf.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ImageHandler/CPhCltBaseImageParams.cpp --- a/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltBaseImageParams.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltBaseImageParams.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -16,8 +16,8 @@ */ -#include "cphcltbaseimageparams.h" -#include "phcltclientserver.h" +#include "CPhCltBaseImageParams.h" +#include "PhCltClientServer.h" // ----------------------------------------------------------------------------- // CPhCltBaseImageParams::CPhCltBaseImageParams // diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandler.cpp --- a/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphcltimagehandler.h" -#include "cphcltimagehandlerimplementation.h" +#include "CPhCltImageHandler.h" +#include "CPhCltImageHandlerImplementation.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandlerImplementation.cpp --- a/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandlerImplementation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandlerImplementation.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "cphcltimagehandlerimplementation.h" +#include "CPhCltImageHandlerImplementation.h" #ifdef _DEBUG #define _DxPRINT( x ) RDebug::Print(_L( x ) ); @@ -271,8 +271,8 @@ void CPhCltImageHandlerImplementation::CVtImageSaver::RunL() { MPhCltImageObserver& observer = iObserver; + TRAP_IGNORE( observer.HandleImageSaveCompleteL( iStatus.Int() ) ); delete this; - TRAP_IGNORE( observer.HandleImageSaveCompleteL( iStatus.Int() ) ); } // ----------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ImageHandler/CPhCltOperatorLogoContainer.cpp --- a/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltOperatorLogoContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltOperatorLogoContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include "cphcltoperatorlogocontainer.h" +#include "CPhCltOperatorLogoContainer.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/ImageHandler/RPhCltImageHandler.cpp --- a/phoneclientserver/phoneclient/Src/ImageHandler/RPhCltImageHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/ImageHandler/RPhCltImageHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDES -#include "rphcltimagehandler.h" -#include "phcltclientserver.h" -#include +#include "RPhCltImageHandler.h" +#include "PhCltClientServer.h" +#include #include #include #include @@ -184,9 +184,7 @@ ( TPhCltExtOperatorLogoType ) aImages.iImages[ EPhCltExtLogoTypeIndex ], bitMap ); - CleanupStack::PushL(logo); - iOperatorLogos.AppendL( logo ); - CleanupStack::Pop(logo); + iOperatorLogos.Append( logo ); } } @@ -200,14 +198,12 @@ { // Remove all first. iVTBitMaps.ResetAndDestroy(); - iVTBitMaps.ReserveL(aImages.iImageCount); + for ( TInt i = 0 ; i < aImages.iImageCount; i ++ ) { CFbsBitmap* bitMap = CreateBitMapL( aImages.iImages[ i ] ); - CleanupStack::PushL( bitMap ); - iVTBitMaps.AppendL( bitMap ); - CleanupStack::Pop(bitMap); + iVTBitMaps.Append( bitMap ); } } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Messenger/CPhCltMessenger.cpp --- a/phoneclientserver/phoneclient/Src/Messenger/CPhCltMessenger.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Messenger/CPhCltMessenger.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphcltmessenger.h" -#include "cphcltmessengerimplementation.h" +#include "CPhCltMessenger.h" +#include "CPhCltMessengerImplementation.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Messenger/CPhCltMessengerImplementation.cpp --- a/phoneclientserver/phoneclient/Src/Messenger/CPhCltMessengerImplementation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Messenger/CPhCltMessengerImplementation.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "cphcltmessengerimplementation.h" +#include "CPhCltMessengerImplementation.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Messenger/RPhCltMessenger.cpp --- a/phoneclientserver/phoneclient/Src/Messenger/RPhCltMessenger.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Messenger/RPhCltMessenger.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,9 +20,9 @@ // INCLUDES -#include "rphcltmessenger.h" -#include -#include "phcltclientserver.h" +#include "RPhCltMessenger.h" +#include +#include "PhCltClientServer.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/CPhCltCallNotify.cpp --- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/CPhCltCallNotify.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/CPhCltCallNotify.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,14 +18,14 @@ // Include Files -#include // for TPhCltEmergencyNumber -#include +#include // for TPhCltEmergencyNumber +#include #include #include -#include "rphcltserver.h" -#include "cphcltextphonedialdata.h" -#include "rphcltcallnotify.h" +#include "RPhCltServer.h" +#include "CPhCltExtPhoneDialData.h" +#include "RPhCltCallNotify.h" #include "cphcltdialrequestmonitor.h" #include "cphcltdialemergencyrequestmonitor.h" #include "cphcltcomhandrequestmonitor.h" @@ -76,7 +76,7 @@ EXPORT_C TInt CPhCltCallNotify::Open( RPhCltServer& aServer ) { TInt retVal = iCallNotify->Open( aServer ); - return retVal; + return retVal; } // ----------------------------------------------------------------------------- @@ -129,19 +129,19 @@ EXPORT_C void CPhCltCallNotify::NotifyEmergencyCall( MPhCltDialEmergencyRequestObserver* aObserver, TDesC& aEmergencyNumber ) - { + { iDialEmergencyMonitor->NotifyEmergencyCall( aObserver, aEmergencyNumber ); - } + } // ----------------------------------------------------------------------------- // CPhCltCallNotify::CancelNotifyEmergencyCall() // // ----------------------------------------------------------------------------- -// +// EXPORT_C void CPhCltCallNotify::CancelNotifyEmergencyCall() const - { - iDialEmergencyMonitor->Cancel(); - } + { + iDialEmergencyMonitor->Cancel(); + } // ----------------------------------------------------------------------------- // CPhCltCallNotify::RespondEmergencyToClient() @@ -149,10 +149,10 @@ // ----------------------------------------------------------------------------- // EXPORT_C TInt CPhCltCallNotify::RespondEmergencyToClient( - const TInt aResultCode ) - { - return iDialEmergencyMonitor->RespondEmergencyToClient( aResultCode ); - } + const TInt aResultCode ) + { + return iDialEmergencyMonitor->RespondEmergencyToClient( aResultCode ); + } // ----------------------------------------------------------------------------- // CPhCltCallNotify::NotifyComHandCommand diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/RPhCltCallNotify.cpp --- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/RPhCltCallNotify.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/RPhCltCallNotify.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // Include Files -#include "rphcltcallnotify.h" -#include "rphcltserver.h" -#include "phcltclientserver.h" +#include "RPhCltCallNotify.h" +#include "RPhCltServer.h" +#include "PhCltClientServer.h" // ============================= LOCAL FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.cpp --- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // Include Files #include "cphcltcomhandrequestmonitor.h" -#include "rphcltcallnotify.h" +#include "RPhCltCallNotify.h" #include #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.cpp --- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,11 +18,11 @@ // Include Files -#include // for TPhCltEmergencyNumber +#include // for TPhCltEmergencyNumber #include "cphcltdialemergencyrequestmonitor.h" #include -#include "rphcltserver.h" -#include "rphcltcallnotify.h" +#include "RPhCltServer.h" +#include "RPhCltCallNotify.h" // ============================= LOCAL FUNCTIONS =============================== @@ -102,27 +102,27 @@ // ----------------------------------------------------------------------------- // void CPhCltDialEmergencyRequestMonitor::NotifyEmergencyCall( - MPhCltDialEmergencyRequestObserver* aObserver, + MPhCltDialEmergencyRequestObserver* aObserver, TDesC& aEmergencyNumber ) - { - + { + if ( !IsActive() ) { - - iEmergencyCallNumberPtr.Set( reinterpret_cast( &aEmergencyNumber ), + + iEmergencyCallNumberPtr.Set( reinterpret_cast( &aEmergencyNumber ), sizeof( TPhCltEmergencyNumber ), sizeof( TPhCltEmergencyNumber ) ); - - iObserver = aObserver; - + + iObserver = aObserver; + iCallNotify.NotifyEmergencyCall( - iStatus, - iEmergencyCallNumberPtr - ); + iStatus, + iEmergencyCallNumberPtr + ); SetActive(); } - - } + + } // ----------------------------------------------------------------------------- @@ -131,10 +131,10 @@ // ----------------------------------------------------------------------------- // TInt CPhCltDialEmergencyRequestMonitor::RespondEmergencyToClient( - const TInt aResultCode ) - { - return iCallNotify.RespondEmergencyToClient( aResultCode ); - } + const TInt aResultCode ) + { + return iCallNotify.RespondEmergencyToClient( aResultCode ); + } // End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.cpp --- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,14 +18,14 @@ // Include Files -#include // for TPhCltEmergencyNumber +#include // for TPhCltEmergencyNumber #include -#include "rphcltserver.h" -#include "cphcltextphonedialdata.h" +#include "RPhCltServer.h" +#include "CPhCltExtPhoneDialData.h" #include "cphcltdialdata.h" #include "cphcltdialrequestmonitor.h" -#include "rphcltcallnotify.h" +#include "RPhCltCallNotify.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Notifier/RPhCltCallNotify.cpp --- a/phoneclientserver/phoneclient/Src/Notifier/RPhCltCallNotify.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Notifier/RPhCltCallNotify.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // Include Files -#include "rphcltcallnotify.h" -#include "rphcltserver.h" +#include "RPhCltCallNotify.h" +#include "RPhCltServer.h" // ============================= LOCAL FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Notifier/RPhCltExtCallNotify.cpp --- a/phoneclientserver/phoneclient/Src/Notifier/RPhCltExtCallNotify.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Notifier/RPhCltExtCallNotify.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,9 +19,9 @@ // Include Files -#include "rphcltcallnotify.h" -#include "phcltclientserver.h" -#include "rphcltserver.h" +#include "RPhCltCallNotify.h" +#include "PhCltClientServer.h" +#include "RPhCltServer.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/PhCltUtils.cpp --- a/phoneclientserver/phoneclient/Src/PhCltUtils.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/PhCltUtils.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include "phcltutils.h" +#include "PhCltUtils.h" // CONSTANTS @@ -75,21 +75,21 @@ // EXPORT_C void PhCltUtils::RemoveURIPrefixdAndDomainChars( TDes& aString ) { - // Does number contains prefix. If yes then remove it + // Does number contains prefix. If yes then remove it if ( 0 == aString.FindC( KSipPrefix ) || 0 == aString.FindC( KTelPrefix ) || - 0 == aString.FindC( KSosPrefix ) ) + 0 == aString.FindC( KSosPrefix ) ) { aString.Delete( 0, KPrefixLength ); - } - // Does Number contains domain part. If yes remove it at beging of @ character. + } + // Does Number contains domain part. If yes remove it at beging of @ character. TInt atIndex = aString.Find( KAt ); TInt telNumberLength = aString.Length(); - if ( 0 < atIndex && - atIndex < telNumberLength ) + if ( 0 < atIndex && + atIndex < telNumberLength ) { - aString.Delete( atIndex, telNumberLength - atIndex ); - } + aString.Delete( atIndex, telNumberLength - atIndex ); + } } // End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/RPhCltResourceFile.cpp --- a/phoneclientserver/phoneclient/Src/RPhCltResourceFile.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/RPhCltResourceFile.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "rphcltresourcefile.h" -#include "ConeResLoader.h" -#include "phcltclientserver.h" +#include "RPhCltResourceFile.h" +#include "ConeResLoader.h" +#include "PhCltClientServer.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Session/RPhCltServer.cpp --- a/phoneclientserver/phoneclient/Src/Session/RPhCltServer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Session/RPhCltServer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,9 +20,9 @@ // INCLUDE FILES #include #include -#include "phclttypes.h" -#include "rphcltserver.h" -#include "phcltclientserver.h" +#include "PhCltTypes.h" +#include "RPhCltServer.h" +#include "PhCltClientServer.h" // CONSTANTS @@ -163,25 +163,25 @@ // thread dies for any reason. - TRequestStatus stat; - serverUnitOfExecution.Rendezvous( stat ); - if ( stat != KRequestPending ) + TRequestStatus stat; + serverUnitOfExecution.Rendezvous( stat ); + if ( stat != KRequestPending ) { User::Panic( PH_SRV_SU_FAILURE, EPhSrvStartupFailurePhase1 ); - serverUnitOfExecution.Kill( KErrAbort ); // abort startup + serverUnitOfExecution.Kill( KErrAbort ); // abort startup } - else + else { - serverUnitOfExecution.Resume(); // logon ok + serverUnitOfExecution.Resume(); // logon ok } // wait for start or death - User::WaitForRequest( stat ); - // we can't use the 'exit reason' if the server panicked as this - // is the panic 'reason' and may be '0' which cannot be distinguished - // from KErrNone - err = ( serverUnitOfExecution.ExitType() == EExitPanic ) + User::WaitForRequest( stat ); + // we can't use the 'exit reason' if the server panicked as this + // is the panic 'reason' and may be '0' which cannot be distinguished + // from KErrNone + err = ( serverUnitOfExecution.ExitType() == EExitPanic ) ? KErrGeneral : stat.Int(); serverUnitOfExecution.Close(); diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/Ussd/ussd_ext/rphcltussd.cpp --- a/phoneclientserver/phoneclient/Src/Ussd/ussd_ext/rphcltussd.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/Ussd/ussd_ext/rphcltussd.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "rphcltserver.h" +#include "RPhCltServer.h" #include "rphcltussd.h" -#include "phcltclientserver.h" +#include "PhCltClientServer.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdExt.cpp --- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdExt.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdExt.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include -#include "cphcltussdimp.h" +#include +#include "CPhCltUssdImp.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdImp.cpp --- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdImp.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdImp.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -18,26 +18,29 @@ // INCLUDE FILES -#include "cphcltussdimp.h" -#include "cphcltussdrequesthandler.h" -#include "phcltclientserver.h" -#include +#include "CPhCltUssdImp.h" +#include "CPhCltUssdRequestHandler.h" +#include "PhCltClientServer.h" +#include #include #include #include #include -#include -//#include +// +#include +#include +#include + +#include #include #include #include -#include "mphcltussdnotecontrollercallback.h" -#include "cphcltussdnotecontroller.h" -#include "cphcltussdcommonconstant.h" -#include "tflogger.h" +#include "MPhCltUssdNoteControllerCallBack.h" +#include "CPhCltUssdNoteController.h" + // CONSTANTS const TUint8 KPhCltUssdDcsDefaultAlphabet = 0x0f; // 00001111 @@ -330,12 +333,10 @@ // CPhCltUssdImp* CPhCltUssdImp::NewL( TBool aShowNotes ) { - TFLOGSTRING("CPhCltUssdImp: NewL call") CPhCltUssdImp* self = new( ELeave ) CPhCltUssdImp; CleanupStack::PushL( self ); self->ConstructL( aShowNotes ); CleanupStack::Pop(); // self - TFLOGSTRING("CPhCltUssdImp: NewL exit") return self; } @@ -347,14 +348,14 @@ // void CPhCltUssdImp::ConstructL( TBool aShowNotes ) { - TFLOGSTRING("CPhCltUssdImp: ConstructL call") // The note controller is needed only if the notes are shown. iNoteController = NULL; if ( aShowNotes ) { iNoteController = CPhCltUssdNoteController::NewL( - *this ); + *this, + CActive::EPriorityStandard ); } iDCS = KPhCltUssdDcsDefaultAlphabet; @@ -364,7 +365,6 @@ iRequestHandler = CPhCltUssdRequestHandler::NewL( *this, CActive::EPriorityStandard ); - TFLOGSTRING("CPhCltUssdImp: ConstructL exit") } @@ -376,7 +376,6 @@ // CPhCltUssdImp::CPhCltUssdImp() { - TFLOGSTRING("CPhCltUssdImp: CPhCltUssdImp call_exit") } @@ -387,7 +386,6 @@ // CPhCltUssdImp::~CPhCltUssdImp() { - TFLOGSTRING("CPhCltUssdImp: ~CPhCltUssdImp call") if ( iWait ) { if ( iWait->IsStarted() ) @@ -402,8 +400,7 @@ iRequestHandler = NULL; delete iNoteController; - iNoteController = NULL; - TFLOGSTRING("CPhCltUssdImp: ~CPhCltUssdImp exit") + iNoteController = NULL; } @@ -416,9 +413,8 @@ // void CPhCltUssdImp::HandleSendEventL( const TInt aError ) { - iSendError = Min( aError , KErrNone ); - TFLOGSTRING2("CPhCltUssdImp: HandleSendEventL\ - aError = %d call", aError) + *iSendError = Min( aError , KErrNone ); + // iNoteController is allocated only if notes are shown. if ( iNoteController ) { @@ -432,12 +428,12 @@ { // All Ok. case KErrNone: - iNoteController->ShowGlobalInformationNoteL( EPhCltUssdDone ); + iNoteController->ShowGlobalConfirmationNoteL( R_TEXT_DONE ); break; // Operation cancelled. case KErrCancel: - iNoteController->ShowGlobalInformationNoteL( EPhCltUssdUnconfirme ); + iNoteController->ShowGlobalInformationNoteL( R_TEXT_UNCONFIRMED ); break; // Ongoing Ussd session or the string is barred due SS request @@ -445,17 +441,17 @@ case KErrInUse: case KErrAccessDenied: case KErrGsmSSCallBarred: - iNoteController->ShowGlobalInformationNoteL( EPhCltUssdNotallowed ); + iNoteController->ShowGlobalInformationNoteL( R_TEXT_NOT_ALLOWED ); break; // No network coverage. case KErrGsmSMSNoNetworkService: - iNoteController->ShowGlobalInformationNoteL(EPhCltUssdNoservice ); + iNoteController->ShowGlobalInformationNoteL( R_TEXT_NO_SERVICE ); break; // Offline mode. case KErrGsmOfflineOpNotAllowed: - iNoteController->ShowGlobalInformationNoteL( EPhCltUssdOffline ); + iNoteController->ShowGlobalInformationNoteL( R_TEXT_OFFLINE ); break; case KErrSatControl: @@ -463,7 +459,7 @@ // Unknown error. default: - iNoteController->ShowGlobalInformationNoteL( EPhCltUssdNotDone ); + iNoteController->ShowGlobalInformationNoteL( R_TEXT_NOT_DONE ); break; } } @@ -474,7 +470,6 @@ { iWait->AsyncStop(); } - TFLOGSTRING("CPhCltUssdImp: HandleSendEventL exit") } @@ -536,11 +531,10 @@ const TDesC8& aMsgData, const TUint8 iSendDcs ) { - TFLOGSTRING("CPhCltUssdImp: SendUssd call") __ASSERT_ALWAYS( aMsgData.Length() <= KPhCltUssdMax7BitCharacterOctets, User::Invariant() ); - RMobileUssdMessaging::TMobileUssdAttributesV1 attribute; + RMobileUssdMessaging::TMobileUssdAttributesV1 attribute; attribute.iFlags = RMobileUssdMessaging::KUssdDataFormat + @@ -555,13 +549,13 @@ } if ( iSendDcs == KPhCltUssdDcsNotSet ) // 0x00 - { - attribute.iDcs = KPhCltUssdDcsDefaultAlphabet; - } - else - { - attribute.iDcs = iSendDcs; - } + { + attribute.iDcs = KPhCltUssdDcsDefaultAlphabet; + } + else + { + attribute.iDcs = iSendDcs; + } RMobileUssdMessaging::TMobileUssdAttributesV1Pckg attributePckg( attribute ); @@ -572,23 +566,30 @@ return KErrInUse; } - iSendError = KErrNone; - TFLOGSTRING("CPhCltUssdImp: SendUssd iRequestHandler") - iRequestHandler->SendUssd( aMsgData , attributePckg ); + TInt error = KErrNone; + iSendError = &error; + + iRequestHandler->SendUssd( aMsgData , attributePckg ); // iNoteController is allocated only if notes are shown. - TFLOGSTRING("CPhCltUssdImp: SendUssd ShowGlobalWaitNoteL") if ( iNoteController ) { - TRAP_IGNORE( iNoteController->ShowGlobalWaitNoteL(); - ); + TRAP_IGNORE( iNoteController->ShowGlobalWaitNoteL( + R_TEXT_SENDING, + R_AVKON_SOFTKEYS_QUIT ) ); } - TFLOGSTRING("CPhCltUssdImp: SendUssd iWait") // Set this active object to wait the completion of the send request. iWait->Start(); - - TFLOGSTRING("CPhCltUssdImp: SendUssd exit") - return iSendError; + + // Need to check iWait handle here because the destructor may be called + // while pending for completion of the send request. + // coverity[check_after_deref] + if( iWait ) + { + iSendError = NULL; + } + + return error; } @@ -600,9 +601,7 @@ // void CPhCltUssdImp::SendUssdCancel() { - TFLOGSTRING("CPhCltUssdImp: SendUssdCancel call") iRequestHandler->SendUssdCancel(); - TFLOGSTRING("CPhCltUssdImp: SendUssdCancel exit") } @@ -625,10 +624,7 @@ // TInt CPhCltUssdImp::AppStarting() { - TFLOGSTRING("CPhCltUssdImp: AppStarting call") - TInt res = iRequestHandler->UssdClient().AppStarting(); - TFLOGSTRING2("CPhCltUssdImp: AppStarting exit res = %d",res) - return res; + return iRequestHandler->UssdClient().AppStarting(); } // ----------------------------------------------------------------------------- @@ -640,10 +636,7 @@ TInt CPhCltUssdImp::AppTerminating( TPhCltUssdAppExitReason aExitReason ) { - TFLOGSTRING("CPhCltUssdImp: AppTerminating call") - TInt res = iRequestHandler->UssdClient().AppTerminating( aExitReason ); - TFLOGSTRING2("CPhCltUssdImp: AppTerminating exit res = %d",res) - return res; + return iRequestHandler->UssdClient().AppTerminating( aExitReason ); } // ----------------------------------------------------------------------------- @@ -654,10 +647,7 @@ // TBool CPhCltUssdImp::AppToForeground() { - TFLOGSTRING("CPhCltUssdImp: AppToForeground call") - TBool res = iRequestHandler->UssdClient().AppToForeground(); - TFLOGSTRING2("CPhCltUssdImp: AppToForeground exit res = %d",res) - return res; + return iRequestHandler->UssdClient().AppToForeground(); } // ----------------------------------------------------------------------------- @@ -668,10 +658,7 @@ // TInt CPhCltUssdImp::AppToBackground() { - TFLOGSTRING("CPhCltUssdImp: AppToBackground call") - TInt res = iRequestHandler->UssdClient().AppToBackground(); - TFLOGSTRING2("CPhCltUssdImp: AppToBackground exit res = %d",res) - return res; + return iRequestHandler->UssdClient().AppToBackground(); } // ----------------------------------------------------------------------------- @@ -685,9 +672,7 @@ TDes& aReceiveMessage, TPckg< TUint >& aShowNotesAndDcs ) { - TFLOGSTRING("CPhCltUssdImp: StartSAT call") iRequestHandler->UssdClient().StartSAT( aStatus, aReceiveMessage, aShowNotesAndDcs ); - TFLOGSTRING("CPhCltUssdImp: StartSAT exit") } // ----------------------------------------------------------------------------- @@ -698,22 +683,24 @@ // void CPhCltUssdImp::StopSAT() { - TFLOGSTRING("CPhCltUssdImp: StopSAT call") iRequestHandler->UssdClient().StopSAT(); - TFLOGSTRING("CPhCltUssdImp: StopSAT exit") } // ----------------------------------------------------------------------------- -// CPhCltUssdImp::GlobalWaitNoteHidden +// CPhCltUssdImp::GlobalNoteDismissedL // -// Dialog is hidden by the cancel key. +// Dialog is cancelled by the right softkey. // ----------------------------------------------------------------------------- // -void CPhCltUssdImp::GlobalWaitNoteHidden() +void CPhCltUssdImp::GlobalWaitNoteDismissedL( TInt aButtonId ) { - TFLOGSTRING("CPhCltUssdImp: GlobalWaitNoteHidden call") - TFLOGSTRING("CPhCltUssdImp: GlobalWaitNoteHidden exit") + if ( aButtonId == EAknSoftkeyClose || + aButtonId == EAknSoftkeyCancel || + aButtonId == EAknSoftkeyQuit ) + { + SendUssdCancel(); + } } @@ -725,8 +712,8 @@ // void CPhCltUssdImp::EncodeL( const TDesC& aSrc, TDes8& aDes ) { - TFLOGSTRING("CPhCltUssdImp: EncodeL call") - aDes.Zero(); + // + aDes.Zero(); TSmsDataCodingScheme::TSmsAlphabet alphabet = TSmsDataCodingScheme::ESmsAlphabet7Bit; // default @@ -829,7 +816,6 @@ } CleanupStack::PopAndDestroy(3); // fs, packer, charConv - TFLOGSTRING("CPhCltUssdImp: EncodeL exit") } // ----------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdInt.cpp --- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdInt.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdInt.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphcltussdint.h" -#include "cphcltussdimp.h" +#include "CPhCltUssdInt.h" +#include "CPhCltUssdImp.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdNoteController.cpp --- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdNoteController.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdNoteController.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +* 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" @@ -17,27 +17,15 @@ // INCLUDE FILES -#include -#include -#include - -#include "phcltclientserver.h" -#include "cphcltussdnotecontroller.h" -#include "tflogger.h" +#include //CAknGlobalNote +#include +#include +#include -_LIT(KUssdLocFilename, "ussd_"); -_LIT(KCommonLocFilename, "common_"); -_LIT(KPath, "z:\\resource\\qt\\translations"); -_LIT(KUssdRequesting, "txt_common_info_requesting"); // Requesting -_LIT(KUssdDone, "txt_ussd_dpopinfo_done"); // Done -_LIT(KUssdNotDone, "txt_ussd_dpopinfo_not_done"); // NotDone -_LIT(KUssdNotAllowed, "txt_ussd_dpopinfo_not_allowed"); //NotAllowed -_LIT(KUssdUnconfirmed, "txt_ussd_dpopinfo_request_not_confirmed"); // Unconfirmed -_LIT(KUssdNoService, "txt_ussd_dpopinfo_no_service"); // NoService -_LIT(KUssdOffline, "txt_ussd_dpopinfo_unable_to_use_network_phone_is"); // Offline -_LIT(KUssdHide, "txt_common_button_hide"); // Hide +#include "PhCltClientServer.h" +#include "CPhCltUssdNoteController.h" -const int KPhCltUssdProgressBarMaxLength = 10; + // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -46,19 +34,19 @@ // ----------------------------------------------------------------------------- // CPhCltUssdNoteController* CPhCltUssdNoteController::NewL( - MPhCltUssdNoteControllerCallBack& aCallBack ) + MPhCltUssdNoteControllerCallBack& aCallBack, + TInt aPriority ) { - TFLOGSTRING("CPhCltUssdNoteController: NewL call") CPhCltUssdNoteController* self = new( ELeave ) - CPhCltUssdNoteController( aCallBack ); - + CPhCltUssdNoteController( aCallBack, aPriority ); + CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); - TFLOGSTRING("CPhCltUssdNoteController: NewL exit") return self; } + // ----------------------------------------------------------------------------- // CPhCltUssdNoteController::ConstructL // Symbian 2nd phase constructor can leave. @@ -66,23 +54,26 @@ // void CPhCltUssdNoteController::ConstructL() { - TFLOGSTRING( "CPhCltUssdNoteController: ConstructL call_exit" ) + LoadResourceFileL(); } + // ----------------------------------------------------------------------------- // CPhCltUssdNoteController::CPhCltUssdNoteController // C++ constructor can NOT contain any code, that // might leave. // ----------------------------------------------------------------------------- CPhCltUssdNoteController::CPhCltUssdNoteController( - MPhCltUssdNoteControllerCallBack& aCallBack ) - : iGlobalWaitNote( NULL ), - iCallBack( aCallBack ) + MPhCltUssdNoteControllerCallBack& aCallBack, + TInt aPriority ) + : CActive( aPriority ), + iCallBack( aCallBack ), + iWaitNoteId( KErrNotFound ) { - TFLOGSTRING("CPhCltUssdNoteController: CPhCltUssdNoteController call") - TFLOGSTRING("CPhCltUssdNoteController: CPhCltUssdNoteController exit") + CActiveScheduler::Add( this ); } - + + // ----------------------------------------------------------------------------- // CPhCltUssdNoteController:~CPhCltUssdNoteController // C++ default constructor can NOT contain any code, that @@ -91,146 +82,182 @@ // CPhCltUssdNoteController::~CPhCltUssdNoteController() { - TFLOGSTRING("CPhCltUssdNoteController: ~CPhCltUssdNoteController call") + Cancel(); + DestroyGlobalWaitNote(); - TFLOGSTRING("CPhCltUssdNoteController: ~CPhCltUssdNoteController exit") + + delete iMessageBuffer; + iMessageBuffer = NULL; + + if ( iResourceLoader ) + { + iResourceLoader->Close(); + delete iResourceLoader; + iResourceLoader = NULL; + } } + +// ----------------------------------------------------------------------------- +// CPhCltUssdNoteController::RunL +// +// Called when dialog is dismissed by pressing a softkey. +// ----------------------------------------------------------------------------- +void CPhCltUssdNoteController::RunL() + { + iCallBack.GlobalWaitNoteDismissedL( iStatus.Int() ); + } + + +// ----------------------------------------------------------------------------- +// CPhCltUssdNoteController::DoCancel +// ----------------------------------------------------------------------------- +void CPhCltUssdNoteController::DoCancel() + { + DestroyGlobalWaitNote(); + } + + +// ----------------------------------------------------------------------------- +// CPhCltUssdNoteController::ShowInformationNoteL +// ----------------------------------------------------------------------------- +void CPhCltUssdNoteController::ShowInformationNoteL( TInt aResourceId ) + { + ShowNoteL( EPhCltUssdInformationNote, aResourceId ); + } + + // ----------------------------------------------------------------------------- // CPhCltUssdNoteController::ShowGlobalInformationNoteL // ----------------------------------------------------------------------------- -void CPhCltUssdNoteController::ShowGlobalInformationNoteL( - const TPhCltUssdInformationType aInfoType ) +void CPhCltUssdNoteController::ShowGlobalInformationNoteL( TInt aResourceId ) { - TFLOGSTRING2("CPhCltUssdNoteController: ShowGlobalInformationNoteL\ - aInfoType = %d call", aInfoType) - const TBool textResolver = HbTextResolverSymbian::Init( - KUssdLocFilename, KPath ); - TFLOGSTRING2("CPhCltUssdNoteController: ShowGlobalInformationNoteL\ - ussd textResolver = %d", textResolver ) - HBufC* temp(NULL); - switch ( aInfoType ) - { - case EPhCltUssdUnconfirme: - { - temp = HbTextResolverSymbian::LoadLC( KUssdUnconfirmed ); - break; - } - case EPhCltUssdNotallowed: - { - temp = HbTextResolverSymbian::LoadLC( KUssdNotAllowed ); - break; - } - case EPhCltUssdNoservice: - { - temp = HbTextResolverSymbian::LoadLC( KUssdNoService ); - break; - } - case EPhCltUssdOffline: - { - temp = HbTextResolverSymbian::LoadLC( KUssdOffline ); - break; - } - case EPhCltUssdDone: - { - temp = HbTextResolverSymbian::LoadLC( KUssdDone ); - break; - } - case EPhCltUssdNotDone: - { - temp = HbTextResolverSymbian::LoadLC( KUssdNotDone ); - break; - } - default: - { - User::Leave( KErrArgument ); - break; - } - } - CHbDeviceMessageBoxSymbian* dlg = CHbDeviceMessageBoxSymbian::NewL( - CHbDeviceMessageBoxSymbian::EInformation); - CleanupStack::PushL( dlg ); - dlg->SetTextL( temp->Des() ); - dlg->SetButton( CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue ); - dlg->ExecL(); - CleanupStack::PopAndDestroy( dlg ); - CleanupStack::PopAndDestroy( temp ); - TFLOGSTRING("CPhCltUssdNoteController: ShowGlobalInformationNoteL exit") + ShowNoteL( EPhCltUssdGlobalInformationNote, aResourceId ); } + +// ----------------------------------------------------------------------------- +// CPhCltUssdNoteController::ShowGlobalConfirmationNoteL +// ----------------------------------------------------------------------------- +void CPhCltUssdNoteController::ShowGlobalConfirmationNoteL( TInt aResourceId ) + { + ShowNoteL( EPhCltUssdGlobalConfirmationNote, aResourceId ); + } + + // ----------------------------------------------------------------------------- // CPhCltUssdNoteController::ShowGlobalWaitNoteL // ----------------------------------------------------------------------------- -void CPhCltUssdNoteController::ShowGlobalWaitNoteL( ) +void CPhCltUssdNoteController::ShowGlobalWaitNoteL( + TInt aResourceId, + TInt aSoftkeyResourceId ) { - TFLOGSTRING("CPhCltUssdNoteController: ShowGlobalWaitNoteL call") + delete iMessageBuffer; + iMessageBuffer = NULL; + iMessageBuffer = StringLoader::LoadL( aResourceId ); + DestroyGlobalWaitNote(); - TBool textResolver = HbTextResolverSymbian::Init( - KCommonLocFilename, KPath ); - TFLOGSTRING2("CPhCltUssdNoteController: ConstructL\ - init common textResolver = %d", textResolver ) - //CHbDeviceProgressDialogSymbian - iGlobalWaitNote = CHbDeviceProgressDialogSymbian::NewL( - CHbDeviceProgressDialogSymbian::EProgressDialog ); - CleanupStack::PushL( iGlobalWaitNote ); - HBufC* context = HbTextResolverSymbian::LoadLC( KUssdRequesting ); - iGlobalWaitNote->SetTextL( context->Des() ); - HBufC* bottonText = HbTextResolverSymbian::LoadLC( KUssdHide ); - iGlobalWaitNote->SetButtonTextL( bottonText->Des() ); - iGlobalWaitNote->SetObserver( this ); - TFLOGSTRING("CPhCltUssdNoteController: ShowGlobalWaitNoteL before setactive") - iGlobalWaitNote->SetRange(0,KPhCltUssdProgressBarMaxLength); - iGlobalWaitNote->SetProgressValue( KPhCltUssdProgressBarMaxLength ); - iGlobalWaitNote->SetAutoClose( EFalse ); - iGlobalWaitNote->ShowL(); - TFLOGSTRING("CPhCltUssdNoteController: ShowGlobalWaitNoteL after ShowL") - CleanupStack::PopAndDestroy( bottonText ); - CleanupStack::PopAndDestroy( context ); - CleanupStack::Pop( iGlobalWaitNote ); - TFLOGSTRING("CPhCltUssdNoteController: ShowGlobalWaitNoteL after setactive") - TFLOGSTRING("CPhCltUssdNoteController: ShowGlobalWaitNoteL exit") + + iGlobalWaitNote = CAknGlobalNote::NewL(); + + if ( aSoftkeyResourceId ) + { + iGlobalWaitNote->SetSoftkeys( aSoftkeyResourceId ); + } + + SetActive(); + + iWaitNoteId = iGlobalWaitNote->ShowNoteL( iStatus, + EAknGlobalWaitNote, + *iMessageBuffer ); } + // ----------------------------------------------------------------------------- // CPhCltUssdNoteController::DestroyGlobalWaitNote // ----------------------------------------------------------------------------- void CPhCltUssdNoteController::DestroyGlobalWaitNote() { - TFLOGSTRING("CPhCltUssdNoteController: DestroyGlobalWaitNote call") if ( iGlobalWaitNote ) { - iGlobalWaitNote->Close(); + if ( iWaitNoteId != KErrNotFound ) + { + TRAP_IGNORE( iGlobalWaitNote->CancelNoteL( iWaitNoteId ) ); + iWaitNoteId = KErrNotFound; + } delete iGlobalWaitNote; iGlobalWaitNote = NULL; } - TFLOGSTRING("CPhCltUssdNoteController: DestroyGlobalWaitNote exit") + } + + +// ----------------------------------------------------------------------------- +// CPhCltUssdNoteController::ShowNoteL +// +// Launches a corresponding dialog with the given string. +// ----------------------------------------------------------------------------- +// +void CPhCltUssdNoteController::ShowNoteL( TPhCltUssdNoteType aType, TInt aResourceId ) + { + switch ( aType ) + { + case EPhCltUssdInformationNote: + { + delete iMessageBuffer; + iMessageBuffer = NULL; + iMessageBuffer = StringLoader::LoadL( aResourceId ); + + if ( iMessageBuffer->Length() == 0 ) + { + break; + } + CAknInformationNote* dlg = new ( ELeave ) + CAknInformationNote( ETrue ); + + dlg->ExecuteLD( *iMessageBuffer ); + break; + } + case EPhCltUssdGlobalInformationNote: + case EPhCltUssdGlobalConfirmationNote: + { + CAknGlobalNote* dlg = CAknGlobalNote::NewLC(); + + delete iMessageBuffer; + iMessageBuffer = NULL; + iMessageBuffer = StringLoader::LoadL( aResourceId ); + + if ( aType == EPhCltUssdGlobalInformationNote ) + { + dlg->ShowNoteL( EAknGlobalInformationNote , *iMessageBuffer ); + } + else if ( aType == EPhCltUssdGlobalConfirmationNote ) + { + dlg->ShowNoteL( EAknGlobalConfirmationNote , *iMessageBuffer ); + } + CleanupStack::PopAndDestroy(); // dlg + break; + } + + default: + break; + } } // ----------------------------------------------------------------------------- -// CPhCltUssdNoteController::ProgressDialogCancelled +// CPhCltUssdNoteController::LoadResourceFileL // -// +// Loads resource file via RConeResourceLoader. // ----------------------------------------------------------------------------- // -void CPhCltUssdNoteController::ProgressDialogCancelled( - const CHbDeviceProgressDialogSymbian* /*aProgressDialog*/) +void CPhCltUssdNoteController::LoadResourceFileL() { - TFLOGSTRING("CPhCltUssdNoteController: ProgressDialogCancelled call") - iCallBack.GlobalWaitNoteHidden(); - TFLOGSTRING("CPhCltUssdNoteController: ProgressDialogCancelled exit") - } - -// ----------------------------------------------------------------------------- -// CPhCltUssdNoteController::ProgressDialogClosed -// -// -// ----------------------------------------------------------------------------- -// -void CPhCltUssdNoteController::ProgressDialogClosed( - const CHbDeviceProgressDialogSymbian* /*aProgressDialog*/) - { - TFLOGSTRING("CPhCltUssdNoteController: ProgressDialogClosed call") - TFLOGSTRING("CPhCltUssdNoteController: ProgressDialogClosed exit") + // load resource file for notes + iResourceLoader = new( ELeave ) RConeResourceLoader( *CCoeEnv::Static() ); + TFileName fileName ( KPhCltServerZDrive ); + fileName.Append( KDC_RESOURCE_FILES_DIR ); + fileName.Append( KPhCltResourceFileNameAndPath ); + fileName.ZeroTerminate(); + iResourceLoader->OpenL( fileName ); } // End of file diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdRequestHandler.cpp --- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdRequestHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdRequestHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphcltussdrequesthandler.h" -#include "mphcltussdrequesthandler.h" +#include "CPhCltUssdRequestHandler.h" +#include "MPhCltUssdRequestHandler.h" // ============================ MEMBER FUNCTIONS =============================== @@ -74,7 +74,6 @@ { Cancel(); - //iUssdClient.CancelSend(); Fix to ou1cimx1#265402 iUssdClient.Close(); iPhClient.Close(); diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdSatClient.cpp --- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdSatClient.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdSatClient.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDE FILES -#include "cphcltussdimp.h" -#include "phcltclientserver.h" -#include -#include +#include "CPhCltUssdImp.h" +#include "PhCltClientServer.h" +#include +#include // ============================= LOCAL FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/conf/ci_telephonyservices.confml Binary file phoneclientserver/phoneclient/conf/ci_telephonyservices.confml has changed diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/conf/telephonyservices.confml Binary file phoneclientserver/phoneclient/conf/telephonyservices.confml has changed diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/inc/ussdwrapper/cphcltussdcommonconstant.h --- a/phoneclientserver/phoneclient/inc/ussdwrapper/cphcltussdcommonconstant.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef CPHCLTUSSDCOMMONCONSTANT_H -#define CPHCLTUSSDCOMMONCONSTANT_H - -// CONSTANTS - - -/**num for Ussd information type*/ -enum TPhCltUssdInformationType - { - EPhCltUssdUnconfirme = 1, - EPhCltUssdNotallowed, - EPhCltUssdNoservice, - EPhCltUssdOffline, - EPhCltUssdDone, - EPhCltUssdNotDone - }; - -#endif // CPHCLTUSSDCOMMONCONSTANT_H diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/inc/ussdwrapper/tflogger.h --- a/phoneclientserver/phoneclient/inc/ussdwrapper/tflogger.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2002-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: -* -* -*/ - -#ifndef __TFLOGGER_H__ -#define __TFLOGGER_H__ - -#include -#include - -_LIT(KTfLogFolder, "phcltussd"); -_LIT(KTfLogFile, "ussd.txt"); - -/** -* ------------------------------------------------------------------------------ -* -* Remove #define LOGGING_ENABLED from comments to enable logging -* -* ------------------------------------------------------------------------------ -*/ - -#ifdef _DEBUG -#define LOGGING_ENABLED -#endif - -/** -* ------------------------------------------------------------------------------ -* -* LOGGING MACROs -* -* USE THESE MACROS IN YOUR CODE -* -* Example: TFLOGTEXT(own_desc) -* Example: TFLOGSTRING("Test") -* Example: TFLOGSTRING("Test %i", aValue) -* Example: TFLOGSTRING("Test %i %i", aValue1, aValue2) -* -* ------------------------------------------------------------------------------ -*/ - -#ifdef LOGGING_ENABLED - - #define TFLOGTEXT(TEXT) \ - { \ - RFileLogger::Write(KTfLogFolder,KTfLogFile, \ - EFileLoggingModeAppend, TEXT); \ - RDebug::Print(TEXT); \ - } - - #define TFLOGSTRING(TEXT) \ - { \ - _LIT(tempLogDes, TEXT); \ - RFileLogger::Write(\ - KTfLogFolder, \ - KTfLogFile, \ - EFileLoggingModeAppend, \ - tempLogDes()); \ - RDebug::Print(_L(TEXT)); \ - } - - #define TFLOGSTRING2(TEXT, VAR1) \ - { \ - _LIT(tempLogDes, TEXT); \ - RFileLogger::WriteFormat(\ - KTfLogFolder, \ - KTfLogFile, \ - EFileLoggingModeAppend, \ - TRefByValue(tempLogDes()), VAR1); \ - RDebug::Print(_L(TEXT), VAR1); \ - } - - #define TFLOGSTRING3(TEXT, VAR1, VAR2) \ - { \ - _LIT(tempLogDes, TEXT); \ - RFileLogger::WriteFormat(\ - KTfLogFolder, \ - KTfLogFile, \ - EFileLoggingModeAppend, \ - TRefByValue(tempLogDes()), VAR1, VAR2); \ - RDebug::Print(_L(TEXT), VAR1, VAR2); \ - } - -#else - - #define TFLOGTEXT(TEXT) - #define TFLOGSTRING(TEXT) - #define TFLOGSTRING2(TEXT, VAR1) - #define TFLOGSTRING3(TEXT, VAR1, VAR2) - -#endif // LOGGING_ENABLED - -#endif // __TFLOGGER_H__ diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/rom/PhoneClient.iby --- a/phoneclientserver/phoneclient/rom/PhoneClient.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/rom/PhoneClient.iby Wed Sep 01 12:15:03 2010 +0100 @@ -20,6 +20,6 @@ #define __PHONECLIENT_IBY__ -file=ABI_DIR\BUILD_DIR\phoneclient.dll SHARED_LIB_DIR\phoneclient.dll -data=ZSYSTEM\install\phoneclient_stub.sis system\install\phoneclient_stub.sis +file=ABI_DIR\BUILD_DIR\phoneclient.DLL SHARED_LIB_DIR\phoneclient.dll +data=ZSYSTEM\install\PhoneClient_stub.sis system\install\PhoneClient_stub.sis #endif diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/CommandHandlerTests/src/CommandHandlerTestsCases.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/CommandHandlerTests/src/CommandHandlerTestsCases.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/tsrc/public/basic/CommandHandlerTests/src/CommandHandlerTestsCases.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include #include "CommandHandlerTests.h" -#include +#include // EXTERNAL DATA STRUCTURES //extern ?external_data; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/EmergencyCallTests/inc/EmergencyCallTests.h --- a/phoneclientserver/phoneclient/tsrc/public/basic/EmergencyCallTests/inc/EmergencyCallTests.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/tsrc/public/basic/EmergencyCallTests/inc/EmergencyCallTests.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include "StifTestModule.h" #include -#include +#include // CONSTANTS //const ?type ?constant_var = ?constant; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/EmergencyCallTests/src/EmergencyCallTestsCases.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/EmergencyCallTests/src/EmergencyCallTestsCases.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/tsrc/public/basic/EmergencyCallTests/src/EmergencyCallTestsCases.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDE FILES #include #include "EmergencyCallTests.h" -#include +#include // EXTERNAL DATA STRUCTURES //extern ?external_data; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ImageHandlerTests/src/ImageHandlerTestsCases.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/ImageHandlerTests/src/ImageHandlerTestsCases.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneclient/tsrc/public/basic/ImageHandlerTests/src/ImageHandlerTestsCases.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,8 +19,8 @@ // INCLUDE FILES #include -#include -#include +#include +#include #include #include "ImageHandlerTests.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/etel_mock.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/etel_mock.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,211 +0,0 @@ - - -#include "ut_testenv.h" -#include -#include -#include -#include - - -// global variables -CPeriodic* messageResponseTimer = 0; - -// ============================================================================== -// RMobileUssdMessaging -// ============================================================================== - -RMobileUssdMessaging::RMobileUssdMessaging() -{ -} - -RMobileUssdMessaging::RMobileUssdMessaging(const RMobileUssdMessaging&) -{ -} - -void RMobileUssdMessaging::ConstructL() -{ - QVERIFY(!messageResponseTimer); - messageResponseTimer = - CPeriodic::NewL(CActive::EPriorityStandard+1); -} - -TInt RMobileUssdMessaging::Open(RMobilePhone& /*aPhone*/) -{ - TRAPD(err,ConstructL()); - return err; -} - -void RMobileUssdMessaging::Close() -{ - delete messageResponseTimer; - messageResponseTimer = 0; -} - -void RMobileUssdMessaging::Destruct() -{ -} - -TInt RMobileUssdMessaging::GetCaps(TDes8& aCaps) const -{ - TMobileUssdCapsV1 caps; - caps.iUssdFormat = KCapsPackedString; - caps.iUssdTypes = KCapsMTUssd | KCapsMOUssd; - TMobileUssdCapsV1Pckg pckgCaps( caps ); - aCaps.Copy( pckgCaps ); - return KErrNone; -} - -void RMobileUssdMessaging::ReceiveMessage( - TRequestStatus& aReqStatus, TDes8& aMsgData, - TDes8& aMsgAttributes) const -{ - EtelMsgLoop& loop = TestEnv::env().etelMsgLoop(); - QVERIFY2(!loop.mReceiveMessageReqStatus, - "etel_mock: ReceiveMessage called twice!"); - aReqStatus = KRequestPending; - loop.mReceiveMessageReqStatus = &aReqStatus; - loop.mReceiveMessageData = &aMsgData; - loop.mReceiveMessageAttributes = &aMsgAttributes; -} - -TInt SendMessageCallback(TAny* /*aPtr*/) - { - messageResponseTimer->Cancel(); - - EtelMsgLoop& loop = TestEnv::env().etelMsgLoop(); - const TestMode& mode = TestEnv::env().testMode(); - if (mode.m_event == TestMode::Normal) - { - User::RequestComplete(loop.mSendMessageReqStatus, mode.m_error); - } - return 0; - } - -void RMobileUssdMessaging::SendMessage( - TRequestStatus& aReqStatus, const TDesC8& /*aMsgData*/, - const TDesC8& /*aMsgAttributes*/) const -{ - EtelMsgLoop& loop = TestEnv::env().etelMsgLoop(); - QVERIFY2(!loop.mSendMessageReqStatus, - "etel_mock: SendMessage called twice!"); - aReqStatus = KRequestPending; - loop.mSendMessageReqStatus = &aReqStatus; - - const TestMode& mode = TestEnv::env().testMode(); - if (mode.m_event != TestMode::NoResp) - { - // start timer to respond - TTimeIntervalMicroSeconds32 delay( - 1000*mode.m_timeout); - messageResponseTimer->Start(delay,delay, - TCallBack(SendMessageCallback,(TAny*)this)); - } -} - -void RMobileUssdMessaging::SendMessageNoFdnCheck( - TRequestStatus& /*aReqStatus*/, const TDesC8& /*aMsgData*/, - const TDesC8& /*aMsgAttributes*/) const -{ - // not used -} - -void RMobileUssdMessaging::SendRelease( - TRequestStatus& /*aReqStatus*/, TDes8& /*aReturnResult*/) const -{ - // not used -} - -void RMobileUssdMessaging::NotifyNetworkRelease( - TRequestStatus& aReqStatus, TDes8& aReturnResult) const -{ - EtelMsgLoop& loop = TestEnv::env().etelMsgLoop(); - QVERIFY2(!loop.mNetworkReleaseReqStatus, - "etel_mock: NotifyNetworkRelease called twice!"); - aReqStatus = KRequestPending; - loop.mNetworkReleaseReqStatus = &aReqStatus; - loop.mNetworkReleaseMessageData = &aReturnResult; - loop.mNetworkReleaseMessageAttributes = 0; -} - -void RMobileUssdMessaging::NotifyNetworkRelease( - TRequestStatus& aReqStatus, TDes8& aMsgData, - TDes8& aMsgAttributes) const -{ - EtelMsgLoop& loop = TestEnv::env().etelMsgLoop(); - QVERIFY2(!loop.mNetworkReleaseReqStatus, - "etel_mock: NotifyNetworkRelease called twice!"); - aReqStatus = KRequestPending; - loop.mNetworkReleaseReqStatus = &aReqStatus; - loop.mNetworkReleaseMessageData = &aMsgData; - loop.mNetworkReleaseMessageAttributes = &aMsgAttributes; -} - - -RMobileUssdMessaging::TMobileUssdAttributesV1::TMobileUssdAttributesV1() -{ - iFlags = 0; - iFormat = EFormatUnspecified; - iType = EUssdUnknown; - iDcs = 0; -} - -RMobileUssdMessaging::TMobileUssdCapsV1::TMobileUssdCapsV1() -{ - iUssdFormat = 0; - iUssdTypes = 0; -} - -// ============================================================================== -// RMobilePhone -// ============================================================================== - -RMobilePhone::TMobilePhoneSendSSRequestV3::TMobilePhoneSendSSRequestV3() -{ - iOpCode = 0; -} - -RMobilePhone::TMultimodeType::TMultimodeType() -{ - iExtensionId = 0; -} - -// ============================================================================== -// RTelSubSessionBase -// ============================================================================== - -RTelSubSessionBase::RTelSubSessionBase() -{ -} - -void RTelSubSessionBase::CancelAsyncRequest(TInt aReqToCancel) const -{ - if ( aReqToCancel == EMobileUssdMessagingSendMessage ) - { - EtelMsgLoop& loop = TestEnv::env().etelMsgLoop(); - if ( loop.mSendMessageReqStatus ) - { - User::RequestComplete( loop.mSendMessageReqStatus, KErrCancel ); - } - } - else if ( aReqToCancel == EMobileUssdMessagingReceiveMessage ) - { - EtelMsgLoop& loop = TestEnv::env().etelMsgLoop(); - if ( loop.mReceiveMessageReqStatus ) - { - User::RequestComplete( loop.mReceiveMessageReqStatus, KErrCancel ); - } - } - else if ( aReqToCancel == EMobileUssdMessagingNotifyNetworkRelease ) - { - EtelMsgLoop& loop = TestEnv::env().etelMsgLoop(); - if ( loop.mNetworkReleaseReqStatus ) - { - User::RequestComplete( loop.mNetworkReleaseReqStatus, KErrCancel ); - } - } - else if ( aReqToCancel == EMobileUssdMessagingSendRelease ) - { - // not used - } -} - diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/main.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/main.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* 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:Unit testing of SatApp -* -* -*/ - - -#include - -#include "ut_ussd.h" -#include "ut_cphcltussdnotecontroller.h" - -// ==================================================================== -// MAIN -// ==================================================================== - -int main(int argc, char *argv[]) -{ - qDebug("Ut_ussd: main() >"); - QApplication app(argc, argv); - - int result(0); - - Ut_Ussd test; -// char *my_argv[3]; -// my_argv[0] = argv[0]; -// my_argv[1] = "-o"; -// my_argv[2] = "c:\\logs\\ussd\\ut_ussd.txt"; - result = QTest::qExec(&test/*, 3, my_argv*/); - qDebug("Ut_ussd: main() test Ut_Ussd<, result=%d", result); - - Ut_CphCltUssdNoteController testNoteController; -// char *note_argv[3]; -// note_argv[0] = argv[0]; -// note_argv[1] = "-o"; -// note_argv[2] = "c:\\logs\\ussd\\ut_ussdNoteController.txt"; - result = QTest::qExec(&testNoteController/*, 3, note_argv*/); - qDebug("Ut_ussd: main() test Ut_CphCltUssdNoteController<, result=%d", - result); - - return result; -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/phoneclientserver_stubs.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/phoneclientserver_stubs.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2002 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: Stubs for phoneclientserver classes -* -*/ - -// INCLUDES -#include "rphcltserver.h" -#include "cphsrvresourcemanager.h" - -// --------------------------------------------------------------------- -// Stub for RPhCltServer -// --------------------------------------------------------------------- - -RPhCltServer::RPhCltServer() -{ -} - -RPhCltServer::RPhCltServer( const RPhCltServer& ) -{ -} - -TVersion RPhCltServer::Version() const -{ - return TVersion(0,0,0); -} - -TInt RPhCltServer::Connect( TInt ) -{ - return KErrNone; -} - -void RPhCltServer::CreateAll( TRequestStatus& ) -{ -} - -void RPhCltServer::Panic( TPhCltPanicTypes /*aPanic*/ ) -{ -} - -TInt RPhCltServer::StartServer() -{ - return KErrNone; -} - - -RPhCltServer& RPhCltServer::operator= ( const RPhCltServer& ) -{ - return *this; -} - -// --------------------------------------------------------------------- -// Stub for CPhSrvResourceManager -// --------------------------------------------------------------------- - -CPhSrvResourceManager::CPhSrvResourceManager( RFs& aFsSession ) - :iFsSession(aFsSession) - { - } - -CPhSrvResourceManager::~CPhSrvResourceManager() - { - } - -void CPhSrvResourceManager::ConstructL() - { - } - -HBufC* CPhSrvResourceManager::ReadResourceLC( TUint /*aResourceId*/ ) - { - HBufC* buffer = HBufC::NewLC(32); - buffer->Des().Copy(_L("Hello!")); - return buffer; - } - diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/readme.txt --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/readme.txt Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - -USSD unit test project - instructions -======================================= - -1. Create a work area (or take a snapshot copy) for phoneclientserver project -2. copy this directory and all its contents to - phoneclientserver\phoneclient\tsrc\public\basic -3. qmake ut_ussd.pro -4. make -5. start emulator -6. run #ut_ussd -7. view c:/logs/ut_ussd.txt - diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/rphcltussd_glue.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/rphcltussd_glue.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ -/* -* Copyright (c) 2002-2004 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: Unit test replacement class for RPhCltUssd -* -*/ - - -// -// This implementation glues USSD client directly to -// USSD Manager class so that the client/server mechanism is -// not used. This is practical in unit test environment. -// - -// INCLUDE FILES -#include -#include "mphsrvussdmessagesentobserver.h" -#include "ut_testenv.h" -#include "cphsrvussdmanager.h" -#include "rphcltussd.h" - - -// ======================================================================== -// GLOBALS -// ======================================================================== - -class TUssdGlueAdapter: public MPhSrvUssdMessageSentObserver - { - public: - void writeAttributes( const TDesC8& aAttributes ) - { - RMobileUssdMessaging::TMobileUssdAttributesV1Pckg pAttributes( - iUssdAttributes ); - pAttributes.Copy( aAttributes ); - } - void Listen( TRequestStatus& aReqStatus ) - { - aReqStatus = KRequestPending; - iPendingStatus = &aReqStatus; - } - void UssdMessageSentObserverHandleResult( TInt aError ) - { - // this causes the pending active object to signalled and run - User::RequestComplete( iPendingStatus, aError ); - } - - RMobileUssdMessaging::TMobileUssdAttributesV1 iUssdAttributes; - TRequestStatus* iPendingStatus; - }; - -TUssdGlueAdapter glueAdapter; - - - -// ============================ MEMBER FUNCTIONS =============================== - - -// ----------------------------------------------------------------------------- -RPhCltUssd::RPhCltUssd() - { - } - -// ----------------------------------------------------------------------------- -TInt RPhCltUssd::Open( RPhCltServer& /*aServer*/ ) - { - return KErrNone; - glueAdapter.iPendingStatus = 0; - } - - -// ----------------------------------------------------------------------------- -void RPhCltUssd::Close() - { - } - - -// ----------------------------------------------------------------------------- -TInt RPhCltUssd::StartUssdEditor() const - { - TRAPD( leave, - TestEnv::env().ussdManager().RequestStartEditingL() ); - return leave; - } - - -// ----------------------------------------------------------------------------- -TInt RPhCltUssd::AppStarting() - { - TestEnv::env().ussdManager().InformUssdApplicationStarting(); - return KErrNone; - } - - -// ----------------------------------------------------------------------------- -TInt RPhCltUssd::AppTerminating( - TPhCltUssdAppExitReason aExitReason ) - { - RMessage2& fakeMessage = TestEnv::env().fakeMessage(); - - TRAPD( leave, - TestEnv::env().ussdManager().InformUssdApplicationTerminatingL( fakeMessage ) ); - - return leave; - } - -// ----------------------------------------------------------------------------- -TBool RPhCltUssd::AppToForeground() - { - return TestEnv::env().ussdManager().InformUssdApplicationToForeground(); - } - -// ----------------------------------------------------------------------------- -TInt RPhCltUssd::AppToBackground() - { - TestEnv::env().ussdManager().InformUssdApplicationToBackground(); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -void RPhCltUssd::SendUssd( - TRequestStatus& aReqStatus, - const TDesC8& aMsgData, - const TDesC8& aMsgAttribute ) - { - glueAdapter.Listen( aReqStatus ); - glueAdapter.writeAttributes( aMsgAttribute ); - - TRAPD( leave, TestEnv::env().ussdManager().SendUssdL( - aMsgData, glueAdapter.iUssdAttributes, glueAdapter ) ); - if ( leave != KErrNone ) - { - glueAdapter.UssdMessageSentObserverHandleResult( leave ); - } - } - -// ----------------------------------------------------------------------------- -void RPhCltUssd::CancelSend() - { - TestEnv::env().ussdManager().SendUssdCancel(); - } - - -// ----------------------------------------------------------------------------- -void RPhCltUssd::StartSAT( - TRequestStatus& aStatus , - TDes& /*aReceiveMessage*/, - TPckg< TUint >& /*aShowNotesAndDcs*/ ) - { - RMessage2& fakeMessage = TestEnv::env().fakeMessage(); - - TestEnv::env().ussdManager().InformStartSAT( fakeMessage ); - - TRequestStatus* reqStatus = &aStatus; - User::RequestComplete( reqStatus, KErrNone ); - } - - -// ----------------------------------------------------------------------------- -void RPhCltUssd::StopSAT() - { - TestEnv::env().ussdManager().InformStopSAT(); - } - - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_cphcltussdnotecontroller.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_cphcltussdnotecontroller.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -/* -* 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: Unit test for satappmainhandler -* -*/ - -#include // timeout callback -#include - -#include "ut_cphcltussdnotecontroller.h" -#include "cphcltussdcommonconstant.h" -//test class -#include "cphcltussdnotecontroller.h" -//const -const int KExtendTimeoutMseconds = 50000; - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::Ut_CphCltUssdNoteController -// ----------------------------------------------------------------------------- -// -Ut_CphCltUssdNoteController::Ut_CphCltUssdNoteController(QObject *parent): - QObject(parent) -{ - qDebug("Ut_CphCltUssdNoteController::Ut_CphCltUssdNoteController >"); - qDebug("Ut_CphCltUssdNoteController::Ut_CphCltUssdNoteController <"); -} - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::~Ut_CphCltUssdNoteController -// ----------------------------------------------------------------------------- -// -Ut_CphCltUssdNoteController::~Ut_CphCltUssdNoteController() -{ - qDebug("Ut_CphCltUssdNoteController::~Ut_CphCltUssdNoteController >"); - qDebug("Ut_CphCltUssdNoteController::~Ut_CphCltUssdNoteController <"); -} - - -void Ut_CphCltUssdNoteController::GlobalWaitNoteHidden() -{ - qDebug("Ut_CphCltUssdNoteController::GlobalWaitNoteHidden >"); - qDebug("Ut_CphCltUssdNoteController::GlobalWaitNoteHidden <"); -} -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::initTestCase -// QTestLib cleanup method, called after the last testfunction . -// ----------------------------------------------------------------------------- -void Ut_CphCltUssdNoteController::initTestCase() -{ - qDebug("Ut_CphCltUssdNoteController::initTestCase >"); - qDebug("Ut_CphCltUssdNoteController::initTestCase <"); -} - - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::cleanupTestCase -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_CphCltUssdNoteController::cleanupTestCase() -{ - qDebug("Ut_CphCltUssdNoteController::cleanupTestCase >"); - if (mNoteController) { - qDebug("Ut_CphCltUssdNoteController::cleanupTestCase delete \ - mNoteController"); - delete mNoteController; - mNoteController = 0; - } - qDebug("Ut_CphCltUssdNoteController::cleanupTestCase <"); -} - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::testCreateMainHandler -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_CphCltUssdNoteController::testCreateMainHandler() -{ - qDebug("Ut_CphCltUssdNoteController::testProfileState >"); - mNoteController = CPhCltUssdNoteController::NewL(*this); - QVERIFY(mNoteController); - qDebug("Ut_CphCltUssdNoteController::testProfileState <"); -} - - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::testShowGlobalInformationNote_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_CphCltUssdNoteController::testShowGlobalInformationNote_data() -{ - qDebug("Ut_CphCltUssdNoteController::testShowGlobalInformationNote_data >"); - QTest::addColumn("noteType"); - QTest::newRow("Unconfirme") << 1; - QTest::newRow("Notallowed") << 2; - QTest::newRow("Noservice") << 3; - QTest::newRow("Offline") << 4; - QTest::newRow("Done") << 5; - QTest::newRow("NotDone") << 6; - qDebug("Ut_CphCltUssdNoteController::testShowGlobalInformationNote_data <"); -} - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::testShowGlobalInformationNote -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_CphCltUssdNoteController::testShowGlobalInformationNote() -{ - qDebug("Ut_CphCltUssdNoteController::testShowGlobalInformationNote >"); - QFETCH(int, noteType); - TPhCltUssdInformationType infoType = - static_cast(noteType); - TRAPD(err,mNoteController->ShowGlobalInformationNoteL(infoType) ); - QCOMPARE(KErrNone, err); - qDebug("Ut_CphCltUssdNoteController::testShowGlobalInformationNote <"); -} - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::testProfileState -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_CphCltUssdNoteController::testShowGlobalWaitNote() -{ - qDebug("Ut_CphCltUssdNoteController::testShowGlobalWaitNote >"); - QVERIFY(mNoteController); - TRAPD(err, mNoteController->ShowGlobalWaitNoteL() ); - QCOMPARE(KErrNone, err); - qDebug("Ut_CphCltUssdNoteController::testShowGlobalWaitNote <"); -} - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::testDestroyGlobalWaitNote -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_CphCltUssdNoteController::testDestroyGlobalWaitNote() -{ - qDebug("Ut_CphCltUssdNoteController::testDestroyGlobalWaitNote >"); - QVERIFY(mNoteController); - mNoteController->DestroyGlobalWaitNote(); - qDebug("Ut_CphCltUssdNoteController::testDestroyGlobalWaitNote <"); -} - -// ----------------------------------------------------------------------------- -// Ut_CphCltUssdNoteController::testCancelGlobalWaitNote -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_CphCltUssdNoteController::testCancelGlobalWaitNote() -{ - qDebug("Ut_CphCltUssdNoteController::testCancelGlobalWaitNote >"); - QVERIFY(mNoteController); - TRAPD(err, mNoteController->ShowGlobalWaitNoteL() ); - QTimer *timer = new QTimer(this); - timer->start(KExtendTimeoutMseconds); - bool ret = connect(timer, SIGNAL(timeout()), timer, SLOT(stop())); - - - QEventLoop *loop = new QEventLoop(this); - ret = connect(timer, SIGNAL(timeout()), loop, SLOT(quit())); - loop->exec(QEventLoop::AllEvents); - mNoteController->DestroyGlobalWaitNote(); - qDebug("Ut_CphCltUssdNoteController::testCancelGlobalWaitNote <"); -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_cphcltussdnotecontroller.h --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_cphcltussdnotecontroller.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_CPHCLTUSSDNOTECONTROLLER_H -#define UT_CPHCLTUSSDNOTECONTROLLER_H - - -#include -#include -#include "MPhCltUssdNoteControllerCallBack.h" - - - -// Class forwards -class CPhCltUssdNoteController; - -/** - * Satapp unit test class. - * - * @since S60 - */ -class Ut_CphCltUssdNoteController : public QObject, - public MPhCltUssdNoteControllerCallBack -{ - Q_OBJECT - -public: - - Ut_CphCltUssdNoteController(QObject *parent = 0); - - virtual ~Ut_CphCltUssdNoteController(); - - /** - * From MPhCltUssdNoteControllerCallBack. - * - */ - void GlobalWaitNoteHidden(); - -private slots: - /** - * Called before the first testfunction is executed. - */ - void initTestCase(); - - /** - * Called after the last testfunction has been executed. - * - */ - void cleanupTestCase(); - - /** - * Test CPhCltUssdNoteController's constructor. - * - */ - void testCreateMainHandler(); - - /** - * Test CPhCltUssdNoteController's testShowGlobalInformationNote param list. - * - */ - void testShowGlobalInformationNote_data(); - - /** - * Test CPhCltUssdNoteController's ShowGlobalInformationNoteL. - * - */ - void testShowGlobalInformationNote(); - - /** - * Test CPhCltUssdNoteController's ShowGlobalWaitNoteL. - * - */ - void testShowGlobalWaitNote(); - - /** - * Test CPhCltUssdNoteController's DestroyGlobalWaitNote. - * - */ - void testDestroyGlobalWaitNote(); - - /** - * Test CPhCltUssdNoteController's cancel GlobalWaitNote. - * - */ - void testCancelGlobalWaitNote(); - -private: - - /** - * Own. - */ - CPhCltUssdNoteController *mNoteController; - -}; - -#endif // UT_CPHCLTUSSDNOTECONTROLLER_H diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_testenv.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_testenv.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ - - - -// phoneclientengine -#include "cphsrvresourcemanager.h" -#include "cphsrvussdmanager.h" -#include // USSD API - -// qt stuff -#include - -// unit test -#include "ut_testenv.h" - -// globals -TestEnv* TestEnv::m_singleton = 0; - -// ==================================================================== -// EtelMsgLoop -// ==================================================================== -EtelMsgLoop::EtelMsgLoop() -{ - mSendMessageReqStatus = 0; - - mReceiveMessageReqStatus = 0; - mReceiveMessageData = 0; - mReceiveMessageAttributes = 0; - - mNetworkReleaseReqStatus = 0; - mNetworkReleaseMessageData = 0; - mNetworkReleaseMessageAttributes = 0; -} - -void EtelMsgLoop::receive( const TDesC8& msg, const TDesC8& attr ) -{ - qDebug("EtelMsgLoop::receive mReceiveMessageReqStatus in =%d", - mReceiveMessageReqStatus); - mReceiveMessageData->Copy( msg ); - mReceiveMessageAttributes->Copy( attr ); - const TestMode& mode = TestEnv::env().testMode(); - User::RequestComplete(mReceiveMessageReqStatus, mode.m_error); - qDebug("EtelMsgLoop::receive mReceiveMessageReqStatus out =%d", - mReceiveMessageReqStatus); - QVERIFY(mReceiveMessageReqStatus == 0); -} - -void EtelMsgLoop::networkRelease( const TDesC8& msg, const TDesC8& attr ) -{ - qDebug("EtelMsgLoop::networkRelease mNetworkReleaseReqStatus in =%d", - mNetworkReleaseReqStatus); - mNetworkReleaseMessageData->Copy( msg ); - if ( mNetworkReleaseMessageAttributes ) - mNetworkReleaseMessageAttributes->Copy( attr ); - const TestMode& mode = TestEnv::env().testMode(); - User::RequestComplete(mNetworkReleaseReqStatus, mode.m_error); - qDebug("EtelMsgLoop::networkRelease mNetworkReleaseReqStatus out =%d", - mNetworkReleaseReqStatus); - QVERIFY(mNetworkReleaseReqStatus == 0); -} - -// ==================================================================== -// TestEnv -// ==================================================================== - -void TestEnv::create() -{ - QVERIFY(!m_singleton); - m_singleton = new TestEnv(); - m_singleton->construct(); -} - -void TestEnv::destroy() -{ - QVERIFY(m_singleton); - delete m_singleton; - m_singleton = 0; -} - -TestEnv& TestEnv::env() -{ - return *m_singleton; -} - -TestEnv::TestEnv() -{ -} - -void TestEnv::construct() -{ - int leave; - // create the main USSD resource manager class - m_resourceManager = new CPhSrvResourceManager(m_fs); - TRAP(leave, m_resourceManager->ConstructL()); - QVERIFY(leave == 0); - m_ussdManager = new CPhSrvUssdManager(m_fs,*m_resourceManager); - TRAP(leave,m_ussdManager->ConstructL(*this)); - QVERIFY(leave == 0); - m_fakeMessage = new RMessage2(); -} - -TestEnv::~TestEnv() -{ - delete m_ussdManager; - m_ussdManager = 0; - delete m_resourceManager; - m_resourceManager = 0; - delete m_fakeMessage; - m_fakeMessage = 0; -} - - -#define NULLREF(clz) *reinterpret_cast((void*)0) - -RTelServer& TestEnv::PhSrvETelServer() - { return NULLREF(RTelServer); } - -RMobilePhone& TestEnv::PhSrvMobilePhone() - { return NULLREF(RMobilePhone); } - -RMmCustomAPI& TestEnv::PhSrvCustomPhone() - { return NULLREF(RMmCustomAPI); } - - - - -//End of file - diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_testenv.h --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_testenv.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ - - -// include files -#include -#include -#include -#include "mphsrvphoneinterface.h" // base class - -// forward declarations -class RTelServer; -class RMobilePhone; -class RMmCustomAPI; -class CPhSrvResourceManager; -class CPhSrvUssdManager; - -/** - * Mode for current test execution - */ -class TestMode -{ -public: - enum {Immediate=50}; - enum Event{Normal,NoResp,NetworkRelease}; - - TestMode(Event event,int error=KErrNone,int timeout=Immediate) - {m_event=event;m_error=error;m_timeout=timeout;} - TestMode(int error,int timeout=Immediate) - {m_event=Normal;m_error=error;m_timeout=timeout;} - TestMode() - {m_event=Normal;m_error=KErrNone;m_timeout=Immediate;} - Event m_event; - int m_error; - int m_timeout; -}; - -/** - * ETEL message loop - */ -class EtelMsgLoop -{ -public: - EtelMsgLoop(); - - // methods - void receive( const TDesC8& msg, const TDesC8& attr ); - void networkRelease( const TDesC8& msg, const TDesC8& attr ); - - //data - TRequestStatus* mSendMessageReqStatus; - - TRequestStatus* mReceiveMessageReqStatus; - TDes8* mReceiveMessageData; - TDes8* mReceiveMessageAttributes; - - TRequestStatus* mNetworkReleaseReqStatus; - TDes8* mNetworkReleaseMessageData; - TDes8* mNetworkReleaseMessageAttributes; - -}; - - - -/** - * test environment - */ -class TestEnv: public MPhSrvPhoneInterface -{ - public: - - static void create(); - static void destroy(); - static TestEnv& env(); // the singleton - - TestEnv(); - void construct(); - ~TestEnv(); - - CPhSrvUssdManager& ussdManager() {return *m_ussdManager;} - - void setTestMode(const TestMode& testMode) {m_testMode = testMode;} - const TestMode& testMode() {return m_testMode;} - - EtelMsgLoop& etelMsgLoop() {return m_etelMsgLoop;} - - RMessage2& fakeMessage() {return *m_fakeMessage;} - - protected: // stubbed MPhSrvPhoneInterface - - RTelServer& PhSrvETelServer(); - RMobilePhone& PhSrvMobilePhone(); - RMmCustomAPI& PhSrvCustomPhone(); - - private: - - // file manager. Never actually connected to - RFs m_fs; - - // resource manager mock - CPhSrvResourceManager* m_resourceManager; - - // ussd manager (server main ussd class) - CPhSrvUssdManager* m_ussdManager; - - // test mode - TestMode m_testMode; - - // etel msg loop - EtelMsgLoop m_etelMsgLoop; - - // temp message - RMessage2* m_fakeMessage; - - static TestEnv* m_singleton; - -}; - - - - - diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_ussd.cpp --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_ussd.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,555 +0,0 @@ - - -#include -#include -#include - -// phoneclientengine -#include // USSD API -#include "cphcltussdimp.h" // USSD INTERNAL API -#include // USSD SAT API -#include - -// qt stuff -#include -#include -#include - -// unit test -#include "ut_testenv.h" -#include "ut_ussd.h" - -// want to use TestMode class inside QVariant (using QFETCH) -Q_DECLARE_METATYPE(TestMode) - - -// ==================================================================== -// Test cases -// ==================================================================== - - -void Ut_Ussd::testTestEnv() -{ - TestEnv::create(); - QTest::qSleep(200); - - TestEnv* env = &TestEnv::env(); - QVERIFY2(env,"TestEnv null"); - - CPhSrvUssdManager* m = &TestEnv::env().ussdManager(); - QVERIFY2(m,"TestEnv::ussdManager null"); - - TestMode tm1(TestMode::NoResp,KErrUnknown,123); - TestEnv::env().setTestMode(tm1); - QCOMPARE( (int)TestEnv::env().testMode().m_event, (int)TestMode::NoResp); - QCOMPARE( TestEnv::env().testMode().m_error, KErrUnknown); - QCOMPARE( TestEnv::env().testMode().m_timeout, 123); - TestMode tm2(KErrNotSupported,456); - TestEnv::env().setTestMode(tm2); - QCOMPARE( (int)TestEnv::env().testMode().m_event, (int)TestMode::Normal); - QCOMPARE( TestEnv::env().testMode().m_error, KErrNotSupported); - QCOMPARE( TestEnv::env().testMode().m_timeout, 456); - TestMode tm3(TestMode::Normal); - TestEnv::env().setTestMode(tm3); - QCOMPARE( (int)TestEnv::env().testMode().m_event, (int)TestMode::Normal); - QCOMPARE( TestEnv::env().testMode().m_error, KErrNone); - QCOMPARE( TestEnv::env().testMode().m_timeout, (int)TestMode::Immediate); - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::openAndCloseApi() -{ - TestEnv::create(); - QTest::qSleep(200); - - createUssdApi(false); - - delete m_ussdApi; - m_ussdApi = 0; - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::sendUssd16bit_data() -{ - QTest::addColumn("ui"); - QTest::addColumn("message"); - QTest::addColumn("testmode"); - - // without ui - QTest::newRow("1.1") << false << "123" << TestMode(KErrNone); - QTest::newRow("1.2") << false << "***" << TestMode(KErrNone,3000); - QTest::newRow("1.3") << false << "qwerty" << TestMode(KErrUnknown); - // show ui - QTest::newRow("2.1") << true << "#*555*" << TestMode(KErrNone,20); - QTest::newRow("2.2") << true << "#*555*" << TestMode(KErrCancel,500); - QTest::newRow("2.3") << true << "#*555*" << TestMode(KErrInUse,1000); - QTest::newRow("2.4") << true << "#*555*" << TestMode(KErrAccessDenied,90); - QTest::newRow("2.5") << true << "#*555*" << TestMode(KErrGsmSSCallBarred,190); - QTest::newRow("2.6") << true << "#*555*" << TestMode(KErrGsmSMSNoNetworkService,700); - QTest::newRow("2.7") << true << "#*555*" << TestMode(KErrGsmOfflineOpNotAllowed,1200); - QTest::newRow("2.8") << true << "#*555*" << TestMode(KErrSatControl,200); - QTest::newRow("2.9") << true << "#*555*" << TestMode(KErrUnknown,920); - -} - -void Ut_Ussd::sendUssd16bit() -{ - TestEnv::create(); - QTest::qSleep(200); - - QFETCH(bool, ui); - QFETCH(QString, message); - QFETCH(TestMode, testmode); - TestEnv::env().setTestMode(testmode); - - // create api - createUssdApi(ui); - - // send USSD - TBuf<100> buf16; - buf16.Copy( (const TUint16*)message.constData(), message.length() ); - int result = m_ussdApi->SendUssd( buf16 ); - QCOMPARE(result, testmode.m_error); - QTest::qSleep(100); - - // close api - delete m_ussdApi; - m_ussdApi = NULL; - QTest::qSleep(100); - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::sendCancel() -{ - TestEnv::create(); - QTest::qSleep(200); - - // create api - createUssdApi(false); - - // send USSD - _LIT( KMsg, "#12345*" ); - TestEnv::env().setTestMode(TestMode(KErrNone)); - int result = m_ussdApi->SendUssd( KMsg ); - QCOMPARE(result, KErrNone); - m_ussdApi->SendUssdCancel(); - - // close api - delete m_ussdApi; - m_ussdApi = NULL; - QTest::qSleep(100); - - TestEnv::destroy(); - QTest::qSleep(200); -} - - -void Ut_Ussd::sendUssd8bit_data() -{ - QTest::addColumn("ui"); - QTest::addColumn("message"); - QTest::addColumn("testmode"); - - // without ui - QTest::newRow("1.1") << false << "8" << TestMode(KErrNone); - QTest::newRow("1.2") << false << "#*888*" << TestMode(KErrUnknown,600); - QTest::newRow("1.3") << false << "illegal" << TestMode(KErrNotSupported); - // show ui - QTest::newRow("2.1") << true << "#*555*" << TestMode(KErrNone,20); - QTest::newRow("2.2") << true << "#*555*" << TestMode(KErrCancel,500); - QTest::newRow("2.3") << true << "#*555*" << TestMode(KErrInUse,1000); - QTest::newRow("2.4") << true << "#*555*" << TestMode(KErrAccessDenied,90); - QTest::newRow("2.5") << true << "#*555*" << TestMode(KErrGsmSSCallBarred,190); - QTest::newRow("2.6") << true << "#*555*" << TestMode(KErrGsmSMSNoNetworkService,700); - QTest::newRow("2.7") << true << "#*555*" << TestMode(KErrGsmOfflineOpNotAllowed,1200); - QTest::newRow("2.8") << true << "#*555*" << TestMode(KErrSatControl,200); - QTest::newRow("2.9") << true << "#*555*" << TestMode(KErrUnknown,920); -} - -void Ut_Ussd::sendUssd8bit() -{ - TestEnv::create(); - QTest::qSleep(200); - - QFETCH(bool, ui); - QFETCH(QString, message); - QFETCH(TestMode, testmode); - TestEnv::env().setTestMode(testmode); - - // create api - createUssdApi(ui); - - // send USSD - TBuf<100> buf16; - buf16.Copy( (const TUint16*)message.constData(), message.length() ); - TBuf8<100> buf8; - buf8.Copy( buf16 ); - int result = m_ussdApi->SendUssd( buf8 ); - QCOMPARE(result, testmode.m_error); - QTest::qSleep(100); - - // close api - delete m_ussdApi; - m_ussdApi = 0; - QTest::qSleep(100); - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::openAndCloseSatApi() -{ - TestEnv::create(); - QTest::qSleep(200); - - m_ussdSatApi = NULL; - createUssdSatApi(m_ussdSatApi); - - delete m_ussdSatApi; - m_ussdSatApi = 0; - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::sendSatMessage_data() -{ - QTest::addColumn("ui"); - QTest::addColumn("message"); - QTest::addColumn("testmode"); - - // without ui - QTest::newRow("1.1") << false << "123456" << TestMode(KErrNone); - QTest::newRow("1.2") << false << "*100#" << TestMode(KErrNone,1000); - QTest::newRow("1.3") << false << "8" << TestMode(KErrNone,400); - //QTest::newRow("1.4") << false << "illegal" << TestMode(KErrNotSupported); - -} - -void Ut_Ussd::sendSatMessage() -{ - TestEnv::create(); - QTest::qSleep(200); - - QFETCH(bool, ui); - QFETCH(QString, message); - QFETCH(TestMode, testmode); - TestEnv::env().setTestMode(testmode); - - // create api - createUssdSatApi(ui); - - TBuf receiveMessage; - TBool sendCompletedFirst( EFalse ); - TUint8 receiveDcs = 0; - TBuf<100> sendMessage; - sendMessage.Copy( (const TUint16*)message.constData(), - message.length() ); - - TInt ret = m_ussdSatApi->SendSatMessage( - sendMessage, - CPhCltUssdSatClient::EPhCltDcsUnknown, - receiveMessage, - sendCompletedFirst, - receiveDcs ); - - qDebug("receive error=%d", ret); - qDebug("receive receive msg=%s", &receiveMessage); - qDebug("receive isCompleteFirst=%d", &sendCompletedFirst); - qDebug("receive receive Dcs=%d", &receiveDcs); - - QVERIFY2(ret == testmode.m_error , "testSendSatMessage failed "); - - // close api - delete m_ussdSatApi; - m_ussdSatApi = NULL; - QTest::qSleep(100); - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::sendReceive_data() -{ - QTest::addColumn("ui"); - QTest::addColumn("msg1"); - QTest::addColumn("msg2"); - QTest::addColumn("testmode"); - - // without ui, empty resp - QTest::newRow("1.1") << false << "*100#" << "" << TestMode(KErrNone,1000); - QTest::newRow("1.2") << false << "*100#" << "" << TestMode(KErrNotSupported,400); - // without ui, text resp - QTest::newRow("2.1") << false << "*100#" << "12345" << TestMode(KErrNone,100); - QTest::newRow("2.2") << false << "*100#" << "12345" << TestMode(KErrUnknown,800); - - // show ui, empty resp - QTest::newRow("3.1") << true << "*100#" << "" << TestMode(KErrNone,700); - QTest::newRow("3.2") << true << "*100#" << "" << TestMode(KErrNotFound,400); - // show ui, text resp - QTest::newRow("4.1") << true << "*100#" << "12345" << TestMode(KErrNone,2000); - QTest::newRow("4.2") << true << "*100#" << "12345" << TestMode(-800,800); - -} - - -void Ut_Ussd::sendReceive() -{ - TestEnv::create(); - QTest::qSleep(200); - - QFETCH(bool, ui); - QFETCH(QString, msg1); - QFETCH(QString, msg2); - QFETCH(TestMode, testmode); - - createUssdApi(ui); - - TestEnv::env().setTestMode(TestMode(KErrNone)); - send(msg1); - TestEnv::env().setTestMode(testmode); - receive(msg2, RMobileUssdMessaging::EUssdMTReply); - activeSleep(500); - networkRelease( KErrNone ); - activeSleep(500); - - // close api - delete m_ussdApi; - m_ussdApi = NULL; - QTest::qSleep(100); - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::testMultipleIncomingMessages() -{ - TestEnv::create(); - QTest::qSleep(200); - - QString msg1 = "your favorite color?\n1=red\n2=blue"; - QString msg2 = "your favorite food?\n1=rice\n2=potatoes"; - QString msg3 = "thank you"; - receive(msg1,RMobileUssdMessaging::EUssdMTRequest); - activeSleep(1000); - receive(msg2,RMobileUssdMessaging::EUssdMTRequest); - activeSleep(1000); - receive(msg3,RMobileUssdMessaging::EUssdMTNotify); - activeSleep(1000); - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::testUssdInternalApi_data() -{ - QTest::addColumn("ui"); - QTest::addColumn("msg1"); - QTest::addColumn("msg2"); - QTest::addColumn("testmode"); - - // without ui - QTest::newRow("1.1") << false << "1" << "" << TestMode(KErrNone,100); - QTest::newRow("1.2") << false << "1" << "23" << TestMode(KErrNone,200); - QTest::newRow("1.3") << false << "1" << "" << TestMode(KErrUnknown,300); - QTest::newRow("1.4") << false << "1" << "23" << TestMode(KErrNotFound,400); - // show ui - QTest::newRow("1.1") << true << "1" << "" << TestMode(KErrNone,100); - QTest::newRow("1.2") << true << "1" << "23" << TestMode(KErrNone,200); - QTest::newRow("1.3") << true << "1" << "" << TestMode(KErrUnknown,300); - QTest::newRow("1.4") << true << "1" << "23" << TestMode(KErrNotFound,400); -} - -void Ut_Ussd::testUssdInternalApi() -{ - TestEnv::create(); - QTest::qSleep(200); - - QFETCH(bool, ui); - QFETCH(QString, msg1); // send - QFETCH(QString, msg2); // receive1 - QFETCH(TestMode, testmode); - - createUssdInternalApi(ui); - - int err = m_ussdInternalApi->AppStarting(); - QCOMPARE(err,KErrNone); - QTest::qSleep(100); - - err = m_ussdInternalApi->AppToBackground(); - QCOMPARE(err,KErrNone); - QTest::qSleep(100); - - err = m_ussdInternalApi->AppToForeground(); - QTest::qSleep(100); - - err = m_ussdInternalApi->AppTerminating(EPhCltUserExit); - QCOMPARE(err,KErrNone); - QTest::qSleep(100); - - err = m_ussdInternalApi->AppStarting(); - QCOMPARE(err,KErrNone); - QTest::qSleep(100); - - TBuf<200> reply_buf16; - reply_buf16.Copy( (const TUint16*)msg1.constData(), msg1.length() ); - int result = m_ussdInternalApi->SendUssd( reply_buf16 ); - QCOMPARE(result, TestEnv::env().testMode().m_error); - QTest::qSleep(100); - - receive(msg2, RMobileUssdMessaging::EUssdMTNotify); - activeSleep(100); - - err = m_ussdInternalApi->AppTerminating(EPhCltSendCompleted); - QCOMPARE(err,KErrNone); - QTest::qSleep(100); - - // close internal api - delete m_ussdInternalApi; - m_ussdInternalApi = NULL; - QTest::qSleep(100); - - TestEnv::destroy(); - QTest::qSleep(200); -} - -void Ut_Ussd::createUssdApi(bool ui) -{ - TRAPD(leave, m_ussdApi = CPhCltUssd::NewL(ui)); - QTest::qSleep(200); - if (leave != KErrNone) - QFAIL("CPhCltUssd::NewL Leave"); - if (NULL == m_ussdApi) - QFAIL("CPhCltUssd pointer null"); - qDebug("m_ussdApi=%d", m_ussdApi); -} - -void Ut_Ussd::createUssdInternalApi(bool ui) -{ - TRAPD(leave, m_ussdInternalApi = CPhCltUssdImp::NewL(ui)); - QTest::qSleep(200); - if (leave != KErrNone) - QFAIL("CPhCltUssdInt::NewL Leave"); - if (NULL == m_ussdInternalApi) - QFAIL("CPhCltUssdInt pointer null"); - qDebug("m_ussdInternalApi=%d", m_ussdInternalApi); -} - -void Ut_Ussd::createUssdSatApi(bool ui) -{ - TRAPD(leave, m_ussdSatApi = CPhCltUssdSatClient::NewL(ui)); - QTest::qSleep(200); - if (leave != KErrNone) - QFAIL("CPhCltUssdSatClient::NewL Leave"); - if (NULL == m_ussdSatApi) - QFAIL("CPhCltUssdSatClient pointer null"); - qDebug("m_ussdSatApi=%d", m_ussdSatApi); -} - -void Ut_Ussd::send(const QString& msg) -{ - qDebug("Ut_Ussd::send SendUssd in"); - QVERIFY(m_ussdApi); - TBuf<200> send_buf16; - send_buf16.Copy( (const TUint16*)msg.constData(), msg.length() ); - qDebug("Ut_Ussd::send SendUssd before"); - int result = m_ussdApi->SendUssd( send_buf16 ); - qDebug("Ut_Ussd::send SendUssd after"); - QCOMPARE(result, TestEnv::env().testMode().m_error); - qDebug("Ut_Ussd::send SendUssd out"); -} - -// type = { -// RMobileUssdMessaging::EUssdMTRequest -// RMobileUssdMessaging::EUssdMTReply -// RMobileUssdMessaging::EUssdMTNotify -// } - -void Ut_Ussd::receive(const QString& msg, int type) -{ - qDebug("Ut_Ussd::send receive in"); - QTest::qSleep(TestEnv::env().testMode().m_timeout); - TBuf<200> rcv_buf16; - rcv_buf16.Copy( (const TUint16*)msg.constData(), msg.length() ); - TBuf8<200> rcv_buf8; - rcv_buf8.Copy( rcv_buf16 ); - // prepare attributes - RMobileUssdMessaging::TMobileUssdAttributesV1 attr; - attr.iFlags = RMobileUssdMessaging::KUssdMessageType; - attr.iType = (RMobileUssdMessaging::TMobileUssdMessageType)type; - RMobileUssdMessaging::TMobileUssdAttributesV1Pckg attrpkg(attr); - - TestEnv::env().etelMsgLoop().receive( rcv_buf8, attrpkg ); - qDebug("Ut_Ussd::send receive out"); -} - -void Ut_Ussd::networkRelease(int error) -{ - qDebug("Ut_Ussd::send networkRelease in"); - RMobilePhone::TMobilePhoneSendSSRequestV3 attr; - attr.iOpCode = error; - RMobilePhone::TMobilePhoneSendSSRequestV3Pckg attrpkg(attr); - - TestEnv::env().etelMsgLoop().networkRelease( _L8(""), attrpkg ); - qDebug("Ut_Ussd::send networkRelease out"); -} - - -// global variables -CPeriodic* activeSleepTimer = 0; - -TInt ActiveSleepTimerCallback(TAny* aPtr) -{ - if ( activeSleepTimer ) { - qDebug("Ut_Ussd::ActiveSleepTimerCallback Cancel"); - activeSleepTimer->Cancel(); - } - CActiveSchedulerWait* wait = (CActiveSchedulerWait*) aPtr; - if (wait) { - qDebug("Ut_Ussd::ActiveSleepTimerCallback AsyncStop"); - wait->AsyncStop(); - } - return 0; -} - -// This is a special SLEEP method that allows active objects to run meanwhile. -// Note: because of its active nature, this sleep method is very inaccurate. -void Ut_Ussd::activeSleep(int ms) -{ - qDebug("Ut_Ussd::activeSleep in"); - - CActiveSchedulerWait* wait = new CActiveSchedulerWait; - activeSleepTimer = CPeriodic::NewL(CActive::EPriorityStandard+1); - TTimeIntervalMicroSeconds32 delay(1000*ms); - activeSleepTimer->Start(delay,delay, - TCallBack(ActiveSleepTimerCallback,(TAny*)wait)); - if ( wait && wait->IsStarted() ) { - wait->AsyncStop(); - delete activeSleepTimer; - activeSleepTimer = 0; - delete wait; - wait = NULL; - qDebug("Ut_Ussd::activeSleep out unnormal"); - return; - } - - if (wait) { - qDebug("Ut_Ussd::activeSleep start snyc before"); - wait->Start(); - qDebug("Ut_Ussd::activeSleep start snyc after"); - } - delete activeSleepTimer; - activeSleepTimer = 0; - delete wait; - wait = NULL; - qDebug("Ut_Ussd::activeSleep out"); -} - -//End of file - diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_ussd.h --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_ussd.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ - - -// include files -#include // base class - -// forward declarations -class CPhCltUssd; -class CPhCltUssdImp; -class CPhCltUssdSatClient; - -// class declaration -class Ut_Ussd: public QObject -{ - Q_OBJECT - -private slots: // test cases - - // Test for CPhCltUssd - void testTestEnv(); - void openAndCloseApi(); - void sendUssd16bit_data(); - void sendUssd16bit(); - void sendUssd8bit_data(); - void sendUssd8bit(); - void sendCancel(); - - // Test for CPhCltUssdSatClient - void openAndCloseSatApi(); - void sendSatMessage_data(); - void sendSatMessage(); - - // receiving messages - void sendReceive_data(); - void sendReceive(); - void testMultipleIncomingMessages(); - - // cases for internal api - void testUssdInternalApi_data(); - void testUssdInternalApi(); - -private: // tet blocks - - void createUssdApi(bool ui); - void createUssdInternalApi(bool ui); - void createUssdSatApi(bool ui); - void send(const QString& msg); - void receive(const QString& msg, int type); - void networkRelease(int error); - void activeSleep(int ms); - - -private: // test-related members - - // phone client - CPhCltUssd *m_ussdApi; - CPhCltUssdImp *m_ussdInternalApi; - CPhCltUssdSatClient *m_ussdSatApi; - -}; - diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_ussd.pro --- a/phoneclientserver/phoneclient/tsrc/public/basic/ut_ussd/ut_ussd.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -# -# 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: USSD unit test project file. -# this project combines phone server client and server classes, -# glues them in one single package with the test module and test -# the class functionality all together. -# - -TEMPLATE = app -TARGET = ut_ussd -DEPENDPATH += . -INCLUDEPATH += . -CONFIG += hb -CONFIG += qtestlib -HEADERS += $$PUBLIC_HEADERS - -symbian { - TARGET.CAPABILITY = CAP_APPLICATION - } - -INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - -# ===================================================================== -# CODE SUBJECT TO TEST -# Note that both ussd client and server code is compiled! -# ===================================================================== - -# server -HEADERS += ../../../../../phoneserver/inc/ussd/cphsrvussdmanager.h -HEADERS += ../../../../../phoneserver/inc/ussd/cphsrvussdnotifynwrelease.h -HEADERS += ../../../../../phoneserver/inc/ussd/cphsrvussdreceivehandler.h -HEADERS += ../../../../../phoneserver/inc/ussd/cphsrvussdreplytimer.h -HEADERS += ../../../../../phoneserver/inc/ussd/cphsrvussdsendhandler.h -HEADERS += ../../../../../phoneserver/inc/ussd/cphsrvussdsessioncancelwaiter.h -HEADERS += ../../../../../phoneserver/inc/ussd/mphsrvussdmessagesentobserver.h -HEADERS += ../../../../../phoneserver/inc/ussd/mphsrvussdnetworkobserver.h -HEADERS += ../../../../../phoneserver/inc/ussd/mphsrvussdreplytimerobserver.h -HEADERS += ../../../../../phoneserver/inc/Standard/mphsrvphoneinterface.h -HEADERS += ../../../../../phoneserver/inc/Standard/cphsrvresourcemanager.h -HEADERS += ../../../../../phoneserver/inc/Standard/phsrvutils.h -HEADERS += ../../../../../phoneserver/inc/Standard/phsrvdebuginfo.h -HEADERS += ../../../../../phoneserver/inc/Standard/phsrvconfigure.h - -SOURCES += ../../../../../phoneserver/src/ussd/cphsrvussdmanager.cpp -SOURCES += ../../../../../phoneserver/src/ussd/cphsrvussdnotifynwrelease.cpp -SOURCES += ../../../../../phoneserver/src/ussd/cphsrvussdreceivehandler.cpp -SOURCES += ../../../../../phoneserver/src/ussd/cphsrvussdreplytimer.cpp -SOURCES += ../../../../../phoneserver/src/ussd/cphsrvussdsendhandler.cpp -SOURCES += ../../../../../phoneserver/src/standard/phsrvutils.cpp -SOURCES += ../../../../../phoneserver/src/standard/phsrvdebuginfo.cpp - -# client/ussdwrapper -HEADERS += ../../../../../phoneclient/inc/ussd/ussd_ext/rphcltussd.h -HEADERS += ../../../../../phoneclient/inc/ussdwrapper/ussd_ext/cphcltussdimp.h -HEADERS += ../../../../../phoneclient/inc/ussdwrapper/cphcltussdnotecontroller.h -HEADERS += ../../../../../phoneclient/inc/ussdwrapper/cphcltussdrequesthandler.h -HEADERS += ../../../../../phoneclient/inc/ussdwrapper/mphcltussdnotecontrollercallback.h -HEADERS += ../../../../../phoneclient/inc/ussdwrapper/mphcltussdrequesthandler.h -HEADERS += ../../../../../phoneclient/inc/SharedClientServer/phcltclientserver.h -HEADERS += ../../../../../phoneclient/inc/ussdwrapper/cphcltussdcommonconstant.h - -SOURCES += ../../../../../phoneclient/src/ussdwrapper/cphcltussdext.cpp -SOURCES += ../../../../../phoneclient/src/ussdwrapper/cphcltussdimp.cpp -SOURCES += ../../../../../phoneclient/src/ussdwrapper/cphcltussdint.cpp -SOURCES += ../../../../../phoneclient/src/ussdwrapper/cphcltussdnotecontroller.cpp -SOURCES += ../../../../../phoneclient/src/ussdwrapper/cphcltussdrequesthandler.cpp -SOURCES += ../../../../../phoneclient/src/ussdwrapper/cphcltussdsatclient.cpp - - -# ===================================================================== -# TEST CODE -# Explanation of the test/mock classes -# * ut_ussd: -# QTestLib test cases -# * ut_testenv: -# keep-up of the test environment, stubs and mocks etc. -# * rphcltussd_glue: -# replaces RPhCltUssd implementation. Instead of connecting to -# phone server, directs commands directly to USSD manager and -# receives callbacks. -# * etel_mock: -# Mocks ETEL, fakes different USSD send responses. -# * phoneclientserver_stubs: -# Replaces the phoneserver resource reader with a dummy -# Replaces phoneserver client with a dummy -# ===================================================================== - -HEADERS += ut_ussd.h -HEADERS += ut_testenv.h -HEADERS += ut_cphcltussdnotecontroller.h - -SOURCES += main.cpp -SOURCES += ut_ussd.cpp -SOURCES += ut_testenv.cpp -SOURCES += rphcltussd_glue.cpp -SOURCES += etel_mock.cpp -SOURCES += phoneclientserver_stubs.cpp -SOURCES += ut_cphcltussdnotecontroller.cpp - - -LIBS += -lefsrv -LIBS += -lgsmu -LIBS += -lflogger -LIBS += -lCommonEngine -LIBS += -laknnotify -LIBS += -leiksrv -LIBS += -lbafl - diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Group/PhoneServer.mmp --- a/phoneclientserver/phoneserver/Group/PhoneServer.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Group/PhoneServer.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -25,7 +25,7 @@ VENDORID VID_DEFAULT TARGET phoneserver.exe -EPOCSTACKSIZE 0x5000 +EPOCSTACKSIZE 0x5000 TARGETPATH /system/programs TARGETTYPE EXE @@ -33,99 +33,87 @@ UID 0x1000008d 0x10000850 SOURCEPATH . -START RESOURCE ../src/resources/phoneserver.rss +START RESOURCE ../Src/Resources/PhoneServer.rss HEADER TARGETPATH RESOURCE_FILES_DIR LANGUAGE_IDS END // RESOURCE -SOURCEPATH ../src/standard -SOURCE phsrvstartup.cpp -SOURCE phsrvsubsessionfactory.cpp -SOURCE phsrvutils.cpp +SOURCEPATH ../Src/Standard +SOURCE PhSrvStartUp.cpp +SOURCE PhSrvSubSessionFactory.cpp +SOURCE PhSrvUtils.cpp -SOURCE cphsrvscheduler.cpp -SOURCE cphsrvserver.cpp -SOURCE cphsrvsession.cpp -SOURCE cphsrvresourcemanager.cpp -SOURCE cphsrvphonecontroller.cpp -SOURCE cphsrvemergencynumbermanager.cpp +SOURCE CPhSrvScheduler.cpp +SOURCE CPhSrvServer.cpp +SOURCE CPhSrvSession.cpp +SOURCE CPhSrvResourceManager.cpp +SOURCE CPhSrvPhoneController.cpp +SOURCE CPhSrvEmergencyNumberManager.cpp -SOURCE cphsrvsubsessionbase.cpp -SOURCE cphsrvsubsessionussd.cpp +SOURCE CPhSrvSubSessionBase.cpp +SOURCE CPhSrvSubSessionUssd.cpp -SOURCE phsrvdebuginfo.cpp +SOURCE PhSrvDebugInfo.cpp -SOURCEPATH ../src/standard/standard_aiw -SOURCE cphcltextphonedialdata.cpp +SOURCEPATH ../Src/Standard/Standard_Aiw +SOURCE CPhCltExtPhoneDialData.cpp SOURCE cphcltdialdata.cpp -SOURCE cphsrvemergencyrequestmanager.cpp -SOURCE cphsrvcallrequest.cpp -SOURCE cphsrvcallrequestmanager.cpp -SOURCE cphsrvsubsessionnotifier.cpp -SOURCE cphsrvsubsessionextcall.cpp -SOURCE cphsrvsubsessionemergencynum.cpp +SOURCE CPhSrvEmergencyRequestManager.cpp +SOURCE CPhSrvCallRequest.cpp +SOURCE CPhSrvCallRequestManager.cpp +SOURCE CPhSrvSubSessionNotifier.cpp +SOURCE CPhSrvSubSessionExtCall.cpp +SOURCE CPhSrvSubSessionEmergencyNum.cpp -SOURCEPATH ../src/imagehandler -SOURCE cphsrvsubsessionimagehandler.cpp -SOURCE cphsrvimagesaver.cpp +SOURCEPATH ../Src/ImageHandler +SOURCE CPhSrvSubSessionImageHandler.cpp +SOURCE cphsrvimagesaver.cpp -SOURCEPATH ../src/ussd -SOURCE cphsrvussdreplytimer.cpp -SOURCE cphsrvussdsendhandler.cpp -SOURCE cphsrvussdreceivehandler.cpp -SOURCE cphsrvussdmanager.cpp -SOURCE cphsrvussdnotifynwrelease.cpp +SOURCEPATH ../Src/Ussd +SOURCE CPhSrvUssdReplyTimer.cpp +SOURCE CPhSrvUssdSendHandler.cpp +SOURCE CPhSrvUssdReceiveHandler.cpp +SOURCE CPhSrvUssdManager.cpp +SOURCE CPhSrvUssdNotifyNWRelease.cpp -SOURCEPATH ../src/commandhandler +SOURCEPATH ../Src/CommandHandler #if defined( __AT_HANDLER ) -SOURCE cphsrvsubsessioncommandhandler.cpp -SOURCE cphsrvcomhandrequest.cpp +SOURCE CPhSrvSubSessionCommandHandler.cpp +SOURCE CPhSrvComHandRequest.cpp #else // No __AT_HANDLER defined, so stub version is used. -SOURCE cphsrvsubsessioncommandhandlerstub.cpp -SOURCE cphsrvsubsessioncommandhandlernotifystub.cpp +SOURCE CPhSrvSubSessionCommandHandlerStub.cpp +SOURCE CPhSrvSubSessionCommandHandlerNotifyStub.cpp #endif // __AT_HANDLER -SOURCEPATH ../src/commandhandler/commandhandler_aiw +SOURCEPATH ../Src/CommandHandler/Commandhandler_Aiw #if defined( __AT_HANDLER ) -SOURCE cphsrvcomhandrequestmanager.cpp +SOURCE CPhSrvComHandRequestManager.cpp #else // No __AT_HANDLER defined, so stub version is used. -SOURCE cphsrvcomhandrequestmanagerstub.cpp +SOURCE CPhSrvComHandRequestManagerStub.cpp #endif // __AT_HANDLER -SOURCEPATH ../src/messenger -#if defined( __CS_VIDEO_TELEPHONY ) -SOURCE cphsrvmessengerobject.cpp -SOURCE cphsrvmessengerrequestmanager.cpp -SOURCE cphsrvsubsessionmessenger.cpp -#else // No __CS_VIDEO_TELEPHONY defined, so stub version is used. -SOURCE cphsrvmessengerrequestmanagerstub.cpp -SOURCE cphsrvsubsessionmessengerstub.cpp -#endif // __CS_VIDEO_TELEPHONY +SOURCEPATH ../Src/Messenger +SOURCE CPhSrvMessengerObject.cpp +SOURCE CPhSrvMessengerRequestManager.cpp +SOURCE CPhSrvSubSessionMessenger.cpp -USERINCLUDE ../inc/standard -USERINCLUDE ../inc/standard/standard_aiw -USERINCLUDE ../inc/ussd -USERINCLUDE ../inc/commandhandler -USERINCLUDE ../inc/messenger -USERINCLUDE ../inc/imagehandler +USERINCLUDE ../Inc/Standard +USERINCLUDE ../Inc/Standard/Standard_Aiw +USERINCLUDE ../Inc/Ussd +USERINCLUDE ../Inc/CommandHandler +USERINCLUDE ../Inc/Messenger +USERINCLUDE ../Inc/ImageHandler -USERINCLUDE ../../phoneclient/inc/sharedclientserver +USERINCLUDE ../../phoneclient/Inc/SharedClientServer -// <-- QT PHONE START--> -MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END--> - +APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE ../../../inc SYSTEMINCLUDE ../../inc // for RPhCltEmergencyCall.h, CPhCltExtPhoneDialData.h // TEMPORARY DEFINITION FOR TELEPHONY VARIATION HEADERS -SYSTEMINCLUDE ../../../../../app/phone/inc - -// TEMPORARY DEFINITION FOR Orbit Device Dialog -SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets -SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore +SYSTEMINCLUDE ../../../../../app/phone/inc LIBRARY efsrv.lib LIBRARY apgrfx.lib @@ -134,18 +122,19 @@ LIBRARY ws32.lib LIBRARY etel.lib LIBRARY bafl.lib +LIBRARY aknnotify.lib LIBRARY gsmu.lib +LIBRARY avkon.lib LIBRARY apparc.lib LIBRARY customapi.lib LIBRARY etelmm.lib LIBRARY commonengine.lib LIBRARY featmgr.lib LIBRARY fbscli.lib -LIBRARY estor.lib +LIBRARY estor.lib LIBRARY centralrepository.lib -LIBRARY imageconversion.lib +LIBRARY imageconversion.lib LIBRARY bitmaptransforms.lib -LIBRARY hbwidgets.lib -LIBRARY hbcore.lib +LIBRARY ecom.lib // End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Group/bld.inf --- a/phoneclientserver/phoneserver/Group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -21,20 +21,23 @@ DEFAULT PRJ_EXPORTS - +..\inc\ussd\ussdinterfaceconstants.hrh MW_LAYER_PLATFORM_EXPORT_PATH(ussdinterfaceconstants.hrh) +..\inc\ussd\CUssdExtensionInterface.h MW_LAYER_PLATFORM_EXPORT_PATH(CUssdExtensionInterface.h) +..\inc\ussd\CUssdExtensionInterface.inl MW_LAYER_PLATFORM_EXPORT_PATH(CUssdExtensionInterface.inl) backup_registration.xml z:/private/10000850/backup_registration.xml -phoneserver_stub.sis /epoc32/data/z/system/install/phoneserver_stub.sis +Phoneserver_stub.SIS /epoc32/data/z/system/install/phoneserver_stub.sis // IBY files -../rom/phoneserver.iby CORE_MW_LAYER_IBY_EXPORT_PATH(phoneserver.iby) +../rom/PhoneServer.iby CORE_MW_LAYER_IBY_EXPORT_PATH(PhoneServer.iby) // LOC files ../loc/phoneserver.loc MW_LAYER_LOC_EXPORT_PATH(phoneserver.loc) PRJ_MMPFILES -../group/phoneserver.mmp +../Group/PhoneServer.mmp + PRJ_TESTMMPFILES // specify the .mmp files required for building any test programs here diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequest.h --- a/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequest.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequest.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include -#include +#include +#include // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequestManager.h --- a/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequestManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequestManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include "mphsrvcomhandnegotiators.h" -#include "mphsrvcomhandinitiators.h" +#include "MPhSrvComHandNegotiators.h" +#include "MPhSrvComHandInitiators.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandler.h --- a/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES -#include "cphsrvsubsessionbase.h" +#include "CPhSrvSubSessionBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.h --- a/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ // INCLUDES -#include "cphsrvsubsessionbase.h" -#include "mphsrvcomhandinitiators.h" +#include "CPhSrvSubSessionBase.h" +#include "MPhSrvComHandInitiators.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandInitiators.h --- a/phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandInitiators.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandInitiators.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include "phcltclientserver.h" -#include +#include "PhCltClientServer.h" +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandNegotiators.h --- a/phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandNegotiators.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandNegotiators.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS class MPhSrvComHandInitiator; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/ImageHandler/CPhSrvSubSessionImageHandler.h --- a/phoneclientserver/phoneserver/Inc/ImageHandler/CPhSrvSubSessionImageHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/ImageHandler/CPhSrvSubSessionImageHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,14 +19,14 @@ #define CPHSRVSUBSESSIONIMAGEHANDLER_H // INCLUDES -#include "cphsrvsubsessionbase.h" +#include "CPhSrvSubSessionBase.h" #include "cphsrvimagesaver.h" #include "mphsrvimagesaverobserver.h" -#include +#include #include #include -#include -#include +#include +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerObject.h --- a/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerObject.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerObject.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,8 +24,8 @@ // INCLUDES #include -#include "phsrvmessengertypes.h" -#include +#include "PhSrvMessengerTypes.h" +#include // FORWARD DECLARATIONS class CPhSrvSubSessionBase; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerRequestManager.h --- a/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerRequestManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerRequestManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include "mphsrvmessengernegotiators.h" -#include +#include "MPhSrvMessengerNegotiators.h" +#include // FORWARD DECLARATIONS class CPhSrvMessengerObject; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Messenger/CPhSrvSubSessionMessenger.h --- a/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvSubSessionMessenger.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvSubSessionMessenger.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ // INCLUDES -#include "cphsrvsubsessionbase.h" -#include +#include "CPhSrvSubSessionBase.h" +#include // FORWARD DECLARATIONS class MPhSrvMessengerNegotiator; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Messenger/MPhSrvMessengerNegotiators.h --- a/phoneclientserver/phoneserver/Inc/Messenger/MPhSrvMessengerNegotiators.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Messenger/MPhSrvMessengerNegotiators.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include "phsrvmessengertypes.h" -#include +#include "PhSrvMessengerTypes.h" +#include // FORWARD DECLARATIONS class CPhSrvSubSessionBase; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Messenger/PhSrvMessengerTypes.h --- a/phoneclientserver/phoneserver/Inc/Messenger/PhSrvMessengerTypes.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Messenger/PhSrvMessengerTypes.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include +#include // DATA TYPES diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/CPhSrvEmergencyNumberManager.h --- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvEmergencyNumberManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvEmergencyNumberManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include // cbase -#include "mphsrvemergencynumbermanager.h" // interface +#include "MPhSrvEmergencyNumberManager.h" // interface // FORWARD DECLARATIONS class MPhSrvPhoneInterface; @@ -74,7 +74,7 @@ MPhSrvPhoneInterface& iPhone; // Contains Emergency policy DLL interface. - RLibrary iEnPolicyLib; + RLibrary iEnPolicyLib; // Pointer to Emergency policy interface. CEmergencyNumberPolicy* iEmergencyNumberPolicy; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/CPhSrvPhoneController.h --- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvPhoneController.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvPhoneController.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include // ETel #include // CustomAPI -#include "mphsrvphoneinterface.h" // The interface class +#include "MPhSrvPhoneInterface.h" // The interface class // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/CPhSrvServer.h --- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvServer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvServer.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,9 @@ // INCLUDES -#include "mphsrvphoneinterface.h" -#include "phcltclientserver.h" -#include +#include "MPhSrvPhoneInterface.h" +#include "PhCltClientServer.h" +#include #include #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/CPhSrvSession.h --- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSession.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSession.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include "phcltclientserver.h" +#include "PhCltClientServer.h" // FORWARD DECLARATIONS class CPhSrvServer; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionBase.h --- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionBase.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionBase.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include "mphsrvmessageprocessor.h" +#include "MPhSrvMessageProcessor.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionExtCall.h --- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionExtCall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionExtCall.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ // INCLUDES -#include "cphsrvsubsessionbase.h" -#include +#include "CPhSrvSubSessionBase.h" +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionUssd.h --- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionUssd.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionUssd.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ // INCLUDES -#include "cphsrvsubsessionbase.h" -#include "mphsrvussdmessagesentobserver.h" +#include "CPhSrvSubSessionBase.h" +#include "MPhSrvUssdMessageSentObserver.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/PhSrvDebugInfo.h --- a/phoneclientserver/phoneserver/Inc/Standard/PhSrvDebugInfo.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/PhSrvDebugInfo.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include // TInt, cbase -#include "kphsrvconfigure.h" // Debugging feature defines +#include "KPhSrvConfigure.h" // Debugging feature defines // MACROS //---------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/PhSrvStartUp.h --- a/phoneclientserver/phoneserver/Inc/Standard/PhSrvStartUp.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/PhSrvStartUp.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequest.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequest.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequest.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // CONSTANTS @@ -100,7 +100,7 @@ * @return The call arguments. */ CPhCltExtPhoneDialData& CallArguments() const; - + /** * Update Emergency call status * @param aMessage The outstanding client request which will be completed @@ -146,7 +146,7 @@ // The object responsible for processing external client call requests. // This is essentially an interface to the phone app engine. - CPhCltExtPhoneDialData* iCallArguments; + CPhCltExtPhoneDialData* iCallArguments; // A handle to the subsession that initiated this request. TInt iSubSessionHandle; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequestManager.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequestManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequestManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,9 +22,9 @@ // INCLUDES #include -#include "mphsrvobjectnegotiators.h" -#include "mphsrvobjectinitiators.h" -#include +#include "MPhSrvObjectNegotiators.h" +#include "MPhSrvObjectInitiators.h" +#include // FORWARD DECLARATIONS class CPhSrvCallRequest; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include "mphsrvemergencynegotiators.h" -#include "mphsrvemergencyinitiators.h" +#include "MPhSrvEmergencyNegotiators.h" +#include "MPhSrvEmergencyInitiators.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES -#include "cphsrvsubsessionbase.h" +#include "CPhSrvSubSessionBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,12 +22,12 @@ // INCLUDES #include -#include -#include // for TPhCltEmergencyNumber -#include "cphsrvsubsessionbase.h" -#include "mphsrvemergencyinitiators.h" -#include "mphsrvobjectinitiators.h" -#include "mphsrvcomhandinitiators.h" +#include +#include // for TPhCltEmergencyNumber +#include "CPhSrvSubSessionBase.h" +#include "MPhSrvEmergencyInitiators.h" +#include "MPhSrvObjectInitiators.h" +#include "MPhSrvComHandInitiators.h" // CLASS DECLARATION @@ -82,9 +82,9 @@ * be informed that it needs to make a call. * * @see MPhSrvInitiatorCall - */ - void InitiatorMakeAsynchronousCallL( CPhCltExtPhoneDialData& aArgs ); - /** + */ + void InitiatorMakeAsynchronousCallL( CPhCltExtPhoneDialData& aArgs ); + /** * Does this subsession have a pending request? * * @see MPhSrvInitiatorCall @@ -130,7 +130,7 @@ void CmdSubSessionDialDataL ( const RMessage2& aMessage ); - void CmdSubSessionNotifyEmergencyL ( const RMessage2& aMessage ); + void CmdSubSessionNotifyEmergencyL ( const RMessage2& aMessage ); void CmdSubSessionNotifyEmergencyCancel( const RMessage2& aMessage ); diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNegotiators.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNegotiators.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNegotiators.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNumberManager.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNumberManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNumberManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define MPHSRVEMERGENCYNUMBERMANAGER_H // INCLUDES -#include "phcltclientserver.h" -#include +#include "PhCltClientServer.h" +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectInitiators.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectInitiators.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectInitiators.h Wed Sep 01 12:15:03 2010 +0100 @@ -45,7 +45,7 @@ * @param aArgs The call parameters. */ virtual void InitiatorMakeAsynchronousCallL( - CPhCltExtPhoneDialData& aArgs ) =0; + CPhCltExtPhoneDialData& aArgs ) =0; /** * Called by the call manager to find out if there is a registered * notification handler. diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectNegotiators.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectNegotiators.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectNegotiators.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include -#include +#include +#include // FORWARD DECLARATIONS class MPhSrvInitiatorCall; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequest.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequest.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequest.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequestManager.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequestManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequestManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include "mphsrvobjectnegotiators.h" -#include "mphsrvobjectinitiators.h" +#include "MPhSrvObjectNegotiators.h" +#include "MPhSrvObjectInitiators.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionEmergencyNum.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionEmergencyNum.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionEmergencyNum.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ // INCLUDES -#include "cphsrvsubsessionbase.h" +#include "CPhSrvSubSessionBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionNotifier.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionNotifier.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionNotifier.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,10 +22,10 @@ // INCLUDES #include -#include "cphsrvsubsessionbase.h" -#include "mphsrvobjectinitiators.h" -#include "cphsrvsubsessionnotifier.h" -#include "mphsrvcomhandinitiators.h" +#include "CPhSrvSubSessionBase.h" +#include "MPhSrvObjectInitiators.h" +#include "CPhSrvSubSessionNotifier.h" +#include "MPhSrvComHandInitiators.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvEmergencyNumberManager.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvEmergencyNumberManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvEmergencyNumberManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES -#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvObjectNegotiators.h --- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvObjectNegotiators.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvObjectNegotiators.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Ussd/CPhSrvUssdManager.h --- a/phoneclientserver/phoneserver/Inc/Ussd/CPhSrvUssdManager.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Inc/Ussd/CPhSrvUssdManager.h Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -21,11 +21,11 @@ // INCLUDES #include // ETel -#include "phcltclientserver.h" -#include "mphsrvussdnetworkobserver.h" -#include "mphsrvussdreplytimerobserver.h" +#include "PhCltClientServer.h" +#include "MPhSrvUssdNetworkObserver.h" +#include "MPhSrvUssdReplyTimerObserver.h" #include -#include + // FORWARD DECLARATIONS class RFs; @@ -35,8 +35,11 @@ class CPhSrvUssdReplyTimer; class MPhSrvPhoneInterface; class MPhSrvUssdMessageSentObserver; +class CAknGlobalMsgQuery; class CPhSrvUssdSessionCancelWaiter; class CPhSrvUssdNotifyNWRelease; +// RM-RIM 417-66528 +class CUssdExtensionInterface; // CLASS DECLARATION @@ -48,8 +51,7 @@ class CPhSrvUssdManager : public CActive, public MPhSrvUssdNetworkObserver, - public MPhSrvUssdReplyTimerObserver, - public MHbDeviceMessageBoxObserver + public MPhSrvUssdReplyTimerObserver { public: // Constructors and destructor @@ -161,12 +163,6 @@ */ void UssdReplyTimerObserverHandleExpiredL( TInt aError ); - /** - * @see MHbDeviceMessageBoxObserver - */ - void MessageBoxClosed(const CHbDeviceMessageBoxSymbian* aMessageBox, - CHbDeviceMessageBoxSymbian::TButtonId aButton); - /* * @see CActive */ @@ -181,6 +177,8 @@ * @see CActive */ TInt RunError( TInt aError ); + + private: // New functions @@ -218,6 +216,18 @@ const TDes8& aMsgData, const RMobileUssdMessaging::TMobileUssdAttributesV1& aMsgAttributes); + + // RM-RIM 417-66528 + /** Third stage handler for received messages meant for extension + */ + void PorcessReceivedMessageInExtesnionL(const TDes8& aMsgData, + const RMobileUssdMessaging::TMobileUssdAttributesV1& + aMsgAttributes); + /** Third stage handler for received messages + */ + void ProcessReceivedMessageL(const TDes8& aMsgData, + const RMobileUssdMessaging::TMobileUssdAttributesV1& + aMsgAttributes); // Restart the reply timer void RestartReplyTimerL(); @@ -227,6 +237,11 @@ // Set timer and activate it if there are notifications available void SetActiveIfPendingNotificationsExist(); + // RM-RIM 417-66528 + // Create and Initialize the global message query + void CreateGlobalMessageQueryL( + const RMobileUssdMessaging::TMobileUssdAttributesV1& + aMsgAttributes); // Launch the global message query (used from RunL) void LaunchGlobalMessageQueryL(); @@ -307,7 +322,7 @@ * * @since 3.1 */ - void UpdateNotifyMessageL(); + void UpdateNotifyMessage(); /** * Turn lights on @@ -315,15 +330,9 @@ * @since 3.1 */ void TurnLightsOn(); - - /** - * Load default string by QT style localization - * @param aText default string id defined by _LIT - */ - const TPtrC LoadDefaultString( const TDesC& aText ); private: // Data - + // The file session reference. RFs& iFsSession; @@ -352,8 +361,8 @@ TBuf< KPhCltUssdMax8BitCharacters > iReceivedMessage; // The message query for showing USSD operation queries. - CHbDeviceMessageBoxSymbian* iDeviceDialog; - + CAknGlobalMsgQuery* iGlobalMsgQuery; + // Is editor emptied. TBool iEmptyEditor; @@ -384,6 +393,9 @@ // Local Telephony variant read-only data. TInt iVariantReadOnlyValues; + // The message query header text. + HBufC* iMeQuHeaderText; + // The buffer for received decoded message. TBuf< KPhCltUssdMax8BitCharacters > iDecodedMessage; @@ -411,7 +423,7 @@ // Show Done note TBool iShowDone; - // Checks if received message type is Reply + // Checks if received message type is Reply TBool iMsgTypeReply; // Has the transaction been closed or not @@ -426,8 +438,9 @@ // An asynchronous callback for sending MO ACK messages CAsyncCallBack* iMoAckCallback; - HBufC* iTextBuffer; - + // RM-RIM 417-66528 + // Pointer to the UssdExtension + CUssdExtensionInterface* iUssdExtnInterface; }; #endif // CPHSRVUSSDMANAGER_H diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Ussd/CUssdExtensionInterface.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneclientserver/phoneserver/Inc/Ussd/CUssdExtensionInterface.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2002-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: Extends the ussd functionality. + * + */ +#ifndef __CUSSDEXTENSIONINTERFACE_H__ +#define __CUSSDEXTENSIONINTERFACE_H__ + +// INCLUDES + +#include +#include +#include +// FORWARD DECLARATIONS + +// CONSTANTS +const TUid KUssdExtensionInterfaceUid = + { + KUssdExtensionInterfaceUidValue + }; + +// CLASS DECLARATION + +/** + * Base class for Ussd Extension Plugin. + * + * This API allows customizing the USSD sending feature of the S60 Telephony + * applications at runtime. + * + * The API defines two roles: + * 1) Validates the USSD string while sending. if it is unauthorized + * in the context shall terminate the request. + * 2) Validates the USSD string while receiving, the extension will get the first chance to consume the reply if needed + * + * + * Note: + * The customizer needs only one plug-in implementation for a variant, and so supports only rom-only plug-in. + */ +class CUssdExtensionInterface : public CBase + { +public: + // Constructors and destructor + /** + * NewL + * Wraps ECom object instantitation. Will return the + * default interface implementation, which matches to + * given aOperationName. + */ + static CUssdExtensionInterface* NewL(); + + /** + * NewL + * Wraps ECom object instantitation. Will search for + * interface implementation, which matches to given + * aOperationName. + * @param aOperationName name of requested implementation. + * Implementations advertise their "name" as specified + * in their resource file field + * IMPLEMENTATION_INFO::default_data. + */ + static CUssdExtensionInterface* NewL(const TDesC8& aMatch); + +public: + // API to be implemented by ECOM plug-in + + /** + * Validate/Authenticate the Ussd string Before Sending from + * the USSD Send handler + * When Ussd Extention plugin return true, then ussd manager will continue sending of the ussd + * Otherwise the transaction will be terminated with KErrAccessDenined + * + * @param aMessageData + * @param aMessageAttributes . + */ + virtual TBool + ValidateUssdMsgSending( + const TDesC8& aMessageData, + const RMobileUssdMessaging::TMobileUssdAttributesV1& aMsgAttribute) = 0; + /** + * Validate/Authenticate the Ussd response received by the + * USSD receive handler + * + * @param aMessageData + * @return true implies that the ussd response is valid for the extension. + * otherwise pass it to the observer. . + */ + virtual TBool ValidateUssdResponse(const TDesC8& aMessage) = 0; + /** + * if ValidateUssdResponse returns true, then the extension plugin is waiting for the response + * so invoke the interface to deligate to the plugin. + * Example: + * ... + * TBool isValidForExtension = iUssdExtnInterface->ValidateUssdResponse(aMsgData); + * TInt errfromextension = KErrNone; + * if (isValidForExtension) + * { + * TRAPD(err, iUssdExtnInterface->ProcessReceivedUssdL(iDecodedMessage, errfromextension)); + * ... + * + * @param aMessageData + * @return error code + * @leave On typical leave level problems. + */ + virtual void + ProcessReceivedUssdL(const TDesC& aMessageData, TInt aError) = 0; + + /** + * Notify the any network error to the extension, so that it can handle the internal states if required + * @param aError + */ + virtual void NotifyNWError(TInt aError)=0; + +public: + /** + * ~CUssdExtensionInterface + * + * Cleans up resources, specifically notify ECOM server that this + * instance is being deleted. + */ + virtual ~CUssdExtensionInterface(); + +private: + TUid iDtor_ID_Key; // Identification on cleanup + }; +#include "CUssdExtensionInterface.inl" +#endif // __CUSSDEXTENSIONINTERFACE_H__ diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Ussd/CUssdExtensionInterface.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneclientserver/phoneserver/Inc/Ussd/CUssdExtensionInterface.inl Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,67 @@ +/* +* Copyright (c) 2002-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: Interface's (abstract base class's) static factory method implementation. +* +*/ + +#include +#include + +// --------------------------------------------------------------------------- +// CUssdExtensionInterface::NewL +// Interface's (abstract base class's) static factory method implementation. +// Asks ECOM plugin framework to instantiate appropriate concret plugin +// implementation. +// --------------------------------------------------------------------------- +// +inline CUssdExtensionInterface* CUssdExtensionInterface::NewL() + { + TEComResolverParams resolutionParameters; + resolutionParameters.SetGenericMatch(ETrue); + TAny* interface = REComSession::CreateImplementationL ( + KUssdExtensionInterfaceUid, _FOFF (CUssdExtensionInterface, iDtor_ID_Key), resolutionParameters, KRomOnlyResolverUid); + + return reinterpret_cast (interface); + } + +// --------------------------------------------------------------------------- +// CUssdExtensionInterface::NewL +// Interface's (abstract base class's) static factory method implementation. +// Asks ECOM plugin framework to instantiate appropriate concret plugin +// implementation. +// --------------------------------------------------------------------------- +// +inline CUssdExtensionInterface* CUssdExtensionInterface::NewL(const TDesC8& aOperationName) + { + TEComResolverParams resolverParams; + resolverParams.SetDataType (aOperationName); + resolverParams.SetWildcardMatch (ETrue); + + TAny* interface = REComSession::CreateImplementationL (KUssdExtensionInterfaceUid, + _FOFF (CUssdExtensionInterface, iDtor_ID_Key), resolverParams, KRomOnlyResolverUid); + + return reinterpret_cast (interface); + } + +// --------------------------------------------------------------------------- +// CUssdExtensionInterface::~CUssdExtensionInterface +// Interface's (abstract base class's) destructor +// --------------------------------------------------------------------------- +// +inline CUssdExtensionInterface::~CUssdExtensionInterface() + { + REComSession::DestroyedImplementation (iDtor_ID_Key); + } + + diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Inc/Ussd/ussdinterfaceconstants.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneclientserver/phoneserver/Inc/Ussd/ussdinterfaceconstants.hrh Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,24 @@ +/* +* Copyright (c) 2002-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: common definitions of the ussd extension. +* +*/ +#ifndef T_USSDINTERFACECONSTANTS_HRH +#define T_USSDINTERFACECONSTANTS_HRH + + +const TInt KUssdExtensionInterfaceUidValue = 0x200315D0; + + +#endif // T_USSDINTERFACECONSTANTS_HRH diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvComHandRequest.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvComHandRequest.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvComHandRequest.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphsrvcomhandrequest.h" -#include "phsrvutils.h" +#include "CPhSrvComHandRequest.h" +#include "PhSrvUtils.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandler.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,11 +20,11 @@ // INCLUDE FILES -#include "cphsrvsubsessioncommandhandler.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" -#include -#include "mphsrvcomhandnegotiators.h" +#include "CPhSrvSubSessionCommandHandler.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" +#include +#include "MPhSrvComHandNegotiators.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,11 +20,11 @@ // INCLUDE FILES -#include "cphsrvsubsessioncommandhandlernotify.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" -#include -#include "mphsrvcomhandnegotiators.h" +#include "CPhSrvSubSessionCommandHandlerNotify.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" +#include +#include "MPhSrvComHandNegotiators.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotifyStub.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotifyStub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotifyStub.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,12 +18,12 @@ // INCLUDE FILES -#include "cphsrvsubsessionbase.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" -#include -#include "mphsrvcomhandnegotiators.h" -#include "cphsrvsubsessioncommandhandlernotify.h" +#include "CPhSrvSubSessionBase.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" +#include +#include "MPhSrvComHandNegotiators.h" +#include "CPhSrvSubSessionCommandHandlerNotify.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerStub.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerStub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerStub.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,12 +18,12 @@ // INCLUDE FILES -#include "cphsrvsubsessionbase.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" -#include -#include "mphsrvcomhandnegotiators.h" -#include "cphsrvsubsessioncommandhandler.h" +#include "CPhSrvSubSessionBase.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" +#include +#include "MPhSrvComHandNegotiators.h" +#include "CPhSrvSubSessionCommandHandler.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManager.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,12 +18,12 @@ // INCLUDES -#include "cphsrvcomhandrequestmanager.h" -#include "cphsrvcomhandrequest.h" -#include "cphsrvsubsessionbase.h" -#include "phsrvutils.h" -#include "cphsrvserver.h" -#include "mphsrvemergencynumbermanager.h" +#include "CPhSrvComHandRequestManager.h" +#include "CPhSrvComHandRequest.h" +#include "CPhSrvSubSessionBase.h" +#include "PhSrvUtils.h" +#include "CPhSrvServer.h" +#include "MPhSrvEmergencyNumberManager.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManagerStub.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManagerStub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManagerStub.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDES -#include "cphsrvcomhandrequestmanager.h" -#include "cphsrvcomhandrequest.h" -#include "cphsrvsubsessionbase.h" -#include "phsrvutils.h" +#include "CPhSrvComHandRequestManager.h" +#include "CPhSrvComHandRequest.h" +#include "CPhSrvSubSessionBase.h" +#include "PhSrvUtils.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManager.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,12 +18,12 @@ // INCLUDES -#include "cphsrvcomhandrequestmanager.h" -#include "cphsrvcomhandrequest.h" -#include "cphsrvsubsessionbase.h" -#include "phsrvutils.h" -#include "cphsrvserver.h" -#include "mphsrvemergencynumbermanager.h" +#include "CPhSrvComHandRequestManager.h" +#include "CPhSrvComHandRequest.h" +#include "CPhSrvSubSessionBase.h" +#include "PhSrvUtils.h" +#include "CPhSrvServer.h" +#include "MPhSrvEmergencyNumberManager.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManagerStub.cpp --- a/phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManagerStub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManagerStub.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDES -#include "cphsrvcomhandrequestmanager.h" -#include "cphsrvcomhandrequest.h" -#include "cphsrvsubsessionbase.h" -#include "phsrvutils.h" +#include "CPhSrvComHandRequestManager.h" +#include "CPhSrvComHandRequest.h" +#include "CPhSrvSubSessionBase.h" +#include "PhSrvUtils.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/ImageHandler/CPhSrvSubSessionImageHandler.cpp --- a/phoneclientserver/phoneserver/Src/ImageHandler/CPhSrvSubSessionImageHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/ImageHandler/CPhSrvSubSessionImageHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,12 +19,12 @@ // INCLUDE FILES -#include "cphsrvsubsessionimagehandler.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" +#include "CPhSrvSubSessionImageHandler.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" #include -#include -#include "phsrvdebuginfo.h" +#include +#include "PhSrvDebugInfo.h" // CONSTANTS _LIT( KPhSrvImageDriveRom, "z:" ); @@ -532,8 +532,8 @@ // Load the images from file. const TBool loadDefaultImage = aImages.iType == EPhCltTypeVTDefault; DoReadVTImagesL( loadDefaultImage ); - - // Copy handles. + + // Copy handles. aImages.iImageCount = iVTBitMaps.Count(); for ( TInt i = 0; i < aImages.iImageCount; i++ ) { @@ -562,7 +562,7 @@ aDefaultImage, path ); #ifdef __PHENG_DEBUG_INFO__ - TPtr ptr = searchPath->Des(); // temp pointer to avoid lvalue compile warning + TPtr ptr = searchPath->Des(); // temp pointer to avoid lvalue compile warning RDebug::Print( _L( "CPhSrvSubSessionImageHandler::ReadVT: %S"), ( &ptr )); #endif @@ -721,9 +721,8 @@ bitMap ); aImages.iImages[ EPhCltExtOperatorLogoIndex ] = bitMap->Handle(); aImages.iImageCount = 1; - CleanupStack::PushL(logoContainer); - iOperatorLogos.AppendL( logoContainer ); - CleanupStack::Pop(logoContainer); + iOperatorLogos.Append( logoContainer ); + CleanupStack::Pop( bitMap ); CleanupStack::PopAndDestroy( hbuf ); diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerObject.cpp --- a/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerObject.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerObject.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDE FILES -#include "cphsrvmessengerobject.h" -#include "cphsrvsubsessionbase.h" -#include "cphsrvsession.h" // Phone server session. -#include "phsrvdebuginfo.h" +#include "CPhSrvMessengerObject.h" +#include "CPhSrvSubSessionBase.h" +#include "CPhSrvSession.h" // Phone server session. +#include "PhSrvDebugInfo.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerRequestManager.cpp --- a/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerRequestManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerRequestManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,12 +20,12 @@ // INCLUDES -#include "cphsrvmessengerrequestmanager.h" -#include "cphsrvmessengerobject.h" -#include "cphsrvsubsessionbase.h" -#include "phsrvutils.h" -#include "phsrvmessengertypes.h" -#include "phsrvdebuginfo.h" +#include "CPhSrvMessengerRequestManager.h" +#include "CPhSrvMessengerObject.h" +#include "CPhSrvSubSessionBase.h" +#include "PhSrvUtils.h" +#include "PhSrvMessengerTypes.h" +#include "PhSrvDebugInfo.h" // CONSTANTS @@ -481,11 +481,7 @@ // Reservation was successful, so use reserved buffer // as a new default buffer. // But first delete the old buffer. - if( iDefaultSizeBuffer ) - { - delete iDefaultSizeBuffer; - iDefaultSizeBuffer = NULL; - } + delete iDefaultSizeBuffer; iDefaultSizeBuffer = variableSizeBuffer; } } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Messenger/CPhSrvSubSessionMessenger.cpp --- a/phoneclientserver/phoneserver/Src/Messenger/CPhSrvSubSessionMessenger.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Messenger/CPhSrvSubSessionMessenger.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,12 +20,12 @@ // INCLUDE FILES -#include "cphsrvsubsessionmessenger.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" -#include -#include "mphsrvmessengernegotiators.h" -#include "phsrvmessengertypes.h" +#include "CPhSrvSubSessionMessenger.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" +#include +#include "MPhSrvMessengerNegotiators.h" +#include "PhSrvMessengerTypes.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/CPhSrvEmergencyNumberManager.cpp --- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvEmergencyNumberManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvEmergencyNumberManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,14 +18,14 @@ // INCLUDE FILES -#include "cphsrvemergencynumbermanager.h" -#include "mphsrvphoneinterface.h" -#include "phsrvdebuginfo.h" -#include +#include "CPhSrvEmergencyNumberManager.h" +#include "MPhSrvPhoneInterface.h" +#include "PhSrvDebugInfo.h" +#include // CONSTANTS -_LIT(KPhSrvDosEnPolicyLibName, "dosenpolicy.dll"); // DOS emergency number policy -_LIT(KPhSrvSosEnPolicyLibName, "sosenpolicy.dll"); // SOS emergency number policy +_LIT(KPhSrvDosEnPolicyLibName, "DosEnPolicy.dll"); // DOS emergency number policy +_LIT(KPhSrvSosEnPolicyLibName, "SosEnPolicy.dll"); // SOS emergency number policy // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/CPhSrvPhoneController.cpp --- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvPhoneController.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvPhoneController.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include "cphsrvphonecontroller.h" +#include "CPhSrvPhoneController.h" #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/CPhSrvResourceManager.cpp --- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvResourceManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvResourceManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphsrvresourcemanager.h" -#include "phcltclientserver.h" +#include "CPhSrvResourceManager.h" +#include "PhCltClientServer.h" #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/CPhSrvScheduler.cpp --- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvScheduler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvScheduler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,8 +17,8 @@ // INCLUDE FILES -#include "cphsrvscheduler.h" -#include "phsrvutils.h" +#include "CPhSrvScheduler.h" +#include "PhSrvUtils.h" diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/CPhSrvServer.cpp --- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvServer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvServer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,24 +17,24 @@ // INCLUDE FILES -#include "cphsrvserver.h" -#include "cphsrvsession.h" -#include "cphsrvscheduler.h" -#include "cphsrvussdmanager.h" -#include "cphsrvresourcemanager.h" -#include "cphsrvphonecontroller.h" -#include "cphsrvcallrequestmanager.h" -#include "cphsrvemergencyrequestmanager.h" -#include "cphsrvemergencynumbermanager.h" +#include "CPhSrvServer.h" +#include "CPhSrvSession.h" +#include "CPhSrvScheduler.h" +#include "CPhSrvUssdManager.h" +#include "CPhSrvResourceManager.h" +#include "CPhSrvPhoneController.h" +#include "CPhSrvCallRequestManager.h" +#include "CPhSrvEmergencyRequestManager.h" +#include "CPhSrvEmergencyNumberManager.h" -#include "phsrvutils.h" -#include "kphsrvconfigure.h" // debugprints ON/OFF -#include "phsrvdebuginfo.h" +#include "PhSrvUtils.h" +#include "KPhSrvConfigure.h" // debugprints ON/OFF +#include "PhSrvDebugInfo.h" -#include "mphsrvcomhandnegotiators.h" -#include "cphsrvcomhandrequestmanager.h" -#include "mphsrvmessengernegotiators.h" -#include "cphsrvmessengerrequestmanager.h" +#include "MPhSrvComHandNegotiators.h" +#include "CPhSrvComHandRequestManager.h" +#include "MPhSrvMessengerNegotiators.h" +#include "CPhSrvMessengerRequestManager.h" #include diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/CPhSrvSession.cpp --- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvSession.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvSession.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,11 +18,11 @@ // INCLUDE FILES -#include "cphsrvserver.h" -#include "cphsrvsession.h" -#include "cphsrvsubsessionbase.h" -#include "phsrvsubsessionfactory.h" -#include "phcltclientserver.h" +#include "CPhSrvServer.h" +#include "CPhSrvSession.h" +#include "CPhSrvSubSessionBase.h" +#include "PhSrvSubSessionFactory.h" +#include "PhCltClientServer.h" // CONSTANTS @@ -60,6 +60,7 @@ // Destructor. // ----------------------------------------------------------------------------- // + CPhSrvSession::~CPhSrvSession() { if ( iServer ) @@ -68,9 +69,10 @@ } delete iObjectIx; - - if ( iContainer ) + + if ( iContainer ) { + //coverity[var_deref_model] iServer->RemoveContainer( iContainer ); iContainer = NULL; } @@ -181,18 +183,18 @@ if ( subSession ) { - // Check that the subsession can handle this request - if ( !subSession->PhSrvMessageDecoderCanProcessMessage( function ) ) - { - PanicClient( - aMessage, - EPhCltServerInitiatedPanicInvalidHandle ); - } - else - { - // Get it to process this request - subSession->PhSrvMessageProcessorHandleMessageL( aMessage ); - } + // Check that the subsession can handle this request + if ( !subSession->PhSrvMessageDecoderCanProcessMessage( function ) ) + { + PanicClient( + aMessage, + EPhCltServerInitiatedPanicInvalidHandle ); + } + else + { + // Get it to process this request + subSession->PhSrvMessageProcessorHandleMessageL( aMessage ); + } } } } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionBase.cpp --- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionBase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionBase.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "cphsrvsubsessionbase.h" -#include "cphsrvsession.h" -#include "cphsrvsubsessionnotifier.h" +#include "CPhSrvSubSessionBase.h" +#include "CPhSrvSession.h" +#include "CPhSrvSubSessionNotifier.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionUssd.cpp --- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionUssd.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionUssd.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,17 +17,17 @@ // INCLUDE FILES -#include "cphsrvsubsessionussd.h" +#include "CPhSrvSubSessionUssd.h" #include // ETel -#include "phsrvutils.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" +#include "PhSrvUtils.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" -#include "cphsrvussdmanager.h" +#include "CPhSrvUssdManager.h" -#include +#include // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/PhSrvDebugInfo.cpp --- a/phoneclientserver/phoneserver/Src/Standard/PhSrvDebugInfo.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/PhSrvDebugInfo.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ #include // rdebug #include // file and FS #include // converter -#include "phsrvdebuginfo.h" // this -#include "kphsrvconfigure.h" // defines +#include "PhSrvDebugInfo.h" // this +#include "KPhSrvConfigure.h" // defines // Initialize diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/PhSrvStartUp.cpp --- a/phoneclientserver/phoneserver/Src/Standard/PhSrvStartUp.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/PhSrvStartUp.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDE FILES -#include "phsrvstartup.h" -#include "cphsrvscheduler.h" -#include "cphsrvserver.h" -#include "phsrvutils.h" +#include "PhSrvStartUp.h" +#include "CPhSrvScheduler.h" +#include "CPhSrvServer.h" +#include "PhSrvUtils.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/PhSrvSubSessionFactory.cpp --- a/phoneclientserver/phoneserver/Src/Standard/PhSrvSubSessionFactory.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/PhSrvSubSessionFactory.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,16 +19,16 @@ // INCLUDES -#include "phcltclientserver.h" +#include "PhCltClientServer.h" -#include "phsrvsubsessionfactory.h" -#include "cphsrvsubsessionnotifier.h" -#include "cphsrvsubsessionextcall.h" -#include "cphsrvsubsessionussd.h" -#include "cphsrvsubsessionemergencynum.h" -#include "cphsrvsubsessioncommandhandler.h" -#include "cphsrvsubsessionmessenger.h" -#include "cphsrvsubsessionimagehandler.h" +#include "PhSrvSubSessionFactory.h" +#include "CPhSrvSubSessionNotifier.h" +#include "CPhSrvSubSessionExtCall.h" +#include "CPhSrvSubSessionUssd.h" +#include "CPhSrvSubSessionEmergencyNum.h" +#include "CPhSrvSubSessionCommandHandler.h" +#include "CPhSrvSubSessionMessenger.h" +#include "CPhSrvSubSessionImageHandler.h" // ============================ MEMBER FUNCTIONS =============================== @@ -97,11 +97,11 @@ subSession = CPhSrvSubSessionMessenger::NewL( aSession ); break; - case EPhoneServerImageHandlerSubSessionOpen: subSession = CPhSrvSubSessionImageHandler::NewL( aSession ); break; default: + User::Leave( KErrArgument ); break; } @@ -132,10 +132,10 @@ case EPhoneServerComHandNotifySubSessionOpen: if ( aSID == KPhoneSecureId.iUid #if defined(__WINSCW__) - // To enable module testing using EUnit - || aSID == KEunitExeRunnerId.iUid + // To enable module testing using EUnit + || aSID == KEunitExeRunnerId.iUid #endif // __WINSCW__ - ) + ) { return ETrue; } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/PhSrvUtils.cpp --- a/phoneclientserver/phoneserver/Src/Standard/PhSrvUtils.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/PhSrvUtils.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDES #include -#include "phsrvutils.h" +#include "PhSrvUtils.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhCltExtPhoneDialData.cpp --- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhCltExtPhoneDialData.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhCltExtPhoneDialData.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,7 +18,7 @@ // INCLUDE FILES -#include +#include #include @@ -484,7 +484,7 @@ packageSize+=sizeof( iRedialMaximumDuration.Int() ); if ( iContactLink ) { - packageSize += CalculateDescriptorSize( *iContactLink ); + packageSize += CalculateDescriptorSize( *iContactLink ); } packageSize += CalculateDescriptorSize( iSubAddress ); packageSize += sizeof( iShowNumber); @@ -628,9 +628,9 @@ stream.WriteInt32L( iRedial ); stream.WriteInt32L( iRedialMaximumDuration.Int() ); if ( iContactLink ) - { - WriteDescriptorToStreamL( stream, *iContactLink ); - } + { + WriteDescriptorToStreamL( stream, *iContactLink ); + } stream << iSubAddress; stream.WriteInt32L( iShowNumber ); stream.WriteInt32L( iAllowMatch ); diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequest.cpp --- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequest.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequest.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphsrvcallrequest.h" -#include "phsrvutils.h" +#include "CPhSrvCallRequest.h" +#include "PhSrvUtils.h" // ============================ MEMBER FUNCTIONS =============================== @@ -35,7 +35,7 @@ const RMessage2& aMessage, CPhCltExtPhoneDialData& aArguments, TInt aSubSessionHandle ) - : iPendingRequestPointer( aMessage ), + : iPendingRequestPointer( aMessage ), iSubSessionHandle( aSubSessionHandle ) { iCallArguments = &aArguments; @@ -153,7 +153,7 @@ TInt aSubSessionHandle) { - __ASSERT_ALWAYS( aArguments.TelephoneNumber() == KPhSrvUsedEmergencyCallNumber, + __ASSERT_ALWAYS( aArguments.TelephoneNumber() == KPhSrvUsedEmergencyCallNumber, PhoneServerUtils::Panic( EPhoneServerPanicEmergencyCallRequestFailure ) ); @@ -174,7 +174,7 @@ { return; } - __ASSERT_ALWAYS( + __ASSERT_ALWAYS( iCallArguments->TelephoneNumber() == KPhSrvUsedEmergencyCallNumber, PhoneServerUtils::Panic( EPhoneServerPanicEmergencyCallRequestFailure ) ); diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequestManager.cpp --- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequestManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequestManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,10 +18,10 @@ // INCLUDES -#include "cphsrvcallrequestmanager.h" -#include "cphsrvcallrequest.h" -#include "cphsrvsubsessionbase.h" -#include "phsrvutils.h" +#include "CPhSrvCallRequestManager.h" +#include "CPhSrvCallRequest.h" +#include "CPhSrvSubSessionBase.h" +#include "PhSrvUtils.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.cpp --- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDES -#include "cphsrvemergencyrequestmanager.h" -#include "cphsrvsubsessionbase.h" -#include "phsrvutils.h" +#include "CPhSrvEmergencyRequestManager.h" +#include "CPhSrvSubSessionBase.h" +#include "PhSrvUtils.h" // CONSTANTS @@ -127,11 +127,10 @@ // void CPhSrvEmergencyRequestManager::EmergencyDialCancel() { - // Clear pending request status - iIsRequestPending = EFalse; - if ( !iPendingRequestPointer.IsNull() ) { + // Clear pending request status + iIsRequestPending = EFalse; iPendingRequestPointer.Complete( KErrCancel ); } } diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.cpp --- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,15 +18,15 @@ // INCLUDE FILES -#include "cphsrvsubsessionemergencynum.h" +#include "CPhSrvSubSessionEmergencyNum.h" #include -#include -#include "cphsrvsession.h" -#include "cphsrvserver.h" -#include "mphsrvphoneinterface.h" -#include "mphsrvemergencynumbermanager.h" -#include "mphsrvemergencynegotiators.h" -#include "phsrvdebuginfo.h" +#include +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" +#include "MPhSrvPhoneInterface.h" +#include "MPhSrvEmergencyNumberManager.h" +#include "MPhSrvEmergencyNegotiators.h" +#include "PhSrvDebugInfo.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionExtCall.cpp --- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionExtCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionExtCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,10 +17,10 @@ // INCLUDE FILES -#include "cphsrvsubsessionextcall.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" -#include "mphsrvobjectnegotiators.h" +#include "CPhSrvSubSessionExtCall.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" +#include "MPhSrvObjectNegotiators.h" // Hash mark _LIT( KPhoneHash, "#" ); @@ -93,21 +93,21 @@ break; case EPhoneServerExtCallSubSessionMakeCall: CreateCallArgsL( aMessage ); - // Checks if telephone number contains dtmf string - dtmfNumber = IsDtmfPhoneNumber( iCallArgs->TelephoneNumber()); - if ( !dtmfNumber ) - { - // Checks if telephone number is USSD/SS string - isSSUssd = ( iCallArgs->TelephoneNumber().Right( KPhoneHash().Length() ) == KPhoneHash ); - if ( isSSUssd ) - { - // Capabilities needed if USSD/SS string + // Checks if telephone number contains dtmf string + dtmfNumber = IsDtmfPhoneNumber( iCallArgs->TelephoneNumber()); + if ( !dtmfNumber ) + { + // Checks if telephone number is USSD/SS string + isSSUssd = ( iCallArgs->TelephoneNumber().Right( KPhoneHash().Length() ) == KPhoneHash ); + if ( isSSUssd ) + { + // Capabilities needed if USSD/SS string hasCapNetworkControlAndServices = aMessage.HasCapability( ECapabilityNetworkControl, ECapabilityNetworkServices ); hasCapWriteAndReadDeviceData = aMessage.HasCapability( ECapabilityReadDeviceData, ECapabilityWriteDeviceData ); hasUssdSSCaps = hasCapNetworkControlAndServices && hasCapWriteAndReadDeviceData; - } - } + } + } if ( ( hasCapNetworkServices && !isSSUssd ) || hasUssdSSCaps ) { CmdSubSessionMakeCallL( aMessage ); @@ -160,7 +160,7 @@ // void CPhSrvSubSessionExtCall::CmdSubSessionMakeCallL( const RMessage2& aMessage ) - { + { // Submit a new request to the call manager MPhSrvNegotiatorCall& callNegotiator = PhoneSession().PhoneServer( @@ -194,14 +194,14 @@ void CPhSrvSubSessionExtCall::CreateCallArgsL( const RMessage2& aMessage ) { HBufC8* package = HBufC8::NewLC( aMessage.Int1() ); - TPtr8 calldata( package->Des() ); - PhoneSession().Read( + TPtr8 calldata( package->Des() ); + PhoneSession().Read( aMessage, 0, calldata ); - - iCallArgs = CPhCltExtPhoneDialData::NewL( *package ); - CleanupStack::PopAndDestroy( package ); + + iCallArgs = CPhCltExtPhoneDialData::NewL( *package ); + CleanupStack::PopAndDestroy( package ); } // ----------------------------------------------------------------------------- diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.cpp --- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,13 +18,13 @@ // INCLUDE FILES -#include -#include "cphsrvsubsessionnotifier.h" -#include "cphsrvsession.h" -#include "cphsrvserver.h" -#include "mphsrvemergencynegotiators.h" -#include "mphsrvobjectnegotiators.h" -#include "mphsrvcomhandnegotiators.h" +#include +#include "CPhSrvSubSessionNotifier.h" +#include "CPhSrvSession.h" +#include "CPhSrvServer.h" +#include "MPhSrvEmergencyNegotiators.h" +#include "MPhSrvObjectNegotiators.h" +#include "MPhSrvComHandNegotiators.h" // CONSTANTS // None. @@ -211,7 +211,7 @@ iPendingDialRequestPointer.Complete( KErrNone ); } iHavePendingDialRequestPointer = EFalse; - + } @@ -331,26 +331,26 @@ // void CPhSrvSubSessionNotifier::CmdSubSessionCloneDialDataL( CPhCltExtPhoneDialData& aArgs ) - { - iDialData = CPhCltExtPhoneDialData::NewL(); - iDialData->SetTelephoneNumber( aArgs.TelephoneNumber() ); - iDialData->SetCallType( aArgs.CallType() ); - iDialData->SetNameL( aArgs.Name() ); - iDialData->SetWindowGroup( aArgs.WindowGroup() ); - iDialData->SetRedial( aArgs.Redial() ); - iDialData->SetRedialMaximumDuration( aArgs.RedialMaximumDuration() ); - iDialData->SetContactLinkL( aArgs.ContactLink() ); - iDialData->SetSubAddressL( aArgs.SubAddress() ); - iDialData->SetShowNumber( aArgs.ShowNumber() ); - iDialData->SetAllowMatch( aArgs.AllowMatch() ); - iDialData->SetSATCall( aArgs.SATCall() ); - iDialData->SetEndOtherCalls( aArgs.EndOtherCalls() ); - iDialData->SetBearerL( aArgs.Bearer() ); - iDialData->SetSendKeyPressed( aArgs.SendKeyPressed() ); - iDialData->SetInitiateCall( aArgs.InitiateCall() ); - iDialData->SetServiceId( aArgs.ServiceId() ); - iDialData->SetUUIL( aArgs.UUI() ); - } + { + iDialData = CPhCltExtPhoneDialData::NewL(); + iDialData->SetTelephoneNumber( aArgs.TelephoneNumber() ); + iDialData->SetCallType( aArgs.CallType() ); + iDialData->SetNameL( aArgs.Name() ); + iDialData->SetWindowGroup( aArgs.WindowGroup() ); + iDialData->SetRedial( aArgs.Redial() ); + iDialData->SetRedialMaximumDuration( aArgs.RedialMaximumDuration() ); + iDialData->SetContactLinkL( aArgs.ContactLink() ); + iDialData->SetSubAddressL( aArgs.SubAddress() ); + iDialData->SetShowNumber( aArgs.ShowNumber() ); + iDialData->SetAllowMatch( aArgs.AllowMatch() ); + iDialData->SetSATCall( aArgs.SATCall() ); + iDialData->SetEndOtherCalls( aArgs.EndOtherCalls() ); + iDialData->SetBearerL( aArgs.Bearer() ); + iDialData->SetSendKeyPressed( aArgs.SendKeyPressed() ); + iDialData->SetInitiateCall( aArgs.InitiateCall() ); + iDialData->SetServiceId( aArgs.ServiceId() ); + iDialData->SetUUIL( aArgs.UUI() ); + } // ----------------------------------------------------------------------------- // CPhSrvSubSessionNotifier::CmdSubSessionDialDataL diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/cphcltdialdata.cpp --- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/cphcltdialdata.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/cphcltdialdata.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ // INCLUDE FILES #include -#include "cphcltextphonedialdata.h" // For correct default values +#include "cphcltextphonedialdata.h" // For correct default values // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdManager.cpp --- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdManager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdManager.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -16,20 +16,26 @@ */ // INCLUDE FILES -#include "cphsrvussdmanager.h" -#include "phsrvutils.h" -#include "cphsrvussdsendhandler.h" -#include "cphsrvussdreceivehandler.h" -#include "cphsrvussdnotifynwrelease.h" -#include "cphsrvresourcemanager.h" -#include "cphsrvussdreplytimer.h" -#include "mphsrvussdmessagesentobserver.h" -#include "mphsrvphoneinterface.h" -#include "cphsrvussdsessioncancelwaiter.h" +#include "CPhSrvUssdManager.h" +#include "PhSrvUtils.h" +#include "CPhSrvUssdSendHandler.h" +#include "CPhSrvUssdReceiveHandler.h" +#include "CPhSrvUssdNotifyNWRelease.h" +#include "CPhSrvResourceManager.h" +#include "CPhSrvUssdReplyTimer.h" +#include "MPhSrvUssdMessageSentObserver.h" +#include "MPhSrvPhoneInterface.h" +#include "CPhSrvUssdSessionCancelWaiter.h" +#include +#include +#include +#include #include #include #include +#include +#include #include #include #include @@ -38,26 +44,32 @@ #include #include -#include -#include -#include -#include "phsrvdebuginfo.h" +#include +#include +#include +#include +#include "PhSrvDebugInfo.h" #include + +#include #include +#include #include +//RM-RIM 417-66528 +#include // CONSTANTS const TInt KPhSrvDefaultValue = 0x00000000; -// See SharedDataKeysVariant.h or NcnListInternalPSKeys.h -// const TInt KPhSrvUssdNoTone = 0; +// const TInt KPhSrvUssdNoTone = 0; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h +const TInt KPhSrvUssdTone = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h + // const TInt KPhSrvUssdTimeOutObserverGranularity = 2; // const TInt KPhSrvUssdSentMessageObserverGranularity = 2; -// See KUssdSecureId in phcltclientserver.h -//const TInt KPhSrvUssdAppUID = 0x10005955; +const TInt KPhSrvUssdAppUID = 0x10005955; const TInt KPhSrvUssdMessageQueryInterval = 500000; // 0.5 sec -//const TInt KPhSrvUssdNoteExitPeriod = 500000; // 0.5 sec +const TInt KPhSrvUssdNoteExitPeriod = 500000; // 0.5 sec // const TUint KPhSrvUssdDefaultDCS = 0x0f; // 00001111 @@ -82,24 +94,6 @@ const TUint KPhSrvUssdDcsMessageHandlingAlphabet8Bit = 0xf4; // 1111x1xx const TInt KPhrUssdNotifyArraySize = 1; -// Refers to HbPopup::NoDismiss = 0 -const TInt KPhSrvUssdPopupDismissPolicy = 0; -// The time out only for testing, from CPhSrvUssdReplyTimer.cpp -const TUint KPhSrvUssdTimeout = 300000000; - -// Use QT style localization -_LIT(KUssdLocFilename, "ussd_"); -_LIT(KCommonLocFilename, "common_"); -_LIT(KLocPath, "z:\\resource\\qt\\translations"); -_LIT(KUssdReply, "txt_ussd_button_reply"); // Reply -_LIT(KUssdExit, "txt_ussd_button_exit"); // Exit -_LIT(KUssdNext, "txt_ussd_button_next"); //Next -_LIT(KUssdYes, "txt_common_button_yes"); // Yes -_LIT(KUssdNo, "txt_common_button_no"); // No -_LIT(KUssdTitle, "txt_ussd_title_message"); // Message -_LIT(KUssdDone, "txt_ussd_dpopinfo_done"); // Done -_LIT(KUssdConfirm, "txt_ussd_info_there_are_still_unread_notifications"); - // MACROS #define _DPRINT_FLAGS() \ @@ -387,10 +381,9 @@ :CActive( EPriorityLow ), iFsSession( aFsSession ), iResourceManager( aResourceManager ), - iDeviceDialog( NULL ), iDCS ( KPhCltDcsUnknown ), - iReturnResultPckg ( iReturnResult ), - iTextBuffer ( NULL ) + iReturnResultPckg ( iReturnResult ) + { CActiveScheduler::Add( this ); } @@ -405,7 +398,7 @@ // CPhSrvUssdManager::~CPhSrvUssdManager() { - _DPRINT( 4, "PhSrv.~CPhSrvUssdManager.start" ); + _DPRINT( 4, "PhSrv.~CPhSrvUssdManager.start" ); // debug print delete iUssdSendHandler; @@ -420,12 +413,9 @@ Cancel(); iTimer.Close(); - - delete iTextBuffer; - iTextBuffer = NULL; - - delete iDeviceDialog; - iDeviceDialog = NULL; + + delete iGlobalMsgQuery; + iGlobalMsgQuery = NULL; if ( iNotifyArray ) { @@ -442,10 +432,17 @@ iFsSession.Close(); iMobileUssdMessaging.Close(); + + delete iMeQuHeaderText; + iMeQuHeaderText = NULL; delete iMoAckCallback; - _DPRINT( 4, "PhSrv.~CPhSrvUssdManager.end" ); + // RM-RIM 417-66528 + delete iUssdExtnInterface; + iUssdExtnInterface = NULL; + + _DPRINT( 4, "PhSrv.~CPhSrvUssdManager.end" ); // debug print } @@ -458,10 +455,7 @@ // void CPhSrvUssdManager::ConstructL( MPhSrvPhoneInterface& aPhoneInterface ) { - _DPRINT( 4, "PhSrv.ConstructL.Start" ); - const TBool textResolver = HbTextResolverSymbian::Init( - KUssdLocFilename, KLocPath ); - _DDPRINT( 4, "PhSrv.ConstructL.ussd loc:", textResolver ); + _DPRINT( 4, "PhSrv.ConstructL.Start" ); // debug print User::LeaveIfError( iTimer.CreateLocal() ); User::LeaveIfError( iMobileUssdMessaging.Open( aPhoneInterface.PhSrvMobilePhone() ) ); @@ -497,10 +491,18 @@ User::LeaveIfError( GetTelephonyVariantData() ); - _DDPRINT( 4, "PhSrv.ConstructL.iSatCanceled ", iSatCanceled ); + iMeQuHeaderText = iResourceManager.ReadResourceLC( + R_PHSRV_USSD_MESQUERY_MESSAGE); + CleanupStack::Pop( iMeQuHeaderText ); + + _DDPRINT( 4, "PhSrv.ConstructL.iSatCanceled ", iSatCanceled ); _DDPRINT( 4, "PhSrv.ConstructL.iShowDone ", iShowDone ); iNotifyArray = new( ELeave ) CDesCArrayFlat( KPhrUssdNotifyArraySize ); - _DPRINT( 4, "PhSrv.ConstructL.End" ); + + // RM-RIM 417-66528 + TRAP_IGNORE(iUssdExtnInterface = CUssdExtensionInterface::NewL()); + _DPRINT( 4, "PhSrv.ConstructL.iUssdExtnInterface Created"); + _DPRINT( 4, "PhSrv.ConstructL.End" ); // debug print } @@ -515,20 +517,20 @@ { // If SendHandler is not created, first check that MO Ussd // is supported by the TSY. - _DPRINT( 4, "PhSrv.SendHandlerL.Start" ); + _DPRINT( 4, "PhSrv.SendHandlerL.Start" ); // debug print if ( iUssdSendHandler == NULL ) { - _DPRINT( 4, "PhSrv.SendHandlerL.iUssdSendHandler.NULL" ); + _DPRINT( 4, "PhSrv.SendHandlerL.iUssdSendHandler.NULL" ); // debug print RMobileUssdMessaging::TMobileUssdCapsV1 caps; RMobileUssdMessaging::TMobileUssdCapsV1Pckg pckgCaps( caps ); User::LeaveIfError( iMobileUssdMessaging.GetCaps( pckgCaps ) ); - _DPRINT( 4, "PhSrv.SendHandlerL.iMobileUssdMessaging.GetCaps" ); + _DPRINT( 4, "PhSrv.SendHandlerL.iMobileUssdMessaging.GetCaps" ); // debug print if ( ( caps.iUssdTypes & RMobileUssdMessaging::KCapsMOUssd ) == 0 || ( caps.iUssdFormat & RMobileUssdMessaging::KCapsPackedString ) == 0 ) { - _DPRINT( 4, "PhSrv.SendHandlerL.KErrNotSupported" ); + _DPRINT( 4, "PhSrv.SendHandlerL.KErrNotSupported" ); // debug print User::Leave( KErrNotSupported ); } @@ -538,7 +540,7 @@ iMobileUssdMessaging, *iPhoneInterface ); } - _DPRINT( 4, "PhSrv.SendHandlerL.End" ); + _DPRINT( 4, "PhSrv.SendHandlerL.End" ); // debug print return *iUssdSendHandler; } @@ -555,15 +557,25 @@ RMobileUssdMessaging::TMobileUssdAttributesV1& aMsgAttribute, MPhSrvUssdMessageSentObserver& aObserver ) { - _DPRINT( 4, "PhSrv.SendUssdL.Start ######" ); + _DPRINT( 4, "PhSrv.SendUssdL.Start ######" ); // debug print _DPRINT_FLAGS(); + //417-66528 + if (iUssdExtnInterface) + { + if(!iUssdExtnInterface->ValidateUssdMsgSending(aMsgData,aMsgAttribute)) + { + // invalid attempt to send USSD message. Show the note + User::Leave( KErrAccessDenied ); + } + } + if ( iObserver && iNetworkReleased ) { // Network has been released but the previous send request is still alive. // Cancel the pervious send operation, complete the old request with error // and clean up the pointer. - _DPRINT( 4, "PhSrv.SendUssdL.Error.Complete.Existing" ); + _DPRINT( 4, "PhSrv.SendUssdL.Error.Complete.Existing" ); // debug print if ( iUssdSendHandler ) { iUssdSendHandler->Cancel(); @@ -574,7 +586,7 @@ if ( iObserver || iSendingAck ) { - _DPRINT( 4, "PhSrv.SendUssdL.KErrInUse" ); + _DPRINT( 4, "PhSrv.SendUssdL.KErrInUse" ); // debug print // Other client is using the service. User::Leave( KErrInUse ); } @@ -582,14 +594,14 @@ // Check that message type is set if( ( aMsgAttribute.iFlags & RMobileUssdMessaging::KUssdMessageType ) == 0 ) - _DPRINT( 4, "PhSrv.SendUssdL.KUssdMessageType.0" ); + _DPRINT( 4, "PhSrv.SendUssdL.KUssdMessageType.0" ); // debug print { // Mesasge type not set -> Set it. aMsgAttribute.iFlags |= RMobileUssdMessaging::KUssdMessageType; if ( NetworkWaitingForAnAnswer() ) { // Network is waiting for an answer - _DPRINT( 4, "PhSrv.SendUssdL.EUssdMOReply" ); // debug print + _DPRINT( 4, "PhSrv.SendUssdL.EUssdMOReply" ); // debug print aMsgAttribute.iType = RMobileUssdMessaging::EUssdMOReply; } else @@ -602,7 +614,7 @@ RMobileUssdMessaging::TMobileUssdAttributesV1Pckg attribs( aMsgAttribute ); iShowDone = ETrue; _DPRINT( 4, "PhSrv.SendUssdL.iShowDone.ETrue" ); - _DPRINT( 4, "PhSrv.SendUssdL.Send" ); + _DPRINT( 4, "PhSrv.SendUssdL.Send" ); // debug print SendHandlerL().SendUssdL( aMsgData , attribs ); iObserver = &aObserver; // Not closing nor closed anymore @@ -617,7 +629,7 @@ _DPRINT( 4, "PhSrv.SendUssdCancel.TimerStop" ); // debug print iUssdReplyTimer->Stop(); } - _DPRINT( 4, "PhSrv.SendUssdL.End" ); + _DPRINT( 4, "PhSrv.SendUssdL.End" ); // debug print } // ----------------------------------------------------------------------------- @@ -637,7 +649,7 @@ // void CPhSrvUssdManager::SendUssdCancel() { - _DPRINT( 4, "PhSrv.SendUssdCancel.Start #######" ); + _DPRINT( 4, "PhSrv.SendUssdCancel.Start #######" ); // debug print // Ack sending should not be canceled unless it's about terminating // the whole session @@ -656,7 +668,7 @@ iObserver = NULL; SetActiveIfPendingNotificationsExist(); - _DPRINT( 4, "PhSrv.SendUssdCancel.End" ); + _DPRINT( 4, "PhSrv.SendUssdCancel.End" ); // debug print } // ----------------------------------------------------------------------------- @@ -695,14 +707,14 @@ // complete SAT if needed if ( aError < KErrNone ) { - + // debug print _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleSendEventL.CompleteSat" ); CompleteSatL( NULL, aError ); } if ( iObserver ) { - + // debug print _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleSendEventL.Observer" ); iObserver->UssdMessageSentObserverHandleResult( aError ); @@ -717,7 +729,6 @@ _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleSendEventL.End" ); } - // ----------------------------------------------------------------------------- // CPhSrvUssdManager::UssdAppTaskExists // @@ -733,7 +744,7 @@ _DPRINT( 4, "PhSrv.UssdAppTaskExists.wsSession.Connect" ); CleanupClosePushL(wsSession); TApaTaskList tasklist(wsSession); - TApaTask task = tasklist.FindApp( KUssdSecureId ); + TApaTask task = tasklist.FindApp(TUid::Uid(KPhSrvUssdAppUID)); ret = task.Exists(); CleanupStack::PopAndDestroy(); @@ -760,7 +771,7 @@ if ( aError != KErrNone ) { TurnLightsOn(); //Ensure lights on - + // debug print _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleReceivedEventL.ShErNote" ); ShowErrorNoteL( aError ); } @@ -777,6 +788,9 @@ // ----------------------------------------------------------------------------- // CPhSrvUssdManager::UssdHandleReceivedEventL +// +// +// // ----------------------------------------------------------------------------- // void CPhSrvUssdManager::UssdHandleReceivedEventL( @@ -786,15 +800,15 @@ // This always is either ongoing transaction or starting a new based // on incoming message, mark transaction to be open. iNetworkReleased = EFalse; - + // 2. Complete Send with some positive value. - if ( iObserver ) + if ( iObserver ) { - + // debug print _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.Observer" ); UssdNetworkObserverHandleSendEventL( 1 ); // some positive value } - + if ( aMsgAttributes.iFlags&RMobileUssdMessaging::KUssdMessageType && aMsgAttributes.iType == RMobileUssdMessaging::EUssdMTRequest ) { @@ -816,6 +830,14 @@ { iReceivedMessage = iDecodedMessage; } + // 4. Invoke UssdExtensionPlugin + // 417-66528 + TBool isResponseValidated = EFalse; + if (iUssdExtnInterface) + { + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.InvokeExtension" ); + isResponseValidated = iUssdExtnInterface->ValidateUssdResponse(aMsgData); + } // 5. Show note. // debug print _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.Note" ); @@ -824,77 +846,81 @@ { if ( !ShowNotesL() ) { - + // debug print _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.SAtReturn" ); return; } } - + //6. Check if the response is valid for the extension + //RM-RIM 417-66528 + if (iUssdExtnInterface && isResponseValidated) + PorcessReceivedMessageInExtesnionL(aMsgData, aMsgAttributes); + else + ProcessReceivedMessageL(aMsgData, aMsgAttributes); + + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.Editor" ); + if (aMsgAttributes.iType == RMobileUssdMessaging::EUssdMTRequest + && UssdAppTaskExistsL()) + { + iEmptyEditor = ETrue; + } _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.End" ); + } +// ----------------------------------------------------------------------------- +// CPhSrvUssdManager::ProcessReceivedMessageL +// +// +// +// ----------------------------------------------------------------------------- +// +void CPhSrvUssdManager::ProcessReceivedMessageL(const TDes8& /*aMsgData*/, + const RMobileUssdMessaging::TMobileUssdAttributesV1& aMsgAttributes) + { // empty string is handled as ok message - if ( !iDecodedMessage.Length() ) + if (!iDecodedMessage.Length()) { TurnLightsOn(); //Ensure lights on - + + // debug print _DPRINT( 4, - "PhSrv.UssdHandleReceivedEventL.EmptyString" ); - + "PhSrv.UssdHandleReceivedEventL.EmptyString" ); ShowDoneNoteL(); - - + // debug print _DPRINT( 4, - "PhSrv.UssdHandleReceivedEventL.EmptyString.OK" ); + "PhSrv.UssdHandleReceivedEventL.EmptyString.OK" ); } else { _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.String" ); - iNotifyMessage = ( aMsgAttributes.iType == RMobileUssdMessaging::EUssdMTNotify ); - _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iNotifyMessage: ", iNotifyMessage ); + iNotifyMessage = (aMsgAttributes.iType + == RMobileUssdMessaging::EUssdMTNotify); + _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iNotifyMessage: ", iNotifyMessage ); _DDPRINT( 4, "PhSrv.UssdNOHREventL.iNotifyMessage: ", iNotifyMessage ); - iMsgTypeReply = ( aMsgAttributes.iType == RMobileUssdMessaging::EUssdMTReply ); + iMsgTypeReply = (aMsgAttributes.iType + == RMobileUssdMessaging::EUssdMTReply); _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iMsgTypeReply: ", iMsgTypeReply ); - - if ( iNotifyMessage ) + + if (iNotifyMessage) { // need to send an MO ack - iAcksToBeSent ++; + iAcksToBeSent++; } - - if ( !iDeviceDialog ){ - iDeviceDialog = CHbDeviceMessageBoxSymbian::NewL( - CHbDeviceMessageBoxSymbian::EInformation ); - iDeviceDialog->SetObserver( this ); - iDeviceDialog->SetTimeout( KPhSrvUssdTimeout ); - iDeviceDialog->SetDismissPolicy ( KPhSrvUssdPopupDismissPolicy ); - iDeviceDialog->SetIconVisible(EFalse); - - // Show left key with empty string accoring to ui concept - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::EAcceptButton, EFalse ); - // Show Exit Key always - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::ERejectButton, ETrue ); - iDeviceDialog->SetButtonTextL( - CHbDeviceMessageBoxSymbian::ERejectButton, - LoadDefaultString( KUssdExit ) ); - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.Exit" ); - } - - if ( iNotifyMessage || iMsgTypeReply ) + + if (iNotifyMessage || iMsgTypeReply) { //This is for reply message in notifyarray iNotifyMessage = ETrue; _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iNotifyMessage: ", iNotifyMessage ); //Notify added to array - iNotifyArray->AppendL( iReceivedMessage ); + iNotifyArray->AppendL(iReceivedMessage); - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.AppendL" ); - UpdateNotifyMessageL(); + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.AppendL" ); // debug print + UpdateNotifyMessage(); - if ( !iSendRelease && NotifyCount() <= 1 ) + if (!iSendRelease && NotifyCount() <= 1) { - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.!SendRelease.Cancel" ); + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.!SendRelease.Cancel" ); // debug print Cancel(); } } @@ -902,61 +928,79 @@ { // New message deletes old message, i.e. Cancel existing query. Cancel(); - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.NewAnswerable" ); + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.NewAnswerable" ); // debug print } + CreateGlobalMessageQueryL(aMsgAttributes); + AsyncProcessMoAcks(); + } + _DPRINT( 4, "PhSrv.ProcesdReceivedMessageL.End" ); + } - // Remove Reply key - if( !( aMsgAttributes.iFlags & RMobileUssdMessaging::KUssdMessageType ) - || aMsgAttributes.iType != RMobileUssdMessaging::EUssdMTRequest ) +// ----------------------------------------------------------------------------- +// CPhSrvUssdManager::PorcessReceivedMessageInExtesnionL +// +// +// +// ----------------------------------------------------------------------------- +// +void CPhSrvUssdManager::PorcessReceivedMessageInExtesnionL( + const TDes8& /*aMsgData*/, + const RMobileUssdMessaging::TMobileUssdAttributesV1& aMsgAttributes) + { + TInt errfromextension = KErrNone; + // empty string is handled as ok message + if (!iDecodedMessage.Length()) + { + // debug print + _DPRINT( 4, + "PhSrv.UssdHandleReceivedEventL.EmptyString" ); + //RM-RIM 417-66528 + TRAP_IGNORE(iUssdExtnInterface->ProcessReceivedUssdL(iDecodedMessage, errfromextension)); + // debug print + _DPRINT( 4, + "PhSrv.UssdHandleReceivedEventL.EmptyString.OK" ); + } + else + { + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.String" ); + iNotifyMessage = (aMsgAttributes.iType + == RMobileUssdMessaging::EUssdMTNotify); + _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iNotifyMessage: ", iNotifyMessage ); + _DDPRINT( 4, "PhSrv.UssdNOHREventL.iNotifyMessage: ", iNotifyMessage ); + iMsgTypeReply = (aMsgAttributes.iType + == RMobileUssdMessaging::EUssdMTReply); + _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iMsgTypeReply: ", iMsgTypeReply ); + + if (iNotifyMessage) { - // Remove Answer key - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::EAcceptButton, EFalse ); - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.NoAnswer" ); - } - // Show Reply key - else - { - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue ); - iDeviceDialog->SetButtonTextL( - CHbDeviceMessageBoxSymbian::EAcceptButton, - LoadDefaultString( KUssdReply ) ); - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.WithAnswer" ); + // need to send an MO ack + iAcksToBeSent++; } - - _DPRINT( 4, - "PhSrv.UssdHandleReceivedEventL.String.Middle" ); - - // Play the USSD tone if needed. Logically should be in RunL, but here - // to give better balancing with voice and visible message. - // <-- QT PHONE START--> - /* - if ( IsTelephonyFeatureSupported( KTelephonyLVFlagUssdTone ) ) + if (iNotifyMessage || iMsgTypeReply) { - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.PlayTone" ); - PlayUssdTone(); + //This is for reply message in notifyarray + iNotifyMessage = ETrue; + _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iNotifyMessage: ", iNotifyMessage ); + if (!iSendRelease && NotifyCount() <= 1) + { + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.!SendRelease.Cancel" ); // debug print + Cancel(); + } } - */ - // <-- QT PHONE END--> - // Launch the new message query - if ( !IsActive() ) + else { - iLaunchGMQ = ETrue; - iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval ); - SetActive(); + // New message deletes old message, i.e. Cancel existing query. + Cancel(); + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.NewAnswerable" ); // debug print } - AsyncProcessMoAcks(); + TInt errfromextension = KErrNone; + ProcessMoAcksL(); + iLaunchGMQ = EFalse; + TRAP_IGNORE(iUssdExtnInterface->ProcessReceivedUssdL(iDecodedMessage, errfromextension)); + _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.Extn.ProcessReceivedUssdL.ErrCode", errfromextension); } - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.Editor" ); - if( aMsgAttributes.iType == RMobileUssdMessaging::EUssdMTRequest && UssdAppTaskExistsL() ) - { - iEmptyEditor = ETrue; - } - _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.End" ); } - // ----------------------------------------------------------------------------- // CPhSrvUssdManager::RestartReplyTimerL // @@ -992,31 +1036,31 @@ void CPhSrvUssdManager::UssdNetworkObserverHandleNotifyNWReleaseL( const RMobilePhone::TMobilePhoneSendSSRequestV3 & aReturnResult, TInt aError ) - { - _DDPRINT( 4, "PhSrv.UssdNotifyNWRelease ##### ", aError ); // debug print + { + _DDPRINT( 4, "PhSrv.UssdNotifyNWRelease ##### ", aError ); // debug print _DPRINT_FLAGS(); - TBool showNotes = ShowNotesL(); - iNetworkReleased = ETrue; - iSendingAck = EFalse; + TBool showNotes = ShowNotesL(); + iNetworkReleased = ETrue; + iSendingAck = EFalse; iSendRelease = EFalse; - iAcksToBeSent = 0; - - if ( iHavePendingSatMessagePointer ) - { - iReturnResult = aReturnResult; - if ( !iSatCanceled ) - { - CompleteSatL(&iReceivedMessage, aError ); - _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.CompleteSat" ); - } - } - if ( iUssdReplyTimer && iUssdReplyTimer->IsTimerActive() ) - { - _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.Timer.Stop" ); - iUssdReplyTimer->Stop(); - Cancel(); - CheckArray(); - } + iAcksToBeSent = 0; + + if ( iHavePendingSatMessagePointer ) + { + iReturnResult = aReturnResult; + if ( !iSatCanceled ) + { + CompleteSatL(&iReceivedMessage, aError ); + _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.CompleteSat" ); // debug print + } + } + if ( iUssdReplyTimer && iUssdReplyTimer->IsTimerActive() ) + { + _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.Timer.Stop" ); + iUssdReplyTimer->Stop(); + Cancel(); + CheckArray(); + } if ( showNotes && iShowDone ) { ShowDoneNoteL(); @@ -1026,14 +1070,19 @@ // if we are sending ack, it can be canceled. iUssdSendHandler->Cancel(); } - + //417-66528 + //Notify Extension on NWRelease + if(iUssdExtnInterface) + { + iUssdExtnInterface->NotifyNWError(aError); + } iSatCanceled = EFalse; _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.iSatCanceled.EFalse" ); iShowDone = EFalse; _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.Ending" ); _DPRINT_FLAGS(); _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.End" ); - } + } // ----------------------------------------------------------------------------- // CPhSrvUssdManager::ShowDoneNoteL @@ -1044,8 +1093,11 @@ { _DDPRINT( 4, "PhSrv.ShowDoneNoteL.iShowDone", iShowDone ); // Show global confirmation note "Done" - CHbDeviceMessageBoxSymbian::InformationL( - LoadDefaultString( KUssdDone ) ); + HBufC* noteText = iResourceManager.ReadResourceLC( R_PHSRV_TEXT_DONE ); + CAknGlobalNote* note = CAknGlobalNote::NewLC(); + note->ShowNoteL( EAknGlobalConfirmationNote, *noteText ); + CleanupStack::PopAndDestroy( note ); + CleanupStack::PopAndDestroy( noteText ); iShowDone = EFalse; } @@ -1063,16 +1115,14 @@ return; } - // Show specific error message CTextResolver* textResolver = CTextResolver::NewLC(); + HBufC* buffer = textResolver->ResolveErrorString( aError ).AllocLC(); - CHbDeviceMessageBoxSymbian::InformationL( buffer ->Des() ); + CAknGlobalNote* note = CAknGlobalNote::NewLC(); + note->ShowNoteL( EAknGlobalErrorNote, *buffer ); - CleanupStack::PopAndDestroy( buffer ); - CleanupStack::PopAndDestroy( textResolver ); - - + CleanupStack::PopAndDestroy( 3 ); // note, buffer, textResolver _DPRINT( 4, "PhSrv.ShowErrorNoteL.End" ); return; } @@ -1265,7 +1315,7 @@ if ( aError == KErrNone && IsActive() && - iDeviceDialog ) + iGlobalMsgQuery ) { Cancel(); // Terminates USSD session. @@ -1281,88 +1331,12 @@ // ----------------------------------------------------------------------------- -// CPhSrvUssdManager::MessageBoxClosed -// ----------------------------------------------------------------------------- -// -void CPhSrvUssdManager::MessageBoxClosed( - const CHbDeviceMessageBoxSymbian* aMessageBox, - CHbDeviceMessageBoxSymbian::TButtonId aButton) - { - _DPRINT( 4, "PhSrv.MsgClose.Start" ); - // ussd device dialog observer callback function - TPtrC leftBtn = aMessageBox->ButtonText( - CHbDeviceMessageBoxSymbian::EAcceptButton ); - TPtrC rightBtn = aMessageBox->ButtonText( - CHbDeviceMessageBoxSymbian::ERejectButton ); - - TInt err = KErrNone; - // Click Yes on Confirmation note (Yes, No) - if ( !leftBtn.Compare( - LoadDefaultString( KUssdYes ) ) && - ( CHbDeviceMessageBoxSymbian::EAcceptButton == aButton ) ) - { - _DPRINT( 4, "PhSrv.MsgClose.SK.Yes" ); - iClearArray = EFalse; - iNotifyArray->Reset(); - TryCloseSession(); - } - // Click "No" on Confirmation note (Yes, No) - else if ( !rightBtn.Compare( - LoadDefaultString( KUssdNo ) ) && - ( CHbDeviceMessageBoxSymbian::ERejectButton == aButton ) ) - { - _DPRINT( 4, "PhSrv.MsgClose.SK.No" ); - iClearArray = EFalse; - iNotifyMessage = ETrue; // for removing the yes/no query - CheckArray(); - TryCloseSession(); - } - // Click "Next" on Notification note (Next, Exit) - else if ( !leftBtn.Compare( - LoadDefaultString( KUssdNext ) ) && - ( CHbDeviceMessageBoxSymbian::EAcceptButton == aButton ) ) - { - _DPRINT( 4, "PhSrv.MsgClose.SK.Next" ); - CheckArray(); - TryCloseSession(); - } - // Click "Exit" on Notification note (Next, Exit or only Exit) - else if ( !rightBtn.Compare( - LoadDefaultString( KUssdExit ) ) && - ( CHbDeviceMessageBoxSymbian::ERejectButton == aButton ) ) - { - TRAP( err, ClearArrayL() ); - _DDPRINT( 4, "PhSrv.MsgClose.SK.Clear.%d", err ); - TryCloseSession(); - _DPRINT( 4, "PhSrv.MsgClose.SK.Exit" ); - } - // Click "Reply" on Message note (Reply, Exit) - else if ( !leftBtn.Compare( - LoadDefaultString( KUssdReply ) ) && - ( CHbDeviceMessageBoxSymbian::EAcceptButton == aButton ) ) - { - // Answer - iStartEditor = ETrue; - iShowDone = EFalse; - // Start the USSD editor now. - TRAP( err, RequestStartEditingL() ); - _DDPRINT( 4, "PhSrv.MsgClose.RequestStartEditingL.%d", err ); - } - else - { - _DPRINT( 4, "PhSrv.MsgClose.SK.Default" ); - } - - _DPRINT( 4, "PhSrv.MsgClose.End" ); - } - -// ----------------------------------------------------------------------------- // CPhSrvUssdManager::RunL // ----------------------------------------------------------------------------- // void CPhSrvUssdManager::RunL() { - _DPRINT( 4, "PhSrv.RunL.Start" ); + _DPRINT( 4, "PhSrv.RunL.Start" ); // debug print ProcessMoAcksL(); @@ -1376,11 +1350,122 @@ else { iStartEditor = EFalse; - // update device dialog + + TInt key = iStatus.Int(); + if ( key == EEikBidOk ) // OK key + { + if ( NetworkWaitingForAnAnswer() ) + { + key = EAknSoftkeyShow; + } + else + { + key = EAknSoftkeyExit; + } + } + + switch( key ) + { + case EAknSoftkeyShow: + { + // Answer + iStartEditor = ETrue; + iShowDone = EFalse; + // Start the USSD editor now. + _DPRINT( 4, "PhSrv.RunL.RequestStartEditingL" ); // debug print + RequestStartEditingL(); + break; + } + case EAknSoftkeyYes: + { + _DPRINT( 4, "PhSrv.RunL.SK.Yes" ); + iClearArray = EFalse; + iNotifyArray->Reset(); + TryCloseSession(); + break; + } + case EAknSoftkeyCancel: + _DPRINT( 4, "PhSrv.RunL.SK.Cancel" ); + if ( iHavePendingSatMessagePointer ) + { + iSatCanceled = ETrue; + CompleteSatL( &iReceivedMessage, KErrCancel ); + _DPRINT( 4, "PhSrv.RunL.CompleteSatL" ); + } + // fall through. + case EAknSoftkeyExit: + _DPRINT( 4, "PhSrv.RunL.SK.Exit" ); + ClearArrayL(); + TryCloseSession(); + break; + case EAknSoftkeyBack: + _DPRINT( 4, "PhSrv.RunL.SK.Back" ); + ClearArrayL(); + TryCloseSession(); + break; + case EAknSoftkeyNo: + _DPRINT( 4, "PhSrv.RunL.SK.No" ); + iClearArray = EFalse; + iNotifyMessage = ETrue; // for removing the yes/no query + // fall through. + case EAknSoftkeyNext: + _DPRINT( 4, "PhSrv.RunL.SK.Next" ); + CheckArray(); + TryCloseSession(); + break; + default: + _DPRINT( 4, "PhSrv.RunL.SK.Default" ); + break; + } _DPRINT( 4, "PhSrv.RunL.End" ); // debug print } } +// RM-RIM 417-66528 +// ----------------------------------------------------------------------------- +// CPhSrvUssdManager::CreateGlobalMessageQueryL +// ----------------------------------------------------------------------------- +// +void CPhSrvUssdManager::CreateGlobalMessageQueryL( + const RMobileUssdMessaging::TMobileUssdAttributesV1& aMsgAttributes) + { + if (!iGlobalMsgQuery) + { + iGlobalMsgQuery = CAknGlobalMsgQuery::NewL(); + } + // Delay after message query so that application execution order will + // be correct. + iGlobalMsgQuery->SetExitDelay(KPhSrvUssdNoteExitPeriod); + + TInt softkeys = R_AVKON_SOFTKEYS_USSD_ANSWER_EXIT__ANSWER; + if (!(aMsgAttributes.iFlags & RMobileUssdMessaging::KUssdMessageType) + || aMsgAttributes.iType != RMobileUssdMessaging::EUssdMTRequest) + { + softkeys = R_AVKON_SOFTKEYS_EXIT; + } + + // Set timer that lauches Global MessageQuery after time interval. + iSoftkeys = softkeys; + + // debug print + _DPRINT( 4, + "PhSrv.UssdHandleReceivedEventL.String.Middle" ); + + // Play the USSD tone if needed. Logically should be in RunL, but here + // to give better balancing with voice and visible message. + if (IsTelephonyFeatureSupported(KTelSrvLVFlagUssdTone)) + { + _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.PlayTone" ); + PlayUssdTone(); + } + // Launch the new message query + if (!IsActive()) + { + iLaunchGMQ = ETrue; + iTimer.After(iStatus, KPhSrvUssdMessageQueryInterval); + SetActive(); + } + } // ----------------------------------------------------------------------------- // CPhSrvUssdManager::LaunchGlobalMessageQueryL // ----------------------------------------------------------------------------- @@ -1389,58 +1474,22 @@ { _DPRINT( 4, "PhSrv.LGMQ.start" ); _DPRINT_FLAGS(); - if ( iNotifyMessage ) { _DDPRINT( 4, "PhSrv.LGMQ.NotifyMessage", iNotifyMessage ); iNotifyMessage = ETrue; TInt count = NotifyCount(); - //check softkey in avkon.rss if ( count > 1 ) { - // Next, Exit - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue ); - iDeviceDialog->SetButtonTextL( - CHbDeviceMessageBoxSymbian::EAcceptButton, - LoadDefaultString( KUssdNext ) ); - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::ERejectButton, ETrue ); - iDeviceDialog->SetButtonTextL( - CHbDeviceMessageBoxSymbian::ERejectButton, - LoadDefaultString( KUssdExit ) ); - _DPRINT( 4, "PhSrv.LGMQ.Next&Exit" ); + iSoftkeys = R_AVKON_SOFTKEYS_NEXT_EXIT__NEXT; } else { - // Only Exit - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::EAcceptButton, EFalse ); - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::ERejectButton, ETrue ); - iDeviceDialog->SetButtonTextL( - CHbDeviceMessageBoxSymbian::ERejectButton, - LoadDefaultString( KUssdExit ) ); - _DPRINT( 4, "PhSrv.LGMQ.onlyExit" ); + iSoftkeys = R_AVKON_SOFTKEYS_EXIT; } if ( iClearArray ) { - HbTextResolverSymbian::Init( KCommonLocFilename, KLocPath ); - _DPRINT( 4, "PhSrv.LGMQ.use common loc file" ); - // Yes, No - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue ); - iDeviceDialog->SetButtonTextL( - CHbDeviceMessageBoxSymbian::EAcceptButton, - LoadDefaultString( KUssdYes ) ); - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::ERejectButton, ETrue ); - iDeviceDialog->SetButtonTextL( - CHbDeviceMessageBoxSymbian::ERejectButton, - LoadDefaultString( KUssdNo ) ); - _DPRINT( 4, "PhSrv.LGMQ.Yes&No" ); - HbTextResolverSymbian::Init( KUssdLocFilename, KLocPath ); - _DPRINT( 4, "PhSrv.LGMQ.back up to use ussd loc file" ); + iSoftkeys = R_AVKON_SOFTKEYS_YES_NO; } iReceivedMessage.Zero(); iReceivedMessage = (*iNotifyArray)[0]; @@ -1449,27 +1498,11 @@ _DPRINT( 4, "PhSrv.LGMQ.ShMsgQuery" ); // debug print // Launch Global MessageQuery as requested. - // Dialog not support header text, this code is only - // for testing, not final solution. - TInt receiveLength = iReceivedMessage.Length(); - _DDPRINT( 4, "PhSrv.LGMQ.ShMsgQuery.MsgLength", receiveLength ); - - TInt titleLength = LoadDefaultString( KUssdTitle ).Length(); - _DDPRINT( 4, "PhSrv.LGMQ.ShMsgQuery.TilteLength", titleLength ); - - TInt length = receiveLength + titleLength; - _DDPRINT( 4, "PhSrv.LGMQ.ShMsgQuery.TotalLength", length ); - - HBufC* titleAndText = HBufC::NewLC( length ); - titleAndText->Des().Append( LoadDefaultString( KUssdTitle ) ); - titleAndText->Des().Append( iReceivedMessage ); - iDeviceDialog->SetTextL( titleAndText->Des() ); - CleanupStack::Pop( titleAndText ); - - iDeviceDialog->Close(); - iDeviceDialog->ShowL(); + iGlobalMsgQuery->ShowMsgQueryL(iStatus, iReceivedMessage, iSoftkeys, + *iMeQuHeaderText, KNullDesC); + _DPRINT( 4, "PhSrv.LGMQ.SetActive" ); + SetActive(); iShowDone = EFalse; - // Do nothing else in RunL this time. _DPRINT( 4, "PhSrv.LGMQ.ShMsgQuery.ret" ); // debug print } @@ -1573,112 +1606,105 @@ // ----------------------------------------------------------------------------- // void CPhSrvUssdManager::CheckArray() - { - _DPRINT( 4, "PhSrv.CheckArray.Start" ); // debug print - if (iNotifyArray && NotifyCount() > 0) - { - if ( !iNotifyMessage && !iClearArray ) - { - iLaunchGMQ = ETrue; - iNotifyMessage = ETrue; - _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.ETrue" ); - iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval ); - _DDPRINT( 4, "PhSrv.CheckArray.SetActive.NoNotifyMessage ", iStatus.Int() ); - SetActive(); - } - else if( NotifyCount() > 1 ) - { - ( iNotifyArray )->Delete( 0 ); - ( iNotifyArray )->Compress(); - iLaunchGMQ = ETrue; - iNotifyMessage = ETrue; - _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.ETrue" ); - iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval ); - _DDPRINT( 4, "PhSrv.CheckArray.SetActive.NotifyCount>1 ", iStatus.Int() ); - SetActive(); - } - else - { - iNotifyArray->Reset(); - iNotifyMessage = EFalse; - _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.EFalse" ); - } - } + { + _DPRINT( 4, "PhSrv.CheckArray.Start" ); // debug print + if (iNotifyArray && NotifyCount() > 0) + { + if ( !iNotifyMessage && !iClearArray ) + { + iLaunchGMQ = ETrue; + iNotifyMessage = ETrue; + _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.ETrue" ); + iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval ); + _DDPRINT( 4, "PhSrv.CheckArray.SetActive.NoNotifyMessage ", iStatus.Int() ); + SetActive(); + } + else if( NotifyCount() > 1 ) + { + ( iNotifyArray )->Delete( 0 ); + ( iNotifyArray )->Compress(); + iLaunchGMQ = ETrue; + iNotifyMessage = ETrue; + _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.ETrue" ); + iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval ); + _DDPRINT( 4, "PhSrv.CheckArray.SetActive.NotifyCount>1 ", iStatus.Int() ); + SetActive(); + } + else + { + iNotifyArray->Reset(); + iNotifyMessage = EFalse; + _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.EFalse" ); + } + } _DPRINT_FLAGS(); - _DPRINT( 4, "PhSrv.CheckArray.End" ); // debug print - } + _DPRINT( 4, "PhSrv.CheckArray.End" ); // debug print + } // ----------------------------------------------------------------------------- // CPhSrvUssdManager::ClearArray() // ----------------------------------------------------------------------------- // void CPhSrvUssdManager::ClearArrayL() - { - _DPRINT( 4, "PhSrv.ClearArrayL.Start" ); // debug print - if (iNotifyArray && NotifyCount() > 0) - { - if (iNotifyMessage && NotifyCount()== 1 ) - { - iNotifyArray->Reset(); - } - else - { - iReceivedMessage.Zero(); - iReceivedMessage.Append( - LoadDefaultString( KUssdConfirm ) ); - iNotifyArray->InsertL( 0, iReceivedMessage ); - iLaunchGMQ = ETrue; - iNotifyMessage = ETrue; - _DPRINT( 4, "PhSrv.ClearArrayL.iNotifyMessage.ETrue" ); - iClearArray = ETrue; - iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval ); - _DDPRINT( 4, "PhSrv.ClearArrayL.iTimer ", iStatus.Int() ); - SetActive(); - } - } + { + _DPRINT( 4, "PhSrv.ClearArrayL.Start" ); // debug print + if (iNotifyArray && NotifyCount() > 0) + { + if (iNotifyMessage && NotifyCount()== 1 ) + { + iNotifyArray->Reset(); + } + else + { + iReceivedMessage.Zero(); + HBufC* unreadText = iResourceManager.ReadResourceLC( R_PHSRV_TEXT_UNREAD ); + TPtr pMessage( unreadText->Des() ); + iReceivedMessage.Append( pMessage ); + iNotifyArray->InsertL( 0, iReceivedMessage ); + CleanupStack::PopAndDestroy( unreadText ); + iLaunchGMQ = ETrue; + iNotifyMessage = ETrue; + _DPRINT( 4, "PhSrv.ClearArrayL.iNotifyMessage.ETrue" ); + iClearArray = ETrue; + iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval ); + _DDPRINT( 4, "PhSrv.ClearArrayL.iTimer ", iStatus.Int() ); + SetActive(); + } + } _DPRINT_FLAGS(); - _DPRINT( 4, "PhSrv.ClearArrayL.End" ); // debug print - } + _DPRINT( 4, "PhSrv.ClearArrayL.End" ); // debug print + } // ----------------------------------------------------------------------------- // CPhSrvUssdManager::NotifyCount() // ----------------------------------------------------------------------------- // -TInt CPhSrvUssdManager:: NotifyCount() -{ - TInt count = iNotifyArray->Count(); - _DDPRINT( 4, "PhSrv.NotifyCount:", count ); // debug print - return count; -} + TInt CPhSrvUssdManager::NotifyCount() + { + if( iNotifyArray ) + { + return iNotifyArray->Count(); + } + else + { + return 0; + } + } -// ----------------------------------------------------------------------------- -// CPhSrvUssdManager::UpdateNotifyMessageL() + // ----------------------------------------------------------------------------- +// CPhSrvUssdManager::UpdateNotifyMessage() // ----------------------------------------------------------------------------- // - void CPhSrvUssdManager:: UpdateNotifyMessageL() - { - _DDPRINT( 4, "PhSrv.UpdateNotifyMessageL.Start, clear: ", iClearArray ); // debug print - - // Show left softkey - "Next" - if (NotifyCount() > 1 && !iClearArray ) - { - _DPRINT( 4, "PhSrv.UpdateNotifyMessageL" ); // debug print - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue ); - iDeviceDialog->SetButtonTextL( - CHbDeviceMessageBoxSymbian::EAcceptButton, - LoadDefaultString( KUssdNext ) ); - } - // Remove left softkey - else - { - iDeviceDialog->SetButton( - CHbDeviceMessageBoxSymbian::EAcceptButton, EFalse ); - } - iDeviceDialog->UpdateL(); - - _DPRINT( 4, "PhSrv.UpdateNotifyMessageL.End" ); // debug print - } + void CPhSrvUssdManager::UpdateNotifyMessage() + { + _DDPRINT( 4, "PhSrv.UpdateNotifyMessage.Start, clear: ", iClearArray ); // debug print + if (NotifyCount() > 1 && !iClearArray ) + { + _DPRINT( 4, "PhSrv.UpdateNotifyMessage" ); // debug print + iGlobalMsgQuery->UpdateMsgQuery( R_AVKON_SOFTKEYS_NEXT_EXIT__NEXT ); + } + _DPRINT( 4, "PhSrv.UpdateNotifyMessage.End" ); // debug print + } // ----------------------------------------------------------------------------- // CPhSrvUssdManager::DoCancel @@ -1689,12 +1715,11 @@ _DPRINT( 4, "PhSrv.DoCancel.Start" ); // debug print iTimer.Cancel(); iLaunchGMQ = EFalse; - if ( iDeviceDialog ) + + if ( iGlobalMsgQuery ) { _DPRINT( 4, "PhSrv.DoCancel" ); // debug print - iDeviceDialog->Close(); - delete iDeviceDialog; - iDeviceDialog = NULL; + iGlobalMsgQuery->CancelMsgQuery(); } _DPRINT( 4, "PhSrv.DoCancel.End" ); // debug print } @@ -1727,7 +1752,7 @@ // Find the task with name TApaTaskList tasklist( wsSession ); - TApaTask task = tasklist.FindApp( KUssdSecureId ); + TApaTask task = tasklist.FindApp( TUid::Uid( KPhSrvUssdAppUID ) ); // If task exists, bring it to foreground if ( task.Exists() ) @@ -1744,12 +1769,13 @@ CleanupClosePushL( apaLsSession ); TApaAppInfo appInfo; - - TInt err = apaLsSession.GetAppInfo( appInfo, KUssdSecureId ); - _DDPRINT( 4, "PhSrv.RequestStartEditingL.GetAppInfo ", err ); // debug print - + TInt err = apaLsSession.GetAppInfo( + appInfo, + TUid::Uid( KPhSrvUssdAppUID ) ); if ( err == KErrNone ) { + _DDPRINT( 4, "PhSrv.RequestStartEditingL.GetAppInfo ", err ); // debug print + #ifndef SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1 CApaCommandLine* apaCommandLine = CApaCommandLine::NewLC(); apaCommandLine->SetExecutableNameL( appInfo.iFullName ); @@ -1758,22 +1784,10 @@ CApaCommandLine::NewLC( appInfo.iFullName ); #endif // SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1 - TThreadId id( static_cast( 0 ) ); - err = apaLsSession.StartApp( *apaCommandLine, id ); - _DDPRINT( 4, "PhSrv.RequestStartEditingL.ThreadId ", id ); + err = apaLsSession.StartApp( *apaCommandLine ); CleanupStack::PopAndDestroy( apaCommandLine ); } - CleanupStack::PopAndDestroy( &apaLsSession ); // apaLsSession - - // bring the ussd editor to foreground, only for testing - TApaTaskList tasklist( wsSession ); - TApaTask task = tasklist.FindApp( KUssdSecureId ); - if ( task.Exists() ) - { - _DPRINT( 4, "PhSrv.UssdM.RequestStartEditingL.task.BringToForeground" ); - task.BringToForeground(); - } - // bring the ussd editor to foreground, only for testing + CleanupStack::PopAndDestroy(); // apaLsSession } CleanupStack::PopAndDestroy(); // wsSession @@ -1812,7 +1826,7 @@ { if ( iUssdReplyTimer->IsTimerActive() ) { - + // debug print _DPRINT( 4, "PhSrv.UssdM.InfUssdAppTerminatingL.timer" ); // Read the information what is the reason @@ -1823,14 +1837,14 @@ 0, exitReasonPckg ); - + // debug print _DPRINT( 4, "PhSrv.UssdM.InfUssdAppTerminatingL.timer2" ); // If reason was the completion of send operation, the USSD // session is not canceled, otherwise it is canceled. if ( exitReason != EPhCltSendCompleted ) { - + // debug print _DPRINT( 4, "PhSrv.UssdM.InfUssdAppTerminatingL.SendRelease" ); CloseSession(); } @@ -1898,7 +1912,7 @@ } else { - _DPRINT( 4, "PhSrv.InformStartSAT.Set" ); + _DPRINT( 4, "PhSrv.InformStartSAT.Set" ); // debug print // There was not pending SAT message iHavePendingSatMessagePointer = ETrue; @@ -1916,7 +1930,7 @@ // void CPhSrvUssdManager::InformStopSAT() { - _DPRINT( 4, "PhSrv.InformStopSAT.Start" ); + _DPRINT( 4, "PhSrv.InformStopSAT.Start" ); // debug print // Do the actions only if there is pending SAT message. if ( iHavePendingSatMessagePointer ) @@ -1929,7 +1943,7 @@ } iHavePendingSatMessagePointer = EFalse; } - _DPRINT( 4, "PhSrv.InformStopSAT.End" ); + _DPRINT( 4, "PhSrv.InformStopSAT.End" ); // debug print } // ----------------------------------------------------------------------------- @@ -1981,7 +1995,7 @@ TDesC* aReceiveString, TInt aError ) { - _DPRINT( 4, "PhSrv.CompleteSatL.Start" ); + _DPRINT( 4, "PhSrv.CompleteSatL.Start" ); // debug print if ( aReceiveString ) { if ( aReceiveString->Length() ) @@ -1990,7 +2004,7 @@ // copy the received string to client side. if ( iPendingSatMessagePointer.Int1() < aReceiveString->Length() ) { - + // debug print _DPRINT( 4, "PhSrv.CompleteSatL.recString.LengthError" ); if ( !iPendingSatMessagePointer.IsNull() ) { @@ -1999,8 +2013,8 @@ } iHavePendingSatMessagePointer = EFalse; } - else - { + else + { _DPRINT( 4, "PhSrv.CompleteSatL.recString.Write" ); // debug print iPendingSatMessagePointer.WriteL( 2, @@ -2014,7 +2028,7 @@ } } } - _DPRINT( 4, "PhSrv.CompleteSatL.Middle" ); + _DPRINT( 4, "PhSrv.CompleteSatL.Middle" ); // debug print if ( !iPendingSatMessagePointer.IsNull() ) { if ( aReceiveString && !iSatCanceled ) @@ -2031,7 +2045,7 @@ iHavePendingSatMessagePointer = EFalse; - _DPRINT( 4, "PhSrv.CompleteSatL.End" ); + _DPRINT( 4, "PhSrv.CompleteSatL.End" ); // debug print } @@ -2043,7 +2057,7 @@ TBool CPhSrvUssdManager::IsTelephonyFeatureSupported( const TInt aFeatureId ) { - return ( aFeatureId & iVariantReadOnlyValues ); + return ( aFeatureId & iVariantReadOnlyValues ); } @@ -2054,13 +2068,12 @@ // TInt CPhSrvUssdManager::PlayUssdTone() { - _DPRINT( 4, "PhSrv.UssdM.PlayTone.start" ); + _DPRINT( 4, "PhSrv.UssdM.PlayTone.start" ); // debug print TInt err = KErrNone; -// <-- QT PHONE START--> -// RProperty::Define( KPSUidNcnList, KNcnPlayAlertTone, RProperty::EInt, ECapability_None , ECapabilityWriteDeviceData ); -// RProperty::Set( KPSUidNcnList, KNcnPlayAlertTone, KPhSrvUssdTone ); -// <-- QT PHONE END--> + + RProperty::Define( KPSUidNcnList, KNcnPlayAlertTone, RProperty::EInt, ECapability_None , ECapabilityWriteDeviceData ); + RProperty::Set( KPSUidNcnList, KNcnPlayAlertTone, KPhSrvUssdTone ); // debug print _DDPRINT( @@ -2079,8 +2092,7 @@ { _DPRINT( 4, "PhSrv.UssdM.GetTelephonyVariantData.Start" ); TInt err = KErrNone; -// <-- QT PHONE START--> -/* + // Variation data should be unchangable during run-time, // therefore, if once succesfully read, later reads are // not allowed. @@ -2088,10 +2100,10 @@ { CRepository* cenRepSession = NULL; TRAP ( err , - cenRepSession = CRepository::NewL( KCRUidTelVariation ) ); + cenRepSession = CRepository::NewL( KCRUidTelSrvVariation ) ); if ( err == KErrNone ) { - err = cenRepSession->Get( KTelVariationFlags, + err = cenRepSession->Get( KTelSrvVariationFlags, iVariantReadOnlyValues ); } delete cenRepSession; @@ -2099,8 +2111,6 @@ _DDPRINT( 4, "PhSrv.UssdM.variant", iVariantReadOnlyValues ); // debug print _DPRINT( 4, "PhSrv.UssdM.GetTelephonyVariantData.End" ); - */ -// <-- QT PHONE END--> return err; } @@ -2112,7 +2122,7 @@ // void CPhSrvUssdManager::SendMoAcknowledgementL() { - _DPRINT( 4, "PhSrv.SendMoAckL.Start" ); + _DPRINT( 4, "PhSrv.SendMoAckL.Start" ); // debug print // Acknowledge MT USSD message. RMobileUssdMessaging::TMobileUssdAttributesV1 msgAttribs; @@ -2130,7 +2140,7 @@ RMobileUssdMessaging::TMobileUssdAttributesV1Pckg attribs = msgAttribs; SendHandlerL().SendUssdL( KNullDesC8() , attribs ); - _DPRINT( 4, "PhSrv.SendMoAckL.End" ); + _DPRINT( 4, "PhSrv.SendMoAckL.End" ); // debug print } // ----------------------------------------------------------------------------- @@ -2140,51 +2150,20 @@ // void CPhSrvUssdManager::TurnLightsOn() { - _DPRINT( 4, "PhSrv.TurnLightsOn.Start" ); + _DPRINT( 4, "PhSrv.TurnLightsOn Start" ); // debug print - // Change the bit on and off. SysAp will detect that + // Change the bit on and off. SysAp will detect that // the lights should be switched on for the specified time. // - RProperty::Set(KPSUidCoreApplicationUIs, KLightsControl, ELightsOn); - TInt err = RProperty::Set(KPSUidCoreApplicationUIs, KLightsControl, ELightsOff); - - if ( err != KErrNone ) - { - _DDPRINT( 4,"PhSrv.TurnLightsOn.Error: ",err );// debug print - } - - _DPRINT( 4, "PhSrv.TurnLightsOn.End" ); - } + RProperty::Set(KPSUidCoreApplicationUIs, KLightsControl, ELightsOn); + TInt err = RProperty::Set(KPSUidCoreApplicationUIs, KLightsControl, ELightsOff); -// ----------------------------------------------------------------------------- -// CPhSrvUssdManager::LoadDefaultString -// ----------------------------------------------------------------------------- -// -const TPtrC CPhSrvUssdManager::LoadDefaultString( const TDesC& aText ) - { - _DPRINT( 4, "PhSrv.LoadDefaultString.Start" ); - - if ( iTextBuffer ) - { - delete iTextBuffer; - iTextBuffer = NULL; - _DPRINT( 4, "PhSrv.LoadDefaultString.Clear" ); - } - TInt err = KErrNone; - TPtrC ptr( aText ); - if ( ptr.Length() ) - { - TRAP( err, iTextBuffer = HbTextResolverSymbian::LoadL( ptr ) ); - _DDPRINT( 4, "PhSrv.LoadDefaultString.LoadL.%d", err ); - if ( iTextBuffer ) - { - ptr.Set( iTextBuffer->Des() ); - _DPRINT( 4, "PhSrv.LoadDefaultString.Set" ); - } - } - _DPRINT( 4, "PhSrv.LoadDefaultString.End" ); - return ptr; + if ( err != KErrNone ) + { + _DDPRINT( 4,"PhSrv.TurnLightsOn.Error: ",err );// debug print + } + + _DPRINT( 4, "PhSrv.TurnLightsOn.End" ); // debug print } - // End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdNotifyNWRelease.cpp --- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdNotifyNWRelease.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdNotifyNWRelease.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ // INCLUDE FILES -#include "cphsrvussdnotifynwrelease.h" -#include "mphsrvussdnetworkobserver.h" -#include "phsrvdebuginfo.h" +#include "CPhSrvUssdNotifyNWRelease.h" +#include "MPhSrvUssdNetworkObserver.h" +#include "PhSrvDebugInfo.h" // CONSTANTS const TInt KPhSrvUssdReceiverPriority = CActive::EPriorityLow + 2; diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReceiveHandler.cpp --- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReceiveHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReceiveHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphsrvussdreceivehandler.h" -#include "mphsrvussdnetworkobserver.h" +#include "CPhSrvUssdReceiveHandler.h" +#include "MPhSrvUssdNetworkObserver.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReplyTimer.cpp --- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReplyTimer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReplyTimer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ // INCLUDE FILES -#include "cphsrvussdreplytimer.h" -#include "mphsrvussdreplytimerobserver.h" +#include "CPhSrvUssdReplyTimer.h" +#include "MPhSrvUssdReplyTimerObserver.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdSendHandler.cpp --- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdSendHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdSendHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,11 +17,11 @@ // INCLUDE FILES -#include "cphsrvussdsendhandler.h" -#include "mphsrvussdnetworkobserver.h" -#include "mphsrvphoneinterface.h" -#include "cphsrvussdsessioncancelwaiter.h" -#include "phsrvdebuginfo.h" //debug prints +#include "CPhSrvUssdSendHandler.h" +#include "MPhSrvUssdNetworkObserver.h" +#include "MPhSrvPhoneInterface.h" +#include "CPhSrvUssdSessionCancelWaiter.h" +#include "PhSrvDebugInfo.h" //debug prints #include #include @@ -188,19 +188,19 @@ // ----------------------------------------------------------------------------- // void CPhSrvUssdSendHandler::SendReleaseSession() - { - _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession.Start" ); // debug print - if ( !iSessionCancelWaiter->IsActive() ) - { - _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession" ); // debug print - iUssdMessaging.SendRelease( + { + _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession.Start" ); // debug print + if ( !iSessionCancelWaiter->IsActive() ) + { + _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession" ); // debug print + iUssdMessaging.SendRelease( iSessionCancelWaiter->iStatus, iSessionCancelWaiter->iSSRequestPckg ); - _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession2" ); + _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession2" ); iSessionCancelWaiter->SetActive(); _DDPRINT( 4, "PhSrv.Sendhandler.SRS.iUssdMessaging", iStatus.Int() ); - } - _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession.End" ); // debug print - } + } + _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession.End" ); // debug print + } // End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/rom/PhoneServer.iby --- a/phoneclientserver/phoneserver/rom/PhoneServer.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/phoneclientserver/phoneserver/rom/PhoneServer.iby Wed Sep 01 12:15:03 2010 +0100 @@ -25,6 +25,6 @@ define DATAZ_ EPOCROOT##epoc32\data\Z #endif - data = ZPRIVATE\10000850\backup_registration.xml PRIVATE\10000850\backup_registration.xml + data = ZPRIVATE\10000850\backup_registration.xml PRIVATE\10000850\backup_registration.xml #endif diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/src/messenger/cphsrvmessengerrequestmanagerstub.cpp --- a/phoneclientserver/phoneserver/src/messenger/cphsrvmessengerrequestmanagerstub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2004 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: Stub version of CPhSrvMessengerRequestManager.cpp -* -*/ - - - -// INCLUDES -#include "cphsrvmessengerrequestmanager.h" - - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPhSrvMessengerRequestManager::CPhSrvMessengerRequestManager -// -// Constructor. -// ----------------------------------------------------------------------------- -// -CPhSrvMessengerRequestManager::CPhSrvMessengerRequestManager( - CPhSrvServer& aServer ) -: iServer( aServer ) - { - } - - -// ----------------------------------------------------------------------------- -// CPhSrvMessengerRequestManager::~CPhSrvMessengerRequestManager -// -// Destructor. -// ----------------------------------------------------------------------------- -// -CPhSrvMessengerRequestManager::~CPhSrvMessengerRequestManager() - { - // Stub. - } - - -// ----------------------------------------------------------------------------- -// CPhSrvMessengerRequestManager::ConstructL -// -// Complete construction. -// ----------------------------------------------------------------------------- -// -void CPhSrvMessengerRequestManager::ConstructL() - { - // Stub. - } - - -// ----------------------------------------------------------------------------- -// CPhSrvMessengerRequestManager::NegotiatorRequest -// -// Initiate a messenger request - called by the external messenger interface. -// ----------------------------------------------------------------------------- -// -void CPhSrvMessengerRequestManager::NegotiatorRequest( - CPhSrvSubSessionBase& /*aSubSession*/, - const TPhCltMessengerParameters& /*aParameters*/, - const RMessage2& /*aMessage*/ ) - { - // Stub. - } - - -// ----------------------------------------------------------------------------- -// CPhSrvMessengerRequestManager::NegotiatorRequestCancel -// -// Cancel a messenger request handling. -// ----------------------------------------------------------------------------- -// -void CPhSrvMessengerRequestManager::NegotiatorRequestCancel( - CPhSrvSubSessionBase& /*aSubSession*/, - const TPhCltMessengerCommand /*aRequestType*/ ) - { - // Stub. - } - - -// ----------------------------------------------------------------------------- -// CPhSrvMessengerRequestManager::NegotiatorRequestConstructL -// -// Reserve all space needed for the subsession given as parameter. -// ----------------------------------------------------------------------------- -// -void CPhSrvMessengerRequestManager::NegotiatorRequestConstructL( - CPhSrvSubSessionBase& /*aSubSession*/, - const TPhCltMessengerParameters& /*aParameters*/, - const RMessage2& /*aMessage*/ ) - { - // Stub. - } - - -// ----------------------------------------------------------------------------- -// CPhSrvMessengerRequestManager::NegotiatorRequestDelete -// -// Delete all space reserved for the subsession given as parameter. -// ----------------------------------------------------------------------------- -// -void CPhSrvMessengerRequestManager::NegotiatorRequestDelete( - CPhSrvSubSessionBase& /*aSubSession*/ ) - { - // Stub. - } - - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phoneclientserver/phoneserver/src/messenger/cphsrvsubsessionmessengerstub.cpp --- a/phoneclientserver/phoneserver/src/messenger/cphsrvsubsessionmessengerstub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2004 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: Sub Session Messenger. -* The stub version of CPhSrvSubSessionMessenger.cpp -* -*/ - - - -// INCLUDE FILES -#include "cphsrvsubsessionmessenger.h" -#include "phcltclientserver.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPhSrvSubSessionMessenger::CPhSrvSubSessionMessenger -// -// Constructor. -// ----------------------------------------------------------------------------- -// -CPhSrvSubSessionMessenger::CPhSrvSubSessionMessenger( - CPhSrvSession& aSession ) -: CPhSrvSubSessionBase( aSession, EPhSrvSubSessionTypeMessenger ) - { - } - - -// ----------------------------------------------------------------------------- -// CPhSrvSubSessionMessenger::~CPhSrvSubSessionMessenger -// -// Destructor. -// ----------------------------------------------------------------------------- -// -CPhSrvSubSessionMessenger::~CPhSrvSubSessionMessenger() - { - } - - -// ----------------------------------------------------------------------------- -// CPhSrvSubSessionMessenger::NewL -// -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CPhSrvSubSessionBase* CPhSrvSubSessionMessenger::NewL( - CPhSrvSession& /*aSession*/ ) - { - // Stub version, so not supported. - User::Leave( KErrNotSupported ); - - return NULL; - } - - -// ----------------------------------------------------------------------------- -// CPhSrvSubSessionMessenger::PhSrvMessageDecoderCanProcessMessage -// -// Framework function. Returns ETrue for the op codes that -// this subsession can handle. -// ----------------------------------------------------------------------------- -// -TBool CPhSrvSubSessionMessenger::PhSrvMessageDecoderCanProcessMessage( - TInt aFunction ) - { - switch( aFunction ) - { - case EPhoneServerMessengerSubSessionOpen: - case EPhoneServerMessengerSubSessionClose: - case EPhoneServerMessengerSubSessionConstruct: - case EPhoneServerMessengerSubSessionReceive: - case EPhoneServerMessengerSubSessionSend: - case EPhoneServerMessengerSubSessionSkip: - case EPhoneServerMessengerSubSessionCancel: - return ETrue; - - default: - return EFalse; - } - } - - -// ----------------------------------------------------------------------------- -// CPhSrvSubSessionMessenger::PhSrvMessageProcessorHandleMessageL -// -// Framework function. Handle any op-codes here. -// ----------------------------------------------------------------------------- -// -void CPhSrvSubSessionMessenger::PhSrvMessageProcessorHandleMessageL( - const RMessage2& /*aMessage*/ ) - { - // Stub implementation, i.e. functionality not supported. - User::Leave( KErrNotSupported ); - } - - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/eabi/phonecmdhandleru.def --- a/phonecmdhandler/phonecmdhnlr/eabi/phonecmdhandleru.def Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/eabi/phonecmdhandleru.def Wed Sep 01 12:15:03 2010 +0100 @@ -4,4 +4,6 @@ _ZN13CPhoneHandlerD0Ev @ 3 NONAME _ZN13CPhoneHandlerD1Ev @ 4 NONAME _ZN13CPhoneHandlerD2Ev @ 5 NONAME + _ZTI22CPhoneHandlerCallArray @ 6 NONAME + _ZTV22CPhoneHandlerCallArray @ 7 NONAME diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/group/PhoneCmdHandler.mmp --- a/phonecmdhandler/phonecmdhnlr/group/PhoneCmdHandler.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/group/PhoneCmdHandler.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -23,37 +23,37 @@ UID 0x1000008d 0x10205046 CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT +VENDORID VID_DEFAULT SOURCEPATH ../src -SOURCE phonehandler.cpp -SOURCE phonehandlercontrol.cpp -SOURCE phonehandleractive.cpp -SOURCE phonehandlercallbase.cpp -SOURCE phonehandleranswercall.cpp -SOURCE phonehandlerendcall.cpp -SOURCE phonehandlerdialcall.cpp -SOURCE phonehandlervoicedial.cpp -SOURCE phonehandlerredial.cpp -SOURCE phonehandlermultipartycall.cpp -SOURCE phonehandlerdtmf.cpp -SOURCE phonehandlerresponse.cpp -SOURCE phonehandlercallstate.cpp +SOURCE PhoneHandler.cpp +SOURCE PhoneHandlerControl.cpp +SOURCE PhoneHandlerActive.cpp +SOURCE PhoneHandlerCallBase.cpp +SOURCE PhoneHandlerAnswerCall.cpp +SOURCE PhoneHandlerEndCall.cpp +SOURCE PhoneHandlerDialCall.cpp +SOURCE PhoneHandlerVoiceDial.cpp +SOURCE PhoneHandlerRedial.cpp +SOURCE PhoneHandlerMultipartyCall.cpp +SOURCE PhoneHandlerDTMF.cpp +SOURCE PhoneHandlerResponse.cpp +SOURCE PhoneHandlerCallState.cpp +SOURCE PhoneHandlerCallArray.cpp USERINCLUDE ../inc APP_LAYER_SYSTEMINCLUDE -LIBRARY euser.lib -LIBRARY remconinterfacebase.lib -LIBRARY remconextensionapi.lib -LIBRARY phoneclient.lib -LIBRARY logcli.lib -LIBRARY efsrv.lib -// <-- QT PHONE START --> -//LIBRARY pbkeng.lib -// <-- QT PHONE END --> +LIBRARY euser.lib +LIBRARY remconinterfacebase.lib +LIBRARY remconextensionapi.lib +LIBRARY phoneclient.lib +LIBRARY logcli.lib +LIBRARY efsrv.lib +LIBRARY pbkeng.lib +LIBRARY telephonyservice.lib MACRO API_TRACE_FLAG MACRO COMPONENT_TRACE_FLAG diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/group/bld.inf --- a/phonecmdhandler/phonecmdhnlr/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: Receives and executes call handling related key presses -* (e.g. answer call, end call) from accessories. +* (e.g. answer call, end call) from accessories. * * */ @@ -26,7 +26,7 @@ ../rom/phonecmdhandler.iby CORE_MW_LAYER_IBY_EXPORT_PATH(phonecmdhandler.iby) PRJ_MMPFILES -phonecmdhandler.mmp +PhoneCmdHandler.mmp // End of File diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerActive.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerActive.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerActive.h Wed Sep 01 12:15:03 2010 +0100 @@ -42,79 +42,79 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerActive ) : public CActive - { - public: // Constructors and destructor - - /** + { + public: // Constructors and destructor + + /** * Two-phased constructor. */ - static CPhoneHandlerActive* NewL( MPhoneHandlerObserver& aObserver ); - - /** + static CPhoneHandlerActive* NewL( MPhoneHandlerObserver& aObserver ); + + /** * Destructor. */ - ~CPhoneHandlerActive(); - - public: // New functions - - /** + ~CPhoneHandlerActive(); + + public: // New functions + + /** * From CActive. Indicates that the active object has issued a request * and that it is now outstanding. * @since S60 3.1 * @return */ - void SetActive(); - - public: // Functions from base classes - - protected: // New functions + void SetActive(); + + public: // Functions from base classes + + protected: // New functions protected: // Functions from base classes - /** + /** * From CActive. Handles an active object’s request completion event. */ - void RunL(); - - /** + void RunL(); + + /** * From CActive. Implements cancellation of an outstanding request. */ - void DoCancel(); - - /** + void DoCancel(); + + /** * From CActive. Handles a leave occurring in the request completion * event handler RunL(). */ - TInt RunError( TInt aError ); + TInt RunError( TInt aError ); - private: - - /** + private: + + /** * C++ default constructor. */ - CPhoneHandlerActive( MPhoneHandlerObserver& aObserver ); - - /** + CPhoneHandlerActive( MPhoneHandlerObserver& aObserver ); + + /** * By default Symbian 2nd phase constructor is private. */ - void ConstructL(); - - public: // Data + void ConstructL(); + + public: // Data protected: // Data private: // Data - - // Notifies caller of an asynchronous request when request has been - // completed. - MPhoneHandlerObserver& iObserver; - - public: // Friend classes + + // Notifies caller of an asynchronous request when request has been + // completed. + MPhoneHandlerObserver& iObserver; + + public: // Friend classes protected: // Friend classes private: // Friend classes - }; + }; #endif // CPHONEHANDLERACTIVE_H diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerAnswerCall.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerAnswerCall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerAnswerCall.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPHONEHANDLERANSWERCALL_H // INCLUDES -#include "phonehandlercallbase.h" -#include +#include "PhoneHandlerCallBase.h" +#include // CONSTANTS @@ -43,7 +43,7 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerAnswerCall ) : public CPhoneHandlerCallBase - + { public: // Constructors and destructor @@ -51,9 +51,9 @@ * Two-phased constructor. */ static CPhoneHandlerAnswerCall* NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation - = ERemConExtAnswerCall ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation + = ERemConExtAnswerCall ); /** * Destructor. @@ -97,8 +97,8 @@ * C++ default constructor. */ CPhoneHandlerAnswerCall( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ); /** * By default Symbian 2nd phase constructor is private. diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallArray.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallArray.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,104 @@ +/* +* 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: Declarations for class CPhoneHandlerCallArray +* +*/ + + +#ifndef CPHONEHANDLERCALLARRAY_H +#define CPHONEHANDLERCALLARRAY_H + +#include + +class TCallInfo; +class MCall; + +/** +* Handles call adding +* +* @lib phonecmdhandler.dll +*/ +class CPhoneHandlerCallArray: public CBase + { + + public: //Constructors and descructor + + /** + * Two-phased constructing for the array. + * + */ + static CPhoneHandlerCallArray* NewL( ); + + /** + * C++ default destructor + */ + ~CPhoneHandlerCallArray( ); + + /** + * Add call to array + * @param aCall call to be added + * @return result of appending + */ + void AddL( const MCall* aCall ); + + /** + * Remove call from array + * @param aCall call to be removed + * @return result of removal + */ + TInt Remove( TCallInfo* aCall ); + + /** + * Get call count. + */ + TInt CallCount( ); + + /** + * Get call by state. + */ + TCallInfo* CallByState( TInt state ); + + /** + * Finds call pointer specified by call index. + * @param aCallIndex + * @return corresponding call pointer or NULL if not found. + */ + TCallInfo* FindCall( TInt aCallIndex ); + + /** + * Get connected call count. + */ + TInt ConnectedCallCount( ); + + /** + * Get existing call count. + */ + TInt ExistingCallCount(); + + private: + /** + * C++ default constructor + */ + CPhoneHandlerCallArray( ); + + private: // data + + /** + * Pointer array of call objects. + */ + RPointerArray iCallArray; + + }; + +#endif // CPHONEHANDLERCALLARRAY_H diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallBase.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallBase.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallBase.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,10 +20,10 @@ #define CPHONEHANDLERCALLBASE // INCLUDES -#include "phonehandlerservice.h" -#include "phonehandlerobserver.h" +#include "PhoneHandlerService.h" +#include "PhoneHandlerObserver.h" #include -#include +#include // CONSTANTS @@ -46,8 +46,8 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerCallBase ) : public CBase, - public MPhoneHandlerService, - public MPhoneHandlerObserver + public MPhoneHandlerService, + public MPhoneHandlerObserver { protected: // Constructors and destructor @@ -65,7 +65,7 @@ public: // Functions from base classes - /** + /** * From MPhoneHandlerService. Starts to process an asynchronous request. * @since Series 60 3.1 * @param @@ -81,7 +81,7 @@ */ virtual void Delete() = 0; - /** + /** * From MPhoneHandlerObserver. Notifies when asynchronous request has * been completed. * @since S60 3.1 @@ -89,7 +89,7 @@ * @return void */ virtual void RequestCompleted( const TInt aError ) = 0; - + protected: // New functions /** @@ -107,31 +107,31 @@ * @return void */ void NextState(); - - /** + + /** * Called when service isn't running (e.g. when it's completed). * @since S60 3.1 * @param void * @return void */ - void IdleState(); - - /** + void IdleState(); + + /** * Returns an active object's TRequestStatus for asynchronous calls. * @since S60 3.1 * @param void * @return void */ - TRequestStatus& GetStatus(); - - /** + TRequestStatus& GetStatus(); + + /** * Activates an active object for asynchronous calls. * @since S60 3.1 * @param void * @return void */ - void Activate(); - + void Activate(); + protected: // Functions from base classes private: @@ -140,20 +140,20 @@ protected: // Data - // call handling service states + // call handling service states enum TPhoneHandlerServiceState - { - EPhoneHandlerStateIdle = 0, - EPhoneHandlerState1 = 1, - EPhoneHandlerState2 = 2, - EPhoneHandlerState3 = 3 - }; - - // stores service state - TPhoneHandlerServiceState iState; - - // pointer to API providing call handling services - CPhCltCommandHandler* iCommandHandler; // owned + { + EPhoneHandlerStateIdle = 0, + EPhoneHandlerState1 = 1, + EPhoneHandlerState2 = 2, + EPhoneHandlerState3 = 3 + }; + + // stores service state + TPhoneHandlerServiceState iState; + + // pointer to API providing call handling services + CPhCltCommandHandler* iCommandHandler; // owned private: // Data diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallState.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallState.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallState.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,6 +23,8 @@ // INCLUDES #include #include +#include +#include // CONSTANTS @@ -43,74 +45,65 @@ * @lib RemConAsy * @since S60 3.1 */ -NONSHARABLE_CLASS( CPhoneHandlerCallState ) : public CActive - { - public: // Constructors and destructor - - /** +NONSHARABLE_CLASS( CPhoneHandlerCallState ) : public CBase, public MCallInformationObserver + { + public: // Constructors and destructor + + /** * Two-phased constructor. */ - static CPhoneHandlerCallState* NewL( CPhoneHandlerControl& aControl ); - - /** + static CPhoneHandlerCallState* NewL( CPhoneHandlerControl& aControl ); + + /** * Destructor. */ - ~CPhoneHandlerCallState(); - - public: // New functions - - public: // Functions from base classes - - protected: // New functions - - protected: // Functions from base classes - - /** - * From CActive. Handles S60 start up state change event. - */ - void RunL(); - - /** - * From CActive. Implements cancellation of an outstanding Subscibe() - * request. - */ - void DoCancel(); - - private: - - /** + ~CPhoneHandlerCallState(); + + private: + + /** * C++ default constructor. */ - CPhoneHandlerCallState( CPhoneHandlerControl& aControl ); - - /** + CPhoneHandlerCallState( CPhoneHandlerControl& aControl ); + + /** * By default Symbian 2nd phase constructor is private. */ - void ConstructL(); - - /** - * Starts to listen change in S60 start up state. - **/ - void Subscribe(); - - public: // Data + void ConstructL(); + + /** + * Signals that there are changes in ongoing calls. + * + * @return void + */ + void CallInformationChangedL(); + + // From MCallInformationObserver + + /** + * Signals that there are changes in ongoing calls. + * + * @return void + */ + void CallInformationChanged(); + + public: // Data protected: // Data private: // Data - // Publish and Subscribe handle used to listen changes in call states - RProperty iProperty; - - // reference to control + CCallInformation* iInfo; + + // reference to control CPhoneHandlerControl& iControl; - - public: // Friend classes + + public: // Friend classes protected: // Friend classes private: // Friend classes - }; + }; #endif // CPHONEHANDLERCALLSTATE_H diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerControl.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerControl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerControl.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,12 +20,13 @@ #define CPHONEHANDLERCONTROL_H // INCLUDES -#include "phonehandlerservice.h" -#include -#include +#include "PhoneHandlerService.h" +#include +#include #include -#include +#include #include +#include // CONSTANTS @@ -42,6 +43,8 @@ class CRemConCallHandlingTarget; class CPhoneHandlerResponse; class CPhoneHandlerCallState; +class CPhoneHandlerCallArray; +class MCall; /** * Receives call handling related key presses from accessories and executes @@ -51,15 +54,15 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerControl ) : public CBase, - public MRemConCallHandlingTargetObserver - { + public MRemConCallHandlingTargetObserver + { public: // Constructors and destructor /** * Two-phased constructor. */ static CPhoneHandlerControl* NewL( - CRemConInterfaceSelector* aIfSelector = NULL ); + CRemConInterfaceSelector* aIfSelector = NULL ); /** * Destructor. @@ -68,7 +71,7 @@ public: // New functions - /** + /** * Returns phone number for dial or speed dial. * @since S60 3.1 * @param void @@ -107,36 +110,36 @@ * @return TChar DTMF tone */ const TChar& Tone() const; - - /** + + /** * Returns reference to API used to communicate with accessory who * initiated key press. * @since S60 3.1 * @param void * @return CRemConCallHandlingTarget& reference to API - */ - CRemConCallHandlingTarget& CommandInitiator() const; - - /** + */ + CRemConCallHandlingTarget& CommandInitiator() const; + + /** * Informs the latest call state. - * @since S60 3.1 - * @param aState Call state from KTelephonyCallState P&S key - * @return void + * @since S60 9.2 + * @param aCall Call from MCallInformationObserver + * @return void */ - void NotifyCallState( const TInt aState ); + void NotifyCallStateL( const MCall* aCall ); - /** + /** * Get iSwitchCall flag, if this flag is ETrue, it means * "Send" key in remote target is pressed in multiparty call, * otherwise EFalse * @since S60 3.1 * @return TBool */ - TBool SwitchCall(); + TBool SwitchCall(); - + public: // Functions from base classes - + protected: // New functions protected: // Functions from base classes @@ -152,79 +155,93 @@ * By default Symbian 2nd phase constructor is private. */ void ConstructL( CRemConInterfaceSelector* aIfSelector = NULL ); - - /** - * From MRemConCallHandlingTargetObserver. Answer an incoming phone call. - */ - virtual void AnswerCall(); + + /** + * From MRemConCallHandlingTargetObserver. Answer an incoming phone call. + */ + virtual void AnswerCall(); - /** - * From MRemConCallHandlingTargetObserver. End an incoming/ongoing - * phone call. - */ - virtual void EndCall(); - - /** - * From MRemConCallHandlingTargetObserver. Answer an incoming phone call, - * or end an ongoing call according to call status. - */ - virtual void AnswerEndCall(); - - /** - * From MRemConCallHandlingTargetObserver. Make a voice call. - */ - virtual void VoiceDial( const TBool aActivate ); - - /** - * From MRemConCallHandlingTargetObserver. Redial last phone call. - */ - virtual void LastNumberRedial(); - - /** - * From MRemConCallHandlingTargetObserver. Dial a phone call. + /** + * From MRemConCallHandlingTargetObserver. End an incoming/ongoing + * phone call. + */ + virtual void EndCall(); + + /** + * From MRemConCallHandlingTargetObserver. Answer an incoming phone call, + * or end an ongoing call according to call status. + */ + virtual void AnswerEndCall(); + + /** + * From MRemConCallHandlingTargetObserver. Make a voice call. + */ + virtual void VoiceDial( const TBool aActivate ); + + /** + * From MRemConCallHandlingTargetObserver. Redial last phone call. + */ + virtual void LastNumberRedial(); + + /** + * From MRemConCallHandlingTargetObserver. Dial a phone call. + */ + virtual void DialCall( const TDesC8& aTelNumber ); + + /** + * From MRemConCallHandlingTargetObserver. Make multiparty call. + */ + virtual void MultipartyCalling( const TDesC8& aData ); + + /** + * Generates DTMF signal. + */ + virtual void GenerateDTMF( const TChar aChar ); + + /** + * From MRemConCallHandlingTargetObserver. Make a speed dial call. + */ + virtual void SpeedDial( const TInt aIndex ); + + /** + * Starts processing service corresponding to key press. + */ + void StartProcessing( + const TRemConExtCallHandlingApiOperationId aOperation ); + + /** + * Creates service. + */ + MPhoneHandlerService* CreateServiceL( + const TRemConExtCallHandlingApiOperationId aOperation ); + + /** + * Initializes speed dial. + */ + void InitializeSpeedDialL(); + + /** + * Returns call status. + */ + void CallStatusL( RPhone::TLineInfo& aLineInfo ); + + /** + * Returns autolock status */ - virtual void DialCall( const TDesC8& aTelNumber ); - - /** - * From MRemConCallHandlingTargetObserver. Make multiparty call. - */ - virtual void MultipartyCalling( const TDesC8& aData ); - - /** - * Generates DTMF signal. - */ - virtual void GenerateDTMF( const TChar aChar ); - - /** - * From MRemConCallHandlingTargetObserver. Make a speed dial call. + TBool IsAutoLockOn() const; + + /** + * Returns BT accessory command status */ - virtual void SpeedDial( const TInt aIndex ); - - /** - * Starts processing service corresponding to key press. - */ - void StartProcessing( - const TRemConExtCallHandlingApiOperationId aOperation ); - - /** - * Creates service. - */ - MPhoneHandlerService* CreateServiceL( - const TRemConExtCallHandlingApiOperationId aOperation ); - - /** - * Returns call status. - */ - void CallStatusL( RPhone::TLineInfo& aLineInfo ); - - + TBool IsBTAccessoryCmd() const; + private: // Data // Provides e.g. service to listen accessory key presses. - CRemConInterfaceSelector* iInterfaceSelector; // owned + CRemConInterfaceSelector* iInterfaceSelector; // owned // API notifying PhoneCmdHandler about call handling key presses. - CRemConCallHandlingTarget* iTarget; // owned + CRemConCallHandlingTarget* iTarget; // owned // Phone number for dial call/speed dial. TPhCltTelephoneNumber iTelNumber; @@ -253,16 +270,13 @@ // Previous call state TInt iPrevState; - // Number of active calls - // Used to determine whether there's a multicall case when call state - TInt iActiveCalls; - // switch phonecall by press "Send" key TBool iSwitchCall; // Listens to phone call state changes. CPhoneHandlerCallState* iCallStateObserver; + CPhoneHandlerCallArray* iCallArray; public: // Friend classes diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDTMF.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDTMF.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDTMF.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ #define CPHONEHANDLERDTMF_H // INCLUDES -#include "phonehandlercallbase.h" -#include +#include "PhoneHandlerCallBase.h" +#include // CONSTANTS @@ -44,7 +44,7 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerDTMF ) : public CPhoneHandlerCallBase - + { public: // Constructors and destructor @@ -52,10 +52,10 @@ * Two-phased constructor. */ static CPhoneHandlerDTMF* NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation - = ERemConExtGenerateDTMF - ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation + = ERemConExtGenerateDTMF + ); /** * Destructor. @@ -99,7 +99,7 @@ * C++ default constructor. */ CPhoneHandlerDTMF( CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ); + TRemConExtCallHandlingApiOperationId aOperation ); /** * By default Symbian 2nd phase constructor is private. diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDialCall.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDialCall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDialCall.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ #define CPHONEHANDLERDIALCALL_H // INCLUDES -#include "phonehandlercallbase.h" -#include +#include "PhoneHandlerCallBase.h" +#include // CONSTANTS @@ -44,7 +44,7 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerDialCall ) : public CPhoneHandlerCallBase - + { public: // Constructors and destructor @@ -52,9 +52,9 @@ * Two-phased constructor. */ static CPhoneHandlerDialCall* NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation - = ERemConExtDialCall ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation + = ERemConExtDialCall ); /** * Destructor. @@ -62,7 +62,7 @@ virtual ~CPhoneHandlerDialCall(); public: // New functions - + public: // Functions from base classes /** @@ -97,15 +97,15 @@ /** * C++ default constructor. */ - CPhoneHandlerDialCall( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ); + CPhoneHandlerDialCall( + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ); /** * By default Symbian 2nd phase constructor is private. */ void ConstructL(); - + public: // Data protected: // Data diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerEndCall.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerEndCall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerEndCall.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPHONEHANDLERENDCALL_H // INCLUDES -#include "phonehandlercallbase.h" -#include +#include "PhoneHandlerCallBase.h" +#include // CONSTANTS @@ -43,7 +43,7 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerEndCall ) : public CPhoneHandlerCallBase - + { public: // Constructors and destructor @@ -51,9 +51,9 @@ * Two-phased constructor. */ static CPhoneHandlerEndCall* NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation - = ERemConExtEndCall ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation + = ERemConExtEndCall ); /** * Destructor. @@ -97,14 +97,14 @@ * C++ default constructor. */ CPhoneHandlerEndCall( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ); /** * By default Symbian 2nd phase constructor is private. */ void ConstructL(); - + public: // Data protected: // Data diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerMultipartyCall.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerMultipartyCall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerMultipartyCall.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPHONEHANDLERMULTIPARTYCALL_H // INCLUDES -#include "phonehandlercallbase.h" -#include +#include "PhoneHandlerCallBase.h" +#include // CONSTANTS @@ -43,7 +43,7 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerMultipartyCall ) : public CPhoneHandlerCallBase - + { public: // Constructors and destructor @@ -51,10 +51,10 @@ * Two-phased constructor. */ static CPhoneHandlerMultipartyCall* NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation - = ERemConExt3WaysCalling - ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation + = ERemConExt3WaysCalling + ); /** * Destructor. @@ -98,8 +98,8 @@ * C++ default constructor. */ CPhoneHandlerMultipartyCall( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ); /** * By default Symbian 2nd phase constructor is private. diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerRedial.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerRedial.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerRedial.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ #define CPHONEHANDLERLASTNUMBERREDIAL_H // INCLUDES -#include "phonehandlercallbase.h" -#include +#include "PhoneHandlerCallBase.h" +#include #include #include #include @@ -47,19 +47,19 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerLastNumberRedial ) : public CPhoneHandlerCallBase - + { - public: // Constructors and destructor + public: // Constructors and destructor /** * Two-phased constructor. */ static CPhoneHandlerLastNumberRedial* - NewL( CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation - = ERemConExtLastNumberRedial ); + NewL( CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation + = ERemConExtLastNumberRedial ); - /** + /** * Destructor. */ virtual ~CPhoneHandlerLastNumberRedial(); @@ -68,7 +68,7 @@ public: // Functions from base classes - /** + /** * From MPhoneHandlerService. Starts processing service. * @since S60 3.1 * @return void @@ -97,41 +97,41 @@ private: - /** + /** * C++ default constructor. */ CPhoneHandlerLastNumberRedial( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ); - /** + /** * By default Symbian 2nd phase constructor is private. */ void ConstructL(); - - public: // Data + + public: // Data protected: // Data private: // Data - // A handle to a file server session. + // A handle to a file server session. RFs iFsSession; // Log Engine implementation - CLogClient* iLogClientPtr; // owned + CLogClient* iLogClientPtr; // owned // A view on a recent event list. - CLogViewRecent* iLogViewRecentPtr; // owned - - // reference to control - CPhoneHandlerControl& iControl; - - // iOperation is used to give response to exact RemConExtensionApi + CLogViewRecent* iLogViewRecentPtr; // owned + + // reference to control + CPhoneHandlerControl& iControl; + + // iOperation is used to give response to exact RemConExtensionApi // command TRemConExtCallHandlingApiOperationId iOperation; - - public: // Friend classes + + public: // Friend classes protected: // Friend classes diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerResponse.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerResponse.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerResponse.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,9 +20,9 @@ #define CPHONEHANDLERRESPONSE_H // INCLUDES -#include "phonehandlerservice.h" -#include "phonehandlerobserver.h" -#include +#include "PhoneHandlerService.h" +#include "PhoneHandlerObserver.h" +#include // CONSTANTS @@ -45,9 +45,9 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerResponse ) : public CBase, - public MPhoneHandlerService, - public MPhoneHandlerObserver - + public MPhoneHandlerService, + public MPhoneHandlerObserver + { public: // Constructors and destructor @@ -63,7 +63,7 @@ public: // New functions - /** + /** * Sets response message. This method has to be called before Process() * is called. * @since S60 3.1 @@ -72,8 +72,8 @@ * @return void */ void SetResponse( TRemConExtCallHandlingApiOperationId aOperation, - TInt aError ); - + TInt aError ); + public: // Functions from base classes /** diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerVoiceDial.h --- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerVoiceDial.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerVoiceDial.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPHONEHANDLERVOICEDIAL_H // INCLUDES -#include "phonehandlercallbase.h" -#include +#include "PhoneHandlerCallBase.h" +#include // CONSTANTS @@ -43,7 +43,7 @@ * @since S60 3.1 */ NONSHARABLE_CLASS( CPhoneHandlerVoiceDial ) : public CPhoneHandlerCallBase - + { public: // Constructors and destructor @@ -51,9 +51,9 @@ * Two-phased constructor. */ static CPhoneHandlerVoiceDial* NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation = - ERemConExtVoiceDial ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation = + ERemConExtVoiceDial ); /** * Destructor. @@ -98,14 +98,14 @@ * C++ default constructor. */ CPhoneHandlerVoiceDial( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ); + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ); /** * By default Symbian 2nd phase constructor is private. */ void ConstructL(); - + public: // Data protected: // Data diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandler.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" -#include "PhoneHandler.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" +#include "PhoneHandler.h" // EXTERNAL DATA STRUCTURES @@ -60,9 +60,9 @@ void CPhoneHandler::ConstructL( CRemConInterfaceSelector* aIfSelector ) { COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandler::ConstructL() *aIfSelector=%d", aIfSelector ); - + iControl = CPhoneHandlerControl::NewL( aIfSelector ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandler::NewL @@ -86,9 +86,9 @@ // ----------------------------------------------------------------------------- // EXPORT_C CPhoneHandler* CPhoneHandler::NewL( - CRemConInterfaceSelector& aIfSelector ) - { - CPhoneHandler* self = new ( ELeave ) CPhoneHandler(); + CRemConInterfaceSelector& aIfSelector ) + { + CPhoneHandler* self = new ( ELeave ) CPhoneHandler(); CleanupStack::PushL( self ); self->ConstructL( &aIfSelector ); diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerActive.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerActive.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerActive.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "phonehandleractive.h" -#include "phonehandlerobserver.h" -#include "phonehandlerdebug.h" +#include "PhoneHandlerActive.h" +#include "PhoneHandlerObserver.h" +#include "PhoneHandlerDebug.h" // EXTERNAL DATA STRUCTURES @@ -43,28 +43,28 @@ // ============================ MEMBER FUNCTIONS =============================== CPhoneHandlerActive* CPhoneHandlerActive::NewL( MPhoneHandlerObserver& aObserver ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::NewL() start" ); - CPhoneHandlerActive* self = new(ELeave) CPhoneHandlerActive( aObserver ); - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::NewL() end" ); - return self; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::NewL() start" ); + CPhoneHandlerActive* self = new(ELeave) CPhoneHandlerActive( aObserver ); + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::NewL() end" ); + return self; + } CPhoneHandlerActive::~CPhoneHandlerActive() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::~CPhoneHandlerActive() start" ); - - Cancel(); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::~CPhoneHandlerActive() end" ); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::~CPhoneHandlerActive() start" ); + + Cancel(); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::~CPhoneHandlerActive() end" ); + } CPhoneHandlerActive::CPhoneHandlerActive( MPhoneHandlerObserver& aObserver ) -: CActive(CActive::EPriorityStandard), - iObserver(aObserver) - { - CActiveScheduler::Add(this); - } +: CActive(CActive::EPriorityStandard), + iObserver(aObserver) + { + CActiveScheduler::Add(this); + } // ----------------------------------------------------------------------------- // CPhoneHandlerActive::SetActive() @@ -72,9 +72,9 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerActive::SetActive() - { - CActive::SetActive(); - } + { + CActive::SetActive(); + } // ----------------------------------------------------------------------------- // CPhoneHandlerActive::RunL() @@ -83,13 +83,13 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerActive::RunL() - { - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerActive::RunL() iStatus.Int()=%d", iStatus.Int() ); - - TInt error( iStatus.Int() ); - iStatus = KErrNone; - iObserver.RequestCompleted( error ); - } + { + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerActive::RunL() iStatus.Int()=%d", iStatus.Int() ); + + TInt error( iStatus.Int() ); + iStatus = KErrNone; + iObserver.RequestCompleted( error ); + } // ----------------------------------------------------------------------------- // CPhoneHandlerActive::RunError @@ -104,7 +104,7 @@ aError = KErrNone; COM_TRACE_( "[AccFW:PHONECMDHANDLER] CPhoneHandlerActive::RunError() - return KErrNone" ); - + return aError; } @@ -115,11 +115,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerActive::DoCancel() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::DoCancel() start" ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::DoCancel() end" ); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::DoCancel() start" ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::DoCancel() end" ); + } // // End of file diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerAnswerCall.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerAnswerCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerAnswerCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,12 +17,12 @@ // INCLUDE FILES -#include "phonehandleranswercall.h" -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" -#include +#include "PhoneHandlerAnswerCall.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" +#include -#include +#include // EXTERNAL DATA STRUCTURES @@ -51,8 +51,8 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerAnswerCall::CPhoneHandlerAnswerCall( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) : iControl( aControl ), iOperation( aOperation ) { @@ -66,11 +66,11 @@ void CPhoneHandlerAnswerCall::ConstructL() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::ConstructL() start" ); - + LoadServiceL(); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::ConstructL() end" ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandlerAnswerCall::NewL @@ -78,21 +78,21 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerAnswerCall* CPhoneHandlerAnswerCall::NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::NewL() start" ); - + CPhoneHandlerAnswerCall* self = new( ELeave ) CPhoneHandlerAnswerCall( - aControl, - aOperation ); + aControl, + aOperation ); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::NewL() end" ); - + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::NewL() end" ); + return self; } @@ -100,7 +100,7 @@ CPhoneHandlerAnswerCall::~CPhoneHandlerAnswerCall() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::~CPhoneHandlerAnswerCall()" ); - + } // ----------------------------------------------------------------------------- @@ -110,12 +110,12 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerAnswerCall::Process() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::Process()" ); - - iCommandHandler->Ata( GetStatus() ); - Activate(); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::Process()" ); + + iCommandHandler->Ata( GetStatus() ); + Activate(); + } // ----------------------------------------------------------------------------- // CPhoneHandlerAnswerCall::Delete @@ -123,11 +123,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerAnswerCall::Delete() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::Delete()" ); - - delete this; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::Delete()" ); + + delete this; + } // ----------------------------------------------------------------------------- // CPhoneHandlerAnswerCall::RequestCompleted @@ -138,33 +138,33 @@ void CPhoneHandlerAnswerCall::RequestCompleted( const TInt aError ) { COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::RequestCompleted() aError=%d, iState=%d", aError, iState ); - - switch( iState ) - { - case EPhoneHandlerState1: - { - NextState(); - iControl.CommandInitiator().SendResponse( GetStatus(), - iOperation, - aError ); - Activate(); - break; - } - - case EPhoneHandlerState2: - { - IdleState(); - delete this; - break; - } - - default: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::RequestCompleted() Unspecified state" ); - break; - } - }; - } + + switch( iState ) + { + case EPhoneHandlerState1: + { + NextState(); + iControl.CommandInitiator().SendResponse( GetStatus(), + iOperation, + aError ); + Activate(); + break; + } + + case EPhoneHandlerState2: + { + IdleState(); + delete this; + break; + } + + default: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::RequestCompleted() Unspecified state" ); + break; + } + }; + } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallArray.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallArray.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,187 @@ +/* +* 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: Implements the class CPhoneHandlerCallArray +* +*/ + +#include +#include "PhoneHandlerCallArray.h" + +// --------------------------------------------------------------------------- +// CPhoneHandlerCallArray::NewL. +// --------------------------------------------------------------------------- +// +CPhoneHandlerCallArray* CPhoneHandlerCallArray::NewL( ) + { + CPhoneHandlerCallArray* self = new ( ELeave ) CPhoneHandlerCallArray( ); + return self; + } + +// --------------------------------------------------------------------------- +// Destructs the array including remaining calls. +// --------------------------------------------------------------------------- +// +CPhoneHandlerCallArray::~CPhoneHandlerCallArray( ) + { + TInt callCount = iCallArray.Count(); + + for (TInt callIndex = 0; callIndex < callCount; callIndex++) + { + TCallInfo* call = iCallArray[ callIndex ]; + delete call; + } + + iCallArray.Reset(); + iCallArray.Close(); + } + +// --------------------------------------------------------------------------- +// Iterates through call objects finding the call matching the given call index. +// --------------------------------------------------------------------------- +// +TCallInfo* CPhoneHandlerCallArray::FindCall( TInt aCallIndex ) + { + TInt callCount = iCallArray.Count(); + for (TInt callIndex = 0; callIndex < callCount; callIndex++) + { + TCallInfo* call = iCallArray[ callIndex ]; + if ( call ) + { + if ( call->CallIndex() == aCallIndex ) + { + return call; + } + } + } + + return NULL; + } + +// --------------------------------------------------------------------------- +// CPhoneHandlerCallArray::Add +// --------------------------------------------------------------------------- +// +void CPhoneHandlerCallArray::AddL( const MCall* aCall ) + { + //take heap based copy and add it to the array + TCallInfo* call = new( ELeave )TCallInfo; + + call->iIndex = aCall->CallIndex(); + call->iState = aCall->CallState(); + call->iType = aCall->CallType(); + call->iDirection = aCall->CallDirection(); + call->iEmergencyCall = aCall->IsEmergency(); + call->iServiceId = aCall->ServiceId(); + + CleanupStack::PushL( call ); + iCallArray.AppendL( call ); + CleanupStack::Pop( call ); + } + +// --------------------------------------------------------------------------- +// CPhoneHandlerCallArray::Remove +// --------------------------------------------------------------------------- +// +TInt CPhoneHandlerCallArray::Remove( TCallInfo* aCall ) + { + TInt index = iCallArray.Find( aCall ); + if ( index != KErrNotFound ) + { + TCallInfo* call = iCallArray[ index ]; + delete call; + iCallArray.Remove( index ); + return KErrNone; + } + return KErrNotFound; + } + +// --------------------------------------------------------------------------- +// CPhoneHandlerCallArray::CallCount +// --------------------------------------------------------------------------- +// +TInt CPhoneHandlerCallArray::CallCount( ) + { + return iCallArray.Count(); + } + +//--------------------------------------------------------------------------- +// CPhoneHandlerCallArray::CallByState +// --------------------------------------------------------------------------- +// +TCallInfo* CPhoneHandlerCallArray::CallByState( TInt aState ) + { + TCallInfo* call; + TInt callCount = iCallArray.Count(); + for (TInt callIndex = 0; callIndex < callCount; callIndex++) + { + call = iCallArray[ callIndex ]; + + if( call->CallState() == aState) + { + return call; + } + } + return NULL; + } + +// --------------------------------------------------------------------------- +// Constructs the monitor. +// --------------------------------------------------------------------------- +// +CPhoneHandlerCallArray::CPhoneHandlerCallArray() + { + } + +//--------------------------------------------------------------------------- +// CPhoneHandlerCallArray::ConnectedCallCount +// --------------------------------------------------------------------------- +// +TInt CPhoneHandlerCallArray::ConnectedCallCount() + { + TInt callCount = iCallArray.Count(); + TInt connectedCalls = 0; + for ( TInt callIndex = 0; callIndex < callCount; callIndex++ ) + { + MCall* call = iCallArray[ callIndex ]; + if ( CCPCall::EStateConnected == call->CallState() ) + { + connectedCalls++; + } + } + return connectedCalls; + } + +//--------------------------------------------------------------------------- +// CPhoneHandlerCallArray::ExistingCallCount +// --------------------------------------------------------------------------- +// +TInt CPhoneHandlerCallArray::ExistingCallCount() + { + TInt callCount = iCallArray.Count(); + TInt existingCalls = 0; + for ( TInt callIndex = 0; callIndex < callCount; callIndex++ ) + { + TCallInfo* call = iCallArray[ callIndex ]; + CCPCall::TCallState callState = call->CallState(); + + if( CCPCall::EStateIdle != callState + && CCPCall::EStateDisconnecting != callState ) + { + existingCalls++; + } + } + return existingCalls; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallBase.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallBase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallBase.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,11 +18,11 @@ // INCLUDE FILES -#include "phonehandlercallbase.h" -#include "phonehandleractive.h" -#include "phonehandlerdebug.h" +#include "PhoneHandlerCallBase.h" +#include "PhoneHandlerActive.h" +#include "PhoneHandlerDebug.h" -#include +#include // EXTERNAL DATA STRUCTURES @@ -51,7 +51,7 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerCallBase::CPhoneHandlerCallBase() - : iState( EPhoneHandlerState1 ) + : iState( EPhoneHandlerState1 ) { } @@ -59,7 +59,7 @@ CPhoneHandlerCallBase::~CPhoneHandlerCallBase() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::~CPhoneHandlerCallBase()" ); - + iServer.Close(); delete iCommandHandler; delete iActive; @@ -85,7 +85,7 @@ iActive = CPhoneHandlerActive::NewL( *this ); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::LoadServiceL() end" ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandlerCallBase::NextState @@ -94,16 +94,16 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerCallBase::NextState() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::NextState() start" ); - - TInt temp = static_cast( iState ); - ++temp; - iState = static_cast( temp ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::NextState() end" ); - } - + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::NextState() start" ); + + TInt temp = static_cast( iState ); + ++temp; + iState = static_cast( temp ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::NextState() end" ); + } + // ----------------------------------------------------------------------------- // CPhoneHandlerCallBase::IdleState // Sets a specific state when service has been completed. @@ -111,13 +111,13 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerCallBase::IdleState() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::IdleState() start" ); - - iState = EPhoneHandlerStateIdle; - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::IdleState() end" ); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::IdleState() start" ); + + iState = EPhoneHandlerStateIdle; + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::IdleState() end" ); + } // ----------------------------------------------------------------------------- // CPhoneHandlerCallBase::GetStatus @@ -126,26 +126,26 @@ // ----------------------------------------------------------------------------- // TRequestStatus& CPhoneHandlerCallBase::GetStatus() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::GetStatus() start" ); - - return iActive->iStatus; - } - + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::GetStatus() start" ); + + return iActive->iStatus; + } + // ----------------------------------------------------------------------------- // CPhoneHandlerCallBase::Activate // Activates an active object for asynchronous calls. // (other items were commented in a header). // ----------------------------------------------------------------------------- -// +// void CPhoneHandlerCallBase::Activate() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::Activate() start" ); - - iActive->SetActive(); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::Activate() end" ); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::Activate() start" ); + + iActive->SetActive(); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::Activate() end" ); + } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallState.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallState.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallState.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,11 +17,16 @@ // INCLUDE FILES -#include "phonehandlercallstate.h" -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" +#include "PhoneHandlerCallState.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" #include +#include +#include +#include + + // EXTERNAL DATA STRUCTURES // EXTERNAL FUNCTION PROTOTYPES @@ -50,11 +55,9 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerCallState::CPhoneHandlerCallState( CPhoneHandlerControl& aControl ) -: CActive(CActive::EPriorityStandard), - iControl( aControl ) - { - CActiveScheduler::Add(this); - } +: iControl( aControl ) + { + } // ----------------------------------------------------------------------------- // CPhoneHandlerCallState::ConstructL @@ -62,94 +65,70 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerCallState::ConstructL() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::ConstructL() start" ); - - // Allows CPhoneHandlerCallState to start to listen S60 call states. - User::LeaveIfError( - iProperty.Attach( KPSUidCtsyCallInformation, KCTsyCallState ) ); - - Subscribe(); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::ConstructL() end" ); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::ConstructL() start" ); + + // Allows CPhoneHandlerCallState to start to listen call states. + iInfo = CCallInformation::NewL(); + iInfo->NotifyCallInformationChanges(*this); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::ConstructL() end" ); + } // ----------------------------------------------------------------------------- // CPhoneHandlerCallState::NewL // Two-phased constructor. // ----------------------------------------------------------------------------- CPhoneHandlerCallState* CPhoneHandlerCallState::NewL( CPhoneHandlerControl& aControl ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::NewL()" ); - - CPhoneHandlerCallState* self = new(ELeave) CPhoneHandlerCallState( aControl ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - return self; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::NewL()" ); + + CPhoneHandlerCallState* self = new(ELeave) CPhoneHandlerCallState( aControl ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + + return self; + } // Destructor CPhoneHandlerCallState::~CPhoneHandlerCallState() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::~CPhoneHandlerCallState() start" ); - - Cancel(); - iProperty.Cancel(); - iProperty.Close(); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::~CPhoneHandlerCallState() end" ); + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::~CPhoneHandlerCallState() start" ); + + if ( iInfo ) + { + iInfo->CancelNotification(); + delete iInfo; + } + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::~CPhoneHandlerCallState() end" ); + } + +// ----------------------------------------------------------------------------- +// CPhoneHandlerCallState::CallInformationChanged +// ----------------------------------------------------------------------------- +// +void CPhoneHandlerCallState::CallInformationChanged() + { + TRAP_IGNORE( CallInformationChangedL() ); } // ----------------------------------------------------------------------------- -// CPhoneHandlerCallState::RunL() -// Informs caller of an asynchronous request that it has been completed. -// (other items were commented in a header). +// CPhoneHandlerCallState::CallInformationChangedL // ----------------------------------------------------------------------------- // -void CPhoneHandlerCallState::RunL() +void CPhoneHandlerCallState::CallInformationChangedL() { - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerCallState::RunL() - return code = %d", iStatus.Int() ); - - TInt state( 0 ); - iProperty.Get( state ); - - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerCallState - KTelephonyCallState = %d", state ); - - if( iStatus.Int() == KErrNone ) - { - iControl.NotifyCallState( state ); - } - - Subscribe(); + CCallInfoIter& iter = iInfo->GetCallsL(); + for( iter.First(); !iter.IsDone(); iter.Next() ) + { + const MCall* call ( &iter.Current() ); + if ( call ) + { + iControl.NotifyCallStateL( call ); + } + } } -// ----------------------------------------------------------------------------- -// CPhoneHandlerCallState::DoCancel -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CPhoneHandlerCallState::DoCancel() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::DoCancel()" ); - - iProperty.Cancel(); - } - -// ----------------------------------------------------------------------------- -// CPhoneHandlerCallState::Subscribe -// Start to listen changes in call state. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CPhoneHandlerCallState::Subscribe() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::Subscribe()" ); - - iProperty.Subscribe( iStatus ); - SetActive(); - } - -// // End of file diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerControl.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerControl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerControl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -12,35 +12,34 @@ * Contributors: * * Description: Receives call handling related key presses from accessories and -* executes them. +* executes them. * */ // INCLUDE FILES -#include "phonehandlercontrol.h" -#include "phonehandlerservice.h" -#include "phonehandleranswercall.h" -#include "phonehandlerendcall.h" -#include "phonehandlerdialcall.h" -#include "phonehandlervoicedial.h" -#include "phonehandlerredial.h" -#include "phonehandlermultipartycall.h" -#include "phonehandlerdtmf.h" -#include "phonehandleractive.h" -#include "phonehandlerresponse.h" -#include "phonehandlercallstate.h" -#include "phonehandlerdebug.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerService.h" +#include "PhoneHandlerAnswerCall.h" +#include "PhoneHandlerEndCall.h" +#include "PhoneHandlerDialCall.h" +#include "PhoneHandlerVoiceDial.h" +#include "PhoneHandlerRedial.h" +#include "PhoneHandlerMultipartyCall.h" +#include "PhoneHandlerDTMF.h" +#include "PhoneHandlerActive.h" +#include "PhoneHandlerResponse.h" +#include "PhoneHandlerCallState.h" +#include "PhoneHandlerDebug.h" #include -#include +#include +#include #include - -#if 0 -#include -#endif - #include +#include +#include "PhoneHandlerCallArray.h" +#include // EXTERNAL DATA STRUCTURES @@ -72,7 +71,7 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerControl::CPhoneHandlerControl() - : iPrevState( EPSCTsyCallStateNone ) + : iPrevState( EPSCTsyCallStateNone ) { } @@ -84,29 +83,30 @@ void CPhoneHandlerControl::ConstructL( CRemConInterfaceSelector* aIfSelector ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() start" ); - + if( !aIfSelector ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() Create connection to RemCon." ); - - // Target connection to RemCon FW hasn't been done. - iInterfaceSelector = CRemConInterfaceSelector::NewL(); - iTarget = CRemConCallHandlingTarget::NewL( *iInterfaceSelector, *this ); - iInterfaceSelector->OpenTargetL(); - } - else - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() Don't create connection to RemCon." ); - - // Connection to RemCon FW as target has already been done in a process. - iTarget = CRemConCallHandlingTarget::NewL( *aIfSelector, *this ); - } - - iResponse = CPhoneHandlerResponse::NewL( *this ); - iCallStateObserver = CPhoneHandlerCallState::NewL( *this ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() end" ); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() Create connection to RemCon." ); + + // Target connection to RemCon FW hasn't been done. + iInterfaceSelector = CRemConInterfaceSelector::NewL(); + iTarget = CRemConCallHandlingTarget::NewL( *iInterfaceSelector, *this ); + iInterfaceSelector->OpenTargetL(); + } + else + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() Don't create connection to RemCon." ); + + // Connection to RemCon FW as target has already been done in a process. + iTarget = CRemConCallHandlingTarget::NewL( *aIfSelector, *this ); + } + + iResponse = CPhoneHandlerResponse::NewL( *this ); + iCallStateObserver = CPhoneHandlerCallState::NewL( *this ); + iCallArray = CPhoneHandlerCallArray::NewL(); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() end" ); + } // ----------------------------------------------------------------------------- // CPhoneHandlerControl::NewL @@ -114,7 +114,7 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerControl* CPhoneHandlerControl::NewL( - CRemConInterfaceSelector* aIfSelector ) + CRemConInterfaceSelector* aIfSelector ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NewL() start" ); @@ -135,20 +135,22 @@ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::~CPhoneHandlerControl() start" ); if( iInterfaceSelector ) - { - delete iInterfaceSelector; - } + { + delete iInterfaceSelector; + } if( iResponse ) - { - iResponse->Delete(); - } - + { + iResponse->Delete(); + } + if( iCallStateObserver ) - { - delete iCallStateObserver; - } - + { + delete iCallStateObserver; + } + + delete iCallArray; + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::~CPhoneHandlerControl() end" ); } @@ -229,32 +231,37 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -void CPhoneHandlerControl::NotifyCallState( const TInt aState ) +void CPhoneHandlerControl::NotifyCallStateL( const MCall* aCall ) { - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState() aState=%d", aState ); + COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState() aCall.CallIndex:%d, aCall.CallState:%d", + aCall->CallIndex(), aCall->CallState() ); - if( aState == EPSCTsyCallStateConnected && iPrevState != EPSCTsyCallStateHold ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls++" ); - - iActiveCalls++; - } - else if( aState == EPSCTsyCallStateDisconnecting && - ( iPrevState == EPSCTsyCallStateConnected || iPrevState == EPSCTsyCallStateHold )) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls--" ); - - iActiveCalls--; - } - else if( aState == EPSCTsyCallStateNone ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls = 0" ); - iActiveCalls = 0; - } - - iPrevState = aState; - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState() iActiveCalls=%d", iActiveCalls ); - } + TCallInfo* call = iCallArray->FindCall( aCall->CallIndex() ); + + if ( call ) + { + // If the call is in idle or disconnecting state it can be removed from the array + if ( CCPCall::EStateIdle == aCall->CallState() + || CCPCall::EStateDisconnecting == aCall->CallState() ) + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): remove call" ); + iCallArray->Remove( call ); + } + else + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): update existing call" ); + iCallArray->Remove( call ); + iCallArray->AddL( aCall ); + } + } + else + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): new call" ); + iCallArray->AddL( aCall ); + } + COM_TRACE_3( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState() connected:%d existing:%d total:%d", + iCallArray->ConnectedCallCount(), iCallArray->ExistingCallCount(), iCallArray->CallCount() ); + } // ----------------------------------------------------------------------------- // CPhoneHandlerControl::AnswerCall @@ -262,26 +269,26 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerControl::AnswerCall() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerCall() start" ); - - StartProcessing( ERemConExtAnswerCall ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerCall() end" ); + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerCall() start" ); + + StartProcessing( ERemConExtAnswerCall ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerCall() end" ); } - + // ----------------------------------------------------------------------------- // CPhoneHandlerControl::EndCall // (other items were commented in a header). // ----------------------------------------------------------------------------- // void CPhoneHandlerControl::EndCall() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::EndCall() start" ); + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::EndCall() start" ); StartProcessing( ERemConExtEndCall ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::EndCall() end" ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::EndCall() end" ); } // ----------------------------------------------------------------------------- @@ -290,80 +297,50 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerControl::AnswerEndCall() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerEndCall() start" ); + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerEndCall() start" ); StartProcessing( ERemConExtAnswerEnd ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerEndCall() end" ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerEndCall() end" ); } // ----------------------------------------------------------------------------- // CPhoneHandlerControl::VoiceDial +// Dummy implementation. Operation implemented in SIND // (other items were commented in a header). // ----------------------------------------------------------------------------- // -#if 0 // SCB CR EHSA-7APJWF: SIND subscribes to RemCon directly -void CPhoneHandlerControl::VoiceDial( const TBool aActivate ) - { - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial() aActivate=%d", aActivate ); - - TInt callState( EPSCTsyCallStateUninitialized ); - iProperty.Get( KPSUidCtsyCallInformation, KCTsyCallState, callState ); - - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() call state = %d", callState ); - - if( callState == EPSCTsyCallStateUninitialized || - callState == EPSCTsyCallStateNone ) - { - TInt voiceUiState( KVoiceUiIsClose ); - iProperty.Get( KPSUidVoiceUiAccMonitor, KVoiceUiOpenKey, voiceUiState ); - - if( voiceUiState == KVoiceUiIsOpen ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial() voice UI is open!" ); - iProperty.Set( KPSUidVoiceUiAccMonitor , KVoiceUiAccessoryEvent, ERemConExtVoiceDial ); - iResponse->SetResponse( ERemConExtVoiceDial, KErrNone ); - iResponse->Process(); - } - else - { - iActivate = aActivate; - StartProcessing( ERemConExtVoiceDial ); - } - } - else - { - iResponse->SetResponse( ERemConExtVoiceDial, KErrNone ); - iResponse->Process(); - } - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial() end" ); - } -#else void CPhoneHandlerControl::VoiceDial( const TBool /*aActivate*/ ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial()" ); - + iResponse->SetResponse( ERemConExtVoiceDial, KErrNone ); iResponse->Process(); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial() end" ); } -#endif + // ----------------------------------------------------------------------------- // CPhoneHandlerControl::LastNumberRedial // (other items were commented in a header). // ----------------------------------------------------------------------------- // void CPhoneHandlerControl::LastNumberRedial( ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::LastNumberRedial() start" ); - - StartProcessing( ERemConExtLastNumberRedial ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::LastNumberRedial() end" ); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::LastNumberRedial() start" ); + + if ( IsAutoLockOn() && !IsBTAccessoryCmd() ) + { + iResponse->SetResponse( ERemConExtLastNumberRedial, KErrAccessDenied ); + iResponse->Process(); + return; + } + + StartProcessing( ERemConExtLastNumberRedial ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::LastNumberRedial() end" ); + } // ----------------------------------------------------------------------------- // CPhoneHandlerControl::DialCall @@ -371,24 +348,31 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerControl::DialCall( const TDesC8& aTelNumber ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() start" ); + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() start" ); + if ( IsAutoLockOn() && !IsBTAccessoryCmd() ) + { + iResponse->SetResponse( ERemConExtDialCall, KErrAccessDenied ); + iResponse->Process(); + return; + } + // Check aTelNumber range - if( KPhCltTelephoneNumberLength < aTelNumber.Length() ) - { - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() number value=%d too long", aTelNumber.Size() ); - iResponse->SetResponse( ERemConExtDialCall, KErrArgument ); - iResponse->Process(); - return; - } - - iTelNumber.Copy( aTelNumber ); - + if( KPhCltTelephoneNumberLength < aTelNumber.Length() ) + { + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() number value=%d too long", aTelNumber.Size() ); + iResponse->SetResponse( ERemConExtDialCall, KErrArgument ); + iResponse->Process(); + return; + } + + iTelNumber.Copy( aTelNumber ); + StartProcessing( ERemConExtDialCall ); - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() end" ); - } + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() end" ); + } // ----------------------------------------------------------------------------- // CPhoneHandlerControl::MultipartyCalling @@ -416,79 +400,85 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerControl::MultipartyCalling( const TDesC8& aData ) - { - TBool error( EFalse ); - iChldCommand = 0; - iChldCallNumber = 0; - TBuf8< KRemConExtParamMaxLength > buf( aData ); - buf.Trim(); - TInt length = buf.Length(); - - // Check invalid number of characters - if ( length < KMultipartyCallMinParam || length > KMultipartyCallMaxParam ) - { - error = ETrue; - } - else - { - TLex8 param; - // Set command - param.Assign( buf.Mid( 0, 1 ) ); - if( param.Val( iChldCommand ) != KErrNone ) - { - error = ETrue; - } - else if ( length == KMultipartyCallMaxParam ) - { - // Set call number - param.Assign( buf.Mid(1) ); - if( param.Val( iChldCallNumber ) != KErrNone ) - { - error = ETrue; - } - } - } + { + TBool error( EFalse ); + iChldCommand = 0; + iChldCallNumber = 0; + TBuf8< KRemConExtParamMaxLength > buf( aData ); + buf.Trim(); + TInt length = buf.Length(); + + // Check invalid number of characters + if ( length < KMultipartyCallMinParam || length > KMultipartyCallMaxParam ) + { + error = ETrue; + } + else + { + TLex8 param; + // Set command + param.Assign( buf.Mid( 0, 1 ) ); + if( param.Val( iChldCommand ) != KErrNone ) + { + error = ETrue; + } + else if ( length == KMultipartyCallMaxParam ) + { + // Set call number + param.Assign( buf.Mid(1) ); + if( param.Val( iChldCallNumber ) != KErrNone ) + { + error = ETrue; + } + } + } - if( error ) - { - // Invalid command - iResponse->SetResponse( ERemConExt3WaysCalling, KErrArgument ); - iResponse->Process(); - return; - } - - COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerControl::MultipartyCalling() iChldCommand=%d, iChldCallNumber=%d", iChldCommand, iChldCallNumber ); - - StartProcessing( ERemConExt3WaysCalling ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::MultipartyCalling() end" ); - } - + if( error ) + { + // Invalid command + iResponse->SetResponse( ERemConExt3WaysCalling, KErrArgument ); + iResponse->Process(); + return; + } + + COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerControl::MultipartyCalling() iChldCommand=%d, iChldCallNumber=%d", iChldCommand, iChldCallNumber ); + + StartProcessing( ERemConExt3WaysCalling ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::MultipartyCalling() end" ); + } + // ----------------------------------------------------------------------------- // CPhoneHandlerControl::GenerateDTMF // (other items were commented in a header). // ----------------------------------------------------------------------------- // void CPhoneHandlerControl::GenerateDTMF( const TChar aChar ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::GenerateDTMF() start" ); - - iChar = aChar; - - StartProcessing( ERemConExtGenerateDTMF ); - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::GenerateDTMF() end" ); - } - + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::GenerateDTMF() start" ); + + iChar = aChar; + + StartProcessing( ERemConExtGenerateDTMF ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::GenerateDTMF() end" ); + } + // ----------------------------------------------------------------------------- // CPhoneHandlerControl::SpeedDial // (other items were commented in a header). // ----------------------------------------------------------------------------- // -void CPhoneHandlerControl::SpeedDial( const TInt /*aIndex*/ ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::SpeedDial() - Not Supported" ); - } +void CPhoneHandlerControl::SpeedDial( const TInt aIndex ) + { + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::SpeedDial() aIndex=%d", aIndex ); + + iIndex = aIndex; + + StartProcessing( ERemConExtSpeedDial ); + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::SpeedDial() end" ); + } // ----------------------------------------------------------------------------- // CPhoneHandlerControl::StartProcessing @@ -497,41 +487,41 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -void CPhoneHandlerControl::StartProcessing( - const TRemConExtCallHandlingApiOperationId aOperation ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing() start" ); - - // Create a service - MPhoneHandlerService* service = NULL; - TInt error( KErrNone ); - TRAP( error, service = CreateServiceL( aOperation ) ); - - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() returned %d", error ); - - if( error ) - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing(): service wasn't created succesfully." ); - - // An error happened. Delete service, if it exists. - if( service ) - { - service->Delete(); - service = NULL; - } - - iResponse->SetResponse( aOperation, error ); - iResponse->Process(); - return; - } - else - { - // start service - service->Process(); - iSwitchCall = EFalse; - } - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing() end" ); +void CPhoneHandlerControl::StartProcessing( + const TRemConExtCallHandlingApiOperationId aOperation ) + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing() start" ); + + // Create a service + MPhoneHandlerService* service = NULL; + TInt error( KErrNone ); + TRAP( error, service = CreateServiceL( aOperation ) ); + + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() returned %d", error ); + + if( error ) + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing(): service wasn't created succesfully." ); + + // An error happened. Delete service, if it exists. + if( service ) + { + service->Delete(); + service = NULL; + } + + iResponse->SetResponse( aOperation, error ); + iResponse->Process(); + return; + } + else + { + // start service + service->Process(); + iSwitchCall = EFalse; + } + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing() end" ); } // ----------------------------------------------------------------------------- @@ -540,7 +530,7 @@ // ----------------------------------------------------------------------------- // MPhoneHandlerService* CPhoneHandlerControl:: - CreateServiceL( const TRemConExtCallHandlingApiOperationId aOperation ) + CreateServiceL( const TRemConExtCallHandlingApiOperationId aOperation ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() start" ); @@ -549,152 +539,152 @@ switch( aOperation ) { case ERemConExtAnswerCall: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtAnswerCall command" ); - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - iActiveCalls is %d", iActiveCalls ); + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtAnswerCall command" ); + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - iCallArray->ExistingCallCount() is %d", iCallArray->ExistingCallCount() ); - /* - if( iActiveCalls > 0 ) - { - // Multiparty call - iSwitchCall = ETrue; - pService = CPhoneHandlerMultipartyCall::NewL( *this ); - } - else - { - // non-multiparty call - pService = CPhoneHandlerAnswerCall::NewL( *this ); - } - */ - pService = CPhoneHandlerAnswerCall::NewL( *this ); + /* + if( iActiveCalls > 0 ) + { + // Multiparty call + iSwitchCall = ETrue; + pService = CPhoneHandlerMultipartyCall::NewL( *this ); + } + else + { + // non-multiparty call + pService = CPhoneHandlerAnswerCall::NewL( *this ); + } + */ + pService = CPhoneHandlerAnswerCall::NewL( *this ); - break; - } - + break; + } + case ERemConExtEndCall: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtEndCall command" ); - - pService = CPhoneHandlerEndCall::NewL( *this ); - - break; - } - + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtEndCall command" ); + + pService = CPhoneHandlerEndCall::NewL( *this ); + + break; + } + case ERemConExtAnswerEnd: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtAnswerEnd command" ); - - TInt callState( EPSCTsyCallStateUninitialized ); - iProperty.Get( KPSUidCtsyCallInformation, KCTsyCallState, callState ); - - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() call state = %d", callState ); - - if( callState != EPSCTsyCallStateUninitialized && - callState != EPSCTsyCallStateNone && - callState != EPSCTsyCallStateDisconnecting ) - { - if( callState == EPSCTsyCallStateAlerting || - callState == EPSCTsyCallStateDialling || - callState == EPSCTsyCallStateAnswering || - callState == EPSCTsyCallStateConnected || - callState == EPSCTsyCallStateHold ) - { - pService = CPhoneHandlerEndCall::NewL( *this, - aOperation ); - } - // callState == EPSTelephonyCallStateRinging - else - { - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() iActiveCalls = %d", iActiveCalls ); - if( iActiveCalls > 0 ) - { - // multicall case : End call that has existed longer. - // (From UI viewpoint ringing call is in waiting state.) - pService = CPhoneHandlerEndCall::NewL( *this, - aOperation ); - if( callState == EPSCTsyCallStateRinging ) - { - // In multiparty case the telephony key is not - // updated. The call amount is updated manually. - iActiveCalls--; - } - } - else - { - pService = CPhoneHandlerAnswerCall::NewL( - *this, - aOperation ); - } - } - } - else - { - // Send / end button was pressed when there were not - // any calls active. Response has to be sent back to accessory - // at least for following reasons: - - // 1. RemCon FW releases message related memory only when response - // is sent back to accessory. - - // 2. BT accessory key press producing ERemConExtAnswerEnd - // operation has some other meaning than answer/end call - // and it's processed by proper client. However, there - // might be a situation where proper client isn't active - // and can't process command. In any case RemCon/BT accessory - // requires response to command. That's why PhoneCmdHandler - // sends reponse to command. - - iResponse->SetResponse( aOperation, KErrNone ); - pService = iResponse; - } - break; - } - - case ERemConExtDialCall: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtDialCall command" ); - - pService = CPhoneHandlerDialCall::NewL( *this ); - break; - } - - case ERemConExtVoiceDial: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtVoiceDial command" ); - - pService = CPhoneHandlerVoiceDial::NewL( *this ); - break; - } - + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtAnswerEnd command" ); + + if( iCallArray->ExistingCallCount() ) + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - call(s) exist" ); + // If only one call exists and it's state is CCPCall::EStateQueued, + // it is actually in ringing state and should be answered. + if ( NULL == iCallArray->CallByState( CCPCall::EStateRinging ) + && ( iCallArray->ExistingCallCount() == 1 + && NULL == iCallArray->CallByState( CCPCall::EStateQueued ) ) ) + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - no ringing calls" ); + pService = CPhoneHandlerEndCall::NewL( *this, + aOperation ); + } + // Ringing call(s) exist + else + { + if( iCallArray->ExistingCallCount() > 1 ) + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - several ringing calls" ); + // multicall case : End call that has existed longer. + // (From UI viewpoint ringing call is in waiting state.) + pService = CPhoneHandlerEndCall::NewL( *this, + aOperation ); + } + else + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - single ringing call" ); + pService = CPhoneHandlerAnswerCall::NewL( + *this, + aOperation ); + } + } + } + else + { + // Send / end button was pressed when there were not + // any calls active. Response has to be sent back to accessory + // at least for following reasons: + + // 1. RemCon FW releases message related memory only when response + // is sent back to accessory. + + // 2. BT accessory key press producing ERemConExtAnswerEnd + // operation has some other meaning than answer/end call + // and it's processed by proper client. However, there + // might be a situation where proper client isn't active + // and can't process command. In any case RemCon/BT accessory + // requires response to command. That's why PhoneCmdHandler + // sends reponse to command. + + iResponse->SetResponse( aOperation, KErrNone ); + pService = iResponse; + } + break; + } + + case ERemConExtDialCall: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtDialCall command" ); + + pService = CPhoneHandlerDialCall::NewL( *this ); + break; + } + + case ERemConExtVoiceDial: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtVoiceDial command" ); + + pService = CPhoneHandlerVoiceDial::NewL( *this ); + break; + } + case ERemConExtLastNumberRedial: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtLastNumberRedial command" ); - - pService = CPhoneHandlerLastNumberRedial::NewL( *this ); - break; - } - - case ERemConExt3WaysCalling: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExt3WaysCalling command" ); - - pService = CPhoneHandlerMultipartyCall::NewL( *this ); - break; - } - - case ERemConExtGenerateDTMF: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtGenerateDTMF command" ); - - pService = CPhoneHandlerDTMF::NewL( *this ); - break; - } - + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtLastNumberRedial command" ); + + pService = CPhoneHandlerLastNumberRedial::NewL( *this ); + break; + } + + case ERemConExt3WaysCalling: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExt3WaysCalling command" ); + + pService = CPhoneHandlerMultipartyCall::NewL( *this ); + break; + } + + case ERemConExtGenerateDTMF: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtGenerateDTMF command" ); + + pService = CPhoneHandlerDTMF::NewL( *this ); + break; + } + + case ERemConExtSpeedDial: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtSpeedDial command" ); + + InitializeSpeedDialL(); + pService = CPhoneHandlerDialCall::NewL( *this, + aOperation ); + break; + } + default: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() Unspecified state" ); - break; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() Unspecified state" ); + break; + } }; COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() end, %d", pService ); @@ -702,6 +692,41 @@ } // ----------------------------------------------------------------------------- +// CPhoneHandlerControl::InitializeSpeedDialL +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CPhoneHandlerControl::InitializeSpeedDialL() + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() start" ); + + // first check contack engine is not in busy + TInt cntEngState( 0 ); + TInt err = iProperty.Get( KUidSystemCategory, conn::KUidBackupRestoreKey, cntEngState ); + + if( err == KErrNotFound || cntEngState == 0 || + cntEngState & conn::KBURPartTypeMask == conn::EBURNormal || + cntEngState & conn::KBackupIncTypeMask == conn::ENoBackup ) + { + // Get phone number from phonebook by index + CPbkContactEngine* ptr = CPbkContactEngine::NewL(); + CleanupStack::PushL( ptr ); + TRACE_ASSERT( ptr != NULL ); + ptr->GetSpeedDialFieldL( iIndex, iTelNumber ); + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() speed dial number is %S", &iTelNumber ); + CleanupStack::PopAndDestroy( ptr ); + } + else + { + // contact engine is in busy + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() contact engine is in backup/restore" ); + User::Leave( KErrInUse ); + } + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() end" ); + } + +// ----------------------------------------------------------------------------- // CPhoneHandlerControl::SwitchCall // (other items were commented in a header). // ----------------------------------------------------------------------------- @@ -709,7 +734,52 @@ TBool CPhoneHandlerControl::SwitchCall() { return iSwitchCall; - } + } + +// --------------------------------------------------------- +// CPhoneHandlerControl::IsAutoLockOn +// --------------------------------------------------------- +// +TBool CPhoneHandlerControl::IsAutoLockOn() const + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::IsAutoLockOn() start " ); + TInt err( KErrNone ); + TInt value( EAutolockStatusUninitialized ); + + err = RProperty::Get( KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus, value ); + if ( err != KErrNone ) + { + value = err; + } + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::IsAutoLockOn() autolock value = %d", value ); + + return value > EAutolockOff ? ETrue : EFalse; + + } +// --------------------------------------------------------- +// CPhoneHandlerControl::IsBTAccessoryCmd +// --------------------------------------------------------- +// +TBool CPhoneHandlerControl::IsBTAccessoryCmd() const + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::IsBTAccessoryCmd() start " ); + TBool retval( EFalse ); + + TRemConExtCmdSource source; + iTarget->GetCommandSourceInfo( source ); + if ( source == ERemConExtCmdSourceBluetooth ) + { + retval = ETrue; + } + + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::IsBTAccessoryCmd() GetCommandSourceInfo = %d", source ); + + return retval; + } + + + + // ======================== OTHER EXPORTED FUNCTIONS =========================== // End of File diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDTMF.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDTMF.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDTMF.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,12 +17,12 @@ // INCLUDE FILES -#include "phonehandlerdtmf.h" -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" -#include +#include "PhoneHandlerDTMF.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" +#include -#include +#include // EXTERNAL DATA STRUCTURES @@ -52,8 +52,8 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerDTMF::CPhoneHandlerDTMF( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) : iControl( aControl ), iOperation( aOperation ) { @@ -67,11 +67,11 @@ void CPhoneHandlerDTMF::ConstructL() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::ConstructL() start" ); - + LoadServiceL(); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::ConstructL() end" ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandlerDTMF::NewL @@ -79,13 +79,13 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerDTMF* CPhoneHandlerDTMF::NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::NewL()" ); - + CPhoneHandlerDTMF* self = new( ELeave ) CPhoneHandlerDTMF( aControl, - aOperation ); + aOperation ); CleanupStack::PushL( self ); self->ConstructL(); @@ -99,7 +99,7 @@ CPhoneHandlerDTMF::~CPhoneHandlerDTMF() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::~CPhoneHandlerDTMF()" ); - + } // ----------------------------------------------------------------------------- @@ -109,14 +109,14 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerDTMF::Process() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::Process()" ); - - iCommandHandler->Vts( GetStatus(), - iControl.Tone(), - EPhCltDtmfNotUsed ); - Activate(); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::Process()" ); + + iCommandHandler->Vts( GetStatus(), + iControl.Tone(), + EPhCltDtmfNotUsed ); + Activate(); + } // ----------------------------------------------------------------------------- // CPhoneHandlerDTMF::Delete @@ -124,11 +124,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerDTMF::Delete() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::Delete()" ); - - delete this; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::Delete()" ); + + delete this; + } // ----------------------------------------------------------------------------- // CPhoneHandlerDTMF::RequestCompleted @@ -139,33 +139,33 @@ void CPhoneHandlerDTMF::RequestCompleted( const TInt aError ) { COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerDTMF::RequestCompleted() aError=%d, iState=%d", aError, iState ); - - switch( iState ) - { - case EPhoneHandlerState1: - { - NextState(); - iControl.CommandInitiator().SendResponse( GetStatus(), - iOperation, - aError ); - Activate(); - break; - } - - case EPhoneHandlerState2: - { - IdleState(); - delete this; - break; - } - - default: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::RequestCompleted() Unspecified state" ); - break; - } - }; - } + + switch( iState ) + { + case EPhoneHandlerState1: + { + NextState(); + iControl.CommandInitiator().SendResponse( GetStatus(), + iOperation, + aError ); + Activate(); + break; + } + + case EPhoneHandlerState2: + { + IdleState(); + delete this; + break; + } + + default: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::RequestCompleted() Unspecified state" ); + break; + } + }; + } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDialCall.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDialCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDialCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,13 +17,13 @@ // INCLUDE FILES -#include "phonehandlerdialcall.h" -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" +#include "PhoneHandlerDialCall.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" -#include -#include -#include +#include +#include +#include // EXTERNAL DATA STRUCTURES @@ -52,8 +52,8 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerDialCall::CPhoneHandlerDialCall( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) : iControl( aControl ), iOperation( aOperation ) { @@ -67,11 +67,11 @@ void CPhoneHandlerDialCall::ConstructL() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::ConstructL() start" ); - + LoadServiceL(); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::ConstructL() end" ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandlerDialCall::NewL @@ -79,14 +79,14 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerDialCall* CPhoneHandlerDialCall::NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::NewL()" ); - + CPhoneHandlerDialCall* self = new( ELeave ) CPhoneHandlerDialCall( - aControl, - aOperation ); + aControl, + aOperation ); CleanupStack::PushL( self ); self->ConstructL(); @@ -100,7 +100,7 @@ CPhoneHandlerDialCall::~CPhoneHandlerDialCall() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::~CPhoneHandlerDialCall()" ); - + } // ----------------------------------------------------------------------------- @@ -110,14 +110,14 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerDialCall::Process() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Process()" ); - + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Process()" ); + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Process() telephone number is %S", &(iControl.TelephoneNumber() ) ); - iCommandHandler->Atd( GetStatus(), iControl.TelephoneNumber() ); - - Activate(); - } + iCommandHandler->Atd( GetStatus(), iControl.TelephoneNumber() ); + + Activate(); + } // ----------------------------------------------------------------------------- // CPhoneHandlerDialCall::Delete @@ -125,11 +125,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerDialCall::Delete() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Delete()" ); - - delete this; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Delete()" ); + + delete this; + } // ----------------------------------------------------------------------------- // CPhoneHandlerDialCall::RequestCompleted @@ -140,33 +140,33 @@ void CPhoneHandlerDialCall::RequestCompleted( const TInt aError ) { COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerDialCall::RequestCompleted() aError=%d, iState=%d", aError, iState ); - - switch( iState ) - { - case EPhoneHandlerState1: - { - NextState(); - iControl.CommandInitiator().SendResponse( GetStatus(), - iOperation, - aError ); - Activate(); - break; - } - - case EPhoneHandlerState2: - { - IdleState(); - delete this; - break; - } - - default: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::AsynchronousRequestCompleted() Unspecified state" ); - break; - } - }; - } + + switch( iState ) + { + case EPhoneHandlerState1: + { + NextState(); + iControl.CommandInitiator().SendResponse( GetStatus(), + iOperation, + aError ); + Activate(); + break; + } + + case EPhoneHandlerState2: + { + IdleState(); + delete this; + break; + } + + default: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::AsynchronousRequestCompleted() Unspecified state" ); + break; + } + }; + } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerEndCall.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerEndCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerEndCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,12 +17,12 @@ // INCLUDE FILES -#include "phonehandlerendcall.h" -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" -#include +#include "PhoneHandlerEndCall.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" +#include -#include +#include // EXTERNAL DATA STRUCTURES @@ -51,8 +51,8 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerEndCall::CPhoneHandlerEndCall( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) : iControl( aControl ), iOperation( aOperation ) { @@ -66,11 +66,11 @@ void CPhoneHandlerEndCall::ConstructL() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::ConstructL() start" ); - + LoadServiceL(); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::ConstructL() end" ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandlerEndCall::NewL @@ -78,14 +78,14 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerEndCall* CPhoneHandlerEndCall::NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::NewL()" ); - + CPhoneHandlerEndCall* self = new( ELeave ) CPhoneHandlerEndCall( - aControl, - aOperation ); + aControl, + aOperation ); CleanupStack::PushL( self ); self->ConstructL(); @@ -99,7 +99,7 @@ CPhoneHandlerEndCall::~CPhoneHandlerEndCall() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::~CPhoneHandlerEndCall()" ); - + } // ----------------------------------------------------------------------------- @@ -109,12 +109,12 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerEndCall::Process() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::Process()" ); - - iCommandHandler->Chup( GetStatus() ); - Activate(); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::Process()" ); + + iCommandHandler->Chup( GetStatus() ); + Activate(); + } // ----------------------------------------------------------------------------- // CPhoneHandlerEndCall::Delete @@ -122,11 +122,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerEndCall::Delete() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::Delete()" ); - - delete this; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::Delete()" ); + + delete this; + } // ----------------------------------------------------------------------------- // CPhoneHandlerEndCall::RequestCompleted @@ -137,33 +137,33 @@ void CPhoneHandlerEndCall::RequestCompleted( const TInt aError ) { COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerEndCall::RequestCompleted() aError=%d, iState=%d", aError, iState ); - - switch( iState ) - { - case EPhoneHandlerState1: - { - NextState(); - iControl.CommandInitiator().SendResponse( GetStatus(), - iOperation, - aError ); - Activate(); - break; - } - - case EPhoneHandlerState2: - { - IdleState(); - delete this; - break; - } - - default: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::RequestCompleted() Unspecified state" ); - break; - } - }; - } + + switch( iState ) + { + case EPhoneHandlerState1: + { + NextState(); + iControl.CommandInitiator().SendResponse( GetStatus(), + iOperation, + aError ); + Activate(); + break; + } + + case EPhoneHandlerState2: + { + IdleState(); + delete this; + break; + } + + default: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::RequestCompleted() Unspecified state" ); + break; + } + }; + } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerMultipartyCall.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerMultipartyCall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerMultipartyCall.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,11 +17,11 @@ // INCLUDE FILES -#include "phonehandlermultipartycall.h" -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" -#include -#include +#include "PhoneHandlerMultipartyCall.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" +#include +#include // EXTERNAL DATA STRUCTURES @@ -50,8 +50,8 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerMultipartyCall::CPhoneHandlerMultipartyCall( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) : iControl( aControl ), iOperation( aOperation ) { @@ -65,11 +65,11 @@ void CPhoneHandlerMultipartyCall::ConstructL() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::ConstructL() start" ); - + LoadServiceL(); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::ConstructL() end" ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandlerMultipartyCall::NewL @@ -77,13 +77,13 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerMultipartyCall* CPhoneHandlerMultipartyCall::NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::NewL()" ); - + CPhoneHandlerMultipartyCall* self = - new( ELeave ) CPhoneHandlerMultipartyCall( aControl, aOperation ); + new( ELeave ) CPhoneHandlerMultipartyCall( aControl, aOperation ); CleanupStack::PushL( self ); self->ConstructL(); @@ -97,7 +97,7 @@ CPhoneHandlerMultipartyCall::~CPhoneHandlerMultipartyCall() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::~CPhoneHandlerMultipartyCall()" ); - + } // ----------------------------------------------------------------------------- @@ -107,29 +107,29 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerMultipartyCall::Process() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::Process()" ); - - /* - if( iControl.SwitchCall() ) - { - iCommandHandler->Chld( GetStatus(), EPhCltChldTwo, 0 ); - } - else - { */ - // get command - TInt command = const_cast( iControl.ChldCommand() ); + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::Process()" ); + + /* + if( iControl.SwitchCall() ) + { + iCommandHandler->Chld( GetStatus(), EPhCltChldTwo, 0 ); + } + else + { */ + // get command + TInt command = const_cast( iControl.ChldCommand() ); - // get number - TInt number = const_cast( iControl.ChldCallNumber() ); - - iCommandHandler->Chld( GetStatus(), - static_cast( command ), - number ); - //} - - Activate(); - } + // get number + TInt number = const_cast( iControl.ChldCallNumber() ); + + iCommandHandler->Chld( GetStatus(), + static_cast( command ), + number ); + //} + + Activate(); + } // ----------------------------------------------------------------------------- // CPhoneHandlerMultipartyCall::Delete @@ -137,11 +137,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerMultipartyCall::Delete() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::Delete()" ); - - delete this; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::Delete()" ); + + delete this; + } // ----------------------------------------------------------------------------- // CPhoneHandlerMultipartyCall::RequestCompleted @@ -152,33 +152,33 @@ void CPhoneHandlerMultipartyCall::RequestCompleted( const TInt aError ) { COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::RequestCompleted() aError=%d, iState=%d", aError, iState ); - - switch( iState ) - { - case EPhoneHandlerState1: - { - NextState(); - iControl.CommandInitiator().SendResponse( GetStatus(), - iOperation, - aError ); - Activate(); - break; - } - - case EPhoneHandlerState2: - { - IdleState(); - delete this; - break; - } - - default: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::RequestCompleted() Unspecified state" ); - break; - } - }; - } + + switch( iState ) + { + case EPhoneHandlerState1: + { + NextState(); + iControl.CommandInitiator().SendResponse( GetStatus(), + iOperation, + aError ); + Activate(); + break; + } + + case EPhoneHandlerState2: + { + IdleState(); + delete this; + break; + } + + default: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::RequestCompleted() Unspecified state" ); + break; + } + }; + } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerRedial.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerRedial.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerRedial.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,12 +18,12 @@ // INCLUDE FILES -#include "phonehandlerredial.h" -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" -#include -#include -#include +#include "PhoneHandlerRedial.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" +#include +#include +#include #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS #include @@ -36,8 +36,8 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) : iControl( aControl ), iOperation( aOperation ) { @@ -67,11 +67,11 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerLastNumberRedial* CPhoneHandlerLastNumberRedial::NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) { CPhoneHandlerLastNumberRedial* self = - new (ELeave) CPhoneHandlerLastNumberRedial( aControl, aOperation ); + new (ELeave) CPhoneHandlerLastNumberRedial( aControl, aOperation ); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); @@ -87,7 +87,7 @@ delete iLogClientPtr; iFsSession.Close(); - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial() end" ); + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial() end" ); } // ----------------------------------------------------------------------------- @@ -97,13 +97,13 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerLastNumberRedial::Process() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() start" ); - - TBool ret = EFalse; - + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() start" ); + + TBool ret = EFalse; + TRAPD( err, ret = iLogViewRecentPtr-> - SetRecentListL( KLogRecentOutgoingCalls, GetStatus() ) ); + SetRecentListL( KLogRecentOutgoingCalls, GetStatus() ) ); if( KErrNone == err && ret ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() There is last redial number" ); @@ -112,15 +112,15 @@ else { if( err != KErrNone ) - { - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", err ); - RequestCompleted( err ); - } + { + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", err ); + RequestCompleted( err ); + } else - { - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", KErrNotFound ); - RequestCompleted( KErrNotFound ); - } + { + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", KErrNotFound ); + RequestCompleted( KErrNotFound ); + } } COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() end" ); @@ -132,11 +132,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerLastNumberRedial::Delete() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Delete()" ); - - delete this; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Delete()" ); + + delete this; + } // ----------------------------------------------------------------------------- // CPhoneHandlerLastNumberRedial::RequestCompleted @@ -146,54 +146,54 @@ // void CPhoneHandlerLastNumberRedial::RequestCompleted( const TInt aError ) { - COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() aError=%d, iState=%d", aError, iState ); - - if( KErrNone != aError ) - { - // cancel process and return an error code - iState = EPhoneHandlerState2; - } - - switch( iState ) - { - case EPhoneHandlerState1: - { - NextState(); - - const TDesC& number = iLogViewRecentPtr->Event().Number(); - COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() phone number is %S", &number ); - // make a call with last dialed phone number - iCommandHandler->Atd( GetStatus(), number ); + COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() aError=%d, iState=%d", aError, iState ); + + if( KErrNone != aError ) + { + // cancel process and return an error code + iState = EPhoneHandlerState2; + } + + switch( iState ) + { + case EPhoneHandlerState1: + { + NextState(); + + const TDesC& number = iLogViewRecentPtr->Event().Number(); + COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() phone number is %S", &number ); + // make a call with last dialed phone number + iCommandHandler->Atd( GetStatus(), number ); - Activate(); - break; - } - - case EPhoneHandlerState2: - { - NextState(); - iControl.CommandInitiator().SendResponse( GetStatus(), - iOperation, - aError ); - Activate(); - break; - } - - case EPhoneHandlerState3: - { - IdleState(); - delete this; - break; - } - - default: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() Unspecified state" ); - break; - } - }; - - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() end" ); + Activate(); + break; + } + + case EPhoneHandlerState2: + { + NextState(); + iControl.CommandInitiator().SendResponse( GetStatus(), + iOperation, + aError ); + Activate(); + break; + } + + case EPhoneHandlerState3: + { + IdleState(); + delete this; + break; + } + + default: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() Unspecified state" ); + break; + } + }; + + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() end" ); } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerResponse.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerResponse.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerResponse.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,11 +17,11 @@ // INCLUDE FILES -#include "phonehandlerresponse.h" -#include "phonehandlercontrol.h" -#include "phonehandleractive.h" -#include "phonehandlerdebug.h" -#include +#include "PhoneHandlerResponse.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerActive.h" +#include "PhoneHandlerDebug.h" +#include // EXTERNAL DATA STRUCTURES @@ -62,11 +62,11 @@ void CPhoneHandlerResponse::ConstructL() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::ConstructL() start" ); - + iActive = CPhoneHandlerActive::NewL( *this ); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::ConstructL() end" ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandlerResponse::NewL @@ -74,19 +74,19 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerResponse* CPhoneHandlerResponse::NewL( - CPhoneHandlerControl& aControl ) + CPhoneHandlerControl& aControl ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::NewL() start" ); - + CPhoneHandlerResponse* self = - new( ELeave ) CPhoneHandlerResponse( aControl ); + new( ELeave ) CPhoneHandlerResponse( aControl ); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::NewL() end" ); - + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::NewL() end" ); + return self; } @@ -94,7 +94,7 @@ CPhoneHandlerResponse::~CPhoneHandlerResponse() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::~CPhoneHandlerResponse()" ); - + delete iActive; } @@ -105,14 +105,14 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerResponse::SetResponse( - TRemConExtCallHandlingApiOperationId aOperation, TInt aError ) - { - COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerResponse::Process(aOperation=%d,aError=%d)",aOperation, aError ); - - iOperation = aOperation; - iError = aError; - } - + TRemConExtCallHandlingApiOperationId aOperation, TInt aError ) + { + COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerResponse::Process(aOperation=%d,aError=%d)",aOperation, aError ); + + iOperation = aOperation; + iError = aError; + } + // ----------------------------------------------------------------------------- // CPhoneHandlerResponse::SendResponse // Sends response to RemCon FW. @@ -120,14 +120,14 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerResponse::Process() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::Process()" ); - - iControl.CommandInitiator().SendResponse( iActive->iStatus, - iOperation, - iError ); - iActive->SetActive(); - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::Process()" ); + + iControl.CommandInitiator().SendResponse( iActive->iStatus, + iOperation, + iError ); + iActive->SetActive(); + } // ----------------------------------------------------------------------------- // CPhoneHandlerLastNumberRedial::Delete @@ -135,11 +135,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerResponse::Delete() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::Delete()" ); - - delete this; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::Delete()" ); + + delete this; + } // ----------------------------------------------------------------------------- // CPhoneHandlerResponse::RequestCompleted @@ -150,14 +150,14 @@ void CPhoneHandlerResponse::RequestCompleted( const TInt aError ) { COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerResponse::RequestCompleted() aError=%d", aError ); - - (void)aError; // avoid warning in WINSCW urel build - - // Think about adding value to TRemConExtCallHandlingApiOperationId - // in RemConExtensionApi.h like "ERemConExtNoCallHandlingOperation". - // In this method iOperation should be set to that value. - iError = KErrNone; - } + + (void)aError; // avoid warning in WINSCW urel build + + // Think about adding value to TRemConExtCallHandlingApiOperationId + // in RemConExtensionApi.h like "ERemConExtNoCallHandlingOperation". + // In this method iOperation should be set to that value. + iError = KErrNone; + } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonecmdhandler/phonecmdhnlr/src/PhoneHandlerVoiceDial.cpp --- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerVoiceDial.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerVoiceDial.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,11 +17,11 @@ // INCLUDE FILES -#include "phonehandlervoicedial.h" -#include "phonehandlercontrol.h" -#include "phonehandlerdebug.h" -#include -#include +#include "PhoneHandlerVoiceDial.h" +#include "PhoneHandlerControl.h" +#include "PhoneHandlerDebug.h" +#include +#include // EXTERNAL DATA STRUCTURES @@ -50,8 +50,8 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerVoiceDial::CPhoneHandlerVoiceDial( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) : iControl( aControl ), iOperation( aOperation ) { @@ -65,11 +65,11 @@ void CPhoneHandlerVoiceDial::ConstructL() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::ConstructL() start" ); - + LoadServiceL(); COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::ConstructL() end" ); - } + } // ----------------------------------------------------------------------------- // CPhoneHandlerVoiceDial::NewL @@ -77,21 +77,21 @@ // ----------------------------------------------------------------------------- // CPhoneHandlerVoiceDial* CPhoneHandlerVoiceDial::NewL( - CPhoneHandlerControl& aControl, - TRemConExtCallHandlingApiOperationId aOperation ) + CPhoneHandlerControl& aControl, + TRemConExtCallHandlingApiOperationId aOperation ) { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() start" ); - + CPhoneHandlerVoiceDial* self = new( ELeave ) CPhoneHandlerVoiceDial( - aControl, - aOperation ); + aControl, + aOperation ); CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() end" ); - + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() end" ); + return self; } @@ -100,7 +100,7 @@ CPhoneHandlerVoiceDial::~CPhoneHandlerVoiceDial() { COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::~CPhoneHandlerVoiceDial()" ); - + } // ----------------------------------------------------------------------------- @@ -110,14 +110,14 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerVoiceDial::Process() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Process()" ); + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Process()" ); -#if 0 // removed due to SCB CR PMEO-7JRFAX - iCommandHandler->Bvra( GetStatus(), iControl.VoiceDialStatus() ); -#endif // #if 0 - Activate(); - } +#if 0 // removed due to SCB CR PMEO-7JRFAX + iCommandHandler->Bvra( GetStatus(), iControl.VoiceDialStatus() ); +#endif // #if 0 + Activate(); + } // ----------------------------------------------------------------------------- // CPhoneHandlerVoiceDial::Delete @@ -125,11 +125,11 @@ // ----------------------------------------------------------------------------- // void CPhoneHandlerVoiceDial::Delete() - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Delete()" ); - - delete this; - } + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Delete()" ); + + delete this; + } // ----------------------------------------------------------------------------- // CPhoneHandlerVoiceDial::RequestCompleted @@ -140,33 +140,33 @@ void CPhoneHandlerVoiceDial::RequestCompleted( const TInt aError ) { COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() aError=%d, iState=%d", aError, iState ); - - switch( iState ) - { - case EPhoneHandlerState1: - { - NextState(); - iControl.CommandInitiator().SendResponse( GetStatus(), - iOperation, - aError ); - Activate(); - break; - } - - case EPhoneHandlerState2: - { - IdleState(); - delete this; - break; - } - - default: - { - COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() Unspecified state" ); - break; - } - }; - } + + switch( iState ) + { + case EPhoneHandlerState1: + { + NextState(); + iControl.CommandInitiator().SendResponse( GetStatus(), + iOperation, + aError ); + Activate(); + break; + } + + case EPhoneHandlerState2: + { + IdleState(); + delete this; + break; + } + + default: + { + COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() Unspecified state" ); + break; + } + }; + } // ========================== OTHER EXPORTED FUNCTIONS ========================= diff -r 7d48bed6ce0c -r 987c9837762f phonesrv.pro --- a/phonesrv.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +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: Project file for building phonesrv components -# -# - -TEMPLATE = subdirs -CONFIG += ordered - -symbian: { -:BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"group/bld.inf\"" -SUBDIRS += telutils/xqtelephonyservice -SUBDIRS += telutils/dialpad -SUBDIRS += telutils/keysequencerecognitionservice -SUBDIRS += vmbx/vmbxcpplugin -SUBDIRS += vmbx/vmbxengine -SUBDIRS += cellular/sssettings/xqbindings/sssettingswrapper -SUBDIRS += cellular/telephonysettings/xqbindings/psetwrapper -SUBDIRS += satui/satapp -SUBDIRS += cellular/psuinotes -} diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/group/bld.inf --- a/phonesrv_plat/call_information_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: File that exports the files belonging to - Call Information API + Call Information API * */ @@ -23,8 +23,7 @@ DEFAULT PRJ_EXPORTS -../inc/mcall.h MW_LAYER_PLATFORM_EXPORT_PATH(mcall.h) +../inc/mcall.h MW_LAYER_PLATFORM_EXPORT_PATH(mcall.h) ../inc/mcallinformationobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mcallinformationobserver.h) ../inc/ccallinformation.h MW_LAYER_PLATFORM_EXPORT_PATH(ccallinformation.h) -../inc/ccallinfoiter.h MW_LAYER_PLATFORM_EXPORT_PATH(ccallinfoiter.h) -../inc/xqcallinfo.h MW_LAYER_PLATFORM_EXPORT_PATH(xqcallinfo.h) \ No newline at end of file +../inc/ccallinfoiter.h MW_LAYER_PLATFORM_EXPORT_PATH(ccallinfoiter.h) \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/inc/ccallinformation.h --- a/phonesrv_plat/call_information_api/inc/ccallinformation.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/inc/ccallinformation.h Wed Sep 01 12:15:03 2010 +0100 @@ -106,8 +106,8 @@ private: // data - CCallInformationImpl* iImpl; - + CCallInformationImpl* iImpl; + }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/inc/xqcallinfo.h --- a/phonesrv_plat/call_information_api/inc/xqcallinfo.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +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: Provides information about ongoing calls. -* -*/ - -#ifndef XQCALLINFO_H -#define XQCALLINFO_H - -#include -#include -#include - - -// forward declarations -class XQCallInfoImpl; - -/*! - CallInfo - Holds calls information. -*/ -NONSHARABLE_CLASS( CallInfo ) - { -public: - int callIndex() const { return m_Index; } - CCPCall::TCallType callType() const { return m_Type; } - CCPCall::TCallState callState() const { return m_State; } - unsigned int serviceId() const { return m_ServiceId; } - CCPCall::TCallDirection callDirection() const { return m_Direction; } - - CCPCall::TCallState m_State; - CCPCall::TCallType m_Type; - CCPCall::TCallDirection m_Direction; - int m_Index; - unsigned int m_ServiceId; - }; - - -#ifdef BUILD_XQCALLINFO -#define XQCALLINFO_EXPORT Q_DECL_EXPORT -#else -#define XQCALLINFO_EXPORT Q_DECL_IMPORT -#endif -/*! - XQCallInfo - Class to be used for receiving information about ongoing calls. - - @code - XQCallInfo *callInfo = XQCallInfo::create(); - @endcode - -*/ -class XQCALLINFO_EXPORT XQCallInfo: public QObject -{ - Q_OBJECT - -public: - - /*! - \fn XQCallInfo *create - - Creates XQCallInfo instance. - */ - static XQCallInfo *create(); - - /*! - \fn void getCallsL(QList &calls) - - Gets the snapshot of ongoing calls. - */ - virtual void getCalls(QList &calls) = 0; - - /*! - \fn bool isCallInState( CCPCall::TCallState state ) const - - Returns information whether call in given state exist. - */ - virtual bool isCallInState(CCPCall::TCallState state) const = 0; - -signals: - - /*! - \fn void CallInformationChanged() - - Signals that there are changes in ongoing calls. Client should fetch - the call infomations after receiving the notification. - */ - void callInformationChanged(); - -protected: - - /*! - \fn void sendSignal() - - Sends signal call info changed signal to client's. - */ - void sendCallInfoChangedSignal(); - - /*! - Constructor - */ - XQCallInfo(); -}; - -#endif // XQCALLINFO_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/tsrc/group/MT_CallInformation.mmp --- a/phonesrv_plat/call_information_api/tsrc/group/MT_CallInformation.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/tsrc/group/MT_CallInformation.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +* 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" @@ -15,7 +15,9 @@ * */ /* - +----------------------------------------------------------------------------- +This file has been generated with EUnit Pro +----------------------------------------------------------------------------- */ #include TARGET MT_CallInformation.dll @@ -39,15 +41,16 @@ USERINCLUDE ../src MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/platform/digia/eunit +APP_LAYER_SYSTEMINCLUDE // cntdef.h +SYSTEMINCLUDE /epoc32/include/Digia/EUnit #if defined(WINSCW) SYSTEMINCLUDE ../../../../../../app/phone/inc SYSTEMINCLUDE ../../../../../../app/phone/phoneengine/inc SYSTEMINCLUDE ../../../../../../app/phone/phoneengine/audiohandling/inc #endif -LIBRARY eunit.lib -LIBRARY eunitutil.lib +LIBRARY EUnit.lib +LIBRARY EUnitUtil.lib LIBRARY euser.lib LIBRARY telephonyservice.lib LIBRARY etel.lib @@ -55,6 +58,6 @@ LIBRARY phoneclient.lib #if defined(WINSCW) -LIBRARY phoneengine.lib -LIBRARY audiohandling.lib +LIBRARY PhoneEngine.lib +LIBRARY AudioHandling.lib #endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/tsrc/run_auto_tests.bat --- a/phonesrv_plat/call_information_api/tsrc/run_auto_tests.bat Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/tsrc/run_auto_tests.bat Wed Sep 01 12:15:03 2010 +0100 @@ -54,7 +54,7 @@ set INSTRUMENT=TRUE set REMOVEINSTRUMENT=TRUE set DOMODULESTESTS=TRUE -set SBS_CALL=sbs --config winscw_udeb.test --keepgoing BUILD +set SBS_CALL=sbs --config winscw_udeb.test --keepgoing build set PATH_TO_DLL=\epoc32\release\winscw\udeb set PATH_TO_MOVE_DLL=\epoc32\release\winscw\udeb\z\sys\bin set PATH_TO_COVERAGE_DATA=\coverage_data @@ -145,9 +145,10 @@ pushd . call cd %1\group -call sbs --config winscw_udeb.test --keepgoing CLEAN +call sbs --config winscw_udeb.test --keepgoing clean +call sbs --config winscw_udeb.test --keepgoing reallyclean if [%INSTRUMENT%] EQU [TRUE] ( -call ctcwrap -2comp -n %PATH_TO_COVERAGE_DATA%\%1 -i d -C "EXCLUDE=*" -C "NO_EXCLUDE=%TESTED_SRC%" "%SBS_CALL%" +call ctcwrap -n %PATH_TO_COVERAGE_DATA%\%1 -i d -C "EXCLUDE=*" -C "NO_EXCLUDE=%TESTED_SRC%" "%SBS_CALL%" ) else ( call %SBS_CALL% ) @@ -187,7 +188,7 @@ :::::::::::::::::::::::::::::::::::::::::::::::::::::: :CALCULATECOVERAGE echo Calculating coverage -ctcpost %PATH_TO_COVERAGE_DATA%\*.sym | ctcmerge -i - -o profile.txt +ctcpost -p - %PATH_TO_COVERAGE_DATA%\*.sym | ctcmerge -i - -o profile.txt call ctc2html -t 70 -i profile.txt -o \coverage_result -nsb goto end diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/tsrc/src/CPEMessageWaiter.cpp --- a/phonesrv_plat/call_information_api/tsrc/src/CPEMessageWaiter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/tsrc/src/CPEMessageWaiter.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -16,7 +16,7 @@ */ #include "CPEMessageWaiter.h" -#include +#include #include "talogger.h" #include "CActiveWait.h" diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/tsrc/src/CPhoneEngineCreator.cpp --- a/phonesrv_plat/call_information_api/tsrc/src/CPhoneEngineCreator.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/tsrc/src/CPhoneEngineCreator.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,8 @@ #include "CPhoneEngineCreator.h" #include -#include +#include +#include #include "CPEMessageWaiter.h" @@ -58,7 +59,16 @@ MEngineMonitor::EPEMessagePEConstructionReady, 40 ); } - + + // No error checking here because this will succeed only once when this is called. The RProperty::Set will + // fail, if this call is not successfull at all. + RProperty::Define( + KPSUidAiInformation, + KActiveIdleState, + RProperty::EInt ); + + User::LeaveIfError( RProperty::Set( KPSUidAiInformation, KActiveIdleState, EPSAiForeground ) ); + return pEif; } diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation.cpp --- a/phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -22,17 +22,17 @@ #include "CPEMessageWaiter.h" #endif -#include -#include +#include +#include #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include //Speaking clock number when calling from NTN network. _LIT (KNumber, "99901"); diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation.h --- a/phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,8 +19,8 @@ #define __MT_CALLINFORMATION_H__ // INCLUDES -#include -#include +#include +#include #include #include diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation_DllMain.cpp --- a/phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation_DllMain.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_information_api/tsrc/src/MT_CallInformation_DllMain.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -16,7 +16,7 @@ */ #include "MT_CallInformation.h" -#include +#include EXPORT_C MEUnitTest* CreateTestSuiteL() { diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_remote_party_information_api/group/bld.inf --- a/phonesrv_plat/call_remote_party_information_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_remote_party_information_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: File that exports the files belonging to -* Call Remote Party Information API +* Call Remote Party Information API * */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_remote_party_information_api/inc/ccallremotepartyinformation.h --- a/phonesrv_plat/call_remote_party_information_api/inc/ccallremotepartyinformation.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_remote_party_information_api/inc/ccallremotepartyinformation.h Wed Sep 01 12:15:03 2010 +0100 @@ -88,8 +88,8 @@ private: // data - CCallRemotePartyInformationImpl* iImpl; - + CCallRemotePartyInformationImpl* iImpl; + }; #endif // CCALLREMOTEPARTYINFORMATION_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_remote_party_information_api/tsrc/src/cdialer.cpp --- a/phonesrv_plat/call_remote_party_information_api/tsrc/src/cdialer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_remote_party_information_api/tsrc/src/cdialer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -18,9 +18,9 @@ #include "cdialer.h" #include -#include -#include -#include +#include +#include +#include //Speaking clock number when calling from NTN network. _LIT (KNumber, "99901"); diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/call_remote_party_information_api/tsrc/src/cdialer.h --- a/phonesrv_plat/call_remote_party_information_api/tsrc/src/cdialer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/call_remote_party_information_api/tsrc/src/cdialer.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #define CDIALER_H_ #include -#include +#include class CPhCltEmergencyCall; class CPhCltCommandHandler; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cbs_mcn_client_api/group/bld.inf --- a/phonesrv_plat/cbs_mcn_client_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cbs_mcn_client_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: File that exports the files belonging to -* CBS MCN Client API +: CBS MCN Client API * */ @@ -24,12 +24,11 @@ PRJ_EXPORTS -../inc/ccbsmcnlistener.h MW_LAYER_PLATFORM_EXPORT_PATH(ccbsmcnlistener.h) -../inc/cbsmcnpanic.h MW_LAYER_PLATFORM_EXPORT_PATH(cbsmcnpanic.h) -../inc/cbsmcncommon.h MW_LAYER_PLATFORM_EXPORT_PATH(cbsmcncommon.h) -../inc/cmcntopicarray.h MW_LAYER_PLATFORM_EXPORT_PATH(cmcntopicarray.h) -../inc/rcbsmcnsession.h MW_LAYER_PLATFORM_EXPORT_PATH(rcbsmcnsession.h) -../inc/cmcn.h MW_LAYER_PLATFORM_EXPORT_PATH(cmcn.h) -../inc/rmcnsubsession.h MW_LAYER_PLATFORM_EXPORT_PATH(rmcnsubsession.h) -../inc/mcbsmcnobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mcbsmcnobserver.h) - +../inc/CCbsMcnListener.h MW_LAYER_PLATFORM_EXPORT_PATH(CCbsMcnListener.h) +../inc/CbsMcnPanic.h MW_LAYER_PLATFORM_EXPORT_PATH(CbsMcnPanic.h) +../inc/CbsMcnCommon.h MW_LAYER_PLATFORM_EXPORT_PATH(CbsMcnCommon.h) +../inc/CMcnTopicArray.h MW_LAYER_PLATFORM_EXPORT_PATH(CMcnTopicArray.h) +../inc/RCbsMcnSession.h MW_LAYER_PLATFORM_EXPORT_PATH(RCbsMcnSession.h) +../inc/CMcn.h MW_LAYER_PLATFORM_EXPORT_PATH(CMcn.h) +../inc/RMcnSubSession.h MW_LAYER_PLATFORM_EXPORT_PATH(RMcnSubSession.h) +../inc/MCbsMcnObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(MCbsMcnObserver.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cbs_mcn_client_api/inc/CCbsMcnListener.h --- a/phonesrv_plat/cbs_mcn_client_api/inc/CCbsMcnListener.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cbs_mcn_client_api/inc/CCbsMcnListener.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include // CActive -#include +#include "CbsMcnCommon.h" // FORWARD DECLARATIONS class CMcn; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cbs_mcn_client_api/inc/CMcn.h --- a/phonesrv_plat/cbs_mcn_client_api/inc/CMcn.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cbs_mcn_client_api/inc/CMcn.h Wed Sep 01 12:15:03 2010 +0100 @@ -27,7 +27,7 @@ // INCLUDES #include "e32base.h" -#include +#include "RCbsMcnSession.h" // CONSTANTS // Maximum length of a MCN message. diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cbs_mcn_client_api/inc/RCbsMcnSession.h --- a/phonesrv_plat/cbs_mcn_client_api/inc/RCbsMcnSession.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cbs_mcn_client_api/inc/RCbsMcnSession.h Wed Sep 01 12:15:03 2010 +0100 @@ -34,7 +34,7 @@ #include #include // CArrayPtrFlat -#include +#include "RMcnSubSession.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cbs_mcn_client_api/inc/RMcnSubSession.h --- a/phonesrv_plat/cbs_mcn_client_api/inc/RMcnSubSession.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cbs_mcn_client_api/inc/RMcnSubSession.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ #define RMCNSUBSESSION_H // INCLUDES -#include "cbsmcncommon.h" +#include "CbsMcnCommon.h" // FORWARD DECLARATIONS class CMcnTopicArray; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cbs_message_api/group/bld.inf --- a/phonesrv_plat/cbs_message_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cbs_message_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,5 +24,5 @@ PRJ_EXPORTS -../inc/ccbsmessageclient.h MW_LAYER_PLATFORM_EXPORT_PATH(ccbsmessageclient.h) -../inc/cbscommontypes.h MW_LAYER_PLATFORM_EXPORT_PATH(cbscommontypes.h) +../inc/ccbsmessageclient.h MW_LAYER_PLATFORM_EXPORT_PATH(CCbsMessageClient.h) +../inc/cbscommontypes.h MW_LAYER_PLATFORM_EXPORT_PATH(CbsCommonTypes.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cbs_message_api/inc/ccbsmessageclient.h --- a/phonesrv_plat/cbs_message_api/inc/ccbsmessageclient.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cbs_message_api/inc/ccbsmessageclient.h Wed Sep 01 12:15:03 2010 +0100 @@ -26,7 +26,7 @@ #define CCBSMESSAGECLIENT_H // INCLUDES -#include "cbscommontypes.h" +#include "CbsCommonTypes.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cenrep_database_api/group/bld.inf --- a/phonesrv_plat/cenrep_database_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cenrep_database_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,5 +24,5 @@ PRJ_EXPORTS -../inc/cenrepdatabaseproperty.h MW_LAYER_PLATFORM_EXPORT_PATH( cenrepdatabaseproperty.h ) -../inc/cenrepdatabaseutil.h MW_LAYER_PLATFORM_EXPORT_PATH( cenrepdatabaseutil.h ) +../inc/cenrepdatabaseproperty.h MW_LAYER_PLATFORM_EXPORT_PATH( cenrepdatabaseproperty.h ) +../inc/cenrepdatabaseutil.h MW_LAYER_PLATFORM_EXPORT_PATH( cenrepdatabaseutil.h ) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseproperty.h --- a/phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseproperty.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseproperty.h Wed Sep 01 12:15:03 2010 +0100 @@ -31,111 +31,111 @@ */ NONSHARABLE_CLASS( CCenRepDatabaseProperty ): public CBase { - public: // Constructor and destructor + public: // Constructor and destructor - /** - * Two-phased constructor. - */ - IMPORT_C static CCenRepDatabaseProperty* NewL(); + /** + * Two-phased constructor. + */ + IMPORT_C static CCenRepDatabaseProperty* NewL(); - /** - * Two-phased constructor. - */ - IMPORT_C static CCenRepDatabaseProperty* NewLC(); + /** + * Two-phased constructor. + */ + IMPORT_C static CCenRepDatabaseProperty* NewLC(); - /** - * Destructors. - */ - IMPORT_C virtual ~CCenRepDatabaseProperty(); + /** + * Destructors. + */ + IMPORT_C virtual ~CCenRepDatabaseProperty(); - public: // member functions - /** - * Returns the name of this property - * - * @since S60 V3.2 - * @return Name of property - */ - IMPORT_C TUint32 GetName() const; + public: // member functions + /** + * Returns the name of this property + * + * @since S60 V3.2 + * @return Name of property + */ + IMPORT_C TUint32 GetName() const; - /** - * Sets the name for this property - * - * @since S60 V3.2 - * @param aPropertyname new property name - */ - IMPORT_C void SetName( TUint32 aPropertyname ); + /** + * Sets the name for this property + * + * @since S60 V3.2 + * @param aPropertyname new property name + */ + IMPORT_C void SetName( TUint32 aPropertyname ); - /** - * Returns value of property - * - * @since S60 V3.2 - * @param aValue on return, TInt value - * @return Error code - */ - IMPORT_C TInt GetValue( TInt& aValue ) const; + /** + * Returns value of property + * + * @since S60 V3.2 + * @param aValue on return, TInt value + * @return Error code + */ + IMPORT_C TInt GetValue( TInt& aValue ) const; - /** - * Sets value of property. Value must match to datatype. - * - * @since S60 V3.2 - * @param aValue new TInt value to be set - * @return Error code - */ - IMPORT_C TInt SetValue( TInt aValue ); + /** + * Sets value of property. Value must match to datatype. + * + * @since S60 V3.2 + * @param aValue new TInt value to be set + * @return Error code + */ + IMPORT_C TInt SetValue( TInt aValue ); - /** - * Returns value of property - * - * @since S60 V3.2 - * @param aValue on return, descriptor value - * @return Error code - */ - IMPORT_C const TDesC& GetDesValue() const; + /** + * Returns value of property + * + * @since S60 V3.2 + * @param aValue on return, descriptor value + * @return Error code + */ + IMPORT_C const TDesC& GetDesValue() const; - /** - * Sets the value of property. Value must match to datatype. - * - * @since S60 V3.2 - * @param aValue new descriptor - * @return Error code - */ - IMPORT_C TInt SetValue( const TDesC& aValue ); + /** + * Sets the value of property. Value must match to datatype. + * + * @since S60 V3.2 + * @param aValue new descriptor + * @return Error code + */ + IMPORT_C TInt SetValue( const TDesC& aValue ); - /** - * Compares data of this property to another. - * - * @since S60 V3.2 - * @param aProperty property to be compared - * @return ETrue if properties have same data - */ - IMPORT_C TBool CCenRepDatabaseProperty::operator==( - const CCenRepDatabaseProperty& aProperty ) const; + /** + * Compares data of this property to another. + * + * @since S60 V3.2 + * @param aProperty property to be compared + * @return ETrue if properties have same data + */ + IMPORT_C TBool CCenRepDatabaseProperty::operator==( + const CCenRepDatabaseProperty& aProperty ) const; - private: + private: - /** - * C++ default constructor. - */ - CCenRepDatabaseProperty(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); + /** + * C++ default constructor. + */ + CCenRepDatabaseProperty(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); - private: // data + private: // data - /** - * Descriptor of property value - * Own. - */ - RBuf iPropertyValue; + /** + * Descriptor of property value + * Own. + */ + RBuf iPropertyValue; - /** - * Name of property - */ - TUint32 iPropertyName; + /** + * Name of property + */ + TUint32 iPropertyName; private: // For testing diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseutil.h --- a/phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseutil.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseutil.h Wed Sep 01 12:15:03 2010 +0100 @@ -81,134 +81,134 @@ IMPORT_C virtual ~CCenRepDatabaseUtil(); public: - /** - * Start transaction in repository. - * Note. Function leaves two cleanup items to cleanupstack and those - * are freed when CommitTransaction or RollbackTransaction is called. - * - * @since S60 v3.2 - */ - IMPORT_C void BeginTransactionL(); + /** + * Start transaction in repository. + * Note. Function leaves two cleanup items to cleanupstack and those + * are freed when CommitTransaction or RollbackTransaction is called. + * + * @since S60 v3.2 + */ + IMPORT_C void BeginTransactionL(); - /** - * Commit changes in repository - * - * @since S60 v3.2 - * @return An error code - */ - IMPORT_C TInt CommitTransaction(); - - /** - * Rollback changes in repository - * - * @since S60 v3.2 - */ - IMPORT_C void RollbackTransaction(); - - /** - * Store new entry to table. - * - * @since S60 v3.2 - * @param aEntryId Contains new ID when returns. - * @param aArray Container for properties of this entry. - */ - IMPORT_C void AddEntryL( TInt& aEntryId, const RIpAppPropArray& aArray ); + /** + * Commit changes in repository + * + * @since S60 v3.2 + * @return An error code + */ + IMPORT_C TInt CommitTransaction(); + + /** + * Rollback changes in repository + * + * @since S60 v3.2 + */ + IMPORT_C void RollbackTransaction(); + + /** + * Store new entry to table. + * + * @since S60 v3.2 + * @param aEntryId Contains new ID when returns. + * @param aArray Container for properties of this entry. + */ + IMPORT_C void AddEntryL( TInt& aEntryId, const RIpAppPropArray& aArray ); - /** - * Search entry by entry ID. - * - * @since S60 v3.2 - * @param aEntryId Id of requested entry - * @param aArray on return, property array. - * @return error code, KErrNotFound if unknown entry. - */ - IMPORT_C TInt FindEntryL( TInt aEntryId, RIpAppPropArray& aArray ); + /** + * Search entry by entry ID. + * + * @since S60 v3.2 + * @param aEntryId Id of requested entry + * @param aArray on return, property array. + * @return error code, KErrNotFound if unknown entry. + */ + IMPORT_C TInt FindEntryL( TInt aEntryId, RIpAppPropArray& aArray ); - /** - * Updates entry to central repository - * - * @since S60 v3.2 - * @param aEntryId Id of requested entry - * @param aArray Updated properties of entry - * @return error code, KErrNotFound if unknown entry. - */ - IMPORT_C TInt UpdateEntryL( TInt aEntryId, - const RIpAppPropArray& aArray ); + /** + * Updates entry to central repository + * + * @since S60 v3.2 + * @param aEntryId Id of requested entry + * @param aArray Updated properties of entry + * @return error code, KErrNotFound if unknown entry. + */ + IMPORT_C TInt UpdateEntryL( TInt aEntryId, + const RIpAppPropArray& aArray ); - /** - * Deletes settings entry from storage by entry ID. - * - * @since S60 v3.2 - * @param aEntryId Id of entry which is going to be deleted - * @return error code, KErrNone if delete succeeded, otherwise system wide error code - */ - IMPORT_C TInt DeleteEntryL( TInt aEntryId ); + /** + * Deletes settings entry from storage by entry ID. + * + * @since S60 v3.2 + * @param aEntryId Id of entry which is going to be deleted + * @return error code, KErrNone if delete succeeded, otherwise system wide error code + */ + IMPORT_C TInt DeleteEntryL( TInt aEntryId ); - /** - * Search property of entry from storage. - * - * @since S60 v3.2 - * @param aEntryId The entry ID of requested entry - * @param aPropertyName property name to be found - * @param aProperty on return, requested property - * @return error code, KErrNone if succeeded, otherwise system wide error code - */ - IMPORT_C TInt FindPropertyL( TInt aEntryId, - TUint32 aPropertyName, - CCenRepDatabaseProperty& aProperty ); + /** + * Search property of entry from storage. + * + * @since S60 v3.2 + * @param aEntryId The entry ID of requested entry + * @param aPropertyName property name to be found + * @param aProperty on return, requested property + * @return error code, KErrNone if succeeded, otherwise system wide error code + */ + IMPORT_C TInt FindPropertyL( TInt aEntryId, + TUint32 aPropertyName, + CCenRepDatabaseProperty& aProperty ); - /** - * Add or update properties of entry in table. - * Values of existing properties are overwritten. - * - * @since S60 v3.2 - * @param aEntryId The ID of updated entry - * @param aArray new properties to be added or updated + /** + * Add or update properties of entry in table. + * Values of existing properties are overwritten. + * + * @since S60 v3.2 + * @param aEntryId The ID of updated entry + * @param aArray new properties to be added or updated * @return error code, KErrNotFound if unknown entry. - */ - IMPORT_C TInt AddOrUpdatePropertiesL( TInt aEntryId, - const RIpAppPropArray& aArray ); + */ + IMPORT_C TInt AddOrUpdatePropertiesL( TInt aEntryId, + const RIpAppPropArray& aArray ); - /** - * Delete properties of entry in table. - * - * @since S60 v3.2 - * @param aEntryId The entry ID of requested entry - * @param aNameArray name of properties to be deleted - * @return error code, KErrNotFound if unknown entry. - */ - IMPORT_C TInt DeletePropertiesL( TInt aEntryId, - const RArray& aNameArray ); + /** + * Delete properties of entry in table. + * + * @since S60 v3.2 + * @param aEntryId The entry ID of requested entry + * @param aNameArray name of properties to be deleted + * @return error code, KErrNotFound if unknown entry. + */ + IMPORT_C TInt DeletePropertiesL( TInt aEntryId, + const RArray& aNameArray ); - /** - * Return count of entries in table. - * - * @since S60 v3.2 - * @return Count of stored settings. - */ - IMPORT_C TInt EntryCountL( TInt& aCount ); + /** + * Return count of entries in table. + * + * @since S60 v3.2 + * @return Count of stored settings. + */ + IMPORT_C TInt EntryCountL( TInt& aCount ); - /** - * Search all entry IDs from storage - * - * @since S60 v3.2 - * @param aEntryIds An array containing returned entry IDs - * @return error code - */ - IMPORT_C TInt FindEntryIdsL( RArray& aEntryIds ); + /** + * Search all entry IDs from storage + * + * @since S60 v3.2 + * @param aEntryIds An array containing returned entry IDs + * @return error code + */ + IMPORT_C TInt FindEntryIdsL( RArray& aEntryIds ); - /** - * Find entry IDs with same properties - * - * @since S60 v3.2 - * @param aPropertyArray property array - * @param aEntryIds on return, entry Ids with same properties - * @return error code - */ - IMPORT_C TInt FindEntryIdsFromPropertiesL( const RIpAppPropArray& aPropertyArray, - RArray& aEntryIds ); - + /** + * Find entry IDs with same properties + * + * @since S60 v3.2 + * @param aPropertyArray property array + * @param aEntryIds on return, entry Ids with same properties + * @return error code + */ + IMPORT_C TInt FindEntryIdsFromPropertiesL( const RIpAppPropArray& aPropertyArray, + RArray& aEntryIds ); + private: @@ -226,113 +226,113 @@ */ void ConstructL( TUid aUid ); - /** - * Release semaphore, this function is used in custom cleanup - * - * @since S60 v3.2 - * @param aPtr Pointer to an object which is the target of the cleanup operation - */ + /** + * Release semaphore, this function is used in custom cleanup + * + * @since S60 v3.2 + * @param aPtr Pointer to an object which is the target of the cleanup operation + */ static void ReleaseSemaphore( TAny* aPtr ); - /** - * Release semaphore - * - * @since S60 v3.2 - */ + /** + * Release semaphore + * + * @since S60 v3.2 + */ void DoReleaseSemaphore(); - /** - * Set new value for given key. Creates the key if it doesn't exists. - * - * @since S60 v3.2 - * @param aKey - * @param aValue - */ + /** + * Set new value for given key. Creates the key if it doesn't exists. + * + * @since S60 v3.2 + * @param aKey + * @param aValue + */ template void SetOrCreateKeyL( TUint32 aKey, const T& aValue ); - /** - * Create new ID for entry. - * - * @since S60 v3.2 - * @param aNewId Contains new ID when return. - */ + /** + * Create new ID for entry. + * + * @since S60 v3.2 + * @param aNewId Contains new ID when return. + */ void CreateEntryIdL( TInt& aNewId ); - /** - * Defines next available key for ID. - * - * @since S60 v3.2 - * @return New key for ID - */ + /** + * Defines next available key for ID. + * + * @since S60 v3.2 + * @return New key for ID + */ TUint32 GetNewIdKeyL( ); - /** - * Update given properties of entry. - * - * @since S60 v3.2 - * @param aIdKey - * @param Array Contains updated properties and values - */ + /** + * Update given properties of entry. + * + * @since S60 v3.2 + * @param aIdKey + * @param Array Contains updated properties and values + */ void UpdatePropertiesL( TUint32 aIdKey, const RIpAppPropArray& aArray ); - /** - * Check if entry has given properties. - * - * @since S60 v3.2 - * @param aEntryId Id of entry. - * @param aPropertyArray Properties to be checked. + /** + * Check if entry has given properties. + * + * @since S60 v3.2 + * @param aEntryId Id of entry. + * @param aPropertyArray Properties to be checked. * @param aOk Result - */ + */ void CheckEntryHasPropertiesL( TInt aEntryId, const RIpAppPropArray& aPropertyArray, TBool& aOk ); - /** - * Custom cleanup for array. - * - * @since S60 v3.2 - * @param aPointer - */ + /** + * Custom cleanup for array. + * + * @since S60 v3.2 + * @param aPointer + */ static void CleanupPointerArray( TAny* aPointer ); private: // data - /** - * Central Repository object. - * Own. - */ - CRepository* iRepository; - - /** - * RSemaphore object. - * Own. - */ - RSemaphore iSemaphore; - - /** - * Start key in first column( Id column ) - */ - TUint32 iStartKey; + /** + * Central Repository object. + * Own. + */ + CRepository* iRepository; + + /** + * RSemaphore object. + * Own. + */ + RSemaphore iSemaphore; + + /** + * Start key in first column( Id column ) + */ + TUint32 iStartKey; - /** - * Column increment - */ - TUint32 iColIncrement; + /** + * Column increment + */ + TUint32 iColIncrement; - /** - * Column mask - */ - TUint32 iColMask; - - /** - * Id counter key - */ - TUint32 iIdCounterKey; - - /** - * Column count - */ - TInt iColCount; + /** + * Column mask + */ + TUint32 iColMask; + + /** + * Id counter key + */ + TUint32 iIdCounterKey; + + /** + * Column count + */ + TInt iColCount; private: // For testing #ifdef TEST_EUNIT diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/ccce.h --- a/phonesrv_plat/converged_call_engine_api/inc/ccce.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/ccce.h Wed Sep 01 12:15:03 2010 +0100 @@ -58,7 +58,7 @@ #ifndef RMMCUSTOMAPI_H /** defenition for OG, most likely will be deprecated later on */ ///_LIT(KTerminateAllCalls,"ALL_CALLS"); -#include // Add reference there, cs classes need that too +#include // Add reference there, cs classes need that too #endif /** @@ -130,7 +130,7 @@ * @return none */ IMPORT_C void SetObserver( MCCEObserver& aObserver, - MCCESsObserver& aSsObserver ); + MCCESsObserver& aSsObserver ); /** * Opens new call. @@ -246,24 +246,24 @@ */ IMPORT_C MCCEExtensionInterface& ExtensionInterfaceL( const MCCEExtensionObserver& aObserver ); - /** - * This method gets the lifetime of the MS. The lifetime information - * includes the manufacturing date of the MS and the total amount of airtime use, - * from the manufacturing date until the call to this method. Calling this method - * does not reset any data. - * Forwarded to CS plugin. - * @since S60 3.2 - * @param aLifeTimeInfo Life time information - * @return Get succeeded or not. - */ + /** + * This method gets the lifetime of the MS. The lifetime information + * includes the manufacturing date of the MS and the total amount of airtime use, + * from the manufacturing date until the call to this method. Calling this method + * does not reset any data. + * Forwarded to CS plugin. + * @since S60 3.2 + * @param aLifeTimeInfo Life time information + * @return Get succeeded or not. + */ IMPORT_C TBool GetLifeTime( TDes8& aLifeTimeInfo ); - /** - * This method gets cs specific information from cs-plugin. This is used only CS, - * @since S60 3.2 - * @param aCSInfo CS specific information from cs-plugin. - * @return Get succeeded or not. - */ + /** + * This method gets cs specific information from cs-plugin. This is used only CS, + * @since S60 3.2 + * @param aCSInfo CS specific information from cs-plugin. + * @return Get succeeded or not. + */ IMPORT_C TBool GetCSInfo( CSInfo& aCSInfo ); private: diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/cccecallparameters.h --- a/phonesrv_plat/converged_call_engine_api/inc/cccecallparameters.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/cccecallparameters.h Wed Sep 01 12:15:03 2010 +0100 @@ -87,11 +87,7 @@ /** Gets the origin of the call. */ virtual TCCECallOrigin Origin() const; - /** Sets the SAT alpha id identifying the text to be shown instead of number in - call bubble */ - virtual void SetAlphaId(TBuf aAlphaId); - /** Gets the SAT alpha id of the call. */ - virtual TBuf AlphaId() const; + protected: CCCECallParameters(); @@ -106,13 +102,11 @@ TBuf iUUSId; /** Capability configuration parameters for the first bearer. */ TBuf8 iBearer; - /** A buffer to hold the sub-address of a telephone number. */ - TBuf iSubAddress; - /** Call origin. */ - TCCECallOrigin iOrigin; - /** Alpha id. */ - TBuf iAlphaId; - + /** A buffer to hold the sub-address of a telephone number. */ + TBuf iSubAddress; + /** Call origin. */ + TCCECallOrigin iOrigin; + }; #endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mccecall.h --- a/phonesrv_plat/converged_call_engine_api/inc/mccecall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mccecall.h Wed Sep 01 12:15:03 2010 +0100 @@ -52,7 +52,7 @@ - /** + /** * Set new MCCECallObserver observer to MCCECall object. * Called in case of incoming call. In that case call has no observer yet when it * is created. In MO case observer is set when call is created. Repleces current observer @@ -273,24 +273,24 @@ virtual const TDesC& DialledParty() const = 0; /** - * Set call parameters. - * @since S60 3.2 - * @param aNewParams New call paramater information. - * @return none - */ + * Set call parameters. + * @since S60 3.2 + * @param aNewParams New call paramater information. + * @return none + */ virtual void SetParameters( const CCCECallParameters& aNewParams ) = 0; /** - * Get call parameters. - * @since S60 3.2 - * @param None - * @return Current call paramater information. - */ + * Get call parameters. + * @since S60 3.2 + * @param None + * @return Current call paramater information. + */ virtual const CCCPCallParameters& Parameters() const = 0; /** * Returns the inband tone associated to an error condition or a state transition of a call. - * See defenition for TCCPTone. + * See defenition for TCCPTone. * @since S60 3.2 * @param None. * @return TCCPTone Used tone. @@ -298,13 +298,13 @@ virtual TCCPTone Tone() const = 0; /** - * Get call information. NOTE: will be removed shortly. Stop using this call use relevant getters instead! - * TODO this needs to be rechecked if params are to be defined in CCE as a struct for example and to return that! - * @since S60 3.2 - * @param aCallInfo TMobileCallInfoV3 - TODO check this - * @return none - */ - virtual void GetMobileCallInfo( TDes8& aCallInfo ) const = 0; + * Get call information. NOTE: will be removed shortly. Stop using this call use relevant getters instead! + * TODO this needs to be rechecked if params are to be defined in CCE as a struct for example and to return that! + * @since S60 3.2 + * @param aCallInfo TMobileCallInfoV3 - TODO check this + * @return none + */ + virtual void GetMobileCallInfo( TDes8& aCallInfo ) const = 0; /************************************************************************/ /* Emergency call */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mccecallobserver.h --- a/phonesrv_plat/converged_call_engine_api/inc/mccecallobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mccecallobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -35,17 +35,17 @@ /** Tone to play enumeration. Used in MCCECallObserver::PlayInbandTone*/ enum TCCETone { - ECCENoTone, - ECCEUserBusy, - ECCERadioPathNotAvailable, - ECCECongestion, - ECCESpecialInformation, - ECCEReorder, - ECCERemoteAlerting, - ECCEDataCallTone, - ECCENoSoundSequence, - ECCEBeepSequence, /** ENoSoundSequence handled the same way */ - ECCECallWaiting + ECCENoTone, + ECCEUserBusy, + ECCERadioPathNotAvailable, + ECCECongestion, + ECCESpecialInformation, + ECCEReorder, + ECCERemoteAlerting, + ECCEDataCallTone, + ECCENoSoundSequence, + ECCEBeepSequence, /** ENoSoundSequence handled the same way */ + ECCECallWaiting }; @@ -53,7 +53,7 @@ /** MCCE call events*/ enum TCCECallEvent { - /** The call has been placed on hold as a result of a local action. */ + /** The call has been placed on hold as a result of a local action. */ ELocalHold, /** The call has been placed on hold by the remote connected party. */ ERemoteHold, @@ -77,7 +77,7 @@ ERemoteTerminated, /** The call has been joined by the remote connected party to other call(s) to create/add - * to a conference call. */ + * to a conference call. */ /* Call has been added to remote conference call at remote end */ ERemoteConferenceCreate, @@ -85,7 +85,7 @@ ERemoteBarred, /** The call is being forwarded by the remote party. */ ERemoteForwarding, - /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */ + /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */ ERemoteWaiting, /** The outgoing call has been barred by the local party. */ ELocalBarred, @@ -107,19 +107,19 @@ // CS call specific events /////////////////////////// - /** Call has been deflected to another remote party as a result of a local action. */ + /** Call has been deflected to another remote party as a result of a local action. */ ECCECSLocalDeflectCall, /** CS call specific event */ - ECCECSDataPortLoaned, + ECCECSDataPortLoaned, /** CS call specific event */ - ECCECSDataPortRecovered, + ECCECSDataPortRecovered, - /** One or more of following information has been changed + /** One or more of following information has been changed * - Remote party name * - Remote party number/address * - Call parameters ( ie. service id ) - */ - ECCENotifyRemotePartyInfoChange, + */ + ECCENotifyRemotePartyInfoChange, /** Call secure status cannot be determined */ ECCESecureNotSpecified @@ -145,7 +145,7 @@ /** The Loan Data Port request is currently a valid action. */ ECCECapsLoanDataPort = 0x00000080, /** The Recover Data Port request is currently a valid action. */ - ECCECapsRecoverDataPort= 0x00000100, + ECCECapsRecoverDataPort= 0x00000100, /** Indicates that this call can be put on hold. This implies that the call is currently active and that there is no other held call. */ ECCECapsHold = 0x00000200, @@ -157,11 +157,11 @@ in the opposite state and if this is the case then both calls will be simultaneously swapped to their opposite state. */ ECCECapsSwap = 0x00000800, - /** Indicates that this incoming call can be deflected to another destination.*/ + /** Indicates that this incoming call can be deflected to another destination.*/ ECCECapsDeflect = 0x00001000, /** Indicates that this call can be transferred to the remote party of another call. For this capability to be set there must be one active call and one held or - dialing call.*/ + dialing call.*/ ECCECapsTransfer = 0x00002000, /** Indicates that this call can be joined either to another single call to form a conference call or to an existing conference call.*/ @@ -169,7 +169,7 @@ /** Indicates that this call (within a conference call) can go into One to One mode. This action would put the rest of the conference call on hold. */ ECCECapsOneToOne = 0x00008000, - /** Indicates that the user can activate a CCBS request on this failed call set-up.*/ + /** Indicates that the user can activate a CCBS request on this failed call set-up.*/ ECCECapsActivateCCBS = 0x00010000, /** Indicates that this call is part of an alternating call and the client can call SwitchAlternatingCall() on this call in order to switch it to its other mode.*/ @@ -195,7 +195,7 @@ * @param aError Occurred error as integer, * return none */ - virtual void ErrorOccurred( const TCCPError aError ) = 0; + virtual void ErrorOccurred( const TCCPError aError ) = 0; /** * Call state notificfation. diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mcceconferencecall.h --- a/phonesrv_plat/converged_call_engine_api/inc/mcceconferencecall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mcceconferencecall.h Wed Sep 01 12:15:03 2010 +0100 @@ -56,39 +56,39 @@ */ virtual TInt Release() = 0; - /** - * Adds new call to conference call. - * @since S60 3.2 - * @param aCall Call to be added to conference. - * @return none - * @leave In case of an error system wide error code - * @leave KErrAlreadyExists call is already part of conference. - * @leave KErrNotReady In case conference is not on hold or idle. - * @pre Conference call state is MCCEConferenceCallObserver::ECCEConferenceHold or - * MCCEConferenceCallObserver::ECCEConferenceIdle. - * @post Added call is notified calling MCCEConferenceCallObserver::CallEventOccurred. - * @post If conference becomes active regarding its internal plug-in based logic state is - * MCCEConferenceCallObserver::ECCEConferenceActive. - */ + /** + * Adds new call to conference call. + * @since S60 3.2 + * @param aCall Call to be added to conference. + * @return none + * @leave In case of an error system wide error code + * @leave KErrAlreadyExists call is already part of conference. + * @leave KErrNotReady In case conference is not on hold or idle. + * @pre Conference call state is MCCEConferenceCallObserver::ECCEConferenceHold or + * MCCEConferenceCallObserver::ECCEConferenceIdle. + * @post Added call is notified calling MCCEConferenceCallObserver::CallEventOccurred. + * @post If conference becomes active regarding its internal plug-in based logic state is + * MCCEConferenceCallObserver::ECCEConferenceActive. + */ virtual void AddCallL( MCCECall& aCall ) = 0; - /** - * Removes call from conference call. - * @since S60 3.2 - * @param aCall Call to be removed from conference - * @return none - * @leave In case of an error system wide error code - * @leave KErrNotFound call was not part of conference - * @leave KErrNotReady In case conference is not connected - * (MCCEConferenceCallObserver::ECCEConferenceActive) state. - * @pre Conference call state is MCCEConferenceCallObserver::ECCEConferenceActive or - * MCCEConferenceCallObserver::ECCEConferenceIdle. - * @post Removed call is notified calling MCCEConferenceCallObserver::CallEventOccurred. - * @post If conference becomes idle regarding its internal plug-in based logic state is - * MCCEConferenceCallObserver::ECCEConferenceIdle. - * - */ - virtual void RemoveCallL( MCCECall& aCall ) = 0; + /** + * Removes call from conference call. + * @since S60 3.2 + * @param aCall Call to be removed from conference + * @return none + * @leave In case of an error system wide error code + * @leave KErrNotFound call was not part of conference + * @leave KErrNotReady In case conference is not connected + * (MCCEConferenceCallObserver::ECCEConferenceActive) state. + * @pre Conference call state is MCCEConferenceCallObserver::ECCEConferenceActive or + * MCCEConferenceCallObserver::ECCEConferenceIdle. + * @post Removed call is notified calling MCCEConferenceCallObserver::CallEventOccurred. + * @post If conference becomes idle regarding its internal plug-in based logic state is + * MCCEConferenceCallObserver::ECCEConferenceIdle. + * + */ + virtual void RemoveCallL( MCCECall& aCall ) = 0; /** * Returns call count of the conference call. @@ -136,15 +136,15 @@ /** * Private call with one call from conference call. - * @since S60 3.2 - * @param aCall + * @since S60 3.2 + * @param aCall * @return none - * @leave In case of an error system wide error code - * @leave KErrNotFound call was not part of conference - * @post After successful actions conference call state is MCCEConferenceCallObserver::ECCEConferenceHold - * (if idle state will not be applied as call count decreases) and private call will become active one. - */ - virtual void GoOneToOneL( MCCECall& aCall ) = 0; + * @leave In case of an error system wide error code + * @leave KErrNotFound call was not part of conference + * @post After successful actions conference call state is MCCEConferenceCallObserver::ECCEConferenceHold + * (if idle state will not be applied as call count decreases) and private call will become active one. + */ + virtual void GoOneToOneL( MCCECall& aCall ) = 0; /** * Gets conference participants @@ -165,15 +165,15 @@ */ virtual void SetObserver( const MCCEConferenceCallObserver& aObserver ) = 0; - /** - * Returns duration of a conference call. - * CCE will count duration from connected state to idle state. - * - * @since S60 v3.2 - * @param none - * @return On return contains the call duration in seconds. - */ - virtual TTimeIntervalSeconds CallDuration() const = 0; + /** + * Returns duration of a conference call. + * CCE will count duration from connected state to idle state. + * + * @since S60 v3.2 + * @param none + * @return On return contains the call duration in seconds. + */ + virtual TTimeIntervalSeconds CallDuration() const = 0; }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mcceconferencecallobserver.h --- a/phonesrv_plat/converged_call_engine_api/inc/mcceconferencecallobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mcceconferencecallobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -40,15 +40,15 @@ /** A call has been removed from the conference. */ ECCEConferenceCallRemoved, /** Names of the two calls used to build the conference call returned in aCallName. */ - ECCEConferenceBuilt, + ECCEConferenceBuilt, /** No name provided */ ECCEConferenceTerminated, /** No name provided. */ - ECCEConferenceSwapped, + ECCEConferenceSwapped, /** Name of the call being seperated. */ - ECCEConferenceSplit + ECCEConferenceSplit }; - + /** Conference call State. */ enum TCCEConferenceCallState { @@ -59,7 +59,7 @@ /** The conference call is in the held, connected state. */ ECCEConferenceHold }; - + /** Conference call capabilities. */ enum TCCEConferenceCallCaps { @@ -117,15 +117,15 @@ */ virtual void ErrorOccurred( TCCPConferenceCallError aError ) = 0; - /** - * Notifies observer the change in call duration. - * - * @since S60 v3.2 - * @param aDuration Duration of the call in seconds - * return none - */ - virtual void CallDurationChanged( const TTimeIntervalSeconds aDuration ) = 0; - }; + /** + * Notifies observer the change in call duration. + * + * @since S60 v3.2 + * @param aDuration Duration of the call in seconds + * return none + */ + virtual void CallDurationChanged( const TTimeIntervalSeconds aDuration ) = 0; + }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mccecscall.h --- a/phonesrv_plat/converged_call_engine_api/inc/mccecscall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mccecscall.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ #include // creates dependency .... -// commented 3105 will be removed later #include +// commented 3105 will be removed later #include /** * Methods used only with CS Call. @@ -32,37 +32,37 @@ * @since S60 3.2 */ class MCCECSCall - { + { public: - /** - * Switch in the alternating call mode of an alternating call - * @since S60 3.2 + /** + * Switch in the alternating call mode of an alternating call + * @since S60 3.2 * @param none - * @return none - */ - virtual TInt SwitchAlternatingCall() = 0; + * @return none + */ + virtual TInt SwitchAlternatingCall() = 0; - /** - * Gets the calls data call capabilities - * @since S60 3.2 - * @param aCaps TMobileCallDataCapsV1 - * @return KErrNone if the function member was successful, - * @return KErrNotSupported if call does not support circuit switched data, - * @return KErrNotFound if this call is not a data call - */ - virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const = 0; - - /** - * Instruct to do no FDN checking when dialling. - * Needs to be called before every dial for each call separately. - * If this method is not called at all default is to use FDN. - * Value will be reset to default when call goes back to disconnected state. - * @since S60 v3.2 - * @param none - * @return none - */ - virtual void NoFDNCheck() = 0; + /** + * Gets the calls data call capabilities + * @since S60 3.2 + * @param aCaps TMobileCallDataCapsV1 + * @return KErrNone if the function member was successful, + * @return KErrNotSupported if call does not support circuit switched data, + * @return KErrNotFound if this call is not a data call + */ + virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const = 0; + + /** + * Instruct to do no FDN checking when dialling. + * Needs to be called before every dial for each call separately. + * If this method is not called at all default is to use FDN. + * Value will be reset to default when call goes back to disconnected state. + * @since S60 v3.2 + * @param none + * @return none + */ + virtual void NoFDNCheck() = 0; /** * Log dialed number. SAT related, check if dialed number is to be logged or not. @@ -71,8 +71,8 @@ * @return Log dialed number or not. */ virtual TBool LogDialedNumber() const = 0; - - }; + + }; #endif //CCECSCALL_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mcceextensioninterface.h --- a/phonesrv_plat/converged_call_engine_api/inc/mcceextensioninterface.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mcceextensioninterface.h Wed Sep 01 12:15:03 2010 +0100 @@ -34,14 +34,14 @@ * @since S60 3.2 */ class MCCEExtensionInterface - { + { protected: /** * Protected destructor. Object cannot be deleted from client. * @since S60 3.2 */ virtual ~MCCEExtensionInterface() {}; - + public: /** @@ -62,7 +62,7 @@ * @return Other system wide error code. */ virtual TInt RequestCommand( TUint32 iServiceId, - TInt aRequestId, + TInt aRequestId, TDesC8& aData ) = 0; /** * Cancels request. See MCCEExtensionInterface::RequestCommand for explanation of service-id @@ -76,8 +76,8 @@ * @return Other system wide error code. */ virtual TInt CancelRequest( TUint32 iServiceId, - TInt aRequestId ) = 0; - }; + TInt aRequestId ) = 0; + }; #endif // MCCEEXTENSIONINTERFACE_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mcceextensionobserver.h --- a/phonesrv_plat/converged_call_engine_api/inc/mcceextensionobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mcceextensionobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -48,7 +48,7 @@ * @return none */ virtual void HandleExtensionEvents( TUint32 aServiceId, - TInt aEvent, + TInt aEvent, TInt aStatus ) = 0; }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mcceforwardinterface.h --- a/phonesrv_plat/converged_call_engine_api/inc/mcceforwardinterface.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mcceforwardinterface.h Wed Sep 01 12:15:03 2010 +0100 @@ -30,7 +30,7 @@ * @since S60 3.2 */ class MCCEForwardInterface - { + { protected: // Constructors and destructor /** @@ -38,35 +38,35 @@ * @since S60 3.2 */ virtual ~MCCEForwardInterface() {}; - + public: - /** - * Returns reference to array containing addresses of forward address choices. - * Index starts from zero. - * @since Series 60 3.2 - * @param none - * @return array containing forward address choices + /** + * Returns reference to array containing addresses of forward address choices. + * Index starts from zero. + * @since Series 60 3.2 + * @param none + * @return array containing forward address choices * @leave KErrNotReady Call is not in forwarding state * @leave KErrNotSupported If call is not mobile originated * @leave system error code * @pre Call state is MCCECallObserver::ECCEStateForwarding and call type is MO * @pre Call MCCECallObserver::EVoIPEventMultipleChoices event is received - */ - virtual const CDesC8Array& GetForwardAddressChoicesL() = 0; + */ + virtual const CDesC8Array& GetForwardAddressChoicesL() = 0; - /** - * Forward call to selected address at given index in array received from GetForwardAddressChoicesL - * @since Series 60 3.2 - * @param aIndex index in the address where the call is to be forwarded. - * Index starts from zero. - * @return none - * @leave KErrArgument Index is not in array + /** + * Forward call to selected address at given index in array received from GetForwardAddressChoicesL + * @since Series 60 3.2 + * @param aIndex index in the address where the call is to be forwarded. + * Index starts from zero. + * @return none + * @leave KErrArgument Index is not in array * @leave KErrNotReady Call is not in forwarding state * @leave KErrNotSupported If call is not mobile originated * @pre Call state is MCCECallObserver::ECCEStateForwarding and call type is MO - */ - virtual void ForwardToAddressL( const TInt aIndex ) = 0; - }; + */ + virtual void ForwardToAddressL( const TInt aIndex ) = 0; + }; #endif // MCCEFORWARDINTERFACE_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mcceobserver.h --- a/phonesrv_plat/converged_call_engine_api/inc/mcceobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mcceobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -60,7 +60,7 @@ * @param aConferenceCall Created conference * @return none */ - virtual void ConferenceCallCreated( MCCEConferenceCall& aConferenceCall ) = 0; + virtual void ConferenceCallCreated( MCCEConferenceCall& aConferenceCall ) = 0; /** * Notify data port information for video telephony. Information comes via CS only. @@ -68,7 +68,7 @@ * @param Dataport information. * @return none */ - virtual void DataPortName( TName& aPortName ) = 0; + virtual void DataPortName( TName& aPortName ) = 0; }; #endif // MCCEOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mccessobserver.h --- a/phonesrv_plat/converged_call_engine_api/inc/mccessobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mccessobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -40,43 +40,43 @@ enum TCCESsBarringEvent { /** Incoming call is barred. (DoCoMo) */ - ECCESsIncomingCallBarred, - /** Anonymous call barring. */ - ECCESsAnonymousCallBarred, - /** Outgoing call barring */ - ECCESsOutgoingCallBarred, - /** Barring active notification. */ - ECCESsActiveBarrings - }; + ECCESsIncomingCallBarred, + /** Anonymous call barring. */ + ECCESsAnonymousCallBarred, + /** Outgoing call barring */ + ECCESsOutgoingCallBarred, + /** Barring active notification. */ + ECCESsActiveBarrings + }; /** CLI (Call Line Information) related event. */ enum TCCESsCLIEvent { /** Temporary CLIR suppression was unsuccessful */ - ECCESsTempClirSuppressUnsuccessful, + ECCESsTempClirSuppressUnsuccessful, /** Temporary CLIR activation was unsuccessful*/ - ECCESsTempClirActivationUnsuccessful + ECCESsTempClirActivationUnsuccessful }; /** Call forward related events that are not call related to an existing call. */ enum TCCESsCallForwardEvent { /** Incoming call is forwarded */ - ECCESsIncCallIsForw, - /** Incoming call was forwarded because of user own settings. */ - ECCESsIncCallForwToC, + ECCESsIncCallIsForw, + /** Incoming call was forwarded because of user own settings. */ + ECCESsIncCallForwToC, /** Outgoing call was forwarded because of user own settings. */ - ECCESsOutCallForwToC, + ECCESsOutCallForwToC, /** Forward unconditional mode active */ - ECCESsForwardUnconditionalModeActive, - /** Forward unconditional mode deactive */ - ECCESsForwardUnconditionalModeNotActive, - /** Forward conditional mode active */ - ECCESsForwardConditionallyModeActive, - /** Forward conditional mode deactive */ - ECCESsForwardConditionallyModeNotActive, - /** Remote call waiting. TODO rename TCCESsCallForwardEvent to TCCESsCallEvent*/ - ESsCallWaiting + ECCESsForwardUnconditionalModeActive, + /** Forward unconditional mode deactive */ + ECCESsForwardUnconditionalModeNotActive, + /** Forward conditional mode active */ + ECCESsForwardConditionallyModeActive, + /** Forward conditional mode deactive */ + ECCESsForwardConditionallyModeNotActive, + /** Remote call waiting. TODO rename TCCESsCallForwardEvent to TCCESsCallEvent*/ + ESsCallWaiting }; /** Closed user group (Cug) */ @@ -94,27 +94,27 @@ * @return none * @since S60 v3.2 */ - virtual void BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent ) = 0; - + virtual void BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent ) = 0; + /** * Supplementary service call line identification event occurred. * @param aCallLineEvent Event that occurred. * @return none * @since S60 v3.2 */ - virtual void CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent ) = 0; - + virtual void CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent ) = 0; + /** * Supplementary service related call forward event occurred. * @param aForwardMode Forward mode - * @param aRemoteAddress Remote address. + * @param aRemoteAddress Remote address. * @return none * @since S60 v3.2 */ - virtual void CallForwardEventOccurred( - const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent, - const TDesC& aRemoteAddress ) = 0; + virtual void CallForwardEventOccurred( + const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent, + const TDesC& aRemoteAddress ) = 0; /** * Supplementary service related active closed user group indications. @@ -122,16 +122,16 @@ * @return none * @since S60 v3.2 */ - virtual void CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent ) = 0; + virtual void CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent ) = 0; /** * Notifies active ALS line. CS plugin will notify this every time line changes - * and at startup. + * and at startup. * @param aLine Used ALS line. * @return none * @since S60 v3.2 */ - virtual void NotifyCurrentActiveALSLine( TInt aLine ) = 0; + virtual void NotifyCurrentActiveALSLine( TInt aLine ) = 0; }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_engine_api/inc/mccetransferinterface.h --- a/phonesrv_plat/converged_call_engine_api/inc/mccetransferinterface.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_engine_api/inc/mccetransferinterface.h Wed Sep 01 12:15:03 2010 +0100 @@ -29,72 +29,72 @@ * @since S60 3.2 */ class MCCETransferInterface - { + { protected: - /** - * Protected destructor. Object cannot be deleted from client. - * @since S60 3.2 - */ - virtual ~MCCETransferInterface() {}; - + /** + * Protected destructor. Object cannot be deleted from client. + * @since S60 3.2 + */ + virtual ~MCCETransferInterface() {}; + public: - /** - * Attended transfer to given address. - * Actual result like status, events and errors come via MCCECallObserver class. - * Afterwards both calls will be disconnected from CCE side. - * @param aTransferTarget Transfer target address. Always takes active call, address is not used - * at the moment! - * @return KErrArgument transfer address was illegal. - * @return KErrNotFound existing active call was not found with given address. - * @return KErrNotReady if this call is not on-hold state and the other in connected state - * @return KErrNotSupported Current plug-in does not support transfer functionality. - * @pre Two calls exist. This call is in state MCCECallObserver::ECCEStateHold and the other in - * MCCECallObserver::ECCEStateConnected - * @since S60 3.2 - */ - virtual TInt AttendedTransfer( const TDesC& aTransferTarget ) = 0; + /** + * Attended transfer to given address. + * Actual result like status, events and errors come via MCCECallObserver class. + * Afterwards both calls will be disconnected from CCE side. + * @param aTransferTarget Transfer target address. Always takes active call, address is not used + * at the moment! + * @return KErrArgument transfer address was illegal. + * @return KErrNotFound existing active call was not found with given address. + * @return KErrNotReady if this call is not on-hold state and the other in connected state + * @return KErrNotSupported Current plug-in does not support transfer functionality. + * @pre Two calls exist. This call is in state MCCECallObserver::ECCEStateHold and the other in + * MCCECallObserver::ECCEStateConnected + * @since S60 3.2 + */ + virtual TInt AttendedTransfer( const TDesC& aTransferTarget ) = 0; - /** - * Unattended transfer to given address. Call is requested to be transferred to given address. - * Afterwards call will be disconnected from CCE side. If transfer fails a new incoming call - * will be received to reconnect to recipient. Reconnected call is initiated from recipient end. - * Actual result like status, events and errors come via MCCECallObserver class. - * This is not used for CS. - * @since S60 3.2 - * @param aTransferTarget Address of the target + /** + * Unattended transfer to given address. Call is requested to be transferred to given address. + * Afterwards call will be disconnected from CCE side. If transfer fails a new incoming call + * will be received to reconnect to recipient. Reconnected call is initiated from recipient end. + * Actual result like status, events and errors come via MCCECallObserver class. + * This is not used for CS. + * @since S60 3.2 + * @param aTransferTarget Address of the target * @return KErrNone if request was started succesfully. * @return KErrNotSupported Current plug-in does not support transfer functionality. * @return KErrNotReady if call is not in connected or on-hold state. * @return KErrArgument transfer address was illegal. * @pre Call state is MCCECallObserver::ECCPStateConnected or MCCECallObserver::ECCEStateHold - */ - virtual TInt UnattendedTransfer( const TDesC& aTransferTarget ) = 0; + */ + virtual TInt UnattendedTransfer( const TDesC& aTransferTarget ) = 0; - /** - * Accept incoming unattended transfer request from the call remote party. - * @since Series 60 3.2 - * @param aAccept Boolean value is transfer accepted or not. + /** + * Accept incoming unattended transfer request from the call remote party. + * @since Series 60 3.2 + * @param aAccept Boolean value is transfer accepted or not. * @return KErrNotSupported Current plug-in does not support transfer functionality. * @return KErrNone if request was started succesfully. * @return KErrNotReady if call is not in transferring state. * @pre Call state is MCCECallObserver::ECCEStateTransferring - */ - virtual TInt AcceptTransfer( const TBool aAccept ) = 0; - - /** + */ + virtual TInt AcceptTransfer( const TBool aAccept ) = 0; + + /** * NOTE: Will be removed! MCCECallObserver::HandleTransfer contains remote party already. * CCE will map the recipient in openNewCallL to pre-existing one * CCECallCall::EventOccurred(ECCERemoteTransferring). * The new recipient of the call can be fetched via this method. - * @since Series 60 3.2 - * @param none - * @return New recipient for the call after transfer - */ - virtual const TDesC& TransferTarget() const = 0; - - }; + * @since Series 60 3.2 + * @param none + * @return New recipient for the call after transfer + */ + virtual const TDesC& TransferTarget() const = 0; + + }; #endif // MCCETRANSFERINTERFACE_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.h --- a/phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -103,7 +103,7 @@ */ virtual void InitializeL( const TUint32 aServiceId, const MCCPObserver& aObserver, - const MCCPSsObserver& aSsObserver ); + const MCCPSsObserver& aSsObserver ); /** * Initialize CConvergedCallProvider after it is created with NewL. @@ -113,7 +113,7 @@ * @leave KErrAlreadyExists If this method has already been called. */ virtual void InitializeL( const MCCPObserver& aObserver, - const MCCPSsObserver& aSsObserver ) = 0; + const MCCPSsObserver& aSsObserver ) = 0; /** * Creates a new call. @@ -133,8 +133,8 @@ * @pre Initialize has been called. */ virtual MCCPCall* NewCallL( const CCCPCallParameters& aParameters, - const TDesC& aRecipient, - const MCCPCallObserver& aObserver ) = 0; + const TDesC& aRecipient, + const MCCPCallObserver& aObserver ) = 0; /** * Releases all bindings to call and deletes it. * This will be called by CCE to free all the resources reserved for the call. @@ -161,8 +161,8 @@ * Can be KNullDesC. Plug-in will use the given address and/or use its own information. * @param aObserver Observer for the emergency call. * @return MCCPEmergencyCall Created emergency call. - * @leave plug-in does not support emergency calls. - * @leave In case of failure system error code. + * @leave plug-in does not support emergency calls. + * @leave In case of failure system error code. * @pre Emergency call object is created. */ virtual MCCPEmergencyCall* NewEmergencyCallL( const TUint32 aServiceId, @@ -196,11 +196,11 @@ * @leave KErrNotReady Temporarily not able to create the requested conference. * @leave KErrNoMemory Memory error. * @leave KErrArgument Invalid service id. - * @leave plug-in does not support conference calls. + * @leave plug-in does not support conference calls. * @pre Initialize has been called. */ virtual MCCPConferenceCall* NewConferenceL( const TUint32 aServiceId, - const MCCPConferenceCallObserver& aObserver ) = 0; + const MCCPConferenceCallObserver& aObserver ) = 0; /** * Releases all bindings to conference call. CCE will call this after receiving @@ -233,50 +233,50 @@ virtual TUint32 Caps() const = 0; /** - * Request DTMF provider for dtmf functionality extension. Only one instance exist. Must return the - * already created object if called again after initial creation. + * Request DTMF provider for dtmf functionality extension. Only one instance exist. Must return the + * already created object if called again after initial creation. * @since Series 60 3.2 * @param aObserver Observer for DTMF events. - * @return Pointer to MCCPDTMFProvider if plug-in support dtmf, returns NULL if not supported. - * In not supported return NULL but do not leave. + * @return Pointer to MCCPDTMFProvider if plug-in support dtmf, returns NULL if not supported. + * In not supported return NULL but do not leave. * @pre Initialize has been called. * @leave KErrNoMemory Memory allocation error. * @leave Other general system error. - */ - virtual MCCPDTMFProvider* DTMFProviderL( const MCCPDTMFObserver& aObserver ) = 0; + */ + virtual MCCPDTMFProvider* DTMFProviderL( const MCCPDTMFObserver& aObserver ) = 0; - /** - * Request extension provider for custom command handling features. Must return the - * already created object if called again after initial creation. - * @since Series 60 3.2 + /** + * Request extension provider for custom command handling features. Must return the + * already created object if called again after initial creation. + * @since Series 60 3.2 * @param aObserver observer for extension(custom) events. - * @return Pointer to MCCPExtensionProvider if plug-in support extensions, returns NULL if not supported. - * In not supported return NULL but do not leave. + * @return Pointer to MCCPExtensionProvider if plug-in support extensions, returns NULL if not supported. + * In not supported return NULL but do not leave. * @pre Initialize has been called. * @leave KErrNoMemory Memory allocation error. * @leave Other general system error. - */ - virtual MCCPExtensionProvider* ExtensionProviderL( const MCCPExtensionObserver& aObserver ) = 0; + */ + virtual MCCPExtensionProvider* ExtensionProviderL( const MCCPExtensionObserver& aObserver ) = 0; - /** - * This method gets the lifetime of the MS. The lifetime information - * includes the manufacturing date of the MS and the total amount of airtime use, - * from the manufacturing date until the call to this method. Calling this method - * does not reset any data. This is used only CS, other plug-ins may ignore this method. - * @since S60 3.2 - * @param aLifeTimeInfo Life time information - * @return Get succeeded or not. Default if not implemeted return false. - */ - virtual TBool GetLifeTime( TDes8& /*aLifeTimeInfo*/ ) { return EFalse; }; + /** + * This method gets the lifetime of the MS. The lifetime information + * includes the manufacturing date of the MS and the total amount of airtime use, + * from the manufacturing date until the call to this method. Calling this method + * does not reset any data. This is used only CS, other plug-ins may ignore this method. + * @since S60 3.2 + * @param aLifeTimeInfo Life time information + * @return Get succeeded or not. Default if not implemeted return false. + */ + virtual TBool GetLifeTime( TDes8& /*aLifeTimeInfo*/ ) { return EFalse; }; - /** - * This method gets cs specific information from cs-plugin. This is used only CS, - * other plug-ins may ignore this method. - * @since S60 3.2 - * @param aCSInfo CS specific information from cs-plugin. - * @return Get succeeded or not. Default if not implemeted return false. - */ - virtual TBool GetCSInfo( CSInfo& /*aCSInfo*/ ) { return EFalse; }; + /** + * This method gets cs specific information from cs-plugin. This is used only CS, + * other plug-ins may ignore this method. + * @since S60 3.2 + * @param aCSInfo CS specific information from cs-plugin. + * @return Get succeeded or not. Default if not implemeted return false. + */ + virtual TBool GetCSInfo( CSInfo& /*aCSInfo*/ ) { return EFalse; }; private: // Data diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.inl --- a/phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.inl Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.inl Wed Sep 01 12:15:03 2010 +0100 @@ -75,9 +75,9 @@ // ----------------------------------------------------------------------------- // inline void CConvergedCallProvider::ListImplementationsL( RImplInfoPtrArray& aImplArray ) - { + { REComSession::ListImplementationsL( KConvergedCallProviderUid, aImplArray ); - } + } // ----------------------------------------------------------------------------- // CCCPInterface::InitializeL @@ -86,7 +86,7 @@ // inline void CConvergedCallProvider::InitializeL( const TUint32 /*aServiceId*/, const MCCPObserver& aObserver, - const MCCPSsObserver& aSsObserver ) + const MCCPSsObserver& aSsObserver ) { InitializeL( aObserver, aSsObserver ); } diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/ccpdefs.h --- a/phonesrv_plat/converged_call_provider_api/inc/ccpdefs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/ccpdefs.h Wed Sep 01 12:15:03 2010 +0100 @@ -36,9 +36,8 @@ const TUint KCCPPhoneSerialNumberSize = 50; // const TUint KCCPSysUtilVersionTextLength = 64; // from sysutil.h const TUint KCCPPhoneModelIdSize = 50; // from RMobilePhone::KPhoneModelIdSize -const TUint KCCPPhoneManufacturerIdSize = 50; // fromRMobilePhone::KPhoneManufacturerIdSize +const TUint KCCPPhoneManufacturerIdSize = 50; // fromRMobilePhone::KPhoneManufacturerIdSize const TUint KCCPUUSIdSize = 129; // etelmm.h, as KMaxUUISize -const TUint KCCPAlphaIdMaxSize = 254; // etelmm.h, as KAlphaIdMaxSize /** diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpcallobserver.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpcallobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpcallobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -33,28 +33,28 @@ class MCCPCallObserver { public: - /** Call states */ - enum TCCPCallState - { - /** Indicates initial call state after call creation. Basic state. */ - ECCPStateIdle, - /** Indicates that the MT call is ringing but not answered yet by the local user. Basic state.*/ - ECCPStateRinging, - /** MO Call: the network notifies to the MS that the remote party is now ringing. Basic state.*/ - ECCPStateConnecting, - /** Indicates that call is connected and active. Basic state.*/ - ECCPStateConnected, - /** Indicates that call is disconnecting. Basic state.*/ - ECCPStateDisconnecting, - /** Indicates that the call is connected but on hold. Basic state.*/ - ECCPStateHold, + /** Call states */ + enum TCCPCallState + { + /** Indicates initial call state after call creation. Basic state. */ + ECCPStateIdle, + /** Indicates that the MT call is ringing but not answered yet by the local user. Basic state.*/ + ECCPStateRinging, + /** MO Call: the network notifies to the MS that the remote party is now ringing. Basic state.*/ + ECCPStateConnecting, + /** Indicates that call is connected and active. Basic state.*/ + ECCPStateConnected, + /** Indicates that call is disconnecting. Basic state.*/ + ECCPStateDisconnecting, + /** Indicates that the call is connected but on hold. Basic state.*/ + ECCPStateHold, - /** Call is transfering. Optional state.*/ - ECCPStateTransferring, - /** MO call is being forwarded at receiver end. Optional state. */ - ECCPStateForwarding, - /** Call is queued locally. Optional state. */ - ECCPStateQueued, + /** Call is transfering. Optional state.*/ + ECCPStateTransferring, + /** MO call is being forwarded at receiver end. Optional state. */ + ECCPStateForwarding, + /** Call is queued locally. Optional state. */ + ECCPStateQueued, /** Indicates that the local user has answered the MT call but the network has not acknowledged the call connection yet. Must be sent after MCCPCall::Answer method has been completed. */ @@ -62,189 +62,189 @@ /** Indicates that the call is dialing. Must be sent after MCCPCall::Dial method has been completed. */ ECCPStateDialling, - - }; + + }; - /** Describes the possible call events. */ - enum TCCPCallEvent - { - /** Call has been placed on hold as a result of a local action. */ - ECCPLocalHold, - /** Call has been placed on hold by the remote connected party. */ - ECCPRemoteHold, - /** Call has been resumed as a result of a local action. */ - ECCPLocalResume, - /** Call has been resumed by the remote connected party. */ - ECCPRemoteResume, - /** Outgoing call has been barred by the local party. */ - ECCPLocalBarred, - /** Outgoing call has been barred by the remote party. */ - ECCPRemoteBarred, - /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */ - ECCPRemoteWaiting, - /** Call has been terminated by the remote party. */ - ECCPRemoteTerminated, - /** Call is in queue */ - ECCPQueued, + /** Describes the possible call events. */ + enum TCCPCallEvent + { + /** Call has been placed on hold as a result of a local action. */ + ECCPLocalHold, + /** Call has been placed on hold by the remote connected party. */ + ECCPRemoteHold, + /** Call has been resumed as a result of a local action. */ + ECCPLocalResume, + /** Call has been resumed by the remote connected party. */ + ECCPRemoteResume, + /** Outgoing call has been barred by the local party. */ + ECCPLocalBarred, + /** Outgoing call has been barred by the remote party. */ + ECCPRemoteBarred, + /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */ + ECCPRemoteWaiting, + /** Call has been terminated by the remote party. */ + ECCPRemoteTerminated, + /** Call is in queue */ + ECCPQueued, - /** VoIP specific */ - ECCCSPEarlyMediaStarted, + /** VoIP specific */ + ECCCSPEarlyMediaStarted, - /** Call is secure */ - ECCPSecureCall, - /** Call is not secure */ - ECCPNotSecureCall, - - /** VoIP specific - User has called with address containing "SIPS:" prefix. This event notifies that - secure call signaling is not possible. **/ - ECCPNotSecureSessionWithSips, + /** Call is secure */ + ECCPSecureCall, + /** Call is not secure */ + ECCPNotSecureCall, + + /** VoIP specific + User has called with address containing "SIPS:" prefix. This event notifies that + secure call signaling is not possible. **/ + ECCPNotSecureSessionWithSips, - /** Call has been added to remote conference call at remote end */ - ECCPRemoteConferenceCreate, - - //////////////////////////// - // CS call specific events - /////////////////////////// - - /** CS call specific event */ - ECCPCSDataPortLoaned, - /** CS call specific event */ - ECCPCSDataPortRecovered, + /** Call has been added to remote conference call at remote end */ + ECCPRemoteConferenceCreate, + + //////////////////////////// + // CS call specific events + /////////////////////////// + + /** CS call specific event */ + ECCPCSDataPortLoaned, + /** CS call specific event */ + ECCPCSDataPortRecovered, - /** One or more of following information has been changed + /** One or more of following information has been changed * - Remote party name * - Remote party number/address * - Call parameters ( ie. service id ) - */ - ECCPNotifyRemotePartyInfoChange, + */ + ECCPNotifyRemotePartyInfoChange, /** Call secure status cannot be determined */ ECCPSecureNotSpecified - }; + }; - /** Flags indicating all the possible call control capabilities. */ - enum TCCPCallControlCaps - { - /** Call supports data calls. */ - ECCPCapsData = 0x00000001, - /** Call supports fax calls. */ - ECCPCapsFax = 0x00000002, - /** Call supports voice calls. */ - ECCPCapsVoice = 0x00000004, - /** The Dial request is currently a valid action. */ - ECCPCapsDial = 0x00000008, - /** The Connect request is currently a valid action. */ - ECCPCapsConnect = 0x00000010, - /** The Hang Up request is currently a valid action. */ - ECCPCapsHangUp = 0x00000020, - /** The Answer request is currently a valid action. */ - ECCPCapsAnswer = 0x00000040, - /** The Loan Data Port request is currently a valid action. */ - ECCPCapsLoanDataPort = 0x00000080, - /** The Recover Data Port request is currently a valid action. */ - ECCPCapsRecoverDataPort= 0x00000100, - /** Indicates that this call can be put on hold. This implies that the call is currently - active and that there is no other held call. */ - ECCPCapsHold = 0x00000200, - /** Indicates that this call can be resumed. This implies that the call is currently - on hold and that there is no other active call. */ - ECCPCapsResume = 0x00000400, - /** Indicates that this call's state can be swapped to the opposite state. This - implies that this call is either active or held. There may be another call - in the opposite state and if this is the case then both calls will be simultaneously - swapped to their opposite state. */ - ECCPCapsSwap = 0x00000800, - /** Indicates that this incoming call can be deflected to another destination.*/ - ECCPCapsDeflect = 0x00001000, - /** Indicates that this call can be transferred to the remote party of another call. - For this capability to be set there must be one active call and one held or - dialing call.*/ - ECCPCapsTransfer = 0x00002000, - /** Indicates that this call can be joined either to another single call to form - a conference call or to an existing conference call.*/ - ECCPCapsJoin = 0x00004000, - /** Indicates that this call (within a conference call) can go into One to One mode. - This action would put the rest of the conference call on hold. */ - ECCPCapsOneToOne = 0x00008000, - /** Indicates that the user can activate a CCBS request on this failed call set-up.*/ - ECCPCapsActivateCCBS = 0x00010000, - /** Indicates that this call is part of an alternating call and the client can call - SwitchAlternatingCall() on this call in order to switch it to its other mode.*/ - ECCPCapsSwitchAlternatingCall = 0x00020000, - /** Indicates that this call can use/create a new bearer. This means that multiple - calls (multicall) can be active at the same time using no more that 7 bearers - simultaneously. The other option is to swap with an active call, therefore - it becomes held and shares the same bearer.*/ - ECCPCapsMulticall = 0x00040000, - /** Indicates that this call is an packet switched call */ - ECCPCapsPSCall = 0x00080000, - /** Indicates that this call supports unattended transfer method and that this call - is currently active */ - ECCPCapsUnattendedTransfer = 0x00100000, - /** Indicates that a conference call can be created. */ - KCCPCapsCreate = 0x00200000 - }; + /** Flags indicating all the possible call control capabilities. */ + enum TCCPCallControlCaps + { + /** Call supports data calls. */ + ECCPCapsData = 0x00000001, + /** Call supports fax calls. */ + ECCPCapsFax = 0x00000002, + /** Call supports voice calls. */ + ECCPCapsVoice = 0x00000004, + /** The Dial request is currently a valid action. */ + ECCPCapsDial = 0x00000008, + /** The Connect request is currently a valid action. */ + ECCPCapsConnect = 0x00000010, + /** The Hang Up request is currently a valid action. */ + ECCPCapsHangUp = 0x00000020, + /** The Answer request is currently a valid action. */ + ECCPCapsAnswer = 0x00000040, + /** The Loan Data Port request is currently a valid action. */ + ECCPCapsLoanDataPort = 0x00000080, + /** The Recover Data Port request is currently a valid action. */ + ECCPCapsRecoverDataPort= 0x00000100, + /** Indicates that this call can be put on hold. This implies that the call is currently + active and that there is no other held call. */ + ECCPCapsHold = 0x00000200, + /** Indicates that this call can be resumed. This implies that the call is currently + on hold and that there is no other active call. */ + ECCPCapsResume = 0x00000400, + /** Indicates that this call's state can be swapped to the opposite state. This + implies that this call is either active or held. There may be another call + in the opposite state and if this is the case then both calls will be simultaneously + swapped to their opposite state. */ + ECCPCapsSwap = 0x00000800, + /** Indicates that this incoming call can be deflected to another destination.*/ + ECCPCapsDeflect = 0x00001000, + /** Indicates that this call can be transferred to the remote party of another call. + For this capability to be set there must be one active call and one held or + dialing call.*/ + ECCPCapsTransfer = 0x00002000, + /** Indicates that this call can be joined either to another single call to form + a conference call or to an existing conference call.*/ + ECCPCapsJoin = 0x00004000, + /** Indicates that this call (within a conference call) can go into One to One mode. + This action would put the rest of the conference call on hold. */ + ECCPCapsOneToOne = 0x00008000, + /** Indicates that the user can activate a CCBS request on this failed call set-up.*/ + ECCPCapsActivateCCBS = 0x00010000, + /** Indicates that this call is part of an alternating call and the client can call + SwitchAlternatingCall() on this call in order to switch it to its other mode.*/ + ECCPCapsSwitchAlternatingCall = 0x00020000, + /** Indicates that this call can use/create a new bearer. This means that multiple + calls (multicall) can be active at the same time using no more that 7 bearers + simultaneously. The other option is to swap with an active call, therefore + it becomes held and shares the same bearer.*/ + ECCPCapsMulticall = 0x00040000, + /** Indicates that this call is an packet switched call */ + ECCPCapsPSCall = 0x00080000, + /** Indicates that this call supports unattended transfer method and that this call + is currently active */ + ECCPCapsUnattendedTransfer = 0x00100000, + /** Indicates that a conference call can be created. */ + KCCPCapsCreate = 0x00200000 + }; protected: - /** - * Protects the observer being deleted through the observer interface - * @since S60 3.2 - */ - virtual inline ~MCCPCallObserver() {}; + /** + * Protects the observer being deleted through the observer interface + * @since S60 3.2 + */ + virtual inline ~MCCPCallObserver() {}; public: - /** - * An error has occurred concerning a specific call. - * @since S60 3.2 - * @param aError Error code. - * @param aCall Pointer to used ccp call, can be NULL in emergency call - * @return none - */ - virtual void ErrorOccurred( const TCCPError aError, MCCPCall* aCall ) = 0; + /** + * An error has occurred concerning a specific call. + * @since S60 3.2 + * @param aError Error code. + * @param aCall Pointer to used ccp call, can be NULL in emergency call + * @return none + */ + virtual void ErrorOccurred( const TCCPError aError, MCCPCall* aCall ) = 0; - /** - * The state of the call has changed. - * @since S60 3.2 - * @param aState Call state. - * @param aCall Pointer to used ccp call, can be NULL in emergency call - * @return none - */ - virtual void CallStateChanged( const MCCPCallObserver::TCCPCallState aState, - MCCPCall* aCall) = 0; + /** + * The state of the call has changed. + * @since S60 3.2 + * @param aState Call state. + * @param aCall Pointer to used ccp call, can be NULL in emergency call + * @return none + */ + virtual void CallStateChanged( const MCCPCallObserver::TCCPCallState aState, + MCCPCall* aCall) = 0; - /** - * The state of the call has changed with inband tone, meaning network is playing - * the tone relating to the state. - * @since S60 3.2 - * @param aState Call state. - * @param aCall Pointer to used ccp call, can be NULL in emergency call - * @return none - */ - virtual void CallStateChangedWithInband( const MCCPCallObserver::TCCPCallState aState, - MCCPCall* aCall ) = 0; + /** + * The state of the call has changed with inband tone, meaning network is playing + * the tone relating to the state. + * @since S60 3.2 + * @param aState Call state. + * @param aCall Pointer to used ccp call, can be NULL in emergency call + * @return none + */ + virtual void CallStateChangedWithInband( const MCCPCallObserver::TCCPCallState aState, + MCCPCall* aCall ) = 0; - /** - * An event has occurred concerning a specific call. - * @since S60 3.2 - * @param aEvent Occurred event. - * @param aCall Pointer to used ccp call, can be NULL in emergency call - * @return none - */ - virtual void CallEventOccurred( const MCCPCallObserver::TCCPCallEvent aEvent, - MCCPCall* aCall ) = 0; + /** + * An event has occurred concerning a specific call. + * @since S60 3.2 + * @param aEvent Occurred event. + * @param aCall Pointer to used ccp call, can be NULL in emergency call + * @return none + */ + virtual void CallEventOccurred( const MCCPCallObserver::TCCPCallEvent aEvent, + MCCPCall* aCall ) = 0; - /** - * Notifies changed call capabilities. - * @since S60 3.2 - * @param aCapsFlags New capabilities for the call - * @param aCall Pointer to used ccp call, can be NULL in emergency call - * @return none - */ - virtual void CallCapsChanged( const TUint32 aCapsFlags, - MCCPCall* aCall ) = 0; + /** + * Notifies changed call capabilities. + * @since S60 3.2 + * @param aCapsFlags New capabilities for the call + * @param aCall Pointer to used ccp call, can be NULL in emergency call + * @return none + */ + virtual void CallCapsChanged( const TUint32 aCapsFlags, + MCCPCall* aCall ) = 0; }; #endif // MCCPCALLOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpconferencecall.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpconferencecall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpconferencecall.h Wed Sep 01 12:15:03 2010 +0100 @@ -31,7 +31,7 @@ * @since S60 3.2 */ class MCCPConferenceCall - { + { protected: /** * Protected destructor. Object cannot be deleted from plug-in client (CCE). @@ -53,8 +53,8 @@ * Ends an ongoing conference call. * Does not delete the call. Call deletion is requested calling * CConvergedCallProvider::ReleaseConferenceCall. - * If the request cannot be started then an error will be returned immediately as return value. - * In succesfull case KErrNone will be returned and the requested action has been started. + * If the request cannot be started then an error will be returned immediately as return value. + * In succesfull case KErrNone will be returned and the requested action has been started. * @param None * @return KErrNone if request was started succesfully. * @return KErrAlreadyExists if conference is already in idle state. @@ -65,8 +65,8 @@ /** * Puts conference call on hold. - * If the request cannot be started then an error will be returned immediately as return value. - * In succesfull case KErrNone will be returned and the requested action has been started. + * If the request cannot be started then an error will be returned immediately as return value. + * In succesfull case KErrNone will be returned and the requested action has been started. * @param None * @return KErrNone if request was started succesfully. * @return KErrNotReady if conferencel is not in connected state. @@ -77,8 +77,8 @@ /** * Resumes previously held conference call. - * If the request cannot be started then an error will be returned immediately as return value. - * In succesfull case KErrNone will be returned and the requested action has been started. + * If the request cannot be started then an error will be returned immediately as return value. + * In succesfull case KErrNone will be returned and the requested action has been started. * @param None * @return KErrNone if request was started succesfully. * @return KErrNotReady if call is not in on-hold state. @@ -89,8 +89,8 @@ /** * Swaps a connected conference call between Hold and Resume. - * If the request cannot be started then an error will be returned immediately as return value. - * In succesfull case KErrNone will be returned and the requested action has been started. + * If the request cannot be started then an error will be returned immediately as return value. + * In succesfull case KErrNone will be returned and the requested action has been started. * @param none * @return KErrNone if request was started succesfully. * @return KErrNotReady if call is not in on-hold state or connected state @@ -100,84 +100,84 @@ */ virtual TInt Swap() = 0; - /** - * Adds a new call to conference call. - * When plug-in regards the call as added it will notify observer about it - * with call added notification MCCPConferenceCallObserver::ECCPConferenceCallAdded. - * - * @since S60 3.2 - * @param aCall Call to be added to conference. - * @return None - * @leave In case of an error system wide error code. - * @leave KErrAlreadyExists call is already part of conference. - * @leave KErrNotReady In case conference is not on hold or idle. - * @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceHold or - * MCCPConferenceCallObserver::ECCPConferenceIdle. - * @post Added call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred. - * @post If conference becomes active regarding its internal plug-in based logic state is - * MCCPConferenceCallObserver::ECCPConferenceActive. - */ - virtual void AddCallL( MCCPCall* aCall ) = 0; + /** + * Adds a new call to conference call. + * When plug-in regards the call as added it will notify observer about it + * with call added notification MCCPConferenceCallObserver::ECCPConferenceCallAdded. + * + * @since S60 3.2 + * @param aCall Call to be added to conference. + * @return None + * @leave In case of an error system wide error code. + * @leave KErrAlreadyExists call is already part of conference. + * @leave KErrNotReady In case conference is not on hold or idle. + * @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceHold or + * MCCPConferenceCallObserver::ECCPConferenceIdle. + * @post Added call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred. + * @post If conference becomes active regarding its internal plug-in based logic state is + * MCCPConferenceCallObserver::ECCPConferenceActive. + */ + virtual void AddCallL( MCCPCall* aCall ) = 0; - /** - * Removes a call from conference call. Can be called on any state. - * When plug-in regards the call as removed it will notify observer about it - * with call removed notification MCCPConferenceCallObserver::ECCPConferenceCallRemoved. - * @since S60 3.2 - * @param aCall Call to be removed from conference. - * @return None - * @leave In case of an error system wide error code. - * @leave KErrNotFound call was not part of conference. - * @leave KErrNotReady In case conference is not connected (MCCPConferenceCallObserver::ECCPConferenceActive) state. - * @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceActive or - * MCCPConferenceCallObserver::ECCPConferenceIdle. - * @post Removed call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred. - * @post If conference becomes idle regarding its internal plug-in based logic state is - * MCCPConferenceCallObserver::ECCPConferenceIdle. - */ - virtual void RemoveCallL( MCCPCall* aCall ) = 0; + /** + * Removes a call from conference call. Can be called on any state. + * When plug-in regards the call as removed it will notify observer about it + * with call removed notification MCCPConferenceCallObserver::ECCPConferenceCallRemoved. + * @since S60 3.2 + * @param aCall Call to be removed from conference. + * @return None + * @leave In case of an error system wide error code. + * @leave KErrNotFound call was not part of conference. + * @leave KErrNotReady In case conference is not connected (MCCPConferenceCallObserver::ECCPConferenceActive) state. + * @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceActive or + * MCCPConferenceCallObserver::ECCPConferenceIdle. + * @post Removed call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred. + * @post If conference becomes idle regarding its internal plug-in based logic state is + * MCCPConferenceCallObserver::ECCPConferenceIdle. + */ + virtual void RemoveCallL( MCCPCall* aCall ) = 0; + + /** + * Returns number of calls active calls in the conference. + * @since S60 3.2 + * @param None + * @return aCallCount Number of calls in conference. + */ + virtual TInt CallCount() const = 0; /** - * Returns number of calls active calls in the conference. - * @since S60 3.2 - * @param None - * @return aCallCount Number of calls in conference. - */ - virtual TInt CallCount() const = 0; + * Switch to a private call with given call that is part of conference. When call is regared + * as removed from conference it will be notified using + * MCCPConferenceCallObserver::ECCPConferenceCallRemoved. + * @since S60 3.2 + * @param aCall Call to go one-to-one with. + * @return None + * @leave KErrNotFound call was not part of conference. + * @post After successful actions conference call state is MCCPConferenceCallObserver::ECCPConferenceHold + * and private call will become active one. + */ + virtual void GoOneToOneL( MCCPCall& aCall ) = 0; /** - * Switch to a private call with given call that is part of conference. When call is regared - * as removed from conference it will be notified using - * MCCPConferenceCallObserver::ECCPConferenceCallRemoved. - * @since S60 3.2 - * @param aCall Call to go one-to-one with. - * @return None - * @leave KErrNotFound call was not part of conference. - * @post After successful actions conference call state is MCCPConferenceCallObserver::ECCPConferenceHold - * and private call will become active one. - */ - virtual void GoOneToOneL( MCCPCall& aCall ) = 0; - - /** - * Add all current calls in the plug-in to conference. Each succesfully added call will - * be separately notified using MCCPConferenceCallObserver::ECCPConferenceCallAdded. - * If call is not added to conference it is not notified and can be regareded as not - * part of conference - * @since S60 3.2 - * @param None - * @return None - * @leave In case of an error system wide error code. - */ - virtual void CurrentCallsToConferenceL() = 0; - + * Add all current calls in the plug-in to conference. Each succesfully added call will + * be separately notified using MCCPConferenceCallObserver::ECCPConferenceCallAdded. + * If call is not added to conference it is not notified and can be regareded as not + * part of conference + * @since S60 3.2 + * @param None + * @return None + * @leave In case of an error system wide error code. + */ + virtual void CurrentCallsToConferenceL() = 0; + /** * Gets conference participants - * @since S60 3.2 - * @param aCallArray Reference to call array + * @since S60 3.2 + * @param aCallArray Reference to call array * @return Error code - */ - virtual TInt GetCallArray( RPointerArray& aCallArray ) = 0; - + */ + virtual TInt GetCallArray( RPointerArray& aCallArray ) = 0; + /** * Add an observer for conference call related events. * Currently CCE will set only one observer. @@ -197,7 +197,7 @@ * @return KErrNotFound if observer was not found. */ virtual TInt RemoveObserver( const MCCPConferenceCallObserver& aObserver ) = 0; - }; + }; #endif // MCCPCONFERENCECALL_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpconferencecallobserver.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpconferencecallobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpconferencecallobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -115,8 +115,8 @@ * @param aCaps New capabilities for the conference call. * @return none */ - virtual void ConferenceCallCapsChanged( - const MCCPConferenceCallObserver::TCCPConferenceCallCaps aCaps ) = 0; + virtual void ConferenceCallCapsChanged( + const MCCPConferenceCallObserver::TCCPConferenceCallCaps aCaps ) = 0; /** * An error has occurred concerning a conference call. diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpcscall.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpcscall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpcscall.h Wed Sep 01 12:15:03 2010 +0100 @@ -30,57 +30,57 @@ */ class MCCPCSCall : public MCCPCall - { + { public: /** - * Starts dialing to recipient - * @since S60 3.2 - * @param aCallParams The call parameters used by the TSY (a TCallParamsPckg object) + * Starts dialing to recipient + * @since S60 3.2 + * @param aCallParams The call parameters used by the TSY (a TCallParamsPckg object) * @return KErrNone if request was started succesfully. * @return KErrNotReady if call is not in idle state. * @return KErrNotSupported If call is not mobile originated. * @pre Call state is MCCPCallObserver::ECCPStateIdle and call type is MO. * @since S60 3.2 - */ - virtual TInt Dial( const TDesC8& aCallParams ) = 0; + */ + virtual TInt Dial( const TDesC8& aCallParams ) = 0; - /** - * Instruct to do no FDN checking when dialling. - * Needs to be called before every dial for each call separately. - * If this method is not called at all default is to use FDN. - * Value will be reset to default when call goes back to disconnected state. - * @since S60 v3.2 - * @param none - * @return none - */ - virtual void NoFDNCheck() = 0; + /** + * Instruct to do no FDN checking when dialling. + * Needs to be called before every dial for each call separately. + * If this method is not called at all default is to use FDN. + * Value will be reset to default when call goes back to disconnected state. + * @since S60 v3.2 + * @param none + * @return none + */ + virtual void NoFDNCheck() = 0; - /** - * Returns call information - * @since S60 3.2 - * @param aCallInfo TMobileCallInfoV3 - * @return KErrNone if succesfull, otherwise another system wide error code - */ - virtual TInt GetMobileCallInfo( TDes8& aCallInfo ) const = 0; + /** + * Returns call information + * @since S60 3.2 + * @param aCallInfo TMobileCallInfoV3 + * @return KErrNone if succesfull, otherwise another system wide error code + */ + virtual TInt GetMobileCallInfo( TDes8& aCallInfo ) const = 0; - /** - * Switch in the alternating call mode of an alternating call - * @since S60 3.2 - * @param None + /** + * Switch in the alternating call mode of an alternating call + * @since S60 3.2 + * @param None * @return KErrNone or system error code. - */ - virtual TInt SwitchAlternatingCall() = 0; + */ + virtual TInt SwitchAlternatingCall() = 0; - /** - * Gets the calls data call capabilities - * @since S60 3.2 - * @param aCaps TMobileCallDataCapsV1 - * @return KErrNone if the function member was successful, - * @return KErrNotSupported if call does not support circuit switched data, - * @return KErrNotFound if this call is not a data call - */ - virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const = 0; + /** + * Gets the calls data call capabilities + * @since S60 3.2 + * @param aCaps TMobileCallDataCapsV1 + * @return KErrNone if the function member was successful, + * @return KErrNotSupported if call does not support circuit switched data, + * @return KErrNotFound if this call is not a data call + */ + virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const = 0; /** * Log dialed number. SAT related, check if dialed number is to be logged or not. @@ -89,7 +89,7 @@ * @return Log dialed number or not. */ virtual TBool LogDialedNumber() const = 0; - }; + }; #endif // CCPCSCALL_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpcsobserver.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpcsobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpcsobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -57,7 +57,7 @@ * @param aConferenceCall Created conference * @return none */ - virtual void ConferenceCallCreated( MCCPConferenceCall& aConferenceCall ) = 0; + virtual void ConferenceCallCreated( MCCPConferenceCall& aConferenceCall ) = 0; /** * Notify data port information for video telephony. @@ -65,7 +65,7 @@ * @param aPortName Dataport information. * @return none */ - virtual void DataPortName( TName& aPortName ) = 0; + virtual void DataPortName( TName& aPortName ) = 0; }; #endif // MCCPCSOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpdtmfprovider.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpdtmfprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpdtmfprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -31,63 +31,63 @@ * @since S60 3.2 */ class MCCPDTMFProvider - { + { protected: /** * Protected destructor. Object cannot be deleted from plug-in client (CCE). * @since S60 3.2 */ virtual inline ~MCCPDTMFProvider() {}; - + public: - /** - * Cancels asynchronous DTMF string sending. + /** + * Cancels asynchronous DTMF string sending. * @param none - * @return KErrNone request was started successfully - * @return KErrNotFound nothing found to cancel. - * @since Series 60 3.2 - */ - virtual TInt CancelDtmfStringSending() = 0; + * @return KErrNone request was started successfully + * @return KErrNotFound nothing found to cancel. + * @since Series 60 3.2 + */ + virtual TInt CancelDtmfStringSending() = 0; - /** - * Starts the transmission of a single DTMF tone across a connected and active call. - * @since S60 3.2 - * @param aTone tone to be played. - * @return KErrNone request was started successfully - * @return KErrArgument if the specified tone contains illegal dtmf character - * @return in case of an error system wide error code - */ - virtual TInt StartDtmfTone( const TChar aTone ) = 0; + /** + * Starts the transmission of a single DTMF tone across a connected and active call. + * @since S60 3.2 + * @param aTone tone to be played. + * @return KErrNone request was started successfully + * @return KErrArgument if the specified tone contains illegal dtmf character + * @return in case of an error system wide error code + */ + virtual TInt StartDtmfTone( const TChar aTone ) = 0; - /** - * Stops playing current DTMF tone. - * @since S60 3.2 + /** + * Stops playing current DTMF tone. + * @since S60 3.2 * @param none - * @return KErrNone request was started successfully + * @return KErrNone request was started successfully * @return KErrNotReady not ready to perform the requested action. - */ - virtual TInt StopDtmfTone() = 0; + */ + virtual TInt StopDtmfTone() = 0; - /** - * Plays DTMF string. - * @since S60 3.2 - * @param aString String to be played. - * @return KErrNone request was started successfully - * @return KErrArgument if the specified string contains illegal dtmf characters - */ - virtual TInt SendDtmfToneString( const TDesC& aString ) = 0; + /** + * Plays DTMF string. + * @since S60 3.2 + * @param aString String to be played. + * @return KErrNone request was started successfully + * @return KErrArgument if the specified string contains illegal dtmf characters + */ + virtual TInt SendDtmfToneString( const TDesC& aString ) = 0; - /** - * Continue or cancel sending DTMF string which was stopped with 'w'-character - * in string. - * @since S60 3.2 - * @param aContinue ETrue if sending of the DTMF string should continue, - * EFalse if the rest of the DTMF string is to be discarded. - * @return KErrNone request was started successfully - * @return KErrNotFound no send existed which to continue - */ - virtual TInt ContinueDtmfStringSending( const TBool aContinue ) = 0; - + /** + * Continue or cancel sending DTMF string which was stopped with 'w'-character + * in string. + * @since S60 3.2 + * @param aContinue ETrue if sending of the DTMF string should continue, + * EFalse if the rest of the DTMF string is to be discarded. + * @return KErrNone request was started successfully + * @return KErrNotFound no send existed which to continue + */ + virtual TInt ContinueDtmfStringSending( const TBool aContinue ) = 0; + /** * Add an observer for DTMF related events. * Currently CCE will set only one observer. @@ -107,7 +107,7 @@ */ virtual TInt RemoveObserver( const MCCPDTMFObserver& aObserver ) = 0; - }; + }; #endif // MCCPDTMFPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpemergencycall.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpemergencycall.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpemergencycall.h Wed Sep 01 12:15:03 2010 +0100 @@ -28,17 +28,17 @@ * @since S60 3.2 */ class MCCPEmergencyCall - { + { protected: /** * Protected destructor. Object cannot be deleted from plug-in client (CCE). * @since S60 3.2 */ virtual inline ~MCCPEmergencyCall() {}; - + public: - /** - * Dials an emergency call. + /** + * Dials an emergency call. * @param aRecipient Emergency call address suggested to be used. * Can be given also in CConvergedCallProvider::NewEmergencyCallL. * Plug-in will use given address and/or its own known one. @@ -49,42 +49,42 @@ * @return KErrNone if request was started succesfully. * @return KErrNotReady If call is not in idle state. * @return KErrNotSupported Emergency call is not supported. - * @since S60 3.2 - */ - virtual TInt Dial( const TDesC& aRecipient=KNullDesC) = 0; + * @since S60 3.2 + */ + virtual TInt Dial( const TDesC& aRecipient=KNullDesC) = 0; - /** + /** * Called by CCE instead of HangUp when Dial has been called and state change to * MCCPCallObserver::ECCPStateConnecting has not been received. * Cancels the last ongoing request. Used for Dial only. Not supported for other actions. - * If the request cannot be started then an error will be returned immediately as return value. - * In succesfull case KErrNone will be returned and the requested action has been started. + * If the request cannot be started then an error will be returned immediately as return value. + * In succesfull case KErrNone will be returned and the requested action has been started. * @param None. * @return KErrNone if request was started succesfully. * @since S60 3.2 * @pre MCCPEmergencyCall::Dial has been called and call state is MCCPCallObserver::ECCPIdle */ - virtual TInt Cancel() = 0; + virtual TInt Cancel() = 0; - /** - * Ends an ongoing call. + /** + * Ends an ongoing call. * @param none * @return KErrNone If request was started succesfully. * @return KErrAlreadyExists If call is already in idle state. - * @since S60 3.2 - */ - virtual TInt HangUp() = 0; + * @since S60 3.2 + */ + virtual TInt HangUp() = 0; - /** - * Answers to an incoming call. - * TODO: remove as unneeded? no answer supported ? + /** + * Answers to an incoming call. + * TODO: remove as unneeded? no answer supported ? * @param none * @return KErrNone If request was started succesfully. * @return KErrNotReady If call is not in ringing or queued state. - * @since S60 3.2 - */ - virtual TInt Answer() = 0; - }; + * @since S60 3.2 + */ + virtual TInt Answer() = 0; + }; #endif // MCCPEMERGENCYCALL_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpextensionobserver.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpextensionobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpextensionobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -48,8 +48,8 @@ * @return none */ virtual void HandleExtensionEvents( TUint32 aServiceId, - TInt aEvent, - TInt aStatus ) = 0; + TInt aEvent, + TInt aStatus ) = 0; }; #endif // MCCPEXTENSIONOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpextensionprovider.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpextensionprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpextensionprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -33,14 +33,14 @@ * @since S60 3.2 */ class MCCPExtensionProvider - { + { protected: /** * Protected destructor. Object cannot be deleted from plug-in client (CCE). * @since S60 3.2 */ virtual inline ~MCCPExtensionProvider() {}; - + public: /** * Request a custom command from the plug-in. Result returned via MCCPExtensionObserver. @@ -78,7 +78,7 @@ */ virtual TInt RemoveObserver( const MCCPExtensionObserver& aObserver ) = 0; - }; + }; #endif // MCCPEXTENSIONPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpforwardobserver.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpforwardobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpforwardobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -32,35 +32,35 @@ class MCCPForwardObserver { public: - enum TCCPForwardEvent - { - /** Call is being forwarded by the remote party. */ - ECCPRemoteForwarding, - /** Call is forwarded */ - ECCPForwarded, - /** Multiple call forward choices are available */ - ECCPMultipleChoices, - /** Call moved temporarily */ - ECCPMovedTemporarily, - /** Call moved permanently */ - ECCPMovedPermanentlyEvent - }; + enum TCCPForwardEvent + { + /** Call is being forwarded by the remote party. */ + ECCPRemoteForwarding, + /** Call is forwarded */ + ECCPForwarded, + /** Multiple call forward choices are available */ + ECCPMultipleChoices, + /** Call moved temporarily */ + ECCPMovedTemporarily, + /** Call moved permanently */ + ECCPMovedPermanentlyEvent + }; protected: - /** - * Protects the observer being deleted through the observer interface - * @since S60 3.2 - */ - virtual inline ~MCCPForwardObserver() {}; + /** + * Protects the observer being deleted through the observer interface + * @since S60 3.2 + */ + virtual inline ~MCCPForwardObserver() {}; public: - /** - * A Forward event has occurred concerning a specific call. - * @since S60 3.2 - * @param aEvent Occurred event. - * @return none - */ - virtual void ForwardEventOccurred( + /** + * A Forward event has occurred concerning a specific call. + * @since S60 3.2 + * @param aEvent Occurred event. + * @return none + */ + virtual void ForwardEventOccurred( const MCCPForwardObserver::TCCPForwardEvent aEvent ) = 0; }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpforwardprovider.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpforwardprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpforwardprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -34,44 +34,44 @@ * @since S60 3.2 */ class MCCPForwardProvider - { + { protected: /** * Protected destructor. Object cannot be deleted from plug-in client (CCE). * @since S60 3.2 */ virtual inline ~MCCPForwardProvider() {}; - + public: /** - * Returns pointer to array containing addresses to forward the call to. - * Index zero contains the first address. If there are no addresses available - * returns an empty array. - * @since Series 60 3.2 - * @param none - * @return Reference to array containing addresses + * Returns pointer to array containing addresses to forward the call to. + * Index zero contains the first address. If there are no addresses available + * returns an empty array. + * @since Series 60 3.2 + * @param none + * @return Reference to array containing addresses * @leave KErrNotReady call is not in forwarding state * @leave KErrNotSupported if call is not mobile originated * @leave system error code * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received - */ - virtual const CDesC8Array& GetForwardAddressChoicesL() = 0; + */ + virtual const CDesC8Array& GetForwardAddressChoicesL() = 0; - /** - * Forward call to address at given index. - * @since Series 60 3.2 - * @param aIndex Index of address where the call is to be forwarded. Address is - * found in the array received from GetForwardAddressChoicesL. Index starts from zero. - * @return none - * @leave KErrArgument Index is not in array + /** + * Forward call to address at given index. + * @since Series 60 3.2 + * @param aIndex Index of address where the call is to be forwarded. Address is + * found in the array received from GetForwardAddressChoicesL. Index starts from zero. + * @return none + * @leave KErrArgument Index is not in array * @leave KErrNotReady Call is not in forwarding state * @leave KErrNotSupported If call is not mobile originated * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received - */ - virtual void ForwardToAddressL( const TInt aIndex ) = 0; - + */ + virtual void ForwardToAddressL( const TInt aIndex ) = 0; + /** * Add an observer for forward related events. * Currently CCE will set only one observer. @@ -90,7 +90,7 @@ * @return KErrNotFound if observer was not found. */ virtual TInt RemoveObserver( const MCCPForwardObserver& aObserver ) = 0; - }; + }; #endif // MCCPFORWARDPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpobserver.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -80,7 +80,7 @@ /** * Incoming call invitation in attended transfer case. Occurs at transfer target end. - * For incoming transfer at transferor end see MCCPObserver::CallCreated. + * For incoming transfer at transferor end see MCCPObserver::CallCreated. * @since S60 3.2 * @param aCall IncomingCall transfer call. * @param aTempCall Pointer to the held call. @@ -89,11 +89,11 @@ MCCPCall& aTempCall ) = 0; /** - * Indicate an arrived transfer request. - * Called at the transfer request receiver end, after receiving a transfer request . - * For incoming transfer at transfer target end see MCCPObserver::IncomingCall with two call - objects as parameters. - * @since S60 3.2 + * Indicate an arrived transfer request. + * Called at the transfer request receiver end, after receiving a transfer request . + * For incoming transfer at transfer target end see MCCPObserver::IncomingCall with two call + objects as parameters. + * @since S60 3.2 * @param aNewTransferCall The call that has been created with the new transfer target. * @param aOriginator Pointer to originator of the transfer request. * @param aAttended Transfer requested was attented (ETrue) or un-attented(EFalse) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccpssobserver.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccpssobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccpssobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -42,43 +42,43 @@ enum TCCPSsBarringEvent { /** Incoming call is barred. (DoCoMo) */ - ECCPSsIncomingCallBarred, - /** Anonymous call barring. */ - ECCPSsAnonymousCallBarred, - /** Outgoing call barring */ - ECCPSsOutgoingCallBarred, - /** Barring active notification. */ - ECCPSsActiveBarrings - }; + ECCPSsIncomingCallBarred, + /** Anonymous call barring. */ + ECCPSsAnonymousCallBarred, + /** Outgoing call barring */ + ECCPSsOutgoingCallBarred, + /** Barring active notification. */ + ECCPSsActiveBarrings + }; /** CLI (Call Line Information) related event. */ enum TCCPSsCLIEvent { /** Temporary CLIR suppression was unsuccessful */ - ECCPSsTempClirSuppressUnsuccessful, + ECCPSsTempClirSuppressUnsuccessful, /** Temporary CLIR activation was unsuccessful*/ - ECCPSsTempClirActivationUnsuccessful + ECCPSsTempClirActivationUnsuccessful }; /** Call forward related events that are not call related to an existing call. */ enum TCCPSsCallForwardEvent { /** Incoming call is forwarded */ - ECCPSsIncCallIsForw, - /** Incoming call was forwarded because of user own settings. */ - ECCPSsIncCallForwToC, + ECCPSsIncCallIsForw, + /** Incoming call was forwarded because of user own settings. */ + ECCPSsIncCallForwToC, /** Outgoing call was forwarded because of user own settings. */ ECCPSsOutCallForwToC, /** Forward unconditional mode active */ - ECCPSsForwardUnconditionalModeActive, - /** Forward unconditional mode deactive */ - ECCPSsForwardUnconditionalModeNotActive, - /** Forward conditional mode active */ - ECCPSsForwardConditionallyModeActive, - /** Forward conditional mode deactive */ - ECCPSsForwardConditionallyModeNotActive, - /** Remote call waiting. TODO rename TCCPSsCallForwardEvent to TCCPSsCallEvent*/ - ESsCallWaiting + ECCPSsForwardUnconditionalModeActive, + /** Forward unconditional mode deactive */ + ECCPSsForwardUnconditionalModeNotActive, + /** Forward conditional mode active */ + ECCPSsForwardConditionallyModeActive, + /** Forward conditional mode deactive */ + ECCPSsForwardConditionallyModeNotActive, + /** Remote call waiting. TODO rename TCCPSsCallForwardEvent to TCCPSsCallEvent*/ + ESsCallWaiting }; @@ -97,26 +97,26 @@ * @return none * @since S60 v3.2 */ - virtual void BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent ) = 0; - + virtual void BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent ) = 0; + /** * Supplementary service call line identification event occurred. * @param aCallLineEvent Event that occurred. * @return none * @since S60 v3.2 */ - virtual void CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent ) = 0; + virtual void CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent ) = 0; /** * Supplementary service related call forward event occurred. * @param aCallForwardEvent Event that occurred. - * @param aRemoteAddress Remote address. + * @param aRemoteAddress Remote address. * @return none * @since S60 v3.2 */ - virtual void CallForwardEventOccurred( - const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent, - const TDesC& aRemoteAddress ) = 0; + virtual void CallForwardEventOccurred( + const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent, + const TDesC& aRemoteAddress ) = 0; /** * Supplementary service related active closed user group indications. @@ -124,16 +124,16 @@ * @return none * @since S60 v3.2 */ - virtual void CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent ) = 0; + virtual void CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent ) = 0; /** * Notifies active ALS line. CS plugin must notify this every time line changes - * and at startup. + * and at startup. * @param aLine Used ALS line. * @return none * @since S60 v3.2 */ - virtual void NotifyCurrentActiveALSLine( TInt aLine ) = 0; + virtual void NotifyCurrentActiveALSLine( TInt aLine ) = 0; }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/converged_call_provider_api/inc/mccptransferprovider.h --- a/phonesrv_plat/converged_call_provider_api/inc/mccptransferprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/converged_call_provider_api/inc/mccptransferprovider.h Wed Sep 01 12:15:03 2010 +0100 @@ -34,7 +34,7 @@ * @since S60 3.2 */ class MCCPTransferProvider - { + { protected: /** @@ -42,80 +42,80 @@ * @since S60 3.2 */ virtual inline ~MCCPTransferProvider() {}; - + public: /** - * Attended transfer to given call recipient. - * There needs to exist two calls. a call between A-B and A-C. A wants to transfer the call to B-C. - * Both calls A-B and A-C will be disconnected after transfer. - * In above case C will be the aTransferTargetCall call recipient. B is the recipient of the - * current call between A-B - called on A's call object transfer provider. - * The A-B call is on hold. + * Attended transfer to given call recipient. + * There needs to exist two calls. a call between A-B and A-C. A wants to transfer the call to B-C. + * Both calls A-B and A-C will be disconnected after transfer. + * In above case C will be the aTransferTargetCall call recipient. B is the recipient of the + * current call between A-B - called on A's call object transfer provider. + * The A-B call is on hold. * Actual request result indication comes via observer classes - * @param aTransferTargetCall Call containing the transfer target info. + * @param aTransferTargetCall Call containing the transfer target info. * @return KErrNone if request was started succesfully. * @return KErrNotReady if call is not in connected or on-hold state. * @return KErrArgument transfer traget address was illegal. * @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold - * @since S60 3.2 - */ - virtual TInt AttendedTransfer( MCCPCall& aTransferTargetCall ) = 0; + * @since S60 3.2 + */ + virtual TInt AttendedTransfer( MCCPCall& aTransferTargetCall ) = 0; /** * TODO is this used at all? remove? only the call param one is used? - * Attended transfer to given address. There does not need to be - * a current call between the given transfer target. + * Attended transfer to given address. There does not need to be + * a current call between the given transfer target. * Actual request result indication comes via observer class - * @param aTransferTarget Transfer target address + * @param aTransferTarget Transfer target address * @return KErrNone if request was started succesfully. * @return KErrNotReady if call is not in connected or on-hold state. * @return KErrArgument transfer address was illegal. * @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold - * @since S60 3.2 - */ - virtual TInt AttendedTransfer( const TDesC& aTransferTarget ) = 0; + * @since S60 3.2 + */ + virtual TInt AttendedTransfer( const TDesC& aTransferTarget ) = 0; - /** - * Unattended transfer. Call is requested to be transferred to given address. - * After MCCPTransferObserver::ECCPRemoteTransferring event current call will be - * disconnected and no transfer status is checked from the operation. + /** + * Unattended transfer. Call is requested to be transferred to given address. + * After MCCPTransferObserver::ECCPRemoteTransferring event current call will be + * disconnected and no transfer status is checked from the operation. * Actual request result indication comes via observer classes - * @since S60 3.2 - * @param aTransferTarget Address of the target + * @since S60 3.2 + * @param aTransferTarget Address of the target * @return KErrNone if request was started succesfully. * @return KErrNotReady if call is not in connected or on-hold state. * @return KErrArgument transfer address was illegal. * @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold - */ - virtual TInt UnattendedTransfer( const TDesC& aTransferTarget ) = 0; + */ + virtual TInt UnattendedTransfer( const TDesC& aTransferTarget ) = 0; - /** - * Accept incoming call transfer request from the call remote party. + /** + * Accept incoming call transfer request from the call remote party. * Actual request result indication comes via observer class - * @since Series 60 3.2 - * @param aAccept ETrue - accept transfer, EFalse do not accept transfer request. + * @since Series 60 3.2 + * @param aAccept ETrue - accept transfer, EFalse do not accept transfer request. * @return KErrNone if request was started succesfully. * @return KErrNotReady if call is not in connected or on-hold state. * @return KErrArgument transfer address was illegal. * @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold - * @pre MCCPObserver::CallCreated is called with the newly created call - */ - virtual TInt AcceptTransfer( const TBool aAccept ) = 0; - + * @pre MCCPObserver::CallCreated is called with the newly created call + */ + virtual TInt AcceptTransfer( const TBool aAccept ) = 0; + /** * When the other end of the call has requested call transfer to third party it is notified to * MCCPTransferObserver::TransferEventOccurred(MCCPTransferObserver::ECCPRemoteTransferring). * The new recipient of the call can be fetched via this method. - * @since Series 60 3.2 - * @param none - * @return new recipient for the call after transfer - * @return KNullDesC if no transfer target is available + * @since Series 60 3.2 + * @param none + * @return new recipient for the call after transfer + * @return KNullDesC if no transfer target is available * @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold - * @pre MCCPObserver::CallCreated is called with the newly created call - */ - virtual const TDesC& TransferTarget() const = 0; - + * @pre MCCPObserver::CallCreated is called with the newly created call + */ + virtual const TDesC& TransferTarget() const = 0; + /** * Add an observer for transfer related events. * Currently CCE will set only one observer. diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/dial_utils_api/group/bld.inf --- a/phonesrv_plat/dial_utils_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/dial_utils_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,4 +24,4 @@ PRJ_EXPORTS -../inc/dialutils.h MW_LAYER_PLATFORM_EXPORT_PATH(dialutils.h) +../inc/DialUtils.h MW_LAYER_PLATFORM_EXPORT_PATH(DialUtils.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/dialpad_api/dialpad_api.metaxml --- a/phonesrv_plat/dialpad_api/dialpad_api.metaxml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - dialpad_api - Dialpad widget used by phone and dialer applications. - c++ - telutils - - - - - - no - no - - diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/dialpad_api/group/bld.inf --- a/phonesrv_plat/dialpad_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +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: Dialpad API (phone number editor + virtual keypad) -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../inc/dialpad.h MW_LAYER_PLATFORM_EXPORT_PATH(dialpad.h) -../inc/dialpadkeyhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(dialpadkeyhandler.h) -../inc/dialpadvtkeyhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(dialpadvtkeyhandler.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/dialpad_api/inc/dialpad.h --- a/phonesrv_plat/dialpad_api/inc/dialpad.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +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: Dialpad popup -* -*/ - -#ifndef DIALPAD_H -#define DIALPAD_H - -#include -#include -#include - -class HbLineEdit; -class HbFrameDrawer; -class HbMainWindow; -class DialpadInputField; -class DialpadKeypad; -class DialpadMultitapHandler; -class DialpadBackground; - -#ifdef BUILD_DIALPAD -#define DIALPAD_EXPORT Q_DECL_EXPORT -#else -#define DIALPAD_EXPORT Q_DECL_IMPORT -#endif - -class DIALPAD_EXPORT Dialpad : public HbWidget -{ - Q_OBJECT - -public: - explicit Dialpad(); // deprecated - explicit Dialpad(const HbMainWindow& mainWindow); - virtual ~Dialpad(); - - HbLineEdit& editor() const; - - bool isOpen() const; - - bool isCallButtonEnabled() const; - -public slots: - void openDialpad(); - - void closeDialpad(); - - void setCallButtonEnabled(bool enabled); - - void setTapOutsideDismiss(bool dismiss); - -protected: - void paint(QPainter* painter, - const QStyleOptionGraphicsItem* option, - QWidget* widget); - - void changeEvent(QEvent *event); - - void showEvent(QShowEvent *event); - - void hideEvent(QHideEvent *event); - - void closeEvent(QCloseEvent * event); - - void gestureEvent(QGestureEvent *event); - -protected slots: - void closeAnimValueChanged(qreal value); - void closeAnimFinished(); - void openAnimValueChanged(qreal value); - void openAnimFinished(); - void orientationChangeStarted(); - void orientationChangeFinished(Qt::Orientation current); - -private: - void startCloseAnimation(); - void layoutBackgroundItem(); - void updateLayout(Qt::Orientation orientation); - void initialize(); - -signals: - void aboutToOpen(); - void aboutToClose(); - -private: - const HbMainWindow& mMainWindow; - HbFrameDrawer *mBackgroundDrawer; - HbFrameDrawer *mIconDrawer; - DialpadBackground* mBackgroundItem; - DialpadInputField* mInputField; - DialpadKeypad* mKeypad; - DialpadMultitapHandler* mMultitap; - QTimeLine mOpenTimeLine; - QTimeLine mCloseTimeLine; - bool mAnimationOngoing; - QPointF mPosition; - int mCloseHandleHeight; - int mCloseHandleWidth; - int mTitleBarHeight; - int mOrientation; - bool mIsOpen; - - friend class DialpadBackground; -}; - -#endif // DIALPAD_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/dialpad_api/inc/dialpadkeyhandler.h --- a/phonesrv_plat/dialpad_api/inc/dialpadkeyhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/*! -* 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: Dialpad key handler. -* -*/ - -#ifndef DIALPADKEYHANDLER_H -#define DIALPADKEYHANDLER_H - -#include - -class Dialpad; -class DialpadVoiceMailboxEventFilter; -class DialpadVideoMailboxEventFilter; -class DialpadBluetoothEventFilter; -class DialpadKeySequenceEventFilter; -class DialpadEmergencyCallEventFilter; -class DialpadHashEventFilter; -class HbMainWindow; - -#ifdef BUILD_DIALPADKEYHANDLER -#define DIALPADKEYHANDLER_EXPORT Q_DECL_EXPORT -#else -#define DIALPADKEYHANDLER_EXPORT Q_DECL_IMPORT -#endif - -/*! - DialpadKeyHandler - Class provides key handling for dialpad component. - - @code - Dialpad *dialpad = new Dialpad(); - DialpadKeyHandler *keyhandler = new DialpadKeyHandler(dialpad, this); - @endcode -*/ -class DIALPADKEYHANDLER_EXPORT DialpadKeyHandler : public QObject -{ - Q_OBJECT - -public: - /*! Declares possible key event filters which can be used with the - * dialpad. */ - enum DialpadKeyEventFilter - { - /*! Enables calling to voice mailbox with a long '1' key press. */ - VoiceMailbox = 0x0001, - /*! Enables calling to video mailbox with a long '2' key press. */ - VideoMailBox = 0x0002, - /*! Enables switching bluetooth on/off with a long '*' key press. */ - Bluetooth = 0x0004, - /*! Enables handling of key sequences like *#06# for showing IMEI. */ - KeySequence = 0x0008, - /*! Forced handling for emergency call. */ - EmergencyCall = 0x0010, - /*! Enables and disables silent mode with a long '#' key press. */ - Hash = 0x23 - }; - Q_DECLARE_FLAGS(DialpadKeyEventFilters, DialpadKeyEventFilter) - -public: - /*! \deprecated DialpadKeyHandler(Dialpad*, HbMainWindow&, QObject*) is - * deprecated. - * Please use - * DialpadKeyHandler( - * Dialpad*, - * QFlags, - * QObject*) - * instead. */ - explicit DialpadKeyHandler( - Dialpad *dialPad, - HbMainWindow& mainWindow, - QObject *parent = 0); - - explicit DialpadKeyHandler( - Dialpad *dialPad, - DialpadKeyHandler::DialpadKeyEventFilters filters, - QObject *parent = 0); - virtual ~DialpadKeyHandler(); - -private: - HbMainWindow& mMainWindow; - QScopedPointer mVmbxFilter; - QScopedPointer mVideoVmbxFilter; - QScopedPointer mBtFilter; - QScopedPointer mKeySequenceFilter; - QScopedPointer mEmergencyCallFilter; - QScopedPointer mHashFilter; -}; - -#endif // DIALPADKEYHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/dialpad_api/inc/dialpadvtkeyhandler.h --- a/phonesrv_plat/dialpad_api/inc/dialpadvtkeyhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/*! -* 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: Dialpad key handler. -* -*/ - -#ifndef DIALPADVTKEYHANDLER_H -#define DIALPADVTKEYHANDLER_H - -#include - -class Dialpad; -class DialpadKeySequenceEventFilter; -class DialpadEmergencyCallEventFilter; -class HbMainWindow; - -#ifdef BUILD_DIALPADKEYHANDLER -#define DIALPADKEYHANDLER_EXPORT Q_DECL_EXPORT -#else -#define DIALPADKEYHANDLER_EXPORT Q_DECL_IMPORT -#endif -/*! - DialpadVtKeyHandler - Class provides key handling for dialpad component. - - @code - Dialpad *dialpad = new Dialpad(); - DialpadVtKeyHandler *keyhandler = new DialpadVtKeyHandler(dialpad, this); - @endcode - -*/ -class DIALPADKEYHANDLER_EXPORT DialpadVtKeyHandler : public QObject -{ - Q_OBJECT - -public: - explicit DialpadVtKeyHandler(Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent = 0); - virtual ~DialpadVtKeyHandler(); - -private: - HbMainWindow& mMainWindow; - DialpadEmergencyCallEventFilter *mEmergencyCallFilter; - DialpadKeySequenceEventFilter *mKeySequenceFilter; -}; - -#endif // DIALPADVTKEYHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/group/bld.inf --- a/phonesrv_plat/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -55,6 +55,4 @@ #include "../call_information_api/group/bld.inf" #include "../call_remote_party_information_api/group/bld.inf" #include "../telephony_mediator_api/group/bld.inf" -#include "../dialpad_api/group/bld.inf" -#include "../phone_settings_ui_notes_api/group/bld.inf" // End of file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/network_handling_engine_api/group/bld.inf --- a/phonesrv_plat/network_handling_engine_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/network_handling_engine_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,6 +24,6 @@ PRJ_EXPORTS -../inc/networkhandlingproxy.h MW_LAYER_PLATFORM_EXPORT_PATH(networkhandlingproxy.h) -../inc/cnwsession.h MW_LAYER_PLATFORM_EXPORT_PATH(cnwsession.h) -../inc/nwhandlingengine.h MW_LAYER_PLATFORM_EXPORT_PATH(nwhandlingengine.h) +../inc/NetworkHandlingProxy.h MW_LAYER_PLATFORM_EXPORT_PATH(NetworkHandlingProxy.h) +../inc/CNWSession.h MW_LAYER_PLATFORM_EXPORT_PATH(CNWSession.h) +../inc/NWHandlingEngine.h MW_LAYER_PLATFORM_EXPORT_PATH(NWHandlingEngine.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/network_handling_engine_api/inc/CNWSession.h --- a/phonesrv_plat/network_handling_engine_api/inc/CNWSession.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/network_handling_engine_api/inc/CNWSession.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CNWSESSION_H // INCLUDES -#include "nwhandlingengine.h" +#include "NWHandlingEngine.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/network_handling_engine_api/inc/NWHandlingEngine.h --- a/phonesrv_plat/network_handling_engine_api/inc/NWHandlingEngine.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/network_handling_engine_api/inc/NWHandlingEngine.h Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2004 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" @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include #include // for RPacketService::TDynamicCapsFlags @@ -271,7 +271,7 @@ // Fetching Programmable Operator Name ENWGetProgrammableOperatorName, // Notifying network registration status change - ENWNotifyNetworkRegistrationStatusChange + ENWNotifyNetworkRegistrationStatusChange, }; /** diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/network_handling_engine_api/inc/NetworkHandlingProxy.h --- a/phonesrv_plat/network_handling_engine_api/inc/NetworkHandlingProxy.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/network_handling_engine_api/inc/NetworkHandlingProxy.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define NETWORKHANDLINGPROXY_H // INCLUDES -#include "nwhandlingengine.h" +#include "NWHandlingEngine.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_api/group/bld.inf --- a/phonesrv_plat/phone_client_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,5 +24,5 @@ PRJ_EXPORTS -../inc/phclttypes.h MW_LAYER_PLATFORM_EXPORT_PATH(phclttypes.h) -../inc/rphcltserver.h MW_LAYER_PLATFORM_EXPORT_PATH(rphcltserver.h) +../inc/PhCltTypes.h MW_LAYER_PLATFORM_EXPORT_PATH(PhCltTypes.h) +../inc/RPhCltServer.h MW_LAYER_PLATFORM_EXPORT_PATH(RPhCltServer.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_api/inc/RPhCltServer.h --- a/phonesrv_plat/phone_client_api/inc/RPhCltServer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_api/inc/RPhCltServer.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // CONSTANTS // A version must be specified when creating a session with the server diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_command_handler_api/group/bld.inf --- a/phonesrv_plat/phone_client_command_handler_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_command_handler_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,4 +24,4 @@ PRJ_EXPORTS -../inc/cphcltcommandhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltcommandhandler.h) +../inc/CPhCltCommandHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltCommandHandler.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_command_handler_api/inc/CPhCltCommandHandler.h --- a/phonesrv_plat/phone_client_command_handler_api/inc/CPhCltCommandHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_command_handler_api/inc/CPhCltCommandHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS @@ -131,8 +131,8 @@ TPhCltComHandCommand iCommandHandlerCommand; // Dial command parameter. - TPhCltTelephoneNumber iTelNumber; - + TPhCltTelephoneNumber iTelNumber; + // Chld command parameter. TPhCltChldCommand iChldCommand; // Chld command parameter. @@ -182,7 +182,7 @@ * KErrNone if successful, Symbian error code otherwise. * @param aTelephoneNumber The dial information. */ - IMPORT_C virtual void Atd( + IMPORT_C virtual void Atd( TRequestStatus& aStatus, const TPhCltTelephoneNumber& aTelephoneNumber ) = 0; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_emergency_call_api/group/bld.inf --- a/phonesrv_plat/phone_client_emergency_call_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_emergency_call_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,5 +24,5 @@ PRJ_EXPORTS -../inc/mphcltemergencycallobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mphcltemergencycallobserver.h) -../inc/cphcltemergencycall.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltemergencycall.h) +../inc/MPhCltEmergencyCallObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(MPhCltEmergencyCallObserver.h) +../inc/CPhCltEmergencyCall.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltEmergencyCall.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_emergency_call_api/tsrc/src/it_emergencycalltests.cpp --- a/phonesrv_plat/phone_client_emergency_call_api/tsrc/src/it_emergencycalltests.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_emergency_call_api/tsrc/src/it_emergencycalltests.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_emergency_call_api/tsrc/src/it_emergencycalltests.h --- a/phonesrv_plat/phone_client_emergency_call_api/tsrc/src/it_emergencycalltests.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_emergency_call_api/tsrc/src/it_emergencycalltests.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #include #include -#include +#include // FORWARD DECLARATIONS class CPhCltEmergencyCall; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_image_handler_api/group/bld.inf --- a/phonesrv_plat/phone_client_image_handler_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_image_handler_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,6 +24,6 @@ PRJ_EXPORTS -../inc/cphcltimagehandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltimagehandler.h) -../inc/cphcltbaseimageparams.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltbaseimageparams.h) -../inc/cphcltimageparams.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltimageparams.h) +../inc/CPhCltImageHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltImageHandler.h) +../inc/CPhCltBaseImageParams.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltBaseImageParams.h) +../inc/CPhCltImageParams.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltImageParams.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_image_handler_api/inc/CPhCltBaseImageParams.h --- a/phonesrv_plat/phone_client_image_handler_api/inc/CPhCltBaseImageParams.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_image_handler_api/inc/CPhCltBaseImageParams.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #ifndef CPHCLTBASEPARAMS_H #define CPHCLTBASEPARAMS_H -#include +#include #include #include diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_image_handler_api/inc/CPhCltImageHandler.h --- a/phonesrv_plat/phone_client_image_handler_api/inc/CPhCltImageHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_image_handler_api/inc/CPhCltImageHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHCLTIMAGEHANDLER_H #include -#include "cphcltimageparams.h" +#include "CPhCltImageParams.h" // FORWARD DECLARATIONS class RPhCltServer; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_messenger_api/group/bld.inf --- a/phonesrv_plat/phone_client_messenger_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_messenger_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,4 +24,4 @@ PRJ_EXPORTS -../inc/cphcltmessenger.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltmessenger.h) +../inc/CPhCltMessenger.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltMessenger.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_notify_api/group/bld.inf --- a/phonesrv_plat/phone_client_notify_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_notify_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ PRJ_EXPORTS -../inc/cphcltcallnotify.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltcallnotify.h) +../inc/CPhCltCallNotify.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltCallNotify.h) ../inc/cphcltdialdata.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltdialdata.h) ../inc/mphcltdialrequestobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mphcltdialrequestobserver.h) ../inc/mphcltdialemergencyrequestobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mphcltdialemergencyrequestobserver.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_notify_api/inc/CPhCltCallNotify.h --- a/phonesrv_plat/phone_client_notify_api/inc/CPhCltCallNotify.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_notify_api/inc/CPhCltCallNotify.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS @@ -78,7 +78,7 @@ * @param aObserver dial request observer */ IMPORT_C void NotifyDialRequest( - MPhCltDialRequestObserver* aObserver ); + MPhCltDialRequestObserver* aObserver ); /** * Cancel pending call attempt notification. @@ -104,14 +104,14 @@ /** * Cancel pending emergency call attempt notification. */ - IMPORT_C void CancelNotifyEmergencyCall() const; + IMPORT_C void CancelNotifyEmergencyCall() const; /** * Respond to client request to make emergency call * * @param aResultCode Result of the response. */ - IMPORT_C TInt RespondEmergencyToClient( const TInt aResultCode ); + IMPORT_C TInt RespondEmergencyToClient( const TInt aResultCode ); /** * Notifies when a Command handler request arrives. diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_notify_api/inc/cphcltdialdata.h --- a/phonesrv_plat/phone_client_notify_api/inc/cphcltdialdata.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_notify_api/inc/cphcltdialdata.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ #include #include #include -#include +#include // Constant used as window group id to indicate that we wish to go to idle. @@ -34,7 +34,7 @@ const TInt KPhCltRedialDefault = -1; // Default redial. const TInt KPhCltRedialOff = -2; // Redial is off. const TInt KPhCltRedialWithDefaultTime = -3; // Redial on, with default time. -const TInt KPhCltRedial = 0; // Forced redial. +const TInt KPhCltRedial = 0; // Forced redial. // CONSTANTS @@ -143,7 +143,7 @@ * End other calls param. * @since Series 60 3.2 * @return Returns ETrue if other calls will be terminated. - * EFalse if calls are not terminated. + * EFalse if calls are not terminated. */ virtual TBool EndOtherCalls() const = 0; @@ -227,9 +227,9 @@ */ virtual const TDesC& UUI() const = 0; - public: // Access - Setters - - /** + public: // Access - Setters + + /** * Set whether the name entered in SetName should be matched * against the personal directory. * @since Series 60 3.2 @@ -239,8 +239,8 @@ * @param aAllowMatch Whether to allow matches. */ virtual void SetAllowMatch( TBool aAllowMatch ) = 0; - - /** + + /** * Set the bearer capability. * @since Series 60 3.2 * @param aBearer The bearer capabilities as defined in GSM 04.08. @@ -379,9 +379,9 @@ // Constructors - protected: - - /** + protected: + + /** * C++ default constructor. * @since Series 60 3.2 */ @@ -419,7 +419,7 @@ //The contact Link storage. - HBufC8* iContactLink; + HBufC8* iContactLink; // The calling party subaddress. TPhCltSubAddress iSubAddress; @@ -447,10 +447,10 @@ //Intialization call - TBool iInitCall; + TBool iInitCall; // Flags value - TUint iFlags; + TUint iFlags; // service id TUint32 iServiceId; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_server_information_api/group/bld.inf --- a/phonesrv_plat/phone_client_server_information_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_server_information_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,5 +24,5 @@ PRJ_EXPORTS -../inc/phoneclientserverdomainpstypes.h MW_LAYER_PLATFORM_EXPORT_PATH(phoneclientserverdomainpstypes.h) -../inc/phoneclientserverdomainpskeys.h MW_LAYER_PLATFORM_EXPORT_PATH(phoneclientserverdomainpskeys.h) +../inc/PhoneClientServerDomainPStypes.h MW_LAYER_PLATFORM_EXPORT_PATH(PhoneClientServerDomainPStypes.h) +../inc/PhoneClientServerDomainPSkeys.h MW_LAYER_PLATFORM_EXPORT_PATH(PhoneClientServerDomainPSkeys.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_server_information_api/inc/PhoneClientServerDomainPSkeys.h --- a/phonesrv_plat/phone_client_server_information_api/inc/PhoneClientServerDomainPSkeys.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_server_information_api/inc/PhoneClientServerDomainPSkeys.h Wed Sep 01 12:15:03 2010 +0100 @@ -30,7 +30,7 @@ /** * Indication about operator logo change. -* @see TTelOTALogoUpdate in phoneclientserverdomainpstypes.h +* @see TTelOTALogoUpdate in PhoneClientServerDomainPStypes.h * @type RProperty::EByteArray */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_api/group/bld.inf --- a/phonesrv_plat/phone_client_ussd_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_ussd_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,4 +24,4 @@ PRJ_EXPORTS -../inc/cphcltussd.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltussd.h) +../inc/CPhCltUssd.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltUssd.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_api/tsrc/mt_ussd.cpp --- a/phonesrv_plat/phone_client_ussd_api/tsrc/mt_ussd.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* 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: Implementation of the Mt_Ussd class -* -*/ - -#include -#include "mt_ussd.h" - -/*------------------------------------------------------------------------------ -This module testing project links to phoneclient.dll. -------------------------------------------------------------------------------*/ - -// ----------------------------------------------------------------------------- -// Mt_Ussd::Mt_Ussd -// Default constructor, remember to null new members here. -// ----------------------------------------------------------------------------- -// -Mt_Ussd::Mt_Ussd():mUssd(NULL) -{ - qDebug("Mt_Ussd in-out"); -} - -// ----------------------------------------------------------------------------- -// Mt_Ussd::~Mt_Ussd -// ----------------------------------------------------------------------------- -Mt_Ussd::~Mt_Ussd() -{ - qDebug("~Mt_Ussd in-out"); -} - - -// ----------------------------------------------------------------------------- -// Mt_Ussd::initTestCase -// QTestLib initialization method, called for each test case. -// ----------------------------------------------------------------------------- -void Mt_Ussd::initTestCase() -{ - qDebug("initTestCase in"); - mUssd = CPhCltUssd::NewL( EFalse ); - qDebug("initTestCase out"); -} - - -// ----------------------------------------------------------------------------- -// Mt_Ussd::cleanupTestCase -// QTestLib cleanup method, called for each test case. -// ----------------------------------------------------------------------------- -void Mt_Ussd::cleanupTestCase() -{ - qDebug("cleanupTestCase in"); - delete mUssd; - qDebug("cleanupTestCase out"); -} - -// ----------------------------------------------------------------------------- -// Mt_Ussd::testSendUssd -// ----------------------------------------------------------------------------- -void Mt_Ussd::testSendUssdUnicode() -{ - qDebug("testSendUssdUnicode in"); - - mUssd->SetDCS( KPhCltDcsUnknown ); - - _LIT( KUnicodeUSSD, "Ussd msg"); - TInt ret = mUssd->SendUssd( KUnicodeUSSD ); - qDebug("ussd str=%S, ret=%d", KUnicodeUSSD, ret); - - QVERIFY2(KErrNone == ret , "testSendUssdUnicode failed "); - qDebug("testSendUssdUnicode out"); -} - -// ----------------------------------------------------------------------------- -// Mt_Ussd::testSendUssd -// ----------------------------------------------------------------------------- -void Mt_Ussd::testSendUssd() -{ - qDebug("testSendUssd in"); - - mUssd->SetDCS( KPhCltDcsUnknown ); - _LIT8( KMsg, "*#123#" ); - TInt ret = mUssd->SendUssd( KMsg ); - qDebug("ussd str=%S, ret=%d", KMsg, ret); - - QVERIFY2(KErrNone == ret , "testSendUssd failed "); - qDebug("testSendUssd out"); -} - -// ----------------------------------------------------------------------------- -// Mt_Ussd::testSendUssd -// ----------------------------------------------------------------------------- -void Mt_Ussd::testSendUssdWithDCS() -{ - qDebug("testSendUssdWithDCS in"); - - _LIT8( KMsg, "*#123#" ); - TInt ret = mUssd->SendUssd( KMsg, KPhCltDcsUnknown ); - qDebug("ussd str=%S, ret=%d", KMsg, ret); - - QVERIFY2(KErrNone == ret , "testSendUssdWithDCS failed "); - qDebug("testSendUssdWithDCS out"); -} - -void Mt_Ussd::testSendUssdBtn() -{ - qDebug("testSendUssdBtn in"); - - _LIT8( KMsg, "*100#" ); - TInt ret = mUssd->SendUssd( KMsg, KPhCltDcsUnknown ); - qDebug("ussd str=%S, ret=%d", KMsg, ret); - - QVERIFY2(KErrNone == ret , "testSendUssdBtn failed "); - qDebug("testSendUssdBtn out"); -} - -void Mt_Ussd::testSendUssdCmcc() -{ - qDebug("testSendUssdCmcc in"); - - _LIT8( KMsg, "*188#" ); - TInt ret = mUssd->SendUssd( KMsg, KPhCltDcsUnknown ); - qDebug("ussd str=%S, ret=%d", KMsg, ret); - - QVERIFY2(KErrNone == ret , "testSendUssdCmcc failed "); - qDebug("testSendUssdCmcc out"); -} - -// ----------------------------------------------------------------------------- -// main() -// Main method implemented for directing test output to a file. -// ----------------------------------------------------------------------------- -int main(int argc, char *argv[]) - { - qDebug("main() in"); - QApplication app(argc, argv); - - qDebug("Start testing..."); - Mt_Ussd tc; - char *pass[3]; - pass[0] = argv[0]; - pass[1] = "-o"; - pass[2] = "c:\\logs\\ussd\\mt_ussdclient.txt"; - const int result = QTest::qExec(&tc, 3, pass); - qDebug("End testing..."); - - qDebug("main() out, result=%d", result); - return result; - } - -//End file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_api/tsrc/mt_ussd.h --- a/phonesrv_plat/phone_client_ussd_api/tsrc/mt_ussd.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +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: Implementation of the Mt_Ussd class -* -*/ - - -#ifndef _MT_USSD_H -#define _MT_USSD_H - -#include -#include -#include -#include -#include -#include - - -// Class forwards -class CPhCltUssd; - -/** - * Mt_Ussd module test class. - * - * Tests Mt_Ussd interface. - * See cpp file for more information. - * - * @lib phoneclient.lib - * @since S60 - */ -class Mt_Ussd : public QObject -{ - Q_OBJECT - -public: - Mt_Ussd(); - - virtual ~Mt_Ussd(); - -private slots: - - /** - * Called before the first testfunction is executed. - */ - void initTestCase(); - - /** - * Called after the last testfunction has been executed. - */ - void cleanupTestCase(); - - /** - * Test SendUssd with Unicode string - */ - void testSendUssdUnicode(); - - /** - * Test sendUssd - */ - void testSendUssd(); - - /** - * Test sendUssd with given DCS - */ - void testSendUssdWithDCS(); - - /** - * Test sendUssd by BTN string - */ - void testSendUssdBtn(); - - /** - * Test sendUssd by CMCC string - */ - void testSendUssdCmcc(); - - -private: //data - - CPhCltUssd* mUssd; -}; - -#endif // _MT_VMBXENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_api/tsrc/mt_ussd.pro --- a/phonesrv_plat/phone_client_ussd_api/tsrc/mt_ussd.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . -CONFIG += hb -CONFIG += qtestlib - -symbian: { - TARGET.CAPABILITY = CAP_GENERAL_DLL -} - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \ - /epoc32/include/mw/QtTest \ - ../inc - - LIBS += -lphoneclient.dll -} - -# Input -HEADERS += mt_ussd.h -SOURCES += mt_ussd.cpp diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_internal_api/group/bld.inf --- a/phonesrv_plat/phone_client_ussd_internal_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_ussd_internal_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,5 +24,5 @@ PRJ_EXPORTS -../inc/cphcltussdsatclient.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltussdsatclient.h) -../inc/cphcltussdint.h MW_LAYER_PLATFORM_EXPORT_PATH(cphcltussdint.h) +../inc/CPhCltUssdSatClient.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltUssdSatClient.h) +../inc/CPhCltUssdInt.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhCltUssdInt.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_internal_api/inc/CPhCltUssdInt.h --- a/phonesrv_plat/phone_client_ussd_internal_api/inc/CPhCltUssdInt.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_ussd_internal_api/inc/CPhCltUssdInt.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_internal_api/tsrc/mt_ussdinternal.pro --- a/phonesrv_plat/phone_client_ussd_internal_api/tsrc/mt_ussdinternal.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -# -# 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: -# - -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . -CONFIG += hb -CONFIG += qtestlib - -symbian: { - TARGET.CAPABILITY = CAP_GENERAL_DLL -} - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \ - /epoc32/include/mw/QtTest \ - ../inc - - LIBS += -lphoneclient.dll -} - -# Input -HEADERS += mt_ussdsat.h -SOURCES += mt_ussdsat.cpp diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_internal_api/tsrc/mt_ussdsat.cpp --- a/phonesrv_plat/phone_client_ussd_internal_api/tsrc/mt_ussdsat.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* 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: Implementation of the Mt_UssdSat class -* -*/ - -#include -#include -#include "mt_ussdsat.h" - -/*------------------------------------------------------------------------------ -This module testing project links to phoneclient.dll. -------------------------------------------------------------------------------*/ - -// ----------------------------------------------------------------------------- -// Mt_UssdSat::Mt_UssdSat -// Default constructor, remember to null new members here. -// ----------------------------------------------------------------------------- -// -Mt_UssdSat::Mt_UssdSat():mUssdSat(NULL) -{ - qDebug("Mt_UssdSat in-out"); -} - -// ----------------------------------------------------------------------------- -// Mt_UssdSat::~Mt_UssdSat -// ----------------------------------------------------------------------------- -Mt_UssdSat::~Mt_UssdSat() -{ - qDebug("~Mt_UssdSat in-out"); -} - - -// ----------------------------------------------------------------------------- -// Mt_UssdSat::initTestCase -// QTestLib initialization method, called for each test case. -// ----------------------------------------------------------------------------- -void Mt_UssdSat::initTestCase() -{ - qDebug("initTestCase in"); - mUssdSat = CPhCltUssdSatClient::NewL( EFalse ); - qDebug("initTestCase out"); -} - - -// ----------------------------------------------------------------------------- -// Mt_UssdSat::cleanupTestCase -// QTestLib cleanup method, called for each test case. -// ----------------------------------------------------------------------------- -void Mt_UssdSat::cleanupTestCase() -{ - qDebug("cleanupTestCase in"); - delete mUssdSat; - qDebug("cleanupTestCase out"); -} - -// ----------------------------------------------------------------------------- -// Mt_UssdSat::testSendSatMessage -// ----------------------------------------------------------------------------- -void Mt_UssdSat::testSendSatMessage() -{ - qDebug("testSendSatMessage in"); - - _LIT( KUssdSat, "*100#"); // valid for BTN - - TBuf receiveMessage; - TBool sendCompletedFirst( EFalse ); - TUint8 receiveDcs = 0; - - TInt ret = mUssdSat->SendSatMessage( - KUssdSat, - CPhCltUssdSatClient::EPhCltDcsUnknown, - receiveMessage, - sendCompletedFirst, - receiveDcs ); - - qDebug("receive error=%d", ret); - qDebug("receive receive msg=%s", &receiveMessage); - qDebug("receive isCompleteFirst=%d", &sendCompletedFirst); - qDebug("receive receive Dcs=%d", &receiveDcs); - - QVERIFY2(KErrNone == ret , "testSendSatMessage failed "); - qDebug("testSendSatMessage out"); -} - -// ----------------------------------------------------------------------------- -// Mt_UssdSat::testSendSatMessageCancel -// ----------------------------------------------------------------------------- -void Mt_UssdSat::testSendSatMessageCancel() -{ - qDebug("testSendSatMessageCancel in"); - - mUssdSat->SendSatMessageCancel(); - - qDebug("testSendSatMessageCancel out"); -} - -// ----------------------------------------------------------------------------- -// main() -// Main method implemented for directing test output to a file. -// ----------------------------------------------------------------------------- -int main(int argc, char *argv[]) - { - qDebug("main() in"); - QApplication app(argc, argv); - - qDebug("Start testing..."); - Mt_UssdSat tc; - char *pass[3]; - pass[0] = argv[0]; - pass[1] = "-o"; - pass[2] = "c:\\logs\\mt_ussdsat.txt"; - const int result = QTest::qExec(&tc, 3, pass); - qDebug("End testing..."); - - qDebug("main() out, result=%d", result); - return result; - } - -//End file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_ussd_internal_api/tsrc/mt_ussdsat.h --- a/phonesrv_plat/phone_client_ussd_internal_api/tsrc/mt_ussdsat.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* 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: Implementation of the Mt_UssdSat class -* -*/ - - -#ifndef _MT_USSDSAT_H -#define _MT_USSDSAT_H - -#include -#include -#include -#include -#include -#include - - -// Class forwards -class CPhCltUssdSatClient; - -/** - * Mt_UssdSat module test class. - * - * Tests Mt_UssdSat interface. - * See cpp file for more information. - * - * @lib phoneclient.lib - * @since S60 - */ -class Mt_UssdSat : public QObject -{ - Q_OBJECT - -public: - Mt_UssdSat(); - - virtual ~Mt_UssdSat(); - -private slots: - - /** - * Called before the first testfunction is executed. - */ - void initTestCase(); - - /** - * Called after the last testfunction has been executed. - */ - void cleanupTestCase(); - - /** - * Test send sat message - */ - void testSendSatMessage(); - - /** - * Test cancel send sat message - */ - void testSendSatMessageCancel(); - -private: //data - - CPhCltUssdSatClient* mUssdSat; -}; - -#endif // _MT_USSDSAT_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_client_utility_api/group/bld.inf --- a/phonesrv_plat/phone_client_utility_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_client_utility_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,4 +24,4 @@ PRJ_EXPORTS -../inc/phcltutils.h MW_LAYER_PLATFORM_EXPORT_PATH(phcltutils.h) +../inc/PhCltUtils.h MW_LAYER_PLATFORM_EXPORT_PATH(PhCltUtils.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/group/bld.inf --- a/phonesrv_plat/phone_settings_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: File that exports the files belonging to -: phone settings api +: Phone Settings API * */ @@ -24,27 +24,20 @@ PRJ_EXPORTS -../inc/psetconstants.h MW_LAYER_PLATFORM_EXPORT_PATH(psetconstants.h) -../inc/psetcallwaiting.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcallwaiting.h) -../inc/mpsetnetworkmode.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetnetworkmode.h) -../inc/mpsetcallwaiting.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetcallwaiting.h) -../inc/mpsetcli.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetcli.h) -../inc/psetcsp.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcsp.h) -../inc/psetnetwork.h MW_LAYER_PLATFORM_EXPORT_PATH(psetnetwork.h) -../inc/mpsetcalldiverting.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetcalldiverting.h) -../inc/psetrefreshhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(psetrefreshhandler.h) +../inc/PSetConstants.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetConstants.h) +../inc/PsetCallWaiting.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetCallWaiting.h) +../inc/MPsetNetworkMode.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetNetworkMode.h) +../inc/MPsetCallWaiting.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetCallWaiting.h) +../inc/MPsetCli.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetCli.h) +../inc/PsetCSP.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetCSP.h) +../inc/PsetNetwork.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetNetwork.h) +../inc/MPsetCallDiverting.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetCallDiverting.h) +../inc/PSetRefreshHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(PSetRefreshHandler.h) ../inc/nwdefs.h MW_LAYER_PLATFORM_EXPORT_PATH(nwdefs.h) -../inc/psetcontainer.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcontainer.h) -../inc/psetcalldiverting.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcalldiverting.h) -../inc/mpsetnetworkselect.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetnetworkselect.h) -../inc/psetcallbarring.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcallbarring.h) -../inc/psetsaobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(psetsaobserver.h) -../inc/mpsetcallbarring.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetcallbarring.h) -../inc/psetcli.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcli.h) -../inc/psetcallbarringwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcallbarringwrapper.h) -../inc/psetcalldivertingwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcalldivertingwrapper.h) -../inc/psetcallwaitingwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcallwaitingwrapper.h) -../inc/psetcliwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcliwrapper.h) -../inc/psetnetworkwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetnetworkwrapper.h) -../inc/psetwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetwrapper.h) -../inc/psetwrappertypes.h MW_LAYER_PLATFORM_EXPORT_PATH(psetwrappertypes.h) +../inc/PsetContainer.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetContainer.h) +../inc/PsetCallDiverting.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetCallDiverting.h) +../inc/MPsetNetworkSelect.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetNetworkSelect.h) +../inc/PsetCallBarring.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetCallBarring.h) +../inc/PsetSAObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetSAObserver.h) +../inc/MPsetCallBarring.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetCallBarring.h) +../inc/PsetCli.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetCli.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/MPsetNetworkSelect.h --- a/phonesrv_plat/phone_settings_api/inc/MPsetNetworkSelect.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/MPsetNetworkSelect.h Wed Sep 01 12:15:03 2010 +0100 @@ -80,8 +80,7 @@ enum TNetworkAccess { ENetNetworkGSM, - ENetNetworkWCDMA, - ENetNetworkGSMandWCDMA + ENetNetworkWCDMA }; //Information about network diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PSetRefreshHandler.h --- a/phonesrv_plat/phone_settings_api/inc/PSetRefreshHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PSetRefreshHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES -#include -#include +#include +#include // DATA TYPES @@ -55,25 +55,25 @@ public: // New functions /** - * Start the waiting for refresh events. + * Start the waiting for refresh events. * * @param aObserver The observer to handle refresh events. * @param aObservedFile The file change to be observed. * @param aObservedRefreshType The refresh type(s) to be observed. - */ - virtual void NotifyFileChangeL( + */ + virtual void NotifyFileChangeL( MSSSettingsRefreshObserver& aObserver, TSatElementaryFiles aObservedFile, TSatRefreshType aObservedRefreshType ) = 0; - /** - * Cancel the notification started in NotifyFileChangeL. + /** + * Cancel the notification started in NotifyFileChangeL. * * @param aObserver The observer whose notify to be canceled. * @param aObservedFile The file change to be canceled. * @param aObservedRefreshType The refresh type to be canceled. - */ - virtual void CancelNotify() = 0; + */ + virtual void CancelNotify() = 0; /** * Get the changed CSP information after Refresh. diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PsetCSP.h --- a/phonesrv_plat/phone_settings_api/inc/PsetCSP.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PsetCSP.h Wed Sep 01 12:15:03 2010 +0100 @@ -26,7 +26,7 @@ // INCLUDES #include -#include +#include // CLASS DECLARATION /** diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PsetCallBarring.h --- a/phonesrv_plat/phone_settings_api/inc/PsetCallBarring.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PsetCallBarring.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,9 +21,9 @@ #define PSETCALLBARRING_H // INCLUDES -#include "mpsetbarringobs.h" -#include "mpsetcallbarring.h" -#include "msssettingsobserver.h" +#include "MPsetBarringObs.h" +#include "MPsetCallBarring.h" +#include "MSSSettingsObserver.h" #include "nwdefs.h" #include #include @@ -39,8 +39,8 @@ * @since 1.0 */ class CPsetCallBarring : public CActive, - public MPsetCallBarring, - public MSSSettingsObserver + public MPsetCallBarring, + public MSSSettingsObserver { public: @@ -143,7 +143,7 @@ private: - void ValidateBsc( TBasicServiceGroups& aBsc ); + void ValidateBsc( TBasicServiceGroups& aBsc ); void SetObserver( MPsetBarringObserver& aObserver ); diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PsetCallDiverting.h --- a/phonesrv_plat/phone_settings_api/inc/PsetCallDiverting.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PsetCallDiverting.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,8 +23,8 @@ // INCLUDES #include #include "nwdefs.h" -#include "psetconstants.h" -#include "mpsetcalldiverting.h" +#include "PsetConstants.h" +#include "MPsetCallDiverting.h" // FORWARD DECLARATIONS class CDesC16ArrayFlat; @@ -39,10 +39,10 @@ enum TSelectedLine { - EPrimaryLine, // ALS is supported by ME & SIM and Line 1 (Primary Line) is the current line - EAuxiliaryLine, // ALS is supported by ME & SIM and Line 2 (Auxiliary Line) is the current line - EUnknownLine, // ALS is supported by ME & SIM but TSY can not determine line selection - ENotSupportedLine // ALS is not supported either by ME or SIM or both. + EPrimaryLine, // ALS is supported by ME & SIM and Line 1 (Primary Line) is the current line + EAuxiliaryLine, // ALS is supported by ME & SIM and Line 2 (Auxiliary Line) is the current line + EUnknownLine, // ALS is supported by ME & SIM but TSY can not determine line selection + ENotSupportedLine // ALS is not supported either by ME or SIM or both. }; // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PsetCallWaiting.h --- a/phonesrv_plat/phone_settings_api/inc/PsetCallWaiting.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PsetCallWaiting.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,11 +23,11 @@ // INCLUDES #include #include -#include "msssettingsobserver.h" +#include "MSSSettingsObserver.h" #include "nwdefs.h" -#include "mpsetcallwaiting.h" -#include "mpsetcallwaitingobs.h" -#include "psetconstants.h" +#include "MPsetCallWaiting.h" +#include "MPsetCallWaitingObs.h" +#include "PsetConstants.h" // FORWARD DECLARATIONS @@ -133,7 +133,7 @@ private: // constructors - void ConstructL( MPsetCallWaitingObserver& aObserver ); + void ConstructL( MPsetCallWaitingObserver& aObserver ); /***************************************************** * Series 60 Customer / ETel diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PsetCli.h --- a/phonesrv_plat/phone_settings_api/inc/PsetCli.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PsetCli.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,8 +23,8 @@ // INCLUDES #include -#include "mpsetcliobserver.h" -#include "mpsetcli.h" +#include "MPsetCliObserver.h" +#include "MPsetCli.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PsetContainer.h --- a/phonesrv_plat/phone_settings_api/inc/PsetContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PsetContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,12 +23,12 @@ #define PSETCONTAINER_H // INCLUDES -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PsetNetwork.h --- a/phonesrv_plat/phone_settings_api/inc/PsetNetwork.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PsetNetwork.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,14 +21,15 @@ #define PSETNETWORK_H // INCLUDES -#include "mpsetnetworkselect.h" -#include "mpsetnetworkinfoobs.h" -#include "mpsetnetworkmodeobs.h" -#include "mpsetnetworkmode.h" +#include "MPsetNetworkSelect.h" +#include "MPsetNetworkInfoObs.h" +#include "MPsetNetworkModeObs.h" +#include "MPsetNetworkMode.h" #include -#include +#include // FORWARD DECLARATIONS +class CNetworkResetHandler; class CPsetSAObserver; class CRetrieveMobilePhoneDetectedNetworks; class RMmCustomAPI; @@ -37,7 +38,6 @@ /** * CPsetNetwork class is used to handle network change requests. * @lib phonesettings.lib -* @since 1.0 */ class CPsetNetwork : public CActive, public MPsetNetworkSelect, @@ -52,10 +52,6 @@ * @param aObserver Reference to network observer. * @return Returns the CPsetNetwork-object */ - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ IMPORT_C static CPsetNetwork* NewL( RMobilePhone& aPhone, MPsetNetworkInfoObserver& aObserver ); @@ -66,10 +62,6 @@ * @param aObserver Reference to network observer. * @return Returns the CPsetNetwork-object */ - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ IMPORT_C static CPsetNetwork* NewL( RMobilePhone& aPhone, MPsetNetworkModeObserver& aObserver ); @@ -166,10 +158,6 @@ // this is required for the net container to create a pointer void ConstructL( MPsetNetworkModeObserver& aObserver ); - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ CPsetNetwork( RMobilePhone& aPhone ); private: //new @@ -188,52 +176,38 @@ private: //Latest network settings information - TNetworkInfo iTempNetInfo; + TNetworkInfo iTempNetInfo; + //Provides client access to mobile phone functionality provided by TSY. - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ RMobilePhone& iPhone; + //Currently active request. MPsetNetworkInfoObserver::TServiceRequest iServiceRequest; + //Observer CPsetSAObserver* iSAObserver; + //Network information observer - MPsetNetworkInfoObserver* iObserver; + MPsetNetworkInfoObserver* iObserver; + //Fetched network information (names, IDs) - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ CRetrieveMobilePhoneDetectedNetworks* iNetworkRetrieve; + //Current registartion status - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ RMobilePhone::TMobilePhoneRegistrationStatus iRegStatus; - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ + //Selected network information RMobilePhone::TMobilePhoneNetworkManualSelection iNwInfo; - + // // Network Mode related variables // //Network mode observer MPsetNetworkModeObserver* iNetworkModeObserver; - - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ + // Custom phone. RMmCustomAPI iCustomPhone; - + //Currently active request. MPsetNetworkModeObserver::TServiceRequest iModeRequest; @@ -242,6 +216,10 @@ //Currently active observer, for assert handling TInt iActiveObserver; + + //Active object observer for reseting network search handling + CNetworkResetHandler* iResetNetworkSearch; }; + #endif // PSETNETWORK_H // end of file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/PsetSAObserver.h --- a/phonesrv_plat/phone_settings_api/inc/PsetSAObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/PsetSAObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,8 +22,8 @@ // INCLUDES #include -#include -#include +#include +#include #include #include diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/nwdefs.h --- a/phonesrv_plat/phone_settings_api/inc/nwdefs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_api/inc/nwdefs.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include "psetconstants.h" +#include "PsetConstants.h" // DATA TYPES //basic service groups @@ -162,13 +162,13 @@ //call forwarding cenrep key statuses. enum TCallForwardingStatus - { - EForwardingUnknown = 0x0, - EForwardingActiveVoice = 0x01, - EForwardingActiveFax = 0x02, - EForwardingActiveData = 0x04 - }; - + { + EForwardingUnknown = 0x0, + EForwardingActiveVoice = 0x01, + EForwardingActiveFax = 0x02, + EForwardingActiveData = 0x04 + }; + // CLASS DEFINITIONS // Supplemental class to contain all call barring settings. class TCallBarringSetting diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/psetcallbarringwrapper.h --- a/phonesrv_plat/phone_settings_api/inc/psetcallbarringwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +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 PSETCALLBARRINGGWRAPPER_H -#define PSETCALLBARRINGGWRAPPER_H - -#include -#include - -// Forward declarations -class CPsetContainer; -class PSetCallBarringWrapperPrivate; - -#ifdef BUILD_PSETWRAPPER -#define PSETWRAPPER_EXPORT Q_DECL_EXPORT -#else -#define PSETWRAPPER_EXPORT Q_DECL_IMPORT -#endif - -class PSETWRAPPER_EXPORT PSetCallBarringWrapper : public QObject -{ - Q_OBJECT - -public: - - /** barring types */ - enum BarringType - { - BarringTypeAllBarrings = 0x0001, - BarringTypeAllOutgoing = 0x0002, - BarringTypeOutgoingInternational = 0x0004, - BarringTypeOutgoingInternationalExceptToHomeCountry = 0x0008, - BarringTypeAllIncoming = 0x0010, - BarringTypeIncomingWhenRoaming = 0x0020, - BarringTypeAllServices, - BarringTypeAllOutgoingServices, - BarringTypeAllIncomingServices - }; - - /** barring status */ - enum BarringStatus - { - BarringStatusUnknown, - BarringStatusActive, - BarringStatusInactive, - BarringStatusNotProvisioned, - BarringStatusUnavailable - }; - - /** barring error */ - enum BarringError - { - BarringErrorNone - }; - -public: - - explicit PSetCallBarringWrapper( - CPsetContainer &psetContainer, - QObject *parent = NULL); - - ~PSetCallBarringWrapper(); - - /** - * Checks the barring status from network. Result is signaled with - * barringStatusRequestCompleted. - * - * @param serviceGroup Service group concerned. - * @param barringType Barring type. - */ - void barringStatus( - PsServiceGroup serviceGroup, - BarringType barringType); - - /** - * Enables specified barring. Result is signaled with - * enableBarringRequestCompleted. - * - * @param serviceGroup Service group concerned. - * @param barringType Barring type. - * @param barringPassword Barring password. - */ - void enableBarring( - PsServiceGroup serviceGroup, - BarringType barringType, - QString barringPassword); - - /** - * Disables specified barring. Result is signaled with - * disableBarringRequestCompleted. - * - * @param serviceGroup Service group concerned. - * @param barringType Barring type. - * @param barringPassword Barring password. - */ - void disableBarring( - PsServiceGroup serviceGroup, - BarringType barringType, - QString barringPassword); - - /** - * Changes barring password. Maximum password length is 10. - * - * @param oldPassword Old barring password. - * @param newPassword New barring password. - * @param verifiedPassword New password verified. - */ - void changeBarringPassword( - const QString &oldPassword, - const QString &newPassword, - const QString &verifiedPassword); - -signals: - - /** - * This signal is emitted when barring status query request is completed. - * - * Basic service group identifier list contains items only if status is - * queried for several services at once and barrings are active for some - * of those services. - * - * @param result 0 if request was completed successfully - * or error code defined either in gsmerror.h or exterror.h. - * @param basicServiceGroupIds Service group identifiers. - * @param status Barring status. - */ - void barringStatusRequestCompleted( - int result, - const QList & basicServiceGroupIds, - PSetCallBarringWrapper::BarringStatus status); - - /** - * This signal is emitted when barring enabling is completed. - * - * @param result 0 if request was completed successfully - * or error code defined either in gsmerror.h or exterror.h. - * @param barringType Service group identifiers. - * @param barringStatus Barring status. - * @param plural Plurality. - */ - void enableBarringRequestCompleted( - int result, - PSetCallBarringWrapper::BarringType barringType, - PSetCallBarringWrapper::BarringStatus barringStatus, - bool plural); - - /** - * This signal is emitted when barring disabling is completed. - * - * @param result 0 if request was completed successfully - * or error code defined either in gsmerror.h or exterror.h. - * @param barringType Service group identifiers. - * @param barringStatus Barring status. - * @param plural Plurality. - */ - void disableBarringRequestCompleted( - int result, - PSetCallBarringWrapper::BarringType barringType, - PSetCallBarringWrapper::BarringStatus barringStatus, - bool plural); - - /** - * This signal is emitted when barring password change request is completed. - * - * @param result 0 if request was completed successfully - * or error code defined either in gsmerror.h or exterror.h. - */ - void barringPasswordChangeRequestCompleted(int result); - -private: // data - - /** Own. Private implementation. */ - QScopedPointer m_privateImpl; - friend class PSetCallBarringWrapperPrivate; -}; - -#endif // PSETCALLBARRINGGWRAPPER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h --- a/phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +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 PSETCALLDIVERTINGWRAPPER_H_ -#define PSETCALLDIVERTINGWRAPPER_H_ - -#include -#include -#include -#include - -// Forward declarations -class CPsetCallDiverting; -class CPsetContainer; -class PSetCallDivertingWrapperPrivate; -class CPhCltEmergencyCall; -class CDesC16ArrayFlat; -class TDesC16; - -// Call diverting command -class PSCallDivertingCommand -{ -public: - //member data - //Divert condition - PsCallDivertingCondition iCondition; - //Divert setting - PsCallDivertingSetting iSetting; - //Divert status - PsCallDivertingStatus iStatus; - //Divert service group - PsServiceGroup iServiceGroup; - //Diverted-to number - QString iNumber; - //Delay time before starting diverting - int iNoReplyTimer; -}; - -// Call diverting command -class PSCallDivertingStatus -{ -public: - //member data - //Divert condition - PsCallDivertingCondition iCondition; - //Divert service group - PsServiceGroup iServiceGroup; - //Divert status - PsCallDivertingStatus iStatus; - //Diverted-to number - QString iNumber; - /** The "No Reply" time-out (in seconds) registered for the call forwarding no reply - condition. - - Equals to -1 if this value is not applicable. In GSM mode, will be between - 5 and 30 and in steps of 5 if this value is applicable. */ - int iTimeout; -}; - -#ifdef BUILD_PSETWRAPPER -#define PSETWRAPPER_EXPORT Q_DECL_EXPORT -#else -#define PSETWRAPPER_EXPORT Q_DECL_IMPORT -#endif - -class PSETWRAPPER_EXPORT PSetCallDivertingWrapper : public QObject -{ -Q_OBJECT - -public: - - explicit PSetCallDivertingWrapper(CPsetContainer &psetContainer, - QObject *parent = NULL); - - virtual ~PSetCallDivertingWrapper(); - -public: - // Functions (adaptees): - - /** - * Sets call diverting to the network. - * - * @param aSetting New settings for the call diverting. - * @param aBsc Basic service group concerned. - * @return Error code. - */ - int setCallDiverting(PSCallDivertingCommand& aSetting, - int aBasicServiceGroup); - - /** - * Checks the call diverting status from network. - */ - void getCallDivertingStatus(const PsServiceGroup aServiceGroup, - const PsCallDivertingCondition aCondition, int aBsc); - - /** - * Cancels the call diverting-request process. - */ - void cancelProcess(); - - /** - * Retrieve the default (last forwarded-to) numbers. - */ - void getDefaultNumbers(QStringList &aDefNumbers); // QStringList - - /** - * Sets new number to the default numbers (last forwarded-to) list. - */ - void setNewDefaultNumber(QString aNumber); - - /** - * Get voicemailbox number. - * @param aNumber empty if not set - * @return -1 if not supported - */ - int getVoiceMailBoxNumber(QString &aNumber, PsService aService); - - /** - * Query voicemailbox number. - * @param aNumber empty if not set - * @return -1 if not supported - */ - int queryVoiceMailBoxNumber(QString &aNumber, PsService aService); - - /** - * Get CPsetCallDiverting reference. - */ - CPsetCallDiverting & getCPsetCallDiverting() const; - -signals: // Notify via signals - - void handleDivertingChanged(const PSCallDivertingCommand& aSetting, - bool aPlural); - - void handleDivertingStatus(QList& diverList, - bool aPlural); - - void handleDivertingError(int aReason); - - void handleCFRequesting(bool aOngoing, bool aInterrupted); - - void requestDone(); - -private: - - int validateDivertNumber(const TDesC16& aDivertTo) const; - bool findPlus(const TDesC16& aDivertTo) const; - -private: - // Data: - // Phone setting handlers, own - CPsetCallDiverting* m_psetCallDiverting; - - // Owned: Phone client emergency number session. - CPhCltEmergencyCall* m_emergencyCall; - - // Own - CDesC16ArrayFlat* m_DefaultNumberListCDes; - QStringList m_DefaultnumberListQSList; - - // Own - PSetCallDivertingWrapperPrivate* m_Priv; - friend class PSetCallDivertingWrapperPrivate; -}; - -#endif /* PSETCALLDIVERTINGWRAPPER_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h --- a/phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +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 PSETCALLWAITINGWRAPPER_H_ -#define PSETCALLWAITINGWRAPPER_H_ - -#include -#include - -// Forward declarations -class CPsetContainer; -class CPsetCallWaiting; -class PSetCallWaitingWrapperPrivate; - -#ifdef BUILD_PSETWRAPPER -#define PSETWRAPPER_EXPORT Q_DECL_EXPORT -#else -#define PSETWRAPPER_EXPORT Q_DECL_IMPORT -#endif - -class PSETWRAPPER_EXPORT PSetCallWaitingWrapper: - public QObject -{ - Q_OBJECT - -public: - - explicit PSetCallWaitingWrapper( CPsetContainer &psetContainer, - QObject *parent = NULL); - - ~PSetCallWaitingWrapper(); - - - // Call waiting status - enum PsCallWaitingStatus - { - StatusActive, - StatusDisabled, - StatusNotAvailable, - StatusNotProvisioned, - StatusUnknown - }; - - // Call waiting action - enum PsCallWaitingCommand - { - ActivateCallWaiting, - DeactivateCallWaiting, - CheckCallWaitingStatus - }; - -public: // Functions (adaptees): - - /** - * Sets call waiting to the network. - * - * @param aSetting New settings for the Call Waiting. - * @param aBsc Basic service group concerned. - */ - void setCallWaiting( PsCallWaitingCommand aSetting, - int aBasicServiceGroup ); - - /** - * Checks the call waiting status from network. - */ - void getCallWaitingStatus(); - - /** - * Cancels the call waiting-request process. - */ - void cancelProcess(); - - /** - * Get CPsetCallwaiting reference. - */ - CPsetCallWaiting & getCPsetCallWaiting() const; - -signals: // Notify via signals - - void handleCallWaitingGetStatus( - PSetCallWaitingWrapper::PsCallWaitingStatus aStatus, - const QList &basicServiceGroupIds); - - void handleCallWaitingChanged( - PSetCallWaitingWrapper::PsCallWaitingCommand aSetting, - int aResult ); - - void handleCallWaitingRequesting( bool ongoing, bool interrupted ); - - void handleCallWaitingError( int aError ); - -private: // Data: - - // Phone setting handlers, own - CPsetCallWaiting *m_psetCallWaiting; - - // Own - QScopedPointer m_privateImpl; - friend class PSetCallWaitingWrapperPrivate; -}; - - -#endif /* PSETCALLWAITINGWRAPPER_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/psetcliwrapper.h --- a/phonesrv_plat/phone_settings_api/inc/psetcliwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /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: - * - */ - -#ifndef PSETCLIWRAPPER_H_ -#define PSETCLIWRAPPER_H_ - - -#include -#include - -// Forward declarations -class CPsetContainer; -class CPsetCli; -class MPsetRequestObserver; -class PSetCliWrapperPrivate; - -#ifdef BUILD_PSETWRAPPER -#define PSETWRAPPER_EXPORT Q_DECL_EXPORT -#else -#define PSETWRAPPER_EXPORT Q_DECL_IMPORT -#endif - -class PSETWRAPPER_EXPORT PSetCliWrapper: - public QObject -{ - Q_OBJECT - -public: - - explicit PSetCliWrapper( CPsetContainer &psetContainer, - QObject *parent = NULL); - - ~PSetCliWrapper(); - - -public: // Functions (adaptees): - - /** - * Shows COLP (Connected Line Identification Presentation) mode. - */ - void getColpMode(); - - /** - * Shows CLIP (Calling Line Identification Presentation) mode. - */ - void getClipMode(); - - /** - * Shows CLIR (Calling Line Identification Restriction) mode. - */ - void getClirMode(); - - /** - * Shows COLR (Connected Line Identification Restriction) mode. - */ - void getColrMode(); - - /** - * Shows CNAP (Calling Number Presentation) mode. - * - */ - void getCnap(); - - /** - * Cancels any (and all) request(s). - */ - void cancelAll(); - -signals: // Notify via signals - - void handleCliRequesting( bool ongoing, bool interrupted ); - - void cliInformation( const PsCallLineIdentity& type ); - - void handleCliStatus( - unsigned char *bsc, int numberOfBsc, const PsCallLineIdentity& aMode ); - - void handleCnapStatus( int aStatus ); - - void handleCliError( int aError ); - -private: // Data: - // Phone setting handlers - CPsetCli* m_psetCli; - - // Own - QScopedPointer m_privateImpl; - friend class PSetCliWrapperPrivate; -}; - - -#endif /* PSETCLIWRAPPER_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h --- a/phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +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 PSETNETWORKWRAPPER_H -#define PSETNETWORKWRAPPER_H - -#include - -class PSetNetworkWrapperPrivate; -class CPsetContainer; -class HbDialog; - -#ifdef BUILD_PSETWRAPPER -#define PSETWRAPPER_EXPORT Q_DECL_EXPORT -#else -#define PSETWRAPPER_EXPORT Q_DECL_IMPORT -#endif - -class PSETWRAPPER_EXPORT PSetNetworkWrapper : public QObject -{ - Q_OBJECT - -public: - - enum ErrorCode { - ErrNoError = 0, - ErrGeneral, - ErrCauseCallActive, - ErrNoNetworkService, - ErrOfflineOpNotAllowed, - ErrNoNetworkAccess - }; - - enum RequestType { - RequestNone, - RequestEnumerateNetworks, - RequestGetNetworkInfo, - RequestGetCurrentNetworkInfo, - RequestGetNetworkSearchMode, - RequestSetNetwork, - RequestSetNetworkMode, - RequestSetNetworkAutomatic - }; - - enum RegistrationStatus { - RegisteredOnHomeNetwork, - RegisteredRoaming - }; - - enum NetworkAccessMode { - AccessModeDual, - AccessModeUmts, - AccessModeGsm - }; - - struct NetworkId{ - /*! Country code. Maximum length is 4. */ - QString m_countryCode; - /*! Network code. Maximum length is 8. */ - QString m_networkCode; - }; - - enum NetworkSelectionMode { - SelectionModeManual, - SelectionModeAutomatic - }; - - enum NetworkStatus { - StatusUnknown, - StatusAvailable, - StatusCurrent, - StatusForbidden - }; - - enum NetworkAccessType { - AccessTypeGsm, - AccessTypeWcdma, - AccessTypeGsmAndWcdma - }; - - struct NetworkInfo { - NetworkId m_id; - NetworkStatus m_status; - NetworkSelectionMode m_mode; - NetworkAccessType m_access; - /*! Short name. Maximum length is 20. */ - QString m_shortName; - /*! Long name. Maximum length is 30. */ - QString m_longName; - }; - -public: - - explicit PSetNetworkWrapper(CPsetContainer &psetContainer, - QObject *parent = NULL); - - virtual ~PSetNetworkWrapper(); - -public: - - void getAvailableNetworks(); - - ErrorCode getNetworkSelectionMode( - PSetNetworkWrapper::NetworkSelectionMode& mode) const; - - void selectNetwork( - const PSetNetworkWrapper::NetworkInfo& info); - - void cancelRequest(); - -public: - - void getNetworkAccessMode() const; - - void setNetworkAccessMode(PSetNetworkWrapper::NetworkAccessMode mode); - - bool isManualNetworkSelectionSupported() const; - -signals: - - // Real type of parameter mode is enum PSetNetworkWrapper::NetworkAccessMode. - void networkAccessModeGot(int mode); - - void availableNetworksGot(QList &networkInfoList); - - void networkReqestFailed( - PSetNetworkWrapper::ErrorCode error, - PSetNetworkWrapper::RequestType type); - - void searchingNetworks(PSetNetworkWrapper::RequestType &type); - - void requestingSelectedNetwork(bool ongoing); - - void networkChanged( - PSetNetworkWrapper::NetworkInfo& currentInfo, - PSetNetworkWrapper::RegistrationStatus& status); - - void chageVisbilityOfManualNetworkSelection(bool visible); - -private: - - PSetNetworkWrapper(const PSetNetworkWrapper &); - PSetNetworkWrapper &operator=(const PSetNetworkWrapper &); - PSetNetworkWrapperPrivate* m_privateImpl; - friend class PSetNetworkWrapperPrivate; -}; - -#endif // PSETNETWORKWRAPPER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/psetwrapper.h --- a/phonesrv_plat/phone_settings_api/inc/psetwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +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 PSETWRAPPER_H -#define PSETWRAPPER_H - -#include - -class CPsetContainer; -class PSetCliWrapper; -class PSetCallWaitingWrapper; -class PSetCallDivertingWrapper; -class PSetNetworkWrapper; -class PSetCallBarringWrapper; - -#ifdef BUILD_PSETWRAPPER -#define PSETWRAPPER_EXPORT Q_DECL_EXPORT -#else -#define PSETWRAPPER_EXPORT Q_DECL_IMPORT -#endif - -class PSETWRAPPER_EXPORT PSetWrapper: public QObject -{ - Q_OBJECT - -public: - - explicit PSetWrapper(QObject *parent = NULL); - - ~PSetWrapper(); - -public: // Functions: - /** - Returns reference to call line identification settings. - @exception bad alloc if creations fails - */ - PSetCliWrapper& cliWrapper(); - - /** - Returns reference to call waiting settings. - @exception bad alloc, if creations fails. - */ - PSetCallWaitingWrapper& callWaitingWrapper(); - - /** - Returns reference to call diverting settings. - @exception bad alloc, if creations fails. - */ - PSetCallDivertingWrapper& callDivertingWrapper(); - - /** - Returns reference to network settings. - @exception bad alloc, if creations fails. - */ - PSetNetworkWrapper& networkWrapper(); - - /** - Returns reference to call barring settings. - @exception bad alloc, if creations fails. - */ - PSetCallBarringWrapper& callBarringWrapper(); - -private: // Data: - // Own - CPsetContainer *m_psetContainer; - - // Phone setting handlers - PSetCliWrapper *m_wrapperCli; - - PSetCallWaitingWrapper *m_callWaitingWrapper; - - PSetCallDivertingWrapper *m_callDivertingWrapper; - - PSetNetworkWrapper *m_networkWrapper; - - PSetCallBarringWrapper *m_callBarringWrapper; - -}; -#endif // PSETWRAPPER - diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_api/inc/psetwrappertypes.h --- a/phonesrv_plat/phone_settings_api/inc/psetwrappertypes.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +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 PSETWRAPPERTYPES_H -#define PSETWRAPPERTYPES_H - -#include - -const int maxBscNumber = 13; //max. number of basic service groups -const int maxPsuiItemLength = 32;//max. length of text in PSUI note - -// Status of Calling Identity. -enum PsCallLineIdentity -{ - ClirOn = 1, - ClirOff, - ClipOn, - ClipOff, - ColrOn, - ColrOff, - ColpOn, - ColpOff, - CliUnknown -}; - -//call forwarding statuses -enum PsCallDivertingStatus -{ - DivertingStatusActive, - DivertingStatusInactive, - DivertingStatusNotRegistered, - DivertingStatusNotProvisioned, - DivertingStatusUnknown -}; - -//call forwarding conditions -enum PsCallDivertingCondition -{ - DivertConditionUnknown, - DivertConditionUnconditional, - DivertConditionBusy, - DivertConditionNoReply, - DivertConditionNotReachable, - DivertConditionAllCalls, - DivertConditionAllConditionalCases -}; - -//call forwarding actions -enum PsCallDivertingSetting -{ - ActivateDiverting, - CancelDiverting, - RegisterDiverting, - EraseDiverting, - CheckStatus -}; - -// basic teleservice groups (ETSI Gsm 02.03 and 02.04) -enum PsService -{ - ServiceGroupUnknown = 0x00000000, - ServiceGroupVoice = 0x00000001, - ServiceGroupData = 0x00000002, - ServiceGroupFax = 0x00000004, - ServiceGroupAllTeleservices = ServiceGroupVoice | ServiceGroupData - | ServiceGroupFax -}; -typedef QFlags PsServiceGroup; - - -#endif // PSETWRAPPERTYPES_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_notes_ui_api/group/bld.inf --- a/phonesrv_plat/phone_settings_notes_ui_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_notes_ui_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,9 +24,9 @@ PRJ_EXPORTS -../inc/psuicontainer.h MW_LAYER_PLATFORM_EXPORT_PATH(psuicontainer.h) -../inc/psuibarringobs.h MW_LAYER_PLATFORM_EXPORT_PATH(psuibarringobs.h) -../inc/psuicliobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(psuicliobserver.h) -../inc/psuiconstants.h MW_LAYER_PLATFORM_EXPORT_PATH(psuiconstants.h) -../inc/psuiwaitingobs.h MW_LAYER_PLATFORM_EXPORT_PATH(psuiwaitingobs.h) -../inc/psuidivertobs.h MW_LAYER_PLATFORM_EXPORT_PATH(psuidivertobs.h) +../inc/PsuiContainer.h MW_LAYER_PLATFORM_EXPORT_PATH(PsuiContainer.h) +../inc/PsuiBarringObs.h MW_LAYER_PLATFORM_EXPORT_PATH(PsuiBarringObs.h) +../inc/PsuiCliObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(PsuiCliObserver.h) +../inc/PsuiConstants.h MW_LAYER_PLATFORM_EXPORT_PATH(PsuiConstants.h) +../inc/PsuiWaitingObs.h MW_LAYER_PLATFORM_EXPORT_PATH(PsuiWaitingObs.h) +../inc/PsuiDivertObs.h MW_LAYER_PLATFORM_EXPORT_PATH(PsuiDivertObs.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiBarringObs.h --- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiBarringObs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiBarringObs.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPSUIBARRINGOBS_H // INCLUDES -#include -#include "psuiconstants.h" +#include +#include "PsuiConstants.h" // FORWARD DECLARATION class MPsetCallBarring; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiCliObserver.h --- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiCliObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiCliObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,8 +21,8 @@ #define CPSUICLIOBSERVER_H // INCLUDES -#include -#include "psuiconstants.h" +#include +#include "PsuiConstants.h" // FORWARD DECLARATION class CPsuiResourceLoader; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiContainer.h --- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -25,10 +25,10 @@ #define CPSUICONTAINER_H // INCLUDES -#include -#include -#include -#include +#include +#include +#include +#include // FORWARD DECLARATIONS class CPsuiResourceLoader; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiDivertObs.h --- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiDivertObs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiDivertObs.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPSUIDIVERTOBS_H // INCLUDES -#include -#include "psuiconstants.h" +#include +#include "PsuiConstants.h" // FORWARD DECLARATION class MPsetCallDiverting; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiWaitingObs.h --- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiWaitingObs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiWaitingObs.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,8 +23,8 @@ #define CPSUIWAITINGOBS_H // INCLUDES -#include -#include "psuiconstants.h" +#include +#include "PsuiConstants.h" // FORWARD DECLARATION class CPsuiResourceLoader; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_observer_api/group/bld.inf --- a/phonesrv_plat/phone_settings_observer_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_observer_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,10 +24,10 @@ PRJ_EXPORTS -../inc/mpsetcallwaitingobs.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetcallwaitingobs.h) -../inc/mpsetdivertobs.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetdivertobs.h) -../inc/mpsetcliobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetcliobserver.h) -../inc/mpsetnetworkinfoobs.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetnetworkinfoobs.h) -../inc/mpsetbarringobs.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetbarringobs.h) -../inc/mpsetrequestobs.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetrequestobs.h) -../inc/mpsetnetworkmodeobs.h MW_LAYER_PLATFORM_EXPORT_PATH(mpsetnetworkmodeobs.h) +../inc/MPsetCallWaitingObs.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetCallWaitingObs.h) +../inc/MPsetDivertObs.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetDivertObs.h) +../inc/MPsetCliObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetCliObserver.h) +../inc/MPsetNetworkInfoObs.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetNetworkInfoObs.h) +../inc/MPsetBarringObs.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetBarringObs.h) +../inc/MPsetRequestObs.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetRequestObs.h) +../inc/MPsetNetworkModeObs.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetNetworkModeObs.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_observer_api/inc/MPsetBarringObs.h --- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetBarringObs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetBarringObs.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include "nwdefs.h" -#include "mpsetcallbarring.h" +#include "MPsetCallBarring.h" // CLASS DEFINITIONS /** diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_observer_api/inc/MPsetCallWaitingObs.h --- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetCallWaitingObs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetCallWaitingObs.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #define MPSETCALLWAITINGOBS_H // INCLUDES -#include +#include // CLASS DEFINITIONS class MPsetCallWaitingObserver diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_observer_api/inc/MPsetCliObserver.h --- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetCliObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetCliObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,9 +22,9 @@ // INCLUDES #include -#include -#include "psetconstants.h" -#include "mpsetcli.h" +#include +#include "PsetConstants.h" +#include "MPsetCli.h" // CLASS DEFINITIONS /** diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_observer_api/inc/MPsetDivertObs.h --- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetDivertObs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetDivertObs.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include #include "nwdefs.h" -#include "mpsetcalldiverting.h" +#include "MPsetCallDiverting.h" // FORWARD DECLARATIONS class CMobilePhoneCFList; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_observer_api/inc/MPsetNetworkInfoObs.h --- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetNetworkInfoObs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetNetworkInfoObs.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ #define MPSETNETWORKINFOOBS_H // INCLUDES -#include "mpsetnetworkselect.h" +#include "MPsetNetworkSelect.h" #include // DATA TYPES diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_ui_notes_api/group/bld.inf --- a/phonesrv_plat/phone_settings_ui_notes_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2006 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: File that exports the files belonging to - Phone Settings UI Notes API -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../inc/psuinotes.h MW_LAYER_PLATFORM_EXPORT_PATH(psuinotes.h) -../inc/psuilocalisation.h MW_LAYER_PLATFORM_EXPORT_PATH(psuilocalisation.h) -../inc/psuiwaitingnotehandler.h MW_LAYER_PLATFORM_EXPORT_PATH(psuiwaitingnotehandler.h) -../inc/psuidivertnotehandler.h MW_LAYER_PLATFORM_EXPORT_PATH(psuidivertnotehandler.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_ui_notes_api/inc/psuidivertnotehandler.h --- a/phonesrv_plat/phone_settings_ui_notes_api/inc/psuidivertnotehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +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 PSUIDIVERTNOTETHANDLER_H_ -#define PSUIDIVERTNOTEHANDLER_H_ - -#include -#include - -class PSetCallDivertingWrapper; -class PSCallDivertingCommand; -class PSCallDivertingStatus; - -#ifdef BUILD_PSUINOTES -#define PSUINOTES_EXPORT Q_DECL_EXPORT -#else -#define PSUINOTES_EXPORT Q_DECL_IMPORT -#endif - -class PSUINOTES_EXPORT PsUiDivertNoteHandler : public QObject -{ - Q_OBJECT - -public: - PsUiDivertNoteHandler(PSetCallDivertingWrapper& callDivertingWrapper); - ~PsUiDivertNoteHandler(); - -public slots: // Slots: - - /** - * Set info request results - * @param setting - * @param plural - */ - void handleDivertingChanged( - const PSCallDivertingCommand& setting, - bool plural); - - /** - * Get info request results - * @param divertList - * @param plural - */ - void handleDivertingStatus( - QList& divertList, - bool plural); - - /** - * Request failed. - * @param reason Reason code for fail - */ - void handleDivertingError(int reason); - - /** - * Handles requesting notes. - * - * @param aOngoing Is there a request going on. - * @param aInterrupted Request needs to immediately cancelled. - */ - void handleCFRequesting(bool ongoing, bool interrupted); - -private: // data - - PSetCallDivertingWrapper& m_callDivertingWrapper; - - int m_activeNoteId; - int m_activeProgressNoteId; - -}; - -#endif /* PSUIDIVERTNOTEHANDLER_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_ui_notes_api/inc/psuilocalisation.h --- a/phonesrv_plat/phone_settings_ui_notes_api/inc/psuilocalisation.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +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 PSUILOCALISATION_H_ -#define PSUILOCALISATION_H_ - -#include -#include - -// Forward declarations -class QTranslator; - -#ifdef BUILD_PSUINOTES -#define PSUINOTES_EXPORT Q_DECL_EXPORT -#else -#define PSUINOTES_EXPORT Q_DECL_IMPORT -#endif - -class PSUINOTES_EXPORT PsUiLocalisation: public QObject - { - Q_OBJECT - -public: - - enum TranslationFileId { - TranslationFileCommon, - TranslationFileTelephoneCp - }; - -public: - - PsUiLocalisation(QObject *parent = NULL); - ~PsUiLocalisation(); - - /** - * Installs specific translation file - * @param translationFileId Id of file to be installed - */ - bool installTranslator(TranslationFileId translationFileId); - - /** - * Removes installed translators - */ - void removeTranslators(); - -private: - - QList m_translators; - }; - - -#endif /* PSUILOCALISATION_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_ui_notes_api/inc/psuinotes.h --- a/phonesrv_plat/phone_settings_ui_notes_api/inc/psuinotes.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +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 PSUINOTES_H -#define PSUINOTES_H - -#include -#include -#include -#include -#include - -#ifdef BUILD_PSUINOTES -#define PSUINOTES_EXPORT Q_DECL_EXPORT -#else -#define PSUINOTES_EXPORT Q_DECL_IMPORT -#endif - -class HbInputDialog; -class QValidator; -class QTranslator; -class PsUiLocalisation; -class PsUiSettingsWrapper; - -class PSUINOTES_EXPORT PsUiNotes: public QObject -{ - Q_OBJECT - -public: - - static PsUiNotes* instance(); - -private: - - PsUiNotes(); - - ~PsUiNotes(); - - Q_DISABLE_COPY(PsUiNotes) - -signals: - - /** - This signal is emitted when the device progress dialog is cancelled by - user pressing the "cancel" button or by the application itself. - @param noteId On return contains unique note identifier. - */ - void progressNoteCanceled(); - - /** - This signal is emitted when the user coplete password query. - @param password On return contains user given password. - @param ok True if the user pressed OK, false if the user - pressed Cancel. - */ - void passwordQueryCompleted( - QString password, - bool okPressed); - -public slots: // Slots: - - /** - Shows global progress note. Note showing may be delayed if other note - showing is ongoing. - @param noteId On return contains unique note identifier. - @param text Text to show on a note. - */ - void showGlobalProgressNote(int ¬eId, const QString& text); - - /** - Shows global note. Note showing may be delayed if other note - showing is ongoing. - @param noteId On return contains unique note identifier. - @param text Text to show on a note. - @param noteType Note type. - */ - void showGlobalNote(int ¬eId, const QString& text, - HbMessageBox::MessageBoxType noteType); - - /** - Shows global error note. Note showing may be delayed if other note - showing is ongoing. - @param noteId On return contains unique note identifier. - @param errorCode Code specifying error situation. - */ - void showGlobalErrorNote(int ¬eId, int errorCode); - - - /** - Shows detailed call divert information about the selected divert service - group. - @param divertStatusList Divert status information. - */ - void showCallDivertDetails( - const QList &divertingStatusList); - - /** - Shows password query dialog with OK & Cancel buttons and returns user - given password unless user has canceled query. Only valid password is - accepted. - @param title Title for the query dialog. - @param validator Password validator. - @param maxPasswordLength Maximum length for the password. - */ - void showPasswordQueryDialog( - const QString &title, - const QValidator &validator, - int maxPasswordLength); - - /** - Cancels specified note. - @param noteId Note identifier. - */ - void cancelNote(int noteId); - - /** - Retuns true if note is currently shown. - */ - bool noteShowing(); - - /** - Slot for HbDialog finished signal. - */ - void finishedPasswordQueryDialog(HbAction* action); - - /** - Shows notification dialog. - @param text Text to show on a dialog. - */ - void showNotificationDialog(const QString& text); - - /** - Shows global notification dialog. - @param text Text to show on a dialog. - */ - void showGlobalNotificationDialog(const QString& text); - -private: - - /** - Formats phone number according to locale specific rules. - @param number Unformatted phone number. - @return Formatted number. - */ - QString formatPhoneNumber(QString number) const; - - /** - Launches next note in the queue if not busy with showing other - note currently. - */ - void launchNextNoteIfReady(); - - /** - Formats the active diverts note content text - @param divertinStatusList Status of diverts - @param text Contains formatted text on return - */ - void formatActiveDivertsNoteText( - const QList &divertingStatusList, - QString &text); - -private slots: - - /** - Handler method for notes' about to close signal. - */ - void activeNoteAboutToClose(); - - /** - Handler method for notes' canceled signal. - */ - void handleProgressNoteCanceled(); - - /** - Used for dynamic enable/disable of password dialog's OK button according - to validity of the currently inputted password. - */ - void passwordTextChanged(); - -private: // Data: - - /** - Notes waiting to be shown. - */ - QQueue *m_notesQueue; - - /** - Indicates whether note controller is busy with some note showing. - */ - bool m_isNoteShowingOngoing; - - /** - Password query dialog. Own. - */ - HbInputDialog *m_passwordDialog; - - /** - Password validator. Not own. - */ - const QValidator *m_passwordValidator; - - /** - Translators. - */ - PsUiLocalisation *m_localisation; - - PsUiSettingsWrapper *m_psuiSettings; -}; -#endif // PSUINOTES_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_ui_notes_api/inc/psuiwaitingnotehandler.h --- a/phonesrv_plat/phone_settings_ui_notes_api/inc/psuiwaitingnotehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +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 PSUIWAITINGNOTEHANDLER_H_ -#define PSUIWAITINGNOTEHANDLER_H_ - -#include -#include -#include - -class PSetCallWaitingWrapper; -class PSCallWaitingCommand; -class PsUiSettingsWrapper; - -#ifdef BUILD_PSUINOTES -#define PSUINOTES_EXPORT Q_DECL_EXPORT -#else -#define PSUINOTES_EXPORT Q_DECL_IMPORT -#endif - -class PSUINOTES_EXPORT PsUiWaitingNoteHandler : public QObject -{ - Q_OBJECT - -public: - PsUiWaitingNoteHandler(PSetCallWaitingWrapper& callWaitingWrapper); - ~PsUiWaitingNoteHandler(); - -public slots: // Slots: - - /** - * Shows notes for call waiting status interrogation - * @param status Status of the call waiting - * @param basicServiceGroupIds - */ - void handleCallWaitingGetStatus( - PSetCallWaitingWrapper::PsCallWaitingStatus status, - const QList &basicServiceGroupIds); - - /** - * Shows notes for call waiting status change request - * @param setting Type of the call waiting request - * @param result Result code of the request - */ - void handleCallWaitingChanged( - PSetCallWaitingWrapper::PsCallWaitingCommand setting, - int result ); - - /** - * Handles call waiting requesting notes - * @param ongoing If true, there is an active request - * @param interrupted If true, means that requesting note - * should be cancelled - */ - void handleCallWaitingRequesting( bool ongoing, bool interrupted ); - - /** - * Handles call waiting error notes - * @param error Error value - */ - void handleCallWaitingError( int error ); - -private: // data - - // For diverting signals - PSetCallWaitingWrapper& m_callWaitingWrapper; - - // Own. - PsUiSettingsWrapper* m_settingsWrapper; - - // Current active note id - int m_activeNoteId; - - // Current progress note id - int m_activeProgressNoteId; - -}; - -#endif /* PSUIWAITINGNOTEHANDLER_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/phone_settings_ui_notes_api/phone_settings_ui_notes_api.metaxml --- a/phonesrv_plat/phone_settings_ui_notes_api/phone_settings_ui_notes_api.metaxml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - Phone Settings UI Notes API - Provides common interface for showing phone settings specific notes. Contains interface classes for showing supplementary services specific notes. - c++ - domain - - - - yes - no - - diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/sat_client_api/group/bld.inf --- a/phonesrv_plat/sat_client_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/sat_client_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: File that exports the files belonging to -: SAT Client API +* SAT Client API * */ @@ -24,4 +24,4 @@ PRJ_EXPORTS -../inc/rsatsession.h MW_LAYER_PLATFORM_EXPORT_PATH( rsatsession.h ) +../inc/RSatSession.h MW_LAYER_PLATFORM_EXPORT_PATH( rsatsession.h ) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/sat_configuration_api/group/bld.inf --- a/phonesrv_plat/sat_configuration_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/sat_configuration_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: File that exports the files belonging to -: SAT Configuration API +* SAT Configuration API * */ @@ -24,4 +24,4 @@ PRJ_EXPORTS -../inc/satdomainpskeys.h MW_LAYER_PLATFORM_EXPORT_PATH(satdomainpskeys.h) +../inc/SATDomainPSKeys.h MW_LAYER_PLATFORM_EXPORT_PATH(satdomainpskeys.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/sat_refresh_api/group/bld.inf --- a/phonesrv_plat/sat_refresh_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/sat_refresh_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: File that exports the files belonging to -: SAT Refresh API +* SAT Refresh API * */ @@ -24,5 +24,5 @@ PRJ_EXPORTS -../inc/rsatrefresh.h MW_LAYER_PLATFORM_EXPORT_PATH(rsatrefresh.h) -../inc/msatrefreshobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(msatrefreshobserver.h) +../inc/RSatRefresh.h MW_LAYER_PLATFORM_EXPORT_PATH(rsatrefresh.h) +../inc/MSatRefreshObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(msatrefreshobserver.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/sat_refresh_api/inc/RSatRefresh.h --- a/phonesrv_plat/sat_refresh_api/inc/RSatRefresh.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/sat_refresh_api/inc/RSatRefresh.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include +#include #include // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/service_provider_settings_api/inc/mspnotifychangeobserver.h --- a/phonesrv_plat/service_provider_settings_api/inc/mspnotifychangeobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/service_provider_settings_api/inc/mspnotifychangeobserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -27,7 +27,7 @@ /** * Call back interface for notify change events * - * Client has to implement this interface if client + * Client has to implement this interface if client * need to receive settings notification change. * * @lib serviceprovidersettings.lib @@ -35,23 +35,23 @@ */ class MSPNotifyChangeObserver { - public: + public: - /** - * Handle notify change event - * - * @param aServiceId the service ID of added/changed/deleted service - * @since S60 3.2 - */ - virtual void HandleNotifyChange( TServiceId aServiceId ) = 0; - - /** - * Handle error - * - * @param aError error code - * @since S60 3.2 - */ - virtual void HandleError( TInt aError ) = 0; + /** + * Handle notify change event + * + * @param aServiceId the service ID of added/changed/deleted service + * @since S60 3.2 + */ + virtual void HandleNotifyChange( TServiceId aServiceId ) = 0; + + /** + * Handle error + * + * @param aError error code + * @since S60 3.2 + */ + virtual void HandleError( TInt aError ) = 0; }; #endif // MSPNOTIFYCHANGEOBSERVER_H \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/service_provider_settings_api/inc/spdefinitions.h --- a/phonesrv_plat/service_provider_settings_api/inc/spdefinitions.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/service_provider_settings_api/inc/spdefinitions.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,29 +24,29 @@ /** Service attribute mask */ enum TPropertyServiceAttributes - { - ESupportsCSVoiceCall = 0x00000001, // Supports CS voice call - ESupportsCSVideoCall = 0x00000002, // Supports CS video call - ESupportsCSData = 0x00000004, // Supports CS data transfer - ESupportsFax = 0x00000008, // Service supports fax - ESupportsInternetCall = 0x00000010, // Service supports internet call - ESupportsEmergencyCall = 0x00000020, // service supports emergency call - ESupportsMSISDNAddressing = 0x00000040, // Service supports MSISDN addressing - ESupportsAlphanumericAddressing = 0x00000080, // Service supports alphanumeric addressing - EIsVisibleInCallMenu = 0x00000100, // Service is visible in call menu - EBootstrapCallProvider = 0x00000200, // Boostrap call provider - ESupportVoIPSS = 0x00000400, // Supports VoIP SS - ESimplifiedConferenceCallBubble = 0x00000800 // Simplified conference call bubble - }; - -/** Supported feature check */ + { + ESupportsCSVoiceCall = 0x00000001, // Supports CS voice call + ESupportsCSVideoCall = 0x00000002, // Supports CS video call + ESupportsCSData = 0x00000004, // Supports CS data transfer + ESupportsFax = 0x00000008, // Service supports fax + ESupportsInternetCall = 0x00000010, // Service supports internet call + ESupportsEmergencyCall = 0x00000020, // service supports emergency call + ESupportsMSISDNAddressing = 0x00000040, // Service supports MSISDN addressing + ESupportsAlphanumericAddressing = 0x00000080, // Service supports alphanumeric addressing + EIsVisibleInCallMenu = 0x00000100, // Service is visible in call menu + EBootstrapCallProvider = 0x00000200, // Boostrap call provider + ESupportVoIPSS = 0x00000400, // Supports VoIP SS + ESimplifiedConferenceCallBubble = 0x00000800 // Simplified conference call bubble + }; + +/** Supported feature check */ enum TSPServiceFeature - { - ESupportInternetCallFeature, //ESupportsInternetCall + ESupportsAlphanumericAddressing + EIsVisibleInCallMenu - ESupportCallOutFeature, //ESupportsInternetCall + ESupportsMSISDNAddressing + EIsVisibleInCallMenu - ESupportVoIPSSFeature, //ESupportVoIPSS - ESupportVoIPFeature //FeatureManager::FeatureSupported()+dynamic voip flag check+with subservice voip - }; + { + ESupportInternetCallFeature, //ESupportsInternetCall + ESupportsAlphanumericAddressing + EIsVisibleInCallMenu + ESupportCallOutFeature, //ESupportsInternetCall + ESupportsMSISDNAddressing + EIsVisibleInCallMenu + ESupportVoIPSSFeature, //ESupportVoIPSS + ESupportVoIPFeature //FeatureManager::FeatureSupported()+dynamic voip flag check+with subservice voip + }; /** Service provider ID not defined */ const TInt KSPNoId = 0; @@ -135,7 +135,7 @@ EPropertyContactStoreId = 0x0002D000, // Virtual phonebook contact store ID. Set by RCSE EPropertyServiceBookmarkUri = 0x0002E000, // Service provider bookmark URI. Set by VoIP adapter EPropertyIncomingEmailserver = 0x0002F000, // Service incoming e-mail server - + // Subproperties // VoIP subproperties @@ -190,7 +190,7 @@ ESubPropertyVccDtWLANHoHysteresis = 0x0004D000, ESubPropertyVccDtWLANHoHysteresisTimerLow = 0x0004E000, ESubPropertyVccDtWLANHoHysteresisTimerHigh = 0x0004F000, - ESubPropertyVccHoNotificationToneMode = 0x00050000, + ESubPropertyVccHoNotificationToneMode = 0x00050000, ESubPropertyVccDtVoipServiceId = 0x00051000, ESubPropertyVccDtAllowedWhenCsOriginated = 0x00052000, ESubPropertyVccAppId = 0x00053000, @@ -218,11 +218,11 @@ /** List of subservice launching method */ enum TSPSubServiceLaunchMethod - { - ESPFrameWorkPlugin, - ESPLauncherPlugin, - ESPApplication - }; + { + ESPFrameWorkPlugin, + ESPLauncherPlugin, + ESPApplication + }; /** Service ID */ @@ -238,7 +238,7 @@ /** Array of service provider IDs */ typedef RArray RPropertyNameArray; -/** central repsitory keys array */ +/** central repsitory keys array */ typedef RArray RKeyArray; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/service_provider_settings_api/inc/spentry.h --- a/phonesrv_plat/service_provider_settings_api/inc/spentry.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/service_provider_settings_api/inc/spentry.h Wed Sep 01 12:15:03 2010 +0100 @@ -36,201 +36,201 @@ NONSHARABLE_CLASS( CSPEntry ): public CBase { - public: // Constructors and destructor - /** - * Two-phased constructor. - */ - IMPORT_C static CSPEntry* NewL(); + public: // Constructors and destructor + /** + * Two-phased constructor. + */ + IMPORT_C static CSPEntry* NewL(); - /** - * Two-phased constructor. - */ - IMPORT_C static CSPEntry* NewLC(); + /** + * Two-phased constructor. + */ + IMPORT_C static CSPEntry* NewLC(); - /** - * Destructors. - */ - IMPORT_C virtual ~CSPEntry(); + /** + * Destructors. + */ + IMPORT_C virtual ~CSPEntry(); - public: // Member functions - /** - * Returns service Id of this entry. - * - * @since S60 V3.2 - * @return Service ID - */ - IMPORT_C TServiceId GetServiceId() const; + public: // Member functions + /** + * Returns service Id of this entry. + * + * @since S60 V3.2 + * @return Service ID + */ + IMPORT_C TServiceId GetServiceId() const; - /** - * Sets unique service provider ID for this entry. - * This ID is generated automatically when new entry is added. - * Service ID is also required when user updates entry in service table - * - * @since S60 V3.2 - * @param aServiceId service ID - */ - void SetServiceId( TServiceId aServiceId ); + /** + * Sets unique service provider ID for this entry. + * This ID is generated automatically when new entry is added. + * Service ID is also required when user updates entry in service table + * + * @since S60 V3.2 + * @param aServiceId service ID + */ + void SetServiceId( TServiceId aServiceId ); - /** - * Returns service name of this entry. - * - * @since S60 V3.2 - * @return Service name - */ - IMPORT_C const TDesC& GetServiceName() const; + /** + * Returns service name of this entry. + * + * @since S60 V3.2 + * @return Service name + */ + IMPORT_C const TDesC& GetServiceName() const; - /** - * Sets service name for this entry. - * - * @since S60 V3.2 - * @param aServiceName service name - */ - IMPORT_C TInt SetServiceName( const TDesC& aServiceName ); + /** + * Sets service name for this entry. + * + * @since S60 V3.2 + * @param aServiceName service name + */ + IMPORT_C TInt SetServiceName( const TDesC& aServiceName ); - /** - * Adds new property to this entry. - * - * @since S60 V3.2 - * @param aProperty new property pointer - * @return KErrNone if addition succeeded, - * system wide error code otherwise. - */ - IMPORT_C TInt AddPropertyL( const CSPProperty& aProperty ); + /** + * Adds new property to this entry. + * + * @since S60 V3.2 + * @param aProperty new property pointer + * @return KErrNone if addition succeeded, + * system wide error code otherwise. + */ + IMPORT_C TInt AddPropertyL( const CSPProperty& aProperty ); - /** - * Updates content of property in this entry. - * - * @since S60 V3.2 - * @param aPropertyName property name - * @param aValue new TInt value - * @return KErrNone if update succeeded. - */ - IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TInt aValue ); + /** + * Updates content of property in this entry. + * + * @since S60 V3.2 + * @param aPropertyName property name + * @param aValue new TInt value + * @return KErrNone if update succeeded. + */ + IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TInt aValue ); - /** - * Updates content of property in this entry. - * - * @since S60 V3.2 - * @param aPropertyName property name - * @param aValue new TDesC value - * @return KErrNone if update succeeded. - */ - IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, const TDesC& aValue ); + /** + * Updates content of property in this entry. + * + * @since S60 V3.2 + * @param aPropertyName property name + * @param aValue new TDesC value + * @return KErrNone if update succeeded. + */ + IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, const TDesC& aValue ); - /** - * Updates content of property in this entry. - * - * @since S60 V3.2 - * @param aPropertyName property name - * @param aValue new TOnOff value - * @return KErrNone if update succeeded. - */ - IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TOnOff aValue ); + /** + * Updates content of property in this entry. + * + * @since S60 V3.2 + * @param aPropertyName property name + * @param aValue new TOnOff value + * @return KErrNone if update succeeded. + */ + IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TOnOff aValue ); - /** - * Returns property of this entry by property name. - * - * @since S60 V3.2 - * @param aProperty On return, reference to requested property - * @param aPropertyName Name of requested property - * @return error code - */ - IMPORT_C TInt GetProperty( const CSPProperty*& aProperty, - TServicePropertyName aPropertyName ) const; + /** + * Returns property of this entry by property name. + * + * @since S60 V3.2 + * @param aProperty On return, reference to requested property + * @param aPropertyName Name of requested property + * @return error code + */ + IMPORT_C TInt GetProperty( const CSPProperty*& aProperty, + TServicePropertyName aPropertyName ) const; - /** - * Returns property of this entry by property index. - * - * @since S60 V3.2 - * @param aProperty On return, reference to requested property - * @param aIndex index of requested property - * @return error code - */ - IMPORT_C TInt GetProperty( const CSPProperty*& aProperty, - TInt aIndex ) const; + /** + * Returns property of this entry by property index. + * + * @since S60 V3.2 + * @param aProperty On return, reference to requested property + * @param aIndex index of requested property + * @return error code + */ + IMPORT_C TInt GetProperty( const CSPProperty*& aProperty, + TInt aIndex ) const; - /** - * Deletes property from this entry by index. - * - * @since S60 V3.2 - * @param aIndex index of requested property - * @return error code - */ - IMPORT_C TInt DeleteProperty( TInt aIndex ); + /** + * Deletes property from this entry by index. + * + * @since S60 V3.2 + * @param aIndex index of requested property + * @return error code + */ + IMPORT_C TInt DeleteProperty( TInt aIndex ); - /** - * Deletes property from this entry by property name. - * - * @since S60 V3.2 - * @param aProperty property name - * @return error code - */ - IMPORT_C TInt DeleteProperty( TServicePropertyName aProperty ); + /** + * Deletes property from this entry by property name. + * + * @since S60 V3.2 + * @param aProperty property name + * @return error code + */ + IMPORT_C TInt DeleteProperty( TServicePropertyName aProperty ); - /** - * Returns all properties of this entry. - * - * @since S60 V3.2 - * @return Reference to array of properties - */ - IMPORT_C const RPropertyArray& GetAllProperties() const; + /** + * Returns all properties of this entry. + * + * @since S60 V3.2 + * @return Reference to array of properties + */ + IMPORT_C const RPropertyArray& GetAllProperties() const; - /** - * Returns count of properties in this entry - * - * @since S60 V3.2 - * @return Count of properties - */ - IMPORT_C TInt PropertyCount() const; - - /** - * reset service entry - * - * @since S60 V3.2 - * @return Count of properties - */ - IMPORT_C void Reset(); - + /** + * Returns count of properties in this entry + * + * @since S60 V3.2 + * @return Count of properties + */ + IMPORT_C TInt PropertyCount() const; + + /** + * reset service entry + * + * @since S60 V3.2 + * @return Count of properties + */ + IMPORT_C void Reset(); + - private: + private: - /** - * C++ default constructor. - */ - CSPEntry(); + /** + * C++ default constructor. + */ + CSPEntry(); - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); - /** - * Search index of requested property in iPropertyArray - * - * @since S60 ?S60_version - * @param aProperty - * @return Index of property or KErrNotFound - */ - TInt SearchProperty( TServicePropertyName aProperty ) const; + /** + * Search index of requested property in iPropertyArray + * + * @since S60 ?S60_version + * @param aProperty + * @return Index of property or KErrNotFound + */ + TInt SearchProperty( TServicePropertyName aProperty ) const; - private: // data + private: // data - /** - * Id of service settings entry ( unique ) - */ - TServiceId iServiceId; + /** + * Id of service settings entry ( unique ) + */ + TServiceId iServiceId; - /** - * Name of settings entry ( unique ) - * Own. - */ - RBuf iServiceName; + /** + * Name of settings entry ( unique ) + * Own. + */ + RBuf iServiceName; - /** - * Service settings properties owned by this entry - * Own. - */ - RPropertyArray iPropertyArray; + /** + * Service settings properties owned by this entry + * Own. + */ + RPropertyArray iPropertyArray; }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/service_provider_settings_api/inc/spnotifychange.h --- a/phonesrv_plat/service_provider_settings_api/inc/spnotifychange.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/service_provider_settings_api/inc/spnotifychange.h Wed Sep 01 12:15:03 2010 +0100 @@ -36,78 +36,78 @@ * @since S60 3.2 */ NONSHARABLE_CLASS( CSPNotifyChange ): public CActive - { - public: // Constructor and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSPNotifyChange* NewL( MSPNotifyChangeObserver& aObserver ); + { + public: // Constructor and destructor + + /** + * Two-phased constructor. + */ + IMPORT_C static CSPNotifyChange* NewL( MSPNotifyChangeObserver& aObserver ); - /** - * Destructors. - */ - IMPORT_C virtual ~CSPNotifyChange(); + /** + * Destructors. + */ + IMPORT_C virtual ~CSPNotifyChange(); - public: - /** - * Issue notify service change rquest. - * - * @since S60 V3.2 - * @param aServiceIds The service ID array of monitored service entries - */ - IMPORT_C void NotifyChangeL( const RIdArray& aServiceIds ); + public: + /** + * Issue notify service change rquest. + * + * @since S60 V3.2 + * @param aServiceIds The service ID array of monitored service entries + */ + IMPORT_C void NotifyChangeL( const RIdArray& aServiceIds ); - /** - * Cancel notify change. - * - * @since S60 V3.2 - */ - IMPORT_C void NotifyChangeCancel(); + /** + * Cancel notify change. + * + * @since S60 V3.2 + */ + IMPORT_C void NotifyChangeCancel(); - protected: // from CActive + protected: // from CActive - void DoCancel(); + void DoCancel(); - void RunL(); - - TInt RunError( TInt aError ); + void RunL(); + + TInt RunError( TInt aError ); - void Subscribe(); - private: + void Subscribe(); + private: - /** - * C++ default constructor. - */ - CSPNotifyChange( MSPNotifyChangeObserver& aObserver ); + /** + * C++ default constructor. + */ + CSPNotifyChange( MSPNotifyChangeObserver& aObserver ); - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); - private: + private: - /** - * Publish & Subscribe connection - */ - RProperty iProperty; + /** + * Publish & Subscribe connection + */ + RProperty iProperty; - /** - * Observer object - */ - MSPNotifyChangeObserver& iObserver; - - /** - * Id array - */ - RIdArray iIdArray; - - /** - * Contains buffered P&S data - */ - CSpsBufferedPublisher* iData; - }; + /** + * Observer object + */ + MSPNotifyChangeObserver& iObserver; + + /** + * Id array + */ + RIdArray iIdArray; + + /** + * Contains buffered P&S data + */ + CSpsBufferedPublisher* iData; + }; #endif // CSPNOTIFYCHANGE_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/service_provider_settings_api/inc/spproperty.h --- a/phonesrv_plat/service_provider_settings_api/inc/spproperty.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/service_provider_settings_api/inc/spproperty.h Wed Sep 01 12:15:03 2010 +0100 @@ -34,217 +34,217 @@ NONSHARABLE_CLASS( CSPProperty ): public CBase { - public: // Constructor and destructor + public: // Constructor and destructor - /** - * Two-phased constructor. - */ - IMPORT_C static CSPProperty* NewL(); + /** + * Two-phased constructor. + */ + IMPORT_C static CSPProperty* NewL(); - /** - * Two-phased constructor. - */ - IMPORT_C static CSPProperty* NewLC(); + /** + * Two-phased constructor. + */ + IMPORT_C static CSPProperty* NewLC(); - /** - * Destructors. - */ - IMPORT_C virtual ~CSPProperty(); + /** + * Destructors. + */ + IMPORT_C virtual ~CSPProperty(); - public: // member functions - /** - * Returns the name of this property - * - * @since S60 V3.2 - * @return Name of property - */ - IMPORT_C TServicePropertyName GetName() const; + public: // member functions + /** + * Returns the name of this property + * + * @since S60 V3.2 + * @return Name of property + */ + IMPORT_C TServicePropertyName GetName() const; - /** - * Sets the name for this property - * - * @since S60 V3.2 - * @param aPropertyname new property name - */ - IMPORT_C TInt SetName( TServicePropertyName aPropertyname ); + /** + * Sets the name for this property + * + * @since S60 V3.2 + * @param aPropertyname new property name + */ + IMPORT_C TInt SetName( TServicePropertyName aPropertyname ); - /** - * Returns the type of this property - * - * @since S60 V3.2 - * @return Type of property - */ - IMPORT_C TSPItemType GetPropertyType() const; + /** + * Returns the type of this property + * + * @since S60 V3.2 + * @return Type of property + */ + IMPORT_C TSPItemType GetPropertyType() const; - /** - * Sets the type for this property - * - * @since S60 V3.2 - * @param aPropertyType property type - */ - TInt SetPropertyType( TSPItemType aPropertyType ); + /** + * Sets the type for this property + * + * @since S60 V3.2 + * @param aPropertyType property type + */ + TInt SetPropertyType( TSPItemType aPropertyType ); - /** - * Returns the datatype of this property - * No imported, set automatically. - * - * @since S60 V3.2 - * @return Datatype of property - */ - IMPORT_C TPropertyDataType GetDataType() const; + /** + * Returns the datatype of this property + * No imported, set automatically. + * + * @since S60 V3.2 + * @return Datatype of property + */ + IMPORT_C TPropertyDataType GetDataType() const; - /** - * Sets the datatype of this property - * - * @since S60 V3.2 - * @param aDataType new data type - */ - void SetDataType( TPropertyDataType aDataType ); + /** + * Sets the datatype of this property + * + * @since S60 V3.2 + * @param aDataType new data type + */ + void SetDataType( TPropertyDataType aDataType ); - /** - * Returns value of property - * - * @since S60 V3.2 - * @param aValue on return, TInt value - * @return Error code - */ - IMPORT_C TInt GetValue( TInt& aValue ) const; + /** + * Returns value of property + * + * @since S60 V3.2 + * @param aValue on return, TInt value + * @return Error code + */ + IMPORT_C TInt GetValue( TInt& aValue ) const; - /** - * Sets value of property. Value must match to datatype. - * - * @since S60 V3.2 - * @param aValue new TInt value to be set - * @return Error code - */ - IMPORT_C TInt SetValue( TInt aValue ); + /** + * Sets value of property. Value must match to datatype. + * + * @since S60 V3.2 + * @param aValue new TInt value to be set + * @return Error code + */ + IMPORT_C TInt SetValue( TInt aValue ); - /** - * Returns value of property - * - * @since S60 V3.2 - * @param aValue on return, descriptor value - * @return Error code - */ - IMPORT_C TInt GetValue( TDes& aValue ) const; + /** + * Returns value of property + * + * @since S60 V3.2 + * @param aValue on return, descriptor value + * @return Error code + */ + IMPORT_C TInt GetValue( TDes& aValue ) const; - /** - * Sets the value of property. Value must match to datatype. - * - * @since S60 V3.2 - * @param aValue new descriptor - * @return Error code - */ - IMPORT_C TInt SetValue( const TDesC& aValue ); + /** + * Sets the value of property. Value must match to datatype. + * + * @since S60 V3.2 + * @param aValue new descriptor + * @return Error code + */ + IMPORT_C TInt SetValue( const TDesC& aValue ); - /** - * Returns value of property - * - * @since S60 V3.2 - * @param aValue on return, On/Off value - * @return Error code - */ - IMPORT_C TInt GetValue( TOnOff& aValue ) const; + /** + * Returns value of property + * + * @since S60 V3.2 + * @param aValue on return, On/Off value + * @return Error code + */ + IMPORT_C TInt GetValue( TOnOff& aValue ) const; - /** - * Sets the value of property. Value must match to datatype. - * - * @since S60 V3.2 - * @param aValue new On/Off value - * @return Error code - */ - IMPORT_C TInt SetValue( TOnOff aValue ); + /** + * Sets the value of property. Value must match to datatype. + * + * @since S60 V3.2 + * @param aValue new On/Off value + * @return Error code + */ + IMPORT_C TInt SetValue( TOnOff aValue ); - /** - * Sets the value of this property without datatype check - * - * @since S60 V3.2 - * @param aValue new value - * @return Error code - */ - TInt SetValueNoDataTypeCheck( const TDesC& aValue ); + /** + * Sets the value of this property without datatype check + * + * @since S60 V3.2 + * @param aValue new value + * @return Error code + */ + TInt SetValueNoDataTypeCheck( const TDesC& aValue ); - /** - * Returns datatype of given property - * - * @since S60 V3.2 - * @param aProperty property name - * @return Datatype of given property - */ - IMPORT_C static TPropertyDataType DataType( TServicePropertyName aProperty ); - - /** - * Returns property type of given property - * - * @since S60 V3.2 - * @param aProperty property name - * @return property type of given property - */ - IMPORT_C static TSPItemType PropertyType( TServicePropertyName aProperty ); + /** + * Returns datatype of given property + * + * @since S60 V3.2 + * @param aProperty property name + * @return Datatype of given property + */ + IMPORT_C static TPropertyDataType DataType( TServicePropertyName aProperty ); + + /** + * Returns property type of given property + * + * @since S60 V3.2 + * @param aProperty property name + * @return property type of given property + */ + IMPORT_C static TSPItemType PropertyType( TServicePropertyName aProperty ); - /** - * Copies data from source property // to be removed? - * - * @since S60 V3.2 - * @param aSource source property - */ - IMPORT_C void CopyL( const CSPProperty& aSource ); + /** + * Copies data from source property // to be removed? + * + * @since S60 V3.2 + * @param aSource source property + */ + IMPORT_C void CopyL( const CSPProperty& aSource ); - /** - * Compares data of this property to another. - * - * @since S60 V3.2 - * @param aProperty property to be compared - * @return ETrue if properties have same data - */ - IMPORT_C TBool operator==( - const CSPProperty& aProperty ) const; + /** + * Compares data of this property to another. + * + * @since S60 V3.2 + * @param aProperty property to be compared + * @return ETrue if properties have same data + */ + IMPORT_C TBool operator==( + const CSPProperty& aProperty ) const; - private: + private: - /** - * C++ default constructor. - */ - CSPProperty(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); + /** + * C++ default constructor. + */ + CSPProperty(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); - /** - * Sets default value of property if defined - * - * @since S60 V3.2 - * @param aProperty property name - * @return An error code - */ - TInt SetDefaultValue( TServicePropertyName aProperty ); + /** + * Sets default value of property if defined + * + * @since S60 V3.2 + * @param aProperty property name + * @return An error code + */ + TInt SetDefaultValue( TServicePropertyName aProperty ); - private: // data + private: // data - /** - * Descriptor of property value - * Own. - */ - RBuf iPropertyValue; + /** + * Descriptor of property value + * Own. + */ + RBuf iPropertyValue; - /** - * Name of property - */ - TServicePropertyName iPropertyName; + /** + * Name of property + */ + TServicePropertyName iPropertyName; - /** - * Datatype of property - */ - TPropertyDataType iDataType; - - /** - * Property type - */ - TSPItemType iPropertyType; + /** + * Datatype of property + */ + TPropertyDataType iDataType; + + /** + * Property type + */ + TSPItemType iPropertyType; }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/service_provider_settings_api/inc/spsettings.h --- a/phonesrv_plat/service_provider_settings_api/inc/spsettings.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/service_provider_settings_api/inc/spsettings.h Wed Sep 01 12:15:03 2010 +0100 @@ -50,259 +50,259 @@ NONSHARABLE_CLASS( CSPSettings ): public CBase { - public: // Constructors and destructor + public: // Constructors and destructor - /** - * Two-phased constructor. - */ - IMPORT_C static CSPSettings* NewL(); + /** + * Two-phased constructor. + */ + IMPORT_C static CSPSettings* NewL(); - /** - * Two-phased constructor. - */ - IMPORT_C static CSPSettings* NewLC(); + /** + * Two-phased constructor. + */ + IMPORT_C static CSPSettings* NewLC(); - /** - * Destructors. - */ - IMPORT_C virtual ~CSPSettings(); + /** + * Destructors. + */ + IMPORT_C virtual ~CSPSettings(); - public: + public: - /** - * Stores new service provider settings entry, - * service Id is returned inside aEntry object - * - * @since S60 v3.2 - * @param aEntry New service provider settings entry, on return service Id is filled in - * @return error code - */ - IMPORT_C TInt AddEntryL( CSPEntry& aEntry ); + /** + * Stores new service provider settings entry, + * service Id is returned inside aEntry object + * + * @since S60 v3.2 + * @param aEntry New service provider settings entry, on return service Id is filled in + * @return error code + */ + IMPORT_C TInt AddEntryL( CSPEntry& aEntry ); - /** - * Search service provider settings entry by service ID. - * - * @since S60 v3.2 - * @param aServiceId Id of requested xSP settings entry - * @param aEntry on return, SP settings entry corresponding to aServiceId. - * @return error code, KErrNone if succeeded, otherwise system wide error code - */ - IMPORT_C TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry ); + /** + * Search service provider settings entry by service ID. + * + * @since S60 v3.2 + * @param aServiceId Id of requested xSP settings entry + * @param aEntry on return, SP settings entry corresponding to aServiceId. + * @return error code, KErrNone if succeeded, otherwise system wide error code + */ + IMPORT_C TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry ); - /** - * Updates service provider settings entry to settings storage. - * Service ID must be set to entry before update. - * - * @since S60 v3.2 - * @param aEntry Updated service provider settings entry - * @return error code, KErrNone if update succeeded, otherwise system wide error code - */ - IMPORT_C TInt UpdateEntryL( const CSPEntry& aEntry ); + /** + * Updates service provider settings entry to settings storage. + * Service ID must be set to entry before update. + * + * @since S60 v3.2 + * @param aEntry Updated service provider settings entry + * @return error code, KErrNone if update succeeded, otherwise system wide error code + */ + IMPORT_C TInt UpdateEntryL( const CSPEntry& aEntry ); - /** - * Deletes service provider settings entry from storage by service ID. - * - * @since S60 v3.2 - * @param aEntryId Id of settings entry which is going to be deleted - * @return error code, KErrNone if delete succeeded, otherwise system wide error code - */ - IMPORT_C TInt DeleteEntryL( TServiceId aServiceId ); + /** + * Deletes service provider settings entry from storage by service ID. + * + * @since S60 v3.2 + * @param aEntryId Id of settings entry which is going to be deleted + * @return error code, KErrNone if delete succeeded, otherwise system wide error code + */ + IMPORT_C TInt DeleteEntryL( TServiceId aServiceId ); - /** - * Search property of service provider settings entry from storage. - * - * @since S60 v3.2 - * @param aServiceId The service ID of requested service entry - * @param aPropertyName property name to be found - * @param aProperty on return, requested property - * @return error code, KErrNone if succeeded, otherwise system wide error code - */ - IMPORT_C TInt FindPropertyL( TServiceId aServiceId, - TServicePropertyName aPropertyName, - CSPProperty& aProperty ); + /** + * Search property of service provider settings entry from storage. + * + * @since S60 v3.2 + * @param aServiceId The service ID of requested service entry + * @param aPropertyName property name to be found + * @param aProperty on return, requested property + * @return error code, KErrNone if succeeded, otherwise system wide error code + */ + IMPORT_C TInt FindPropertyL( TServiceId aServiceId, + TServicePropertyName aPropertyName, + CSPProperty& aProperty ); - /** - * Add or update properties of service provider settings entry to storage. - * If property name exists, update property. If property doesn't exist, - * add property - * - * @since S60 v3.2 - * @param aServiceId The ID of updated service entry - * @param aPropertyArray new properties to be added or updated - * @return error code, KErrNone if update succeeded, otherwise system wide error code - */ - IMPORT_C TInt AddOrUpdatePropertiesL( TServiceId aServiceId, - const RPropertyArray& aPropertyArray ); + /** + * Add or update properties of service provider settings entry to storage. + * If property name exists, update property. If property doesn't exist, + * add property + * + * @since S60 v3.2 + * @param aServiceId The ID of updated service entry + * @param aPropertyArray new properties to be added or updated + * @return error code, KErrNone if update succeeded, otherwise system wide error code + */ + IMPORT_C TInt AddOrUpdatePropertiesL( TServiceId aServiceId, + const RPropertyArray& aPropertyArray ); - /** - * Add or update one property of service provider settings entry to storage. - * If property name exists, update property. If property doesn't exist, - * add property - * - * @since S60 v3.2 - * @param aServiceId The ID of updated service entry - * @param aProperty new property to be added or updated - * @return error code, KErrNone if update succeeded, otherwise system wide error code - */ - IMPORT_C TInt AddOrUpdatePropertyL( TServiceId aServiceId, - const CSPProperty& aProperty ); + /** + * Add or update one property of service provider settings entry to storage. + * If property name exists, update property. If property doesn't exist, + * add property + * + * @since S60 v3.2 + * @param aServiceId The ID of updated service entry + * @param aProperty new property to be added or updated + * @return error code, KErrNone if update succeeded, otherwise system wide error code + */ + IMPORT_C TInt AddOrUpdatePropertyL( TServiceId aServiceId, + const CSPProperty& aProperty ); - /** - * Return count of service provider settings entries in storage. - * - * @since S60 v3.2 - * @return Count of stored service provider settings. - */ - IMPORT_C TInt SettingsCountL(); + /** + * Return count of service provider settings entries in storage. + * + * @since S60 v3.2 + * @return Count of stored service provider settings. + */ + IMPORT_C TInt SettingsCountL(); - /** - * Search all service provider IDs from storage - * - * @since S60 v3.2 - * @param aServiceIds An array containing returned service IDs - * @return error code - */ - IMPORT_C TInt FindServiceIdsL( RIdArray& aServiceIds ); + /** + * Search all service provider IDs from storage + * + * @since S60 v3.2 + * @param aServiceIds An array containing returned service IDs + * @return error code + */ + IMPORT_C TInt FindServiceIdsL( RIdArray& aServiceIds ); - /** - * Search all service names from settings storage by given service IDs. - * Removes ID from array if it is not found from settings storage. - * - * @since S60 v3.2 - * @param aServiceIds An array of service IDs - * @param aServiceNames on return, array which saves found service names - * @return error code - */ - IMPORT_C TInt FindServiceNamesL( RIdArray& aServiceIds, - CDesCArray& aServiceNames ); + /** + * Search all service names from settings storage by given service IDs. + * Removes ID from array if it is not found from settings storage. + * + * @since S60 v3.2 + * @param aServiceIds An array of service IDs + * @param aServiceNames on return, array which saves found service names + * @return error code + */ + IMPORT_C TInt FindServiceNamesL( RIdArray& aServiceIds, + CDesCArray& aServiceNames ); - /** - * Search subservice properties of requested service provider settings entry by ID - * and subservice type - * - * @since S60 v3.2 - * @param aServiceId The ID of requested service entry - * @param aPropertyType property type of sub service - * @param aPropertyArray on return, array which saves found subservice properties - * @return error code - */ - IMPORT_C TInt FindSubServicePropertiesL( TServiceId aServiceId, - TSPItemType aPropertyType, - RPropertyArray& aPropertyArray ); + /** + * Search subservice properties of requested service provider settings entry by ID + * and subservice type + * + * @since S60 v3.2 + * @param aServiceId The ID of requested service entry + * @param aPropertyType property type of sub service + * @param aPropertyArray on return, array which saves found subservice properties + * @return error code + */ + IMPORT_C TInt FindSubServicePropertiesL( TServiceId aServiceId, + TSPItemType aPropertyType, + RPropertyArray& aPropertyArray ); - /** - * Deletes service properties by service ID and property name. - * - * @since S60 v3.2 - * @param aServiceId The service ID of requested service entry - * @param aNameArray name of properties to be deleted - * @return error code - */ - IMPORT_C TInt DeleteServicePropertiesL( TServiceId aServiceId, - const RPropertyNameArray& aNameArray ); - - /** - * Find service IDs with same properties - * - * @since S60 v3.2 - * @param aPropertyArray property array - * @param on return, service Ids with same properties - * @return error code - */ - IMPORT_C TInt FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray, - RIdArray& aServiceIds ); + /** + * Deletes service properties by service ID and property name. + * + * @since S60 v3.2 + * @param aServiceId The service ID of requested service entry + * @param aNameArray name of properties to be deleted + * @return error code + */ + IMPORT_C TInt DeleteServicePropertiesL( TServiceId aServiceId, + const RPropertyNameArray& aNameArray ); + + /** + * Find service IDs with same properties + * + * @since S60 v3.2 + * @param aPropertyArray property array + * @param on return, service Ids with same properties + * @return error code + */ + IMPORT_C TInt FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray, + RIdArray& aServiceIds ); - /** - * Get SIP VoIP software version. - * - * @since S60 v3.2 - * @return SIP VoIP software version - */ - IMPORT_C static const TDesC& GetSIPVoIPSWVersion(); - - /** - * Check feature is supported or not - * - * @since S60 v3.2 - * @return SIP VoIP software version - */ - IMPORT_C TBool IsFeatureSupported( TSPServiceFeature aFeature ); + /** + * Get SIP VoIP software version. + * + * @since S60 v3.2 + * @return SIP VoIP software version + */ + IMPORT_C static const TDesC& GetSIPVoIPSWVersion(); + + /** + * Check feature is supported or not + * + * @since S60 v3.2 + * @return SIP VoIP software version + */ + IMPORT_C TBool IsFeatureSupported( TSPServiceFeature aFeature ); - private: + private: - /** - * C++ default constructor. - */ - CSPSettings(); + /** + * C++ default constructor. + */ + CSPSettings(); - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Commit or rollback transaction - * @since S60 v3.2 - * @param aError error code of CenRep operation - * @param aServiceId changed service Id - * @return error code - */ - TInt CommitOrRollbackL( TInt aError, TServiceId aServiceId ); + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + /** + * Commit or rollback transaction + * @since S60 v3.2 + * @param aError error code of CenRep operation + * @param aServiceId changed service Id + * @return error code + */ + TInt CommitOrRollbackL( TInt aError, TServiceId aServiceId ); - /** - * Check is VoIP Service Id and then are Properties VoIP related - * - * @since S60 v3.2.3 - * @return KErrNotSupported if VoIP not supported and checking - * of Service Id and Properties gives true - */ - TInt CheckSupportedL( TServiceId aServiceId, const RPropertyNameArray& aNameArray ); - - /** - * Check is VoIP Service Id - * - * @since S60 v3.2.3 - * @return KErrNotSupported if VoIP not supported and checking - * of Service Id gives true - */ - TInt CheckSupportedL( TServiceId aServiceId ); + /** + * Check is VoIP Service Id and then are Properties VoIP related + * + * @since S60 v3.2.3 + * @return KErrNotSupported if VoIP not supported and checking + * of Service Id and Properties gives true + */ + TInt CheckSupportedL( TServiceId aServiceId, const RPropertyNameArray& aNameArray ); + + /** + * Check is VoIP Service Id + * + * @since S60 v3.2.3 + * @return KErrNotSupported if VoIP not supported and checking + * of Service Id gives true + */ + TInt CheckSupportedL( TServiceId aServiceId ); - /** - * Check is SP item type VoIP related - * - * @since S60 v3.2.3 - * @return KErrNotSupported if VoIP not supported and checking - * of SP item type gives true - */ - TInt CheckSupportedL( TSPItemType aPropertyType ); - - /** - * Check does an array have Properties VoIP related - * - * @since S60 v3.2.3 - * @return KErrNotSupported if VoIP not supported and checking - * of the array gives true - */ - TInt CheckSupportedL( const RPropertyArray& aPropertyArray ); + /** + * Check is SP item type VoIP related + * + * @since S60 v3.2.3 + * @return KErrNotSupported if VoIP not supported and checking + * of SP item type gives true + */ + TInt CheckSupportedL( TSPItemType aPropertyType ); + + /** + * Check does an array have Properties VoIP related + * + * @since S60 v3.2.3 + * @return KErrNotSupported if VoIP not supported and checking + * of the array gives true + */ + TInt CheckSupportedL( const RPropertyArray& aPropertyArray ); - private: // data + private: // data - /** - * Settings engine - * Own. - */ - CSPSettingsEngine* iSettingsEngine; + /** + * Settings engine + * Own. + */ + CSPSettingsEngine* iSettingsEngine; - /** - * Feature manager support VoIP - * Own. - */ - TBool iFeatureManagerSupportVoIP; + /** + * Feature manager support VoIP + * Own. + */ + TBool iFeatureManagerSupportVoIP; /** * Writing settings allowed */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/service_provider_settings_api/inc/spsettingsvoiputils.h --- a/phonesrv_plat/service_provider_settings_api/inc/spsettingsvoiputils.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/service_provider_settings_api/inc/spsettingsvoiputils.h Wed Sep 01 12:15:03 2010 +0100 @@ -33,51 +33,51 @@ */ NONSHARABLE_CLASS( CSPSettingsVoIPUtils ): public CBase { - public: // Constructors and destructor + public: // Constructors and destructor - /** - * Two-phased constructor. - */ - IMPORT_C static CSPSettingsVoIPUtils* NewL(); + /** + * Two-phased constructor. + */ + IMPORT_C static CSPSettingsVoIPUtils* NewL(); - /** - * Two-phased constructor. - */ - IMPORT_C static CSPSettingsVoIPUtils* NewLC(); + /** + * Two-phased constructor. + */ + IMPORT_C static CSPSettingsVoIPUtils* NewLC(); - /** - * Destructors. - */ - IMPORT_C virtual ~CSPSettingsVoIPUtils(); + /** + * Destructors. + */ + IMPORT_C virtual ~CSPSettingsVoIPUtils(); - public: + public: - /** - * Checks is there any VoIP profiles available in service table. - * - * @since S60 v3.2 - * @return ETrue if there is at least one VoIP profile. - */ - IMPORT_C TBool VoIPProfilesExistL() const; + /** + * Checks is there any VoIP profiles available in service table. + * + * @since S60 v3.2 + * @return ETrue if there is at least one VoIP profile. + */ + IMPORT_C TBool VoIPProfilesExistL() const; - /** - * Checks is VoIP supported. - * - * @since S60 v3.2 - * @return ETrue if Common Voip and Dynamic VoIP are ON -. */ - IMPORT_C TBool IsVoIPSupported() const; + /** + * Checks is VoIP supported. + * + * @since S60 v3.2 + * @return ETrue if Common Voip and Dynamic VoIP are ON +. */ + IMPORT_C TBool IsVoIPSupported() const; - /** - * Checks the preferred telephony - * - * @since S60 v3.2 - * @return ETrue if Common Voip (Feature Manager), - * Dynamic VoIP (Telephony settings) and - * Preferred telephony (Rich call settings) are ON and - * there is at least one SIP-VoIP profile stored - */ - IMPORT_C TBool IsPreferredTelephonyVoIP() const; + /** + * Checks the preferred telephony + * + * @since S60 v3.2 + * @return ETrue if Common Voip (Feature Manager), + * Dynamic VoIP (Telephony settings) and + * Preferred telephony (Rich call settings) are ON and + * there is at least one SIP-VoIP profile stored + */ + IMPORT_C TBool IsPreferredTelephonyVoIP() const; /** * Get the preferred service id @@ -86,41 +86,41 @@ * @return KErrNone if preferred service found. */ IMPORT_C TInt GetPreferredService( TUint& aServiceId ) const; - - private: + + private: - /** - * C++ default constructor. - */ - CSPSettingsVoIPUtils(); + /** + * C++ default constructor. + */ + CSPSettingsVoIPUtils(); - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); - /** - * Checks is there any VoIP profiles available in service table. - */ - TBool IsVoIPSupportedL() const; + /** + * Checks is there any VoIP profiles available in service table. + */ + TBool IsVoIPSupportedL() const; - /** - * Checks the preferred telephony. - */ - TBool IsPreferredTelephonyVoIPL() const; + /** + * Checks the preferred telephony. + */ + TBool IsPreferredTelephonyVoIPL() const; /** * Gets the preferred service id. */ void DoGetPreferredServiceL( TUint& aServiceId ) const; - private: // data + private: // data - /** - * Settings engine - * Own. - */ - CSPSettingsEngine* iSettingsEngine; + /** + * Settings engine + * Own. + */ + CSPSettingsEngine* iSettingsEngine; }; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/ss_settings_api/group/bld.inf --- a/phonesrv_plat/ss_settings_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/ss_settings_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,9 +24,7 @@ PRJ_EXPORTS -../inc/msssettingsrefreshobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(msssettingsrefreshobserver.h) -../inc/msssettingsobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(msssettingsobserver.h) -../inc/rcustomerserviceprofilecache.h MW_LAYER_PLATFORM_EXPORT_PATH(rcustomerserviceprofilecache.h) -../inc/rsssettings.h MW_LAYER_PLATFORM_EXPORT_PATH(rsssettings.h) -../inc/sssettingswrappertypes.h MW_LAYER_PLATFORM_EXPORT_PATH(sssettingswrappertypes.h) -../inc/sssettingswrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(sssettingswrapper.h) \ No newline at end of file +../inc/MSSSettingsRefreshObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(MSSSettingsRefreshObserver.h) +../inc/MSSSettingsObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(MSSSettingsObserver.h) +../inc/RCustomerServiceProfileCache.h MW_LAYER_PLATFORM_EXPORT_PATH(RCustomerServiceProfileCache.h) +../inc/RSSSettings.h MW_LAYER_PLATFORM_EXPORT_PATH(RSSSettings.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/ss_settings_api/inc/MSSSettingsObserver.h --- a/phonesrv_plat/ss_settings_api/inc/MSSSettingsObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/ss_settings_api/inc/MSSSettingsObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define MSSSETTINGSOBSERVER_H // INCLUDES -#include +#include // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/ss_settings_api/inc/MSSSettingsRefreshObserver.h --- a/phonesrv_plat/ss_settings_api/inc/MSSSettingsRefreshObserver.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/ss_settings_api/inc/MSSSettingsRefreshObserver.h Wed Sep 01 12:15:03 2010 +0100 @@ -24,7 +24,7 @@ // INCLUDES #include #include -#include +#include // DATA TYPES diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/ss_settings_api/inc/RSSSettings.h --- a/phonesrv_plat/ss_settings_api/inc/RSSSettings.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/ss_settings_api/inc/RSSSettings.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ // INCLUDES #include -#include +#include // DATA TYPES @@ -193,7 +193,7 @@ * @param aObserver observer. * @return error code. KErrNone: observer is added * KErrAlreadyExists: observer is already added - * KErrNotReady: Possible when BT SAP is on. + * KErrNotReady: Possible when BT SAP is on. * KErrNotSupported: Possible with ALS. * other: observer not registered */ @@ -301,8 +301,8 @@ */ TInt IsALSSupported( TInt aPpAlsValue, TInt aSimAlsValue, TBool aAlsCspSupport, TInt aAlsCspError ) const; - - // Gets ALS setting value. + + // Gets ALS setting value. TInt GetALSSettingValue( TInt& aValue, const TInt aSimState ); // Prohibit copy constructor if not deriving from CBase. diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/ss_settings_api/inc/sssettingswrapper.h --- a/phonesrv_plat/ss_settings_api/inc/sssettingswrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +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 SSSETTINGSWRAPPER_H -#define SSSETTINGSWRAPPER_H - - -#include -#include - -class RSSSettings; -class SsSettingsWrapperPrivate; - -#ifdef BUILD_SSSETTINGSWRAPPER -#define SSSETTINGSWRAPPER_EXPORT Q_DECL_EXPORT -#else -#define SSSETTINGSWRAPPER_EXPORT Q_DECL_IMPORT -#endif - -class SSSETTINGSWRAPPER_EXPORT SsSettingsWrapper: public QObject -{ - Q_OBJECT - -public: - explicit SsSettingsWrapper(QObject *parent = NULL); - virtual ~SsSettingsWrapper(); - -public: // Functions: - /** - Getter for supplementary service setting values. - @param setting Enumeration of which setting is get. - @param value Setting value. - @return Zero if no error occurred. - */ - int get(SsSettingsWrapperSettings setting, int &value); - - /** - Setter for supplementary service setting values. - @param setting Enumeration of which setting is set. - @param value Setting value. - @return Zero if no error occurred. - */ - int set(SsSettingsWrapperSettings setting, int value ); - -signals: - /** - Signals when supplementary setting value changes. - @param setting Enumeration of which setting is changed. - @param value Setting value. - */ - void phoneSettingChanged( - SsSettingsWrapperSettings setting, - int newValue ); - -private: // Data: - // Own - RSSSettings *m_ssSettings; - - // Wrapper - // Own - SsSettingsWrapperPrivate* m_Priv; - friend class SsSettingsWrapperPrivate; - -}; -#endif // SSSETTINGSWRAPPER - diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/ss_settings_api/inc/sssettingswrappertypes.h --- a/phonesrv_plat/ss_settings_api/inc/sssettingswrappertypes.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +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 SSSETTINGSWRAPPERTYPES_H_ -#define SSSETTINGSWRAPPERTYPES_H_ - - -/** -* It enumerates all SSSettings settings. -* -* Cug - closed user group setting, -* for some values see TSSSettingsCugValue. -* Clir - default setting for calling line identification -* restriction, see SsSettingsWrapperClirValue. -* Als - selected line, see SsSettingsWrapperAlsValue. -* AlsBlocking - line selection blocking, see SsSettingsWrapperAlsBlockingValue. -* DefaultCug - value for cug default. -*/ -typedef enum { - Cug = 0, // == ESSSettingsCug - Clir = 1, // == ESSSettingsClir - Als = 2, // == ESSSettingsAls - AlsBlocking = 3, // == ESSSettingsAlsBlocking - DefaultCug = 4 // == ESSSettingsCugDefault - } SsSettingsWrapperSettings; - -/** -* Translation table for TSSSettingsAlsValue -* It enumerates all values for ALS. -* -* AlsNotSupported - ALS not supported, always primary line. -* AlsPrimary - ALS supported, primary line selected. -* AlsAlternate - ALS supported, alternate line selected. -*/ -typedef enum { - AlsNotSupported = 0, // == TSSSettingsAlsValue::ESSSettingsAlsNotSupported - AlsPrimary = 1, // == TSSSettingsAlsValue::ESSSettingsAlsPrimary - AlsAlternate = 2 // == TSSSettingsAlsValue::ESSSettingsAlsAlternate - } SsSettingsWrapperAlsValue; - -/** -* Translation table for TSSSettingsAlsBlockingValue -* It enumerates all values for ALS blocking. -* -* AlsBlockingNotSupported - ALS blocking not supported. -* AlsBlockingOff - ALS blocking off. -* AlsBlockingOn - ALS blocking on. -*/ -typedef enum { - AlsBlockingNotSupported = 0, // == ESSSettingsAlsBlockingNotSupported, - AlsBlockingOff, // == ESSSettingsAlsBlockingOff - AlsBlockingOn // == ESSSettingsAlsBlockingOn - } SsSettingsWrapperAlsBlockingValue; - -/** -* It enumerates all values for CLIR. -* -* ClirNetworkDefault - use network default -* ClirExplicitInvoke - by default, invoke CLIR -* ClirExplicitSuppress - by default, suppress CLIR -*/ -typedef enum { - ClirNetworkDefault, // == ESSSettingsClirNetworkDefault - ClirExplicitInvoke, // == ESSSettingsClirExplicitInvoke - ClirExplicitSuppress // == ESSSettingsClirExplicitSuppress - } SsSettingsWrapperClirValue; - -#endif /* SSSETTINGSWRAPPERTYPES_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/group/bld.inf --- a/phonesrv_plat/string_parser_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,19 +24,19 @@ PRJ_EXPORTS -../inc/phonegsmparser.h MW_LAYER_PLATFORM_EXPORT_PATH(phonegsmparser.h) -../inc/cphonegsmphonenumberhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmphonenumberhandler.h) -../inc/cphonegsmparserresult.inl MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmparserresult.inl) -../inc/cphonegsmhandlercontainer.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmhandlercontainer.h) -../inc/cphonegsmparserresult.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmparserresult.h) -../inc/cphonegsmhandlerbase.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmhandlerbase.h) -../inc/cphonegsmsscallhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmsscallhandler.h) -../inc/cphonegsmmischandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmmischandler.h) -../inc/cphonegsmparserbase.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmparserbase.h) -../inc/cphonegsmmanufacturerhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmmanufacturerhandler.h) -../inc/cphonegsmsimcontrolhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmsimcontrolhandler.h) -../inc/cphonegsmpcnprocedurehandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmpcnprocedurehandler.h) -../inc/cphonegsmsshandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmsshandler.h) -../inc/cphonegsmoptioncontainerbase.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmoptioncontainerbase.h) -../inc/cphonegsmemergencynumberhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonegsmemergencynumberhandler.h) -../inc/cphonevoipnumberhandler.h MW_LAYER_PLATFORM_EXPORT_PATH(cphonevoipnumberhandler.h) \ No newline at end of file +../inc/PhoneGsmParser.h MW_LAYER_PLATFORM_EXPORT_PATH(PhoneGsmParser.h) +../inc/CPhoneGsmPhoneNumberHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmPhoneNumberHandler.h) +../inc/CPhoneGsmParserResult.inl MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmParserResult.inl) +../inc/CPhoneGsmHandlerContainer.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmHandlerContainer.h) +../inc/CPhoneGsmParserResult.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmParserResult.h) +../inc/CPhoneGsmHandlerBase.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmHandlerBase.h) +../inc/CPhoneGsmSsCallHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmSsCallHandler.h) +../inc/CPhoneGsmMiscHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmMiscHandler.h) +../inc/CPhoneGsmParserBase.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmParserBase.h) +../inc/CPhoneGsmManufacturerHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmManufacturerHandler.h) +../inc/CPhoneGsmSimControlHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmSimControlHandler.h) +../inc/CPhoneGsmPcnProcedureHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmPcnProcedureHandler.h) +../inc/CPhoneGsmSsHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmSsHandler.h) +../inc/CPhoneGsmOptionContainerBase.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmOptionContainerBase.h) +../inc/CPhoneGsmEmergencyNumberHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneGsmEmergencyNumberHandler.h) +../inc/CPhoneVoipNumberHandler.h MW_LAYER_PLATFORM_EXPORT_PATH(CPhoneVoipNumberHandler.h) \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmEmergencyNumberHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmEmergencyNumberHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmEmergencyNumberHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMEMERGENCYNUMBERHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmHandlerContainer.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmHandlerContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmHandlerContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmManufacturerHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmManufacturerHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmManufacturerHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMMANUFACTURERHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION @@ -45,20 +45,25 @@ * EBadPin2Unblock - bad PIN2 unblock request * EActivateRfsNormal - RFS activation * EActivateRfsDeep - RFS activation, deep version + * EActivateWarranty - Warranty application activation * EShowBtAddress - BT address display * EResetWallet - Wallet reset + * ELifeTimer - Life timer * EBTLoopback - BT RF loopback activation/deactivation * EBTDebugMode - BT debug mode activation */ enum { + EShowVersion, EBadPinChange, EBadPin2Change, EBadPinUnblock, EBadPin2Unblock, EActivateRfsNormal, EActivateRfsDeep, + EActivateWarranty, EShowBtAddress, + ELifeTimer, EBTLoopback, EShowWlanMac, EBTDebugMode diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmMiscHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmMiscHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmMiscHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMMISCHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION @@ -36,6 +36,11 @@ public: // New functions /** + * Process IMEI display. + */ + virtual void ProcessShowIMEIL() = 0; + + /** * Process USSD request. * * @param aString It is string to be sent. diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmParserBase.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmParserBase.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmParserBase.h Wed Sep 01 12:15:03 2010 +0100 @@ -70,7 +70,7 @@ const TUint32 KPhoneGsmUidDialPhoneNumber = 3; /** -* Misc GSM required strings, most notably USSD. +* Misc GSM required strings, most notably USSD and IMEI. */ const TUint32 KPhoneGsmUidMisc = 4; @@ -104,6 +104,8 @@ */ const TUint32 KPhoneUidUnstructuredService = PHONE_MAKE_UID( KPhoneGsmUidMisc, 0 ); +const TUint32 KPhoneUidIMEI = + PHONE_MAKE_UID( KPhoneGsmUidMisc, 1 ); // FORWARD DECLARATIONS class CPhoneGsmParserResult; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmParserResult.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmParserResult.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmParserResult.h Wed Sep 01 12:15:03 2010 +0100 @@ -135,7 +135,7 @@ }; -#include "cphonegsmparserresult.inl" +#include "CPhoneGsmParserResult.inl" #endif // CPHONEGSMPARSERRESULT_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmPcnProcedureHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmPcnProcedureHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmPcnProcedureHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMPCNPROCEDUREHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmPhoneNumberHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmPhoneNumberHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmPhoneNumberHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMPHONENUMBERHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmSimControlHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmSimControlHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmSimControlHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMSIMCONTROLHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmSsCallHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmSsCallHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmSsCallHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMSSCALLHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneGsmSsHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmSsHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmSsHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMSSHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // FORWARD DECLARATIONS class CPhoneGsmParserResult; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/string_parser_api/inc/CPhoneVoipNumberHandler.h --- a/phonesrv_plat/string_parser_api/inc/CPhoneVoipNumberHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/string_parser_api/inc/CPhoneVoipNumberHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEVOIPNUMBERHANDLER_H // INCLUDES -#include "cphonegsmhandlerbase.h" +#include "CPhoneGsmHandlerBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/telephony_mediator_api/inc/callremotepartyinformation.h --- a/phonesrv_plat/telephony_mediator_api/inc/callremotepartyinformation.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/telephony_mediator_api/inc/callremotepartyinformation.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CALLREMOTEPARTYINFORMATION_H #include -#include +#include class RWriteStream; diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/telephony_network_information_api/group/bld.inf --- a/phonesrv_plat/telephony_network_information_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/telephony_network_information_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -24,4 +24,4 @@ PRJ_EXPORTS -../inc/networkhandlingdomainpskeys.h MW_LAYER_PLATFORM_EXPORT_PATH(networkhandlingdomainpskeys.h) +../inc/NetworkHandlingDomainPSKeys.h MW_LAYER_PLATFORM_EXPORT_PATH(NetworkHandlingDomainPSKeys.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/telephony_network_information_api/inc/NetworkHandlingDomainPSKeys.h --- a/phonesrv_plat/telephony_network_information_api/inc/NetworkHandlingDomainPSKeys.h Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/telephony_network_information_api/inc/NetworkHandlingDomainPSKeys.h Wed Sep 01 12:15:03 2010 +0100 @@ -33,9 +33,9 @@ enum KNWZoneStatus { - ENWNone, - ENWCityZone, - ENWHomeZone + ENWNone, + ENWCityZone, + ENWHomeZone }; /** diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/group/bld.inf --- a/phonesrv_plat/voice_mailbox_number_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/voice_mailbox_number_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* 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" @@ -10,11 +10,13 @@ * Nokia Corporation - initial contribution. * * Contributors: - * -* Description: +* +* Description: File that exports the files belonging to +: Voice Mailbox Number API * */ + #include PRJ_PLATFORMS @@ -22,7 +24,4 @@ PRJ_EXPORTS -../inc/cvoicemailbox.h MW_LAYER_PLATFORM_EXPORT_PATH(cvoicemailbox.h) -../inc/voicemailboxdefs.h MW_LAYER_PLATFORM_EXPORT_PATH(voicemailboxdefs.h) -../inc/mvoicemailboxobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mvoicemailboxobserver.h) -../inc/cvoicemailboxentry.h MW_LAYER_PLATFORM_EXPORT_PATH(cvoicemailboxentry.h) +../inc/vmnumber.h MW_LAYER_PLATFORM_EXPORT_PATH(vmnumber.h) diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailbox.h --- a/phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailbox.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,360 +0,0 @@ -/* -* Copyright (c) 2009-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: Interface for fetching/saving the vmbx entries. -* Also notify on a number change is supported. -* Interface : External, CVoiceMailbox -* -*/ - -#ifndef C_VOICEMAILBOX_H -#define C_VOICEMAILBOX_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class MVoiceMailboxObserver; -class CVoiceMailboxImpl; -class CVoiceMailboxEntry; - -/** - * Parameter package for Voice Mailbox API operations. - * - * @lib vmbxengine.lib - */ -class TVoiceMailboxParams - { -public: - /** - * Version of parameter package. - */ - IMPORT_C TInt Version(); - - /** - * Default constructor. - */ - IMPORT_C TVoiceMailboxParams(); - - /** - * Constructor for CVoiceMailboxEntry - */ - IMPORT_C TVoiceMailboxParams( const CVoiceMailboxEntry& aEntry ); - -public: - - /** - * Mailbox type. - */ - TVmbxType iType; - - /** - * Mailbox service id. - */ - TServiceId iServiceId; - - /** - * Mailbox line type. - * Initialized to EVmbxAlsLineDefault. - */ - TVmbxAlsLineType iLineType; - -protected: - - /** - * TVoiceMailboxParams package version. - */ - TInt iVersion; - -}; - -/** - * CVoiceMailbox offers an interface for fetching and saving - * voice mailbox entries. - * The API offers also services for querying a new number or to - * change an existing one. - * - * @code - * - * In this example user selects type of a mailbox to use. Then number - * of selected mailbox is fetched. If number wasn't set, then user - * is queried to enter a number for the selected mailbox. - * - * // Creates instance of CVoiceMailbox - * CVoiceMailbox* voicemailbox = CVoiceMailbox::NewLC(); - * - * // Selected mailbox type - * TVoiceMailboxParams vmbxParams; - * - * //Launch type selection query - * TInt error = voicemailbox->QueryVmbxType( vmbxParams ); - * - * CVoiceMailboxEntry* vmbxEntry = NULL; - * - * if ( KErrNone == error ) - * { - * if ( KErrNone == - * voicemailbox->GetStoredEntry( vmbxParams, vmbxEntry ) ) - * { - * // Number retrieved succesfully, do appropriate tasks, e.g.: - * TPtrC ptrNumber( KNullDesC ); - * TInt numError = vmbxEntry->GetVmbxNumber( ptrNumber ); - * if ( KErrNone == numError && ptrNumber.Length() ) - * { - * // Do appropriate tasks, e.g dial a call. - * } - * } - * } - * else if ( KErrNotFound == error ) - * { - * // No number defined, query new entry from user - * error = voicemailbox->QueryNewEntry( vmbxParams, vmbxEntry ); - * if ( KErrNone == error ) - * { - * // Do appropriate tasks, e.g. save and dial a call. - * error = voicemailbox->SaveEntry( *vmbxEntry ); - * // For example get the number/address using - * // vmbxEntry->GetVmbxNumber() and then dial a call - * } - * // else: problem getting the new number/address, e.g. skip - * } - * - * else - * { - * // User cancelled or no supported mailboxes configured - * } - * - * delete vmbxEntry; // Entry ownership was transferred - * vmbxEntry = NULL; - * CleanupStack::PopAndDestroy( voicemailbox ); - * voicemailbox = NULL; - * @endcode - * - * @lib vmbxengine.lib - * @since S60 v5.2 - */ - -class CVoiceMailbox : public CBase - { -public: - - /** - * Static constructor. - * @return New instance of the object. Ownership transferred. - */ - IMPORT_C static CVoiceMailbox* NewL(); - - /** - * Static constructor. - * @return New instance of the object. Ownership transferred. - */ - IMPORT_C static CVoiceMailbox* NewLC(); - - /** - * Destructor. - */ - virtual ~CVoiceMailbox(); - -public: - - /** - * Retrieves voice mailbox entry for the specified service. - * - * @param in Params Service id and type of the mailbox for which - * a number/address should be defined. - * @param out aEntry If successful, a new result container is - * created and ownership passed to the caller. - * @return - KErrNone if an entry is found. - * - KErrNotFound if no entry available - * - KErrArgument when illegal argument - * - Other system wide errors. - */ - IMPORT_C virtual TInt GetStoredEntry( - const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) const; - - /** - * Saves the vmbx entry to its storage. - * - * Some mailbox types may not support saving all arguments. - * In that case unsupported arguments are ignored. - * This method may display related UI notes or queries. - * - * @param in aEntry The vmbx entry to save. - * @return - KErrNone if the entry was saved - * - KErrNotSupported if not capable or allowed to execute this - * for the specified mailbox service. - * - KErrArgument When illegal argument was passed. - * - Other system wide errors. - */ - IMPORT_C virtual TInt SaveEntry( const CVoiceMailboxEntry& aEntry ); - - /** - * Displays a query asking the user to define a mailbox number/address. - * Returns the input which the user entered, but does not save it. - * For that caller has to use SaveEntry(). - * This method may display related UI notes or queries. - * - * If editing for the specified mailbox service is not allowed, - * this method displays an error note and returns an error. - * If client is interested, CheckConfiguration() - * can be used to check permissions. - * - * - * @param in aParams Service id and type of the mailbox for which - * a number/address should be defined. - * @param out aEntry If successful, a new result container is - * created and ownership passed to the caller. - * @return - KErrNone if the number was entered. - * - KErrNotFound if the number is not defined - * (user entered no number or selected Cancel) - * - KErrArgument When illegal argument. - * - KErrNotSupported if not capable or allowed to execute this - * for the specified mailbox. - * - Other system wide errors. - */ - IMPORT_C virtual TInt QueryNewEntry( - const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ); - - /** - * Displays a query asking the user to change a mailbox number/address. - * Returns the input from user, but does not save it. - * For that caller has to use SaveEntry(). - * - * If editing for the specified mailbox service is not allowed, - * this method displays an error note and returns an error. - * If client is interested, CheckConfiguration() - * can be used to check permissions. - * - * @param in aParams Service id and type of the mailbox. - * @param out aEntry If successful, a new result container is - * created and ownership passed to the caller. - * @return - KErrNone if the number was entered. - * aNumber will contain the vmbx number. - * - KErrCancel If the user selected Cancel. - * - KErrArgument When illegal argument. - * - KErrNotSupported if not capable or allowed to execute this - * for the specified mailbox. - * - Other system wide errors. - */ - IMPORT_C virtual TInt QueryChangeEntry( - const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry ); - - /** - * Displays a query on the screen asking the user to select a - * Voice Mailbox service. - * - * @param out aParams If successful, - * contains selected mailbox info. - * @return - KErrNone if successful. - * - KErrCancel if user selected Cancel - * - KErrNotFound if there is no defined voice number and - * user have selected the type to define or the default - * type given. - * - Other system wide errors. - */ - IMPORT_C virtual TInt QueryVmbxType( - TVoiceMailboxParams& aParams ); - - /** - * Issues a notify request on a vmbx number/address change. - * - * The observer callback will be called whenever any vmbx number/address - * has changed on those mailboxes which support observing. - * - * Only one notify request can be pending. Method will leave with KErrInUse - * if a second request is issued while one is active already. - * Leaves if the notify request could not be served. - * - * @param in aObserver The observer for the notification. - * @param in aNotifyOnActiveLineOnly if this is ETrue, notify events will - * be generated only if the vmbx number of the active ALS line is - * changed, not if the number of the other line is changed. When - * there is no ALS support, this has no effect ie. notification - * will be generated always. - */ - IMPORT_C virtual void NotifyVmbxNumberChangeL( - MVoiceMailboxObserver& aObserver, - const TBool aNotifyOnActiveLineOnly ); - - /** - * Cancels a notify request on a vmbx number change. - * - */ - IMPORT_C virtual void NotifyVmbxNumberChangeCancel(); - - /** - * Checks the Voice Mailbox configuration to find out if a features - * are disabled or enabled. - * - * @param in aParams Specifies which mailbox capabilities, - * the caller wants to check. - * @param in aFlags Use TVmbxFeatureCapabilityFlag values - * for this parameter. - * Specifies what features client wants to check. - - * @return True if feature(s) enabled. - */ - IMPORT_C virtual TBool CheckConfiguration( - const TVoiceMailboxParams& aParams, - const TInt aFlags ); - - - /** - * Checks the Voice Mailbox how many VoIP service Ids - * - * @param out aProfileIds - * @return KErrNone if get service Ids successfully. - */ - IMPORT_C virtual TInt GetServiceIds( RIdArray& aProfileIds ) const; - - /** - * Saves provisioned entry to corresponding storage. - * - * Some mailbox types may not support saving all arguments. - * In that case unsupported arguments are ignored. - * - * @param in aEntry The provisioned vmbx entry to save. - * @return - KErrNone if the entry was saved - * - KErrNotSupported if not capable or allowed to execute this - * for the specified mailbox service. - * - KErrArgument When illegal argument was passed. - * - Other system wide errors. - */ - IMPORT_C TInt SaveProvisionedEntry( const CVoiceMailboxEntry& aEntry ); - -protected: - - /** - * Second phase constructor. - * - */ - void ConstructL(); - - /** - * Default constructor. - * - */ - CVoiceMailbox(); - -private: // data - - /** - * Implementation of the client API. - * Own. - **/ - CVoiceMailboxImpl* iBody; - }; - -#endif // C_VOICEMAILBOX_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailboxentry.h --- a/phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailboxentry.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,229 +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: External, CVoiceMailboxEntry -* -*/ - -#ifndef C_VOICEMAILBOXENTRY_H -#define C_VOICEMAILBOXENTRY_H - -#include -#include - -/** - * Container class for Voice Mailbox info. - * @lib vmbxengine.lib - */ - -class CVoiceMailboxEntry : public CBase - { -public: - - /** - * Static constructor. - * @return New instance of the object. Ownership transferred. - */ - IMPORT_C static CVoiceMailboxEntry* NewL(); - - /** - * Static constructor. - * @return New instance of the object. Ownership transferred. - */ - IMPORT_C static CVoiceMailboxEntry* NewLC(); - - /** - * Destructor - * - */ - virtual ~CVoiceMailboxEntry(); - - /** - * Gets the Voice Mailbox service. - * - * @return Mailbox service. - */ - IMPORT_C virtual TServiceId ServiceId() const; - - /** - * Sets the Voice Mailbox service to container. - * - * @param in aVmbxServiceId Voice Mailbox service. - */ - virtual void SetServiceId( - const TServiceId& aVmbxServiceId ); - - /** - * Gets the Voice Mailbox type. - * - * @return Mailbox type. - */ - IMPORT_C virtual TVmbxType VoiceMailboxType() const; - - /** - * Sets the Voice Mailbox type to container. - * - * @param in aVmbxType Voice Mailbox type. - */ - IMPORT_C virtual void SetVoiceMailboxType( - const TVmbxType& aVmbxType ); - - /** - * Gets the Voice Mailbox line type. - * - * @return Mailbox line type. - * EVmbxAlsLineDefault is returned if mailbox does not - * support several lines. - */ - IMPORT_C virtual TVmbxAlsLineType VmbxAlsLineType() const; - - /** - * Sets the Voice Mailbox line type to container. - * EVmbxAlsLineDefault is used by default. - * - * @param in aLine Selected Voice Mailbox line type. - */ - virtual void SetVmbxAlsLineType( - const TVmbxAlsLineType& aLine ); - - /** - * Gets the Voice Mailbox number or address. - * - * @param out aVmbxNumber If successful, contains the returned - * mailbox number or address. - * @return One of the system wide error codes. - */ - IMPORT_C virtual TInt GetVmbxNumber( TPtrC& aVmbxNumber ) const; - - /** - * Sets the Voice Mailbox number or address to container. - * - * @param in aVmbxNumber New Voice Mailbox number or address. - * @return One of the system wide error codes. - */ - IMPORT_C virtual TInt SetVmbxNumber( const TDesC& aVmbxNumber ); - - /** - * Gets the Voice Mailbox brand id. - * - * @param out aBrandId If successful, contains the returned Brand id. - * @return One of the system wide error codes. - */ - IMPORT_C virtual TInt GetBrandId( TPtrC8& aBrandId ) const; - - /** - * Sets the Voice Mailbox Brand Id to container. - * - * @param in aBrandId New Brand Id. - * @return One of the system wide error codes. - */ - virtual TInt SetBrandId( - const TDesC8& aBrandId ); - - /** - * Gets the VoIp name. - * - * @param out aVmbxName If successful, contains the returned mailbox name. - * @return One of the system wide error codes. - */ - IMPORT_C virtual TInt GetVmbxName( TPtrC& aVmbxName ) const; - - /** - * Sets the VoIp name to container. - * - * @param in aVmbxName New Voice Mailbox name. - * @return One of the system wide error codes. - */ - IMPORT_C virtual TInt SetVmbxName( const TDesC& aVmbxName ); - - /** - * Gets the type of memory location. - * - * @return Memory location type. - */ - IMPORT_C virtual TVmbxMemoryLocation UsingMemoryLocation( ) const; - - /** - * Resets the container to initial state. - * - */ - IMPORT_C virtual void Reset(); - - /** - * Sets the using memory location to entry. - * - * @param in aType Memory location type. - */ - virtual void SetUsingMemoryLocation( - const TVmbxMemoryLocation& aType ); - -protected: - - /** - * Second phase constructor. - * - */ - void ConstructL(); - -private: - - /** - * Default constructor. - * - */ - - CVoiceMailboxEntry(); - -private: // data - - /** - * Mailbox service id. - */ - TServiceId iVmbxServiceId; - - /** - * Mailbox type. - */ - TVmbxType iVmbxType; - - /** - * Mailbox als line type. - */ - TVmbxAlsLineType iVmbxLineType; - - /** - * Number of vmbx. - * Own. - */ - HBufC* ivmbxNumber; - - /** - * Brand id of vmbx. - * Own. - */ - HBufC8* iVmbxBrandId; - - /** - * Name of vmbx. - * Own. - */ - HBufC* ivmbxName; - - /** - * Mailbox Memory location. - */ - TVmbxMemoryLocation iUsingMemory; - - }; - -#endif // C_VOICEMAILBOXENTRY_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/inc/mvoicemailboxobserver.h --- a/phonesrv_plat/voice_mailbox_number_api/inc/mvoicemailboxobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Notifies when mailbox numbers are changed -* Interface : External, MVoiceMailboxObserver -* -*/ - -#ifndef M_VOICEMAILBOXOBSERVER_H -#define M_VOICEMAILBOXOBSERVER_H - -class CVoiceMailboxEntry; - -// INCLUDES -/** - * Notifier for vmbx number/address changes - * - * @lib vmbxengine.lib - * - */ -class MVoiceMailboxObserver - { -public: - - /** - * Observer callback function which is called when - * changes to voice mailbox entries occur. - * - * @param aVmbxEntry The new vmbx entry. - */ - virtual void HandleNotifyL( const CVoiceMailboxEntry& aVmbxEntry ) = 0; - - }; - -#endif // M_VOICEMAILBOXOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/inc/vmnumber.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/inc/vmnumber.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1415 @@ +/* +* 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: Interface for fetching/saving the vmbx number and querying +* for it. +* Also notify on a number change is supported. +* +*/ + + +#ifndef VMNUMBER_H +#define VMNUMBER_H + +// INCLUDES +/***************************************************** +* Series 60 Customer / ETel +* Series 60 ETel API +*****************************************************/ +#include +#include +#include + +#include // from PhoneClient + +#include +#include +#include +#include +#include +#include +#include +#include +#include // CPhCltEmergencyCall +#include + +// FORWARD DECLARATIONS + +class CVmSPSHandler; + +// CONSTANTS + + +_LIT( KEmptyVoiceMailNumber, "" ); + +enum TVmbxQueryType + { + EVmbxNotDefinedQuery, // use this + EVmbxChangeNumberQuery // this is only for vmbx application + }; + +enum TVmbxNumberEntry + { + EAlsActiveLineEntry = 0, // currently active ALS line + EAlsLine1Entry = 1, // ALS primary line + EAlsLine2Entry = 2 // ALS auxiliary line + }; + +enum TVmbxAlsLine + { + EAlsLine1 = 1, + EAlsLine2 = 2 + }; + +enum TVmbxPhonebookOperation + { + EVmbxPhonebookGetInfo, + EVmbxPhonebookRead, + EVmbxPhonebookWrite, + EVmbxPhonebookDelete + }; + + +enum TVmbxMemoryLocation + { + EVmbxSimMemory = 0, + EVmbxPhoneMemory + }; + +_LIT( KVmbxPanicCategory, "RVmbxNumber"); + +enum TVmbxPanic + { + EVmbxNotConnected = 0, + EVmbxDescriptorTooSmall = 1, + EVmbxNumberTooLong = 2, + EVmbxNoNotifyHandler = 3, + EVmbxNoCoeEnv = 4, + EVmbxUnhandledOperation = 5 + }; + +enum TVmbxSimNumAcceptance + { + EVmbxSimNumNotAccepted = 0, + EVmbxSimNumAccepted + }; + +enum TVmbxUserEditIndicator + { + EVmbxNotUserEdit = 0, + EVmbxUserEdit, + EvmbxPhoneMemForcedEdit + }; + +const TInt KVmbxMaxNumberLength = KPhCltTelephoneNumberLength; +const TInt KVmbxMaxAddressLength = 100; + +// Phonebook entry name length +const TInt KVmbxPhoneBookEntryNameLength = 5; + +// Branding id +const TInt KVmSettingsUiBrandingIdLength = 512; + +// Publish & Subscribe property category definition + +enum TVmbxNumType + { + EVmbxMDN, + EVmbxMIN + }; + +enum TVmbxType + { + EVmbx, + EVmbxIP, + EVmbxVideo, + EVmbxNone + }; + +enum TVmbxTitle + { + EVmbxCall, + EVmbxDefine + }; + +// Phonebook types (VMBX = 6f17) +enum TVmSimPhoneBookTypes + { + EVMBXPhoneBook = 0, + EMBDNPhoneBook + }; + + +// FORWARD DECLARATIONS +class CVmTextQueryDialog; +class CCoeEnv; +class CVPbkContactManager; +class CPhCntSingleItemFetch; +class CVMSimQueryDilaog; +class CVmListQueryDialog; +class CVmBSHandler; +// CLASS DECLARATION + +/** +* TVmbxEntry +* Contains vmbx sim entry data. +* +* @lib vmbx.lib +* @since 2.0 +**/ +class TVmbxEntry + { + public: // Constructors and destructor + + /** + * C++ default constructor. + */ + TVmbxEntry() : iIndex( 0 ) + { + iTelNumber.FillZ(); + iTelNumber.Zero(); + }; + + public: // Data + + // Data index + TInt iIndex; + + // Telefony number + TBuf16 iTelNumber; + + // Phonebook entry name + TBuf16 iText; + }; + +/** +* MVmbxNotifyHandler +* +* @lib vmbx.lib +* @since +**/ +class MVmbxNotifyHandler + { + public: + /** + * Does the action user wants when a vmbx number has been changed. + * If the parameter aNotifyOnActiveLineOnly was ETrue in notify request, + * only a change of the vmbx number of the active ALS line causes + * calling this. + * + * @param aLine ALS line of which number was changed ( 1 or 2 ) + * @param aValue the new vmbx number of that line. + * (this reference is only valid in scope of this method) + */ + virtual void HandleNotifyL( TInt aLine, const TDesC& aValue ) = 0; + }; + + +/** + * Observer interface for ServiceNotifier. + * + * @since S60 3.2 + **/ +class MServiceNotifyHandler + { + public: + + /** + * Called when a Service profile has been changed. + */ + virtual void HandleServiceNotifyL() = 0; + }; + +/** +* MVmbxAlsObserver +* +* @lib vmbx.lib +* @since +**/ +class MVmbxAlsObserver + { + public: + /** + * Does the action user wants when the active ALS line has been changed. + * + * @param aLine new ALS line number ( 1 or 2 ) + **/ + virtual void HandleAlsChangeL( TVmbxAlsLine aLine ) = 0; + + }; + + +/** + * TVmbxServiceInfo, contains Service information. + * + * @since S60 3.2 + **/ +class TVmbxServiceInfo + { + public: // Constructors and destructor + + TVmbxServiceInfo() + { + iServiceId = 0; + iSnapId = 0; + } + + public: // Data + + // Service's Id + TUint iServiceId; + + // Service's SNAP Id + TUint32 iSnapId; + + // Service's name. + TBuf<64> iName; + + // Service's address. + TBuf iAddress; + }; + + +/** + * TVmbxServiceSelection, contains selected service information. + * + * @since S60 3.2 + **/ +class TVmbxServiceSelection + { + public: // Constructors and destructor + + TVmbxServiceSelection( TVmbxType aServiceType = EVmbxNone, + TUint aServiceId = 0 ) + { + iServiceType = aServiceType; + iServiceId = aServiceId; + } + + public: // Data + + // Service type + TVmbxType iServiceType; + + // Service Id + TUint iServiceId; + + }; + + +/** +* RVmbxNumber +* +* @lib vmbx.lib +* @since +**/ +class RVmbxNumber : public MCenRepNotifyHandlerCallback, + public MSSSettingsObserver, + public MSatRefreshObserver, + public MPhCltEmergencyCallObserver + { + public: + /** + * status for QueryNumberL. + * EVmQueryNormal Query number running normal case + * EVmQueryProcess Query number running FOREVER case + */ + enum TVmVmQueryStatusType + { + EVmQueryNormal = 0, + EVmQueryProcess + }; + + public: + + /** + * C++ default constructor. + */ + IMPORT_C RVmbxNumber(); + + /** + * Destructor. + */ + IMPORT_C ~RVmbxNumber(); + + public: // New functions + + /** + * Opens the resources needed. This or the other overloaded Open() has to + * be called successfully before doing anything else. + * + * ---------------------------------------------------------------------- + * A new ETel connection is opened when using this method! + * ---------------------------------------------------------------------- + * + * @return Symbian OS error code (KErrNone is successful) + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + IMPORT_C TInt Open(); + + /** + * Opens the resources needed. This or the other overloaded Open() has to + * be called successfully before doing anything else. + * + * Use this overload if you already have ETel connection. + * + * ---------------------------------------------------------------------- + * An existing ETel connection is used when using this method! + * ---------------------------------------------------------------------- + * + * @param aPhone Phone client + * @return Symbian OS error code (KErrNone is successful) + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + IMPORT_C TInt Open( RMobilePhone& aPhone ); + + /** + * Fetches the specified vmbx number. If there is no vmbx number + * saved for the specified ALS line, parameter aNumber remains unchanged + * and the return value is KErrNotFound. + * + * @param aNumber vmbx number is saved here (must be room for at least + * KVmbxMaxNumberLength characters) + * + * @param aEntry determines which vmbx number entry is used: + * EAlsLine1Entry = vmbx number entry of primary line + * EAlsLine2Entry = vmbx number entry of secondary line + * EAlsActiveLineEntry = entry of currently active line + * + * @return - KErrNone if the number was found. + * aNumber will contain the vmbx number. + * + * - KErrNotFound if the number is not defined + * + * - Other error code if there was a problem in getting + * the number. Clients should show error note if this happens. + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + IMPORT_C TInt GetVmbxNumber( TDes& aNumber, + TVmbxNumberEntry aEntry = EAlsActiveLineEntry ); + + /** + * Check wether the voice mailbox number can be changed. If the number + * cannot be edited, the QueryNumberL leaves with and SaveVmbxNumber + * returns KErrAccessDenied. + * @since 2.7 + * @return ETrue if editing is allowed. + * EFalse if editing is forbidden. + */ + IMPORT_C TBool AllowedToChangeTheNumber(); + + /** + * Puts a query on the screen asking for a voice mailbox number. + * + * IMPORTANT: + * + * Other subsystems than voice mailbox application should call this + * ONLY IF GetVmbxNumber() returned KErrNotFound. Also, only the + * parameter EVmbxNotDefinedQuery should be used outside the voice + * mailbox application. + * + * @param aQueryType type of the query, alternatives: + * - EVmbxNotDefinedQuery + * (use this when no vmbx number is defined) + * + * - EVmbxChangeNumberQuery + * @param aNumber Initial value for the query, AND the result value + * of an accepted query. (must be room for at least + * KVmbxMaxNumberLength characters. Not allowed to + * contain longer initial value than + * KVmbxMaxNumberLength) + * @param aShowQuery When this is set and the sim has support for vmbx + * number the user is shown a list query by which the + * storage of sim number can be decided + * + * @return ETrue if the query was accepted and the vmbx number saved. + * This is the case also when user saves empty number! + * EFalse if the user canceled the query. No vmbx number changed. + **/ + IMPORT_C TBool QueryNumberL( TVmbxQueryType aQueryType, TDes& aNumber, + TBool aShowQuery = EFalse ); + + /** + * Saves the vmbx number. (in phone file system and SIM) + * + * @param aNumber vmbx number ( max length is KVmbxMaxNumberLength ) + * @param aEntry determines in which entry the number is saved: + * EAlsLine1Entry = vmbx number entry of ALS primary line + * EAlsLine2Entry = vmbx number entry of ALS secondary line + * EAlsActiveLineEntry = entry of currently active ALS line + * + * @return Symbian OS error code (KErrNone is successful) + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + IMPORT_C TInt SaveVmbxNumber( const TDesC& aNumber, + TVmbxNumberEntry aEntry ); + + /** + * Saves vmbx number to Sim + * @since + * @param aNumber Vmbx number + * @param aEntry Als line entry + * @return Symbian OS error code (KErrNone is successful) + */ + TInt SaveVmbxNumberToSim( const TDesC& aNumber, + TVmbxNumberEntry aEntry ); + + /** + * Saves vmbx number to phone memory + * @since + * @param aNumber Vmbx number + * @param aEntry Als line entry + * @return Symbian OS error code (KErrNone is successful) + */ + TInt SaveVmbxNumberToPhone( const TDesC& aNumber, + TVmbxNumberEntry aEntry ); + + /** + * Issues a notify request on a vmbx number change. + * User's HandleNotifyL() will be called whenever the vmbx number has + * been changed by any subsystem. Only one notify request can be done + * per one RVmbxNumber object simultaneously. When issuing a notify + * request while one is active already, only parameters aHandler and + * aNotifyOnActiveLineOnly are updated in existing request. + * + * @param aHandler user's notify handler + * @param aNotifyOnActiveLineOnly if this is ETrue, notify events will + * be generated only if the vmbx number of the active ALS line is + * changed, not if the number of the other line is changed. When + * there is no ALS support, this has no effect ie. notification + * will be generated always. + * + * Leaves if the notify request could not be done. + **/ + IMPORT_C void NotifyVmbxNumberChangeL( MVmbxNotifyHandler* aHandler, + TBool aNotifyOnActiveLineOnly ); + + /** + * Cancels a notify request on a vmbx number change. + **/ + IMPORT_C void NotifyVmbxNumberChangeCancel(); + + /** + * Gets the currently active ALS line number ( 1 or 2 ). + * Information is fetched from supplementary settings client. + * @param aLineNumber line number is returned here. If ALS is not + * supported, value 1 is returned. + * @return Symbian OS error code (KErrNone is successful) + **/ + IMPORT_C TInt GetAlsLine( TInt& aLineNumber ) const; + + /** + * Issues a notify request on active ALS line change. A callback to + * user's code is made when the ALS line is changed. The notify request + * remains active as long as it is canceled with + * NotifyAlsLineChangeCancel(), ie. it is not canceled when the ALS line + * is changed. Implementation uses SharedData's notify system. + * Leaves if the notify request could not be done. + * @param aObserver user's observer + **/ + IMPORT_C void NotifyAlsLineChangeL( MVmbxAlsObserver* aObserver ); + + /** + * Cancels a notify request on ALS line change. + **/ + IMPORT_C void NotifyAlsLineChangeCancel(); + + /** + * Closes the resources allocated in Open(). + * + * Cancels all issued notify requests. + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + IMPORT_C void Close(); + + + /** + * Puts a query on the screen asking for a voice mailbox address. + * @since 3.0 + * + * IMPORTANT: + * + * Other subsystems than voice mailbox application should call this + * ONLY IF GetVmbxNumber() returned KErrNotFound. Also, only the + * parameter EVmbxNotDefinedQuery should be used outside the voice + * mailbox application. + * + * @param aQueryType type of the query, alternatives: + * - EVmbxNotDefinedQuery + * (use this when no vmbx address is defined) + * + * - EVmbxChangeNumberQuery + * @param aNumber Initial value for the query, AND the result value + * of an accepted query. (must be room for at least + * KVmbxMaxAddressLength characters. Not allowed to + * contain longer initial value than + * KVmbxMaxAddressLength) + * @return ETrue if the query was accepted and the vmbx address saved. + * This is the case also when user saves empty address! + * EFalse if the user canceled the query. No vmbx address + * changed. + **/ + IMPORT_C TBool QueryAddressL( TVmbxQueryType aQueryType, + TDes& aNumber ); + + /** + * Puts a popup on the screen asking for which type of Vmbx is used. + * @since 3.0 + * @param aTitle Vmbx title type ( call / define ). + * @return which type of Vmbx is selected. + */ + IMPORT_C TInt SelectTypeL( TBool aTitle ); + + /** + * Save address. + * @since 3.0 + * @param aAddress includes saved vmbx address + * @return Symbian OS error code (KErrNone is successful) + **/ + IMPORT_C TInt SaveVmbxAddressL( TDes& aAddress ); + + /** + * Check if VoIP profiles exists. + * @since 3.0 + * @return ETrue if there is at least one VoIP profile, otherwise EFalse + */ + IMPORT_C TBool IsVoIPProfilesFound(); + + /** + * Check if VoIP voice mailbox services exists + * @since 5.0 + * @return ETrue if there is at least one service, otherwise EFalse + */ + IMPORT_C TBool IsIpVoiceMailboxServices(); + + /** + * Fetches the specified video mailbox number. If there is no video + * mailbox number saved for the specified ALS line, parameter aNumber + * remains unchanged and the return value is KErrNotFound. + * @since 3.1 + * @param aNumber video mailbox number is saved here (must be room for + * at least KVmbxMaxNumberLength characters) + * @param aEntry determines which video mbx number entry is used: + * EAlsLine1Entry = video mbx number entry of primary line + * EAlsLine2Entry = video mbx number entry of secondary line + * EAlsActiveLineEntry = entry of currently active line + * @return - KErrNone if the number was found. + * aNumber will contain the video mbx number. + * + * - KErrNotFound if the number is not defined + * + * - Other error code if there was a problem in getting + * the number. Clients should show error note if this happens. + **/ + IMPORT_C TInt GetVideoMbxNumber( TDes& aNumber, + TVmbxNumberEntry aEntry = EAlsActiveLineEntry ); + + /** + * Puts a query on the screen asking for a video mailbox number. + * @since 3.1 + * + * IMPORTANT: + * + * Other subsystems than voice mailbox application should call this + * ONLY IF GetVideoMbxNumber() returned KErrNotFound. Also, only the + * parameter EVmbxNotDefinedQuery should be used outside the voice + * mailbox application. + * + * @param aQueryType type of the query, alternatives: + * - EVmbxNotDefinedQuery + * (use this when no vmbx number is defined) + * - EVmbxChangeNumberQuery + * @param aNumber Initial value for the query, AND the result value + * of an accepted query. (must be room for at least + * KVmbxMaxNumberLength characters. Not allowed to + * contain longer initial value than + * KVmbxMaxNumberLength) + * @return ETrue if the query was accepted and the vmbx number saved. + * This is the case also when user saves empty number! + * EFalse if the user canceled the query. No vmbx number changed. + **/ + IMPORT_C TBool QueryVideoMbxNumberL( TVmbxQueryType aQueryType, + TDes& aNumber ); + + /** + * Saves the vmbx number. (in phone file system) + * @since 3.1 + * @param aNumber video mbx number ( max length is KVmbxMaxNumberLength ) + * @param aEntry determines in which entry the number is saved: + * EAlsLine1Entry = video mbx number entry of ALS primary + * line + * EAlsLine2Entry = video mbx number entry of ALS secondary + * line + * EAlsActiveLineEntry = entry of currently active ALS line + * @return Standard Symbian OS errorcode. + * KErrNone if number was successfully saved. + **/ + IMPORT_C TInt SaveVideoMbxNumber( const TDesC& aNumber, + TVmbxNumberEntry aEntry ); + + /** + * Returns if the memory location for vmbx is sim memory + * @since 3.0 + * @return ETrue if the vmbx number should be stored in the SIM + * EFalse otherwise. + */ + IMPORT_C TBool IsSimMemory(); + + /** + * Fetches vmbx address from SPS. + * @since 3.0 + * @param aAddress vmbx address is saved here (must be room for at least + * KVmbxMaxAddressLength characters). + * @return - KErrNone if the address was found. + * aNumber will contain the vmbx address. + * + * - KErrNotFound if the address is not defined + * + * - Other error code if there was a problem in getting + * the address. Clients should show error note if this happens. + */ + IMPORT_C TInt GetVmbxAddressL( TDes& aAddress ); + + /** + * Fetches vmbx address from SPS. + * @since 3.2 + * @param aAddress vmbx address is saved here (must be room for at least + * KVmbxMaxAddressLength characters). + * @param aServiceId Used Service Id + * @return General symbian error code. + */ + IMPORT_C TInt GetVmbxAddress( TDes& aAddress, TUint aServiceId ); + + /** + * Puts a popup on the screen asking for which type of Vmbx is used. + * @since 3.2 + * @param aTitle Vmbx title type ( call / define ). + * @param aServiceId On completion, contains selected service's + * Service Id. If CS or Video Vmbx selected, value is 1, otherwise + * service's value is dynamic. + * @return which type of Vmbx is selected. + */ + IMPORT_C TInt SelectTypeL( TBool aTitle, TUint& aServiceId ); + + /** + * Service Ids getter + * @since 3.2 + * @param aProfileIds On completion, contains all Service Ids. + * @return General symbian error code. + */ + IMPORT_C TInt GetServiceIds( RArray& aProfileIds ); + + /** + * Service info getter + * @since 3.2 + * @param aServiceInfo On completion, contains Service information + * @return General symbian error code. + */ + IMPORT_C TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo ); + + /** + * Issues a notify request on a Service profile change. + * @param aHandler User's notify handler + */ + IMPORT_C void NotifyServiceChange( MServiceNotifyHandler* aHandler ); + + /** + * Cancels a notify request on a Service profile change. + */ + IMPORT_C void NotifyServiceChangeCancel(); + + /** + * Get Service's Brand Id + * @since S60 3.2 + * @param aServiceId Used Service Id + * @param aBrandId On completion, contains Brand Id + */ + IMPORT_C void BrandIdL( TInt aServiceId, TDes8& aBrandId ); + + /** + * Branded icon getter + * @since S60 3.2 + * @param aBrandingId Used branding Id + * @param aBrandedBitmap Bitmap for branded icon + * @param aBrandedBitmapMask Mask to branded icon + */ + IMPORT_C void GetBrandedIconL( const TDesC8& aBrandingId, + CFbsBitmap*& aBrandedBitmap, + CFbsBitmap*& aBrandedBitmapMask ); + + /** + * Construct default icons(CS, Video and VoIP) + * @since S60 3.2 + * @param aIcons On completion, contains created icons + */ + IMPORT_C void ConstructDefaultIconsL( CArrayPtr* aIcons ); + + private: + + /** + * Add brand icon if it exist. + * @since S60 3.2 + * @param aIcons On completion, contains new brand icon + * @param aServiceId Used Service Id + * @param aIconId On completion, contains branded icon's icon list id + */ + void AddBrandIconL( CArrayPtr* aIcons, TUint aServiceId, TInt& aIconId ); + + public: // Functions from base classes + + /** + * From MCenRepNotifyHandlerCallback, to notify the client about + * changes for string value keys + **/ + void HandleNotifyString( TUint32 aKey, const TDesC16& aValue ); + + /** + * From MCenRepNotifyHandlerCallback, to notify the client about + * changes in keys when the whole repository is listened for. + **/ + void HandleNotifyGeneric( TUint32 aKey ); + + /** + * From MSSSettingsObserver, to notify changes in SS settings in phone + **/ + void PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue ); + + /** + * From MVmbxAlsObserver: + **/ + void HandleAlsChangeL( TVmbxAlsLine aLine ); + /** + * Refresh query. Client should determine whether it allow the + * refresh to happen. + * @since 2.6 + * @param aType Refresh type. + * @param aFiles Elementary files which are to be changed. + * May be zero length. + * @return ETrue to allow refresh, EFalse to decline refresh. + */ + TBool AllowRefresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ) ; + + /** + * Notification of refresh. + * @since 2.6 + * @param aType Type of refresh which has happened. + * @param aFiles List of elementary files which has been changed. + * May be zero length. + */ + void Refresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ); + + private: // New functions + + /** + * Routine to query SIM number + * @since + * @param aNumber Vmbx number + * @param aEntry Als line entry + * @return ETrue if user inserted number + **/ + TBool QuerySimNumberL( TDes& aNumber, + TVmbxNumberEntry aEntry = EAlsActiveLineEntry ); + + + /** + * Loads the resources needed for queries and confirmation notes. + * @since + **/ + void LoadResourceL(); + + /** + * Shows a confirmation note after a saved vmbx number. + * @param aResourceId Resource id + **/ + void ShowConfirmationNoteL( TInt aResourceId ) const; + + /** + * Verifies that the given string is a valid phone number. + * Rules: + * + * - '+' is only allowed as the first character + * - The phone number part must have 3-21 digits + * @since + * @param aNumber Vmbx number + * @return ETrue if valid number + **/ + TBool IsValidPhoneNumber( const TDesC& aNumber ) const; + + /** + * Checks if a number is an emergency number. + * @since + * @param aNumber Vmbx number + * @return ETrue if emergency number + **/ + TBool IsEmergencyNumberL( const TDesC& aNumber ); + + /** + * Fetches information about the SIM phonebook for vmbx numbers. + * Updates internal flags KVmFlagSimSupport and + * KVmFlagPhonebookBeingCached. + * + * @return Phonebook's GetInfo() return code. + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + TInt PhoneBookInfo(); + + /** + * Does a vmbx phonebook operation + * + * If the phonebook is being cached, defined amount of retries are + * made with 0.2 second delay in between. + * @param aOperation Operation identifier + * @param aEntry Vmbx entry (NULL) + * @return Phonebook error code. Specifically, KErrInUse, if + * the phonebook is still being cached after retries. + **/ + TInt DoPhonebookOperation( TVmbxPhonebookOperation aOperation, + TVmbxEntry* aEntry = NULL ); + + // Prohibit copy constructor + RVmbxNumber( const RVmbxNumber& ); + + // Prohibit assigment operator + RVmbxNumber& operator = ( const RVmbxNumber& ); + + /** + * Reads an entry from the ICC-based phonebook. + * @since + * @param aEntry Vmbx sim entry data + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + void PhonebookReadL( TVmbxEntry& aEntry ); + + /** + * Writes an entry into ICC-based phonebook. + * @since + * @param aEntry Vmbx sim entry data + * @return Completion status of a request + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + TInt PhonebookWrite( TVmbxEntry& aEntry ); + + /** + * Removes an entry from ICC-based phonebook. + * @since + * @param aEntry Vmbx sim entry data + * @return Completion status of a request + **/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + TInt PhonebookDelete( TVmbxEntry& aEntry ); + + /** + * Converts a phone number to western format + * @param aDes Parameter to change + **/ + void ConvertToWesternDigits( TDes& aDes ) const; + + /** + * Create connection to ETel server + * @since + * @return KErrNone if success + **/ + TInt ConnectETelServer(); + + /** + * Open phonebook's Single Fetch Dialog + * @since + * @param aPhoneNumber Phone number + */ + void FetchNumberFromPhonebook2L( TDes& aPhoneNumber ); + + /** + * Handling of emergency dial result. + * @since 3.2 + * @see MPhCltEmergencyCallObserver::HandleEmergencyDialL(). + */ + void HandleEmergencyDialL( const TInt aStatus ); + + /** + * Retrieves voice mailbox number from SIM/R-UIM + * @since + * @param aNumber Number + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt GetVmNumFromSIM( TDes& aNumber, TInt aLineNumber ); + + /** + * Retrieves voice mailbox number from VMN summary info + * @since + * @param aNumber Number + * @return Symbian OS error code (KErrNone is successful) + */ + TInt GetVmNumFromVMN( TDes& aNumber ); + + /** + * Retrieves voice mailbox number from NAM + * @since + * @param aNumber Number + * @param aNumType Number type (EVmbxMDN) + * @return Symbian OS error code (KErrNone is successful) + */ + TInt GetVmNumFromNamStore( TDes& aNumber, TInt aNumType = EVmbxMDN ); + + /** + * Retrieves voice mailbox number from Shared Data + * @since + * @param aNumber Number + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt GetVmNumFromSD( TDes& aNumber, TInt aLineNumber ); + + /** + * Closes ETel resources + * @since + */ + void CloseETel(); + + /** + * Appends string from resource to descriptor array + * @since + * @param aResourceId Resource id + * @param aArray String array + */ + void AppendStrToArrayL( TInt aResourceId, CDesCArray& aArray ); + + /** + * Set query dialog header text from resource string + * @since + * @param aResourceId Resource id + * @param aDlg Query dialog + */ + void SetHeaderFromResourceL( TInt aResourceId, CAknQueryDialog& aDlg ); + + /** + * Subscribe SAT notifications + * @since + */ + void SubscribeSATNotificationsL(); + + /** + * Gets MBI-file settings from Sim. MBI-file identifies the usage + * of the mailbox records settings + * @since + * @return ETrue if successed + */ + TInt MailboxNumbersIdentifiers(); + + /** + * Reading and writing to sim are tested + * @since + */ + void TestAndSetSimAccessFlags(); + + /** + * The actual size for number must be determine from max length + * returned from GetInfo-method and saved number length on Sim. + * @param aSimNumberLength The length of the number read from sim. + * @since + */ + void CalculateActualMaxLengthOnSim( TInt aSimNumberLength ); + + /** + * Returns video support state + * @since S60 3.2 + * return ETrue if supported + */ + TBool VideoSupported(); + + /** + * Checks if writing to sim is prohibited + * @since S60 3.2 + * return ETrue if writing is not allowed + */ + TBool IsReadOnlySIM(); + + /** + * Checks is VMBX number defined in phone memory + * @since S60 3.2 + * @param aLineNumber Line 1 or 2 + * @return ETrue if VMBX number defined in Phone memory + */ + TBool VmbxNumDefInPhoneMemory( TInt aLineNumber); + + /** + * Checks is the given number stored in phone memory + * @since S60 3.2 + * @param aNumber The number checked + * @param aLineNumber Line 1 or 2 + * @return ETrue if number stored in Phone memory + */ + TBool NumStoredInPhone( const TDesC& aNumber, TInt aLineNumber ); + + /** + * Saves VMBX number to the backup store + * @since S60 3.2 + * @param aNumber The number to be saved + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt BackUpSimNumber( const TDesC& aNumber, TInt aLineNumber ); + + /** + * Fetches VMBX number from backup store + * @since S60 3.2 + * @param aNumber number + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt FetchSimNumberBackUp( TDes& aNumber, TInt aLineNumber ); + + /** + * Clears VMBX number from the phone memory + * @since S60 3.2 + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt ClearVMBXNumberFromPhone( TInt aLineNumber ); + + /** + * Indicates if user has edited VMBX number + * @since S60 3.2 + * @param aLineNumber Line 1 or 2 + * @return ETrue if VMBX is edited by user + */ + TBool UserEditNumber( TInt aLineNumber ); + + /** + * Sets the flag indicating that the user has edited + * VMBX number + * @since S60 3.2 + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt SetUserEditNumber( TInt aLineNumber ); + + /** + * Resets the flag that indicates that the user has edited + * VMBX number + * @since S60 3.2 + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt ResetUserEditNumber( TInt aLineNumber ); + + /** + * Fetches VMBX number stored in SIM if number is + * available + * @since S60 3.2 + * @param aNumber number + * @param aLineNumber Line 1 or 2 + * @return ETrue if number is fetched + */ + TBool UseSimNumIfAvailable( TDes& aNumber, TInt aLineNumber ); + + /** + * Handles the updating of a number stores in phone memory + * @since S60 3.2 + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt HandleNumberStores( TInt aLineNumber ); + + /** + * Returns if the SIM memory is used on ALS 1 + * @since 3.2 + * @return ETrue if the SIM memory is used to store ALS1 number + * EFalse otherwise. + */ + TBool UsesSimMemory(); + + /** + * check count of VMBX number + * available + * @since S60 3.2.2 + * @param out aDefinedNumber a count of defined numbers + * @param out aDefinedFlag a flag of which voice mail services are defined + * @param out aServiceId Id of selected service is set + * + * @return Type of Vmbx, if there is only one mailbox configured, otherwise EVmbxNone + */ + TInt CheckDefinedNumberCountL( TInt& aDefinedNumber, + TInt& aDefinedFlag, TUint& aServiceId ); + + /** + * Returns if VMBX number stored in phone memory via external clients + * @since S60 3.2.3 + * @param aLineNumber Line 1 or 2 + * @return ETrue if number is stored in phone memory via + * external clients + * EFalse number is stored in phone memory via internal clients + */ + TBool IsPhoneMemForcedEdit( const TInt aLineNumber ); + + /** + * Sets the flag indicating that external clients has edited + * VMBX number + * @since S60 3.2.3 + * @param aLineNumber Line 1 or 2 + * @return Symbian OS error code (KErrNone is successful) + */ + TInt SetPhoneMemForcedEdit( TInt aLineNumber ); + + /** + * Displays a note with a text loaded from resource file. + * @since S60 v5.2 + * @param aResourceId Resource id for loading text for note + */ + void ShowInformationNoteL( const TInt aResourceId ) const; + + /** + * Check whether the note should be shown + * this check is done because phone client calls GetVmbxNumber + * and then SelectTypeL, which causes note qtn_... to be shown twice + * @since S60 v5.2 + * @return ETrue if the note should be shown + */ + TBool IsNoNumberNoteAllowed(); + + /** + * Check whether the number had been edited in inactive line + * @since S60 v5.2 + * @param aInactiveLineNumber the inactive line number + * @return ETrue if the number had been edited in inactive line + */ + TBool IsInactiveLineEdited( TInt& aInactiveLineNumber ); + + private: // data + + // Observer for user action for saved vmbx number + MVmbxNotifyHandler* iNotifyCallBack; + + // Observer for user action for als line + MVmbxAlsObserver* iUserAlsObserver; + + + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + // Root telephony server session + RTelServer iTelServer; + + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + //Mobile phone client + RMobilePhone iPhone; + + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + //Phonebook client + RMobilePhoneBookStore iPhoneBook; + + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + // Multimode ETel phone book info structure that will + // be used to retrieve data from phone book store. + RMobilePhoneBookStore::TMobilePhoneBookInfoV1 iPhoneBookInfo; + + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + // A package for the iPhoneBookInfo. + RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg iPhoneBookInfoPckg; + + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + // A package for the iPhoneVoicemailInfo. + RMobilePhone::TMobilePhoneVoicemailIdsV3 iPhoneVoicemailInfo; + + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + // A package for the iPhoneVoicemailInfoPckg. + RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg iPhoneVoicemailInfoPckg; + + /***************************************************** + * Series 60 Customer / RSAT + * Series 60 RSAT API + *****************************************************/ + RSatSession iRSatSession; //// Root RSATsession opening RSatClient + + /***************************************************** + * Series 60 Customer / RSAT + * Series 60 RSAT API + *****************************************************/ + RSatRefresh iRSatClient; //RSatClient for notification of file changed. + + /***************************************************** + * Series 60 Customer / RSAT + * Series 60 RSAT API/ ETel + * Series 60 ETel API + *****************************************************/ + // A package for the TRefreshFileList. + // list of files, waiting for notification. + RSat::TRefreshFileList iObservedFileList; + + //Central repository observer + CCenRepNotifyHandler* iNotifyHandler; + + //Central repository session + CRepository* iSession; + + //SS setting + RSSSettings iSsSettings; + + // Offset in resourse file + TInt iResourceFileOffset; + + // Vmbx state flags + TInt iFlags; + + // text query dialog + CVmTextQueryDialog* iQuery; // owned + + // indicates if the RVmbxNumber was closed during a dialog + TBool* iClosedPtr; + + // Control enviroment + CCoeEnv* iCoeEnv; // not owned + + //PRI settings + // nNumber options + TInt iVmNumOpts; + + //Ui options + TInt iVmUiOpts; + + // Synchronization state + TBool iSynchronize; + + // Vmbx type + TInt iType; + + // Memory location (sim/phone) + TInt iMemoryLocation; + + // Sim query dialog + CVMSimQueryDilaog* iVMSimQueryDialog; + + // Text query dialog + CVmTextQueryDialog* iVideoQuery; // owned + + // voice mailbox type selection dialog + CAknListQueryDialog* iTypeSelectionQuery; //owned + + + TBool iAlphaStringFound; + // Alpha string which is read from the SIM card + HBufC* iAlphaStringFromSIM; + // True if number in sim + TBool iNumberFound; + //Phonebook type + TUint8 iPhoneBookType; + //Number fetched from Sim when checking write protection + TBuf iNumberFromSim; + + //ETrue when first USim phonebook type is tested + TBool iUSimFirstRoundTest; + + + private: + + /** + * True if Sim access rights are tested + */ + TBool iStartUpTest; + + /** + * For single item fetch + */ + CPhCntSingleItemFetch* iCntFetch; + + /** + * To test if mbdn number doesn't exist + */ + TBool iNoNumberFound; + + /** + * To test if number can be found from vmbx-phonebook + */ + TBool iMbdnPhonebookOk; + + /** + * querying state of QueryNumberL + */ + TVmVmQueryStatusType iQueryingState; + + /** + * Type and Id of mailboxes to list in iTypeSelectionQuery, Own + */ + RArray iVmbxServiceSelection; + + /** + * Handles Service proviver Settings, Own. + */ + CVmSPSHandler* iVmSpsHandler; + + /** + * Handles Branding Server, Own. + */ + CVmBSHandler* iVmBsHandler; + + /** + * Feature manager is initialized + */ + TBool iFeatMgrInitialized; + + /** + * Sim card is whether found in ME + */ + TBool iSimCardFound; + + }; + +#endif // VMNUMBER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/inc/voicemailboxdefs.h --- a/phonesrv_plat/voice_mailbox_number_api/inc/voicemailboxdefs.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2009-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: Constant used for vmbx engine -* -*/ - -#ifndef VOICEMAILBOXDEFS_H -#define VOICEMAILBOXDEFS_H - -// INCLUDES -#include -#include - -/** Null service id, i.e. not specified service. */ -const TServiceId KVmbxServiceIdNone( 0 ); -/** Service id for CS voice mailbox */ -const TServiceId KVmbxServiceVoice( 0x01 ); -/** Service id for CS video mailbox */ -const TServiceId KVmbxServiceVideo( 0x01 ); -/** The max length of voice mailbox number */ -const TInt KVmbxMaxNumberLength = 100; - -/** Vmbx ALS line determination */ -enum TVmbxAlsLineType - { - /** - * Default line, meaning current active line. - */ - EVmbxAlsLineDefault, - /** - * Current ALS line is Line1. - */ - EVmbxAlsLine1, - /** - * Current ALS line is Line2. - */ - EVmbxAlsLine2 - }; - -/** Type of Voice Mailbox. */ -enum TVmbxType - { - /** - * None vmbx type. - */ - EVmbxNone = 0, - /** - * Voice type. - */ - EVmbxVoice, - /** - * Video type. - */ - EVmbxVideo, - /** - * Voip type. - */ - EVmbxVoip - }; - -/** Voice Mailbox feature flag definitions */ -enum TVmbxFeatureCapabilityFlag - { - /** - * Used to check whether user editing is allowed or not - */ - EVmbxChangeNbrAllowedOnUi = 0x01, - - /** - * Used to check whether video mailbox is supported or not - */ - EVmbxVideoMailboxSupported = 0x02 - }; - -/** Vmbx Memory location which is currently used */ -enum TVmbxMemoryLocation - { - /** - * Using phone memory. - */ - EVmbxPhoneMemory, - /** - * Using Sim memory. - */ - EVmbxSimMemory - }; - -/** Vmbx query type which currently wanted */ -enum TVmbxQueryMode - { - /** - * User want to define number. - */ - EVmbxDefineMode, - /** - * User want to change number. - */ - EVmbxChangeMode - }; - -#endif // VOICEMAILBOXDEFS_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/bwins/vmbxenginetestu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/bwins/vmbxenginetestu.def Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,3 @@ +EXPORTS + ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &) + diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/conf/ui_vmbxenginetest.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/conf/ui_vmbxenginetest.cfg Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,210 @@ +[Test] +title Test "Connect and Close VMBX engine" +create vmbxenginetest test + +// Connecting and closing. If this fails nothing can be tested. +test Connect +test Close + +delete test +[Endtest] + +[Test] +title Test "GetNumFromSpecialMem 111111" +create vmbxenginetest test + +test Connect +bringtoforeground + +test InitGetNumFromSpecialMem 111111 // save a number to the sim/phone memory +test TestGetNumFromSpecialMem 111111 // get the number we had just saved from the sim/phone memory, + // if not, the number should be saved to the incorect location in last step. + +test CleanupGetNumFromSpecialMem // revert the source number to sim/phone memory + +sendtobackground +test Close +delete test +[Endtest] + +[Test] +title Test "SelectTypeL" +create vmbxenginetest test + +test Connect +bringtoforeground + +test SelectTypeL + +sendtobackground +test Close +delete test +[Endtest] + +[Test] +title Test "Editing allowed" (Default configuration) +create vmbxenginetest test + +test Connect +bringtoforeground + +test ConfCenRepForEditAllowedL + +allownextresult 1 // must return 1 as user is allowed to change number +test AllowedToChangeTheNumber + +sendtobackground +test Close +delete test +[Endtest] + +// This case can be never passed on emulator, +// because the updating central repository is not supported by emulator. +// It has to be done on hardware. +[Test] +title Test "Editing not allowed" (Configuration needed) +create vmbxenginetest test + +test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1' + +test Connect +bringtoforeground + +allownextresult 0 // must return 0 as user is not allowed to change number +test AllowedToChangeTheNumber + +sendtobackground +test Close + +test RevertCenRepEditNotAllowedL // revert cenreq key + +delete test +[Endtest] + +// This case can be never passed on emulator, because sim feature is not supported. +// And the updating central repository is not supported by emulator. +// It has to be done on hardware. +[Test] +title Test "SIM only + note" (Operator configuration) +create vmbxenginetest test + +test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1' + +test Connect +bringtoforeground + +allownextresult 1 +test IsSimMemory // should return 1 in this config + +allownextresult 0 +test AllowedToChangeTheNumber // must return 0 as user is not allowed to change number + +test InitGetNumFromSpecialMem // This method should save a empty number to trigger a note to UI + +allownextresult -1 +test TestGetNumFromSpecialMem + +test CleanupGetNumFromSpecialMem // revert the source number to sim/phone memory + +sendtobackground +test Close + +test RevertCenRepEditNotAllowedL // revert cenreq key + +delete test +[Endtest] + +// This case can be never passed on emulator, because sim feature is not supported. +// And the updating central repository is not supported by emulator. +// It has to be done on hardware. +[Test] +title Test "SIM only: Saving number to the sim memory according to simulate OMA" (Operator configuration) +create vmbxenginetest test + +test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1' + +test Connect +bringtoforeground + +allownextresult 1 +test IsSimMemory // should return 1 in this config + +allownextresult 0 +test AllowedToChangeTheNumber // must return 0 as user is not allowed to change number + +test InitGetNumFromSpecialMem 123456 // save the number to sim memory +test TestGetNumFromSpecialMem 123456 // get the number we had just saved from the sim memory, + // if not, the number should be saved to the incorect location in last step. +test CleanupGetNumFromSpecialMem // revert the source number to sim memory + +sendtobackground +test Close + +test RevertCenRepEditNotAllowedL // revert cenreq key + +delete test +[Endtest] + +// This case can be never passed on emulator, because sim feature is not supported. +// And the updating central repository is not supported by emulator. +// It has to be done on hardware. +[Test] +title Test "SIM only: QueryVideoMbxNumber" (Operator configuration) +create vmbxenginetest test + +test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1' + +test Connect +bringtoforeground + +allownextresult -21 +test QueryVideoMbxNumber 0 // Should leave with KErrAccessDenied + +sendtobackground +test Close + +test RevertCenRepEditNotAllowedL // revert cenreq key + +delete test +[Endtest] + +// This case can be never passed on emulator, because sim feature is not supported. +// And the updating central repository is not supported by emulator. +// It has to be done on hardware. +[Test] +title Test "SIM only: QueryNumberL" (Operator configuration) +create vmbxenginetest test + +test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1' + +test Connect +bringtoforeground + +allownextresult -21 +test QueryNumberL 0 // Should leave with KErrAccessDenied + +sendtobackground +test Close + +test RevertCenRepEditNotAllowedL // revert cenreq key + +delete test +[Endtest] + +// This case can be never passed on emulator, +// because the video feature is not supported. +// It has to be done on hardware. +[Test] +title Test "GetVideoMbxNumber" +create vmbxenginetest test + +test Connect +bringtoforeground + +test GetVideoMbxNumber + +sendtobackground +test Close +delete test +[Endtest] + diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/eabi/vmbxenginetestu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/eabi/vmbxenginetestu.def Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,5 @@ +EXPORTS + _Z9LibEntryLR13CTestModuleIf @ 1 NONAME + _ZTI15CVmbxEngineTest @ 2 NONAME + _ZTV15CVmbxEngineTest @ 3 NONAME + diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,29 @@ +/* +* 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: For packing VMBXEngine test component. +* +*/ + + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +PRJ_TESTMMPFILES +vmbxenginetest.mmp + +PRJ_MMPFILES + + diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/group/vmbxenginetest.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/group/vmbxenginetest.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,47 @@ +/* +* 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: For packing VMBXEngine test component. +* +*/ + + +// To get the MW_LAYER_SYSTEMINCLUDE-definition +#include + +TARGET vmbxenginetest.dll +TARGETTYPE dll +DEFFILE vmbxenginetest.def + +CAPABILITY ALL -TCB +VENDORID 0x101FB657 +SECUREID 0x102073DB + +LIBRARY euser.lib +LIBRARY stiftestinterface.lib +LIBRARY vmbx.lib + +LIBRARY centralrepository.lib +LIBRARY cenrepnotifhandler.lib + +SOURCEPATH ..\src +SOURCE vmbxenginetest.cpp + +USERINCLUDE ..\inc + +MW_LAYER_SYSTEMINCLUDE + +// First UID is DLL UID, Second UID is STIF Test Framework UID +UID 0x1000A834 0x101FB3E7 + + diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/group/vmbxenginetest.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/group/vmbxenginetest.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -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: For packing VMBXEngine test component. + +;*Languages +&EN +; +;*Standard SIS file header. This section specifies the package name, +;application UID, and version/build numbers. Add the package TYPE here if needed. +#{"VMBX Engine test"},(0x1000A834),1,0,1; +; + +;*Unique (Non-Localised) Vendor name +;This is used in combination with signing to prevent the unauthroized +;upgrade ofa a package by someone other than the rightful vendor. +:"Nokia" + +;*Localized Vendor Name +;This specifies the localised vendor name(s) correspodning to language(s). +%{"Nokia Test EN"} + +;*Files To Copy... +"\epoc32\release\armv5\urel\vmbxenginetest.dll"-"c:\sys\bin\vmbxenginetest.dll" +"..\conf\ui_vmbxenginetest.cfg"-"c:\TestFramework\ui_vmbxenginetest.cfg" +;"..\init\TestFramework.ini"-"C:\TestFramework\TestFramework.ini" diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/inc/vmbxenginetest.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/inc/vmbxenginetest.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,244 @@ +/* +* 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: For packing VMBXEngine test component. +* +*/ + +#ifndef CVMBXENGINETEST_H +#define CVMBXENGINETEST_H + +#define STIFTEST + +#include +#include +#include + +class RVmbxNumber; + +class CRepository; +class MCenRepNotifyHandlerCallback; +class CCenRepNotifyHandler; + +// Logging path +_LIT( KLogPath, "\\logs\\testframework\\vmbxenginetest\\" ); +// Log file +_LIT( KLogFile, "vmbxenginetest.txt" ); + + +/** +* Test class for VMBX Engine +* +* @lib vmbxenginetest.dll +* @since S60 5.1 +*/ +class CVmbxEngineTest : public CScriptBase, public MCenRepNotifyHandlerCallback + { +public: + + /** + * Two-phased constructor. + */ + static CVmbxEngineTest* NewL( CTestModuleIf& aTestModuleIf ); + + /** + * Destructor. + */ + virtual ~CVmbxEngineTest(); + + /** + * From CScriptBase Runs a script line. + * + * @since S60 5.1 + * @param aItem Script line containing method name and parameters + * @return Symbian OS error code + */ + TInt RunMethodL( CStifItemParser& aItem ); + +private: // Methods for engine + + /** + * C++ default constructor. + */ + CVmbxEngineTest( CTestModuleIf& aTestModuleIf ); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(); + + /** + * Calls RVmbxNumber::Connect + * + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt Connect( CStifItemParser& aItem ); + + /** + * Calls RVmbxNumber::Close + * + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt Close( CStifItemParser& aItem ); + + /** + * Calls RVmbxNumber::AllowedToChangeTheNumber + * + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt AllowedToChangeTheNumber( CStifItemParser& aItem ); + + /** + * Calls RVmbxNumber::SelectTypeL + * + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt SelectTypeL( CStifItemParser& aItem ); + + /** + * Calls RVmbxNumber::IsSimMemory + * + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt IsSimMemory( CStifItemParser& aItem ); + + /** + * Calls RVmbxNumber::QueryVideoMbxNumber + * + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt QueryVideoMbxNumber( CStifItemParser& aItem ); + + /** + * Calls RVmbxNumber::QueryNumberL + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt QueryNumberL( CStifItemParser& aItem ); + + /** + * Calls RVmbxNumber::GetVideoMbxNumber + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt GetVideoMbxNumber( CStifItemParser& aItem ); + +private: + /** + * Calls ConfCenRepForEditNotAllowedL + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt ConfCenRepForEditNotAllowedL( CStifItemParser& aItem ); + + /** + * Calls RevertCenRepEditNotAllowedL + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt RevertCenRepEditNotAllowedL( CStifItemParser& aItem ); + + /** + * Calls ConfCenRepForEditAllowedL + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt ConfCenRepForEditAllowedL( CStifItemParser& aItem ); + + /** + * Calls InitGetNumFromSpecialMem + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt InitGetNumFromSpecialMem( CStifItemParser& aItem ); + + /** + * Calls TestGetNumFromSpecialMem + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt TestGetNumFromSpecialMem( CStifItemParser& aItem ); + + /** + * Calls CleanupGetNumFromSpecialMem + * @since S60 5.1 + * @param aItem, Script line containing method name and parameters + * @return TInt, KErrNone if OK, other values if a failure happens + */ + TInt CleanupGetNumFromSpecialMem( CStifItemParser& aItem ); + + /** + * Save the source number temporarily + * @since S60 5.1 + */ + void SaveSourceNumber(); + + /** + * Create central repository for session and handler + * @since S60 5.1 + */ + void CreateCentralRepositoryL(); + +private: // Data + + /** + * Pointer to logger + * Own. + */ + CStifLogger * iLog; + + /** + * Pointer to engine + * Own. + */ + RVmbxNumber *iVmbxNumber; + + /** + * Pointer to repository + * Own. + */ + CRepository* iSession; + + /** + * Pointer to cenreqnotifyhandler + * Own. + */ + CCenRepNotifyHandler* iNotifyHandler; + + /** + * Pointer to HBufC for mailbox number + * Own. + */ + HBufC* iNumberBuf; + }; + +#endif // CVMBXEngineTestTEST_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/init/TestFramework.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/init/TestFramework.ini Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,219 @@ +# +# This is STIF initialization file +# Comment lines start with '#'-character. +# See STIF TestFramework users guide.doc for instructions + +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +# Set following test engine settings: +# - Set Test Reporting mode. TestReportMode's possible values are: +# + 'Summary': Summary of the tested test cases. +# + 'Environment': Hardware and software info. +# + 'TestCases': Test case report. +# + 'FullReport': Set of all above ones. +# + Example 'TestReportMode= Summary TestCases' +# +# - CreateTestReport setting controls report creation mode +# + YES, Test report will created. +# + NO, No Test report. +# +# - File path indicates the base path of the test report. +# - File name indicates the name of the test report. +# +# - File format indicates the type of the test report. +# + TXT, Test report file will be txt type, for example 'TestReport.txt'. +# + HTML, Test report will be html type, for example 'TestReport.html'. +# + XML, Test report will be xml type, for example 'TestReport.xml'. +# Note, that xml format is available only when output is set to FILE. +# +# - File output indicates output source of the test report. +# + FILE, Test report logging to file. +# + RDEBUG, Test report logging to using rdebug. +# +# - File Creation Mode indicates test report overwriting if file exist. +# + OVERWRITE, Overwrites if the Test report file exist. +# + APPEND, Continue logging after the old Test report information if +# report exist. +# - Sets a device reset module's dll name(Reboot). +# + If Nokia specific reset module is not available or it is not correct one +# StifHWResetStub module may use as a template for user specific reset +# module. +# - Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation +# DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02 +# + +[Engine_Defaults] + +TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment', + # 'TestCases' or 'FullReport' + +CreateTestReport= YES # Possible values: YES or NO + +TestReportFilePath= C:\LOGS\TestFramework\ +TestReportFileName= TestReport + +TestReportFormat= TXT # Possible values: TXT, HTML or XML +TestReportOutput= FILE # Possible values: FILE or RDEBUG +TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND + +DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting + +DisableMeasurement= stifmeasurementdisablenone # Possible values are: + # 'stifmeasurementdisablenone', 'stifmeasurementdisableall' + # 'stifmeasurementplugin01', 'stifmeasurementplugin02', + # 'stifmeasurementplugin03', 'stifmeasurementplugin04', + # 'stifmeasurementplugin05' or 'stifbappeaprofiler' + +Timeout= 0 # Default timeout value for each test case. In milliseconds +UITestingSupport= YES # Possible values: YES or NO +#SeparateProcesses= YES # Possible values: YES or NO (default: NO) +[End_Defaults] +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + + + +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +# Module configurations start +# Modules are added between module tags +# tags. Module name is specified after ModuleName= tag, like +# ModuleName= XXXXXXXXX +# Modules might have initialisation file, specified as +# IniFile= c:\testframework\YYYYYY +# Modules might have several configuration files, like +# TestCaseFile= c:\testframework\NormalCases.txt +# TestCaseFile= c:\testframework\SmokeCases.txt +# TestCaseFile= c:\testframework\ManualCases.txt + +# (TestCaseFile is synonym for old term ConfigFile) + +# Following case specifies demo module settings. Demo module +# does not read any settings from file, so tags +# IniFile and TestCaseFile are not used. +# In the simplest case it is enough to specify only the +# name of the test module when adding new test module + +[New_Module] +ModuleName= testscripter +TestCaseFile= c:\testframework\ui_vmbxenginetest.cfg + +[End_Module] + + +# Load testmoduleXXX, optionally with initialization file and/or test case files +#[New_Module] +#ModuleName= testmodulexxx + +#TestModuleXXX used initialization file +#IniFile= c:\testframework\init.txt + +#TestModuleXXX used configuration file(s) +#TestCaseFile= c:\testframework\testcases1.cfg +#TestCaseFile= c:\testframework\testcases2.cfg +#TestCaseFile= c:\testframework\manualtestcases.cfg + +#[End_Module] +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + + + +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +# Set STIF logging overwrite parameters for Logger. +# Hardware and emulator environment logging path and styles can +# be configured from here to overwrite the Logger's implemented values. +# +# Settings description: +# - Indicates option for creation log directory/directories. If log directory/directories +# is/are not created by user they will make by software. +# + YES, Create log directory/directories if not allready exist. +# + NO, Log directory/directories not created. Only created one is used. +# +# - Overwrite emulator path setting. +# + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined +# Logger's path 'D:\\LOGS\\Module\\' with those definition the path +# will be 'C:\LOGS\TestFramework\LOGS\Module\' +# +# - Overwrite emulator's logging format. +# + TXT, Log file(s) will be txt type(s), for example 'Module.txt'. +# + HTML, Log file(s) will be html type(s), for example 'Module.html'. +# +# - Overwrited emulator logging output source. +# + FILE, Logging to file(s). +# + RDEBUG, Logging to using rdebug(s). +# +# - Overwrite hardware path setting (Same description as above in emulator path). +# - Overwrite hardware's logging format(Same description as above in emulator format). +# - Overwrite hardware's logging output source(Same description as above in emulator output). +# +# - File Creation Mode indicates file overwriting if file exist. +# + OVERWRITE, Overwrites if file(s) exist. +# + APPEND, Continue logging after the old logging information if file(s) exist. +# +# - Will thread id include to the log filename. +# + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'. +# + NO, No thread id to log file(s), Example filename 'Module.txt'. +# +# - Will time stamps include the to log file. +# + YES, Time stamp added to each line in log file(s). Time stamp is +# for example'12.Nov.2003 115958 LOGGING INFO' +# + NO, No time stamp(s). +# +# - Will line breaks include to the log file. +# + YES, Each logging event includes line break and next log event is in own line. +# + NO, No line break(s). +# +# - Will event ranking include to the log file. +# + YES, Event ranking number added to each line in log file(s). Ranking number +# depends on environment's tics, for example(includes time stamp also) +# '012 12.Nov.2003 115958 LOGGING INFO' +# + NO, No event ranking. +# +# - Will write log file in unicode format. +# + YES, Log file will be written in unicode format +# + NO, Log will be written as normal, not unicode, file. +# + +[Logger_Defaults] + +#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' +#NOTE: TestEngine and TestServer logging settings cannot change here + +#CreateLogDirectories= YES # Possible values: YES or NO + +#EmulatorBasePath= C:\LOGS\TestFramework\ +#EmulatorFormat= HTML # Possible values: TXT or HTML +#EmulatorOutput= FILE # Possible values: FILE or RDEBUG + +#HardwareBasePath= D:\LOGS\TestFramework\ +#HardwareFormat= HTML # Possible values: TXT or HTML +#HardwareOutput= FILE # Possible values: FILE or RDEBUG + +#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND + +#ThreadIdToLogFile= YES # Possible values: YES or NO +#WithTimeStamp= YES # Possible values: YES or NO +#WithLineBreak= YES # Possible values: YES or NO +#WithEventRanking= YES # Possible values: YES or NO + +#FileUnicode= YES # Possible values: YES or NO +#AddTestCaseTitle= YES # Possible values: YES or NO +[End_Logger_Defaults] +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + + + +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +# Set filters to be used by ConsoleUI. +# If you want to use filter with ConsoleUI, simply remove comments +# from section below and provide valid filter entries. +# Each filter line has to start with "filter= " keyword. +# Filter can contain special wildcard characters: +# * which stands for none or any literal; +# ? which stands for single character. +# Filters are not case-sensitive. + +#[Filters] +#filter= *math* +#filter= *radio* +#[End_Filters] +# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +# End of file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.cpp --- a/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,336 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the Mt_vmbxEngine class -* -*/ - -//qt -#include -//hb -#include -#include -#include -//symbian -#include - -#include -#include -#include -#include - -#include "mt_vmbxengine.h" - - -/*------------------------------------------------------------------------------ -This module testing project links to vmbxengine.dll. -------------------------------------------------------------------------------*/ - -// ----------------------------------------------------------------------------- -// Constants for verifying test case results -// ----------------------------------------------------------------------------- -// -_LIT(KVmbxNumber,"123456789"); - - // ----------------------------------------------------------------------------- -// Mt_SatAppEngine::Mt_vmbxEngine -// Default constructor, remember to null new members here. -// ----------------------------------------------------------------------------- -// -Mt_vmbxEngine::Mt_vmbxEngine() -{ - qDebug("Mt_vmbxEngine::Mt_vmbxEngine >"); - qDebug("Mt_vmbxEngine::Mt_vmbxEngine <"); -} - -// ----------------------------------------------------------------------------- -// Mt_SatAppEngine::~Mt_SatAppEngine -// ----------------------------------------------------------------------------- -Mt_vmbxEngine::~Mt_vmbxEngine() -{ - qDebug("Mt_vmbxEngine::~Mt_vmbxEngine >"); - qDebug("Mt_vmbxEngine::~Mt_vmbxEngine <"); -} - - -// ----------------------------------------------------------------------------- -// Mt_SatAppEngine::initTestCase -// QTestLib initialization method, called for each test case. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::initTestCase() -{ - qDebug("Mt_vmbxEngine::initTestCase >"); - qDebug("Mt_vmbxEngine::initTestCase <"); -} - - -// ----------------------------------------------------------------------------- -// Mt_SatAppEngine::cleanupTestCase -// QTestLib cleanup method, called for each test case. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::cleanupTestCase() -{ - qDebug("Mt_SatAppEngine::cleanupTestCase >"); - qDebug("Mt_SatAppEngine::cleanupTestCase <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testCreateVmbxEntry -// testCreateVmbxEntry test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testCreateVmbxEntry() -{ - qDebug("Mt_vmbxEngine::testCreateVmbxEntry >"); - TRAPD( err, mVmbxEntry = CVoiceMailboxEntry::NewL()); - QVERIFY2(KErrNone == err, "create CVoiceMailboxEntry failed "); - qDebug("Mt_vmbxEngine::testCreateVmbxEntry <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testCreateVmbxMailbox -// CreateVmbxMailbox test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testCreateVmbxMailbox() -{ - qDebug("Mt_vmbxEngine::testCreateVmbxMailbox >"); - TRAPD( err, mVmbxEngine = CVoiceMailbox::NewL()); - QVERIFY2(KErrNone == err, "create CVoiceMailbox failed "); - qDebug("Mt_vmbxEngine::testCreateVmbxMailbox <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testCheckConfiguration -// CreateVmbxMailbox test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testCheckConfiguration() -{ - qDebug("Mt_vmbxEngine::testCheckConfiguration >"); - TVoiceMailboxParams params; - params.iType = EVmbxVoice; - TBool result = - mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrAllowedOnUi); - if (!result) { - qDebug("Mt_vmbxEngine::testCheckConfiguration: voice not allowed changed"); - QEXPECT_FAIL("","testCheckConfiguration voice not allowed changed", Continue); - } - params.iType = EVmbxVideo; - result = - mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrAllowedOnUi); - if (!result) { - qDebug( "Mt_vmbxEngine::testCheckConfiguration: video not allowed changed"); - QEXPECT_FAIL("","testCheckConfiguration video not allowed changed", Continue); - } - params.iType = EVmbxVoip; - result = - mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrAllowedOnUi); - if (result) { - QFAIL ("testCheckConfiguration voip failed"); - } - qDebug("Mt_vmbxEngine::testCheckConfiguration <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testCreateWindow -// testCreateWindow test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testCreateWindow() -{ - qDebug("Mt_vmbxEngine::testCreateWindow >"); - mWindow = new HbMainWindow(); - QVERIFY(mWindow); - mWindow->show(); - qDebug("Mt_vmbxEngine::testCreateWindow <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testSaveProvisionedEntry -// testSaveProvisionedEntry test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testSaveProvisionedEntry() -{ - qDebug("Mt_vmbxEngine::testSaveProvisionedEntry >"); - QVERIFY(mVmbxEngine); - QVERIFY(mVmbxEntry); - TVoiceMailboxParams params; - params.iType = EVmbxVoice; - CVoiceMailboxEntry* storedEntry = 0; - TInt result(0); - if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrAllowedOnUi)) { - qDebug("Mt_vmbxEngine::testSaveProvisionedEntry voice"); - result = mVmbxEngine->GetStoredEntry(params,storedEntry); - if (KErrNotFound == result) { - mVmbxEntry->SetVmbxNumber(KNullDesC); - } else if(KErrNone == result) { - mVmbxEntry->SetVmbxNumber(KVmbxNumber); - } else { - QFAIL("Mt_vmbxEngine::testSaveProvisionedEntry: voice \ - GetStoredEntry failed"); - } - mVmbxEntry->SetVoiceMailboxType(EVmbxVoice); - result = mVmbxEngine->SaveProvisionedEntry(*mVmbxEntry); - QCOMPARE(result, KErrNone); - } - params.iType = EVmbxVideo; - if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrAllowedOnUi)) { - qDebug("Mt_vmbxEngine::testSaveProvisionedEntry video"); - result = mVmbxEngine->GetStoredEntry(params,storedEntry); - if (KErrNotFound == result) { - mVmbxEntry->SetVmbxNumber(KNullDesC); - } else if (KErrNone == result){ - TPtrC vmbxNumber(KNullDesC); - storedEntry->GetVmbxNumber(vmbxNumber); - mVmbxEntry->SetVmbxNumber(vmbxNumber); - } else { - QFAIL("Mt_vmbxEngine::testSaveProvisionedEntry video \ - GetStoredEntry failed"); - } - mVmbxEntry->SetVoiceMailboxType(EVmbxVideo); - result = mVmbxEngine->SaveProvisionedEntry(*mVmbxEntry); - QCOMPARE(result, KErrNone); - } - delete storedEntry; - storedEntry = 0; - qDebug("Mt_vmbxEngine::testSaveProvisionedEntry <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testQueryVmbxMailbox -// CreateVmbxMailbox test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testQueryVmbxMailbox() -{ - qDebug("Mt_vmbxEngine::testQueryVmbxMailbox >"); - TVoiceMailboxParams params; - // test QueryVmbxType - TInt result = mVmbxEngine->QueryVmbxType(params); - CVoiceMailboxEntry* vmbxEntry = 0; - if (KErrNotFound == result) { - qDebug("Mt_vmbxEngine::testQueryVmbxMailbox no number defined"); - // test QueryNewEntry - result = mVmbxEngine->QueryNewEntry( params, vmbxEntry ); - //QVERIFY2(KErrNone == result, "QueryNewEntry Failed."); - if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrAllowedOnUi) - && KErrNone == result) { - // test SaveEntry - result = mVmbxEngine->SaveEntry( *vmbxEntry ); - QVERIFY2(KErrNone == result, "SaveEntry Failed."); - } - } else if (KErrNone == result) { - qDebug("Mt_vmbxEngine::testQueryVmbxMailbox change number"); - // test change entry - result = mVmbxEngine->QueryChangeEntry( params, vmbxEntry ); - //QVERIFY2(KErrNone == result, "QueryChangeEntry Failed."); - if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrAllowedOnUi) - && KErrNone == result ) { - result = mVmbxEngine->SaveEntry( *vmbxEntry ); - QVERIFY2(KErrNone == result, "SaveEntry Failed."); - // test GetStoredEntry - CVoiceMailboxEntry* storedEntry = 0; - result = mVmbxEngine->GetStoredEntry(params,storedEntry); - QVERIFY2(KErrNone == result, "GetStoredEntry Failed."); - TPtrC storedNumber(KNullDesC); - result = storedEntry->GetVmbxNumber(storedNumber); - QVERIFY2(KErrNone == result, "GetVmbxNumber Failed."); - TPtrC vmbxNumber(KNullDesC); - vmbxEntry->GetVmbxNumber(vmbxNumber); - QVERIFY2(storedNumber.Compare(vmbxNumber)==0, "number not match"); - delete storedEntry; - storedEntry = 0; - } - } else { - QFAIL("Mt_vmbxEngine::testQueryVmbxMailbox: QueryVmbxType failed"); - } - delete vmbxEntry; - vmbxEntry = 0; - qDebug("Mt_vmbxEngine::testQueryVmbxMailbox <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testNotifyVmbxNumberChange -// testNotifyVmbxNumberChange test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testNotifyVmbxNumberChangeCancel() -{ - qDebug("Mt_vmbxEngine::testNotifyVmbxNumberChangeCancel >"); - mVmbxEngine->NotifyVmbxNumberChangeCancel(); - qDebug("Mt_vmbxEngine::testNotifyVmbxNumberChangeCancel <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testDeleteWindow -// testDeleteWindow test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testDeleteWindow() -{ - qDebug("Mt_vmbxEngine::testDeleteWindow >"); - delete mWindow; - mWindow = 0; - qDebug("Mt_vmbxEngine::testDeleteWindow <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testDeleteVmbxMailbox -// testDeleteVmbxMailbox test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testDeleteVmbxMailbox() -{ - qDebug("Mt_vmbxEngine::testDeleteVmbxMailbox >"); - delete mVmbxEngine; - mVmbxEngine = 0; - qDebug("Mt_vmbxEngine::testDeleteVmbxMailbox <"); -} - -// ----------------------------------------------------------------------------- -// Mt_vmbxEngine::testDeleteVmbxEntry -// testDeleteVmbxEntry test case -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Mt_vmbxEngine::testDeleteVmbxEntry() -{ - qDebug("Mt_vmbxEngine::testDeleteVmbxEntry >"); - delete mVmbxEntry; - mVmbxEntry = 0; - qDebug("Mt_vmbxEngine::testDeleteVmbxEntry <"); -} - -// ----------------------------------------------------------------------------- -// main() -// Main method implemented for directing test output to a file. -// ----------------------------------------------------------------------------- -int main(int argc, char *argv[]) - { - qDebug("Mt_vmbxEngine.cpp: main() >"); - QApplication app(argc, argv); - - qDebug("Mt_vmbxEngine.cpp: Mt_vmbxEngine"); - Mt_vmbxEngine tc; - char *pass[3]; - pass[0] = argv[0]; - pass[1] = "-o"; - pass[2] = "c:\\logs\\vmbx\\mt_vmbxengine.txt"; - const int result = QTest::qExec(&tc, 3, pass); - - qDebug("Mt_vmbxEngine.cpp: main() <, result=%d", result); - return result; - } - -//End file diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.h --- a/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the Mt_vmbxEngine class -* -*/ - - -#ifndef _MT_VMBXENGINE_H -#define _MT_VMBXENGINE_H - -#include -#include -#include -#include -#include -#include - - -// Class forwards -class CVoiceMailboxEntry; -class CVoiceMailbox; -class HbMainWindow; - - -/** - * Mt_vmbxEngine module test class. - * - * Tests Mt_vmbxEngine interface. - * See cpp file for more information. - * - * @lib mt_vmbxngine.lib - */ -class Mt_vmbxEngine : public QObject -{ - Q_OBJECT - -public: - Mt_vmbxEngine(); - - virtual ~Mt_vmbxEngine(); - -private slots: - - /*! - Called before the first testfunction is executed. - */ - void initTestCase(); - - /*! - Called after the last testfunction has been executed. - */ - void cleanupTestCase(); - - /*! - Create an empty vmbx entry - */ - void testCreateVmbxEntry(); - - /*! - Create CVoiceMailbox Api - */ - void testCreateVmbxMailbox(); - - /*! - Test middle case,CheckConfiguration - */ - void testCheckConfiguration(); - - /** - * Test middle case,CreateWindow - * - * provide window for UI - */ - void testCreateWindow(); - - - /** - * Test middle case,SaveProvisionedEntry - * - */ - void testSaveProvisionedEntry(); - - /** - * Test middle case,query VmbxMailbox - * - */ - void testQueryVmbxMailbox(); - - /** - * Test middle case,cancel observer for vmbx number changed - * - */ - void testNotifyVmbxNumberChangeCancel(); - - /** - * Test middle case,delete HbMainWindow - * - */ - void testDeleteWindow(); - - /** - * Test middle case,delete CVoiceMailbox - */ - void testDeleteVmbxMailbox(); - - /** - * Test last case,delete CVoiceMailboxEntry - */ - void testDeleteVmbxEntry(); - -private: //data - - /** - * Own. - */ - CVoiceMailboxEntry* mVmbxEntry; - - /** - * Own. - */ - CVoiceMailbox* mVmbxEngine; - - /** - * Own. - */ - HbMainWindow* mWindow; -}; - -#endif // _MT_VMBXENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.pro --- a/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -# -# Copyright (c) 2009-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: -# - -TEMPLATE = app -TARGET = mt_vmbxengine -DEPENDPATH += . -INCLUDEPATH += . -CONFIG += hb -CONFIG += qtestlib - -symbian: { - TARGET.CAPABILITY = CAP_GENERAL_DLL -} - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \ - /epoc32/include/mw/QtTest \ - ../../inc - - LIBS += -lvmbxengine.dll -} - -# Input -HEADERS += mt_vmbxengine.h -SOURCES += mt_vmbxengine.cpp - diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/tsrc/src/vmbxenginetest.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/src/vmbxenginetest.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,453 @@ +/* +* 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: For packing VMBXEngine test component. +* +*/ + + +// INCLUDE FILES +#include +#include +#include +#include +#include + +#include "vmnumber.h" +#include "vmbxenginetest.h" + +// ======== MEMBER FUNCTIONS ======== + +const TUid KUidVoiceMailbox = {0x101F874F}; +const TUint32 KVmUIKeyOpts = 0x00000010; + + +const TInt KVmUIKeyOptsForSimOnly = 1; +const TInt KVmDefaultUIKeyOpts = 0; + +// --------------------------------------------------------------------------- +// C++ default constructor can NOT contain any code, that +// might leave. +// --------------------------------------------------------------------------- +// +CVmbxEngineTest::CVmbxEngineTest( CTestModuleIf& aTestModuleIf ) : + CScriptBase( aTestModuleIf ), iSession( NULL ), iNotifyHandler( NULL ) + { + } + +// --------------------------------------------------------------------------- +// ConstructL +// --------------------------------------------------------------------------- +// +void CVmbxEngineTest::ConstructL() + { + // Constructing static buffer size logger, needed with OOM testing because + // normally logger allocates memory from heap! + iLog = CStifLogger::NewL( KLogPath, + KLogFile, + CStifLogger::ETxt, + CStifLogger::EFile, + EFalse, + ETrue, + ETrue, + EFalse, + ETrue, + EFalse, + 100 ); + iLog->Log( _L( "CVmbxEngineTest logging starts!" ) ); + } + +// --------------------------------------------------------------------------- +// NewL creates a new test module +// --------------------------------------------------------------------------- +// +CVmbxEngineTest* CVmbxEngineTest::NewL( CTestModuleIf& aTestModuleIf ) + { + CVmbxEngineTest* self = new ( ELeave ) CVmbxEngineTest( aTestModuleIf ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CVmbxEngineTest::~CVmbxEngineTest() + { + if ( iLog ) + { + iLog->Log( _L( "###### TEST MODULE CLOSED #######" ) ); + delete iLog; + } + + delete iVmbxNumber; + + if ( iNotifyHandler ) + { + iNotifyHandler->StopListening(); + delete iNotifyHandler; + } + + delete iSession; + delete iNumberBuf; + } + +// --------------------------------------------------------------------------- +// From class CScriptBase. +// Runs a script line +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::RunMethodL( CStifItemParser& aItem ) + { + static TStifFunctionInfo const KFunctions[] = + { + ENTRY( "Connect", CVmbxEngineTest::Connect ), + ENTRY( "Close", CVmbxEngineTest::Close ), + // test RVmbxNumber APIs + ENTRY( "AllowedToChangeTheNumber", + CVmbxEngineTest::AllowedToChangeTheNumber ), + ENTRY( "SelectTypeL", CVmbxEngineTest::SelectTypeL ), + ENTRY( "IsSimMemory", CVmbxEngineTest::IsSimMemory ), + ENTRY( "QueryVideoMbxNumber", CVmbxEngineTest::QueryVideoMbxNumber ), + ENTRY( "QueryNumberL", CVmbxEngineTest::QueryNumberL ), + ENTRY( "GetVideoMbxNumber", CVmbxEngineTest::GetVideoMbxNumber ), + ENTRY( "ConfCenRepForEditNotAllowedL", + CVmbxEngineTest::ConfCenRepForEditNotAllowedL ), + ENTRY( "RevertCenRepEditNotAllowedL", + CVmbxEngineTest::RevertCenRepEditNotAllowedL ), + ENTRY( "ConfCenRepForEditAllowedL", + CVmbxEngineTest::ConfCenRepForEditAllowedL ), + ENTRY( "InitGetNumFromSpecialMem", + CVmbxEngineTest::InitGetNumFromSpecialMem ), + ENTRY( "TestGetNumFromSpecialMem", + CVmbxEngineTest::TestGetNumFromSpecialMem ), + ENTRY( "CleanupGetNumFromSpecialMem", + CVmbxEngineTest::CleanupGetNumFromSpecialMem ) + }; + + const TInt count = sizeof( KFunctions ) / + sizeof( TStifFunctionInfo ); + + return RunInternalL( KFunctions, count, aItem ); + } + +// --------------------------------------------------------------------------- +// Calls CVmbxEngineTest::Connect method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::Connect( CStifItemParser& /*aItem*/ ) + { + TInt error = KErrAlreadyExists; + if ( !iVmbxNumber ) + { + iVmbxNumber = new RVmbxNumber(); + if ( iVmbxNumber ) + { + iLog->Log( _L( "Opening.." ) ); + error = iVmbxNumber->Open(); + if ( KErrNone == error ) + { + // save the source number temporarily + // so that it will be used while some cases are reverted. + SaveSourceNumber(); + } + } + } + iLog->Log( _L( "Connecting done, %d" ), error ); + return error; + } + +// --------------------------------------------------------------------------- +// Calls CVmbxEngineTest::Close method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::Close( CStifItemParser& /*aItem*/ ) + { + iLog->Log( _L( "Closing.." ) ); + + if ( iVmbxNumber ) + { + iVmbxNumber->Close(); + delete iVmbxNumber; + iVmbxNumber = NULL; + + if ( iNumberBuf ) + { + delete iNumberBuf; + iNumberBuf = NULL; + } + } + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CVmbxEngineTest::AllowedToChangeTheNumber method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::AllowedToChangeTheNumber( CStifItemParser& /*aItem*/ ) + { + TInt result( KErrNone ); + result = iVmbxNumber->AllowedToChangeTheNumber(); + + iLog->Log( _L( "AllowedToChangeTheNumber return %d" ), result); + return result; + } + +// --------------------------------------------------------------------------- +// CVmbxEngineTest::SelectTypeL method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::SelectTypeL( CStifItemParser& /*aItem*/ ) + { + TInt result( KErrNone ); + TRAP( result, iVmbxNumber->SelectTypeL( EVmbxDefine ) ); + + iLog->Log( _L( "SelectTypeL return result %d" ), result ); + return result; + } + +// --------------------------------------------------------------------------- +// CVmbxEngineTest::IsSimMemory method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::IsSimMemory( CStifItemParser& /*aItem*/ ) + { + // Use allownextresult keyword in config file to control what is expected + // return value in your test case. + TInt result( KErrNone ); + result = iVmbxNumber->IsSimMemory(); + iLog->Log( _L( "IsSimMemory return %d" ), result ); + return result; + } + +// --------------------------------------------------------------------------- +// CVmbxEngineTest::QueryVideoMbxNumber method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::QueryVideoMbxNumber( CStifItemParser& aItem ) + { + // Use allownextresult keyword in config file to control what is expected + // return value in your test case. + TInt result( KErrNone ); + TBuf< KVmbxMaxNumberLength > number; + + TInt queryType( KErrNone ); + aItem.GetNextInt( queryType ); + + TRAP( result, iVmbxNumber->QueryVideoMbxNumberL( + ( TVmbxQueryType )queryType, number ) ); + + iLog->Log( _L( "QueryVideoMbxNumber return %d" ), result ); + return result; + } + +// --------------------------------------------------------------------------- +// CVmbxEngineTest::QueryNumberL method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::QueryNumberL( CStifItemParser& aItem ) + { + // Use allownextresult keyword in config file to control what is expected + // return value in your test case. + TInt result( KErrNone ); + TBuf< KVmbxMaxNumberLength > number; + + TInt queryType( KErrNone ); + aItem.GetNextInt( queryType ); + + TRAP( result, iVmbxNumber->QueryNumberL( ( TVmbxQueryType )queryType, + number, EFalse ) ); + + iLog->Log( _L( "QueryNumberL return %d" ), result ); + return result; + } + +// --------------------------------------------------------------------------- +// CVmbxEngineTest::GetVideoMbxNumber method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::GetVideoMbxNumber( CStifItemParser& /*aItem*/ ) + { + // Use allownextresult keyword in config file to control what is expected + // return value in your test case. + TInt result( KErrNone ); + TBuf< KVmbxMaxNumberLength > number; + + result = iVmbxNumber->GetVideoMbxNumber( number ); + + iLog->Log( _L( "GetVideoMbxNumber return %d" ), result ); + return result; + } + +// --------------------------------------------------------------------------- +// Calls CVmbxEngineTest::ConfCenRepForEditNotAllowedL method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::ConfCenRepForEditNotAllowedL( CStifItemParser& /*aItem*/ ) + { + TInt ret( KErrNone ); + // create central repository for session and handler + CreateCentralRepositoryL(); + + // configurate the key for the special condition like "sim only" + ret = iSession->Set( KVmUIKeyOpts, KVmUIKeyOptsForSimOnly ); + + iLog->Log( _L( "ConfCenRepForEditNotAllowedL %d" ), ret ); + return ret; + } + +// --------------------------------------------------------------------------- +// Calls CVmbxEngineTest::RevertCenRepEditNotAllowedL method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::RevertCenRepEditNotAllowedL( CStifItemParser& /*aItem*/ ) + { + TInt ret( KErrNone ); + // reset the key to default value + ret = iSession->Set( KVmUIKeyOpts, KVmDefaultUIKeyOpts ); + iLog->Log( _L( "RevertCenRepEditNotAllowedL %d" ), ret ); + return ret; + } + +// --------------------------------------------------------------------------- +// Calls CVmbxEngineTest::ConfCenRepForEditAllowedL method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::ConfCenRepForEditAllowedL( CStifItemParser& /*aItem*/ ) + { + TInt ret( KErrNone ); + // create central repository for session and handler + CreateCentralRepositoryL(); + + // configurate the key for the special condition like "sim only" + ret = iSession->Set( KVmUIKeyOpts, KVmDefaultUIKeyOpts ); + + iLog->Log( _L( "ConfCenRepForEditAllowedL %d" ), ret ); + return ret; + } + +// --------------------------------------------------------------------------- +// Calls CVmbxEngineTest::InitGetNumFromSpecialMem method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::InitGetNumFromSpecialMem( CStifItemParser& aItem ) + { + TInt ret( KErrNone ); + + // Get number from Script file + TPtrC numberFromScript; + aItem.GetNextString( numberFromScript ); + iLog->Log( _L( "InitGetNumFromSpecialMem saving number %S" ), + &numberFromScript ); + + // the number need to be saved to the sim/phone memory + // to init the special case + ret = iVmbxNumber->SaveVmbxNumber( numberFromScript, + EAlsActiveLineEntry ); + + iLog->Log( _L( "InitGetNumFromSpecialMem return %d" ), ret ); + return ret; + } + +// --------------------------------------------------------------------------- +// Calls CVmbxEngineTest::TestGetNumFromSpecialMem method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::TestGetNumFromSpecialMem( CStifItemParser& aItem ) + { + TInt ret( KErrNotFound ); + TBuf< KVmbxMaxNumberLength > number; + // Use allownextresult keyword in config file to control what is expected + // return value in your test case. + + TPtrC numberFromScript; + aItem.GetNextString( numberFromScript ); + iLog->Log( _L( "TestGetNumFromSpecialMem saving number %S" ), + &numberFromScript ); + + ret = iVmbxNumber->GetVmbxNumber( number ); + if ( KErrNone == ret && KErrNone == number.Compare( numberFromScript ) ) + { + ret = KErrNone; + } + + iLog->Log( _L( "TestGetNumFromSpecialMem number %S" ), &number ); + iLog->Log( _L( "TestGetNumFromSpecialMem return %d" ), ret ); + return ret; + } + +// --------------------------------------------------------------------------- +// Calls CVmbxEngineTest::CleanupGetNumFromSpecialMem method +// --------------------------------------------------------------------------- +// +TInt CVmbxEngineTest::CleanupGetNumFromSpecialMem( CStifItemParser& /*aItem*/ ) + { + TInt ret( KErrNone ); + // revert the source number to sim/phone memory + ret = iVmbxNumber->SaveVmbxNumber( *iNumberBuf, + EAlsActiveLineEntry ); + + iLog->Log( _L( "CleanupGetNumFromSpecialMem return %d" ), ret ); + return ret; + } + +// --------------------------------------------------------------------------- +// Save the source number temporarily +// --------------------------------------------------------------------------- +// +void CVmbxEngineTest::SaveSourceNumber() + { + iNumberBuf = HBufC::New( KVmbxMaxNumberLength ); + if ( iNumberBuf ) + { + TPtr ptr( iNumberBuf->Des() ); + iVmbxNumber->GetVmbxNumber( ptr ); + } + } + +// --------------------------------------------------------------------------- +// Create central repository for session and handler +// --------------------------------------------------------------------------- +// +void CVmbxEngineTest::CreateCentralRepositoryL() + { + if ( !iSession ) + { + // create central repository + iSession = CRepository::NewL( KUidVoiceMailbox ); + } + + if ( !iNotifyHandler ) + { + // set notify handler, when the key had been changed + // in the whole repository + iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iSession ); + if ( iNotifyHandler ) + { + iNotifyHandler->StartListeningL(); + } + } + } + +// ======== GLOBAL FUNCTIONS ======== +// ----------------------------------------------------------------------------- +// LibEntryL is a polymorphic Dll entry point +// Returns: CScriptBase*: Pointer to Test Module object +// ----------------------------------------------------------------------------- +// +EXPORT_C CScriptBase* LibEntryL( CTestModuleIf& aTestModuleIf ) + { + return CVmbxEngineTest::NewL( aTestModuleIf ); + } diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_number_api/voice_mailbox_number_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonesrv_plat/voice_mailbox_number_api/voice_mailbox_number_api.metaxml Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,18 @@ + + + Voice Mailbox Number API + An interface for fetching/saving the vmbx number and querying for it + c++ + phoneuis + + + + + + + + + yes + no + + diff -r 7d48bed6ce0c -r 987c9837762f phonesrv_plat/voice_mailbox_settings_api/group/bld.inf --- a/phonesrv_plat/voice_mailbox_settings_api/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/phonesrv_plat/voice_mailbox_settings_api/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -12,7 +12,7 @@ * Contributors: * * Description: File that exports the files belonging to -* voice mailbox settings api +: Voice Mailbox Settings API * */ diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/LaunchBrowserCmd/src/CLaunchBrowserHandler.cpp --- a/satengine/SatServer/Commands/LaunchBrowserCmd/src/CLaunchBrowserHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/LaunchBrowserCmd/src/CLaunchBrowserHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -16,7 +16,6 @@ */ - #include #include #include @@ -212,8 +211,8 @@ "LAUNCHBROWSER::Event ESetUpMenuRequested catched and unreg" ) iUtils->UnregisterEvent( this, MSatUtils::ESetUpMenuRequested ); // Browser is brought to the top after short period of time. - //iUtils->SatUiHandler().ShellController(). - // BringBrowserToForegroundAfterPeriod(); + iUtils->SatUiHandler().ShellController(). + BringBrowserToForegroundAfterPeriod(); break; } @@ -810,9 +809,8 @@ url=%s, IAP=%d", &aParam, aAccessPointUid.iUid ) // Browser launching called. - //TInt err = iUtils->SatUiHandler().ShellController().LaunchBrowserL( - // aParam, aAccessPointUid ); - TInt err = KErrNone; + TInt err = iUtils->SatUiHandler().ShellController().LaunchBrowserL( + aParam, aAccessPointUid ); if ( KErrNone == err ) { diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/OpenChannelCmd/src/COpenChannelHandler.cpp --- a/satengine/SatServer/Commands/OpenChannelCmd/src/COpenChannelHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/OpenChannelCmd/src/COpenChannelHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -65,8 +65,6 @@ Cancel(); iDataChannel = NULL; - delete iConnectionInfo.iOverrideSet; - LOG( SIMPLE, "OPENCHANNEL: COpenChannelHandler::~CCloseChannelHandler exiting" ) } @@ -732,9 +730,6 @@ "OPENCHANNEL: COpenChannelHandler::SetOverrideSettingsL aIapId: %i", aIapId ) - delete iConnectionInfo.iOverrideSet; - iConnectionInfo.iOverrideSet = NULL; - // Override connection preferences TExtendedConnPref* overrideSettings = new( ELeave ) TExtendedConnPref; overrideSettings->SetIapId( aIapId ); diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/PlayToneCmd/src/CPlayToneHandler.cpp --- a/satengine/SatServer/Commands/PlayToneCmd/src/CPlayToneHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/PlayToneCmd/src/CPlayToneHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -69,14 +69,16 @@ LOG( SIMPLE, "PLAYTONE: CPlayToneHandler::ClientResponse calling" ) iPlayToneRsp.SetPCmdNumber( iPlayToneData.PCmdNumber() ); - if ( RSat::KPSessionTerminatedByUser == iPlayToneRsp.iGeneralResult ) - { - LOG( SIMPLE, "PLAYTONE: CPlayToneHandler::ClientResponse \ - KPSessionTerminatedByUser" ) - // Next SimSession end will close the ui session. - iUtils->NotifyEvent( MSatUtils::ESessionTerminatedByUser ); - } - + + // A short-ish Play tone is aborted in GCf testing, that will be supported + // by using the Sat app Menu key to abort the play tone and to respond + // with KPSessionTerminatedByUser to Sat Server. That's why + // MSatUtils::ESessionTerminatedByUser notify is NOT sent here because + // otherwise CSimSessionEndHandler::HandleCommand() closes Sat App always. + // (That should be done only if UI was not launched by user.) + LOG2( SIMPLE, "PLAYTONE: CPlayToneHandler::ClientResponse result=%d", + iPlayToneRsp.iGeneralResult ) + // If command had icon data and was done succesfully, report that icon // was not shown // To be removed when icons are allowed in this command diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendSSCmd/inc/csatsendssbarringnouiobs.h --- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssbarringnouiobs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssbarringnouiobs.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #ifndef CSATSENDSSBARRINGNOUIOBS_H #define CSATSENDSSBARRINGNOUIOBS_H -#include +#include /** * Implements MPsetBarringObserver and gets notifications of the barring process diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendSSCmd/inc/csatsendsscallwaitingnouiobs.h --- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendsscallwaitingnouiobs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendsscallwaitingnouiobs.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #ifndef CSATSENDSSCALLWAITINGNOUIOBS_H #define CSATSENDSSCALLWAITINGNOUIOBS_H -#include +#include /** * Implements MPsetCallWaitingObserver and gets notifications diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendSSCmd/inc/csatsendssclinouiobs.h --- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssclinouiobs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssclinouiobs.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #ifndef CSATSENDSSCLINOUIOBS_H #define CSATSENDSSCLINOUIOBS_H -#include +#include /** * Implements MPsetCliObserver and is responsible for handling notes related diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendSSCmd/inc/csatsendssdivertnouiobs.h --- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssdivertnouiobs.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssdivertnouiobs.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ #ifndef CSATSENDSSDIVERTNOUIOBS_H #define CSATSENDSSDIVERTNOUIOBS_H -#include +#include /** * Implements MPsetDivertObserver and gets notifications of diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendSSCmd/inc/csatsendsshandler.h --- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendsshandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendsshandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -19,14 +19,14 @@ #ifndef CSATSENDSSHANDLER_H #define CSATSENDSSHANDLER_H -#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class CSatSendSsBarringNoUiObs; class CSatSendSsCliNoUiObs; diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendSSCmd/src/CSendSsHandler.cpp --- a/satengine/SatServer/Commands/SendSSCmd/src/CSendSsHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendSSCmd/src/CSendSsHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -16,10 +16,10 @@ */ -#include -#include -#include -#include +#include +#include +#include +#include #include "MSatSystemState.h" #include "MSatApi.h" diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendSSCmd/src/csatsendsshandler.cpp --- a/satengine/SatServer/Commands/SendSSCmd/src/csatsendsshandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendSSCmd/src/csatsendsshandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -16,11 +16,11 @@ */ #include "csatsendsshandler.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "csatsendssbarringnouiobs.h" #include "csatsendssdivertnouiobs.h" diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendUSSDCmd/group/SendUssdCmd.mmp --- a/satengine/SatServer/Commands/SendUSSDCmd/group/SendUssdCmd.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendUSSDCmd/group/SendUssdCmd.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -47,6 +47,8 @@ LIBRARY etelsat.lib LIBRARY SatEngine.lib LIBRARY phoneclient.lib // Ussd sender +LIBRARY aknnotify.lib +LIBRARY centralrepository.lib // CRepository #ifdef ENABLE_SAT_LOGGING LIBRARY flogger.lib diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendUSSDCmd/inc/CSendUssdHandler.h --- a/satengine/SatServer/Commands/SendUSSDCmd/inc/CSendUssdHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendUSSDCmd/inc/CSendUssdHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -140,6 +140,13 @@ TUint8& aReceivedDcs ); /** + * Show the ussd response note. + * + * @param aText The USSD response string to be shown. + */ + void ShowUssdResponseNoteL( const TDesC& aText ); + + /** * Handles the result of Ussd sending * * @param aError Result of Ussd sending @@ -282,6 +289,10 @@ */ TBool iIconCommand; + /** + * Indicates whether the result of sending USSD is displayed + */ + TBool iIsSatDisplayUssdResult; }; #endif // CSENDUSSDHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp --- a/satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -16,9 +16,13 @@ */ -#include -#include +#include +#include +#include #include +#include +#include +#include #include "MSatSystemState.h" #include "MSatApi.h" @@ -564,10 +568,40 @@ iNotificationRsp(), iNotificationRspPckg( iNotificationRsp ), // To be removed when icons are allowed in this command - iIconCommand( EFalse ) + iIconCommand( EFalse ), + iIsSatDisplayUssdResult( EFalse ) { LOG( SIMPLE, - "SENDUSSD: CSendUssdHandler::CSendUssdHandler calling - exiting" ) + "SENDUSSD: CSendUssdHandler::CSendUssdHandler calling" ) + CRepository* repository = NULL; + + TRAPD( result, repository = CRepository::NewL( KCRUidSatServer ); ); + LOG2( NORMAL, "SENDUSSD: CSendUssdHandler::CSendUssdHandler \ + open CRepository result: %d", result ) + + if ( repository && ( KErrNone == result ) ) + { + result = repository->Get( KSatDisplayUssdResult, + iIsSatDisplayUssdResult ); + LOG2( NORMAL, + "SENDUSSD: CSendUssdHandler::CSendUssdHandler \ + get CRepository key iIsSatDisplayUssdResult: %d", + iIsSatDisplayUssdResult ) + + if ( KErrNone != result ) + { + LOG2( NORMAL, + "SENDUSSD: CSendUssdHandler::CSendUssdHandler \ + get CRepository key error result: %d", + result ) + } + } + + delete repository; + repository = NULL; + + LOG( SIMPLE, + "SENDUSSD: CSendUssdHandler::CSendUssdHandler exiting" ) } @@ -595,6 +629,17 @@ iSendUssdRsp.iUssdString.iUssdString.Copy( receiveMessage ); + if ( ( RSat::EAlphaIdProvided != iSendUssdData.iAlphaId.iStatus ) + && iIsSatDisplayUssdResult ) + { + // if no Alpha ID provided, show the text note. + LOG( SIMPLE, "SENDUSSD: CSendUssdHandler::SendUssdString \ + Show USSD result Note" ) + TRAP_IGNORE( + ShowUssdResponseNoteL( + iSendUssdRsp.iUssdString.iUssdString ) ); + } + HandleSendUssdResult( error ); LOG( SIMPLE, "SENDUSSD: CSendUssdHandler::SendUssdString exiting" ) @@ -671,6 +716,23 @@ } // ----------------------------------------------------------------------------- +// Show the ussd response note. +// ----------------------------------------------------------------------------- +// +void CSendUssdHandler::ShowUssdResponseNoteL( const TDesC& aText ) + { + LOG( SIMPLE, "SENDUSSD: CSendUssdHandler::ShowUssdResponseNoteL calling" ) + + CAknGlobalNote* note = CAknGlobalNote::NewLC(); + note->SetSoftkeys( R_AVKON_SOFTKEYS_OK_EMPTY ); + note->ShowNoteL( EAknGlobalConfirmationNote, + iSendUssdRsp.iUssdString.iUssdString ); + CleanupStack::PopAndDestroy( note ); + + LOG( SIMPLE, "SENDUSSD: CSendUssdHandler::ShowUssdResponseNoteL exiting" ) + } + +// ----------------------------------------------------------------------------- // Handles the result of Ussd sending. // ----------------------------------------------------------------------------- // @@ -692,6 +754,7 @@ else if ( TSatExtErrorUtils::IsExtendedError( aError ) ) // extended error { TUint8 addInfo( 0 ); + // In subcase 2, SAT always gets KErrGsmCCCallRejected if ( KErrGsmCCCallRejected == aError ) { LOG( SIMPLE, @@ -770,8 +833,8 @@ iSendUssdRsp.iGeneralResult = RSat::KModifiedByCallControl; iSendUssdRsp.iInfoType = RSat::KNoAdditionalInfo; iSendUssdRsp.iAdditionalInfo.SetLength( 0 ); - iSendUssdRsp.iAdditionalInfo.Zero(); - } + iSendUssdRsp.iAdditionalInfo.Zero(); + } else if ( KErrNone == aError ) // Success case { LOG( SIMPLE, diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SetUpCallCmd/group/SetUpCallCmd.mmp --- a/satengine/SatServer/Commands/SetUpCallCmd/group/SetUpCallCmd.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpCallCmd/group/SetUpCallCmd.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -30,8 +30,6 @@ SOURCEPATH ../src SOURCE std.cpp SOURCE CSetUpCallHandler.cpp -SOURCE csetupcallrequesthandler.cpp -SOURCE csetupcalldtmfsender.cpp START RESOURCE 1000f005.rss TARGET SetUpCallCmd.rsc @@ -45,11 +43,12 @@ SYSTEMINCLUDE ../../../../../inc // Domain telephony SYSTEMINCLUDE ../../../../inc // Subsystem satengine +LIBRARY aiwdialdata.lib +LIBRARY ServiceHandler.lib +LIBRARY phoneclient.lib LIBRARY euser.lib LIBRARY etelsat.lib -LIBRARY etelmm.lib -LIBRARY etel.lib -LIBRARY satengine.lib +LIBRARY SatEngine.lib #ifdef ENABLE_SAT_LOGGING LIBRARY flogger.lib diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SetUpCallCmd/group/UT_CSetUpCallHandler.pkg --- a/satengine/SatServer/Commands/SetUpCallCmd/group/UT_CSetUpCallHandler.pkg Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpCallCmd/group/UT_CSetUpCallHandler.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ * Name : UT_CSetUpCallHandler.pkg * Part of : SatServer / SetUpCallCmd * Description : Project package file for project SetUpCall plug-in -* Version : %version: e003sa17#6 % +* Version : %version: e003sa18#4 % * * Copyright (C) 2002-2008 Nokia. All rights reserved. * This material, including documentation and any related computer diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h --- a/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -21,18 +21,22 @@ #include +#include +#include +#include + #include "CSatCommandHandler.h" #include "SatSTypes.h" -class CSetupCallRequestHandler; - /** * Command handler for SetUpCall command. * * @lib SetUpCallCmd.lib * @since S60 v3.0 */ -class CSetUpCallHandler : public CSatCommandHandler +class CSetUpCallHandler : public CSatCommandHandler, + public MAiwNotifyCallback, + public MPhCltEmergencyCallObserver { public: @@ -60,13 +64,6 @@ */ void ClientResponse(); - /** - * Handle the setup call Request Complete. - * - * @param aErrCode Result of ETelMM Api calling. - */ - void SetupCallRequestComplete( const TInt aErrCode ); - protected: // from base class CActive @@ -118,6 +115,33 @@ */ void UiLaunchFailed(); +// from base class MAiwNotifyCallback + + /** + * From MAiwNotifyCallback + * Called when dial request is completed. + * + * @param aCmdId Identifier of requested Aiw operation. + * @param aEventId Identifier of status event. + * @param aEventParamList Parameters of status event. + * @param aInParamList Parameters of Aiw operation. + */ + TInt HandleNotifyL( + const TInt aCmdId, + const TInt aEventId, + CAiwGenericParamList& aEventParamList, + const CAiwGenericParamList& aInParamList ); + +// from base class MPhCltEmergencyCallObserver + + /** + * From MPhCltEmergencyCallObserver + * Called when emergency dial request is completed. + * + * @param aStatus Non zero value means failure. + */ + void HandleEmergencyDialL( const TInt aStatus ); + private: CSetUpCallHandler(); @@ -129,7 +153,7 @@ * * @since S60 3.2 */ - void DoSetupCall( CSetupCallRequestHandler& aHandler ); + void DoSetupCallL(); /** * Return terminal response filled according to dial result. @@ -168,16 +192,21 @@ * @param aNumber dialling number string */ void CheckNumber( TDes& aNumber ) const; - + + /** + * Converts a TCCP error to the corresponding symbian error. + * + * @param aTccpError A TCCP error number to be converted into + * a symbian one. + * + * @return The corresponding symbian error from TCCP error. + */ + TInt TccpErrorToSymbianError( const TInt aTccpError ) const; + /** * Create emergency call */ - void CreateEmergencyCall( CSetupCallRequestHandler& aHandler ); - - /** - * Check the Param of the setup call - */ - TBool CheckSetupCallParam(); + void CreateEmergencyCallL(); private: // data @@ -222,10 +251,15 @@ TSatQueryRspV1Pckg iQueryRspPckg; /** - * Handing the asynchronous request + * Service handler to make normal call. */ - CSetupCallRequestHandler* iRequestHandler; - + CAiwServiceHandler* iServiceHandler; + + /** + * Utility to handle emergency calls. + */ + CPhCltEmergencyCall* iEmergencyCallApi; + /** * Current call is an emergency call. */ @@ -237,6 +271,11 @@ TBool iCallControlActive; /** + * Dial completion status + */ + TInt iSetUpCallStatus; + + /** * wait scheduler */ CActiveSchedulerWait iWait; diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp --- a/satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -14,9 +14,13 @@ * Description: Handles SetUpCall command * */ -#include -#include + + +#include +#include + #include +#include #include "MSatApi.h" #include "MSatUtils.h" @@ -24,7 +28,6 @@ #include "MSatUiSession.h" #include "SatSOpcodes.h" #include "MSatSUiClientHandler.h" -#include "csetupcallrequesthandler.h" #include "CSetUpCallHandler.h" #include "TSatExtErrorUtils.h" #include "SatLog.h" @@ -41,21 +44,10 @@ const TUint8 KWildChar( 0x77 ); const TUint8 KExpansionChar( 0x2E ); -/** Maximum name length. */ -const TInt KSatMaximumNameLength = 50; - -/** Maximum phone number length same as used by phone. */ -const TInt KSatMaximumPhoneNumberLength = 100; - -/** The subaddress length, see ITU-T I.330 and 3GPP TS 11.14. */ -const TInt KSatSubAddressLength = 21; - -/** The maximum bearer length. The bearer capabilities as -defined in GSM 04.08. */ -const TInt KSatBearerLength = 14; - - _LIT( KFixedSimEmergencyNumber, "112" ); +_LIT8( KContentType, "*" ); +// 3GPP TS 24.008 +const TInt KMaximumPhoneNumberLength( 80 ); // ======== MEMBER FUNCTIONS ======== @@ -87,9 +79,18 @@ LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::~CSetUpCallHandler calling" ) Cancel(); - - delete iRequestHandler; - iRequestHandler = NULL; + + if ( iServiceHandler ) + { + delete iServiceHandler; + iServiceHandler = NULL; + } + + if ( iEmergencyCallApi ) + { + delete iEmergencyCallApi; + iEmergencyCallApi = NULL; + } LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::~CSetUpCallHandler exiting" ) } @@ -144,15 +145,15 @@ if ( iQueryRsp.iAccepted ) { // User accepted the call, make the call - if( iRequestHandler ) + TRAPD( error, DoSetupCallL() ); + + if ( KErrNone != error ) { - DoSetupCall( *iRequestHandler ); - } - else - { - CompleteSetupCall( - RSat::KMeUnableToProcessCmd, - RSat::KNoSpecificMeProblem ); + LOG2( NORMAL, + "SETUPCALL: CSetUpCallHandler::ClientResponse Dial failed: %i", + error ) + + CompleteSetupCall( RSat::KCmdDataNotUnderstood ); } } else @@ -187,10 +188,6 @@ LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoCancel calling" ) iUtils->USatAPI().NotifySetUpCallCancel(); - if( iRequestHandler ) - { - iRequestHandler->Cancel(); - } LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoCancel exiting" ) } @@ -394,13 +391,15 @@ { LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleCommand iEmergencyCall true" ) - if ( iRequestHandler ) + TRAPD( err, CreateEmergencyCallL() ); + if ( KErrNone != err ) { - CreateEmergencyCall( *iRequestHandler ); - } - else - { + LOG2( SIMPLE, + "SETUPCALL: CSetUpCallHandler::HandleCommand DialEmergencyCallL \ + failed: %d", err ) + iEmergencyCall = EFalse; + // Set the terminal response info. CompleteSetupCall( RSat::KMeUnableToProcessCmd, @@ -521,49 +520,122 @@ } // ----------------------------------------------------------------------------- -// CSetUpCallHandler::SetupCallRequestComplete -// (other items were commented in a header). +// From class MAiwNotifyCallback. +// Called when dial request is completed. // ----------------------------------------------------------------------------- // -void CSetUpCallHandler::SetupCallRequestComplete( TInt aErrCode ) +TInt CSetUpCallHandler::HandleNotifyL( + const TInt aCmdId, + const TInt aEventId, + CAiwGenericParamList& aEventParamList, + const CAiwGenericParamList& /*aInParamList*/ ) { - LOG( SIMPLE, - "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete calling" ) + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleNotifyL calling" ) + + if ( KAiwCmdCall == aCmdId ) + { + LOG2( SIMPLE, + "SETUPCALL: CSetUpCallHandler::HandleNotifyL event: %d", aEventId ) + switch ( aEventId ) + { + case KAiwEventError: + case KAiwEventCompleted: + case EGenericParamError: // This is due CCaUiPlugin behaviour. + // Also overlaps event KAiwEventStarted. + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall \ + Completed" ) + + // Fetch completion status. + TInt index( 0 ); + const TAiwGenericParam* param = aEventParamList.FindFirst( + index, EGenericParamError ); + + if ( param ) + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::HandleNotifyL param true" ) + + // Converts error number to symbian-formatted before + // calling CompleteSetupCallWithStatus. + TInt error = TccpErrorToSymbianError( + param->Value().AsTInt32() ); + CompleteSetupCallWithStatus( error ); + } + else + { + CompleteSetupCall( RSat::KSuccess ); + } + } + break; - LOG2( NORMAL, - "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete aErrCode %d", - aErrCode ) - - if( !iEmergencyCall ) + case KAiwEventCanceled: + case KAiwEventStopped: + case KAiwEventQueryExit: + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall \ + cancelled" ) + + CompleteSetupCallWithStatus( KErrAbort ); + } + break; + + case KAiwEventOutParamCheck: + case KAiwEventInParamCheck: + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall param \ + fail" ) + + CompleteSetupCall( RSat::KCmdDataNotUnderstood ); + } + break; + + default: + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::HandleNotifyL Unknown event \ + id" ) + } + break; + + } + } + + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleNotifyL exiting" ) + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// From class MAiwNotifyCallback. +// Called when dial request is completed. +// ----------------------------------------------------------------------------- +// +void CSetUpCallHandler::HandleEmergencyDialL( const TInt aStatus ) + { + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL calling" ) + + iEmergencyCall = EFalse; + + if ( KErrNone == aStatus ) { - CompleteSetupCallWithStatus( aErrCode ); + // Set result + CompleteSetupCall( RSat::KSuccess ); } else { - iEmergencyCall = EFalse; + CompleteSetupCall( + RSat::KNetworkUnableToProcessCmd, + RSat::KNoSpecificMeProblem ); - if ( KErrNone == aErrCode ) - { - // Set result - CompleteSetupCall( RSat::KSuccess ); - } - else - { - // The emergency call implementation - // before S60 SAT migration from AIW to EtelMM - // According current information, no requirement for this. - // We don't return extended network error. - CompleteSetupCall( - RSat::KNetworkUnableToProcessCmd, - RSat::KNoSpecificMeProblem ); + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL Network unable \ + to process this" ) + } - LOG( SIMPLE, - "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL Network unable \ - to process this" ) - } - } - LOG2( NORMAL, - "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete exiting %d", aErrCode ) + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL exiting" ) } // ----------------------------------------------------------------------------- @@ -597,9 +669,6 @@ { LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::ConstructL calling" ) - - iRequestHandler = CSetupCallRequestHandler::NewL( iUtils->MultiModeApi(), - this ); // Create request handler. This is same that LaunchBrowser uses, so this // is needed also in HandleCommand - function. iUtils->RegisterServiceRequestL( @@ -610,6 +679,27 @@ iUtils->RegisterL( this, MSatUtils::ECallControlExecuting ); iUtils->RegisterL( this, MSatUtils::ECallControlDone ); + // Create service handler for normal call setup. + iServiceHandler = CAiwServiceHandler::NewL(); + + // Create dynamic resource to attach service handler. + RCriteriaArray interest; + CAiwCriteriaItem* item = CAiwCriteriaItem::NewLC( + KAiwCmdCall, + KAiwCmdCall, + KContentType ); + + TUid serviceClassBase; + serviceClassBase.iUid = KAiwClassBase; + item->SetServiceClass( serviceClassBase ); + + interest.AppendL( item ); + + // Attach to call service. + iServiceHandler->AttachL( interest ); + + CleanupStack::PopAndDestroy( item ); + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::ConstructL exiting" ) } @@ -617,60 +707,103 @@ // Performs the request to dial // ----------------------------------------------------------------------------- // -void CSetUpCallHandler::DoSetupCall( CSetupCallRequestHandler& aHandler ) +void CSetUpCallHandler::DoSetupCallL() { LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL calling" ) - - if( CheckSetupCallParam() ) - { + + RSat::TSetUpCallType callType( iSetUpCallData.iType ); - RSat::TSetUpCallType callType( iSetUpCallData.iType ); - - TDes& telNumber( iSetUpCallData.iAddress.iTelNumber ); - CheckNumber( telNumber ); + TDes& telNumber( iSetUpCallData.iAddress.iTelNumber ); + CheckNumber( telNumber ); - RMobileCall::TMobileCallParamsV7 dialParams; - RMobileCall::TMobileCallParamsV7Pckg package( dialParams ); - - //Redail has been removed from MCL, no redail support. - dialParams.iAutoRedial = EFalse; - dialParams.iBearerMode = RMobileCall::EMulticallNewBearer; - dialParams.iCallParamOrigin = RMobileCall::EOriginatorSIM; - dialParams.iSubAddress = iSetUpCallData.iSubAddress; - dialParams.iBearerCap1 = iSetUpCallData.iCapabilityConfigParams; - - dialParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode; - - dialParams.iIconId.iQualifier = RMobileCall::ENoIconId; - - - dialParams.iAlphaId = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId; - LOG2( NORMAL, - "SETUPCALL: CSetUpCallHandler::DoSetupCallL id:%S", - &dialParams.iAlphaId ) - - LOG2( NORMAL, - "SETUPCALL: CSetUpCallHandler::DoSetupCallL number:%S", - &iSetUpCallData.iAddress.iTelNumber ) - - TBool terminateOtherCall( EFalse ); - // check if we need to disconnect other calls - if ( ( RSat::EDisconnectOtherCalls == callType ) || - ( RSat::EDisconnectOtherCallsWithRedial == callType ) ) - { - LOG( SIMPLE, - "SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" ) - terminateOtherCall = ETrue ; - } - - aHandler.DialNumber( package, iSetUpCallData.iAddress.iTelNumber, - terminateOtherCall, iUtils->CreateAsyncToSyncHelper() ); + // 80 is max length in SAT calls, AIW max length is 100 + if ( telNumber.Length() > KMaximumPhoneNumberLength ) + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::DoSetupCallL telNumber too long" ) + User::Leave( KErrArgument ); + } + + TBuf< AIWDialDataExt::KMaximumNameLength > name; + if ( RSat::EAlphaIdProvided == + iSetUpCallData.iAlphaIdCallSetUpPhase.iStatus ) + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::DoSetupCallL EAlphaIdProvided" ) + name = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId; } else { - CompleteSetupCallWithStatus( KErrArgument ); + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::DoSetupCallL set AlphaId" ) + name = iUtils->SatAppName(); + } + + // Make the phone call parameters. + CAiwInternalDialData* dialData = CAiwInternalDialData::NewLC(); + + dialData->SetCallType( CAiwDialData::EAIWVoice ); + dialData->SetWindowGroup( AIWDialData::KAiwGoToIdle ); + // coverity static analysis tool generates a false finding here + // eliminating that + // coverity[use_after_free] + dialData->SetPhoneNumberL( telNumber ); + dialData->SetSATCall( ETrue ); + dialData->SetShowNumber( EFalse ); + // coverity static analysis tool generates a false finding here + // eliminating that + // coverity[use_after_free] + dialData->SetNameL( name ); + dialData->SetAllowMatch( EFalse ); + // Remove the redial mechanism from S60 5.x. + dialData->SetRedial( AIWDialDataExt::KAIWRedialOff ); + + // check if we need to disconnect other calls + if ( ( RSat::EDisconnectOtherCalls == callType ) || + ( RSat::EDisconnectOtherCallsWithRedial == callType ) ) + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" ) + dialData->SetEndOtherCalls( ETrue ); } - + + if ( AIWInternalDialData::KAiwBearerLength >= + iSetUpCallData.iCapabilityConfigParams.Length() ) + { + LOG( NORMAL, + "SETUPCALL: CSetUpCallHandler::DoSetupCallL SetBearerL" ) + // coverity static analysis tool generates a false finding here + // eliminating that + // coverity[use_after_free] + dialData->SetBearerL( iSetUpCallData.iCapabilityConfigParams ); + } + + if ( AIWInternalDialData::KAiwSubAddressLength >= + iSetUpCallData.iSubAddress.Length() ) + { + LOG( NORMAL, + "SETUPCALL: CSetUpCallHandler::DoSetupCallL SetSubAddressL" ) + // coverity static analysis tool generates a false finding here + // eliminating that + // coverity[use_after_free] + dialData->SetSubAddressL( iSetUpCallData.iSubAddress ); + } + + CAiwGenericParamList& paramList = iServiceHandler->InParamListL(); + // coverity static analysis tool generates a false finding here + // eliminating that + // coverity[use_after_free] + dialData->FillInParamListL( paramList ); + + iServiceHandler->ExecuteServiceCmdL( + KAiwCmdCall, + paramList, + iServiceHandler->OutParamListL(), + 0, + this ); + + CleanupStack::PopAndDestroy( dialData ); + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL exiting" ) } @@ -734,7 +867,6 @@ } case KErrGeneral: - case KErrArgument: { LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CompleteSetupCallWithStatus Data \ @@ -813,8 +945,6 @@ else if ( ( RSat::ESelfExplanatory == qualifier2 ) || ( RSat::ENotSelfExplanatory == qualifier2 ) ) { - // Until 2009-10 the phone and NTSY not support the icon. - // to be updated after the updating of the phone and NTSY result = RSat::KSuccessRequestedIconNotDisplayed; LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CompleteSetupCallWithStatus Icon \ @@ -836,6 +966,7 @@ result = RSat::KSuccessRequestedIconNotDisplayed; } } + // Set result CompleteSetupCall( result ); } @@ -897,7 +1028,7 @@ void CSetUpCallHandler::CheckNumber( TDes& aNumber ) const { LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckNumber calling" ) - + for ( TInt i = 0; i < aNumber.Length(); i++ ) { // check values @@ -936,7 +1067,6 @@ aNumber[i] = KExpansionChar; } } - LOG2( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckNumber length of aNumber: %d", aNumber.Length() ) @@ -944,54 +1074,297 @@ } // ----------------------------------------------------------------------------- -// Create emergency call +// Converts a TCCP error to the corresponding symbian error. // ----------------------------------------------------------------------------- // -void CSetUpCallHandler::CreateEmergencyCall( - CSetupCallRequestHandler& aHandler ) +TInt CSetUpCallHandler::TccpErrorToSymbianError( const TInt aTccpError ) const { - LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall calling" ) - - aHandler.DialEmergencyCall( iSetUpCallData.iAddress.iTelNumber ); + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \ + calling" ) + + // Error to be returned after mapped from aTccpError; + // Initialized with default value KErrAccessDenied. + TInt retValue( KErrAccessDenied ); - LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall exiting" ) + // Convert TCCP Error to Symbian Error in the switch braces. + switch ( aTccpError ) + { + case ECCPErrorNone: + case ECCPErrorNotFound: + case ECCPErrorGeneral: + case ECCPErrorCancel: + case ECCPErrorNoMemory: + case ECCPErrorNotSupported: + case ECCPErrorAlreadyInUse: + case ECCPErrorNotReady: + { + retValue = aTccpError; + break; + } + + case ECCPErrorCCCallRejected: + { + retValue = KErrGsmCCCallRejected; + break; + } + + case ECCPRequestFailure: + { + retValue = KErrGsmMMCongestion; + break; + } + + case ECCPErrorCCBearerCapabilityNotAuthorised: + case ECCPErrorBadRequest: + { + retValue = KErrGsmCCBearerCapabilityNotAuthorised; + break; + } + + case ECCPErrorAccessDenied: + { + retValue = KErrAccessDenied; + break; + } + + //The following are KErrGsmCallControlBase group. + case ECCPErrorNotReached: + { + retValue = KErrGsmCCUnassignedNumber; + break; + } + + case ECCPErrorBusy: + { + retValue = KErrGsmCCUserBusy; + break; + } + + case ECCPErrorMovedPermanently: + { + retValue = KErrGsmCCNumberChanged; + break; + } + + case ECCPErrorInvalidURI: + { + retValue = KErrGsmCCInvalidNumberFormat; + break; + } + + case ECCPErrorNetworkOutOfOrder: + { + retValue = KErrGsmCCNetworkOutOfOrder; + break; + } + + case ECCPErrorCCNoRouteToDestination: + { + retValue = KErrGsmCCNoRouteToDestination; + break; + } + + case ECCPErrorCCDestinationOutOfOrder: + { + retValue = KErrGsmCCDestinationOutOfOrder; + break; + } + + case ECCPErrorCCResourceNotAvailable: + { + retValue = KErrGsmCCResourceNotAvailable; + break; + } + + + case ECCPErrorCCInvalidTransitNetworkSelection: + { + retValue = KErrGsmCCInvalidTransitNetworkSelection; + break; + } + + case ECCPErrorCCIncompatibleDestination: + { + retValue = KErrGsmCCIncompatibleDestination; + break; + } + + case ECCPErrorCCIncompatibleMessageInCallState: + { + retValue = KErrGsmCCIncompatibleMessageInCallState; + break; + } + + case ECCPErrorCCIncompatibleMessageInProtocolState: + { + retValue = KErrGsmCCIncompatibleMessageInProtocolState; + break; + } + + case ECCPErrorCCNormalCallClearing: + { + retValue = KErrGsmCCNormalCallClearing; + break; + } + + case ECCPErrorCCUserAlertingNoAnswer: + { + retValue = KErrGsmCCUserAlertingNoAnswer; + break; + } + + case ECCPErrorCCUserNotResponding: + { + retValue = KErrGsmCCUserNotResponding; + break; + } + + case ECCPErrorCCPreemption: + { + retValue = KErrGsmCCPreemption; + break; + } + + case ECCPErrorCCFacilityRejected: + { + retValue = KErrGsmCCFacilityRejected; + break; + } + + case ECCPErrorCCResponseToStatusEnquiry: + { + retValue = KErrGsmCCResponseToStatusEnquiry; + break; + } + + case ECCPErrorCCInvalidMandatoryInformation: + { + retValue = KErrGsmCCInvalidMandatoryInformation; + break; + } + + case ECCPErrorCCNonExistentMessageType: + { + retValue = KErrGsmCCNonExistentMessageType; + break; + } + + case ECCPErrorCCNonExistentInformationElement: + { + retValue = KErrGsmCCNonExistentInformationElement; + break; + } + + case ECCPErrorCCNoChannelAvailable: + { + retValue = KErrGsmCCNoChannelAvailable; + break; + } + + case ECCPErrorCCRequestedFacilityNotSubscribed: + { + retValue = KErrGsmCCRequestedFacilityNotSubscribed; + break; + } + + case ECCPErrorCCIncomingCallsBarredInCug: + { + retValue = KErrGsmCCIncomingCallsBarredInCug; + break; + } + + case ECCPErrorUserNotInCug: + { + retValue = KErrGsmCCUserNotInCug; + break; + } + + case ECCPErrorCCRecoveryOnTimerExpiry: + { + retValue = KErrGsmCCRecoveryOnTimerExpiry; + break; + } + + case ECCPErrorCCBearerCapabilityNotCurrentlyAvailable: + { + retValue = KErrGsmCCBearerCapabilityNotCurrentlyAvailable; + break; + } + + case ECCPErrorCCServiceNotAvailable: + { + retValue = KErrGsmCCServiceNotAvailable; + break; + } + + case ECCPErrorCCBearerServiceNotImplemented: + { + retValue = KErrGsmCCBearerServiceNotImplemented; + break; + } + + case ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable: + { + retValue = KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable; + break; + } + + case ECCPErrorCCServiceNotImplemented: + { + retValue = KErrGsmCCServiceNotImplemented; + break; + } + + case ECCPErrorCCUnspecifiedInterworkingError: + { + retValue = KErrGsmCCUnspecifiedInterworkingError; + break; + } + + case ECCPErrorSatControl: + { + retValue = KErrSatControl; + break; + } + + default: + { + retValue = KErrAccessDenied; + break; + } + } + + LOG2( SIMPLE, + "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError TCCP error:%d", + aTccpError) + LOG2( SIMPLE, + "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \ + mapped Symbian Error:%d", retValue) + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \ + exiting" ) + + return retValue; } // ----------------------------------------------------------------------------- -// check setup call param. +// Create emergency call // ----------------------------------------------------------------------------- // -TBool CSetUpCallHandler::CheckSetupCallParam() +void CSetUpCallHandler::CreateEmergencyCallL() { - LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam calling" ) - - TBool valid( ETrue ); - if ( iSetUpCallData.iAddress.iTelNumber.Length() - > KSatMaximumPhoneNumberLength ) - { - LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam num" ) - valid = EFalse; - } - else if ( iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId.Length() - > KSatMaximumNameLength ) + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL calling" ) + + if( !iEmergencyCallApi ) { - LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam name" ) - valid = EFalse; - } - else if ( iSetUpCallData.iSubAddress.Length() > KSatSubAddressLength ) - { - LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam sub" ) - valid = EFalse; - } - else if ( iSetUpCallData.iCapabilityConfigParams.Length() - > KSatBearerLength ) - { - LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam bear" ) - valid = EFalse; - } - LOG2( SIMPLE, - "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam exiting %d", valid ) + // Create service handler for emergency call setup.. + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL\ + create emergency call handler" ) + iEmergencyCallApi = CPhCltEmergencyCall::NewL( this ); + } - return valid; + iEmergencyCallApi->DialEmergencyCallL( + iSetUpCallData.iAddress.iTelNumber ); + LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL exiting" ) } + // End Of File diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SetUpIdleModeTextCmd/inc/CSetUpIdleModeTextHandler.h --- a/satengine/SatServer/Commands/SetUpIdleModeTextCmd/inc/CSetUpIdleModeTextHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpIdleModeTextCmd/inc/CSetUpIdleModeTextHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2007 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" @@ -119,6 +119,9 @@ // Response package. RSat::TSetUpIdleModeTextRspV1Pckg iSetUpIdleModeTextRspPckg; + // Indicates are we waiting for response + TBool iWaitingForResponse; + // Store for restoring last valid idle mode text. TBool iSimResetExecuting; RSat::TIdleModeText iLastValidText; diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SetUpIdleModeTextCmd/src/CSetUpIdleModeTextHandler.cpp --- a/satengine/SatServer/Commands/SetUpIdleModeTextCmd/src/CSetUpIdleModeTextHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpIdleModeTextCmd/src/CSetUpIdleModeTextHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2007 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" @@ -18,7 +18,7 @@ #include #include -#include +#include #include "SATPrivateCRKeys.h" #include "MSatApi.h" #include "MSatUtils.h" @@ -66,6 +66,14 @@ LOG( SIMPLE, "SETUPIDLEMODETEXT: \ CSetUpIdleModeTextHandler::ConstructL calling" ) + iWaitingForResponse = EFalse; + + // Register to listen Idle mode responses. + iUtils->RegisterL( this, MSatUtils::EIdleModeResponseSuccess ); + iUtils->RegisterL( this, MSatUtils::EIdleModeResponseSuccessNoIcon ); + iUtils->RegisterL( this, MSatUtils::EIdleModeResponseUnableToProcess ); + iUtils->RegisterL( this, MSatUtils::EIdleModeResponseBeyondCapabilities ); + // Register to listen ESimReset execution. iUtils->RegisterL( this, MSatUtils::ESimResetCalled ); iUtils->RegisterL( this, MSatUtils::ESimResetCancelled ); @@ -127,9 +135,50 @@ { LOG( SIMPLE, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler::Event calling" ) + TBool responseOk( EFalse ); + // Check the response switch ( aEvent ) { + case MSatUtils::EIdleModeResponseSuccess: + { + LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \ + KSuccess") + iSetUpIdleModeTextRsp.iGeneralResult = RSat::KSuccess; + responseOk = ETrue; + break; + } + + case MSatUtils::EIdleModeResponseSuccessNoIcon: + { + LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \ + KSuccessReqIconNotDisplayed") + iSetUpIdleModeTextRsp.iGeneralResult = + RSat::KSuccessRequestedIconNotDisplayed; + responseOk = ETrue; + break; + } + + case MSatUtils::EIdleModeResponseUnableToProcess: + { + LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \ + KMeUnableToProcessCmd") + iSetUpIdleModeTextRsp.iGeneralResult = + RSat::KMeUnableToProcessCmd; + responseOk = ETrue; + break; + } + + case MSatUtils::EIdleModeResponseBeyondCapabilities: + { + LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \ + KBeyondMeCapabilities") + iSetUpIdleModeTextRsp.iGeneralResult = + RSat::KCmdBeyondMeCapabilities; + responseOk = ETrue; + break; + } + case MSatUtils::ESimResetCalled: { LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \ @@ -195,6 +244,17 @@ break; } } + + if ( responseOk && iWaitingForResponse ) + { + LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \ + send response") + iWaitingForResponse = EFalse; + + // Send terminal response, if the event was solved + TerminalRsp( RSat::ESetUpIdleModeText, iSetUpIdleModeTextRspPckg ); + } + LOG( SIMPLE, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler::Event exiting" ) } @@ -342,6 +402,8 @@ } else { + iWaitingForResponse = ETrue; + // Save data for restore. iSimResetExecuting = EFalse; iLastValidText = idleModeText; @@ -369,9 +431,6 @@ remove the homezone indicator and return %d", errorCode ) } } - - iSetUpIdleModeTextRsp.iGeneralResult = RSat::KSuccess; - TerminalRsp( RSat::ESetUpIdleModeText, iSetUpIdleModeTextRspPckg ); } LOG( SIMPLE, diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Commands/SetUpMenuCmd/group/UT_CSetUpMenuHandler.pkg --- a/satengine/SatServer/Commands/SetUpMenuCmd/group/UT_CSetUpMenuHandler.pkg Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpMenuCmd/group/UT_CSetUpMenuHandler.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -19,7 +19,7 @@ * Name : UT_CSetUpMenuHandler.mmp * Part of : SatServer / SetUpMenuCmd * Description : Project package file for project SetUpMenu plug-in -* Version : %version: e003sa17#6 % +* Version : %version: e003sa18#4 % * * Copyright (c)2002-2008 Nokia. All rights reserved. * This material, including documentation and any related computer diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/group/SatEngine.mmp --- a/satengine/SatServer/Engine/group/SatEngine.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/group/SatEngine.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -75,8 +75,12 @@ SYSTEMINCLUDE /epoc32/include/ecom SYSTEMINCLUDE ../../../../inc // Domain telephonyservices SYSTEMINCLUDE ../../../inc // Subsystem satengine -SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore +START RESOURCE ../src/SatServer.rss +HEADER +TARGETPATH RESOURCE_FILES_DIR +LANGUAGE_IDS +END // RESOURCE USERINCLUDE ../inc USERINCLUDE ../../inc @@ -104,7 +108,6 @@ LIBRARY netmeta.lib LIBRARY cmmanager.lib LIBRARY extendedconnpref.lib -LIBRARY hbcore.lib #ifdef ENABLE_SAT_LOGGING LIBRARY flogger.lib diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/group/bld.inf --- a/satengine/SatServer/Engine/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -24,6 +24,7 @@ PRJ_EXPORTS ../inc/MSatShellController.h |../../../../inc/MSatShellController.h ../../CenRep/SATInternalPSKeys.h |../../../../inc/SATInternalPSKeys.h +../../loc/SatServer.loc MW_LAYER_LOC_EXPORT_PATH( satserver.loc ) PRJ_MMPFILES SatEngine.mmp diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/inc/CSatApnHandler.h --- a/satengine/SatServer/Engine/inc/CSatApnHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/inc/CSatApnHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -25,6 +25,8 @@ #include "MSatApnHandler.h" class MSatUtils; +class RCmConnectionMethod; +class RCmManager; /** * Handles the Access point operations with CMManager. Searches, inserts and @@ -123,6 +125,15 @@ */ HBufC* FormatAPN( const RSat::TAccessName& aReqApn ) const; + /** + * Get default connection method. + * + * @param aCmManager Input Connection method manager. + * @param aDefCm Output reference to RCmConnectionMethod. + * @return None + */ + void GetDefConnMethodL( RCmManager& aCmManager, + RCmConnectionMethod& aDefCm ); private: // Data // Reference to command container diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/inc/CSatCommandContainer.h --- a/satengine/SatServer/Engine/inc/CSatCommandContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/inc/CSatCommandContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -372,7 +372,7 @@ * @since S60 v3.0 * @param aResourceId Selects name of the item to be read. */ - void CreateSatAppNameL( const TDesC& aResourceId ); + void CreateSatAppNameL( const TInt aResourceId ); /** * Gives pointer to BIP Utils class. diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/inc/csatmultimodeapi.h --- a/satengine/SatServer/Engine/inc/csatmultimodeapi.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/inc/csatmultimodeapi.h Wed Sep 01 12:15:03 2010 +0100 @@ -109,13 +109,7 @@ * Access RMobilePhone::SendDTMFTones * for the paramter information please see the etelmm.h */ - void SendDTMFTones( TRequestStatus& aReqStatus, const TDesC& aTones); - - /** - * Access RMobilePhone::ContinueDTMFStringSending - * for the paramter information please see the etelmm.h - */ - TInt ContinueDTMFStringSending( TBool aContinue ); + void SendDTMFTones( TRequestStatus& aReqStatus, const TDesC& aTones); /** * Access RMobilePhone::CancelAsyncRequest @@ -153,34 +147,6 @@ * @return ETrue if there is an incoming call */ TBool IsCallIncoming(); - - /** - * Access RMobileCall::NotifyMobileCallStatusChange - */ - void NotifyMobileCallStatusChange( TRequestStatus& aReqStatus, - RMobileCall::TMobileCallStatus& aStatus) ; - - /** - * Access RMobileCall::NotifyStatusChangeCancel - */ - void NotifyCallStatusChangeCancel(); - /** - * Access RMobilePhone::TerminateActiveCalls NotifyMobileCallStatusChange - */ - void TerminateActiveCalls(TRequestStatus& aReqStatus); - - - /** - * Access RMboileCall::GetMobileCallInfo - */ - TInt GetMobileCallInfo(TDes8& aCallInfo); - - /** - * Access RMboileCall::DialEmergencyCall - */ - virtual void DialEmergencyCall(TRequestStatus& aReqStatus, - const TDesC& aNumber); - private: /** @@ -208,17 +174,17 @@ */ void LoadPhoneModuleL( RMobilePhone& aPhone, const TDesC& aModuleName, const TDesC& aPhoneName ); - + + /** + * Open the RMobileCall + */ + void LoadMobileCallL(); + /** * Open the RMobileUssdMessaging */ void LoadUssdMessagingL(); - /** - * Open the RMobileCall - */ - TInt LoadMobileCall(); - private: // data diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/src/CSatApnHandler.cpp --- a/satengine/SatServer/Engine/src/CSatApnHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/src/CSatApnHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -276,7 +276,7 @@ cm.SetIntAttributeL( CMManager::ECmWapIPWSPOption, CMManager::ECmWapWspOptionConnectionOriented ); cm.SetBoolAttributeL( CMManager::EPacketDataDisablePlainTextAuth, EFalse ); - cm.SetBoolAttributeL( CMManager::ECmIFPromptForAuth, EFalse ); + cm.SetIntAttributeL( CMManager::ECmIFPromptForAuth, EFalse ); if ( aUserLogin != KNullDesC ) { @@ -397,59 +397,33 @@ { LOG( SIMPLE, "SATENGINE: CSatApnHandler::FindDefaultApL calling" ); TUint32 defaultIap( 0 ); - TInt pdpType; - TBool isFound( EFalse ); + TInt pdpType( 0 ); - // create a network destination - RCmDestination des; - RCmConnectionMethod cm; - - // Create CMManager Session + // create CMManager Session RCmManager cmManager; cmManager.OpenL(); CleanupClosePushL( cmManager ); - // Get the Connection Method list from the open CMManager session - RArray array( KSatCMGranularity ); - CleanupClosePushL( array ); - - // list all available destinations' id - cmManager.AllDestinationsL( array ); - for( TInt i = 0; ( i < array.Count() ) && !isFound; ++i ) - { - des = cmManager.DestinationL( array[i] ); - CleanupClosePushL( des ); + // create a network connection method + RCmConnectionMethod cm; + CleanupClosePushL( cm ); + // get a default connection method + GetDefConnMethodL( cmManager, cm ); - if ( CMManager::ESnapPurposeInternet == - des.MetadataL( CMManager::ESnapMetadataPurpose ) ) - { - LOG( SIMPLE, "SATENGINE: CSatApnHandler::FindDefaultApL \ - the fixed destination is identified as 'Internet'" ); - for( TInt j = 0; ( j < des.ConnectionMethodCount() ) && - !isFound; ++j ) - { - cm = des.ConnectionMethodL( j ); - CleanupClosePushL( cm ); - pdpType = cm.GetIntAttributeL( - CMManager::EPacketDataPDPType ); - LOG2( SIMPLE, "SATENGINE: CSatApnHandler::FindDefaultApL \ - current protocol type is %d", pdpType ) - if ( pdpType == aPdpType ) - { - defaultIap = cm.GetIntAttributeL( CMManager::ECmIapId ); - isFound = ETrue; - LOG2( SIMPLE, "SATENGINE: CSatApnHandler::FindDefaultApL \ - default iap had been found %d", defaultIap ) - } - CleanupStack::PopAndDestroy( &cm ); - } - } - CleanupStack::PopAndDestroy( &des ); + // get pdp type + pdpType = cm.GetIntAttributeL( CMManager::EPacketDataPDPType ); + if ( pdpType == aPdpType ) + { + // get a default iap id + defaultIap = cm.GetIntAttributeL( CMManager::ECmIapId ); + LOG2( SIMPLE, "SATENGINE: CSatApnHandler::FindDefaultApL \ + default iap had been found defaultIap = %d", defaultIap ) } - CleanupStack::PopAndDestroy( &array ); + + CleanupStack::PopAndDestroy( &cm ); CleanupStack::PopAndDestroy( &cmManager ); - if ( !isFound ) + if ( !defaultIap ) { LOG( SIMPLE, "SATENGINE: CSatApnHandler: default AP not found" ); User::Leave( KErrNotFound ); @@ -458,4 +432,48 @@ LOG( SIMPLE, "SATENGINE: CSatApnHandler::FindDefaultApL exit" ) return defaultIap; } + +// -------------------------------------------------------------------------- +// CSatApnHandler::GetDefConnMethodL +// -------------------------------------------------------------------------- +void CSatApnHandler::GetDefConnMethodL( RCmManager& aCmManager, + RCmConnectionMethod& aDefCm ) + { + LOG( SIMPLE, "SATENGINE: CSatApnHandler::GetDefConnMethodL calling" ) + + // Go through the default connection methods to find + // the one valid method + TCmDefConnValue defConn; + aCmManager.ReadDefConnL( defConn ); + + LOG3( SIMPLE, "SATENGINE: CSatApnHandler::\ + GetDefConnMethodL DefConn type=%d, id=%d", + defConn.iType, defConn.iId ) + + // Default setting is a connection method + if ( ECmDefConnConnectionMethod == defConn.iType ) + { + LOG( SIMPLE, "SATENGINE: CSatApnHandler::\ + GetDefConnMethodL ECmDefConnConnectionMethod" ) + // get a default connection method + aDefCm = aCmManager.ConnectionMethodL( defConn.iId ); + } + // Default setting is a destination method + else if ( ECmDefConnDestination == defConn.iType ) + { + RCmDestination defDes; + CleanupClosePushL( defDes ); + + LOG( SIMPLE, "SATENGINE: CSatApnHandler::\ + GetDefConnMethodL ECmDefConnDestination" ) + // get a default destination + defDes = aCmManager.DestinationL( defConn.iId ); + // get the first default connection method from destination + aDefCm = defDes.ConnectionMethodL( 0 ); + + CleanupStack::PopAndDestroy( &defDes ); + } + + LOG( SIMPLE, "SATENGINE: CSatApnHandler::GetDefConnMethodL exit" ) + } // End of File diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/src/CSatCommandContainer.cpp --- a/satengine/SatServer/Engine/src/CSatCommandContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/src/CSatCommandContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -20,12 +20,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include "MSatSystemState.h" #include "TSatSystemStateFactory.h" @@ -52,44 +52,21 @@ #include "csatmultimodeapi.h" #include "csatsactivewrapper.h" -_LIT( KResourceDrive, "z:\\resource\\qt\\translations" ); -_LIT( KSatServerRsc, "satapp_"); -_LIT( KSatLogTitle, "txt_simatk_title_sim_services"); -_LIT( KSatCmccTitle, "txt_simatk_titlw_cmcc_sim_services"); +// Drive letter for resource file +_LIT( KResourceDrive, "Z:" ); +// SatServer's resource file +_LIT( KSatServerRsc, "SatServer.rsc" ); + const TUid KSatInterfaceDefinitionUid = { 0x1000f001 }; const TInt KSizeOfBuf = 50; +const TInt8 KCreateSatAppNamePop( 2 ); // Important plugins UIDs. These are started on startup // Implementation UID is from the .rss const TUid KSetUpEventListUid = { 0x10202993 }; -// ======== LOCAL FUNCTIONS ======== - -// ----------------------------------------------------------------------------- -// CleanupPointerArray -// Cleanup RPointerArray objects by using the cleanup stack. Function will be -// called when application leaves while a RPointerArray object still alive, -// or when CleanupStack::PopAndDestroy is explicitly called to release a -// RPointerArray. See CleanupStack::PushL( TCleanupItem ) for more details. -// ----------------------------------------------------------------------------- -// -static void CleanupPointerArray( TAny* aArray ) - { - LOG2( NORMAL, "SATENGINE: CSatCommandContainer::CleanupPointerArray \ - calling array = 0x%08x", aArray ) - - RImplInfoPtrArray* array = reinterpret_cast( aArray ); - if ( array ) - { - array->ResetAndDestroy(); - } - - LOG( NORMAL, "SATENGINE: CSatCommandContainer::CleanupPointerArray \ - exiting" ) - } - // ======== MEMBER FUNCTIONS ======== // ----------------------------------------------------------------------------- @@ -181,8 +158,6 @@ in startup phase" ) // Create command handlers. RImplInfoPtrArray satCommandImplementations; - CleanupStack::PushL( - TCleanupItem( CleanupPointerArray, &satCommandImplementations ) ); REComSession::ListImplementationsL( KSatInterfaceDefinitionUid, satCommandImplementations ); @@ -221,7 +196,7 @@ } } } - CleanupStack::PopAndDestroy( &satCommandImplementations ); + satCommandImplementations.ResetAndDestroy(); // Notify TSY about readiness i.e. all nofies are sent // Done only once in startup phase @@ -244,8 +219,6 @@ // Create command handlers. RImplInfoPtrArray satCommandImplementations; - CleanupStack::PushL( - TCleanupItem( CleanupPointerArray, &satCommandImplementations ) ); REComSession::ListImplementationsL( KSatInterfaceDefinitionUid, satCommandImplementations ); @@ -280,7 +253,7 @@ // No commands, remove SAT Icon from shell iSatUiHandler.ShellController().RemoveSatUiL(); } - CleanupStack::PopAndDestroy( &satCommandImplementations ); + satCommandImplementations.ResetAndDestroy(); } else { @@ -393,7 +366,7 @@ iIsCmccSim = ETrue; // Update default name read in ConstructL. - TRAPD( err, CreateSatAppNameL( KSatCmccTitle ) ); + TRAPD( err, CreateSatAppNameL( R_QTN_SAT_CMCC_TITLE ) ); LOG2( NORMAL, "SATENGINE: Error: %i", err ) if ( KErrNone == err ) { @@ -625,7 +598,7 @@ { LOG( NORMAL, "SATENGINE: CSatCommandContainer::RestoreSatAppNameL name reset" ) - CreateSatAppNameL( KSatLogTitle ); + CreateSatAppNameL( R_QTN_SAT_LOG_TITLE ); } LOG( NORMAL, "SATENGINE: CSatCommandContainer::RestoreSatAppNameL exiting" ) } @@ -900,7 +873,7 @@ LOG( NORMAL, "SATENGINE: CSatCommandContainer::ConstructL calling" ) iIsCmccSim = EFalse; - CreateSatAppNameL( KSatLogTitle ); + CreateSatAppNameL( R_QTN_SAT_LOG_TITLE ); // Register for ui events in order to keep track if user or command // has launched the ui. @@ -989,22 +962,52 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -void CSatCommandContainer::CreateSatAppNameL( const TDesC& aResourceId ) +void CSatCommandContainer::CreateSatAppNameL( const TInt aResourceId ) { LOG( NORMAL, "SATENGINE: CSatCommandContainer::CreateSatAppNameL calling" ) - delete iSatAppName; - iSatAppName = NULL; - const TBool textResolver = HbTextResolverSymbian::Init( - KSatServerRsc, KResourceDrive ); - LOG2(NORMAL,"SATENGINE: CSatCommandContainer::\ - CreateSatAppNameL textResolver = %d", textResolver ) - LOG2(NORMAL,"SATENGINE: CSatCommandContainer::\ - CreateSatAppNameL aResourceId = %S", &aResourceId ) + + // Open the RFs session. + RFs fs; + + User::LeaveIfError( fs.Connect() ); + + // Push close operation in tbe cleanup stack + CleanupClosePushL( fs ); + + RResourceFile resFile; + // Backslashes are already defined in resource file, not needed here. + TBuf buf( KResourceDrive ); + buf.Append( KDC_RESOURCE_FILES_DIR ); + buf.Append( KSatServerRsc ); + + TFileName fileName( buf ); + + BaflUtils::NearestLanguageFile( fs, fileName ); + + // Open the resource file + resFile.OpenL( fs, fileName ); - iSatAppName = HbTextResolverSymbian::LoadL( aResourceId ); - LOG2(NORMAL,"SATENGINE: CSatCommandContainer::\ - CreateSatAppNameL iSatAppName = %S", iSatAppName ) + // Push close operation in the cleanup stack + CleanupClosePushL( resFile ); + + resFile.ConfirmSignatureL( ESatSResourceSignature ); + + // Reads a resource structure with memory allocation. + HBufC8* dataBuffer = resFile.AllocReadLC( aResourceId ); + + TResourceReader resReader; + resReader.SetBuffer( dataBuffer ); + + // Reads a string with memory allocation + iSatAppName = resReader.ReadHBufCL(); iSatBipName.Copy( SatAppName() ); + + // dataBuffer + CleanupStack::PopAndDestroy( dataBuffer ); + // resFile, Calls resFile.Close() + // fs, Calls fs.Close + CleanupStack::PopAndDestroy( KCreateSatAppNamePop ); + LOG( NORMAL, "SATENGINE: CSatCommandContainer::CreateSatAppNameL exiting" ) } @@ -1082,11 +1085,9 @@ // Create command handlers. RImplInfoPtrArray satCommandImplementations; - CleanupStack::PushL( - TCleanupItem( CleanupPointerArray, &satCommandImplementations ) ); REComSession::ListImplementationsL( KSatInterfaceDefinitionUid, satCommandImplementations ); - + // Container for commands const TInt cmdCount( satCommandImplementations.Count() ); LOG2( NORMAL, "SATENGINE: CSatCommandContainer::\ @@ -1117,8 +1118,8 @@ CleanupStack::Pop( setUpEventListCmd ); } } - - CleanupStack::PopAndDestroy( &satCommandImplementations ); + + satCommandImplementations.Close(); LOG( NORMAL, "SATENGINE: CSatCommandContainer::\ StartImportantCommandHandlersL exiting" ) } @@ -1141,5 +1142,3 @@ } LOG( NORMAL, "SATENGINE: CSatCommandContainer::CheckStartupState exiting" ) } - -// End Of File diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/src/CSatSIconSubSession.cpp --- a/satengine/SatServer/Engine/src/CSatSIconSubSession.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/src/CSatSIconSubSession.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -219,44 +219,27 @@ LOG( SIMPLE, "SATENGINE: CSatSIconSubSession::NotifyGetIconInstanceL calling" ) - LOG2( NORMAL, "SATENGINE: CSatSIconSubSession::NotifyGetIconInstanceL \ - infoLength: %x", iInfo.iLength ) - - LOG2( NORMAL, "SATENGINE: CSatSIconSubSession::NotifyGetIconInstanceL \ - dataLength: %x", iIconData->Length() ) - - // Get the CLUT and convert the icon data to bitmap. - - // basic icon has empty CLUT - if ( RSat::KBasic == iInfo.iCoding ) + if ( iInfo.iLength == iIconData->Length() ) { - // For the basi icon the length from the icon info and icon data - // body should have the same length but for the clore icon the - // length not always same. - if ( iInfo.iLength == iIconData->Length() ) + LOG( SIMPLE, "SATENGINE: CSatSIconSubSession::NotifyGetIconInstanceL \ + length equal" ) + // Get the clut and convert the icon data to bitmap. + if ( RSat::KBasic == iInfo.iCoding ) { LOG( SIMPLE, "CSatSIconSubSession::NotifyGetIconInstanceL \ - get the basic clut" ) + get the clut" ) // Basic icon does not have CLUT. iClut = KNullDesC8().AllocL(); + // Complete icon. NotifyGetClutL(); } else { LOG( SIMPLE, "CSatSIconSubSession::NotifyGetIconInstanceL \ - notify failure basic" ) - NotifyFailure( KErrCorrupt ); - } - } - else // color icon - { - LOG( SIMPLE, "CSatSIconSubSession::NotifyGetIconInstanceL \ - others" ) - TPtr8 iconDataPtr( iIconData->Des() ); + others" ) + TPtr8 iconDataPtr( iIconData->Des() ); - if ( iconDataPtr.Length() >= KNumberOfCLUTByte + 1 ) - { // Create buffer for clut. Each clut entry contains // intensity of red, green and blue. The value of 0 is // interpreted as 256 clut entries. (ETSI TS 131 102 V4.10.0). @@ -267,17 +250,12 @@ { numberOfClutEntries = KDefaultNumberOfClutEntries; } - + // Start getting the icon color lookup table from SIM. - TInt length = numberOfClutEntries * KClutEntrySize; - // In some situation the length we get from the icon information - // includes the length of the CLUT and some time it doesn't - // Both situation a valid. - if ( ( iInfo.iLength == iIconData->Length() ) - || ( iInfo.iLength == iIconData->Length() + length ) ) + iClut = HBufC8::NewL( numberOfClutEntries * KClutEntrySize ); + + if ( iconDataPtr.Length() >= KNumberOfCLUTByte + 1 ) { - iClut = HBufC8::NewL( length ); - LOG( SIMPLE, "CSatSIconSubSession::NotifyGetIconInstanceL \ get clut" ) const TUint offset( iconDataPtr[KColourDepthByte] << 8 | @@ -293,12 +271,12 @@ NotifyFailure( KErrCorrupt ); } } - else - { - LOG( SIMPLE, "CSatSIconSubSession::NotifyGetIconInstanceL \ - others notify failure" ) - NotifyFailure( KErrCorrupt ); - } + } + else + { + LOG( SIMPLE, "CSatSIconSubSession::NotifyGetIconInstanceL \ + notify failure" ) + NotifyFailure( KErrCorrupt ); } LOG( SIMPLE, diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/src/SatServer.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satengine/SatServer/Engine/src/SatServer.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,43 @@ +/* +* Copyright (c) 2003-2007 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: This file contains all the resources for the module. +* +*/ + + +NAME SATS + +#include + +#include "SatServer.hrh" +#include + +RESOURCE RSS_SIGNATURE { signature = ESatSResourceSignature; } + +/******************* Localized texts **********************/ + +// ----------------------------------------------------------------------------- +// r_sats_ti_log_title +// Defines localized text +// ----------------------------------------------------------------------------- +// +RESOURCE LBUF r_qtn_sat_log_title + { + txt = qtn_sat_log_title; + } + +RESOURCE LBUF r_qtn_sat_cmcc_title + { + txt = qtn_sat_cmcc_title; + } diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/src/csatmediatoreventprovider.cpp --- a/satengine/SatServer/Engine/src/csatmediatoreventprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/src/csatmediatoreventprovider.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -15,6 +15,8 @@ * */ + + #include #include #include diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/src/csatmultimodeapi.cpp --- a/satengine/SatServer/Engine/src/csatmultimodeapi.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/src/csatmultimodeapi.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -218,17 +218,6 @@ } // ----------------------------------------------------------------------------- -// CSatMultiModeApi::ContinueDTMFStringSending -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CSatMultiModeApi::ContinueDTMFStringSending( TBool aContinue ) - { - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::ContinueDTMFStringSending" ) - return iPhone.ContinueDTMFStringSending( aContinue ); - } - -// ----------------------------------------------------------------------------- // CSatMultiModeApi::DialNoFdnCheck // (other items were commented in a header). // ----------------------------------------------------------------------------- @@ -237,9 +226,6 @@ const TDesC8& aCallParams, const TDesC& aTelNumber) { LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck calling" ) - TInt err = LoadMobileCall(); - LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck err %d", err ) - iCall.DialNoFdnCheck( aStatus, aCallParams, aTelNumber ); LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck exiting" ) } @@ -308,7 +294,7 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -TBool CSatMultiModeApi::IsCallIncoming() +TBool CSatMultiModeApi::IsCallIncoming( ) { LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::IsCallIncoming entering" ) TInt lines( 0 ); @@ -355,75 +341,8 @@ callIncoming ) return callIncoming; } - // ----------------------------------------------------------------------------- -// CSatMultiModeApi::NotifyMobileCallStatusChange -// ----------------------------------------------------------------------------- -// -void CSatMultiModeApi::NotifyMobileCallStatusChange ( - TRequestStatus& aReqStatus, RMobileCall::TMobileCallStatus& aStatus ) - { - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::NotifyMobileCallStatusChange \ - calling" ) - iCall.NotifyMobileCallStatusChange( aReqStatus, aStatus ); - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::NotifyMobileCallStatusChange \ - exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSatMultiModeApi::NotifyCallStatusChangeCancel -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CSatMultiModeApi::NotifyCallStatusChangeCancel() - { - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialCancel calling" ) - iCall.NotifyStatusChangeCancel(); - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialCancel exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSatMultiModeApi::NotifyMobileCallStatusChange -// ----------------------------------------------------------------------------- -// -void CSatMultiModeApi::TerminateActiveCalls(TRequestStatus& aReqStatus) - { - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::TerminateAllCalls calling" ) - - iPhone.TerminateActiveCalls( aReqStatus ); - - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::TerminateAllCalls exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSatMultiModeApi::GetMobileCallInfo -// ----------------------------------------------------------------------------- -// -TInt CSatMultiModeApi::GetMobileCallInfo(TDes8& aCallInfo) - { - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::GetMobileCallInfo calling" ) - TInt ret = iCall.GetMobileCallInfo( aCallInfo ); - LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::GetMobileCallInfo exiting %d", - ret ) - return ret; - } - -// ----------------------------------------------------------------------------- -// CSatMultiModeApi::GetMobileCallInfo -// ----------------------------------------------------------------------------- -// -void CSatMultiModeApi::DialEmergencyCall(TRequestStatus& aReqStatus, - const TDesC& aNumber) - { - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall calling" ) - TInt err = LoadMobileCall(); - LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall err %d", err ) - iCall.DialEmergencyCall( aReqStatus, aNumber ); - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSatMultiModeApi::ConstructL +// CSatMultiModeApi::SetActiveAndWait // ----------------------------------------------------------------------------- // void CSatMultiModeApi::ConstructL() @@ -435,6 +354,7 @@ #if !defined ( __WINSCW__ ) //On the emulator the load will leave. We can not use the functionaly //on enmulator + LoadMobileCallL(); LoadUssdMessagingL(); #endif @@ -615,24 +535,14 @@ } // ----------------------------------------------------------------------------- -// CSatMultiModeApi::LoadMobileCall +// CSatMultiModeApi::LoadMobileCallL // (other items were commented in a header). // ----------------------------------------------------------------------------- // -TInt CSatMultiModeApi::LoadMobileCall() +void CSatMultiModeApi::LoadMobileCallL() { LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL calling" ) - if ( iCallOpened ) - { - iCall.Close(); - } - - if ( iLineOpened ) - { - iLine.Close(); - } - TInt numberOfTries( 1 ); // Indicates loop tryouts TBool loopSuccess( EFalse ); // Loop stopper, if this is ETrue TInt error = KErrNone; // Error that is Leave'd @@ -657,11 +567,13 @@ LOG2( NORMAL, "SATENGINE: CSatMultiModeApi::LoadMobileCallL \ iLine error: %i", error ) + User::LeaveIfError( error ); numberOfTries = 1; loopSuccess = EFalse; + error = KErrNone; - while ( iLineOpened &&!loopSuccess && numberOfTries <= KLoopMaxTryouts ) + while ( !loopSuccess && numberOfTries <= KLoopMaxTryouts ) { error = iCall.OpenNewCall( iLine ); if ( KErrNone == error ) @@ -682,8 +594,9 @@ LOG2( NORMAL, "SATENGINE: CSatMultiModeApi::LoadMobileCallL \ iCall error: %i", error ) - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL exiting" ) - return error; + User::LeaveIfError( error ); + + LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL exiting" ) } // ----------------------------------------------------------------------------- @@ -723,7 +636,7 @@ User::LeaveIfError( error ); - LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadUssdMessagingL exiting" ) + LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadUssdMessagingL exiting" ) } diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/Engine/src/csatprofilechangeobserver.cpp --- a/satengine/SatServer/Engine/src/csatprofilechangeobserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/Engine/src/csatprofilechangeobserver.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007 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" @@ -17,7 +17,6 @@ // INCLUDE FILES -#include #include "TSatSystemStateFactory.h" #include "MSatSystemStateChangeNotifier.h" #include "MSatUtils.h" @@ -25,6 +24,10 @@ #include "SatLog.h" #include "CSatSUiClientHandler.h" + +// CONSTANTS +const TInt KSatActiveProfileOffline = 5; // value from ProfileEngine + // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -109,7 +112,7 @@ with value %d", aValue ) // If profile is off-line send removing event - if ( ECoreAppUIsNetworkConnectionNotAllowed == aValue ) + if ( KSatActiveProfileOffline == aValue ) { LOG( SIMPLE, "SATENGINE: Off-line" ) // Off-line state activated. @@ -123,8 +126,8 @@ // SetupMenu command is received from SIM card not before phone is // in online mode. iPreviousProfile is -1 when StateChanged is called // first time. - else if ( ( ECoreAppUIsNetworkConnectionNotAllowed != aValue ) && - ( ECoreAppUIsNetworkConnectionNotAllowed == iPreviousProfile ) ) + else if ( ( KSatActiveProfileOffline != aValue ) && + ( KSatActiveProfileOffline == iPreviousProfile ) ) { LOG( SIMPLE, "SATENGINE: !Off-line" ) // Notify listeners about SAT UI icon adding diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/SystemState/src/CSatSystemState.cpp --- a/satengine/SatServer/SystemState/src/CSatSystemState.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/SystemState/src/CSatSystemState.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -16,7 +16,6 @@ */ - #include #include #include @@ -26,14 +25,8 @@ #include #include #include -#define Q_OS_SYMBIAN // needed to activate homescreendomainpskeys.h -#include - -// ****************************************************************** -// TODO: ScreensaverInternalPSKeys.h does no longer exist. -// Must find an alternative way to check screen locked state. -// #include -// ****************************************************************** +#include +#include #include #include #include @@ -276,15 +269,16 @@ TBool CSatSystemState::IsPhoneInIdleStateL() { LOG( SIMPLE, "SATSYSTEMSTATE: CSatSystemState::IsPhoneInIdleState calling" ) - TInt idleStatus(EHomeScreenIdleState) ; + TInt idleStatus; // Get the idle status from P&S User::LeaveIfError( RProperty::Get( - KHsCategoryUid, - KHsCategoryStateKey, - idleStatus)); - // Returns true if phone in idle state. - const TBool result( EHomeScreenIdleState == idleStatus ); + KPSUidAiInformation, + KActiveIdleState, + idleStatus ) ); + + // Returns true if phone in idle state. + const TBool result( EPSAiForeground == idleStatus ); LOG2( SIMPLE, "SATSYSTEMSTATE: CSatSystemState::IsPhoneInIdleState exiting \ with value: %d", result ) @@ -300,11 +294,6 @@ LOG( SIMPLE, "SATSYSTEMSTATE: CSatSystemState::IsScreenSaverActivedFromIdle calling" ) TBool result( EFalse ); - - /* - // TODO: This method can no longer be used for checking screen saver status. - // Must find an alternative method. - TInt screenSaverActive( -1 ); // Get the idle status from P&S @@ -323,8 +312,7 @@ LOG2( SIMPLE, "SATSYSTEMSTATE: CSatSystemState:: IsScreenSaverActivedFromIdle \ err: %d", err ) - */ - + LOG2( SIMPLE, "SATSYSTEMSTATE: CSatSystemState:: \ IsScreenSaverActivedFromIdle exiting with value: %d", result ) diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/SystemState/src/TSatSystemStateFactory.cpp --- a/satengine/SatServer/SystemState/src/TSatSystemStateFactory.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/SystemState/src/TSatSystemStateFactory.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -15,13 +15,13 @@ * */ + #include #include -#define Q_OS_SYMBIAN // needed to activate homescreendomainpskeys.h -#include +#include #include #include -#include +#include #include "TSatSystemStateFactory.h" #include "CSatSystemState.h" #include "msatmultimodeapi.h" @@ -29,6 +29,7 @@ #include "CSatCenRepChangeNotifier.h" #include "SatLog.h" + // ======== MEMBER FUNCTIONS ======== // ----------------------------------------------------------------------------- @@ -60,10 +61,10 @@ CreateIdleModeChangeNotifierL calling" ) MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( - KHsCategoryUid, - KHsCategoryStateKey, + KPSUidAiInformation, + KActiveIdleState, aObserver, - EHomeScreenIdleState ); + EPSAiForeground ); LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ CreateIdleModeChangeNotifierL exiting" ) @@ -170,8 +171,8 @@ CreateProfileChangeNotifierL calling" ) MSatSystemStateChangeNotifier* ret = CSatCenRepChangeNotifier::NewL( - KCRUidCoreApplicationUIs, - KCoreAppUIsNetworkConnectionAllowed, + KCRUidProfileEngine, + KProEngActiveProfile, aObserver, CSatCenRepChangeNotifier::ECRTypeInteger ); diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/conf/sat.confml Binary file satengine/SatServer/conf/sat.confml has changed diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/conf/sat_102078E1.crml Binary file satengine/SatServer/conf/sat_102078E1.crml has changed diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/group/bld.inf --- a/satengine/SatServer/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -22,8 +22,9 @@ DEFAULT PRJ_EXPORTS -satserver_stub.sis /epoc32/data/z/system/install/SatServer_stub.sis +SatServer_Stub.SIS /epoc32/data/z/system/install/SatServer_stub.sis ../rom/satserver.iby CORE_MW_LAYER_IBY_EXPORT_PATH( satserver.iby ) +../rom/SatServerResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( SatServerResources.iby ) // Generic configuration interface for component cenrep settings ../conf/sat.confml MW_LAYER_CONFML(sat.confml) diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/inc/CSatCommandHandler.h --- a/satengine/SatServer/inc/CSatCommandHandler.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/inc/CSatCommandHandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -15,6 +15,8 @@ * */ + + #ifndef CSATCOMMANDHANDLER_H #define CSATCOMMANDHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/inc/SATPrivateCRKeys.h --- a/satengine/SatServer/inc/SATPrivateCRKeys.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/inc/SATPrivateCRKeys.h Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). +* 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" @@ -60,6 +60,14 @@ * Default value: N/A */ const TUint32 KSatHomeZoneIconVisible( 0x00000032 ); + +// Defines whether USSD sending result is shown if no alpha id +/** +* Support is disabled if value is 0 +* +* Default value: N/A +*/ +const TUint32 KSatDisplayUssdResult( 0x00000064 ); #endif // SATPRIVATECRKEYS_H // End of File diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/inc/msatmultimodeapi.h --- a/satengine/SatServer/inc/msatmultimodeapi.h Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/inc/msatmultimodeapi.h Wed Sep 01 12:15:03 2010 +0100 @@ -95,12 +95,6 @@ */ virtual void SendDTMFTones(TRequestStatus& aReqStatus, const TDesC& aTones) = 0; - - /** - * Access RMobilePhone::ContinueDTMFStringSending - * for the paramter information please see the etelmm.h - */ - virtual TInt ContinueDTMFStringSending( TBool aContinue ) = 0; /** * Access RMobilePhone::CancelAsyncRequest * for the paramter information please see the etelmm.h @@ -138,34 +132,6 @@ * @return ETrue if there is an incoming call */ virtual TBool IsCallIncoming() = 0; - - /** - * Access RMobileCall::NotifyMobileCallStatusChange - */ - virtual void NotifyMobileCallStatusChange( TRequestStatus& aReqStatus, - RMobileCall::TMobileCallStatus& aStatus) = 0; - - /** - * Access RMobileCall::NotifyStatusChangeCancel - */ - virtual void NotifyCallStatusChangeCancel() = 0; - - /** - * Access RMobilePhone::TerminateActiveCalls - */ - virtual void TerminateActiveCalls(TRequestStatus& aReqStatus) = 0; - - /** - * Access RMboileCall::GetMobileCallInfo - */ - virtual TInt GetMobileCallInfo(TDes8& aCallInfo) = 0; - - /** - * Access RMboileCall::DialEmergencyCall - */ - virtual void DialEmergencyCall(TRequestStatus& aReqStatus, - const TDesC& aNumber) = 0; - }; #endif // MSATMULTIMODEAPI_H diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/loc/SatServer.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satengine/SatServer/loc/SatServer.loc Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2003-2007 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: SatServer localisation file +* +*/ + + +// LOCALISATION STRINGS: + +//d: Sat application name under the Sat icon in app shell. +//l: cell_app_pane_t1 +//w: S90DeskAppName +// +#define qtn_sat_log_title "SIM Services" + +//d: Application title and SAT application name when China +//d: Mobile SIM cards used +//l: cell_app_pane_t1 +#define qtn_sat_cmcc_title "SIM Card Application" + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/rom/SatServerResources.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satengine/SatServer/rom/SatServerResources.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2003-2006 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: Sat Server Resources iby file, contains resource file +* iby- information +* +*/ + + +#ifndef SATSERVERRESOURCES_IBY +#define SATSERVERRESOURCES_IBY + +#ifdef __SIMCARD + +// Resource file(s) for SatServer +data = DATAZ_\RESOURCE_FILES_DIR\satserver.rsc RESOURCE_FILES_DIR\satserver.rsc + +#endif // __SIMCARD + +#endif // SATSERVERRESOURCES_IBY + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satengine/group/bld.inf --- a/satengine/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: Build information file for project satserver +* Description: Build information file for project SatServer * */ @@ -19,4 +19,4 @@ PRJ_PLATFORMS DEFAULT -#include "../satserver/group/bld.inf" +#include "../SatServer/group/bld.inf" diff -r 7d48bed6ce0c -r 987c9837762f satengine/satserver/Commands/SetUpCallCmd/inc/csetupcalldtmfsender.h --- a/satengine/satserver/Commands/SetUpCallCmd/inc/csetupcalldtmfsender.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* 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: Create the call and emergency call to ETelMM -* -*/ - - -#ifndef CSETUPCALLDTMFSENDER_H -#define CSETUPCALLDTMFSENDER_H - -#include - -class MSatMultiModeApi; - -NONSHARABLE_CLASS ( CSetupCallDtmfSender ) : public CActive -{ -public: - - /** - * Two-phased constructor. - * @param aPhone A reference to the MSatMultiModeApi. - * @return a pointer to the newly created object. - */ - static CSetupCallDtmfSender* NewL( MSatMultiModeApi& aPhone ); - - /** - * Destructor. - */ - virtual ~CSetupCallDtmfSender(); - - /** - * Send Dtmf string after creating a call successfully - */ - void SendDtmfString(); - - /** - * Separate Dtmf string from whole string. - * Purl tel number will return by aString. - * Dtmf string will store in data member for furture sending dtmf. - */ - void SeparateDtmfFromTelNumber( TDes& aString ); - -protected: - - /** - * From CActive, handles the request completion. - */ - void RunL(); - - /** - * From CActive, handle the request cancel - */ - void DoCancel(); - -private: - - /** - * C++ default constructor. - * @param aPhone A reference to MSatMultiModeApi. - */ - CSetupCallDtmfSender( MSatMultiModeApi& aPhone ); - -private: // Data - - /** - * Reference to the MSatMultiModeApi - */ - MSatMultiModeApi& iPhone; - - /** - * Own. Dtmf string - */ - HBufC* iDtmfString; - -}; - -#endif // CSETUPCALLDTMFSENDER_H diff -r 7d48bed6ce0c -r 987c9837762f satengine/satserver/Commands/SetUpCallCmd/inc/csetupcallrequesthandler.h --- a/satengine/satserver/Commands/SetUpCallCmd/inc/csetupcallrequesthandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2009-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: Create the call and emergency call to ETelMM -* -*/ - - -#ifndef CSETUPCALLREQUESTHANDLER_H -#define CSETUPCALLREQUESTHANDLER_H - -#include -#include "msatmultimodeapi.h" - -class CSetUpCallHandler; -class MSatAsyncToSync; -class CSetupCallDtmfSender; - -/** -* This is the handler for the ETel MM api Request. -* This active objects is registered with ETelMM Api to send request and -* receive notifications about some Request Complete. -* -*/ - -NONSHARABLE_CLASS ( CSetupCallRequestHandler ) : public CActive - { -public: - - /** - * Two-phased constructor. - * @param aPhone A reference to the MSatMultiModeApi. - * @param aDispatcher Pointer to Ss handler - * @return a pointer to the newly created object. - */ - static CSetupCallRequestHandler* NewL( MSatMultiModeApi& aPhone, - CSetUpCallHandler* aDispatcher ); - - /** - * Destructor. - */ - virtual ~CSetupCallRequestHandler(); - - /** - * Access RMobileCall::DialNoFdnCheck by MSatMultiModeApi - * for the paramter information please see the etelmm.h - */ - void DialNumber( const TDesC8& aCallParams, TDes& aTelNumber, - TBool aTerminateOtherCall, MSatAsyncToSync* aAsyncToSync ); - - /** - * Access RMobileCall::DialEmergencyCall by MSatMultiModeApi - * for the paramter information please see the etelmm.h - */ - void DialEmergencyCall( const TDesC& aTelNumber ); - - /** - * Cancel the asynchronous operations that required to the ETel MM api - */ - void CancelOperation(); - - -protected: - - /** - * From CActive, handles the request completion. - */ - void RunL(); - - - /** - * From CActive, handle the request cancel - */ - void DoCancel(); - -private: - - /** - * C++ default constructor. - * @param aPriority An active object priority value. - * @param aPhone A reference to MSatMultiModeApi. - */ - CSetupCallRequestHandler( MSatMultiModeApi& aPhone, - CSetUpCallHandler* aDispatcher ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // Data - - /** - * Reference to the MSatMultiModeApi - */ - MSatMultiModeApi& iPhone; - - /** - * Pointer to SetupCall command handler - */ - CSetUpCallHandler* iDispatcher; - - /** - * Own. Dtmf sender - */ - CSetupCallDtmfSender* iDtmfSender; - }; - -#endif // CSETUPCALLREQUESTHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f satengine/satserver/Commands/SetUpCallCmd/src/csetupcalldtmfsender.cpp --- a/satengine/satserver/Commands/SetUpCallCmd/src/csetupcalldtmfsender.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,200 +0,0 @@ -/* -* 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: Send DTMF string if necessary after creating a call -* -*/ - -#include -#include -#include "msatmultimodeapi.h" -#include "csetupcalldtmfsender.h" -#include "msatasynctosync.h" -#include "SatLog.h" - -_LIT( KSatDtmfCharp, "p" ); -_LIT( KSatDtmfCharw, "w" ); - -// ================= MEMBER FUNCTIONS ======================= - -// ----------------------------------------------------------------------------- -// CSetupCallDtmfSender::CSetupCallDtmfSender -// The class constructor. -// ----------------------------------------------------------------------------- -// -CSetupCallDtmfSender::CSetupCallDtmfSender( MSatMultiModeApi& aPhone ) - : CActive( EPriorityStandard ), iPhone( aPhone ), iDtmfString( NULL ) - { - LOG( SIMPLE, - "SETUPCALL: CSetupCallDtmfSender::CSetupCallDtmfSender calling" ) - - CActiveScheduler::Add( this ); - - LOG( SIMPLE, - "SETUPCALL: CSetupCallDtmfSender::CSetupCallDtmfSender exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSetupCallDtmfSender::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CSetupCallDtmfSender* CSetupCallDtmfSender::NewL( MSatMultiModeApi& aPhone ) - { - LOG( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::NewL calling" ) - - CSetupCallDtmfSender* self = - new ( ELeave ) CSetupCallDtmfSender( aPhone ); - - LOG( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::NewL exiting" ) - return self; - } - -// ----------------------------------------------------------------------------- -// CSetupCallDtmfSender::~CSetupCallDtmfSender -// Destructor -// ----------------------------------------------------------------------------- -// -CSetupCallDtmfSender::~CSetupCallDtmfSender() - { - LOG( SIMPLE, "SETUPCALL: \ - CSetupCallDtmfSender::~CSetupCallDtmfSender calling" ) - Cancel(); - - delete iDtmfString; - iDtmfString = NULL; - - LOG( SIMPLE, "SETUPCALL: \ - CSetupCallDtmfSender::~CSetupCallDtmfSender exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSetupCallDtmfSender::SendDtmfString -// ----------------------------------------------------------------------------- -// -void CSetupCallDtmfSender::SendDtmfString() -{ - LOG( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::SendDtmfString calling" ) - if( !IsActive() && iDtmfString ) - { - const TInt ret = iPhone.ContinueDTMFStringSending( ETrue ); - LOG2( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::SendDtmfString\ - ContinueDTMFStringSending ret %d", ret ) - iPhone.SendDTMFTones( iStatus, *iDtmfString ); - - SetActive(); - } - LOG( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::SendDtmfString exit" ) -} - -// ----------------------------------------------------------------------------- -// CSetupCallDtmfSender::SeparateDtmfFromTelNumber -// Refers to -// RPhCltEmergencyCall::RemoveDTMF -// RPhCltEmergencyCall::FindStartOfDtmfString -// ----------------------------------------------------------------------------- -// -void CSetupCallDtmfSender::SeparateDtmfFromTelNumber(TDes& aString) - { - LOG( SIMPLE, - "SETUPCALL: CSetupCallDtmfSender::SeparateDtmfFromTelNumber calling") - - delete iDtmfString; - iDtmfString = NULL; - - // String must contain 'p' or 'w'. Find start of dtmf string. - TInt indexp; //char 'p' index - TInt indexw; // char 'w' index - TPtrC ptrDtmfCharp( KSatDtmfCharp ); - TPtrC ptrDtmfCharw( KSatDtmfCharw ); - - indexp = aString.Locate( ptrDtmfCharp[ 0 ] ); - indexw = aString.Locate( ptrDtmfCharw[ 0 ] ); - - TInt dtmfIndex = KErrNotFound; - if ( indexp != KErrNotFound || indexw != KErrNotFound ) - { - // dtmf char found - if ( indexw == KErrNotFound ) - { - // char p index - dtmfIndex = indexp; - } - else if ( indexp == KErrNotFound ) - { - // char w index - dtmfIndex = indexw; - } - else - { - // Both chars p and w found, smaller index selected - indexp < indexw ? dtmfIndex = indexp : dtmfIndex = indexw; - } - } - LOG2( SIMPLE, - "SETUPCALL: CSetupCallDtmfSender::SeparateDtmfFromTelNumber \ - dtmfIndex=%d", dtmfIndex ) - - // Separate purl tel number and dtmf string - if ( dtmfIndex != KErrNotFound ) - { - // Dtmf string to member data for furture sending - TPtrC temp( aString.Right( aString.Length() - dtmfIndex ) ); - LOG2( SIMPLE, - "SETUPCALL: CSetupCallDtmfSender::SeparateDtmfFromTelNumber \ - DTMF=%S", &temp) - - iDtmfString = temp.Alloc(); - LOG2( SIMPLE, - "SETUPCALL: CSetupCallDtmfSender::SeparateDtmfFromTelNumber \ - iDtmfString address=%d", iDtmfString ) - - // Tel number for dialing call - aString.Delete( dtmfIndex, aString.Length() - dtmfIndex ); - LOG2( SIMPLE, - "SETUPCALL: CSetupCallDtmfSender::SeparateDtmfFromTelNumber \ - TelNumber=%S", &aString ) - } - LOG( SIMPLE, - "SETUPCALL: CSetupCallDtmfSender::SeparateDtmfFromTelNumber exit" ) - } - -// ----------------------------------------------------------------------------- -// CSetupCallDtmfSender::RunL -// Handles the command. -// ----------------------------------------------------------------------------- -// -void CSetupCallDtmfSender::RunL() - { - LOG2( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::RunL calling iStatus=%i", - iStatus.Int() ) - - delete iDtmfString; - iDtmfString = NULL; - - LOG( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::RunL exiting" ) - } - -// ----------------------------------------------------------------------------- -// From class CActive. -// Cancels the sat request. -// ----------------------------------------------------------------------------- -// -void CSetupCallDtmfSender::DoCancel() - { - LOG( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::DoCancel calling" ) - iPhone.CancelAsyncRequest( EMobilePhoneSendDTMFTones ); - LOG( SIMPLE, "SETUPCALL: CSetupCallDtmfSender::DoCancel exiting" ) - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f satengine/satserver/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp --- a/satengine/satserver/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,219 +0,0 @@ -/* -* Copyright (c) 2009-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: Create the call and emergency call to ETelMM -* -*/ - - -#include -#include - -#include "csetupcallrequesthandler.h" -#include "CSetUpCallHandler.h" -#include "csetupcalldtmfsender.h" -#include "msatasynctosync.h" -#include "SatLog.h" - -// ================= MEMBER FUNCTIONS ======================= - -// ----------------------------------------------------------------------------- -// CSetupCallRequestHandler::CSetupCallRequestHandler -// The class constructor. -// ----------------------------------------------------------------------------- -// -CSetupCallRequestHandler::CSetupCallRequestHandler( - MSatMultiModeApi& aPhone, CSetUpCallHandler* aDispatcher ) - : CActive( EPriorityStandard ), iPhone( aPhone ), - iDispatcher( aDispatcher ) - { - LOG( SIMPLE, - "SETUPCALL: CSetupCallRequestHandler::CSetupCallRequestHandler \ - calling" ) - - CActiveScheduler::Add( this ); - - LOG( SIMPLE, - "SETUPCALL: CSetupCallRequestHandler::CSetupCallRequestHandler \ - exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSetupCallRequestHandler::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CSetupCallRequestHandler* CSetupCallRequestHandler::NewL( - MSatMultiModeApi& aPhone, CSetUpCallHandler* aDispatcher ) - { - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::NewL calling" ) - - CSetupCallRequestHandler* self = - new ( ELeave ) CSetupCallRequestHandler( aPhone, aDispatcher ); - - self->ConstructL(); - - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::NewL exiting" ) - return self; - } - -// ----------------------------------------------------------------------------- -// CSetupCallRequestHandler::~CSetupCallRequestHandler -// Destructor -// ----------------------------------------------------------------------------- -// -CSetupCallRequestHandler::~CSetupCallRequestHandler() - { - LOG( SIMPLE, "SETUPCALL: \ - CSetupCallRequestHandler::~CSetupCallRequestHandler calling" ) - Cancel(); - iDispatcher = NULL; - - delete iDtmfSender; - iDtmfSender = NULL; - - LOG( SIMPLE, "SETUPCALL: \ - CSetupCallRequestHandler::~CSetupCallRequestHandler exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSetupCallRequestHandler::ConstructL -// ----------------------------------------------------------------------------- -// -void CSetupCallRequestHandler::ConstructL() -{ - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::ConstructL calling" ) - iDtmfSender = CSetupCallDtmfSender::NewL( iPhone ); - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::ConstructL exiting" ) -} - -// ----------------------------------------------------------------------------- -// CSetupCallRequestHandler::DialNumber -// ----------------------------------------------------------------------------- -// -void CSetupCallRequestHandler::DialNumber( const TDesC8& aCallParams, - TDes& aTelNumber, TBool aTerminateOtherCall, - MSatAsyncToSync* aAsyncToSync ) - { - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber calling" ) - - TInt terminateRes ( KErrNone ); - - if( aTerminateOtherCall ) - { - if( aAsyncToSync ) - { - iPhone.TerminateActiveCalls( aAsyncToSync->RequestStatus() ); - terminateRes = aAsyncToSync->SetActiveAndWait(); - } - else - { - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber \ - bad MSatAsyncToSync pointer" ) - terminateRes = KErrGeneral; - } - } - - if( !IsActive() ) - { - if( KErrNone == terminateRes ) - { - // Separate dtmf string from whole number and store in iDtmfString - // the dtmf string will be removed from aTelNumber - iDtmfSender->SeparateDtmfFromTelNumber(aTelNumber); - // Dial the pure tel number - iPhone.DialNoFdnCheck( iStatus, aCallParams, aTelNumber ); - SetActive(); - } - else - { - iDispatcher->SetupCallRequestComplete( terminateRes ); - } - } - else - { - iDispatcher->SetupCallRequestComplete( KErrInUse ); - } - - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSetupCallRequestHandler::DialEmergencyCall -// ----------------------------------------------------------------------------- -// -void CSetupCallRequestHandler::DialEmergencyCall( const TDesC& aTelNumber ) - { - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber calling" ) - - if( !IsActive() ) - { - iPhone.DialEmergencyCall( iStatus, aTelNumber ); - SetActive(); - } - else - { - iDispatcher->SetupCallRequestComplete( KErrInUse ); - } - - LOG( SIMPLE, - "SETUPCALL: CSetupCallRequestHandler::DialEmergencyCall exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSetupCallRequestHandler::RunL -// Handles the command. -// ----------------------------------------------------------------------------- -// -void CSetupCallRequestHandler::RunL() - { - LOG2( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::RunL calling\ - iStatus=%i", iStatus.Int() ) - - iDispatcher->SetupCallRequestComplete( iStatus.Int() ); - - if ( KErrNone == iStatus.Int() ) - { - iDtmfSender->SendDtmfString(); - } - - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::RunL exiting" ) - } - -// ----------------------------------------------------------------------------- -// CSetupCallRequestHandler::CancelOperation -// ----------------------------------------------------------------------------- -// -void CSetupCallRequestHandler::CancelOperation() - { - LOG( SIMPLE, "SETUPCALL: \ - CSetupCallRequestHandler::CancelOperation calling" ) - iPhone.DialCancel(); - iDtmfSender->Cancel(); - LOG( SIMPLE, - "SETUPCALL: CSetupCallRequestHandler::CancelOperation exiting" ) - } - -// ----------------------------------------------------------------------------- -// From class CActive. -// Cancels the sat request. -// ----------------------------------------------------------------------------- -// -void CSetupCallRequestHandler::DoCancel() - { - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DoCancel calling" ) - CancelOperation(); - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DoCancel exiting" ) - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/group/bld.inf --- a/satui/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/satui/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006 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" @@ -11,13 +11,13 @@ * * Contributors: * -* Description: Build information file for project SATUI +* Description: Build information file for project SatApp * */ - PRJ_PLATFORMS DEFAULT -#include "../satshellcontroller/group/bld.inf" +#include "../satapp/Group/bld.inf" +#include "../satplugin/group/bld.inf" diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/EABI/SatShellCntrlU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/EABI/SatShellCntrlU.DEF Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,5 @@ +EXPORTS + _Z16NewSatControllerv @ 1 NONAME + _ZTI19CSatShellController @ 2 NONAME ; ## + _ZTV19CSatShellController @ 3 NONAME ; ## + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/SatApp_stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/SatApp_stub.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,34 @@ +; +; 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: For packing sat application stub. +; +; Languages +&EN + +; Header +#{"satui"}, (0x101f4ce0), 1, 0, 0, TYPE=SA + +; Localised Vendor name +%{"Nokia"} + +; Unique Vendor name +:"Nokia" + +; Files +""-"z:\sys\bin\SatUi.exe" +""-"z:\sys\bin\SatShellCntrl.dll" +""-"z:\resource\apps\satui.mbm" +""-"z:\resource\apps\Satui_aif.mif" +""-"z:\resource\apps\Satui.rsc" +""-"z:\private\10003a3f\import\apps\Satui_reg.rsc" \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/SatShellCntrl.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/SatShellCntrl.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,46 @@ +/* +* Copyright (c) 2003-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: SatShellCntrl mmp- file +* +*/ + + +#include + +TARGET SatShellCntrl.dll +TARGETTYPE dll +UID 0x1000008D 0x1000A835 +SECUREID 0x1000A835 + +CAPABILITY CAP_GENERAL_DLL +VENDORID VID_DEFAULT + +SOURCEPATH ../SATShellControllerSrc +SOURCE CSatShellController.cpp + +USERINCLUDE ../SATShellControllerInc + +// Application layer system include is needed due MenuSatInterface provided by AppShell +APP_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE ../../../inc // Domain telephony +SYSTEMINCLUDE ../../inc // Subsystem satui + +LIBRARY euser.lib +LIBRARY apparc.lib // RApaLsSession +LIBRARY apgrfx.lib // CApaCommandLine +LIBRARY ws32.lib // RWsSession +LIBRARY menuinterface.lib +LIBRARY flogger.lib + + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/SatUI.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/SatUI.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information file for project SatUi +* +*/ + + +#include +#include + +TARGET SATUI.exe +TARGETTYPE exe +UID 0x100039CE 0x101f4ce0 + +CAPABILITY CAP_APPLICATION NetworkControl +VENDORID VID_DEFAULT + +SECUREID 0x101f4ce0 +EPOCSTACKSIZE 0x5000 + +SOURCEPATH ../SATUISrc + +SOURCE ../SATUISrc/CSatUiApplication.cpp +SOURCE ../SATUISrc/CSatUiDocument.cpp +SOURCE ../SATUISrc/CSatUiViewAppUi.cpp +SOURCE ../SATUISrc/CSatUiActionPerformer.cpp +SOURCE ../SATUISrc/CSatUiView.cpp +SOURCE ../SATUISrc/CSatUiViewContainer.cpp +SOURCE ../SATUISrc/CSatUiTextQueryDialog.cpp +SOURCE ../SATUISrc/CSatUiMessageQueryIcon.cpp +SOURCE ../SATUISrc/CSatUiWaitDialog.cpp +SOURCE ../SATUISrc/csatuiiconhandler.cpp + +// Application layer system include needed due Browser and ProfileEngine CR keys +APP_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE ../../../inc // Domain telephony +SYSTEMINCLUDE ../../inc // Subsystem satui + +START RESOURCE ../data/SatUi.rss +HEADER // Build the .rsg file. +TARGETPATH APP_RESOURCE_DIR +LANGUAGE_IDS +END // ../Data/SatUi RESOURCE + +START RESOURCE ../data/Satui_reg.rss +DEPENDS satui.rsg +// Do not change the UID below. +TARGETPATH /private/10003a3f/apps +END + +USERINCLUDE ../SATUIInc + +LIBRARY euser.lib +LIBRARY apparc.lib +LIBRARY cone.lib +LIBRARY eikcore.lib +LIBRARY avkon.lib +LIBRARY eikdlg.lib +LIBRARY eikcoctl.lib +LIBRARY bafl.lib +LIBRARY SatInternalClient.lib +LIBRARY SatClient.lib +LIBRARY Commonengine.lib +LIBRARY MediaClientAudio.lib +LIBRARY aknnotify.lib +LIBRARY aknicon.lib +LIBRARY ws32.lib +LIBRARY apgrfx.lib +LIBRARY fbscli.lib +LIBRARY eikctl.lib +LIBRARY egul.lib +LIBRARY etext.lib // for CRichText +LIBRARY gdi.lib // for CPicture +LIBRARY estor.lib // for TSwizzle +LIBRARY CdlEngine.lib // for AknLayout2Def +LIBRARY AknLayout2Scalable.lib +LIBRARY hlplch.lib +LIBRARY activitymanager.lib +LIBRARY Flogger.lib +LIBRARY CentralRepository.lib +LIBRARY CenRepNotifHandler.lib +LIBRARY ProfileEng.lib +LIBRARY FeatMgr.lib // for FeatureManager diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2002-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: Build information file for project SATUI +* +*/ + + +#include + +PRJ_PLATFORMS +DEFAULT + +// Help exports +#include "../help/group/bld.inf" + +PRJ_EXPORTS +../data/SatApp_stub.SIS /epoc32/data/z/system/install/SatApp_stub.sis +../loc/satui.loc MW_LAYER_LOC_EXPORT_PATH( satui.loc ) +../rom/satui.iby CORE_MW_LAYER_IBY_EXPORT_PATH( satui.iby ) +../rom/SatUiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( SatUiResources.iby ) + +PRJ_EXTENSIONS +START EXTENSION s60/mifconv + OPTION TARGETFILE satui.mif + OPTION HEADERFILE satui.mbg + OPTION SOURCES -c8,8 qgn_menu_sat_cxt -c8,8 qgn_menu_sat_lst -c8,8 qgn_note_sim +END + +START EXTENSION s60/mifconv + OPTION TARGETFILE satui_aif.mif + OPTION SOURCES -c8,8 qgn_menu_sat +END + +PRJ_MMPFILES + +./SatUI.mmp +./SatShellCntrl.mmp + +PRJ_TESTMMPFILES + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/satui_icons.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/satui_icons.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,68 @@ +# +# Copyright (c) 2004 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: Make file for satui icons. +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=\epoc32\data\z +endif + +TARGETDIR=$(ZDIR)\SYSTEM\APPS\Satui +HEADERDIR=\epoc32\include +ICONTARGETFILENAME=$(TARGETDIR)\satui.mif +HEADERFILENAME=$(HEADERDIR)\satui.mbg + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# NOTE 1: MASK FILE NAMES ARE NOT DEFINED! +# They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- + +RESOURCE : + mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ + /c8,8 qgn_menu_sat_cxt.bmp \ + /c8,8 qgn_menu_sat_lst.bmp \ + /c8,8 qgn_note_sim.bmp + + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(HEADERFILENAME)&& \ + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/satui_icons_aif_bitmaps.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/satui_icons_aif_bitmaps.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,63 @@ +# +# Copyright (c) 2004 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: Make file for satui icons. +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=\epoc32\data\z +endif + +TARGETDIR=$(ZDIR)\SYSTEM\APPS\Satui +ICONTARGETFILENAME=$(TARGETDIR)\satui_aif.mbm + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# NOTE 1: MASK FILE NAMES ARE NOT DEFINED! +# They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- + +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c8,8 qgn_menu_sat_lst.bmp \ + /c8,8 qgn_menu_sat_cxt.bmp + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/satui_icons_aif_bitmaps_dc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/satui_icons_aif_bitmaps_dc.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,51 @@ +# +# Copyright (c) 2004 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: Make file for satui icons. +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=\epoc32\data\z +endif + +TARGETDIR=$(ZDIR)\RESOURCE\APPS +ICONTARGETFILENAME=$(TARGETDIR)\satui_aif.mbm + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c8,8 qgn_menu_sat_lst.bmp \ + /c8,8 qgn_menu_sat_cxt.bmp + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/satui_icons_aif_scalable.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/satui_icons_aif_scalable.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,62 @@ +# +# Copyright (c) 2004 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: Make file for satui icons. +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=\epoc32\data\z +endif + +TARGETDIR=$(ZDIR)\SYSTEM\APPS\Satui +ICONTARGETFILENAME=$(TARGETDIR)\satui_aif.mif + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# NOTE 1: MASK FILE NAMES ARE NOT DEFINED! +# They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c8,8 qgn_menu_sat.svg + + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/satui_icons_aif_scalable_dc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/satui_icons_aif_scalable_dc.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,51 @@ +# +# Copyright (c) 2004 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: Make file for satui icons. +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=\epoc32\data\z +endif + +TARGETDIR=$(ZDIR)\RESOURCE\APPS +ICONTARGETFILENAME=$(TARGETDIR)\satui_aif.mif + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + +RESOURCE : + mifconv $(ICONTARGETFILENAME) \ + /c8,8 qgn_menu_sat.svg + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/Group/satui_icons_dc.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/Group/satui_icons_dc.mk Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,58 @@ +# +# Copyright (c) 2003 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: Make file for satui icons. +# + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=\epoc32\data\z +endif + + +TARGETDIR=$(ZDIR)\RESOURCE\APPS +HEADERDIR=\epoc32\include +ICONTARGETFILENAME=$(TARGETDIR)\satui.mif +HEADERFILENAME=$(HEADERDIR)\satui.mbg + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : do_nothing + +LIB : do_nothing + +CLEANLIB : do_nothing + + +RESOURCE : + mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ + /c8,8 qgn_menu_sat_cxt.bmp \ + /c8,8 qgn_menu_sat_lst.bmp \ + /c8,8 qgn_note_sim.bmp + + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(HEADERFILENAME)&& \ + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATShellControllerInc/CSatShellController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATShellControllerInc/CSatShellController.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,183 @@ +/* +* Copyright (c) 2003-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: +* This file contains the SAT Shell Controller class that is responsible +* for the actual implementation of the following functionality: +* - add SAT UI application to Desk (or similar) +* - remove SAT UI application from Desk (or similar) +* - bring SAT UI application to foreground if it already is up +* and running +* - launching the SAT UI application +* - launching the Browser +* - resolving default access point +* - bring Browser to the foreground +* +* +*/ + + +#ifndef CSATSHELLCONTROLLER_H +#define CSATSHELLCONTROLLER_H + +// INCLUDES +#include +#include + +// CONSTS +const TInt KSatAppNameSize = 255; //Context pane max + +// CLASS DECLARATION + +// DESCRIPTION +// This class is used to control adding, removing and launching of +// the SAT UI Client application. It connects to appropriate module +// and is used by the SAT Server. + +class CSatShellController : public CBase, + public MSatShellController + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CSatShellController* NewL(); + + /** + * Destructor. + */ + virtual ~CSatShellController(); + + public: // New functions + + /** + * Adds SAT UI Client to the Application Shell (or similar). + * @param aName Name of the entry + * @param aUid UID of the SAT UI Application + * @return Nothing + */ + void AddSatUiL( TDesC& aName ); + + /** + * Adds SAT UI Client to the Application Shell (or similar). + * @param aName Name of the entry + * @param aIconId Id for icons + * @return Nothing + */ + void AddSatUiL( TDesC& aName, TUint8 aIconId ); + + /** + * Removes SAT UI Client from the Application Shell (or similar). + * @param aUid UID of the SAT UI Application + * @return Nothing + */ + void RemoveSatUiL(); + + /** + * Launches the SAT UI Client. + * @param aUid UID of the SAT UI Application + * @return Nothing + */ + void LaunchSatUiL(); + + /** + * Brings Browser to foreground after period of time. + * @param Nothing + * @return Nothing + */ + void BringBrowserToForegroundAfterPeriod(); + + /** + * Bring the SAT UI Application to foreground. + * @param Nothing + * @return Nothing + */ + void BringSatUiToForeground(); + + /** + * Sets SAT UI Application to background if needed. + */ + void SetSatUiToBackground() const; + + /** + * Launch XHTML-browser + * @param aUrl URL to be opened when launching browser + * @param aAccessPointUid ID number of access point in CommDb + * @return The result of the operation + */ + TInt LaunchBrowserL( const TDesC& aUrl, TUid aAccessPointUid ); + + /** + * This callback function is used to call Browser to the foreground + * after short while. + * @param aObject Pointer to caller is passed to callback function. + * @return Callback function should return TInt. + */ + static TInt TimerCompleted( TAny* aObject ); + + private: + + /** + * C++ default constructor. + */ + CSatShellController(); + + /** + * By default EPOC constructor is private. + */ + void ConstructL(); + + /** + * Bring the SAT UI Application to foreground. + * @param aAppUid The UID value of application. + * @return Nothing + */ + void BringApplicationToForeground( const TUid& aAppUid ) const; + + /** + * Brings Browser to foreground. + * @param Nothing + * @return Nothing + */ + void BringBrowserToForeground() const; + + /** + * Checks if Browser is not foreground and starts that if needed. + * @param Nothing + * @return Nothing + */ + void CycleSatUiBackwards(); + + /** + * Check if SatUi is needed to set to background. + * @param Nothing + * @return Nothing + */ + void CheckSatUiStatus(); + + private: // Data + + TBufC iSimAppName; + TUid iUidWmlBrowser; + RWsSession iWsSession; + RApaLsSession iApaLsSession; + // Timer for checking Browser start. + CPeriodic* iTimer; + TBool iSetSatUiToBackground; + + }; + +#endif // CSATSHELLCONTROLLER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATShellControllerInc/tflogger.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATShellControllerInc/tflogger.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2002-2006 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: Defines logging macroes +* +*/ + + +#ifndef __TFLOGGER_H__ +#define __TFLOGGER_H__ + +#include +#include + +_LIT( KTfLogFolder, "sat" ); +_LIT( KTfLogFile, "satui.TXT" ); + +/** +* ------------------------------------------------------------------------------ +* +* Remove #define LOGGING_ENABLED from comments to enable logging +* +* ------------------------------------------------------------------------------ +*/ + +//#define LOGGING_ENABLED + +/** +* ------------------------------------------------------------------------------ +* +* LOGGING MACROs +* +* USE THESE MACROS IN YOUR CODE +* +* Example: TFLOGTEXT( own_desc ) +* Example: TFLOGSTRING( "Test" ) +* Example: TFLOGSTRING( "Test %i", aValue ) +* Example: TFLOGSTRING( "Test %i %i", aValue1, aValue2 ) +* +* ------------------------------------------------------------------------------ +*/ + +#ifdef LOGGING_ENABLED + + #define TFLOGTEXT( TEXT ) \ + { \ + RFileLogger::Write( KTfLogFolder,KTfLogFile, \ + EFileLoggingModeAppend, TEXT ); \ + RDebug::Print( TEXT ); \ + } + + #define TFLOGSTRING( TEXT ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::Write( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + tempLogDes() ); \ + RDebug::Print( _L( TEXT ) ); \ + } + + #define TFLOGSTRING2( TEXT, VAR1 ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::WriteFormat( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + TRefByValue( tempLogDes() ), VAR1 ); \ + RDebug::Print( _L( TEXT ), VAR1 ); \ + } + + #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::WriteFormat( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + TRefByValue( tempLogDes() ), VAR1, VAR2 ); \ + RDebug::Print( _L( TEXT ), VAR1, VAR2 ); \ + } + +#else + + #define TFLOGTEXT( TEXT ) + #define TFLOGSTRING( TEXT ) + #define TFLOGSTRING2( TEXT, VAR1 ) + #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) + +#endif // LOGGING_ENABLED + +#endif // __TFLOGGER_H__ diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATShellControllerSrc/CSatShellController.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATShellControllerSrc/CSatShellController.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,515 @@ +/* +* Copyright (c) 2003-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: +* This file contains the SAT Shell Controller class that is responsible +* for the actual implementation of the following functionality: +* - add SAT UI application to Desk (or similar) +* - remove SAT UI application from Desk (or similar) +* - bring SAT UI application to foreground if it already is up +* and running +* - launching the SAT UI application +* - launching the Browser +* - resolving default access point +* - bring Browser to the foreground +* +* +*/ + + +// INCLUDE FILES +#include // RWsSession +#include // TApaAppInfo +#include // CApaCommandLine +#include // RApaLsSession +#include // TApaTaskList +#include // CApaWindowGroupName +#include // CMenuSATInterface +#include // KWmlcHandler +#include "CSatShellController.h" + +// Browser Cen Rep Keys. +#ifdef __SERIES60_NATIVE_BROWSER + #include + #include +#endif // __SERIES60_NATIVE_BROWSER +#include "tflogger.h" + +// CONSTANTS +const TUid KUidSatUi = { 0x101f4ce0 }; +_LIT( KFour, "4" ); // Browser parameter. +_LIT( KFive, "5" ); // Browser parameter. +_LIT( KSpace, " " ); // Used as Browser parameter. +static const TUid KEmptyUid = { KErrNotFound }; +static const TUid KUidBrowser = { KWmlcHandler }; +const TInt KTimerTime( 2000000 ); // 2 seconds. +const TInt KBrowserParamAndTwoSpaces( 3 ); +#ifndef __SERIES60_NATIVE_BROWSER + const TUid KCRUidBrowser = { 0x10008D39 }; + const TUint32 KBrowserDefaultAccessPoint( 0x0000000E ); +#endif // __SERIES60_NATIVE_BROWSER + +// ================= MEMBER FUNCTIONS ======================================= + +// C++ default constructor can NOT contain any code that +// might leave. +// +CSatShellController::CSatShellController(): + iUidWmlBrowser( TUid::Uid( KWmlcHandler )) + { + TFLOGSTRING( "CSatShellController::CSatShellController called-exit" ) + } + +// Symbian OS constructor +void CSatShellController::ConstructL() + { + TFLOGSTRING( "CSatShellController::ConstructL called" ) + + // Timer is used to get the Browser application to the foreground. + iTimer = CPeriodic::NewL( EPriorityNormal ); + + TFLOGSTRING( "CSatShellController::ConstructL exit" ) + } + +// Two-phased constructor. +CSatShellController* CSatShellController::NewL() + { + TFLOGSTRING( "CSatShellController::NewL called" ) + + CSatShellController* self = new ( ELeave ) CSatShellController; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + + TFLOGSTRING( "CSatShellController::NewL exit" ) + return self; + } + + +// Destructor +CSatShellController::~CSatShellController() + { + TFLOGSTRING( "CSatShellController::~CSatShellController called" ) + + // Frees resources. + if ( iTimer ) + { + iTimer->Cancel(); + } + delete iTimer; + + TFLOGSTRING( "CSatShellController::~CSatShellController exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::AddSatUiL +// Adds SAT UI Client application to phone's +// Application Shell (or similar). +// --------------------------------------------------------- +// +void CSatShellController::AddSatUiL( + TDesC& aName ) + { + TFLOGSTRING( "CSatShellController::AddSatUiL(name) called" ) + + iSimAppName = aName; + + CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface; + menu->MakeSatUiVisible( ETrue, aName ); + delete menu; + + TFLOGSTRING( "CSatShellController::AddSatUiL exit" ) + } + +//------------------------------------------------------------ +// CSatShellController::AddSatUiL +// Adds SAT UI Client application to phone's +// Application Shell (or similar). +// --------------------------------------------------------- +// +void CSatShellController::AddSatUiL( + TDesC& aName, TUint8 aIconId ) + { + TFLOGSTRING( "CSatShellController::AddSatUiL(name,icon) called" ) + + iSimAppName = aName; + + CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface; + menu->MakeSatUiVisible( ETrue, aName, aIconId ); + delete menu; + + TFLOGSTRING( "CSatShellController::AddSatUiL exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::RemoveSatUiL +// Removes SAT UI Client application from phone's +// Application Shell (or similar). +// --------------------------------------------------------- +// + +void CSatShellController::RemoveSatUiL() + { + TFLOGSTRING( "CSatShellController::RemoveSatUiL called" ) + + CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface; + menu->MakeSatUiVisible( EFalse, iSimAppName ); + delete menu; + + TFLOGSTRING( "CSatShellController::RemoveSatUiL exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::LaunchSatUiL +// Launches SAT UI Client application. +// --------------------------------------------------------- +// +void CSatShellController::LaunchSatUiL() + { + TFLOGSTRING( "CSatShellController::LaunchSatUiL called" ) + + RApaLsSession rapaLsSession; + User::LeaveIfError( rapaLsSession.Connect() ); + CleanupClosePushL( rapaLsSession ); + TThreadId id( static_cast( 0 ) ); + TApaAppInfo appInfo; + + User::LeaveIfError( rapaLsSession.GetAppInfo( appInfo, KUidSatUi ) ); + CApaCommandLine* cmdLine = CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL( appInfo.iFullName ); + cmdLine->SetCommandL( EApaCommandOpen ); + rapaLsSession.StartApp( *cmdLine, id ); + + CleanupStack::PopAndDestroy( cmdLine ); + CleanupStack::PopAndDestroy( &rapaLsSession ); + + TFLOGSTRING( "CSatShellController::LaunchSatUiL exit" ) + } + + +// --------------------------------------------------------- +// CSatShellController::BringBrowserToForeground +// Brings the Browser to foreground. +// --------------------------------------------------------- +// +void CSatShellController::BringBrowserToForeground() const + { + TFLOGSTRING( "CSatShellController::BringBrowserToForeground called" ) + + BringApplicationToForeground( iUidWmlBrowser ); + + TFLOGSTRING( "CSatShellController::BringBrowserToForeground exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::BringBrowserToForegroundAfterPeriod +// Brings the Browser to foreground after time has passed. +// --------------------------------------------------------- +// +void CSatShellController::BringBrowserToForegroundAfterPeriod() + { + TFLOGSTRING( + "CSatShellController::BringBrowserToForegroundAfterPeriod called" ) + + if ( !iTimer->IsActive() ) + { + TFLOGSTRING( + "CSatShellController::BringBrowserToForegroundAfterPeriod \ + start iTimer" ) + iTimer->Start( KTimerTime, + KTimerTime, + TCallBack( TimerCompleted, this ) ); + } + + TFLOGSTRING( + "CSatShellController::BringBrowserToForegroundAfterPeriod exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::BringSatUiToForeground +// Brings the SAT UI application to foreground. +// --------------------------------------------------------- +// +void CSatShellController::BringSatUiToForeground() + { + TFLOGSTRING( "CSatShellController::BringSatUiToForeground called" ) + + CheckSatUiStatus(); + BringApplicationToForeground( KUidSatUi ); + + TFLOGSTRING( "CSatShellController::BringSatUiToForeground exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::BringApplicationToForeground +// Brings the SAT UI application to foreground. +// --------------------------------------------------------- +// +void CSatShellController::BringApplicationToForeground( + const TUid& aAppUid ) const + { + TFLOGSTRING( "CSatShellController::BringApplicationToForeground called" ) + + RWsSession wsSession; + // Open the WS server session. + if ( KErrNone == wsSession.Connect() ) + { + TFLOGSTRING( "CSatShellController::BringApplicationToForeground \ + open WS server session" ) + TApaTaskList tasklist( wsSession ); + // Find the task with uid + TApaTask task = tasklist.FindApp( aAppUid ); + task.BringToForeground(); + wsSession.Close(); + } + + TFLOGSTRING( "CSatShellController::BringApplicationToForeground exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::SetSatUiToBackground +// Sets SAT UI Application to background if needed. +// --------------------------------------------------------- +// +void CSatShellController::SetSatUiToBackground() const + { + TFLOGSTRING( "CSatShellController::SetSatUiToBackground called" ) + + if ( iSetSatUiToBackground ) + { + RWsSession wsSession; + // Open the WS server session. + if ( KErrNone == wsSession.Connect() ) + { + TFLOGSTRING( "CSatShellController::SetSatUiToBackground \ + open WS server session" ) + TApaTaskList tasklist( wsSession ); + // Find the task with uid + TApaTask task = tasklist.FindApp( KUidSatUi ); + task.SendToBackground(); + wsSession.Close(); + } + } + + TFLOGSTRING( "CSatShellController::SetSatUiToBackground exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::CycleSatUiBackwards +// Brings the SAT UI application to foreground. +// --------------------------------------------------------- +// +void CSatShellController::CycleSatUiBackwards() + { + TFLOGSTRING( "CSatShellController::BringSatUiToForeground called" ) + + RWsSession wsSession; + // Open the WS server session. + if ( KErrNone == wsSession.Connect() ) + { + TFLOGSTRING( "CSatShellController::CycleSatUiBackwards \ + open WS server session" ) + TApaTaskList taskList( wsSession ); + // Finds topmost application. + TApaTask task = taskList.FindByPos(0); + iTimer->Cancel(); + + CApaWindowGroupName* name = 0; + TRAPD( err, + name = CApaWindowGroupName::NewL( wsSession, task.WgId() ) ); + + if ( name ) + { + // Check is that Browser is foremost application. + if ( !err && ( name->AppUid() == KUidBrowser ) ) + { + TFLOGSTRING( + "CSatShellController::BSUTF Browser is in foreground" ) + } + else + { + TFLOGSTRING( + "CSatShellController::BSUTF Browser isn't in foreground" ) + TApaTask browserTask = taskList.FindApp( KUidBrowser ); + browserTask.BringToForeground(); + iTimer->Start( + KTimerTime, KTimerTime, TCallBack( TimerCompleted, this ) ); + } + + delete name; + } + + wsSession.Close(); + } + + TFLOGSTRING( "CSatShellController::BringSatUiToForeground exit" ) + } + +// --------------------------------------------------------- +// CSatShellController::TimerCompleted +// Callback function. Completes after predefined +// time has passed +// --------------------------------------------------------- +// +TInt CSatShellController::TimerCompleted( TAny* aObject ) + { + TFLOGSTRING( "CSatShellController::TimerCompleted called" ) + + if ( aObject ) + { + STATIC_CAST( CSatShellController*, aObject )->CycleSatUiBackwards(); + } + + TFLOGSTRING( "CSatShellController::TimerCompleted exit" ) + return KErrNone; + } + +// --------------------------------------------------------- +// CSatShellController::LaunchBrowserL +// Launch XHTML-browser +// Browser launched with parameter +// "4" + "" + "" + "" + "" or "5" +// More information see Browser API Specification Document +// --------------------------------------------------------- +// +TInt CSatShellController::LaunchBrowserL( const TDesC& aUrl, + TUid aAccessPointUid ) + { + TFLOGSTRING( "CSatShellController::LaunchBrowserL called" ) + + TInt errorCode( KErrNone ); + HBufC* param = HBufC::NewLC( aUrl.Length() + KMaxUidName + + KBrowserParamAndTwoSpaces ); + + TFLOGSTRING2( "CSatShellController::LaunchBrowserL length of aUrl: %d", \ + aUrl.Length() ) + if ( aUrl.Length() > 0 ) + { + param->Des().Copy( KFour ); + param->Des().Append( KSpace ); + param->Des().Append( aUrl ); + TFLOGSTRING2( "CSatShellController::LaunchBrowserL \ + aAccessPointUid: %d", aAccessPointUid ) + // Create script for Browser if not empty accesspoint UID. + if ( aAccessPointUid != KEmptyUid ) + { + TFLOGSTRING( "CSatShellController::LaunchBrowserL not empty \ + accesspoint" ) + // Uid is in decimal format + param->Des().Append( KSpace ); + param->Des().AppendNum( aAccessPointUid.iUid ); + } + + } + else + { + param->Des().Copy( KFive ); + } + + User::LeaveIfError( iWsSession.Connect() ); + + TFLOGSTRING2( "CSatShellController::LaunchBrowserL \ + param string: %S", param ) + TApaTaskList taskList( iWsSession ); + TApaTask task = taskList.FindApp( iUidWmlBrowser ); + + // If browser already open. + if ( task.Exists() ) + { + TFLOGSTRING( "CSatShellController::LaunchBrowserL browser open" ) + HBufC8* param8 = HBufC8::NewLC( param->Length() ); + param8->Des().Append( *param ); + errorCode = task.SendMessage( TUid::Uid( 0 ), param8->Des() ); + CleanupStack::PopAndDestroy( param8 ); + } + else + { + TFLOGSTRING( "CSatShellController::LaunchBrowserL launch browser" ) + // Launch the Browser. + TThreadId id( static_cast( 0 ) ); + RApaLsSession rapaLsSession; + User::LeaveIfError( rapaLsSession.Connect() ); + errorCode = rapaLsSession.StartDocument( *param, iUidWmlBrowser, id ); + rapaLsSession.Close(); + } + + BringBrowserToForeground(); + + iWsSession.Close(); + CleanupStack::PopAndDestroy( param ); + + TFLOGSTRING2( "CSatShellController::LaunchBrowserL exit %d", errorCode ) + return errorCode; + } + +// ----------------------------------------------------------------------------- +// CSatShellController::CheckSatUiStatus +// Check if SatUi is needed to set to background. +// ----------------------------------------------------------------------------- +// +void CSatShellController::CheckSatUiStatus() + { + TFLOGSTRING( "CSatShellController::CheckSatUiStatus called" ) + + // if SatUi task is found and SatUi is not in foreground flag is set ETrue + iSetSatUiToBackground = EFalse; + + RWsSession wsSession; + // Open the WS server session. + if ( KErrNone == wsSession.Connect() ) + { + TFLOGSTRING( "CSatShellController::CheckSatUiStatus \ + open WS server session" ) + TApaTaskList tasklist( wsSession ); + TApaTask satUiTask = tasklist.FindApp( KUidSatUi ); + + if ( satUiTask.Exists() ) + { + TFLOGSTRING( + "CSatShellController::CheckSatUiStatus task exists" ) + TApaTask topMostTask = tasklist.FindByPos( 0 ); + + if ( topMostTask.ThreadId() != satUiTask.ThreadId() ) + { + TFLOGSTRING( + "CSatShellController::CheckSatUiStatus set SatUI to BG" ) + iSetSatUiToBackground = ETrue; + } + } + + wsSession.Close(); + } + + TFLOGSTRING( "CSatShellController::CheckSatUiStatus exit" ) + } + +// ================= OTHER EXPORTED FUNCTIONS =============================== + +EXPORT_C MSatShellController* NewSatController() + { + TFLOGSTRING( "CSatShellController::NewSatController called" ) + + MSatShellController* satController = NULL; + TRAPD( err, satController = CSatShellController::NewL() ) + if ( KErrNone != err ) + { + TFLOGSTRING2( " CSatShellController::NewSatController \ + failed: %d", err ) + satController = NULL; + } + + TFLOGSTRING( "CSatShellController::NewSatController exit" ) + return satController; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiActionPerformer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiActionPerformer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,390 @@ +/* +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This class handles the communication between server and user +* interface +* +*/ + + +#ifndef CSATUIACTIONPERFORMER_H +#define CSATUIACTIONPERFORMER_H + +// INCLUDES +#include +#include +#include + +#include + +// CONSTANTS +//256 max length-header information fields +const TInt KAdditionalInfoMaxSize = 244; +const TInt KMaxPlayToneLength = 50; + +enum TIconCommand + { + EIconSetUpMenuContext = 1, + EIconSetUpMenuItems, + EIconDisplayText, + EIconGetInput, + EIconGetInkey, + EIconGetYesNo, + EIconPlayTone, + EIconNotification, + EIconConfirmCommand + }; + +// FORWARD DECLARATIONS +class MSatUiAdapter; +class MSatUiActionImplementer; +class CPhoneGsmHandlerContainer; +class CSatUiSsAdditionalInfoHandler; +class CSatUiSsRequestCompleteHandler; +class CCenRepNotifyHandler; +class CSatUiIconHandler; +class CRepository; + + +// CLASS DECLARATION + +/** +* This class implements the methods specified in the MSatUiObserver. +*/ + +class CSatUiActionPerformer : public CBase, + public MCenRepNotifyHandlerCallback, + public MSatUiObserver + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CSatUiActionPerformer* NewL(); + + /** + * Destructor. + */ + virtual ~CSatUiActionPerformer(); + + public: // New functions + + /** + * Sets the UI. + * @param aImplementer Pointer to be set. + */ + void SetImplementer(MSatUiActionImplementer* aImplementer); + + /** + * Returns the adapter provided by SatCli. + */ + MSatUiAdapter* Adapter(); + + public: // Functions from base classes + + /** + * From MSatUiObserver Notification of the SAT Display Text command. + * @param aText The text string to be displayed. + * @param aSimApplicationName Sim Application name + * @param aIconId The id of icon. + * @param aRequestedIconDisplayed Informs if icon is not used. + * @param aSustainedText Indicates is this text sustained ie. no timers + * used if ETrue. + * @param aDuration Duration for showing the text + * @param aWaitUserToClear Indication if user is needed to clear + * message + * @return The response to this command. + */ + TSatUiResponse DisplayTextL( const TDesC& aText, + const TDesC& aSimApplicationName, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed, + const TBool aSustainedText, + const TTimeIntervalSeconds aDuration, + const TBool aWaitUserToClear ); + + /** + * From MSatUiObserver Notification of the SAT Get Inkey command. + * @param aText The query text. + * @param aCharacterSet The character range allowed. + * @param aInput The input character. + * @param aHelpIsAvailable A flag indicating if SAT help is available + * @param aIconId The id of icon. + * @param aRequestedIconDisplayed Informs if icon is not used. + * @param aDuration Duration for showing the dialog. + * @param aImmediateDigitResponse Indication if Immediate digit response + * is needed. + * @return The response of to this command. + */ + TSatUiResponse GetInkeyL( const TDesC& aText, + const TSatCharacterSet aCharacterSet, TChar& aInput, + const TBool aHelpIsAvailable, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed, + TUint& aDuration, + const TBool aImmediateDigitResponse ); + + /** + * From MSatUiObserver Notification of the SAT Get Input command. + * @param aText The query text. + * @param aCharacterSet The character range allowed. + * @param aInput The input string. + * @param aMinLength The minimum length of the input allowed. + * @param aMaxLength The maximum length of the input allowed. + * @param aHideInput A flag indicating if the input should be hidden. + * @param aHelpIsAvailable A flag indicating if SAT help is available. + * @param aIconId The id of icon. + * @param aRequestedIconDisplayed Informs if icon is not used. + * @return The response to this command. + */ + TSatUiResponse GetInputL( const TDesC& aText, + const TSatCharacterSet aCharacterSet, TDes& aInput, + const TInt aMinLength, const TInt aMaxLength, + const TBool aHideInput, + const TBool aHelpIsAvailable, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed ); + + /** + * From MSatUiObserver Notification of the SAT Set Up Menu command. + * @param aText The title text. + * @param aMenuItems The array of menu item captions. + * @param aMenuItemNextActions The array of menu item next action + * indicator codes. + * @param aHelpIsAvailable A flag indicating if SAT help is available. + * @param aIconId The id of title icon. + * @param aMenuIcons List of icon identifiers for menu items. + * @param aIconListQualifier Indicates how to use icons in the icon list. + * @param aSelectionPreference Specifies is the soft keys preferred. + * @return The response to this command. + */ + TSatUiResponse SetUpMenuL( const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TBool aHelpIsAvailable, + const TSatIconId& aIconId, + const CArrayFixFlat* aMenuIcons, + const enum TSatIconQualifier aIconListQualifier, + const enum TSatSelectionPreference aSelectionPreference ); + + /** + * From MSatUiObserver Notification of the SAT Select Item command. + * @param aText The title text. + * @param aMenuItems The array of menu item captions. + * @param aMenuItemNextActions The array of menu item next action + * indicator codes. + * @param aDefaultItem The item selected by default. + * @param aSelection The item index selected by the user. + * @param aHelpIsAvailable A flag indicating if help is available. + * @param aIconId The id of title icon. + * @param aMenuIcons List of icon identifiers for menu items. + * @param aIconListQualifier Indicates how to use icons in the icon list. + * @param aRequestedIconDisplayed Informs if icon is not used. + * @param aSelectionPreference Specifies is the soft keys preferred. + * @return The response to this command. + */ + TSatUiResponse SelectItemL( const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TInt aDefaultItem, TUint8& aSelection, + const TBool aHelpIsAvailable, + const TSatIconId& aIconId, + const CArrayFixFlat* aMenuIcons, + const enum TSatIconQualifier aIconListQualifier, + TBool& aRequestedIconDisplayed, + const enum TSatSelectionPreference aSelectionPreference ); + + /** + * From MSatUiObserver Notification of the SAT Play Tone command. + * @param aText The text to be displayed. + * @param aTone The tone to be played. + * @param aDuration The duration of the tone to be played. + * @param aIconId The id of icon. + * @param aRequestedIconDisplayed Informs if icon is not used. + * @return The response to this command. + */ + TSatUiResponse PlayTone( const TDesC& aText, + const TSatTone aTone, + const TTimeIntervalMicroSeconds aDuration, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed ); + + /** + * From MSatUiObserver General confirmation request + * @param aCommandId ID of the quering command + * @param aAlphaIdStatus Alpha Identifier status + * @param aText The text to be displayed. + * @param aAdditionalText Additional text to be used in queries. + * @param aActionAccepted Indicates whether the command was accepted. + * @param aIconId The id of icon. + * @param aRequestedIconDisplayed Informs if icon is not used. + * @param aTerminatedByUser Informs if end key is used. + */ + void ConfirmCommand( + const TSatSQueryCommand aCommandId, + const TSatAlphaIdStatus aAlphaIdStatus, + const TDesC& aText, + const TDesC& aAdditionalText, + TBool& aActionAccepted, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed, + TBool& aTerminatedByUser ); + + /** + * From MSatUiObserver General notification + * @param aCommandId ID of the notifying command + * @param aAlphaIdStatus Alpha Identifier status + * @param aText Alpha Identifier + * @param aIconId The id of icon. + * @param aRequestedIconDisplayed Informs if icon is not used. + * @param aControlResult Control result of the MoSm and CallControl + * @return The response of the UI to this command. + */ + TSatUiResponse Notification( + const TSatSNotifyCommand aCommandId, + const TSatAlphaIdStatus aAlphaIdStatus, + const TDesC& aText, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed, + const TSatControlResult aControlResult ); + + /** + * From MSatUiObserverGeneral event notification. Used for example to + * tell UI that command has completed its execution. + * @param aEventId, identifies the event + * @param aEventStatus, status of the event, used as additional info for + * the event + * @param aError, possible error code that may affect on event handling. + * This is also used as additional info + */ + void EventNotification( + const TSatSEvent aEventId, + const TSatSEventStatus aEventStatus, + const TInt aError ); + + private: + + /** + * C++ default constructor. + */ + CSatUiActionPerformer(); + + /** + * Symbian OS constructor. + */ + void ConstructL(); + + /** + * Fetch icon information. + * @param aIconId Id for icons + * @param aIconCommand Command type for icon. + * @return Pointer to selected FbsBitmap icon + */ + CFbsBitmap* FetchIcon( const TUint8 aIconId, + const enum TIconCommand aIconCommand ); + + /** + * Gets default text's resource id + * @param aCommandId Identifies the command + * @param aControl Used only for MoSm and Call Control + * @return Resource id for the default text + */ + TInt DefaultAlphaIdL( + const TSatSNotifyCommand aCommandId, + const TSatControlResult aControlResult) const; + + /** + * Get size for the icon in popup window. + * @param aSize Reference to the size of icon place. + * @param aIconCommand Dialog information + * @return TBool Returns EFalse if popup window is not supported + * in current layout. + */ + TBool GetPopUpWindowIconSize( TSize& aSize, + const TIconCommand aIconCommand ); + + /** + * Creates scalable bitmap. + * @param aBitMapToConvert Reference icon to be scaled. + * @param aIconCommand Dialog information + */ + void GetScalableBitmapL( CFbsBitmap*& aBitMapToConvert, + const TIconCommand aIconCommand ); + + /** + * Handles scalable bitmap. + * @param aBitMapToConvert Reference icon to be scaled. + * @param aIconCommand Dialog information + * @param aRequestedIconDisplayed Informs if icon is not shown. + */ + void GetScalableBitmap( + CFbsBitmap*& aBitMapToConvert, + const TIconCommand aIconCommand, + TBool& aRequestedIconDisplayed ); + + /** + * Handles scalable bitmap. + * @param aBitMapToConvert Reference icon to be scaled. + * @param aIconCommand Dialog information + */ + void GetScalableBitmap( + CFbsBitmap*& aBitMapToConvert, + const TIconCommand aIconCommand ); + + public: // Data + + //wait scheduler + CActiveSchedulerWait iWait; + + private: // Data + + // play tone sequence + TBuf8 iSequence; + + + //Ref: Interface to the UI-part + MSatUiActionImplementer* iActionImplementer; + + // own: used with refresh started and finished + TBool iRefresh; + + // own: session to sat client + RSatUiSession iSat; + + //Ref: Adapter provided by SAT Client + MSatUiAdapter* iAdapter; + + //Own: Session + RSatSession iSatSession; + + //Own: Current Iconididentifier + TInt iIconIdIdentifier; + + //Own: SetupMenu and SelectItem items icon + CAknIconArray* iItemIcons; + + //Own: Icon fetching handler + CSatUiIconHandler* iIconHandler; + + // own: used to signal that icons are supported + TBool iIconSupport; + + //Own: used to indicate if ESatSClearScreenEvent occurs + TBool iClearScreenEvent; + + }; + +#endif // CSATUIACTIONPERFORMER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiApplication.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiApplication.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,53 @@ +/* +* Copyright (c) 2002 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: +* Defines CSatUiApplication class +* +* +*/ + + +#ifndef CSATUIAPPLICATION_H +#define CSATUIAPPLICATION_H + +#include + +// CONSTANTS +const TUid KUidSATUI = { 0x101f4ce0 }; // UID of app + +// CLASS DECLARATION + +/** +* SatUi Application class. +*/ +class CSatUiApplication : public CAknApplication + { + private: // Functions from base classes + + /** + * From CAknApplication Returns the UId of the application. + * @return The UId of the application. + */ + TUid AppDllUid() const; + + /** + * From CAknApplication Creates document object. + * @return The pointer to the created object. + */ + CApaDocument* CreateDocumentL(); + }; + +#endif // CSATUIAPPLICATION_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiDocument.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiDocument.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,74 @@ +/* +* Copyright (c) 2002 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: +* Defines CSatUiDocument class +* +* +*/ + + +#ifndef CSATUIDOCUMENT_H +#define CSATUIDOCUMENT_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CSatUiActionPerformer; +class CSatUiViewAppUi; + +// CLASS DECLARATION + +/** +* SatUi Document class. +*/ +class CSatUiDocument : public CAknDocument + { + public: // Constructors and destructor + + /** + * C++ default constructor. + */ + CSatUiDocument(CEikApplication& aApp): CAknDocument(aApp) {}; + + /** + * Symbian OS constructor. + */ + void ConstructL(); + + /** + * Destructor. + */ + virtual ~CSatUiDocument(); + + private: + + /** + * From CEikDocument Creates ViewAppUi object. + * @return The pointer to the created object. + */ + CEikAppUi* CreateAppUiL(); + + private://Data + + //Own: Command receiver + CSatUiActionPerformer *iActionPerformer; + + // application UI pointer + CSatUiViewAppUi* iApplicationUi; + }; + +#endif // CSATUIDOCUMENT_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiMessageQueryIcon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiMessageQueryIcon.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,82 @@ +/* +* Copyright (c) 2002-2006 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: +* CPicture derived class. For DisplayText to show icon and text +* +* +*/ + + +#ifndef CSATUIMESSAGEQUERYICON_H +#define CSATUIMESSAGEQUERYICON_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class TSize; +class CFbsBitmap; + +// CLASS DECLARATION + +class CSatUiMessageQueryIcon :public CPicture + { + + public: // Constructors and destructor + + /** + * C++ default constructor. + * @param aSize Size of the picture in twips. + * @param aBitmap Bitmap + */ + CSatUiMessageQueryIcon( TSize aSize, CFbsBitmap& aBitmap ); + + /** + * Destructor. + */ + virtual ~CSatUiMessageQueryIcon(); + + public: // From CPicture + + /** + * Draw the picture. + * @param aGc Graphic context. + * @param aTopLeft Co-ordinates of left corner. + * @param aClipRect Clipping rectangle. + * @param aMap Device map. + */ + virtual void Draw( CGraphicsContext& aGc, + const TPoint& aTopLeft, + const TRect& aClipRect, + MGraphicsDeviceMap* aMap ) const; + /** + * From CPicture. + * A derived class must implement this function. + */ + virtual void ExternalizeL( RWriteStream& aStream ) const; + + /** + * Get the picture's size in twips. + * @param aSize Size. + */ + virtual void GetOriginalSizeInTwips( TSize& aSize ) const; + + protected: // Data + + TSize iSizeInTwips; + CFbsBitmap* iBitmap; + }; + +#endif + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiTextQueryDialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiTextQueryDialog.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,92 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Implements the feature for investigating length of the input. Softkeys +* are set based on this information. +* +* +*/ + + +#ifndef CSATUITEXTQUERYDIALOG_H +#define CSATUITEXTQUERYDIALOG_H + +// INCLUDES +#include + +// CLASS DECLARATION + +/** +* Defines the SAT spesific data query class. +*/ +class CSatUiTextQueryDialog : public CAknTextQueryDialog + { + public: // Constructors and destructor + + /** + * C++ default constructor. + */ + CSatUiTextQueryDialog(TDes& aDataText, const TTone aTone, + TInt aMinLength, TInt aMaxLength); + + /** + * Destructor. + */ + virtual ~CSatUiTextQueryDialog(); + + public: // Functions from base classes + + /** + * From CAknQueryDialog + * @param aQueryControl + * @param aEventType + * @param aStatus + * @return + */ + TBool HandleQueryEditorStateEventL(CAknQueryControl* aQueryControl, + TQueryControlEvent aEventType, TQueryValidationStatus aStatus); + + protected: // Functions from base classes + + /** + * From CEikDialog, gets called when dialog initializations are done + */ + void PostLayoutDynInitL(); + + /** + * From CEikDialog, gets called before initializations + */ + void PreLayoutDynInitL(); + + /** + * From CAknDialog, Hash key is accepted + */ + TBool NeedToDismissQueryL( const TKeyEvent& aKeyEvent ); + + /** + * From CAknDialog, Hash key not ignored (workaround) + */ + TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode aType ); + + + private: // Data + + //Minimum length of input + TInt iTextMinLength; + }; + +#endif // CSATUITEXTQUERYDIALOG_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiView.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiView.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,289 @@ +/* +* Copyright (c) 2002-2007 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: +* Defines CSatUiView class +* +* +*/ + + +#ifndef CSATUIVIEW_H +#define CSATUIVIEW_H + +// INCLUDES +#include +#include // For CAknView class + +// CONSTANTS +static const TInt KTabLength = 4; // Items tab length + +// FORWARD DECLARATIONS +class AknStaticNoteDialog; +class MSatUiAdapter; +class CSatUiViewContainer; +class CSatUiViewAppUi; + +// CLASS DECLARATION + +/** +* SatUi view (SetUpMenu and SelectItem). +*/ +class CSatUiView : public CAknView, + public MEikListBoxObserver + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CSatUiView* NewL( TBool aSetUpMenu, + CSatUiViewAppUi* aAppUi, + TBool aEmpty ); + + /* + * Destructor. + */ + virtual ~CSatUiView(); + + public: // New functions + + /** + * Sets the title needed for showing the view. + * @param aTitle The Title pane text. + */ + void SetTitle( const HBufC* aTitle ); + + /** + * Sets all parameters needed for showing the view. + * @param aTitle The Title pane text. + * @param aMenuItems The Main pane list items. + * @param aMenuItemNextActions The Options items. + * @param aHelpIsAvailable The help flag. + * @return Operation result. + */ + TSatUiResponse SetItemsL( HBufC* aTitle, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TBool aHelpIsAvailable ); + + /** + * Activates SetUpMenu view. + * @param aTitle The Title pane text. + * @param aMenuItems The Main pane list items. + * @param aMenuItemNextActions The Options items. + * @param aHelpIsAvailable The help flag. + * @return Operation result. + */ + TSatUiResponse SetUpMenuL( HBufC* aTitle, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TBool aHelpIsAvailable ); + + /** + * Activates SelectItem view. + * @param aTitle The Title pane text. + * @param aMenuItems The Main pane list items. + * @param aMenuItemNextActions The Options items. + * @param aDefaultItem The item in focus. + * @param aSelection The selected item. + * @param aHelpIsAvailable The help flag. + * @return Operation result. + */ + TSatUiResponse SelectItemL( HBufC* aTitle, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TInt aDefaultItem, TUint8& aSelection, + const TBool aHelpIsAvailable ); + + /** + * Sets the pointer to adapter provided by SatCli. + * @param aAdapter A pointer to an abstract adapter interface. + */ + void SetAdapter( MSatUiAdapter* aAdapter ); + + /** + * Sets the icon bitmap pointer. + * @param aIconBitmap Context Pane icon. + */ + void SetIconL( const CFbsBitmap* aIconBitmap ); + + /** + * Sets the items icon array. + * @param aItemsIconArray Items iconarray. + * @param aSelfExplanatoryItems Indicate if only icons are shown + */ + void SetItemsIconL( const CAknIconArray* aItemsIconArray, + const TBool aSelfExplanatoryItems ); + + /** + * Hides and makes list box visible if needed. + * @param aVisible Visible or hidden + */ + void MakeListBoxVisible( TBool aVisible ); + + /** + * Updates CBA according to current next action + * @param aIndex current row on the list + * @param aNew is the view just created + */ + void UpdateMskL( TInt aIndex, TBool aNew ); + + public: // Functions from base classes + + /** + * From CAknView Returns the UId of the view. + * @return The UId of the view. + */ + TUid Id() const; + + /** + * From CAknView Handles view commands. + * @param aCommand The command identifier. + */ + void HandleCommandL(TInt aCommand); + + /** + * From CAknView Handles the options menu. + * @param aResourceId Resource id of the menu pane. + * @param aMenuPane The menu pane. + */ + void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); + + protected: // New functions + + /** + * Updates the view container. + */ + void RefreshL(); + + /** + * Draws the title and list items of the view. + */ + void DrawL(); + + protected: // Functions from base classes + + /** + * From MEikListBoxObserver Handles list box events. + * @param aEventType The event identifier. + */ + void HandleListBoxEventL( CEikListBox* /*aListBox*/, + TListBoxEvent aEventType ); + + /** + * From CAknView Activates the view. + */ + void DoActivateL( const TVwsViewId& /*PrevViewId*/, + TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/); + + /** + * From CAknView Deactivates the view. + */ + void DoDeactivate(); + + private: + + /** + * called when user has been + * inactive for a pre-defined period + */ + static TInt DispatchUserInactive( TAny* aPtr ); + + /** + * C++ default constructor. + */ + CSatUiView( TBool aSetUpMenu, CSatUiViewAppUi* aAppUi, TBool aEmpty ); + + /** + * Symbian OS constructor. + */ + void ConstructL(); + + public: //Data + + //CUserActivityManager user response wait scheduler + CActiveSchedulerWait iWait; + + private: //Data + + // Own: indicates that a note was cleared after a delay + TBool iNoResponseFromUserAfterDelay; + + //Ref: adapter provided by SatCli + MSatUiAdapter* iAdapter; + + //To block the keypad abter the user action and unblock when + //the new SatServer command comes + TBool iKeypadBlocked; + + //Type of the view (SetUpMenu or SelectItem) + TBool iSetUpMenu; + + //Ref: UI object + CSatUiViewAppUi* iSatUiAppUi; + + //Own: items of the main pain list + CDesCArrayFlat* iMenuItems; + //Own: codes of options menu items + CArrayFixFlat* iMenuItemNextActions; + + //Number of items in the maind pane + TInt iNItems; + + //Ref: view title text + const HBufC* iTitle; + + TBool iHelpIsAvailable; + + //Own: view container + CSatUiViewContainer* iContainer; + + //Ref: list box model + CTextListBoxModel* iModel; + + //The response to SatServer + TSatUiResponse iResponse; + + //default item in the Select Item list + TInt iDefaultItem; + + //selected item in the list + TInt iSelection; + + //client rectangle + TRect iRect; + + //Items icon array + CAknIconArray* iItemsIconArray; + + //Icons exists on view + TBool iIconsOn; + + //Icons state changed + TBool iIconStateChange; + + //If only icons are shown + TBool iSelfExplanatoryItems; + + //Value for displaying list box. + TBool iListBoxVisible; + + //Indication that view is first created empty view + TBool iEmpty; + + }; + +#endif // CSATUIVIEW_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiViewAppUi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiViewAppUi.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,772 @@ +/* +* Copyright (c) 2002-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: Defines CSatUiViewAppUi class +* +*/ + + +#ifndef CSATUIVIEWAPPUI_H +#define CSATUIVIEWAPPUI_H + +// INCLUDES +#include +#include +#include +#include "MSatUiActionImplementer.h" +#include "CSatUiActionPerformer.h" + +// CONSTANTS +const TUid KSetUpMenuViewId={1}; +const TUid KSelectItemViewId={2}; + +// FORWARD DECLARATIONS +class CSatUiView; +class MSatUiAdapter; +class CAknMessageQueryDialog; +class CAknWaitDialog; +class CSatUiTextQueryDialog; +class CAknQueryDialog; +class CSatUiInactivityMonitor; +class CAknIconArray; +class CAknPopupForm; +class CAknGlobalNote; +class CSatUiWaitDialog; + +// CLASS DECLARATION + +/** +* Implements the UI and methods from the MSatUiActionImplementer. +*/ +class CSatUiViewAppUi : public CAknViewAppUi, + public MSatUiActionImplementer, + public MMdaAudioToneObserver, + public MMdaAudioPlayerCallback + { + public: // Constructors and destructor + + /** + * C++ default constructor. + */ + CSatUiViewAppUi(); + + /** + * Destructor. + */ + ~CSatUiViewAppUi(); + + public: // New functions + + /** + * Sets the pointer to adapter provided by SatCli. + * @param aAdapter SAT Client part object. + */ + void SetAdapter( MSatUiAdapter* aAdapter ); + + public: // Functions from base classes + + /** + * From CAknViewAppUi Called when view is brought to + * foreground or put into background + * @param aForeground A flag to indicate is SAT background or foreground + */ + void HandleForegroundEventL( TBool aForeground ); + + /** + * From MMdaAudioToneObserver Called by the player object when + * it has been initialised. + * @param aError Error type. + */ + void MatoPrepareComplete( TInt aError ); + + /** + * From MMdaAudioToneObserver Called by the player object when + * the playback has been terminated. + * @param aError Error type. + */ + void MatoPlayComplete( TInt aError ); + + /** + * From MSatUiActionImplementer Shows the wait note. + */ + void ShowWaitNoteL(); + + /** + * From MSatUiActionImplementer Shows the wait note without delay. + */ + void ShowWaitNoteWithoutDelayL(); + + /** + * From MSatUiActionImplementer Removes the wait note from the screen. + */ + void StopShowWaitNote(); + + /** + * Checks that is BT SAP connection active. + * @return BT SAP activation status. + */ + TBool BTSAPActivatedL(); + + /** + * From MSatUiActionImplementer + * @return CoeEnv. + */ + CCoeEnv* CoeEnv(); + + /** + * From MSatUiActionImplementer Displays given text on the screen. + * @param aText Text to be shown. + * @param aSimApplicationName Sim Application name + * @param aIconBitmapDisplayText Icon for dialog + * @param aSelfExplanatoryIcon If selfexplanatory icon + * @param aSustainedText Indicates is this text sustained ie. no timers + * used if ETrue. + * @param aDuration Duration for showing the text + * @param aWaitUserToClear Indication if user is needed to clear + * message + * @return Operation result. + */ + TSatUiResponse DisplayTextL( const TDesC& aText, + const TDesC& aSimApplicationName, + CFbsBitmap* aIconBitmapDisplayText, + const TBool aSelfExplanatoryIcon, + const TBool aSustainedText, + const TTimeIntervalSeconds aDuration, + const TBool aWaitUserToClear ); + + /** + * From MSatUiActionImplementer Removes Display Text Dialog from + * the screen. + */ + void ClearScreen(); + + /** + * From MSatUiActionImplementer Asks a Yes/No answer from the user. + * @param aText A question to be shown. + * @param aCharacterSet The character range allowed. + * @param aInkey Character user feeds. + * @param aIconBitmap Icon for query dialog. + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @param aDuration Duration for showing the dialog. + * @param aImmediateDigitResponse Indication if Immediate digit response + * is needed. + * @return Operation result. + */ + TSatUiResponse GetYesNoL( const TDesC& aText, + const TSatCharacterSet aCharacterSet, + TChar& aInkey, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory, + TUint& aDuration, + const TBool aImmediateDigitResponse ); + + /** + * From MSatUiActionImplementer Asks input from the user. + * @param aText A question to be shown. + * @param aCharacterSet The character range allowed. + * @param aInput The input string. + * @param aMinLength The minimum length of the input allowed. + * @param aMaxLength The maximum length of the input allowed. + * @param aHideInput A flag indicating if the input should be hidden. + * @param aGetInkey A flag indicating GetInkey command. + * @param aIconBitmapGetInput Icon for query dialog. + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @param aDuration Duration for showing the dialog. + * @return Operation result. + */ + TSatUiResponse GetInputL( const TDesC& aText, + const TSatCharacterSet aCharacterSet, + TDes& aInput, + const TInt aMinLength, + const TInt aMaxLength, + const TBool aHideInput, + const TBool aGetInkey, + const CFbsBitmap* aIconBitmapGetInput, + const TBool aSelfExplanatory, + TUint& aDuration ); + + /** + * From MSatUiActionImplementer Prepares the SetUpMenu view and + * calls the method of the view class. + * @param aText The title text. + * @param aMenuItems The array of menu items. + * @param aMenuItemNextActions The array of next action indicators. + * @param aIconBitmap The Context Pane icon. + * @param aItemsIconArray Array of item icons + * @param aSelfExplanatoryItems A flag indicating if only icons are shown. + * @param aHelpIsAvailable A flag indicating if SAT help is available. + * @return Operation result. + */ + TSatUiResponse SetUpMenuL( const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const CFbsBitmap* aIconBitmap, + const CAknIconArray* aItemsIconArray, + const TBool aSelfExplanatoryItems, + const TBool aHelpIsAvailable ); + + /** + * From MSatUiActionImplementer Prepares the SelectItem view and + * calls the method of the view class. + * @param aText The title text. + * @param aMenuItems The array of menu items. + * @param aMenuItemNextActions The array of next action indicators. + * @param aDefaultItem The item in focus. + * @param aSelection The item index selected by the user. + * @param aIconBitmap The Context Pane icon. + * @param aItemsIconArray Array of item icons + * @param aSelfExplanatoryItems A flag indicating if only icons are shown. + * @param aHelpIsAvailable A flag indicating if SAT help is available. + * @return Operation result. + */ + TSatUiResponse SelectItemL( const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TInt aDefaultItem, + TUint8& aSelection, + const CFbsBitmap* aIconBitmap, + const CAknIconArray* aItemsIconArray, + const TBool aSelfExplanatoryItems, + const TBool aHelpIsAvailable ); + + /** + * From MSatUiActionImplementer Plays Standard Tone. + * @param aText The text to be displayed. + * @param aSequence The name of the file to be played. + * @param aDuration The duration of the tone to be played. + * @param aIconBitmap The tone playing note icon + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @return Operation result. + */ + TSatUiResponse PlayStandardToneL( const TDesC& aText, + const TDesC8& aSequence, + TTimeIntervalMicroSeconds aDuration, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ); + + /** + * From MSatUiActionImplementer Shows a query to get confirmation + * for Send SMS, Send SS or Send USSD command. + * @param aText The text to be displayed. + * @param aActionAccepted Indicates whether the command was accepted. + * @param aType Type of the command (SMS, SS or USSD). + * @return Operation result. + */ + TSatUiResponse ConfirmSendL( const TDesC& aText, + TBool& aActionAccepted, TInt aType ); + + /** + * From MSatUiActionImplementer Shows a wait note indicating + * Send SMS command. + * @param aText The text to be displayed. + * @param aIconBitmapSendSM Sending dialog icon. + * @param aSelfExplanatoryIcon A flag indicating if only icon is shown. + */ + void ShowSmsWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmapSendSM, + const TBool aSelfExplanatoryIcon ); + + /** + * From MSatUiActionImplementer Shows a wait note indicating + * Send SS command. + * @param aText The text to be displayed. + * @param aIconBitmap Sending dialog icon. + * @param aSelfExplanatoryIcon A flag indicating if only icon is shown. + */ + void ShowSsWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatoryIcon ); + + /** + * From MSatUiActionImplementer Shows the query to confirm the + * Refresh command. + * @param aActionAccepted Indicates whether the command was accepted. + * @return Operation result. + */ + TSatUiResponse ConfirmRefreshL( TBool& aActionAccepted ); + + /** + * Notification of the SAT Call Control command. + * @param aText The text string to be displayed. + * @param aAlphaIdStatus Alpha Identifier status + * @param aControlResult Call control general result + * @return The response from the UI + */ + TSatUiResponse CallControlL( const TDesC& aText, + const TSatAlphaIdStatus aAlphaIdStatus ); + + /** + * Notification of the SAT Launch browser confirmation request + * @param aText The text to be displayed. + * @param aActionAccepted Indicates whether the command was accepted. + * @param aIconBitmap The confirm note icon + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + */ + void ConfirmLaunchBrowserL( + const TDesC& aText, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ); + + /** + * Status of help support + * @param aStatus status of help + */ + void HelpStatus( TBool aStatus ); + + /** + * Notification of the SAT Mo Sm Control command. + * @param aText The text string to be displayed. + * @param aAlphaIdStatus Alpha Identifier status + * @param aControlResult Mo Sm control general result + * @return The response from the UI + */ + TSatUiResponse MoSmControlL( const TDesC& aText, + const TSatAlphaIdStatus aAlphaIdStatus ); + + /** + * From MSatUiActionImplementer Shows the wait note while DTMF are being + * sent. + * @param aText The text to be displayed. + * @param aIconBitmap The confirm note icon + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @return Information on the operation result. + */ + TSatUiResponse ShowDtmfWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatoryIcon ); + + /** + * Dispatch iWait to action implementer. + * @param aWait Timer. + */ + void DispatchTimer( CActiveSchedulerWait& aWait ); + + /** + * Get a flag which is indicating if end key is pressed. + * @return A Boolean flag which is indicating if end key is pressed. + */ + TBool GetEndKey(); + + /** + * Set a flag which is indicating if end key is pressed. + * @param aValue Status of end key + */ + void SetEndKey( TBool aValue ); + + /** + * Set a flag which is indicating if proactive command is pending. + * @param aValue Status of proactive command + */ + void SetCommandPending( TBool aValue ); + + /** + * Plays user selected tone. + * @param aText The text to be displayed. + * @param aDuration The duration of the tone to be played. + * @param aTone Tone type. + * @param aIconBitmap The tone playing note icon + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @return Operation result. + */ + TSatUiResponse PlayUserSelectedToneL( + const TDesC& aText, + TTimeIntervalMicroSeconds aDuration, + TSatTone aTone, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ); + + /** + * Confirm user permission for Open Channel. + * @param aText The text to be displayed. + * @param aActionAccepted Indicates whether the command was accepted. + * @param aIconBitmapOpenChannel Icon for query dialog + * @param aSelfExplanatory A flag indicating if icon is self-explanatory + * @return Operation result + */ + TSatUiResponse ConfirmOpenChannelL( + const TDesC& aText, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmapOpenChannel, + const TBool aSelfExplanatory ); + + /** + * From MSatUiActionImplementer Shows the wait note while BIP packets + * are sent. + * @param aCommand Command type. + * @param aText The text to be displayed. + * @param aIconBitmap Icon for query dialog + * @param aSelfExplanatory A flag indicating if icon is self-explanatory + */ + void ShowBIPNoteL( + TInt aCommand, + const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ); + + /** + * From MSatUiActionImplementer Confirm user permission for SetUpCall + * @param aText The text to be displayed. + * @param aSimAppName Header for th equery + * @param aActionAccepted Indicates whether the command was accepted. + * @param aIconBitmap Icon for query dialog + * @param aSelfExplanatory A flag indicating if icon is self-explanatory + */ + void ConfirmSetUpCallL( + const TDesC& aText, + const TDesC& aSimAppName, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ); + + /** + * From MSatUiActionImplementer Show note indicating SAT is not + * available. + */ + void ShowNotAvailableNoteL(); + + + /** + * From MSatUiActionImplementer Show the Ss error note. + */ + void ShowSsErrorNoteL(); + + /** + * Start SatUi closing process + */ + void CloseSatUI(); + + /** + * Get settings from current profile like volume, warning tones on/off etc. + * @param aTone, optional specifies the type of needed tone if necessary + * @param aToneName, optional buffer to get a soundfile name from + * the active profile if necessary + */ + void GetProfileParamsL( TSatTone aTone = ESatToneNotSet, TDes* aToneName = NULL ); + + + /** + * Return current profile state. + * @return current profile state. + */ + TInt ProfileState(); + + public: // Functions from base classes + + /** + * From CAknViewAppUi Handles UI commands. + * @param aCommand Command to be handled. + */ + void HandleCommandL( TInt aCommand ); + + protected: + + /** + * From CEikAppUi. Takes care of commandline parameter. + * @param aCommand Indicate the way an application is to be launched. + * @param aDocumentName A document file name. + * @param aTail Command line parameter. + */ + TBool ProcessCommandParametersL( + TApaCommand aCommand, + TFileName& aDocumentName, + const TDesC8& aTail ); + + private: + + /** + * Symbian OS default constructor. + */ + void ConstructL(); + + private: // functions + + /** + * Creates empty menu. This is needed in SIM originated commands. + */ + void CreateEmptyMenuL(); + + /** + * called when user has been + * inactive for a pre-defined period + * @param aPtr PPointer to creato + * @return Error value + */ + static TInt DispatchUserInactive( TAny* aPtr ); + + /** + * Delay callback function. Called when predefined time + * has passed + * @param Pointer to creator + * @return whetwer to call function again after an interval + */ + static TInt DelayCallback( TAny* aPtr ); + + /** + * Delay callback function. Called when predefined time + * has passed + * @param Pointer to creator + * @return whetwer to call function again after an interval + */ + static TInt CloseCallControlNoteL( TAny* aPtr ); + + /** + * Creates a callback timer + * @param aDelay delay after callback function is called + * @param aCallBack Callback function + */ + void CreateCallBackTimerL( const TInt aDelay, + TInt (*aFunction)(TAny* aPtr) ); + + /** + * Destroys the callback timer + */ + void DestroyCallBackTimer( ); + + /** + * Make a mask for get input icon bitmap + * @param aMask Mask for Get inpupt icon bitmap + * @param aSize Size for mask + */ + void MakeGetInputBitmapMask( CFbsBitmap* aMask, TSize aSize ) const; + + /** + * Handles a exit softkey. + */ + void HandleExitCommandL(); + + /** + * From CAknViewAppUi Handles window server events.. + * @param aEvent The window server event that occurred. + * @param aDestination The control associated with the event. + */ + void HandleWsEventL( const TWsEvent& aEvent, + CCoeControl* aDestination ); + + /** + * Close all existing dialogs. + */ + void CloseDialogs(); + + /** + * Initialisation of an audio sample has completed. + * @param aError The status of the audio sample after initialisation. + * @param aDuration The duration of the audio sample. + */ + void MapcInitComplete( + TInt aError, + const TTimeIntervalMicroSeconds& /*aDuration*/ ); + + /** + * Play of an audio sample has completed. + * @param aError The status of playback. + */ + void MapcPlayComplete( TInt aError ); + + /** + * Remove null characters from text. + * @param aText Text to be cleaned from NULLs + */ + void RemoveNullCharacters( HBufC* aText ); + + /** + * Make and run note dialog with an icon + * @param aResourceId Resource id of the dialog to be created + * @param aText Text to the dialog + * @param aIconBitmap Pointer to the icon bitmap + * @param aSelfExplanatory Whether text is showed or not + * @param aIconCommand Layout of dialog for scaling + * @param aMskCommand middle softkey command + * @return The user response to the note + */ + TInt RunQueryDialogL( + TInt aResourceId, + const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory, + TInt aMskCommand ); + + /** + * Check if it is allowed to change view or SAT UI is in + * view activation loop. + * @param aForeground ETrue if the application is in the foreground. + * @param aActiveView TUid of active view. + * @return ETrue if view activation is allowed. + */ + TBool ViewActivationAllowed( const TBool aForeground, + const TUid aActiveView ); + + /** + * Handle received key event in immediate digit response case. + * @param aScanCode Received key event code. + */ + void HandleImmediateDigitResponse( TInt aScanCode ); + + /** + * Handle closing display text in high priority events + * @param aEvent The window server event that occurred. + */ + void PriorityVerifyAndClose( const TWsEvent& aEvent ); + + /** + * Stop playing PLAY TONE command. + */ + void StopPlayToneL(); + + /** + * Check if foreground control is alive when HandleForegroundEventL is + * called. + * @return ETrue if the foreground control is alive. + */ + TBool CSatUiViewAppUi::ForegroundAlive() const; + + private: //Data + + // Own: use timer repeat + TBool iTimerRepeatOn; + + // Own: repeat count for timer + TInt iTimerRepeatCount; + + TBool iHelp; + + // Session Terminated + TBool iSelectItemPending; + + // select item command pending + TBool iSessionTerminated; + + // delay timer + CPeriodic* iTimer; + + // Own: indicates that note was cleared after a delay + TBool iNoteClearedAfterDelay; + + // Own: indicates that a note was cleared after a delay + TBool iNoResponseFromUserAfterDelay; + + //Ref: SatClient abstract adapter interface + MSatUiAdapter* iAdapter; + + //Own: SetUpMenu view + CSatUiView* iSetUpMenuView; + + //Own: SelectItem view + CSatUiView* iSelectItemView; + + //The command comes first time, so the view should be created + TBool iSetUpMenuFirst; + TBool iSelectItemFirst; + + // Own: SIM application name + HBufC* iAppName; + // Own: view title + HBufC* iTitle; + + //Own: Display Text dialog and text+icon + CAknMessageQueryDialog* iDisplayTextDialog; + CAknPopupForm* iDisplayTextIconDialog; + + //Own: get input dialog + CSatUiTextQueryDialog* iGetInputDialog; + + //Own: Wait note + CAknWaitDialog* iWaitNote; + + //Own: BIP Wait note + CSatUiWaitDialog* iBipWaitNote; + + //Own: Refresh note + CAknWaitDialog* iRefreshNote; + + //Own: Media server interface to play rtf file + CMdaAudioToneUtility *iPlayer; + + //Failure while playing tone + TSatUiResponse iPlayToneError; + + //wait scheduler + CActiveSchedulerWait* iWait; + + // Flag for indicating end key status + TBool iEndKeyPressed; + + // Status of view, select item or setup menu + TUid iActiveView; + + // Flag for indicating if command is pending + TBool iCommandPending; + + // Own: query dialog + CAknQueryDialog* iQueryDialog; + + // Own: Inform dialog + CAknNoteDialog* iNoteDialog; + + // Own: note dialog + CAknStaticNoteDialog* iPermanentNote; + + // Player for user selected tones. + CMdaAudioPlayerUtility* iAudioPlayer; + + // Volume for user selected tones. + TInt iVolume; + + // Note for call control. + CAknGlobalNote* iCcNote; + + // The note's ID in call control. + TInt iCcNoteId; + + // Flag for indicating SatUI foreground status + TBool iForeground; + + // Flag indicating previous SatUI foreground status + TBool iPreviousForeground; + + // Counter for possible view activation loop + TInt iViewLoopCounter; + + // Duration of tone + TTimeIntervalMicroSeconds iDuration; + + // Used key value for immediate digit response + TChar iKey; + + // Indicate if immediate digit response is requested + TBool iImmediateDigitResponse; + + // Indication for End key case that wait note existed + TBool iWaitNoteInUse; + + // Request ID for increased buffer size. + TInt iReqWSBufferID; + + // Indication that warning and game tones are in use + TBool iWarningAndPlayTones; + + // Not Own + // Use to keep track of the dialog which is on the screen + CCoeControl* iForegroundControl; + + // Indication that high priority event occured, used in DisplayText + TBool iHighPriorityEvent; + + // Indication that immediate response TLV, used in DisplayText + TBool iImmediateRsp; + + }; + +#endif // CSATUIVIEWAPPUI_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiViewContainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiViewContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,138 @@ +/* +* Copyright (c) 2002-2004 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: +* Defines CSatUiViewContainer class +* +* +*/ + + +#ifndef CSATUIVIEWCONTAINER_H +#define CSATUIVIEWCONTAINER_H + +// FORWARD DECLARATIONS +class CCoeControl; +class CAknView; +class MSatUiAdapter; +class CEikTextListBox; +class MEikListBoxObserver; +class CSatUiView; + +class CSatUiTest; + +// CLASS DECLARATION + +/** +* Container for SatUi View. +*/ +class CSatUiViewContainer : public CCoeControl + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aIconOn If item icons available + * @param aView Pointer to view + */ + static CSatUiViewContainer* NewL( TBool aIconOn, + CSatUiView* aView ); + + /** + * Destructor. + */ + virtual ~CSatUiViewContainer(); + + public: // New functions + + /** + * Returns a pointer to the listbox object. + * @return The listbox object pointer. + */ + CAknColumnListBox* ListBox(); + + public: // Functions from base classes + + /** + * From CCoeControl Counts controls. + * @return A number of controls. + */ + TInt CountComponentControls() const; + + /** + * From CCoeControl Provides a pointer to a control. + * @param aIndex Index of the control. + * @return A pointer to a control. + */ + CCoeControl* ComponentControl(TInt aIndex) const; + + /** + * From CCoeControl Sets the size of the main pane. + */ + void SizeChanged(); + + /** + * From CCoeControl Handles list box key events. + * @param aKeyEvent The key event. + * @param aType The type of key event. + * @return Was a key consumed or not. + */ + TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, + TEventCode aType); + + /** + * From CCoeControl Returns SatUi help context. + * @param aContext Help context. + */ + void GetHelpContext(TCoeHelpContext& aContext) const; + + /** + * From CCoeControl Handles a change to the control's resources. + * @param aType The messages type id + */ + void HandleResourceChange( TInt aType ); + + /** + * From CCoeControl Indicate the requirements for control redrawing. + * @param aDrawNow Control redraw flags. + */ + void FocusChanged( TDrawNow aDrawNow ); + + private: + + /** + * C++ default constructor. + */ + CSatUiViewContainer( CSatUiView* aView ); + + /** + * Symbian OS constructor. + */ + void ConstructL( TBool aIconOn ); + + private: //Data + + //Own: listbox for SetUpMenu and SelectItem view + CAknColumnListBox* iListBox; + + //If item icons available + TBool iIconOn; + + //Pointer to view + CSatUiView* iView; + + }; + +#endif // CSATUIVIEWCONTAINER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/CSatUiWaitDialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/CSatUiWaitDialog.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,72 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Implements the feature for investigating length of the input. Softkeys +* are set based on this information. +* +* +*/ + + +#ifndef CSATUIWAITDIALOG_H +#define CSATUIWAITDIALOG_H + +// INCLUDES +#include + +// FORWARD DECLARATION +class MSatUiAdapter; + +// CLASS DECLARATION + +/** + * Defines the SAT spesific data query class. + */ +class CSatUiWaitDialog : public CAknWaitDialog + { + public: // Constructors and destructor + + /** + * C++ default constructor. + */ + CSatUiWaitDialog( + CEikDialog** aSelfPtr, + MSatUiAdapter& aAdapter, + TBool aVisibilityDelayOff ); + + /** + * Destructor. + */ + virtual ~CSatUiWaitDialog(); + + public: // Override functions from base classes + + /** + * From @c CEikDialog. + * Handles a dialog button press for the specified button. + * @param aButtonId The ID of the button that was activated + * @return ETrue to validate and exit the dialog + */ + TBool CSatUiWaitDialog::OkToExitL( TInt aButtonId ); + + private: // Data + + // Reference to adapter. Used to inform SAT Client if user + // presses Cancel during dialog is showing + MSatUiAdapter& iAdapter; + }; + +#endif // CSATUIWAITDIALOG_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/MSatUiActionImplementer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/MSatUiActionImplementer.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,373 @@ +/* +* Copyright (c) 2002-2006 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: An interface class to the UI side. Through this interface it +* is possible to perform actual operations +* +*/ + + +#ifndef MSATUIACTIONIMPLEMENTER_H +#define MSATUIACTIONIMPLEMENTER_H + +// INCLUDES +#include + +// CLASS DECLARATION +class CAknIconArray; + +/** +* This class defines the interface between engine and UI. +*/ +class MSatUiActionImplementer + { + public: + + /** + * Returns CoeEnv. + */ + virtual CCoeEnv* CoeEnv() = 0; + + /** + * Shows the wait note. + */ + virtual void ShowWaitNoteL() = 0; + + /** + * Shows the wait note without delay + */ + virtual void ShowWaitNoteWithoutDelayL() = 0; + + /** + * Removes the wait note from the screen. + */ + virtual void StopShowWaitNote() = 0; + + /** + * Handles the DisplayText operation. + * @param aText Text to be shown. + * @param aSimApplicationName Sim Application name + * @param aIconBitmapDisplayText Icon for dialog + * @param aSustainedText Indicates is this text sustained ie. no timers + * used if ETrue. + * @param aDuration Duration for showing the text + * @param aWaitUserToClear Indication if user is needed to clear + * message + * @return Information of the operation result. + */ + virtual TSatUiResponse DisplayTextL( const TDesC& aText, + const TDesC& aSimApplicationName, + CFbsBitmap* aIconBitmapDisplayText, + const TBool aSelfExplanatoryIcon, + const TBool aSustainedText, + const TTimeIntervalSeconds aDuration, + const TBool aWaitUserToClear ) = 0; + + /** + * Removes Display Text Dialog from the screen. + */ + virtual void ClearScreen() = 0; + + /** + * Asks a Yes/No answer from the user. + * @param aText A question to be shown. + * @param aCharacterSet The character range allowed. + * @param aInkey Character user feeds. + * @param aIconBitmap Icon for query dialog. + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @param aDuration Duration for showing the dialog. + * @param aImmediateDigitResponse Indication if Immediate digit response + * is needed. + * @return Information of the operation result. + */ + virtual TSatUiResponse GetYesNoL( const TDesC& aText, + const TSatCharacterSet aCharacterSet, + TChar& aInkey, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory, + TUint& aDuration, + const TBool aImmediateDigitResponse ) = 0; + + /** + * Asks input from the user. + * @param aText A question to be shown. + * @param aCharacterSet The character range allowed. + * @param aInput The input string. + * @param aMinLength The minimum length of the input allowed. + * @param aMaxLength The maximum length of the input allowed. + * @param aHideInput A flag indicating if the input should be hidden. + * @param aGetInkey A flag indicating if GetInkey command is used. + * @param aIconBitmapGetInput Icon for query dialog. + * @param aSelfExplanatory A flag indicating if icon is self-explanatory. + * @param aDuration Duration for showing the dialog. + * @return Information of the operation result. + */ + virtual TSatUiResponse GetInputL( const TDesC& aText, + const TSatCharacterSet aCharacterSet, TDes& aInput, + const TInt aMinLength, const TInt aMaxLength, + const TBool aHideInput, const TBool aGetInkey, + const CFbsBitmap* aIconBitmapGetInput, + const TBool aSelfExplanatory, + TUint& aDuration ) = 0; + + /** + * Handles the SetUpMenu view. + * @param aText The title text. + * @param aMenuItems The array of menu item captions. + * @param aMenuItemNextActions The array of menu item next action + * indicator captions. + * @param aIconBitmap The Context pane icon. + * @param aItemsIconArray Array of item icons + * @param aSelfExplanatoryItems Flag indicating if only icons are shown. + * @param aHelpIsAvailable A flag indicating if SAT help is available. + * @return Information of the operation result. + */ + virtual TSatUiResponse SetUpMenuL( const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const CFbsBitmap* aIconBitmap, + const CAknIconArray* aItemIconsArray, + const TBool aSelfExplanatoryItems, + const TBool aHelpIsAvailable ) = 0; + + /** + * Handles the SelectItem view. + * @param aText The title text. + * @param aMenuItems The array of menu items. + * @param aMenuItemNextActions The array of next action indicators. + * @param aDefaultItem The item in focus. + * @param aSelection The item index selected by the user. + * @param aIconBitmap The Context Pane icon. + * @param aItemsIconArray Array of item icons + * @param aSelfExplanatoryItems Flag indicating if only icons are shown. + * @param aHelpIsAvailable A flag indicating if SAT help is available. + * @return Information of the operation result. + */ + virtual TSatUiResponse SelectItemL( const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TInt aDefaultItem, + TUint8& aSelection, + const CFbsBitmap* aIconBitmap, + const CAknIconArray* aItemsIconArray, + const TBool aSelfExplanatoryItems, + const TBool aHelpIsAvailable ) = 0; + + /** + * Handles Standard Tone playing. + * @param aText The text to be displayed. + * @param aFileName The name of the file corresponding to the tone. + * @param aDuration The duration of the tone to be played. + * @param aIconBitmap The tone playing note icon + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @return Information of the operation result. + */ + virtual TSatUiResponse PlayStandardToneL( const TDesC& aText, + const TDesC8& aSequence, + TTimeIntervalMicroSeconds aDuration, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) = 0; + + /** + * Shows the confirmation note about the SAT Send SMS, Send SS or + * Send USSD command. + * @param aText The text to be displayed. + * @param aActionAccepted Indicates whether the command was accepted. + * @param aType Type of the request (SMS, SS, USSD). + * @return Information of the operation result. + */ + virtual TSatUiResponse ConfirmSendL( const TDesC& aText, + TBool& aActionAccepted, TInt aType ) = 0; + + /** + * Shows the wait note about the Send SMS command. + * @param aText The text to be displayed. + * @param aIconBitmapSendSM Sending dialog icon. + * @param aSelfExplanatoryIcon A flag indicating if only icon is shown. + */ + virtual void ShowSmsWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmapSendSM, + const TBool aSelfExplanatoryIcon ) = 0; + + /** + * Shows the wait note about the Send SS command. + * @param aText The text to be displayed. + * @param aIconBitmap Sending dialog icon. + * @param aSelfExplanatoryIcon A flag indicating if only icon is shown. + */ + virtual void ShowSsWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatoryIcon ) = 0; + + /** + * Shows the confirmation note about the SAT Refresh command. + * @param aActionAccepted Indicates whether the command was accepted. + * @return Information of the operation result. + */ + virtual TSatUiResponse ConfirmRefreshL( + TBool& aActionAccepted) = 0; + + /** + * Notification of the SAT Call Control command. + * @param aText The text string to be displayed. + * @param aAlphaIdStatus Alpha Identifier status + * @param aControlResult Call control general result + * @return The response from the UI + */ + virtual TSatUiResponse CallControlL( + const TDesC& aText, + const TSatAlphaIdStatus aAlphaIdStatus ) = 0; + + /** + * Notification of the SAT Launch browser confirmation request + * @param aText The text to be displayed. + * @param aActionAccepted Indicates whether the command was accepted. + * @param aIconBitmap The confirm note icon + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + */ + virtual void ConfirmLaunchBrowserL( + const TDesC& aText, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) = 0; + + /** + * Notification of the SAT Mo Sm Control command. + * @param aText The text string to be displayed. + * @param aAlphaIdStatus Alpha Identifier status + * @param aControlResult Mo Sm control general result + * @return The response from the UI + */ + virtual TSatUiResponse MoSmControlL( + const TDesC& aText, + const TSatAlphaIdStatus aAlphaIdStatus ) = 0; + + /** + * Shows the wait note while DTMF are being sent. + * @param aText The text to be displayed. + * @param aIconBitmap The confirm note icon + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @return Information on the operation result. + */ + virtual TSatUiResponse ShowDtmfWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatoryIcon ) = 0; + + /** Dispatch iWait to action implementer. + * @param aWait Timer. + */ + virtual void DispatchTimer( CActiveSchedulerWait& aWait ) = 0; + + /** + * Get flag which is indicating if end key is pressed. + * @return A Boolean flag which is indicating if end key is pressed. + */ + virtual TBool GetEndKey() = 0; + + /** + * Set a flag which is indicating if end key is pressed. + * @param aValue Status of end key + */ + virtual void SetEndKey( TBool aValue ) = 0; + + /** + * Set a flag which is indicating if proactive command is pending. + * @param aValue Status of proactive command + */ + virtual void SetCommandPending( TBool aValue ) = 0; + + /** + * Plays user selected tone. + * @param aText The text to be displayed. + * @param aDuration Play duration. + * @param aTone Tone to be played. + * @param aIconBitmap The tone playing note icon + * @param aSelfExplanatory Flag indicating if icon is self-explanatory. + * @return Information on the operation result. + */ + virtual TSatUiResponse PlayUserSelectedToneL( + const TDesC& aText, + TTimeIntervalMicroSeconds aDuration, + TSatTone aTone, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) = 0; + + /** + * Confirm user permission for Open Channel. + * @param aText The text to be displayed. + * @param aActionAccepted Indicates whether the command was accepted. + * @param aIconBitmapOpenChannel Icon for query dialog + * @param aSelfExplanatory A flag indicating if icon is self-explanatory + * @return Operation result + */ + virtual TSatUiResponse ConfirmOpenChannelL( + const TDesC& aText, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmapOpenChannel, + const TBool aSelfExplanatory ) = 0; + + /** + * Shows the wait note while BIP packets are sent. + * @param aCommand Command type. + * @param aText The text to be displayed. + * @param aIconBitmap Icon for query dialog + * @param aSelfExplanatory A flag indicating if icon is self-explanatory + */ + virtual void ShowBIPNoteL( + TInt aCommand, + const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) = 0; + + /** + * Confirm user permission for SetUpCall + * @param aText The text to be displayed. + * @param aSimAppName Header for th equery + * @param aActionAccepted Indicates whether the command was accepted. + * @param aIconBitmap Icon for query dialog + * @param aSelfExplanatory A flag indicating if icon is self-explanatory + */ + virtual void ConfirmSetUpCallL( + const TDesC& aText, + const TDesC& aSimAppName, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) = 0; + + /** + * Show note indicating SAT is not available. + */ + virtual void ShowNotAvailableNoteL() = 0; + + /** + * Show the Ss error note. + */ + virtual void ShowSsErrorNoteL() = 0; + + /** + * Start SatUi closing process. + */ + virtual void CloseSatUI() = 0; + + /** + * Return current profile state. + * @return current profile state. + */ + virtual TInt ProfileState() = 0; + + + }; + +#endif // MSATUIACTIONIMPLEMENTER_H + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/csatuiiconhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/csatuiiconhandler.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,112 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Introduces CSatUiIconHandler class, which handles +* icon fetching for SatUi. +* +*/ + + +#ifndef CSATUIICONHANDLER_H +#define CSATUIICONHANDLER_H + +#include +#include + +class CFbsBitmap; +class RSatSession; + +/** + * Handles asynchronous icon fetching for SatUi. + * + * Opens connection to SatClient by using received session attribute. + * Receives icon information and does the selection based on received icon id + * attribute. Asks the handle of the icon bitmap from the SatClient's + * RSatIcon class by giving the icon information and the package for handle, + * which is done asynchronously. For mean time, this class is waiting for + * completion of request by starting CActiveSchedulerWait, which is stopped + * when request is completed. After that the icon is duplicated via RSatIcon + * by giving the handle information. This is also an asynchronous call and + * CActiveSchedulerWait is started again. When completed the pointer to the + * bitmap is returned. + * + * @lib satui.exedll + * @since S60 v3.1 + */ +class CSatUiIconHandler : public CBase + { + +public: // Constructors and destructor + + /** + * Constructor. + */ + static CSatUiIconHandler* NewL(); + + /* + * Destructor. + */ + virtual ~CSatUiIconHandler(); + +public: // New functions + + /** + * The method, which fetches the icon. + * + * @since S60 v3.1 + * @param aSatSession Session information for SatClient interface. + * @param aIconId Id for icon to be fetched. + * @param aOptWidth Optimal width of the icon to be fetched. + * @param aOptHeight Optimal height of the icon to be fetched. + * @param aIconSupport Flag to signal if icons are not supported at all + * @return A pointer to the icon bitmap. + */ + CFbsBitmap* FetchIconL( const RSatSession& aSatSession, + const TUint8 aIconId, + const TInt aOptWidth, + const TInt aOptHeight, + TBool& aIconSupport ); + +private: + + /** + * C++ default constructor. + * + * @since S60 v3.1 + */ + CSatUiIconHandler(); + + /** + * Sorts the icons into order of superiority and saves the order into a list + * + * @since S60 v3.1 + * @param aIconEf List of icons + * @param aSelectedIcons List into which order is saved + * @param aOptWidth Optimal width of the icon to be fetched. + * @param aOptHeight Optimal height of the icon to be fetched. + */ + void SortIconsL( const RIconEf& aIconEf, + RArray& aSelectedIcons, + const TInt aOptWidth, + const TInt aOptHeight ) const; + +private: // data + + /** + * RSatService of the SatClient. + */ + RSatService iSatService; + + }; + +#endif // CSATUIICONHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/satui.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/satui.hrh Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2002 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: +* This file contains declarations for resources of SatUi. +* The file can be included in C++ or resource file. +* +*/ + + +#ifndef SATUI_HRH +#define SATUI_HRH + +// CONSTANTS + +enum + { + ESatUiCmdSelect = 1, + ESatUiCmdExit + }; + +enum + { + ESatUiSoftkeySend = 10, + ESatUiSoftkeyCall, + ESatUiSoftkeyQuit + }; + +enum + { + ESatUiWaitNote = 1, + ESatUiWaitNoteWithCancel, + ESatUiRefreshWaitNote, + ESatUiSmsWaitNote, + ESatUiSsWaitNote, + ESatUiDtmfWaitNote, + ESatUiPermanentNote, + ESatUiMessage, + ESatUiInformationNote + }; + +enum + { + ESatUiConfirmSendSms = 1, + ESatUiConfirmSendSs, + ESatUiConfirmSendUssd, + ESatUiConfirmSetUpCall + }; + +enum + { + ESatUiDisplayTextIconLabel=50, + ESatUiDisplayTextIconSpacer, + ESatUiDisplayTextIconRTxtEd + }; + +#endif // SATUI_HRH + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUIInc/tflogger.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUIInc/tflogger.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2002-2006 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: Defines logging macroes +* +*/ + + +#ifndef __TFLOGGER_H__ +#define __TFLOGGER_H__ + +#include +#include + +_LIT( KTfLogFolder, "sat" ); +_LIT( KTfLogFile, "satui.TXT" ); + +/** +* ------------------------------------------------------------------------------ +* +* Remove #define LOGGING_ENABLED from comments to enable logging +* +* ------------------------------------------------------------------------------ +*/ + +//#define LOGGING_ENABLED + +/** +* ------------------------------------------------------------------------------ +* +* LOGGING MACROs +* +* USE THESE MACROS IN YOUR CODE +* +* Example: TFLOGTEXT( own_desc ) +* Example: TFLOGSTRING( "Test" ) +* Example: TFLOGSTRING( "Test %i", aValue ) +* Example: TFLOGSTRING( "Test %i %i", aValue1, aValue2 ) +* +* ------------------------------------------------------------------------------ +*/ + +#ifdef LOGGING_ENABLED + + #define TFLOGTEXT( TEXT ) \ + { \ + RFileLogger::Write( KTfLogFolder,KTfLogFile, \ + EFileLoggingModeAppend, TEXT ); \ + RDebug::Print( TEXT ); \ + } + + #define TFLOGSTRING( TEXT ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::Write( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + tempLogDes() ); \ + RDebug::Print( _L( TEXT ) ); \ + } + + #define TFLOGSTRING2( TEXT, VAR1 ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::WriteFormat( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + TRefByValue( tempLogDes() ), VAR1 ); \ + RDebug::Print( _L( TEXT ), VAR1 ); \ + } + + #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::WriteFormat( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + TRefByValue( tempLogDes() ), VAR1, VAR2 ); \ + RDebug::Print( _L( TEXT ), VAR1, VAR2 ); \ + } + +#else + + #define TFLOGTEXT( TEXT ) + #define TFLOGSTRING( TEXT ) + #define TFLOGSTRING2( TEXT, VAR1 ) + #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) + +#endif // LOGGING_ENABLED + +#endif // __TFLOGGER_H__ diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiActionPerformer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiActionPerformer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1837 @@ +/* +* Copyright (c) 2002-2007 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: This class handles the communication between server and +* user interface +* +*/ + + +// INCLUDE FILES +#include +#include +#include +#include + +#include + +#include //for itemsicon +#include //for itemsicon +#include //for TAknWindowLineLayout +#include //for scalable layouts +#include +#include +#include + +#include "CSatUiActionPerformer.h" +#include "MSatUiActionImplementer.h" +#include "csatuiiconhandler.h" +#include "tflogger.h" + +#include "satui.hrh" + +#include +#include +#include + +// General Settings Cen Rep Keys. +#include + +// CONSTANTS + +const TInt KSatActiveProfileOffline = 5; // value from ProfileEngine + +// PlayTone durations +const TInt64 KSatDur170ms = 170000; // 170ms +const TInt64 KSatDur200ms = 200000; // 200ms +const TInt64 KSatDur250ms = 250000; // 250ms +const TInt64 KSatDur1200ms = 1200000; // 1200ms + +// play tone tones +_LIT8( KNetToneSeqNetBusy, "\x00\x11\x05\x4E\x30\x40\x30\x07\x0B" ); + +_LIT8( KNetToneSeqNetCallWaiting, "\x00\x11\x05\x4E\x14\x40\x3C\x4E\x14\ +\x40\x64\x40\x64\x40\x64\x4E\x14\x40\x3C\x4E\x14\x40\x64\x40\x64\x40\x64\ +\x07\x0B" ); + +_LIT8( KNetToneSeqNetCongestion, "\x00\x11\x05\x4E\x14\x40\x14\x07\x0B" ); + +_LIT8( KNetToneSeqNetSpecialInformation, "\x00\x11\x05\x4F\x21\x50\ +\x21\x51\x21\x40\x64\x07\x0B" ); + +_LIT8( KNetToneSeqDial,"\x00\x11\x05\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE\ +\x4E\xFE\x4E\xFE\x4E\xFE\x07\x0B"); + +_LIT8( KNetToneSeqRingGoing, "\x00\x11\x05\x4E\x64\x05\x04\x40\x64\06\x07\x0B" ); + +// General Beep is set for forever duration. Instead of AVKON definition 170ms. +_LIT8( KGeneralBeep, "\x00\x11\x0A\x76\x00\x0B" ); +_LIT8( KErrorTone, "\x00\x11\x0A\x6C\x19\x0B" ); +_LIT8( KRadioPathNotAvailable, "\x00\x11\x0A\x05\x03\x4E\x14\x40\x14\x06\x0B" ); +_LIT8( KRadioPathAck, "\x00\x11\x0A\x02\xFC\x0A\x80\x4E\x14\x0A\x7f\x0B" ); + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CSatUiActionPerformer::CSatUiActionPerformer(): + iRefresh( EFalse ), + iIconSupport( ETrue ), + iClearScreenEvent( EFalse ) + { + } + +// Symbian OS default constructor can leave. +void CSatUiActionPerformer::ConstructL() + { + TFLOGSTRING( "CSatUiActionPerformer::ConstructL called" ) + + //Register to Server as subsession + //If Server is not up, this function call may take time + iSatSession.ConnectL(); + + iSat.RegisterL( iSatSession, this ); + iAdapter = iSat.Adapter(); + if ( !iAdapter ) + { + User::Leave( KErrNotFound ); + } + + // create icon handler + iIconHandler = CSatUiIconHandler::NewL(); + + //Item icons + iItemIcons = new ( ELeave ) CAknIconArray( 1 ); + + TFLOGSTRING( "CSatUiActionPerformer::ConstructL exit" ) + } + +// Two-phased constructor. +CSatUiActionPerformer* CSatUiActionPerformer::NewL() + { + TFLOGSTRING( "CSatUiActionPerformer::NewL() called" ) + CSatUiActionPerformer* self = new ( ELeave ) CSatUiActionPerformer; + + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + TFLOGSTRING( "CSatUiActionPerformer::NewL() exit" ) + return self; + } + +// Destructor. +CSatUiActionPerformer::~CSatUiActionPerformer() + { + TFLOGSTRING( "CSatUiActionPerformer::~CSatUiActionPerformer() called" ) + + iSat.Close(); + iSatSession.Close(); + + if ( iItemIcons ) + { + iItemIcons->ResetAndDestroy(); + delete iItemIcons; + } + + // delete icon handler + delete iIconHandler; + iIconHandler = NULL; + + iActionImplementer = NULL; + iAdapter = NULL; + + TFLOGSTRING( "CSatUiActionPerformer::~CSatUiActionPerformer() exit" ) + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::SetImplementer +// Sets a pointer to CSatUiViewAppUi object. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiActionPerformer::SetImplementer( + MSatUiActionImplementer* aImplementer ) + { + TFLOGSTRING( "CSatUiActionPerformer::SetImplementer calling" ) + iActionImplementer = aImplementer; + TFLOGSTRING( "CSatUiActionPerformer::SetImplementer exiting" ) + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::Adapter +// Returns a pointer to MSatUiAdapter provided by SatCli. +// (other items were commented in a header). +// --------------------------------------------------------- +// +MSatUiAdapter* CSatUiActionPerformer::Adapter() + { + TFLOGSTRING( "CSatUiActionPerformer::Adapter calling-exiting" ) + return iAdapter; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::DisplayTextL +// Checks length of the text and calls method from +// the CSatUiViewAppUi class if the length is OK. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiActionPerformer::DisplayTextL( + const TDesC& aText, + const TDesC& aSimApplicationName, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed, + const TBool aSustainedText, + const TTimeIntervalSeconds aDuration, + const TBool aWaitUserToClear ) + { + TFLOGSTRING( "CSatUiActionPerformer::DisplayText called" ) + TSatUiResponse response( ESatFailure ); + aRequestedIconDisplayed = ETrue; + TBool selfExplanatoryIcon( EFalse ); + + TInt textLength( aText.Length() ); + + if ( ( !textLength ) || ( textLength > RSat::KTextToDisplayMaxSize ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::DisplayText no text" ) + aRequestedIconDisplayed = EFalse; + return response; + } + + CFbsBitmap* iconBitmapDisplayText = NULL; + iActionImplementer->SetCommandPending( ETrue ); + + //if icon is available for command + if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) || + ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) && + ( iIconSupport ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::DisplayText have icon" ) + iconBitmapDisplayText = FetchIcon( aIconId.iIdentifier, + EIconDisplayText ); + + if ( ESatSelfExplanatory == aIconId.iIconQualifier ) + { + TFLOGSTRING( "CSatUiActionPerformer::DisplayText self \ + explanatory icon" ) + selfExplanatoryIcon = ETrue; + } + } + + //icon not found not shown + if ( !iconBitmapDisplayText ) + { + aRequestedIconDisplayed = EFalse; + } + + iActionImplementer->DispatchTimer( iWait ); + + TRAPD( err, + response = iActionImplementer->DisplayTextL( aText, aSimApplicationName, + iconBitmapDisplayText, selfExplanatoryIcon, + aSustainedText, aDuration, aWaitUserToClear ); + ); + + if ( err != KErrNone ) + { + response = ESatFailure; + aRequestedIconDisplayed = EFalse; + } + + if ( iActionImplementer->GetEndKey() ) + { + response = ESatSessionTerminatedByUser; + iActionImplementer->SetEndKey( EFalse ); + } + + iActionImplementer->SetCommandPending( EFalse ); + + TFLOGSTRING2( "CSatUiActionPerformer::DisplayText exit, return: %d", \ + response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::GetInkeyL +// Checks type of the input wanted and calls right method +// from the CSatUiViewAppUi class. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiActionPerformer::GetInkeyL( + const TDesC& aText, + const TSatCharacterSet aCharacterSet, + TChar& aInput, + const TBool /*aHelpIsAvailable*/, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed, + TUint& aDuration, + const TBool aImmediateDigitResponse ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetInkey called" ) + + TSatUiResponse response( ESatSuccess ); + aRequestedIconDisplayed = EFalse; + TBuf<1> input; + + if ( aInput.IsAssigned() ) + { + input.Fill( aInput, 1 ); + } + + if ( ( aCharacterSet == ESatYesNo ) && ( aText.Length() == 0 ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetInkey return ESatFailure" ) + return ESatFailure; + } + + CFbsBitmap* iconBitmapGetInkey = NULL; + iActionImplementer->SetCommandPending( ETrue ); + + // If icon is available for command + if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) || + ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) && + ( iIconSupport ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetInkey have icon" ) + TIconCommand iconCommand ( EIconGetInkey ); + + if ( ESatYesNo == aCharacterSet ) + { + iconCommand = EIconGetYesNo; + } + + iconBitmapGetInkey = FetchIcon( aIconId.iIdentifier, + iconCommand ); + GetScalableBitmap( iconBitmapGetInkey, iconCommand, + aRequestedIconDisplayed ); + } + + TBool selfExplanatory( EFalse ); + + // Icon is self-explanatory + if ( ESatSelfExplanatory == aIconId.iIconQualifier ) + { + selfExplanatory = ETrue; + } + + iActionImplementer->DispatchTimer( iWait ); + + TRAPD( err, + + if ( ESatYesNo == aCharacterSet || aImmediateDigitResponse ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetInkey digit response" ) + response = iActionImplementer->GetYesNoL( aText, aCharacterSet, + aInput, iconBitmapGetInkey, selfExplanatory, aDuration, + aImmediateDigitResponse ); + } + else //ESatCharSmsDefaultAlphabet, ESatCharUcs2Alphabet, ESatDigitOnly + { + TFLOGSTRING( "CSatUiActionPerformer::GetInkey other conditions" ) + response = iActionImplementer->GetInputL( + aText, aCharacterSet, input, 1, 1, EFalse, ETrue, + iconBitmapGetInkey, selfExplanatory, aDuration ); + + if ( ESatSuccess == response ) + { + if ( input.Length() ) + { + aInput = input[0]; + } + } + } + ); + + if ( err != KErrNone ) + { + response = ESatFailure; + } + + if ( iActionImplementer->GetEndKey() ) + { + response = ESatSessionTerminatedByUser; + iActionImplementer->SetEndKey( EFalse ); + } + iActionImplementer->SetCommandPending( EFalse ); + + TFLOGSTRING2( "CSatUiActionPerformer::GetInkey exit, return: %d", \ + response ) + return response; + } + +// -------------------------------------------------------- +// CSatUiActionPerformer::GetInputL +// Checks type of the input wanted and whether it should be +// hidden and calls right method from the CSatUiViewAppUi class. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiActionPerformer::GetInputL( + const TDesC& aText, + const TSatCharacterSet aCharacterSet, + TDes& aInput, + const TInt aMinLength, + const TInt aMaxLength, + const TBool aHideInput, + const TBool /*aHelpIsAvailable*/, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetInput called" ) + TSatUiResponse response( ESatSuccess ); + aRequestedIconDisplayed = EFalse; + + if ( ( ( aCharacterSet == ESatCharSmsDefaultAlphabet ) || + ( aCharacterSet == ESatCharUcs2Alphabet ) ) && + ( aHideInput ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetInput return ESatFailure" ) + return ESatFailure; + } + + CFbsBitmap* iconBitmapGetInput = NULL; + iActionImplementer->SetCommandPending( ETrue ); + + // If icon is available for command + if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) || + ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) && + ( iIconSupport ) ) + { + iconBitmapGetInput = FetchIcon( aIconId.iIdentifier, EIconGetInput ); + GetScalableBitmap( iconBitmapGetInput, EIconGetInput, + aRequestedIconDisplayed ); + } + + TBool selfExplanatory( EFalse ); + + // Icon is self-explanatory + if ( ESatSelfExplanatory == aIconId.iIconQualifier ) + { + selfExplanatory = ETrue; + } + + iActionImplementer->DispatchTimer( iWait ); + + TUint duration ( 0 ); + TRAPD( err, + response = iActionImplementer->GetInputL( + aText, aCharacterSet, aInput, aMinLength, aMaxLength, + aHideInput, EFalse, iconBitmapGetInput, selfExplanatory, + duration ); + ); + + if ( err != KErrNone ) + { + TFLOGSTRING2( "CSatUiActionPerformer::GetInput err:%d", err ) + response = ESatFailure; + aRequestedIconDisplayed = EFalse; + } + + if ( iActionImplementer->GetEndKey() ) + { + response = ESatSessionTerminatedByUser; + iActionImplementer->SetEndKey( EFalse ); + } + iActionImplementer->SetCommandPending( EFalse ); + + TFLOGSTRING2( "CSatUiActionPerformer::GetInput response:%d", response ) + TFLOGSTRING2( "CSatUiActionPerformer::GetInput aRequestedIconDisplayed:%d", + aRequestedIconDisplayed ) + TFLOGSTRING( "CSatUiActionPerformer::GetInput exit" ) + return response; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::SetUpMenuL +// Calls the method from the CSatUiViewAppUi class to show +// a SetUpMenu view. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiActionPerformer::SetUpMenuL( + const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TBool aHelpIsAvailable, + const TSatIconId& aIconId, + const CArrayFixFlat* aMenuIcons, + const enum TSatIconQualifier aIconListQualifier, + const enum TSatSelectionPreference /*aSelectionPreference*/ ) + { + TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu called" ) + TSatUiResponse response( ESatSuccess ); + TBool selfExplanatoryItems( EFalse ); + CFbsBitmap* iconTitleBitmap = NULL; + iActionImplementer->SetCommandPending( ETrue ); + + if ( !aMenuItems.MdcaCount() || + ( KSatActiveProfileOffline == + iActionImplementer->ProfileState() ) ) + { + iActionImplementer->SetCommandPending( EFalse ); + iActionImplementer->ShowNotAvailableNoteL(); + iActionImplementer->CloseSatUI(); + return response; + } + + //if contextpane icon available for command + if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) || + ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) && + ( iIconSupport ) ) + { + iconTitleBitmap = FetchIcon( aIconId.iIdentifier, + EIconSetUpMenuContext ); + GetScalableBitmap( iconTitleBitmap, EIconSetUpMenuContext ); + } + + iItemIcons->ResetAndDestroy(); + TInt iconCount( 0 ); + + if ( aMenuIcons ) + { + iconCount = aMenuIcons->Count(); + } + + //if icons are available for item list + if ( ( aMenuItems.MdcaCount() == iconCount ) && + ( ( aIconListQualifier == ESatSelfExplanatory ) || + ( aIconListQualifier == ESatNotSelfExplanatory ) ) && + ( iIconSupport ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu have icon" ) + if ( aIconListQualifier == ESatSelfExplanatory ) + { + selfExplanatoryItems = ETrue; + } + + TBool continueLoop( ETrue ); + TInt count( 0 ); + for ( count = 0; ( count < iconCount ) && continueLoop; count++ ) + { + CGulIcon* gulIcon = CGulIcon::NewLC(); + TUint8 itemIconId( STATIC_CAST( TUint8, + aMenuIcons->operator[]( count ) ) ); + CFbsBitmap* iconItemBitmap = NULL; + iconItemBitmap = FetchIcon( itemIconId, EIconSetUpMenuItems ); + + if ( !iconItemBitmap && + ( aIconListQualifier == ESatSelfExplanatory ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu \ + SelfExplanatory " ) + CleanupStack::PopAndDestroy( gulIcon ); // gulIcon + iItemIcons->ResetAndDestroy(); + continueLoop = EFalse; + } + else + { + if ( !iconItemBitmap && + ( aIconListQualifier == ESatNotSelfExplanatory ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu \ + not SelfExplanatory " ) + iconItemBitmap = new( ELeave )CFbsBitmap(); + } + else + { + TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu \ + other conditions " ) + GetScalableBitmap( iconItemBitmap, EIconSetUpMenuItems ); + } + + gulIcon->SetBitmap( iconItemBitmap ); + iItemIcons->AppendL( gulIcon ); + CleanupStack::Pop( gulIcon ); + } + } + TFLOGSTRING2( "CSatUiActionPerformer::SetUpMenu count: %d", count ) + } + + TRAPD( err, + response = iActionImplementer->SetUpMenuL( + aText, aMenuItems, aMenuItemNextActions, iconTitleBitmap, + iItemIcons, selfExplanatoryItems, aHelpIsAvailable ); + ); + + if ( KErrNone != err ) + { + response = ESatFailure; + } + + if ( iActionImplementer->GetEndKey() ) + { + response = ESatSessionTerminatedByUser; + iActionImplementer->SetEndKey( EFalse ); + } + + iActionImplementer->SetCommandPending( EFalse ); + TFLOGSTRING2( "CSatUiActionPerformer::SetUpMenu exit, \ + return:%i", response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::SelectItemL +// Calls the method from the CSatUiViewAppUi class to show +// a SelectItem view. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiActionPerformer::SelectItemL( + const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TInt aDefaultItem, + TUint8& aSelection, + const TBool aHelpIsAvailable, + const TSatIconId& aIconId, + const CArrayFixFlat* aMenuIcons, + const enum TSatIconQualifier aIconListQualifier, + TBool& aRequestedIconDisplayed, + const enum TSatSelectionPreference /*aSelectionPreference*/ ) + { + TFLOGSTRING( "CSatUiActionPerformer::SelectItem called" ) + TSatUiResponse response( ESatSuccess ); + aRequestedIconDisplayed = ETrue; + TBool selfExplanatoryItems( EFalse ); + + CFbsBitmap* iconTitleBitmap = NULL; + iActionImplementer->SetCommandPending( ETrue ); + + //if contextpane icon available for command + if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) || + ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) && + ( iIconSupport ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::SelectItem icon available" ) + iconTitleBitmap = FetchIcon( aIconId.iIdentifier, + EIconSetUpMenuContext ); + GetScalableBitmap( iconTitleBitmap, EIconSetUpMenuContext, + aRequestedIconDisplayed ); + } + + iItemIcons->ResetAndDestroy(); + + TInt iconCount( 0 ); + + if ( aMenuIcons ) + { + iconCount = aMenuIcons->Count(); + } + + TFLOGSTRING2( "CSatUiActionPerformer::SelectItem iconCount:%d", iconCount ) + + //if icons are available for item list + if ( ( aMenuItems.MdcaCount() == iconCount ) && + ( ( aIconListQualifier == ESatSelfExplanatory ) || + ( aIconListQualifier == ESatNotSelfExplanatory ) ) && + ( iIconSupport ) ) + { + TFLOGSTRING( + "CSatUiActionPerformer::SelectItem icon available for item list" ) + + if ( aIconListQualifier == ESatSelfExplanatory ) + { + selfExplanatoryItems = ETrue; + } + + TBool continueLoop( ETrue ); + TInt count( 0 ); + for ( count = 0; ( count < iconCount ) && continueLoop; count++ ) + { + CGulIcon* gulIcon = CGulIcon::NewLC(); + TUint8 itemIconId = STATIC_CAST( TUint8, + aMenuIcons->operator[]( count ) ); + CFbsBitmap* iconItemBitmap = NULL; + iconItemBitmap = FetchIcon( itemIconId, EIconSetUpMenuItems ); + + // when icon can't be received and is set to self explanatory, we + // iqnore all icons and show only text + if ( !iconItemBitmap && + ( aIconListQualifier == ESatSelfExplanatory ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::SelectItem \ + SelfExplanatory " ) + CleanupStack::PopAndDestroy( gulIcon ); // gulIcon + iItemIcons->ResetAndDestroy(); + continueLoop = EFalse; + aRequestedIconDisplayed = EFalse; + } + else + { + // when icon can't be received and is set to not self + // explanatory, we replace it with empty icon + if ( !iconItemBitmap && + ( aIconListQualifier == ESatNotSelfExplanatory ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::SelectItem \ + not SelfExplanatory " ) + iconItemBitmap = new( ELeave )CFbsBitmap(); + aRequestedIconDisplayed = EFalse; + } + // when icon was able to receive, we scale it + // if every prior icon is correctly received + else if ( aRequestedIconDisplayed ) + { + TFLOGSTRING( "CSatUiActionPerformer::SelectItem \ + receive icon " ) + GetScalableBitmap( iconItemBitmap, EIconSetUpMenuItems, + aRequestedIconDisplayed ); + } + // if aRequestIconDisplayed is false, at least one prior icon + // fetch had problems and thus we must report that by not + // updating aRequestedIconDisplayed + else + { + TFLOGSTRING( "CSatUiActionPerformer::SelectItem \ + aRequestIconDisplayed false " ) + GetScalableBitmap( iconItemBitmap, EIconSetUpMenuItems ); + } + + gulIcon->SetBitmap( iconItemBitmap ); + iItemIcons->AppendL( gulIcon ); + CleanupStack::Pop( gulIcon ); + } + } + TFLOGSTRING2( "CSatUiActionPerformer::SelectItem count: %d", count ) + } + + TRAPD( err, + response = iActionImplementer->SelectItemL( aText, aMenuItems, + aMenuItemNextActions, aDefaultItem, aSelection, iconTitleBitmap, + iItemIcons, selfExplanatoryItems, aHelpIsAvailable ); + ); + + if ( err != KErrNone ) + { + response = ESatFailure; + aRequestedIconDisplayed = EFalse; + } + + if ( iActionImplementer->GetEndKey() ) + { + response = ESatSessionTerminatedByUser; + iActionImplementer->SetEndKey( EFalse ); + } + + iActionImplementer->SetCommandPending( EFalse ); + + TFLOGSTRING2( "CSatUiActionPerformer::SelectItem response:%d", response ) + TFLOGSTRING( "CSatUiActionPerformer::SelectItem exit" ) + return response; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::PlayTone +// Checks type of the tone wanted and calls right method +// from the CSatUiViewAppUi class. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiActionPerformer::PlayTone( + const TDesC& aText, + const TSatTone aTone, + const TTimeIntervalMicroSeconds aDuration, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed ) + { + TFLOGSTRING( "CSatUiActionPerformer::PlayTone called" ) + TFLOGSTRING2( "CSatUiActionPerformer::PlayTone tone is %i", aTone ) + + aRequestedIconDisplayed = EFalse; + + iSequence.Zero(); + TTimeIntervalMicroSeconds duration( aDuration.Int64() ); + iActionImplementer->SetCommandPending( ETrue ); + // This is used to determine zero length duration. + const TTimeIntervalMicroSeconds zeroDuration( static_cast( 0 ) ); + + CFbsBitmap* iconBitmap = NULL; + // If icon is available for command + if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) || + ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) && + ( iIconSupport ) ) + { + iconBitmap = FetchIcon( aIconId.iIdentifier, EIconPlayTone ); + GetScalableBitmap( iconBitmap, EIconPlayTone, + aRequestedIconDisplayed ); + } + + TBool selfExplanatory( EFalse ); + + // Icon is self-explanatory + if ( ESatSelfExplanatory == aIconId.iIconQualifier ) + { + selfExplanatory = ETrue; + } + + // Check if the current Profile is Meeting + TInt errCR( KErrNone ); + TInt profileId( 0 ); + + CRepository* repository = NULL; + TSatTone tone = aTone; + + // Which UID to monitor. + TRAP( errCR, repository = CRepository::NewL( KCRUidProfileEngine ) ); + + if ( !errCR && repository ) + { + errCR = repository->StartTransaction( + CRepository::EReadWriteTransaction ); + errCR = repository->Get( KProEngActiveProfile, profileId ); + } + + delete repository; + + TFLOGSTRING2( "CSatUiActionPerformer::PlayTone(): err = %d", errCR ) + + TFLOGSTRING2( "SCSatUiActionPerformer::PlayTone() profileId: %d", + profileId ) + + switch ( tone ) + { + case ESatGeneralBeep: + case ESatPositiveTone: + case ESatToneNotSet: + if ( zeroDuration == duration ) + { + duration = KSatDur170ms; // 170ms + } + iSequence.Copy( KGeneralBeep ); + break; + case ESatNegativeTone: + if ( zeroDuration == duration ) + { + duration = KSatDur250ms; // 250ms + } + iSequence.Copy( KErrorTone ); + break; + case ESatRadioPathNotAvailableCallDropped: + if ( zeroDuration == duration ) + { + duration = KSatDur1200ms; // 1200ms + } + iSequence.Copy( KRadioPathNotAvailable ); + break; + case ESatRadioPathAcknowledge: + if ( zeroDuration == duration ) + { + duration = KSatDur200ms; // 200ms + } + iSequence.Copy( KRadioPathAck ); + break; + case ESatDialTone: + { + if ( zeroDuration == duration ) + { + TFLOGSTRING( "CSatUiActionPerformer::PlayTone() ESatDialTone" ) + return ESatCmdDataNotUnderstood; + } + else + { + iSequence.Copy( KNetToneSeqDial ); + } + } + break; + case ESatCalledSubscriberBusy: + { + if ( zeroDuration == duration ) + { + return ESatCmdDataNotUnderstood; + } + else + { + iSequence.Copy( KNetToneSeqNetBusy ); + } + } + break; + case ESatCongestion: + { + if ( zeroDuration == duration ) + { + return ESatCmdDataNotUnderstood; + } + else + { + iSequence.Copy( KNetToneSeqNetCongestion ); + } + } + break; + case ESatErrorSpecialInfo: + { + if ( zeroDuration == duration ) + { + return ESatCmdDataNotUnderstood; + } + else + { + iSequence.Copy( KNetToneSeqNetSpecialInformation ); + } + } + break; + case ESatCallWaitingTone: + { + if ( zeroDuration == duration ) + { + return ESatCmdDataNotUnderstood; + } + else + { + iSequence.Copy( KNetToneSeqNetCallWaiting ); + } + } + break; + case ESatRingingTone: + { + if ( zeroDuration == duration ) + { + return ESatCmdDataNotUnderstood; + } + else + { + iSequence.Copy( KNetToneSeqRingGoing ); + } + } + break; + case ESatUserSelectedToneIncomingSpeech: + case ESatUserSelectedToneIncomingSms: + { + // These are handled later. + } + break; + default: + TFLOGSTRING( "CSatUiActionPerformer::PlayTone Default" ) + return ESatCmdDataNotUnderstood; + } + + TSatUiResponse response( ESatFailure ); + + iActionImplementer->DispatchTimer( iWait ); + + // ESatSClearScreenEvent doesn't occur,clear displaytext on screen. + if ( EFalse == iClearScreenEvent ) + { + // Clear displaytext on the screen. + TFLOGSTRING( "CSatUiActionPerformer::PlayTone clear screen" ) + iActionImplementer->ClearScreen(); + } + + if ( 0 != iSequence.Length() ) + { + TFLOGSTRING2( "CSatUiActionPerformer::PlayTone duration microseconds %d", + aDuration.Int64() ) + TRAPD( err, + response = iActionImplementer->PlayStandardToneL( + aText, + iSequence, + duration, + iconBitmap, + selfExplanatory ); + ); + + if ( KErrNone != err ) + { + response = ESatFailure; + TFLOGSTRING2( "CSatUiActionPerformer::PlayTone error %i", err ) + } + TFLOGSTRING( "CSatUiActionPerformer::PlayTone StandardTone exit" ) + } + else + { + TFLOGSTRING( "CSatUiActionPerformer::PlayTone length of sequence \ + is zero" ) + + TRAPD( err, + response = iActionImplementer->PlayUserSelectedToneL( + aText, + aDuration.Int64(), + tone, + iconBitmap, + selfExplanatory ); + ); + + if ( KErrNone != err ) + { + response = ESatFailure; + TFLOGSTRING2( "CSatUiActionPerformer::PlayTone error %i", err ) + } + + TFLOGSTRING( "CSatUiActionPerformer::PlayTone UserSelectedTone exit" ) + } + + if ( iActionImplementer->GetEndKey() ) + { + response = ESatSessionTerminatedByUser; + iActionImplementer->SetEndKey( EFalse ); + } + + iActionImplementer->SetCommandPending( EFalse ); + + TFLOGSTRING( "CSatUiActionPerformer::PlayTone iClearScreenEvent false" ) + iClearScreenEvent = EFalse; + + TFLOGSTRING2( "CSatUiActionPerformer::PlayTone response: %d", response ) + TFLOGSTRING( "CSatUiActionPerformer::PlayTone exit" ) + return response; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::ConfirmCommand +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiActionPerformer::ConfirmCommand( + const TSatSQueryCommand aCommandId, + const TSatAlphaIdStatus aAlphaIdStatus, + const TDesC& aText, + const TDesC& aAdditionalText, + TBool& aActionAccepted, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed, + TBool& aTerminatedByUser ) + { + TFLOGSTRING( "CSatUiActionPerformer::ConfirmCommand calling" ) + aRequestedIconDisplayed = EFalse; + TInt error( KErrNone ); + TBool selfExplanatory( EFalse ); + + // Icon is self-explanatory + if ( ESatSelfExplanatory == aIconId.iIconQualifier ) + { + selfExplanatory = ETrue; + } + + aActionAccepted = ETrue; + + iActionImplementer->SetCommandPending( ETrue ); + + iActionImplementer->StopShowWaitNote(); + + CFbsBitmap* iconBitmap = NULL; + // If icon is available for command + if ( ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) || + ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) && + ( ( ESatOpenChannelQuery == aCommandId ) || + ( ESatSLaunchBrowserQuery == aCommandId ) || + ( ESatSSetUpCallQuery == aCommandId ) ) ) && + ( iIconSupport ) ) + { + iconBitmap = FetchIcon( aIconId.iIdentifier, + EIconConfirmCommand ); + GetScalableBitmap( iconBitmap, EIconConfirmCommand, + aRequestedIconDisplayed ); + } + TFLOGSTRING2( "CSatUiActionPerformer::ConfirmCommand aCommandId: %d", + aCommandId ) + // Check quering command + switch ( aCommandId ) + { + case ESatOpenChannelQuery: + { + TFLOGSTRING( " Quering OpenChannel" ) + TRAP( error, iActionImplementer->ConfirmOpenChannelL( + aText, aActionAccepted, iconBitmap, selfExplanatory ) ); + break; + } + + case ESatSRefreshQuery: + { + TFLOGSTRING( " Quering Refresh" ) + TRAP( + error, iActionImplementer->ConfirmRefreshL( aActionAccepted ); + ); + break; + } + + case ESatSLaunchBrowserQuery: + { + TFLOGSTRING( " Quering LaunchBrowser" ) + HBufC* textHolder = NULL; + + TRAP( error, + if ( ESatAlphaIdNull != aAlphaIdStatus ) + { + TFLOGSTRING( " CSatUiActionPerformer::ConfirmCommand AlphaId \ + isn't null" ) + if ( ESatAlphaIdNotProvided == aAlphaIdStatus ) + { + TFLOGSTRING( " CSatUiActionPerformer::ConfirmCommand \ + AlphaId not provided" ) + textHolder = StringLoader::LoadLC( + R_QTN_SAT_CONF_LAUNCH_BROW, + iActionImplementer->CoeEnv() ); + } + else + { + TFLOGSTRING( " CSatUiActionPerformer::ConfirmCommand \ + AlphaId provided" ) + textHolder = HBufC::NewLC( aText.Length() ); + TPtr ptr = textHolder->Des(); + ptr.Append( aText ); + } + + iActionImplementer->ConfirmLaunchBrowserL( *textHolder, + aActionAccepted, iconBitmap, selfExplanatory ); + // Clean textHolder + CleanupStack::PopAndDestroy( textHolder ); + } + + ); // TRAP + break; + } + + case ESatSSendSmQuery: + { + TFLOGSTRING( " Quering SendSm" ) + TRAP( error, iActionImplementer->ConfirmSendL( aText, + aActionAccepted, ESatUiConfirmSendSms ) ); + break; + } + + case ESatSSendSsQuery: + { + TFLOGSTRING( " Quering SendSs" ) + TRAP( error, iActionImplementer->ConfirmSendL( aText, + aActionAccepted, ESatUiConfirmSendSs ) ); + break; + } + + case ESatSSendUssdQuery: + { + TFLOGSTRING( " Quering SendUssd" ) + TRAP( error, iActionImplementer->ConfirmSendL( aText, + aActionAccepted, ESatUiConfirmSendUssd ) ); + break; + } + + case ESatSSetUpCallQuery: + { + TFLOGSTRING( " Quering SetUpCall" ) + TRAP( error, iActionImplementer->ConfirmSetUpCallL( + aText, aAdditionalText, aActionAccepted, iconBitmap, + selfExplanatory ) ); + break; + } + + default: + { + TFLOGSTRING( " Unknown quering command" ) + aActionAccepted = EFalse; + } + } + + if ( KErrNone != error ) + { + TFLOGSTRING2( "CSatUiActionPerformer::ConfirmCommand error:%d", error ) + aActionAccepted = EFalse; + } + else if ( iActionImplementer->GetEndKey() ) + { + TFLOGSTRING( "CSatUiActionPerformer::ConfirmCommand press endkey" ) + aTerminatedByUser = ETrue; + aActionAccepted = EFalse; + iActionImplementer->SetEndKey( EFalse ); + } + else + { + // Meaningless else + } + + iActionImplementer->SetCommandPending( EFalse ); + TFLOGSTRING( "CSatUiActionPerformer::ConfirmCommand exiting" ) + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::Notification +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiActionPerformer::Notification( + const TSatSNotifyCommand aCommandId, + const TSatAlphaIdStatus aAlphaIdStatus, + const TDesC& aText, + const TSatIconId& aIconId, + TBool& aRequestedIconDisplayed, + const TSatControlResult aControlResult ) + { + TFLOGSTRING( "CSatUiActionPerformer::Notification calling" ) + TSatUiResponse response = ESatSuccess; + TInt error( KErrNone ); + aRequestedIconDisplayed = EFalse; + iActionImplementer->SetCommandPending( ETrue ); + + HBufC* textHolder = NULL; + + // In case where command id is SendDtmf and alphaID is not provided, + // DTMF string to be sent is shown in dialog along with default text. + if ( ( ESatSSendDtmfNotify == aCommandId ) && + ( ESatAlphaIdNotProvided == aAlphaIdStatus ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::Notification SendDtmf" ) + TRAP( error, + TInt resource = DefaultAlphaIdL( aCommandId, aControlResult ); + // Now that resource is defined, get default text + textHolder = StringLoader::LoadL( + resource, aText ) + ); + } + // Get default text, if alpha not provided or it is NULL + else if ( aText.Length() == 0 && ESatAlphaIdNotNull != aAlphaIdStatus ) + { + TFLOGSTRING( "CSatUiActionPerformer::Notification alpha is null" ) + TRAP( error, + TInt resource = DefaultAlphaIdL( aCommandId, aControlResult ); + // Now that resource is defined, get default text + textHolder = StringLoader::LoadL( + resource, iActionImplementer->CoeEnv() ) + ); + } + // else use given text + else + { + TFLOGSTRING( "CSatUiActionPerformer::Notification alpha is provided" ) + TRAP( error, + textHolder = HBufC::NewL( aText.Length() ); + TPtr ptr = textHolder->Des(); + ptr.Copy( aText ); + ); + } + + if ( !textHolder ) + { + TRAP( error, textHolder = HBufC::NewL( 0 ) ); + } + + // No need to add textHolder into CleanupStack, since this is + // not a leaving function + + if ( ( KErrNone == error || KErrArgument == error ) && textHolder ) + { + TFLOGSTRING( "CSatUiActionPerformer::Notification none error " ) + CFbsBitmap* iconBitmap = NULL; + TBool selfExplanatoryIcon( EFalse ); + // Fetch icon + // Icons not supported for sending and receiving data + if ( ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) || + ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) && + ( ( ESatSSendDataNotify != aCommandId ) && + ( ESatSReceiveDataNotify != aCommandId ) ) ) && + ( iIconSupport ) ) + { + iconBitmap = FetchIcon( aIconId.iIdentifier, + EIconNotification ); + GetScalableBitmap( iconBitmap, EIconNotification, + aRequestedIconDisplayed ); + } + + if ( ESatSelfExplanatory == aIconId.iIconQualifier ) + { + selfExplanatoryIcon = ETrue; + } + + // Check notifying command + switch ( aCommandId ) + { + case ESatSSendDataNotify: + { + TFLOGSTRING( " Notifying SendData" ) + TRAP( error, + iActionImplementer->ShowBIPNoteL( + ESendDataIdentier, *textHolder, iconBitmap, + selfExplanatoryIcon ) + ); + break; + } + case ESatSReceiveDataNotify: + { + TFLOGSTRING( " Notifying ReceiveData" ) + TRAP( error, + iActionImplementer->ShowBIPNoteL( + EReceiveDataIdentifier, *textHolder, iconBitmap, + selfExplanatoryIcon ) + ); + break; + } + case ESatSCloseChannelNotify: + { + TFLOGSTRING( " Notifying CloseChannel" ) + iActionImplementer->StopShowWaitNote(); + TRAP( error, + iActionImplementer->ShowBIPNoteL( + ECloseChannelIdentifier, *textHolder, iconBitmap, + selfExplanatoryIcon ) + ); + break; + } + case ESatSMoSmControlNotify: + { + TFLOGSTRING( " Notifying MoSmControl" ) + TRAP( error, + iActionImplementer->MoSmControlL( + *textHolder, aAlphaIdStatus ) + ); + iActionImplementer->SetCommandPending( EFalse ); + break; + } + case ESatSCallControlNotify: + { + TFLOGSTRING( " Notifying CallControl" ) + iActionImplementer->DispatchTimer( iWait ); + TRAP( error, + iActionImplementer->CallControlL( + *textHolder, aAlphaIdStatus ) + ); + iActionImplementer->SetCommandPending( EFalse ); + break; + } + case ESatSSendUssdNotify: // fall through + case ESatSSendSsNotify: + { + TFLOGSTRING( " Notifying SendSs / SendUssd" ) + iActionImplementer->StopShowWaitNote(); + TRAP( error, + if ( ( ESatAlphaIdNotNull == aAlphaIdStatus ) || + ( ESatAlphaIdNotProvided == aAlphaIdStatus ) ) + { + iActionImplementer->ShowSsWaitNoteL( *textHolder, + iconBitmap, selfExplanatoryIcon ); + } + else + { + iActionImplementer->ShowWaitNoteWithoutDelayL(); + } + ); + break; + } + case ESatSSendDtmfNotify: + { + TFLOGSTRING( " Notifying SendDtmf" ) + iActionImplementer->StopShowWaitNote(); + TRAP( error, response = iActionImplementer->ShowDtmfWaitNoteL( + *textHolder, iconBitmap, selfExplanatoryIcon ) ); + break; + } + case ESatSSendSmsNotify: + { + TFLOGSTRING( " Notifying SendSms" ) + iActionImplementer->StopShowWaitNote(); + + if ( KErrNone == error ) + { + // Show Sms wait note + TRAP( error, + iActionImplementer->ShowSmsWaitNoteL( *textHolder, + iconBitmap, selfExplanatoryIcon ) ); + } + + break; + } + default: + { + TFLOGSTRING( " Unkown notification" ) + response = ESatFailure; + break; + } + } + } + + delete textHolder; + textHolder = NULL; + + if ( KErrNone != error ) + { + TFLOGSTRING2( "CSatUiActionPerformer::Notification error:%d", error ) + response = ESatFailure; + } + else if ( iActionImplementer->GetEndKey() ) + { + TFLOGSTRING( "CSatUiActionPerformer::Notification terminated by user" ) + response = ESatSessionTerminatedByUser; + iActionImplementer->SetEndKey( EFalse ); + } + else + { + TFLOGSTRING( "CSatUiActionPerformer::Notification success" ) + response = ESatSuccess; + } + + + TFLOGSTRING2( "CSatUiActionPerformer::Notification exiting, return: %d", \ + response ) + return response; + } + +// ----------------------------------------------------------------------------- +// CSatUiActionPerformer::EventNotification +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CSatUiActionPerformer::EventNotification( + const TSatSEvent aEventId, + const TSatSEventStatus /*aEventStatus*/, + const TInt /*aError*/ ) + { + TFLOGSTRING( "CSatUiActionPerformer::EventNotification calling" ) + + iActionImplementer->SetCommandPending( EFalse ); + switch ( aEventId ) + { + case ESatSSmEndEvent: + { + TFLOGSTRING( " SmsEnd event" ) + iActionImplementer->StopShowWaitNote(); + break; + } + case ESatSClearScreenEvent: + { + TFLOGSTRING( " ClearScreen event" ) + iClearScreenEvent = ETrue; + iActionImplementer->ClearScreen(); + break; + } + case ESatSsEndEvent: + { + TFLOGSTRING( " Ss end event" ) + iActionImplementer->StopShowWaitNote(); + break; + } + case ESatSsErrorEvent: + { + TFLOGSTRING( " Notifying Ss error" ) + // If error occurred (and Alpha ID provided), notify user + TRAPD( err, iActionImplementer->ShowSsErrorNoteL() ) + + if ( err ) + { + TFLOGSTRING( " Error Note could not be created!" ) + } + break; + } + case ESatSDtmfEndEvent: + { + TFLOGSTRING( " DTMF End event" ) + iActionImplementer->StopShowWaitNote(); + break; + } + case ESatSCloseSatUiAppEvent: + { + TFLOGSTRING( " Close UI event" ) + // Handle this similar way when End key is used + if ( KSatActiveProfileOffline == + iActionImplementer->ProfileState() ) + { + iActionImplementer->SetEndKey( ETrue ); + TRAP_IGNORE( iActionImplementer->ShowNotAvailableNoteL() ) + } + iActionImplementer->CloseSatUI(); + break; + } + default: + { + TFLOGSTRING2( " Unknown event occured: %i", aEventId ) + break; + } + } + + TFLOGSTRING( "CSatUiActionPerformer::EventNotification exiting" ) + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::DefaultAlphaIdL +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CSatUiActionPerformer::DefaultAlphaIdL( + const TSatSNotifyCommand aCommandId, + const TSatControlResult aControlResult ) const + { + TFLOGSTRING( "CSatUiActionPerformer::DefaultAlphaIdL calling" ) + TInt resource( 0 ); + + switch ( aCommandId ) + { + case ESatSSendDataNotify: // SendData + { + TFLOGSTRING( " SendData default" ) + resource = R_QTN_SAT_CONF_SEND_DATA_BIP; + break; + } + + case ESatSReceiveDataNotify: // ReceiveData + { + TFLOGSTRING( " ReceiveData default" ) + resource = R_QTN_SAT_CONF_RECEIVE_DATA_BIP; + break; + } + + case ESatSCloseChannelNotify: // CloseChannel + { + TFLOGSTRING( " CloseChannel default" ) + resource = R_QTN_SAT_CONF_CLOSE_CHANNEL_BIP; + break; + } + + case ESatSMoSmControlNotify: // MoSmControl + { + if ( ESatNotAllowed == aControlResult ) + { + TFLOGSTRING( " MoSmcontrol Not allowed default" ) + resource = R_QTN_SAT_MOSM_NOT_ALLOWED; + } + else if ( ESatAllowedWithModifications == aControlResult ) + { + TFLOGSTRING( " MoSmcontrol Modified default" ) + resource = R_QTN_SAT_MOSM_MODIFIED; + } + else + { + TFLOGSTRING( " MoSmcontrol No default" ) + resource = 0; // Allowed, default alpha -> no info + } + break; + } + + case ESatSCallControlNotify: // CallControl + { + if ( ESatNotAllowed == aControlResult ) + { + TFLOGSTRING( " CallControl Not allowed default" ) + resource = R_QTN_SAT_CC_NOT_ALLOWED; + } + else if ( ESatAllowedWithModifications == aControlResult ) + { + TFLOGSTRING( " CallControl Modified default" ) + resource = R_QTN_SAT_CC_MODIFIED; + } + else + { + TFLOGSTRING( " CallControl No default" ) + resource = 0; // Allowed, default alpha -> no info + } + break; + } + + case ESatSSendSmsNotify: // SendSm + { + TFLOGSTRING( " SendSms default" ) + resource = R_QTN_SAT_SENDING_SMS; + break; + } + + case ESatSSendDtmfNotify: // SendDtmf + { + TFLOGSTRING( " SendDTMF default" ) + resource = R_QTN_SAT_NOTE_SENDING_DTMF_TEMPLATE; + break; + } + + default: + { + TFLOGSTRING2( " Unknown command id: %i", aCommandId ) + User::Leave( KErrArgument ); + } + } + + TFLOGSTRING2( "CSatUiActionPerformer::DefaultAlphaIdL exiting, resource: \ + %d", resource ) + return resource; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::FetchIcon +// Fetch the icon information. +// (other items were commented in a header). +// --------------------------------------------------------- +// +CFbsBitmap* CSatUiActionPerformer::FetchIcon( const TUint8 aIconId, + const enum TIconCommand aIconCommand ) + { + TFLOGSTRING( "CSatUiActionPerformer::FetchIcon called" ) + CFbsBitmap* iconBitmap = NULL; + + TSize layoutSize( 0, 0 ); + + // Set icon max size according the command + if ( GetPopUpWindowIconSize( layoutSize, aIconCommand ) ) + { + TFLOGSTRING( "CSatUiActionPerformer::FetchIcon max size" ) + TRAPD( err, iconBitmap = iIconHandler->FetchIconL( iSatSession, + aIconId, layoutSize.iWidth, layoutSize.iHeight, iIconSupport ) ); + + if ( err != KErrNone ) + { + #if defined _DEBUG + _LIT( KFetchIcon, "CSatUiActionPerformer::FetchIcon" ); + User::Panic( KFetchIcon, err ); + #endif + } + } + else + { + TFLOGSTRING( "CSatUiActionPerformer::FetchIcon not supported" ) + } + + TFLOGSTRING( "CSatUiActionPerformer::FetchIcon exit" ) + return iconBitmap; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::GetPopUpWindowIconSize +// Get size for the icon in popup window. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TBool CSatUiActionPerformer::GetPopUpWindowIconSize( TSize& aSize, + const TIconCommand aIconCommand ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetPopUpWindowIconSize called" ) + + TRect rect( TSize( 0, 0 ) ); + TBool supported( ETrue ); + TAknLayoutRect opLogoLayout; + + TFLOGSTRING2( "CSatUiActionPerformer::GetPopUpWindowIconSize, \ + aIconCommand: %i", aIconCommand ) + // depending on the command, get correct layout and + // Calculate rectangle based on LAF specification. + switch ( aIconCommand ) + { + case EIconSetUpMenuContext: + { + opLogoLayout.LayoutRect( rect, + AknLayoutScalable_Avkon::context_pane_g1().LayoutLine() ); + break; + } + case EIconSetUpMenuItems: + { + opLogoLayout.LayoutRect( rect, + AknLayout::List_pane_elements__single_graphic__Line_1() ); + break; + } + case EIconDisplayText: + { + // layout borrowed from video + opLogoLayout.LayoutRect( rect, AknLayoutScalable_Avkon:: + popup_query_sat_info_window( 0 ).LayoutLine() ); + break; + } + case EIconPlayTone: + { + opLogoLayout.LayoutRect( rect, AknLayoutScalable_Avkon:: + popup_note_window_g1( 0 ).LayoutLine() ); + break; + } + case EIconConfirmCommand: // fall through + case EIconGetInput: // fall through + case EIconGetYesNo: // fall through + case EIconGetInkey: + { + opLogoLayout.LayoutRect( rect, AknLayout::Icon( 0 ) ); + break; + } + case EIconNotification: + { + opLogoLayout.LayoutRect( rect, AknLayout:: + Wait_or_progress_note_pop_up_window_elements_Line_1() ); + break; + } + default: + { + TFLOGSTRING( + "CSatUiActionPerformer::GetPopUpWindowIconSize not supported" ) + supported = EFalse; + break; + } + } + + aSize = opLogoLayout.Rect().Size(); + + // Layout for title icon gives incorrect width + // but since it is square height can be set to width + if ( EIconSetUpMenuContext == aIconCommand ) + { + aSize.iWidth = aSize.iHeight; + } + + TFLOGSTRING3( "CSatUiActionPerformer::GetPopUpWindowIconSize %dx%d exit", + aSize.iWidth, aSize.iHeight ) + return supported; + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::GetScalableBitmap +// Creates scalable bitmap +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiActionPerformer::GetScalableBitmapL( + CFbsBitmap*& aBitMapToConvert, + const TIconCommand aIconCommand ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap called" ) + TSize layoutSize( 0, 0 ); + CFbsBitmap* bitmap = NULL; + + // If scalable icon is supported in current layout then + // makes the scalable icon. + if ( GetPopUpWindowIconSize( layoutSize, aIconCommand ) ) + { + bitmap = new ( ELeave ) CFbsBitmap; + CleanupStack::PushL( bitmap ); + // CAknIcon takes ownership of bitmaps. + CFbsBitmap* dupMain = new ( ELeave ) CFbsBitmap; + CleanupStack::PushL( dupMain ); + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap duplicate original" ) + User::LeaveIfError( + dupMain->Duplicate( aBitMapToConvert->Handle() ) ); + + CAknIcon* bitmapIcon = CAknIcon::NewL(); + // Mask is not set because skins are not used. + // Ownership is transferred. + bitmapIcon->SetBitmap( dupMain ); + CleanupStack::Pop( dupMain ); + CleanupStack::PushL( bitmapIcon ); + CAknIcon* scalableIcon = AknIconUtils::CreateIconL( bitmapIcon ); + CleanupStack::Pop( bitmapIcon ); + CleanupStack::PushL( scalableIcon ); + + // fetch the size of icon + TSize iconSize = dupMain->SizeInPixels(); + + // At first we assume that width is scaled to layout maximum and + // thus height is set so that the ratio of the image remains correct + + TInt newHeight = + ( layoutSize.iWidth * iconSize.iHeight ) / iconSize.iWidth; + + // If the new height is larger than the height of the layout + // we scale height to maximum and set the width so that the ratio of + // the image remains correct + if ( newHeight > layoutSize.iHeight ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap \ + larger than layout height" ) + layoutSize.iWidth = + ( layoutSize.iHeight * iconSize.iWidth ) / iconSize.iHeight; + } + // If the new height is smaller or the same as the height of the + // layout, the image is scaled according to it + else + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap \ + smaller than layout height" ) + layoutSize.iHeight = newHeight; + } + + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap resize scaled icon" ) + AknIconUtils::SetSize( scalableIcon->Bitmap(), layoutSize ); + + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap duplicate scaled" ) + User::LeaveIfError( bitmap->Duplicate( + scalableIcon->Bitmap()->Handle() ) ); + + CleanupStack::PopAndDestroy( scalableIcon ); + + // Uses scaled icon if scalable bitmap is supported. + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap Show Scaled" ) + delete aBitMapToConvert; + aBitMapToConvert = bitmap; + CleanupStack::Pop( bitmap ); + } + + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap exit" ) + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::GetScalableBitmap +// Handles scalable bitmap +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiActionPerformer::GetScalableBitmap( + CFbsBitmap*& aBitMapToConvert, + const TIconCommand aIconCommand, + TBool& aRequestedIconDisplayed ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap called" ) + + if ( aBitMapToConvert ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap bitmap \ + to convert" ) + // Scale icon + TRAPD( err, GetScalableBitmapL( aBitMapToConvert, aIconCommand ); ); + + if ( KErrNoMemory == err ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap memory \ + low" ) + // Memory low, command is done without icon + delete aBitMapToConvert; + aBitMapToConvert = NULL; + aRequestedIconDisplayed = EFalse; + } + else + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap have \ + memory" ) + aRequestedIconDisplayed = ETrue; + } + } + else + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap no bitmap" ) + // Icon not received + aRequestedIconDisplayed = EFalse; + } + + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap exit" ) + } + +// --------------------------------------------------------- +// CSatUiActionPerformer::GetScalableBitmap +// Handles scalable bitmap +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiActionPerformer::GetScalableBitmap( + CFbsBitmap*& aBitMapToConvert, + const TIconCommand aIconCommand ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap called" ) + + if ( aBitMapToConvert ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap bitmap \ + to convert" ) + // Scale icon + TRAPD( err, GetScalableBitmapL( aBitMapToConvert, aIconCommand ); ); + + if ( KErrNoMemory == err ) + { + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap memory \ + low" ) + // Memory low, command is done without icon + delete aBitMapToConvert; + aBitMapToConvert = NULL; + } + } + + TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap exit" ) + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiApplication.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiApplication.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,86 @@ +/* +* Copyright (c) 2002-2007 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: +* Defines CSatUiApplication class +* +* +*/ + + +// INCLUDE FILES +#include "CSatUiDocument.h" +#include "CSatUiApplication.h" +#include +#include +#include "tflogger.h" + +// ================= MEMBER FUNCTIONS ======================= + +// --------------------------------------------------------- +// CSatUiApplication::AppDllUid +// Returns application UID. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TUid CSatUiApplication::AppDllUid() const + { + TFLOGSTRING( "CSatUiApplication::AppDllUid() called" ) + return KUidSATUI; + } + +// --------------------------------------------------------- +// CSatUiApplication::CreateDocumentL +// Creates the document object. +// (other items were commented in a header). +// --------------------------------------------------------- +// +CApaDocument* CSatUiApplication::CreateDocumentL() + { + TFLOGSTRING( "CSatUiApplication::CreateDocumentL() called" ) + CSatUiDocument* document = new ( ELeave ) CSatUiDocument( *this ); + CleanupStack::PushL( document ); + document->ConstructL(); + CleanupStack::Pop( document ); + TFLOGSTRING( "CSatUiApplication::CreateDocumentL() exit" ) + return( document ); + } + +// ================= OTHER EXPORTED FUNCTIONS ============== + +LOCAL_C CApaApplication* NewApplication() + { + TFLOGSTRING( "NewApplication() called" ) + return new CSatUiApplication; + } + +GLDEF_C TInt E32Main() + { + TFLOGSTRING( "E32Main() called" ) + return EikStart::RunApplication(NewApplication); + } + +// +// --------------------------------------------------------- +// Panic +// The needed panic method. +// Returns: void +// +GLREF_C void Panic( + TEikPanic aPanic) + { + _LIT(KPanicText,"satui.app"); + User::Panic(KPanicText,aPanic); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiDocument.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiDocument.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,66 @@ +/* +* Copyright (c) 2002-2007 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: +* Defines CSatUiDocument class +* +* +*/ + + +// INCLUDE +#include +#include +#include +#include "CSatUiViewAppUi.h" +#include "CSatUiActionPerformer.h" +#include "CSatUiDocument.h" +#include "tflogger.h" + +// ================= MEMBER FUNCTIONS ======================= + +// Symbian OS default constructor can leave. +void CSatUiDocument::ConstructL() + { + TFLOGSTRING( "CSatUiDocument::ConstructL() called" ) + iActionPerformer = CSatUiActionPerformer::NewL(); + TFLOGSTRING( "CSatUiDocument::ConstructL() exit" ) + } + +// Destructor. +CSatUiDocument::~CSatUiDocument() + { + TFLOGSTRING( "CSatUiDocument::~CSatUiDocument called" ) + delete iActionPerformer; + TFLOGSTRING( "CSatUiDocument::~CSatUiDocument exit" ) + } + +// --------------------------------------------------------- +// CSatUiDocument::CreateAppUiL +// Constructs App Ui object. +// (other items were commented in a header). +// --------------------------------------------------------- +// +CEikAppUi* CSatUiDocument::CreateAppUiL() + { + TFLOGSTRING( "CSatUiDocument::CreateAppUiL called" ) + iApplicationUi = new (ELeave) CSatUiViewAppUi; + // Set adapter into SetUpMenu view. + iApplicationUi->SetAdapter( iActionPerformer->Adapter() ); + + iActionPerformer->SetImplementer( iApplicationUi ); + TFLOGSTRING( "CSatUiDocument::CreateAppUiL exit" ) + return iApplicationUi; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiMessageQueryIcon.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiMessageQueryIcon.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,89 @@ +/* +* Copyright (c) 2002-2007 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: +* CPicture derived class. For DisplayText to show icon and text +* +* +*/ + + +// INCLUDE FILES +#include + +#include "CSatUiMessageQueryIcon.h" +#include "tflogger.h" + + +// --------------------------------------------------------- +// CSatUiMessageQueryIcon::CSatUiMessageQueryIcon +// Constructor +// (other items were commented in a header). +// --------------------------------------------------------- +// +CSatUiMessageQueryIcon::CSatUiMessageQueryIcon( TSize aSize, + CFbsBitmap& aBitmap ): + iSizeInTwips( aSize ), + iBitmap( &aBitmap ) + { + } + +// Destructor +CSatUiMessageQueryIcon::~CSatUiMessageQueryIcon() + { + delete iBitmap; + iBitmap = NULL; + } + +// --------------------------------------------------------- +// CSatUiMessageQueryIcon::Draw +// Draw the picture. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiMessageQueryIcon::Draw( CGraphicsContext& aGc, + const TPoint& aTopLeft, const TRect& aClipRect, + MGraphicsDeviceMap* aMap ) const + { + TFLOGSTRING( "CSatUiMessageQueryIcon::Draw called" ) + TRect bitmapRect=aMap->TwipsToPixels( TRect(TPoint(), iSizeInTwips ) ); + bitmapRect.Move( aTopLeft ); + aGc.Reset(); + aGc.SetClippingRect( aClipRect ); + aGc.DrawBitmap( bitmapRect, iBitmap ); + TFLOGSTRING( "CSatUiMessageQueryIcon::Draw exit" ) + } + +// --------------------------------------------------------- +// CSatUiMessageQueryIcon::ExternalizeL +// From CPicture +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiMessageQueryIcon::ExternalizeL( RWriteStream& /*aStream*/ ) const + { + } + +// --------------------------------------------------------- +// CSatUiMessageQueryIcon::GetOriginalSizeInTwips +// Get the picture's size in twips.. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiMessageQueryIcon::GetOriginalSizeInTwips( TSize& aSize ) const + { + TFLOGSTRING( "CSatUiMessageQueryIcon::GetOriginalSizeInTwips called" ) + aSize = iSizeInTwips; + TFLOGSTRING( "CSatUiMessageQueryIcon::GetOriginalSizeInTwips exit" ) + } + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiTextQueryDialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiTextQueryDialog.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,283 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Implements the feature for investigating length of the input. Softkeys +* are set based on this information. +* +* +*/ + + +// INCLUDE FILES +#include +#include +#include // for descriptor arrays +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // Used for FeatureManager + +#include "CSatUiTextQueryDialog.h" +#include "tflogger.h" + +const TInt KSatMinTextLengthForT9 = 1; + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CSatUiTextQueryDialog::CSatUiTextQueryDialog( + TDes& aDataText, + const TTone aTone, + TInt aMinLength, + TInt aMaxLength) : + CAknTextQueryDialog(aDataText, aTone), + iTextMinLength(aMinLength) + { + SetMaxLength( aMaxLength ); + } + +// Destructor. +CSatUiTextQueryDialog::~CSatUiTextQueryDialog() + { + } + +// --------------------------------------------------------- +// CSatUiTextQueryDialog::HandleQueryEditorStateEventL +// Show left CBA only if editor text is valid +// (other items were commented in a header). +// --------------------------------------------------------- +// +TBool CSatUiTextQueryDialog::HandleQueryEditorStateEventL( + CAknQueryControl* aQueryControl, + TQueryControlEvent /*aEventType*/, + TQueryValidationStatus /*aStatus*/) + { + TFLOGSTRING( "CSatUiTextQueryDialog::HandleQueryEditorStateEventL calling" ) + if ( aQueryControl->GetTextLength() < iTextMinLength ) + { + TFLOGSTRING( "CSatUiTextQueryDialog::HandleQueryEditorStateEventL \ + hide softkey" ) + // Hide both left and middle softkey + ButtonGroupContainer().MakeCommandVisibleByPosition( + CEikButtonGroupContainer::ELeftSoftkeyPosition, EFalse ); + ButtonGroupContainer().MakeCommandVisibleByPosition( + CEikButtonGroupContainer::EMiddleSoftkeyPosition, EFalse ); + } + else + { + TFLOGSTRING( "CSatUiTextQueryDialog::HandleQueryEditorStateEventL \ + reveal softkey" ) + // Reveal both left and middle softkey + ButtonGroupContainer().MakeCommandVisibleByPosition( + CEikButtonGroupContainer::ELeftSoftkeyPosition, ETrue ); + ButtonGroupContainer().MakeCommandVisibleByPosition( + CEikButtonGroupContainer::EMiddleSoftkeyPosition, ETrue ); + } + TFLOGSTRING( "CSatUiTextQueryDialog::HandleQueryEditorStateEventL exiting" ) + return ETrue; + } + + +// --------------------------------------------------------- +// CSatUiTextQueryDialog::PostLayoutDynInitL +// Checks if min length was 0 and shows the OK key +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiTextQueryDialog::PostLayoutDynInitL() + { + TFLOGSTRING( "CSatUiTextQueryDialog::PostLayoutDynInitL calling" ) + CAknTextQueryDialog::PostLayoutDynInitL(); + if ( iTextMinLength == 0 ) + { + TFLOGSTRING( "CSatUiTextQueryDialog::PostLayoutDynInitL \ + reveal softkey" ) + // Reveal both left and middle softkey + ButtonGroupContainer().MakeCommandVisibleByPosition( + CEikButtonGroupContainer::ELeftSoftkeyPosition, ETrue ); + ButtonGroupContainer().MakeCommandVisibleByPosition( + CEikButtonGroupContainer::EMiddleSoftkeyPosition, ETrue ); + } + TFLOGSTRING( "CSatUiTextQueryDialog::PostLayoutDynInitL exiting" ) + } + +// --------------------------------------------------------- +// CSatUiTextQueryDialog::PreLayoutDynInitL +// Initializations needed to accept sathidden keymap +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiTextQueryDialog::PreLayoutDynInitL() + { + TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL calling" ) + CAknTextQueryDialog::PreLayoutDynInitL(); + + // Get KFeatureIdAvkonApac value + FeatureManager::InitializeLibL(); + + TBool isApac( FeatureManager::FeatureSupported( KFeatureIdAvkonApac ) ); + + FeatureManager::UnInitializeLib(); + + CAknQueryControl* control = QueryControl(); + + if ( control ) + { + CCoeControl* controlByLayout = NULL; + + if ( EPinLayout == control->QueryType() ) + { + TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \ + EPinLayout" ) + controlByLayout = + QueryControl()->ControlByLayoutOrNull( EPinLayout ); + if ( controlByLayout ) + { + TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \ + controlByLayout" ) + CEikSecretEditor* editor = + ( CEikSecretEditor* ) controlByLayout; + CAknEdwinState* editorState = new(ELeave) CAknEdwinState(); + + editorState->SetFlags( + EAknEditorFlagNoLRNavigation | EAknEditorFlagNoT9 ); + editorState->SetDefaultInputMode( EAknEditorNumericInputMode ); + editorState->SetCurrentInputMode( EAknEditorNumericInputMode ); + editorState->SetPermittedInputModes( + EAknEditorNumericInputMode ); + editorState->SetDefaultCase( EAknEditorLowerCase ); + editorState->SetCurrentCase( EAknEditorLowerCase ); + editorState->SetPermittedCases( + EAknEditorLowerCase|EAknEditorUpperCase ); + editorState->SetSpecialCharacterTableResourceId( 0 ); + editorState->SetNumericKeymap( + EAknEditorSATHiddenNumberModeKeymap ); + editorState->SetObjectProvider( editor ); + + // ............... + MCoeFepAwareTextEditor_Extension1 *ext + = ( MCoeFepAwareTextEditor_Extension1* )editor; + CleanupStack::PushL( ext ); + CleanupStack::PushL( editorState ); + ext->SetStateTransferingOwnershipL( editorState, KNullUid ); + CleanupStack::Pop( editorState ); // editorState + CleanupStack::Pop( ext ); // ext + } + } + else if ( EDataLayout == control->QueryType() ) + { + TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \ + EDataLayout" ) + controlByLayout = + QueryControl()->ControlByLayoutOrNull( EDataLayout ); + if ( controlByLayout ) + { + CEikEdwin* editor = ( CEikEdwin* ) controlByLayout; + if ( !isApac ) + { + if ( KSatMinTextLengthForT9 >= iTextMaxLength ) + { + editor->SetAknEditorFlags( EAknEditorFlagNoT9 ); + } + editor->AddFlagToUserFlags( EEikEdwinNoHorizScrolling ); + editor->AddFlagToUserFlags( EEikEdwinResizable ); + editor->SetAknEditorInputMode( EAknEditorTextInputMode ); + editor->SetAknEditorAllowedInputModes( + EAknEditorTextInputMode ); + } + else + { + TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \ + isApac ETrue" ) + if ( KSatMinTextLengthForT9 >= iTextMaxLength ) + { + editor->SetAknEditorFlags( EAknEditorFlagNoT9 ); + } + else + { + editor->SetAknEditorFlags( 0 ); + } + } + } + } + else if ( EPhoneLayout == control->QueryType() ) + { + TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \ + EPhoneLayout" ) + controlByLayout = + QueryControl()->ControlByLayoutOrNull( EPhoneLayout ); + if ( controlByLayout ) + { + CEikEdwin* editor = ( CEikEdwin* ) controlByLayout; + + if ( !isApac ) + { + editor->AddFlagToUserFlags( EEikEdwinNoHorizScrolling ); + editor->AddFlagToUserFlags( EEikEdwinResizable ); + editor->AddFlagToUserFlags( EEikEdwinAlternativeWrapping ); + } + else + { + TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \ + isApac ETrue" ) + editor->SetAknEditorFlags( 0 ); + } + } + } + } + TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL exiting" ) + } + +// --------------------------------------------------------- +// CSatUiTextQueryDialog::NeedToDismissQueryL +// Checks for hash key (workaround) +// (other items were commented in a header). +// --------------------------------------------------------- +// +TBool CSatUiTextQueryDialog::NeedToDismissQueryL( const TKeyEvent& /* aKeyEvent */ ) + { + TFLOGSTRING( "CSatUiTextQueryDialog::NeedToDismissQueryL calling-exiting" ) + return EFalse; + } + +// --------------------------------------------------------- +// CSatUiTextQueryDialog::OfferKeyEventL +// Hash key accepted (workaround) +// (other items were commented in a header). +// --------------------------------------------------------- +// +TKeyResponse CSatUiTextQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + TFLOGSTRING( "CSatUiTextQueryDialog::OfferKeyEventL calling" ) + TKeyEvent keyEvent = aKeyEvent; + if ( aKeyEvent.iScanCode == EStdKeyHash && aType==EEventKey ) + { + keyEvent.iScanCode = 0; + } + + TFLOGSTRING( "CSatUiTextQueryDialog::OfferKeyEventL exiting" ) + return CAknTextQueryDialog::OfferKeyEventL( keyEvent, aType ); + } + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiView.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiView.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1134 @@ +/* +* Copyright (c) 2002-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: +* Defines CSatUiView class +* +* +*/ + + +// INCLUDE FILES +#include //for CCoeControl class +#include +#include +#include +#include // for descriptor arrays +#include +#include +#include //for Context pane +#include //for iocn bitmap +#include +#include +#include "satui.hrh" +#include +#include +#include +#include +#include +#include +#include +#include // Used for FeatureManager +#include + +#include "CSatUiApplication.h" +#include "CSatUiViewAppUi.h" +#include "CSatUiViewContainer.h" +#include "CSatUiView.h" +#include "tflogger.h" + +// CONSTANTS +// From Ui spec 60 sec delay user response +const TInt KNoResponseFromUserDelay = 60; + +_LIT( KTab, "\t" ); +_LIT( KIconTab, "%d\t" ); +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CSatUiView::CSatUiView( TBool aSetUpMenu, CSatUiViewAppUi* aAppUi, + TBool aEmpty ): + iSetUpMenu( aSetUpMenu ), + iSatUiAppUi( aAppUi ), + iModel( NULL ), + iIconsOn( EFalse ), + iIconStateChange( EFalse ), + iSelfExplanatoryItems( EFalse ), + iListBoxVisible( ETrue ), + iEmpty( aEmpty ) + { + } + +// Symbian OS default constructor can leave. +void CSatUiView::ConstructL() + { + TFLOGSTRING( "CSatUiView::ConstructL() called" ) + + TInt recource( R_SATUI_SELECTITEM_VIEW ); + + if ( iSetUpMenu ) + { + if ( iEmpty ) + { + recource = R_SATUI_EMPTYMENU_VIEW; + } + else + { + recource = R_SATUI_SETUPMENU_VIEW; + } + } + + BaseConstructL( recource ); + + iItemsIconArray = new(ELeave) CAknIconArray( 1 ); + TFLOGSTRING( "CSatUiView::ConstructL() exit" ) + } + +// Two-phased constructor. +CSatUiView* CSatUiView::NewL( TBool aSetUpMenu, + CSatUiViewAppUi* aAppUi, + TBool aEmpty ) + { + TFLOGSTRING( "CSatUiView::NewL called" ) + CSatUiView* self = new ( ELeave ) CSatUiView( aSetUpMenu, aAppUi, aEmpty ); + + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + TFLOGSTRING( "CSatUiView::NewL exit" ) + return self; + } + +// Destructor. +CSatUiView::~CSatUiView() + { + TFLOGSTRING( "CSatUiView::~CSatUiView() called" ) + + delete iContainer; + delete iMenuItemNextActions; + delete iMenuItems; + + if ( iItemsIconArray ) + { + iItemsIconArray->ResetAndDestroy(); + delete iItemsIconArray; + iItemsIconArray = NULL; + } + + TFLOGSTRING( "CSatUiView::~CSatUiView() exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::SetTitle +// Sets the title needed for showing the view. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::SetTitle( const HBufC* aTitle ) + { + TFLOGSTRING( "CSatUiView::SetTitle called" ) + iTitle = aTitle; + TFLOGSTRING( "CSatUiView::SetTitle exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::SetIconL +// Sets the icon needed to the view. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::SetIconL( const CFbsBitmap* aIconBitmap ) + { + TFLOGSTRING( "CSatUiView::SetIconL called" ) + if ( StatusPane()->PaneCapabilities( TUid::Uid( + EEikStatusPaneUidContext ) ).IsPresent() ) + { + TFLOGSTRING( "CSatUiView::SetIconL pane is present" ) + CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane(); + CleanupStack::PushL( sp ); + CAknContextPane* contextPane=( CAknContextPane * )sp-> + ControlL( TUid::Uid( EEikStatusPaneUidContext ) ); + CleanupStack::Pop( sp ); //sp + if ( aIconBitmap ) //icon from SIM + { + TFLOGSTRING( "CSatUiView::SetIconL icon from SIM" ) + contextPane->SetPicture( aIconBitmap ); + } + else //set default icon + { + TFLOGSTRING( "CSatUiView::SetIconL default icon" ) + contextPane->SetPictureToDefaultL(); + } + } + TFLOGSTRING( "CSatUiView::SetIconL exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::SetItemsIconL +// Sets the items icon array. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::SetItemsIconL( + const CAknIconArray* aItemsIconArray, + const TBool aSelfExplanatoryItems ) + { + TFLOGSTRING( "CSatUiView::SetItemsIconL called" ) + iItemsIconArray->ResetAndDestroy(); + //if items icon array available + if ( aItemsIconArray->Count() ) + { + TFLOGSTRING( "CSatUiView::SetItemsIconL icon array available" ) + if( !iIconsOn ) + { + //last view not with icons + iIconStateChange = ETrue; + } + iItemsIconArray->InsertL( 0, &aItemsIconArray->operator[]( 0 ), + aItemsIconArray->Count() ); + iIconsOn = ETrue; + iSelfExplanatoryItems = aSelfExplanatoryItems; + } + else + { + TFLOGSTRING( "CSatUiView::SetItemsIconL icon array not available" ) + if( iIconsOn ) + { + TFLOGSTRING( "CSatUiView::SetItemsIconL iIconsOn true" ) + iIconStateChange = ETrue; + } + else + { + TFLOGSTRING( "CSatUiView::SetItemsIconL iIconsOn false" ) + iIconStateChange = EFalse; + } + iIconsOn = EFalse; + iSelfExplanatoryItems = EFalse; + } + TFLOGSTRING( "CSatUiView::SetItemsIconL exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::SetItemsL +// Sets all parameters needed for showing the view. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiView::SetItemsL( + HBufC* aTitle, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TBool aHelpIsAvailable ) + { + TFLOGSTRING( "CSatUiView::SetItemsL called" ) + iKeypadBlocked = EFalse; + + delete iMenuItemNextActions; + iMenuItemNextActions = NULL; + + if( !iMenuItems ) + { + iMenuItems = new ( ELeave ) CDesCArrayFlat( 1 ); + } + // This reset is required + iMenuItems->Reset(); + + // Remove NULL characters from title + TPtr titleptr = aTitle->Des(); + TInt nullLocation; + while ( ( nullLocation = titleptr.Locate( NULL ) ) >= 0 ) + { + titleptr.Delete( nullLocation, 1 ); + } + + iTitle = aTitle; + + //no memory is allocated to the array buffers here: + iMenuItemNextActions = new ( ELeave ) CArrayFixFlat( 1 ); + + iNItems = aMenuItems.MdcaCount(); + + TBool nextActions( EFalse ); + + TFLOGSTRING2( "CSatUiView::SetItemsL, iNItems: %d", iNItems ) + if ( iNItems == ( aMenuItemNextActions->Count() ) ) + { + nextActions = ETrue; + } + + if (iNItems > 0) + { + for ( TInt i(0); i < iNItems; i++ ) + { + TInt itemLength = aMenuItems.MdcaPoint(i).Length(); + HBufC* tmpBuf = HBufC::NewLC( + aMenuItems.MdcaPoint(i).Length() + KTabLength ); + TPtr tmpPtr( tmpBuf->Des() ); + + // Item text + TPtrC16 text ( aMenuItems.MdcaPoint(i) ); + + // Needed for NULL check + HBufC* correctText = HBufC::NewLC( itemLength ); + TPtr ptr = correctText->Des(); + + // Check item text through + for ( TInt j(0); j < itemLength; j++) + { + TChar ch = text[j]; + // Remove NULL characters from item text + if ( ch ) + { + ptr.Append( ch ); + } + } + + //if view includes icons + if( iIconsOn ) + { + TFLOGSTRING( "CSatUiView::SetItemsL iIconsOn true" ) + //with icons + TBuf lineTab; + lineTab.Format( KIconTab,i ); + tmpPtr.Copy( lineTab ); + } + else + { + TFLOGSTRING( "CSatUiView::SetItemsL iIconsOn false" ) + //without icons + tmpPtr.Copy( KTab ); + } + + if( !iSelfExplanatoryItems ) + { + //icons not selfexplanatory show text + tmpPtr.Append( ptr ); + } + + //memory is allocated here: + TRAPD( err, iMenuItems->AppendL(tmpPtr) ); + + if ( err ) + { + iMenuItems->Reset(); + iMenuItemNextActions->Reset(); + CleanupStack::PopAndDestroy( correctText ); + CleanupStack::PopAndDestroy( tmpBuf ); //tmpBuf, correctText + TFLOGSTRING( "CSatUiView::SetItemsL having error" ) + return ESatFailure; + } + TFLOGSTRING2( "CSatUiView::SetItemsL tmpPtr=%S", &tmpPtr ) + CleanupStack::PopAndDestroy( correctText ); + CleanupStack::PopAndDestroy( tmpBuf ); //tmpBuf, correctText + //select options menu command + if ( nextActions ) + { + TRAP( err, iMenuItemNextActions->AppendL( + aMenuItemNextActions->At( i ) ) ); + + if ( err ) + { + iMenuItems->Reset(); + iMenuItemNextActions->Reset(); + TFLOGSTRING( "CSatUiView::SetItemsL return ESatFailure" ) + return ESatFailure; + } + } + } + } + + iHelpIsAvailable = aHelpIsAvailable; + + TFLOGSTRING( "CSatUiView::SetItemsL return ESatSuccess" ) + return ESatSuccess; + } + +// --------------------------------------------------------- +// CSatUiView::SetUpMenuL +// Checks whether the same view should be refreshed or another +// one activated and do it. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiView::SetUpMenuL( + HBufC* aTitle, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TBool aHelpIsAvailable ) + { + TFLOGSTRING( "CSatUiView::SetUpMenuL called" ) + iDefaultItem = 0; //could be iSelection + + CSatUiView* setUpMenuView = STATIC_CAST( CSatUiView*, + AppUi()->View( KSetUpMenuViewId ) ); + + TVwsViewId setUpMenuViewId( KUidSATUI, KSetUpMenuViewId ); + TVwsViewId viewId; + + AppUi()->GetActiveViewId( viewId ); + + setUpMenuView->SetItemsL( aTitle, aMenuItems, aMenuItemNextActions, + aHelpIsAvailable ); + + // Incase empty view is created before the actual SetUpMenu view + // CBA resource has to be updated + if ( iEmpty ) + { + TFLOGSTRING( "CSatUiView::SetUpMenuL empty view" ) + iEmpty = EFalse; + CEikButtonGroupContainer* cba = Cba(); + + if ( cba ) + { + TFLOGSTRING( "CSatUiView::SetUpMenuL cba" ) + cba->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_EXIT ); + cba->DrawDeferred(); + } + } + + if ( viewId.iAppUid == setUpMenuViewId.iAppUid ) + { + TFLOGSTRING( "CSatUiView::SetUpMenuL activate SetUpMenuView" ) + //Activate SetUpMenuView + AppUi()->ActivateLocalViewL( KSetUpMenuViewId ); + + if ( iContainer ) + { + RefreshL(); + } + } + TFLOGSTRING( "CSatUiView::SetUpMenuL return ESatSuccess" ) + return ESatSuccess; + } + +// --------------------------------------------------------- +// CSatUiView::SetAdapter +// Sets a pointer to MSatUiAdapter provided by SatCli. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::SetAdapter( MSatUiAdapter* aAdapter ) + { + TFLOGSTRING( "CSatUiView::SetAdapter called" ) + iAdapter = aAdapter; + TFLOGSTRING( "CSatUiView::SetAdapter exit" ) + } + +// --------------------------------------------------------- +// CSatUiSelectItemView::SelectItemL +// Checks whether the same view should be refreshed or another +// one activated and do it. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiView::SelectItemL( + HBufC* aTitle, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TInt aDefaultItem, TUint8& aSelection, + const TBool aHelpIsAvailable ) + { + TFLOGSTRING( "CSatUiView::SelectItemL called" ) + iDefaultItem = aDefaultItem; + TFLOGSTRING2( "CSatUiView::SelectItemL in aDefaultItem = %d", aDefaultItem ) + CSatUiView* selectItemView = STATIC_CAST( CSatUiView*, + AppUi()->View( KSelectItemViewId ) ); + + TVwsViewId selectItemViewId( KUidSATUI,KSelectItemViewId ); + TVwsViewId viewId; + + AppUi()->GetActiveViewId( viewId ); + + selectItemView->SetItemsL( aTitle, aMenuItems, aMenuItemNextActions, + aHelpIsAvailable); + + if ( viewId.iAppUid == selectItemViewId.iAppUid ) + { + TFLOGSTRING( "CSatUiView::SelectItemL activate SelectItemview" ) + //Activate SelectItemview + AppUi()->ActivateLocalViewL( KSelectItemViewId ); + + if ( iContainer ) + { + RefreshL(); + } + } + + iResponse = ESatSuccess; + + iNoResponseFromUserAfterDelay = EFalse; + + //activitymanager for wait user actions + CUserActivityManager* activityManager = + CUserActivityManager::NewL( EPriorityNormal ); + + CleanupStack::PushL( activityManager ); + + User::ResetInactivityTime(); + activityManager->Start( TTimeIntervalSeconds( KNoResponseFromUserDelay ), + TCallBack( DispatchUserInactive, this ), 0 ); + + if ( !iWait.IsStarted() ) + { + TFLOGSTRING( "CSatUiView::SelectItemL start iWait" ) + iSatUiAppUi->DispatchTimer( iWait ); + iWait.Start(); + } + + CleanupStack::PopAndDestroy( activityManager ); // activityManager + + if ( iNoResponseFromUserAfterDelay ) + { + iResponse = ESatNoResponseFromUser; + } + + aSelection= STATIC_CAST(TUint8,iSelection); + TFLOGSTRING2( "CSatUiView::SelectItemL out aDefaultItem = %d", aDefaultItem ) + TFLOGSTRING2( "CSatUiView::SelectItemL exit, return: %d", iResponse ) + return iResponse; + } + +// --------------------------------------------------------- +// CSatUiView::Id +// Returns the id of the view. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TUid CSatUiView::Id() const + { + TFLOGSTRING( "CSatUiView::Id() called" ) + //this should be an UID. + if ( iSetUpMenu ) + { + TFLOGSTRING( "CSatUiView::Id() setupmenu-exit" ) + return KSetUpMenuViewId; + } + else + { + TFLOGSTRING( "CSatUiView::Id() selectitem-exit" ) + return KSelectItemViewId; + } + } + +// --------------------------------------------------------- +// CSatUiView::HandleCommandL +// Called by the UI framework when a command has been issued. +// A command can originate by pressing a softkey or +// by selection of the options menu item. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::HandleCommandL( + TInt aCommandId) + { + TFLOGSTRING( "CSatUiView::HandleCommandL called" ) + if ( iKeypadBlocked || ( EAknSoftkeyEmpty == aCommandId ) ) + { + return; + } + + TFLOGSTRING2( "CSatUiView::HandleCommandL iNItems: %d", iNItems ) + if ( iNItems > 0 ) + { + iSelection = iContainer->ListBox()->CurrentItemIndex(); + } + + TBool taskSwapper ( EFalse ); + + TFLOGSTRING2( "CSatUiView::HandleCommandL aCommandId: %d", aCommandId ) + switch ( aCommandId ) + { + case ESatUiCmdSelect: + { + iSatUiAppUi->HelpStatus( EFalse ); + + if ( iSetUpMenu ) + { + TFLOGSTRING( "CSatUiView::HandleCommandL setupmenu" ) + iSatUiAppUi->ShowWaitNoteL(); + iAdapter->MenuSelection( iSelection, EFalse ); + } + else + { + TFLOGSTRING( "CSatUiView::HandleCommandL others" ) + iResponse = ESatSuccess; + iWait.AsyncStop(); + } + break; + } + + case EAknSoftkeyBack: + { + iResponse = ESatBackwardModeRequestedByUser; + iWait.AsyncStop(); + break; + } + + case EAknSoftkeyExit: + case EEikCmdExit: + { + AknSelectionService::HandleMarkableListProcessCommandL( + EAknCmdExit, iContainer->ListBox() ); + STATIC_CAST( CSatUiViewAppUi*, + AppUi())->HandleCommandL( EEikCmdExit ); + break; + } + case ESatUiCmdExit: + { + TFLOGSTRING( "CSatUiView::HandleCommandL ESatUiCmdExit" ) + iResponse = ESatSessionTerminatedByUser; + if ( iWait.IsStarted() ) + { + iWait.AsyncStop(); + TFLOGSTRING( "CSatUiView::HandleCommandL iWait stopped" ) + } + break; + } + case EAknCmdHelp: + if ( iHelpIsAvailable ) + { + TFLOGSTRING( "CSatUiView::HandleCommandL help available" ) + iSatUiAppUi->HelpStatus( ETrue ); + + if ( iSetUpMenu ) + { + TFLOGSTRING( "CSatUiView::HandleCommandL setupmenu" ) + iAdapter->MenuSelection( iSelection, ETrue ); + } + else + { + TFLOGSTRING( "CSatUiView::HandleCommandL others" ) + iResponse = EHelpRequestedByUser; + iWait.AsyncStop(); + } + } + else + { + TFLOGSTRING( "CSatUiView::HandleCommandL help not available" ) + // Show Help + STATIC_CAST( CSatUiViewAppUi*, + AppUi())->HandleCommandL( EAknCmdHelp ); + } + break; + case EAknCmdTaskSwapper: + { + taskSwapper = ETrue; + break; + } + default: + break; + } + + if ( ( ( iNItems > 0 )) && ( iContainer->ListBox()->ScrollBarFrame() ) ) + { + iContainer->ListBox()->ScrollBarFrame()->MoveVertThumbTo( + iSelection ); + } + + if ( ( ( EAknCmdHelp == aCommandId ) && !iHelpIsAvailable ) || taskSwapper ) + { + TFLOGSTRING( "CSatUiView::HandleCommandL iKeypadBlocked false" ) + iKeypadBlocked = EFalse; + } + else + { + TFLOGSTRING( "CSatUiView::HandleCommandL iKeypadBlocked true" ) + iKeypadBlocked = ETrue; + } + + TFLOGSTRING( "CSatUiView::HandleCommandL exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::DynInitMenuPaneL +// Update the options menu when opened. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::DynInitMenuPaneL( + TInt aResourceId, + CEikMenuPane* aMenuPane ) + { + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL called" ) + if (( aResourceId == R_SATUI_SETUPMENU_OPTIONS_MENU ) || + ( aResourceId == R_SATUI_SELECTITEM_OPTIONS_MENU ) ) + { + + FeatureManager::InitializeLibL(); + + if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) + { + aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); + } + + FeatureManager::UnInitializeLib(); + + TInt nItems( aMenuPane->NumberOfItemsInPane() ); + + TFLOGSTRING2( "CSatUiView::DynInitMenuPaneL nItems: %d", nItems ) + if ( nItems > 0 ) //number of items in the options menu + { + TFLOGSTRING2( "CSatUiView::DynInitMenuPaneL iNItems: %d", \ + iNItems ) + if ( iNItems > 0 ) //number of items in the main pane + { + TInt sItem = iContainer->ListBox()->CurrentItemIndex(); + TFLOGSTRING2( "CSatUiView::DynInitMenuPaneL sItem: %d", sItem ) + HBufC* menuItemNextActions; + TInt resource( R_QTN_SAT_OPTION_SELECT ); + + if ( iMenuItems->MdcaCount() == + iMenuItemNextActions->Count() ) + { + switch ( ( *iMenuItemNextActions )[ sItem ] ) + { + case ESatSetUpCallAction: + { + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \ + setupcall" ) + resource = R_QTN_SAT_OPTION_CALL; + break; + } + case ESatSendSsAction: // flow through + case ESatSendUssdAction: // flow through + case ESatSendSmAction: + { + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \ + sendss,sendussd or sendsm" ) + resource = R_QTN_SAT_OPTION_SEND; + break; + } + case ESatPlayToneAction: + { + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \ + playtone" ) + resource = R_QTN_SAT_OPTION_PLAY_TONE; + break; + } + case ESatDisplayTextAction: + { + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \ + displaytext" ) + resource = R_QTN_SAT_OPTION_READ; + break; + } + case ESatSetUpMenuAction: + case ESatSelectItemAction: + { + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \ + setupmenu or selectitem" ) + resource = R_QTN_SAT_OPTION_OPEN; + break; + } + case ESatLaunchBrowserAction: + { + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \ + launchbrowser" ) + resource = R_QTN_SAT_OPTION_GOTO; + break; + } + default: + { + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \ + others" ) + resource = R_QTN_SAT_OPTION_SELECT; + break; + } + } + } + menuItemNextActions = StringLoader::LoadLC( + resource, iCoeEnv ); + aMenuPane->SetItemTextL( ESatUiCmdSelect, + *menuItemNextActions ); + aMenuPane->SetItemSpecific( ESatUiCmdSelect, ETrue ); + // menuItemNextActions + CleanupStack::PopAndDestroy( menuItemNextActions ); + } + else + { + aMenuPane->SetItemDimmed( ESatUiCmdSelect, ETrue ); + aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); + } + } + } + TFLOGSTRING( "CSatUiView::DynInitMenuPaneL exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::HandleListBoxEventL +// Handles events that occur by selection of the menu item. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::HandleListBoxEventL( + CEikListBox* /*aListBox*/, + TListBoxEvent aEventType) + { + TFLOGSTRING( "CSatUiView::HandleListBoxEventL called" ) + + if ( iKeypadBlocked || + ( EEventEnterKeyPressed != aEventType && + EEventItemSingleClicked != aEventType ) ) + { + return; + } + + TFLOGSTRING2( "CSatUiView::HandleListBoxEventL aEventType: %d", \ + aEventType ) + switch ( aEventType ) + { + case EEventItemSingleClicked: + case EEventEnterKeyPressed: + + iSatUiAppUi->HelpStatus( EFalse ); + + if ( iNItems > 0 ) + { + iSelection = iContainer->ListBox()->CurrentItemIndex(); + } + + if ( iSetUpMenu ) + { + TFLOGSTRING( "CSatUiView::HandleListBoxEventL setupmenu" ) + iSatUiAppUi->ShowWaitNoteL(); + iAdapter->MenuSelection( iSelection, EFalse ); + } + else + { + TFLOGSTRING( "CSatUiView::HandleListBoxEventL others" ) + iResponse = ESatSuccess; + + iWait.AsyncStop(); + } + break; + + default: + break; + } + + iKeypadBlocked = ETrue; + + TFLOGSTRING( "CSatUiView::HandleListBoxEventL exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::DoActivateL +// Called by the view framework when this view is activated. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::DoActivateL( + const TVwsViewId& PrevViewId, + TUid /*aCustomMessageId*/, + const TDesC8& /*aCustomMessage*/) + { + TFLOGSTRING( "CSatUiView::DoActivateL called" ) + + TVwsViewId viewId; + AppUi()->GetActiveViewId( viewId ); + + if ( ( viewId == PrevViewId ) && ( !iIconStateChange ) ) + { + TFLOGSTRING( "CSatUiView::DoActivateL refresh" ) + //if selectitems and icon state changed + RefreshL(); + } + else + { + TFLOGSTRING( "CSatUiView::DoActivateL draw" ) + iContainer = CSatUiViewContainer::NewL( iIconsOn, this ); + + iContainer->SetMopParent( this ); + iContainer->ListBox()->SetListBoxObserver( this ); + + iModel = STATIC_CAST( CTextListBoxModel*, + iContainer->ListBox()->Model() ); + + if ( !iMenuItems ) + { + //no memory is allocated to the array buffers here: + iMenuItems = new (ELeave) CDesCArrayFlat(1); + iMenuItemNextActions = new (ELeave) CArrayFixFlat( 1 ); + } + + iRect = ClientRect(); + + AppUi()->AddToStackL( iContainer ); + + DrawL(); + } + TFLOGSTRING( "CSatUiView::DoActivateL exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::DoDeactivateL +// Called by the view framework when this view is deactivated. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::DoDeactivate() + { + TFLOGSTRING( "CSatUiView::DoDeactivate() called" ) + if ( iContainer ) + { + TFLOGSTRING( "CSatUiView::DoActivateL iContainer" ) + AppUi()->RemoveFromStack( iContainer ); + delete iContainer; + iContainer = NULL; + } + TFLOGSTRING( "CSatUiView::DoDeactivate() exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::MakeListBoxVisible +// Hides and makes list box visible if needed. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::MakeListBoxVisible( TBool aVisible ) + { + + TFLOGSTRING( "CSatUiView::MakeListBoxVisible() called" ) + iListBoxVisible = aVisible; + TFLOGSTRING( "CSatUiView::MakeListBoxVisible() exit" ) + + } + +// --------------------------------------------------------- +// CSatUiView::RefreshL +// Called by SetUpMenuL and SelectItemL when view is the same but +// data is changed. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::RefreshL() + { + TFLOGSTRING( "CSatUiView::RefreshL() called" ) + if ( !iIconStateChange ) + { + TFLOGSTRING( "CSatUiView::RefreshL() iIconStateChange false" ) + iRect = ClientRect(); + DrawL(); + } + else + { + TFLOGSTRING( "CSatUiView::RefreshL() iIconStateChange true" ) + //deactivate last selectitem view with other icon state + DoDeactivate(); + + iContainer = CSatUiViewContainer::NewL( iIconsOn, this ); + + iContainer->SetMopParent( this ); + iContainer->ListBox()->SetListBoxObserver( this ); + + iModel = STATIC_CAST( CTextListBoxModel*, + iContainer->ListBox()->Model() ); + + if ( !iMenuItems ) + { + //no memory is allocated to the array buffers here: + iMenuItems = new ( ELeave ) CDesCArrayFlat(1); + iMenuItemNextActions = new ( ELeave ) CArrayFixFlat( 1 ); + } + + iRect = ClientRect(); + + AppUi()->AddToStackL( iContainer ); + + DrawL(); + } + TFLOGSTRING( "CSatUiView::RefreshL() exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::DrawL +// Called by DoActivateL and RefreshL to draw the view. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::DrawL() + { + TFLOGSTRING( "CSatUiView::DrawL() called" ) + + if ( iContainer ) + { + TFLOGSTRING( "CSatUiView::DrawL make ListBox visible" ) + iContainer->ListBox()->MakeVisible( iListBoxVisible ); + } + + if ( ( iTitle ) && ( StatusPane()->PaneCapabilities( TUid::Uid( + EEikStatusPaneUidTitle ) ).IsPresent() ) + && iListBoxVisible ) + { + TFLOGSTRING( "CSatUiView::DrawL set title pane" ) + CAknTitlePane* titlePane = STATIC_CAST( CAknTitlePane*, + StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); + titlePane->SetTextL( *iTitle ); + titlePane->DrawNow(); + } + + if( iIconsOn ) + { + TFLOGSTRING( "CSatUiView::DrawL set icons" ) + //set icons to view + CAknIconArray* itemIconsArray = new( ELeave ) CAknIconArray(1); + CleanupStack::PushL( itemIconsArray ); + itemIconsArray->InsertL( 0, &iItemsIconArray->operator[]( 0 ), + iItemsIconArray->Count() ); + iContainer->ListBox()->ItemDrawer()->ColumnData()-> + SetIconArray( itemIconsArray ); + CleanupStack::Pop( itemIconsArray ); + iItemsIconArray->Reset(); + } + + iModel->SetItemTextArray( iMenuItems ); + iModel->SetOwnershipType( ELbmDoesNotOwnItemArray ); + + iContainer->MakeVisible( ETrue ); + iContainer->SetRect( iRect ); + iContainer->ActivateL(); + + if ( iSetUpMenu ) + { + TFLOGSTRING( "CSatUiView::DrawL() SetupMenu" ) + UpdateMskL( 0, ETrue ); // SetupMenu starts at beginning + } + else + { + TFLOGSTRING( "CSatUiView::DrawL() others" ) + UpdateMskL( iDefaultItem, ETrue ); // SelectItem may have default item + } + iContainer->ListBox()->SetCurrentItemIndex( iDefaultItem ); + iContainer->ListBox()->DrawNow(); + TFLOGSTRING2( "CSatUiView::DrawL() iDefaultItem=%d", iDefaultItem ) + TFLOGSTRING( "CSatUiView::DrawL() exit" ) + } + +// --------------------------------------------------------- +// CSatUiView::DispatchUserInactive +// Called when user has been inactive for a pre-defined time period +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CSatUiView::DispatchUserInactive( TAny* aPtr ) + { + TFLOGSTRING( "CSatUiView::DispatchUserInactive called-exit" ) + if ( ( ( CSatUiView* )aPtr )->iWait.IsStarted() ) + { + ( ( CSatUiView* )aPtr )->iNoResponseFromUserAfterDelay = ETrue; + ( ( CSatUiView* )aPtr )->iWait.AsyncStop(); + } + return ( EFalse ); + } + + +// --------------------------------------------------------- +// CSatUiView::UpdateMskL +// Updates the middle soft key +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiView::UpdateMskL( TInt aIndex, TBool aNew ) + { + TFLOGSTRING( "CSatUiView::UpdateMskL() enter" ) + CEikButtonGroupContainer* cba = Cba(); + + if ( cba && ( aNew || ( iMenuItems->MdcaCount() == + iMenuItemNextActions->Count() ) ) ) + { + TInt resource ( R_QTN_MSK_SELECT ); + TInt commandId ( ESatUiCmdSelect ); + + if ( iEmpty ) + { + TFLOGSTRING( "CSatUiView::UpdateMskL iEmpty" ) + resource = R_TEXT_SOFTKEY_EMPTY; + commandId = EAknSoftkeyEmpty; + } + else if ( iMenuItems->MdcaCount() == + iMenuItemNextActions->Count() && iNItems ) + { + switch ( ( *iMenuItemNextActions )[ aIndex ] ) + { + case ESatSetUpCallAction: + { + TFLOGSTRING( "CSatUiView::UpdateMskL \ + setupcall" ) + resource = R_QTN_MSK_CALL_SAT; + break; + } + case ESatSendSsAction: // flow through + case ESatSendUssdAction: // flow through + case ESatSendSmAction: + { + TFLOGSTRING( "CSatUiView::UpdateMskL \ + sendss,sendussd or sendsm" ) + resource = R_QTN_MSK_SEND; + break; + } + case ESatPlayToneAction: + { + TFLOGSTRING( "CSatUiView::UpdateMskL \ + playtone" ) + resource = R_QTN_MSK_PLAY; + break; + } + case ESatDisplayTextAction: + { + TFLOGSTRING( "CSatUiView::UpdateMskL \ + displaytext" ) + resource = R_QTN_MSK_READ_SAT; + break; + } + case ESatSetUpMenuAction: + case ESatSelectItemAction: + { + TFLOGSTRING( "CSatUiView::UpdateMskL \ + setupmenu or selectitem" ) + resource = R_QTN_MSK_OPEN; + break; + } + case ESatLaunchBrowserAction: + { + TFLOGSTRING( "CSatUiView::UpdateMskL \ + launchbrowser" ) + resource = R_QTN_MSK_GOTO_SAT; + break; + } + default: + { + TFLOGSTRING( "CSatUiView::UpdateMskL \ + others" ) + resource = R_QTN_MSK_SELECT ; + break; + } + } + TFLOGSTRING2( "CSatUiView::UpdateMskL:aIndex=%d", aIndex ) + } + else // Basic aNew + { + // No need to to do anything here, default values are used + } + + HBufC* msk = StringLoader::LoadLC( resource, iCoeEnv ); + cba->SetCommandL( CEikButtonGroupContainer::EMiddleSoftkeyPosition, + commandId, *msk ); + cba->DrawDeferred(); + CleanupStack::PopAndDestroy( msk ); + } + + TFLOGSTRING( "CSatUiView::UpdateMskL() exit" ) + } + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiViewAppUi.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiViewAppUi.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,3563 @@ +/* +* Copyright (c) 2002-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: +* Implements the application UI and the methods derived from +* MSatUiActionImplementer i.e. showing messages and asking input. +* +* +*/ + + +// INCLUDE FILES +#include +#include // for descriptor arrays +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //DisplayText icon popupform +#include //CEikCaptionedControl +#include //CRichText +#include //CEikRichTextEditor +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "satui.hrh" +#include "CSatUiApplication.h" +#include "CSatUiViewAppUi.h" +#include "CSatUiView.h" +#include "CSatUiTextQueryDialog.h" +#include "CSatUiMessageQueryIcon.h" +#include "CSatUiWaitDialog.h" +#include "tflogger.h" + +#include +#include +#include +#include +#include +#include +#include // Used for FeatureManager +#include // For BT SAP connection state keys. +#include // Used for RProperty +#include + +#include +#include +#include +#include + +#include +#include + + +// CONSTANTS +const TInt KSatActiveProfileOffline = 5; // value from ProfileEngine +const TInt K32TIntMaxValue = 0x7FFFFFFF; +// From UI spec 60 sec delay user response. +const TInt KNoResponseFromUserDelay = 60; +const TInt KMicroSecondsInSecond = 1000000; +const TInt KClearScreenDelay = 3; +const TInt KMicroSecondsInTenthOfSecond = 100000; +const TInt K3Seconds = 3000000; + +// Maximum length for sound file. +const TInt KMaxSoundFileLength = 256; +// Audio sample is repeated indefinitely. +const TInt KSoundPlayerRepeatForever = KMdaRepeatForever; +// Used when dividing some values. Used only for preventing the use of magic +// numbers +const TInt KDivideByEight = 8; + +const TUint8 KGetInputStringMaxSize = 0xEF; + +_LIT( K3Spaces, " " ); // Used for empty title. +const TInt KEmptyTitleLength( 3 ); // Length of empty title. +_LIT( KSatEmptySpace, " " ); // Used for empty item. +_LIT( KSatEmptyDes, "" ); + +const TUint8 KKeyZero = 0x30; +const TUint8 KKeyNine = 0x39; +const TUint8 KHwAsterisk = 0x2a; // In hw scan code value for asterisk + +// The max volume value from settings. +// From TProfileToneSettings.h +const TInt KMaxVolumeFromProfile( 10 ); + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CSatUiViewAppUi::CSatUiViewAppUi(): + iHelp( EFalse ), + iSetUpMenuFirst( ETrue ), + iSelectItemFirst( ETrue ), + iPreviousForeground( EFalse ), + iViewLoopCounter( 0 ), + iDuration( TTimeIntervalMicroSeconds( static_cast( 0 ) ) ), + iReqWSBufferID( KErrNone ) + { + } + +// Symbian OS default constructor can leave. +void CSatUiViewAppUi::ConstructL() + { + TFLOGSTRING( "CSatUiViewAppUi::ConstructL() called" ) + BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible ); + + // Requests Window Server client buffer used by the application to + // be of at least the given size. + iReqWSBufferID = CAknEnv::Static()->RequestWsBuffer( KAknMaxWsBufferSize ); + TFLOGSTRING2( "iReqWSBufferID is %d", iReqWSBufferID ) + + if ( BTSAPActivatedL() ) + { + HBufC* sapText = + iCoeEnv->AllocReadResourceLC( R_QTN_OFFLINE_NOT_POSSIBLE_SAP ); + CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue ); + iForegroundControl = note; + note->ExecuteLD( *sapText ); + iForegroundControl = NULL; + CleanupStack::PopAndDestroy( sapText ); + Exit(); + } + + if ( ProfileState() == KSatActiveProfileOffline ) + { + ShowNotAvailableNoteL(); + Exit(); + } + + + if ( StatusPane()->PaneCapabilities( TUid::Uid( + EEikStatusPaneUidTitle ) ).IsPresent() ) + { + CAknTitlePane* titlePane = STATIC_CAST( CAknTitlePane*, + StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); + titlePane->SetTextL( KNullDesC ); + titlePane->DrawNow(); + } + + TFLOGSTRING( "CSatUiViewAppUi::ConstructL() exit" ) + } + +// Destructor. +CSatUiViewAppUi::~CSatUiViewAppUi() + { + TFLOGSTRING( "CSatUiViewAppUi::~CSatUiViewAppUi() called" ) + this->StopShowWaitNote(); + + delete iTitle; + delete iAppName; + delete iPlayer; + delete iTimer; + + TFLOGSTRING( "CSatUiViewAppUi::~CSatUiViewAppUi() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::CreateEmptyMenuL +// Creates empty menu. This is used in SIM originated commands. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::CreateEmptyMenuL() + { + TFLOGSTRING( "CSatUiViewAppUi::CreateEmptyMenuL() called" ) + + // Create the menu item array with no content. + CDesCArrayFlat* menuItems = new( ELeave ) CDesCArrayFlat( 1 ); + CleanupStack::PushL( menuItems ); + menuItems->Reset(); + menuItems->AppendL( KSatEmptySpace ); + + // Create the empty next action indicator array. + CArrayFixFlat* menuActions = + new( ELeave ) CArrayFixFlat( 1 ); + CleanupStack::PushL( menuActions ); + menuActions->Reset(); + + // Create empty title pane. + HBufC* satTitle = HBufC::NewLC( KEmptyTitleLength ); + satTitle->Des().Append( K3Spaces ); + + iSetUpMenuFirst = EFalse; + iSetUpMenuView = CSatUiView::NewL( ETrue, this, ETrue ); + iSetUpMenuView->SetItemsL( satTitle, + *menuItems, + menuActions, + EFalse ); + + // Hide list box. + iSetUpMenuView->MakeListBoxVisible( EFalse ); + + // Transfer ownership to CAknViewAppUi. + AddViewL( iSetUpMenuView ); + + iSetUpMenuView->SetAdapter( iAdapter ); + iActiveView = KSetUpMenuViewId; + + // satTitle, menuActions, menuItems + CleanupStack::PopAndDestroy( satTitle ); + CleanupStack::PopAndDestroy( menuActions ); + CleanupStack::PopAndDestroy( menuItems ); + TFLOGSTRING( "CSatUiViewAppUi::CreateEmptyMenuL() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::SetAdapter +// Sets the pointer to MSatUiAdapter object. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::SetAdapter( + MSatUiAdapter* aAdapter ) + { + iAdapter = aAdapter; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ShowWaitNoteL +// Displays the wait note. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ShowWaitNoteL() + { + TFLOGSTRING( "CSatUiViewAppUi::ShowWaitNoteL() called" ) + if ( !iWaitNote ) + { + iWaitNote = new(ELeave)CAknWaitDialog( + (REINTERPRET_CAST(CEikDialog**,&iWaitNote))); + iForegroundControl = iWaitNote; + iWaitNote->ExecuteLD( R_SATUI_WAIT_NOTE ); + // iForegroundControl won't be clear until the wait dialog + // closed. It will avoid we lose the chance to set focus for + // the wait dialog when the switch of foreground/background + // happened. + } + TFLOGSTRING( "CSatUiViewAppUi::ShowWaitNoteL() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ShowWaitNoteWithoutDelayL +// Displays the wait note without delay +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ShowWaitNoteWithoutDelayL() + { + TFLOGSTRING( "CSatUiViewAppUi::ShowWaitNoteWithoutDelayL() called" ) + if ( !iWaitNote ) + { + iWaitNote = new(ELeave)CAknWaitDialog( + (REINTERPRET_CAST(CEikDialog**,&iWaitNote)), ETrue ); + iForegroundControl = iWaitNote; + iWaitNote->ExecuteLD( R_SATUI_WAIT_NOTE ); + // iForegroundControl won't be clear until the wait dialog + // closed. It will avoid we lose the chance to set focus for + // the wait dialog when the switch of foreground/background + // happened. + } + TFLOGSTRING( "CSatUiViewAppUi::ShowWaitNoteWithoutDelayL() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::StopShowWaitNote +// Removes the wait note from the screen. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::StopShowWaitNote() + { + TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() called" ) + + if ( iNoteDialog ) + { + iForegroundControl = NULL; + + TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() Closing \ + NoteDialog" ) + delete iNoteDialog; + iNoteDialog = NULL; + } + + if ( iWaitNote ) + { + iForegroundControl = NULL; + + TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() Closing WaitNote" ) + // Process finished. The function was either ExecuteLD or RunLD. + // This function call stops the execution of these function and + // causes the deletion of object + TInt err(0); + TRAP( err, iWaitNote->ProcessFinishedL() ) + TFLOGSTRING2(" 2nd: iWaitNote: %x ", iWaitNote ) + TFLOGSTRING2( "TRAP: %d", err ) + // Delete the object just in case. Seems that above method does not + // delete the object in some cases. e.g in very fast execution + delete iWaitNote; + iWaitNote = NULL; + } + if ( iBipWaitNote ) + { + iForegroundControl = NULL; + + TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() Closing BIP note" ) + delete iBipWaitNote; + iBipWaitNote = NULL; + } + + if ( iPermanentNote ) + { + TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() \ + iPermanentNote cleared" ) + // If iPermanentNote exists until wait note is stopped, + // then dialog has been already removed. + iPermanentNote->ExitSleepingDialog(); + delete iPermanentNote; + iPermanentNote = NULL; + } + + TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::BTSAPActivatedL +// Check that if BT SAP connection activated. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TBool CSatUiViewAppUi::BTSAPActivatedL() + { + + TFLOGSTRING( "CSatUiViewAppUi::BTSAPActivated() called" ) + + TBool isActive( EFalse ); + FeatureManager::InitializeLibL(); + if ( FeatureManager::FeatureSupported( KFeatureIdBtSap ) ) + { + TFLOGSTRING( "BTSAP is supported by ME" ) + TInt status( EBTSapNotConnected ); + TInt err = RProperty::Get( KPSUidBluetoothSapConnectionState, + KBTSapConnectionState, + status ); + + if ( EBTSapNotConnected != status && !err ) + { + TFLOGSTRING( "BTSAP is connected" ) + isActive = ETrue; + } + else + { + TFLOGSTRING3( "BTSAP status %d and error %d", status, err ) + } + } + else + { + TFLOGSTRING( "BTSAP is not supported by ME" ) + } + + FeatureManager::UnInitializeLib(); + TFLOGSTRING( "CSatUiViewAppUi::BTSAPActivated() exit" ) + return isActive; + + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::CoeEnv +// Returns CoeEnv. +// (other items were commented in a header). +// --------------------------------------------------------- +// +CCoeEnv* CSatUiViewAppUi::CoeEnv() + { + return iCoeEnv; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::DisplayTextL +// Displays the text in a note. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::DisplayTextL( + const TDesC& aText, + const TDesC& aSimApplicationName, + CFbsBitmap* aIconBitmapDisplayText, + const TBool aSelfExplanatoryIcon, + const TBool aSustainedText, + const TTimeIntervalSeconds aDuration, + const TBool aWaitUserToClear ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL called" ) + StopShowWaitNote(); + + TSatUiResponse response( ESatSuccess ); + iHighPriorityEvent = EFalse; + + // Indication immediate response TLV for Display Text during MT call, + // if it is immediate response, close dialog, otherwise leave it alone. + iImmediateRsp = aSustainedText; + TFLOGSTRING2( "CSatUiViewAppUi::DisplayTextL immediate rsp: %d", + iImmediateRsp ) + + HBufC* header; + + if ( iHelp ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL iHelp ETrue" ) + header = StringLoader::LoadLC( + R_QTN_SAT_HELP_HEADER, iCoeEnv ); + iHelp = EFalse; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL iHelp EFalse" ) + TFLOGSTRING2( "CSatUiViewAppUi::DisplayTextL length of \ + aSimApplicationName: %d", aSimApplicationName.Length() ) + if ( aSimApplicationName.Length() > 0 ) + { + header = aSimApplicationName.AllocLC(); + } + else + { + //Reads a resource string with memory allocation + header = StringLoader::LoadLC( R_QTN_SAT_MESSAGE_HEADER, iCoeEnv ); + } + } + + // Remove NULL characters from title + RemoveNullCharacters( header ); + + if ( aIconBitmapDisplayText ) + { + //icon available use querydialog + iDisplayTextIconDialog = CAknPopupForm::NewL(); + } + + CUserActivityManager* activityManager = + CUserActivityManager::NewL( EPriorityNormal ); + + CleanupStack::PushL( activityManager ); + + // Duration handling: + // If duration is given use that value for timeout. + TTimeIntervalSeconds duration ( aDuration ); + + // If user is expected to clear shown dialog and + // duration is NOT given use 60s timeout. + if ( aWaitUserToClear && !aDuration.Int() ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL wait user to clear" ) + duration = TTimeIntervalSeconds( KNoResponseFromUserDelay ); + } + // If user is NOT expected to clear shown dialog and + // duration is NOT given use 3s timeout. + else if ( !aDuration.Int() ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL don't wait user \ + to clear" ) + duration = TTimeIntervalSeconds( KClearScreenDelay ); + } + + // If not sustained or Clear after delay requested start timer + if ( !aSustainedText || aDuration.Int() || !aWaitUserToClear ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL No sustained text" ) + TFLOGSTRING2( "CSatUiViewAppUi::DisplayTextL duration: %d", + duration.Int() ) + + // If duration is given start timer which doesn't + // care about user activity. + if ( aDuration.Int() ) + { + CreateCallBackTimerL( duration.Int() * KMicroSecondsInSecond, + DelayCallback ); + } + // Otherwise start timer which takes account user activity. + else + { + User::ResetInactivityTime(); + activityManager->Start( duration, + TCallBack( DispatchUserInactive, this ), 0 ); + } + } + + TInt userResponse; + + if ( aIconBitmapDisplayText ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL have IconBitmap" ) + // Prepare dialog with icon + iDisplayTextIconDialog->SetPopupFormType( EAknQuery ); + iDisplayTextIconDialog->PrepareLC( R_SATUI_MESSAGE_TEXT_ICON ); + iDisplayTextIconDialog->SetTitleL( *header ); + + // Get richtext control + CEikCaptionedControl* capControl = + iDisplayTextIconDialog->GetControlByControlType + ( EEikCtRichTextEditor ); + CCoeControl* coeControl = NULL; + if ( capControl ) + { + coeControl = capControl->iControl; + } + if ( !coeControl ) + { + User::Leave( KErrUnknown ); + } + CEikRichTextEditor* rtxtEditor = + reinterpret_cast( coeControl ); + + if ( !aSelfExplanatoryIcon ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL not \ + SelfExplanatoryIcon" ) + // Not selfexplanatory icon, add text + // Get font + const CFont* logicalFont = AknLayoutUtils::FontFromId( + EAknLogicalFontSecondaryFont ); + + // Extract font information + TFontSpec fontspec = logicalFont->FontSpecInTwips(); + TCharFormat charFormat( fontspec.iTypeface.iName, + fontspec.iHeight ); + + // Make the font to be anti-aliased + TFontStyle style; + style.SetBitmapType( EAntiAliasedGlyphBitmap ); + charFormat.iFontSpec.iFontStyle = style; + + // Set mask (which settings are set) + TCharFormatMask charFormatMask; + charFormatMask.SetAttrib( EAttColor ); + charFormatMask.SetAttrib( EAttFontTypeface ); + charFormatMask.SetAttrib( EAttFontHeight ); + + // Apply settings + rtxtEditor->RichText()->ApplyCharFormatL( + charFormat, charFormatMask, 0, 0 ); + + // One space between icon and text + rtxtEditor->RichText()->InsertL( 0, KSatEmptySpace ); + rtxtEditor->RichText()->InsertL( 1, aText ); + } + + // Count icon size in twips + CWsScreenDevice* device = CCoeEnv::Static()->ScreenDevice(); + TInt width = device->HorizontalPixelsToTwips( + aIconBitmapDisplayText->SizeInPixels().iWidth ); + TInt height = device->VerticalPixelsToTwips( + aIconBitmapDisplayText->SizeInPixels().iHeight ); + TSize twipsSize( width, height ); + + // Create picture + CSatUiMessageQueryIcon* picture = new( ELeave ) + CSatUiMessageQueryIcon( twipsSize, *aIconBitmapDisplayText ); + TPictureHeader pictureHeader; + pictureHeader.iPicture = TSwizzle( picture ); + //Insert picture + rtxtEditor->RichText()->InsertL( 0, pictureHeader ); + //Needed to show whole picture + _LIT( KString, "\f\f\f"); + rtxtEditor->RichText()->InsertL( rtxtEditor->Text()->DocumentLength(), + KString ); + + // Set MSK same as LSK without any text causing the icon drawing + iDisplayTextIconDialog->ButtonGroupContainer().SetCommandL( + CEikButtonGroupContainer::EMiddleSoftkeyPosition, EAknSoftkeyOk, + KSatEmptyDes ); + iForegroundControl = iDisplayTextIconDialog; + userResponse = iDisplayTextIconDialog->RunLD(); + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL don't have IconBitmap" ) + // Dialog without icon + iDisplayTextDialog = new (ELeave) CAknMessageQueryDialog(); + iDisplayTextDialog->PrepareLC( R_SATUI_MESSAGE ); + iDisplayTextDialog->SetMessageTextL( aText ); + iDisplayTextDialog->QueryHeading()->SetTextL( *header ); + + // Set MSK same as LSK without any text causing the icon drawing + iDisplayTextDialog->ButtonGroupContainer().SetCommandL( + CEikButtonGroupContainer::EMiddleSoftkeyPosition, EAknSoftkeyOk, + KSatEmptyDes ); + iForegroundControl = iDisplayTextDialog; + userResponse = iDisplayTextDialog->RunLD(); + } + iForegroundControl = NULL; + + CleanupStack::PopAndDestroy( activityManager ); + CleanupStack::PopAndDestroy( header ); // header,activityManager + // After duration call back timer is destroyed + DestroyCallBackTimer(); + + // If user is not expected to clear message used response is success + // in timeout case. + if ( userResponse + || ( iNoteClearedAfterDelay && !aWaitUserToClear ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL successful response" ) + response = ESatSuccess; + } + else if ( iNoResponseFromUserAfterDelay || + ( aWaitUserToClear && iHighPriorityEvent ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL no user response" ) + // User did not close the text, closed by the timer or MT call + response = ESatNoResponseFromUser; + } + else + { + if ( IsAppShutterRunning() ) + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL satsession \ + terminated by user " ) + response = ESatSessionTerminatedByUser; + iSessionTerminated = ETrue; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL backward \ + requested by user " ) + response = ESatBackwardModeRequestedByUser; + } + } + + if ( iDisplayTextDialog ) + { + iDisplayTextDialog = NULL; + } + if ( iDisplayTextIconDialog ) + { + iDisplayTextIconDialog = NULL; + } + + iNoteClearedAfterDelay = EFalse; + iNoResponseFromUserAfterDelay = EFalse; + + ShowWaitNoteL(); + + TFLOGSTRING2( "CSatUiViewAppUi::DisplayTextL exit, return: %d", response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ClearScreen +// Displays yes/no confirmation query. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ClearScreen() + { + TFLOGSTRING( "CSatUiViewAppUi::ClearScreen() called" ) + + iNoteClearedAfterDelay = ETrue; + CloseDialogs(); + + TFLOGSTRING( "CSatUiViewAppUi::ClearScreen() exit" ) + } +// --------------------------------------------------------- +// CSatUiViewAppUi::GetYesNoL +// Displays yes/no confirmation query. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::GetYesNoL( + const TDesC& aText, + const TSatCharacterSet aCharacterSet, + TChar& aInkey, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory, + TUint& aDuration, + const TBool aImmediateDigitResponse ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL called" ) + TSatUiResponse response( ESatSuccess ); + + StopShowWaitNote(); + + CUserActivityManager* activityManager = + CUserActivityManager::NewL( EPriorityNormal ); + CleanupStack::PushL( activityManager ); + + // Start time for duration + TTime startTime; + iImmediateDigitResponse = aImmediateDigitResponse; + + TFLOGSTRING2( "CSatUiViewAppUi::GetYesNoL duration in 1/10 sec: %d", + aDuration ) + + // If duration is given use that value for timeout. + // Start timer which doesn't care about user activity. + if ( aDuration ) + { + TInt duration ( 0 ); + + TTimeIntervalMicroSeconds max32Bit( + static_cast( K32TIntMaxValue ) ); + TTimeIntervalMicroSeconds durationInTenthOfSeconds( + static_cast( aDuration ) ); + TTimeIntervalMicroSeconds durationInus( + durationInTenthOfSeconds.Int64() * KMicroSecondsInTenthOfSecond ); + + if ( durationInus > max32Bit ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL durationInus bigger \ + than max32Bit" ) + // since timers can only handle 32-bit values, + // let's break the aDuration to smaller bits. + // we break it here to 8 bits to fit in 32-bit value + duration = durationInus.Int64() / KDivideByEight; + iTimerRepeatOn = ETrue; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL durationInus less \ + than max32Bit" ) + duration = durationInus.Int64(); + } + + CreateCallBackTimerL( duration, DelayCallback ); + startTime.HomeTime(); + } + // Otherwise start timer which takes account user activity. + else + { + User::ResetInactivityTime(); + activityManager->Start( + TTimeIntervalSeconds( KNoResponseFromUserDelay ), + TCallBack( DispatchUserInactive, this ), 0 ); + } + + TInt resource( 0 ); + + if ( aIconBitmap ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL iGetYesNoIconDialog" ) + + if ( ESatYesNo == aCharacterSet ) + { + resource = R_SATUI_CONFIRM_YES_NO_QUERY_WITH_ICON; + } + else + { + resource = R_SATUI_IMMEDIATE_DIGIT_NOTE_WITH_ICON; + } + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL iGetYesNoDialog" ) + + if ( ESatYesNo == aCharacterSet ) + { + resource = R_SATUI_CONFIRM_YES_NO_QUERY; + } + else + { + resource = R_SATUI_IMMEDIATE_DIGIT_QUERY; + } + } + + TInt userResponse = RunQueryDialogL( resource , aText, aIconBitmap, + aSelfExplanatory, EAknSoftkeyYes ); + + iImmediateDigitResponse = EFalse; + + // set received immediate digit response + aInkey = iKey; + iKey = 0; + + if ( aDuration ) + { + TTime endTime; + endTime.HomeTime(); + TTimeIntervalMicroSeconds timeDifference( 0 ); + timeDifference = endTime.MicroSecondsFrom( startTime ); + aDuration = timeDifference.Int64() / KMicroSecondsInTenthOfSecond; + + // After duration call back timer is destroyed + DestroyCallBackTimer(); + } + + CleanupStack::PopAndDestroy( activityManager ); + + // Timeout + if ( iNoResponseFromUserAfterDelay ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL no response from user" ) + response = ESatNoResponseFromUser; + } + // Cancel is pressed if immediate digit response without Yes/No + else if ( !userResponse && ESatYesNo != aCharacterSet && !aInkey ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL backward request by user" ) + response = ESatBackwardModeRequestedByUser; + } + // Yes button is used + else if ( userResponse && !aInkey) + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL button used" ) + aInkey = 1; + } + // No button is used + else if ( !aInkey ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL no button used" ) + aInkey = 0; + } + + iNoResponseFromUserAfterDelay = EFalse; + + ShowWaitNoteL(); + + TFLOGSTRING2( "CSatUiViewAppUi::GetYesNoL exit, return: %d", response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::GetInputL +// Displays data query. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::GetInputL( + const TDesC& aText, + const TSatCharacterSet aCharacterSet, + TDes& aInput, + const TInt aMinLength, + const TInt aMaxLength, + const TBool aHideInput, + const TBool aGetInkey, + const CFbsBitmap* aIconBitmapGetInput, + const TBool aSelfExplanatory, + TUint& aDuration ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL called" ) + StopShowWaitNote(); + + TSatUiResponse response( ESatSuccess ); + + TPtrC textPtr( aText ); + + TInt minLength( 0 ); + TInt maxLength( 1 ); + + TFLOGSTRING2( "CSatUiViewAppUi::GetInputL aMinLength %d", aMinLength ) + TFLOGSTRING2( "CSatUiViewAppUi::GetInputL aMaxLength %d", aMaxLength ) + //lint -e{961} else block not needed, minLength initialized. + if ( aMinLength <= KGetInputStringMaxSize && aMinLength > 0 ) + { + minLength = aMinLength; + } + else if ( aMinLength > KGetInputStringMaxSize ) + { + minLength = KGetInputStringMaxSize; + } + + //lint -e{961} else block not needed, maxLength initialized. + if ( aMaxLength < minLength ) + { + maxLength = minLength; + } + else if ( aMaxLength <= KGetInputStringMaxSize && aMaxLength > 1 ) + { + maxLength = aMaxLength; + } + else if ( aMaxLength > KGetInputStringMaxSize ) + { + maxLength = KGetInputStringMaxSize; + } + + HBufC* input = HBufC::NewLC( KGetInputStringMaxSize ); + TPtr inputPtr(input->Des()); + + HBufC* textHolder = NULL; + + TFLOGSTRING2( "CSatUiViewAppUi::GetInputL aInput.Length %d",\ + aInput.Length() ) + + if ( ( aInput.Length() >= minLength ) + && ( aInput.Length() <= maxLength ) ) + { + inputPtr = aInput; + } + + TInt userResponse; + + CUserActivityManager* activityManager = + CUserActivityManager::NewL( EPriorityNormal ); + + CleanupStack::PushL( activityManager ); + + // Start time for timer + TTime startTime; + + // If duration is given use that value for timeout. + // Start timer which doesn't care about user activity. + if ( aDuration && aGetInkey ) + { + TFLOGSTRING2( "CSatUiViewAppUi::GetInputL duration in 1/10 sec: %d", + aDuration ) + + TInt duration ( 0 ); + + TTimeIntervalMicroSeconds max32Bit( + static_cast( K32TIntMaxValue ) ); + TTimeIntervalMicroSeconds durationInTenthOfSeconds( + static_cast( aDuration ) ); + TTimeIntervalMicroSeconds durationInus( + durationInTenthOfSeconds.Int64() * KMicroSecondsInTenthOfSecond ); + + if ( durationInus > max32Bit ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL durationInus bigger \ + than max32Bit" ) + // since timers can only handle 32-bit values, + // let's break the aDuration to smaller bits. + // we break it here to 8 bits to fit in 32-bit value + duration = durationInus.Int64() / KDivideByEight; + iTimerRepeatOn = ETrue; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL durationInus less \ + than max32Bit" ) + duration = durationInus.Int64(); + } + + CreateCallBackTimerL( duration, DelayCallback ); + startTime.HomeTime(); + } + // Otherwise start timer which takes account user activity. + else + { + User::ResetInactivityTime(); + activityManager->Start( + TTimeIntervalSeconds( KNoResponseFromUserDelay ), + TCallBack( DispatchUserInactive, this ), 0 ); + } + + CEikImage* image = new(ELeave) CEikImage; + CleanupStack::PushL( image ); + + if ( aIconBitmapGetInput ) + { + image->SetBitmap( aIconBitmapGetInput ); + + // Create mask for icon bitmap + CFbsBitmap* mask = new(ELeave) CFbsBitmap; + + TSize size = aIconBitmapGetInput->SizeInPixels(); + CleanupStack::PushL( mask ); + MakeGetInputBitmapMask( mask, size ); + + image->SetMask( mask ); + CleanupStack::Pop( mask ); + } + + TInt resource( 0 ); + TInt textResource( 0 ); + // Query dialog + iGetInputDialog = new (ELeave) CSatUiTextQueryDialog( inputPtr, + CAknQueryDialog::ENoTone, minLength, maxLength ); + iForegroundControl = iGetInputDialog; + + if ( aCharacterSet == ESatDigitOnly ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL ESatDigitOnly" ) + if ( aText.Length() == 0 ) + { + if ( aGetInkey ) + { + textResource = R_TEXT_SIMATK_ENTER_NBR; + } + else + { + textResource = R_TEXT_SIMATK_ENTER_NBR_STRING; + } + } + + // Hidden digit as input + if ( aHideInput ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL Hidden digit" ) + if ( aIconBitmapGetInput ) + { + resource = R_SATUI_HIDDEN_NUMBER_QUERY_WITH_LABEL_AND_ICON; + } + else + { + resource = R_SATUI_HIDDEN_NUMBER_QUERY_WITHOUT_LABEL; + } + } + // Normal number query + else + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL normal digit" ) + if ( aIconBitmapGetInput ) + { + resource = R_SATUI_NUMBER_QUERY_WITH_LABEL_AND_ICON; + } + else + { + resource = R_SATUI_NUMBER_QUERY_WITHOUT_LABEL; + } + } + } + + else // ESatCharSmsDefaultAlphabet or ESatCharUcs2Alphabet + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL ESatCharSmsDefaultAlphabet \ + or ESatCharUcs2Alphabet" ) + if ( aText.Length() == 0 ) + { + if ( aGetInkey ) + { + textResource = R_TEXT_SIMATK_ENTER_CHAR; + } + else + { + textResource = R_TEXT_SIMATK_ENTER_CHAR_STRING; + } + } + + if ( !aGetInkey ) + { + iGetInputDialog->SetPredictiveTextInputPermitted( ETrue ); + } + + iGetInputDialog->SetMaxLength( maxLength ); + + if ( aIconBitmapGetInput ) + { + resource = R_SATUI_TEXT_QUERY_WITH_LABEL_AND_ICON; + } + else + { + resource = R_SATUI_TEXT_QUERY_WITHOUT_LABEL; + } + } + + // Read default text if sim doesn't provide text to dialog + if ( aText.Length() == 0 ) + { + // Reads a resource string with memory allocation + // and pushes the string onto the cleanup stack. + textHolder = StringLoader::LoadLC( textResource, iCoeEnv); + textPtr.Set( *textHolder ); + } + + // Icon is used and command is get input + if ( aIconBitmapGetInput ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL icon is used" ) + iGetInputDialog->PrepareLC( resource ); + if ( !aSelfExplanatory ) + { + // Icon is not self-explanatory, show also text + iGetInputDialog->SetPromptL( textPtr ); + } + // Add icon to query + iGetInputDialog->QueryHeading()->SetHeaderImageL( image ); + // Set MSK same as LSK without any text causing the icon drawing + iGetInputDialog->ButtonGroupContainer().SetCommandL( + CEikButtonGroupContainer::EMiddleSoftkeyPosition, EAknSoftkeyOk, + KSatEmptyDes ); + userResponse = iGetInputDialog->RunLD(); + TFLOGSTRING2( "CSatUiViewAppUi::GetInputL userResponse is: %d", + userResponse ) + } + // No icon in use + else + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL icon isn't used" ) + iGetInputDialog->PrepareLC( resource ); + iGetInputDialog->SetPromptL( textPtr ); + // Set MSK same as LSK without any text causing the icon drawing + iGetInputDialog->ButtonGroupContainer().SetCommandL( + CEikButtonGroupContainer::EMiddleSoftkeyPosition, EAknSoftkeyOk, + KSatEmptyDes ); + userResponse = iGetInputDialog->RunLD(); + TFLOGSTRING2( "CSatUiViewAppUi::GetInputL userResponse is: %d", + userResponse ) + } + iForegroundControl = NULL; + + if ( textHolder ) + { + CleanupStack::PopAndDestroy( textHolder ); + } + + if ( aDuration && aGetInkey ) + { + TTime endTime; + endTime.HomeTime(); + TTimeIntervalMicroSeconds timeDifference( 0 ); + timeDifference = endTime.MicroSecondsFrom( startTime ); + aDuration = timeDifference.Int64() / KMicroSecondsInTenthOfSecond; + + // After duration call back timer is destroyed + DestroyCallBackTimer(); + } + + CleanupStack::PopAndDestroy( image ); + CleanupStack::PopAndDestroy( activityManager ); // image, activityManager + iGetInputDialog = NULL; + + if ( iNoResponseFromUserAfterDelay ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL no response from user" ) + response = ESatNoResponseFromUser; + } + else if ( userResponse ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL successful response" ) + if ( inputPtr.Length() ) + { + aInput.Copy( inputPtr ); + } + response = ESatSuccess; + } + else + { + if ( IsAppShutterRunning() ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL satsession \ + terminated by user " ) + response = ESatSessionTerminatedByUser; + iSessionTerminated = ETrue; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::GetInputL backward \ + requested by user " ) + response = ESatBackwardModeRequestedByUser; + } + } + + iNoResponseFromUserAfterDelay = EFalse; + + CleanupStack::PopAndDestroy( input ); // input + + ShowWaitNoteL(); + + TFLOGSTRING2( "CSatUiViewAppUi::GetInputL exit, return: %d", response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::SetUpMenuL +// Sets the parameters for SetUpMenu view and calls the method +// from the CSatUiView class. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::SetUpMenuL( + const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const CFbsBitmap* aIconBitmap, + const CAknIconArray* aItemsIconArray, + const TBool aSelfExplanatoryItems, + const TBool aHelpIsAvailable ) + { + TFLOGSTRING( "CSatUiViewAppUi::SetUpMenuL called" ) + StopShowWaitNote(); + TSatUiResponse response( ESatSuccess ); + + delete iTitle; + iTitle = NULL; + + delete iAppName; + iAppName = NULL; + + TFLOGSTRING2( "CSatUiViewAppUi::SetUpMenuL length of aText %d", \ + aText.Length() ) + if ( aText.Length() > 0 ) + { + iTitle = aText.AllocL(); + iAppName = aText.AllocL(); + } + else + { + //Reads a resource string with memory allocation + iTitle = StringLoader::LoadL( R_QTN_SAT_TITLE, iCoeEnv ); + } + + if ( iSetUpMenuFirst ) + { + iSetUpMenuFirst = EFalse; + iSetUpMenuView = CSatUiView::NewL( ETrue, this, EFalse ); + + // transfer ownership to CAknViewAppUi: + AddViewL( iSetUpMenuView ); + + iSetUpMenuView->SetAdapter( iAdapter ); + } + + // Make list box visible. + iSetUpMenuView->MakeListBoxVisible( ETrue ); + + //set contextpane icon and item icons + iSetUpMenuView->SetIconL( aIconBitmap ); + iSetUpMenuView->SetItemsIconL( aItemsIconArray, aSelfExplanatoryItems ); + iSetUpMenuView->SetTitle( iTitle ); + + response = iSetUpMenuView->SetUpMenuL( iTitle, aMenuItems, + aMenuItemNextActions, aHelpIsAvailable ); + + iActiveView = KSetUpMenuViewId; + + // Reset counter for detecting possible loop in HandleForegroundEventL. + iViewLoopCounter = 0; + + TFLOGSTRING2( "CSatUiViewAppUi::SetUpMenuL exit, return: %d", response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::HandleForegroundEventL +// Called when satui is brought to foreground or put into +// background +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::HandleForegroundEventL( TBool aForeground ) + { + TFLOGSTRING2( "CSatUiViewAppUi::HandleForegroundEventL called \ + value %d", aForeground ) + + iForeground = aForeground; + + // Check whether it is only need to display a dialog. + if ( iForeground && ( iForegroundControl || iCcNote ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleForegroundEventL \ + need to display a dialog" ) + if ( iForegroundControl && ForegroundAlive() ) + { + iForegroundControl->SetFocus( ETrue, EDrawNow ); + } + } + // Check is it allowed to activate local view. + // Removes possibility of view activation loop for example when + // launching Browser. + else if ( ViewActivationAllowed( aForeground, iActiveView ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleForegroundEventL \ + activate local view allowed" ) + TVwsViewId viewId; + GetActiveViewId( viewId ); + TFLOGSTRING2( "CSatUiViewAppUi::HandleForegroundEventL called \ + appUid %x", viewId.iAppUid ) + TFLOGSTRING2( "CSatUiViewAppUi::HandleForegroundEventL called \ + viewUid %x", viewId.iViewUid ) + + if( ( KUidSATUI != viewId.iAppUid ) || + ( ( KUidSATUI == viewId.iAppUid ) + && ( viewId.iViewUid != iActiveView ) ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleForegroundEventL \ + activate local view executing" ) + if ( KSetUpMenuViewId == iActiveView ) + { + ActivateLocalViewL( KSetUpMenuViewId ); + } + else + { + ActivateLocalViewL( KSelectItemViewId ); + } + } + + } + // Forwards event to the base class. + CAknViewAppUi::HandleForegroundEventL( aForeground ); + TFLOGSTRING( "CSatUiViewAppUi::HandleForegroundEventL exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ViewActivationAllowed +// Sets the parameters for SelectItem view and calls the method +// from the CSatUiView class. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TBool CSatUiViewAppUi::ViewActivationAllowed( const TBool aForeground, + const TUid aActiveView ) + { + + TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed called" ) + TBool activationAllowed( EFalse ); + // Value for detecting view activation loop. + const TInt certainViewLoopCount( 6 ); + + // Check for foreground event, background event, + // foreground event, background event, ... sequence. + if ( aForeground ^ iPreviousForeground ) + { + TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed \ + check foreground event" ) + iViewLoopCounter++; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed \ + no foreground event" ) + iViewLoopCounter = 0; + } + + // Store information is application in foreground or + // in background for next evaluation round. + iPreviousForeground = aForeground; + + // Check that there is no loop. + if ( aForeground && aActiveView.iUid ) + { + if ( iViewLoopCounter < certainViewLoopCount ) + { + TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed \ + there are loops" ) + activationAllowed = ETrue; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed \ + no loop" ) + // Counter is reset in case of foreground event + // because of background event does not draw anything. + iViewLoopCounter = 0; + } + + } + + if ( iDisplayTextDialog || iDisplayTextIconDialog ) + { + activationAllowed = EFalse; + } + + TFLOGSTRING2( "CSatUiViewAppUi::ViewActivationAllowed exit, return: %d",\ + activationAllowed ) + return activationAllowed; + + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::SelectItemL +// Sets the parameters for SelectItem view and calls the method +// from the CSatUiView class. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::SelectItemL( + const TDesC& aText, + const MDesCArray& aMenuItems, + const CArrayFixFlat* aMenuItemNextActions, + const TInt aDefaultItem, + TUint8& aSelection, + const CFbsBitmap* aIconBitmap, + const CAknIconArray* aItemsIconArray, + const TBool aSelfExplanatoryItems, + const TBool aHelpIsAvailable ) + { + TFLOGSTRING( "CSatUiViewAppUi::SelectItemL called" ) + StopShowWaitNote(); + + TSatUiResponse response( ESatSuccess ); + + delete iTitle; + iTitle = NULL; + + TFLOGSTRING2( "CSatUiViewAppUi::SelectItemL length of aText %d", + aText.Length() ) + if ( aText.Length() > 0 ) + { + iTitle = aText.AllocL(); + } + else if ( iAppName ) + { + TFLOGSTRING( "CSatUiViewAppUi::SelectItemL there is appname" ) + iTitle = iAppName->AllocL(); + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::SelectItemL read appname" ) + //Reads a resource string with memory allocation + iTitle = StringLoader::LoadL( R_QTN_SAT_TITLE, iCoeEnv ); + } + + if ( iSelectItemFirst ) + { + iSelectItemFirst = EFalse; + iSelectItemView = CSatUiView::NewL( EFalse, this, EFalse ); + + // transfer ownership to CAknViewAppUi: + AddViewL( iSelectItemView ); + } + + iSelectItemPending = ETrue; + iActiveView = KSelectItemViewId; + + //set contextpane icon and item icons + iSelectItemView->SetIconL( aIconBitmap ); + iSelectItemView->SetItemsIconL( aItemsIconArray, aSelfExplanatoryItems ); + response = iSelectItemView->SelectItemL( iTitle, aMenuItems, + aMenuItemNextActions, aDefaultItem, aSelection, aHelpIsAvailable ); + + iSelectItemPending = EFalse; + + if ( iEndKeyPressed ) + { + response = ESatSessionTerminatedByUser; + } + + if ( response != ESatSessionTerminatedByUser ) + { + ShowWaitNoteL(); + } + + TFLOGSTRING2( "CSatUiViewAppUi::SelectItemL exit, return: %d", response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::MatoPrepareComplete +// Indicates success or failure. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::MatoPrepareComplete(TInt aError) + { + TFLOGSTRING( "CSatUiViewAppUi::MatoPrepareComplete called" ) + TFLOGSTRING2( "CSatUiViewAppUi::MatoPrepareComplete error %i", aError ) + if ( KErrNone == aError ) + { + iPlayToneError = ESatSuccess; + + TTimeIntervalMicroSeconds zero( static_cast( 0 ) ); + + iPlayer->SetPriority( KAudioPriorityLowLevel, + STATIC_CAST( TMdaPriorityPreference, KAudioPrefConfirmation ) ); + + iPlayer->SetRepeats( KMdaAudioToneRepeatForever, zero ); + + iPlayer->Play(); + } + else + { + iPlayToneError = ESatFailure; + } + TFLOGSTRING( "CSatUiViewAppUi::MatoPrepareComplete exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::MatoPlayComplete +// Indicates success or failure. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::MatoPlayComplete( TInt aError ) + { + TFLOGSTRING( "CSatUiViewAppUi::MatoPlayComplete calling" ) + if ( KErrNone == aError && iPlayer ) + { + TFLOGSTRING( "CSatUiViewAppUi::MatoPlayComplete play" ) + iPlayer->Play(); + } + else if ( iWait && iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::MatoPlayComplete stop playing" ) + // Stops playing if error. + iWait->AsyncStop(); + } + TFLOGSTRING2( "CSatUiViewAppUi::MatoPlayComplete exit, error %i", aError ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::PlayStandardToneL +// Plays Standard Tone. If needed displays the text in a note +// while playing. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::PlayStandardToneL( + const TDesC& aText, + const TDesC8& aSequence, + TTimeIntervalMicroSeconds aDuration, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) + { + TFLOGSTRING( "CSatUiViewAppUi::PlayStandardToneL called" ) + StopShowWaitNote(); + // Delete timer just in case e.g. if DisplayText was on the screen + DestroyCallBackTimer(); + + iPermanentNote = NULL; + iTimerRepeatOn = EFalse; + + TFLOGSTRING2( "CSatUiViewAppUi::PlayStandardToneL length of aText %i", \ + aText.Length() ) + if (aText.Length() != 0) + { + iPermanentNote = new (ELeave) CAknStaticNoteDialog(); + iPermanentNote->PrepareLC( R_SATUI_PERMANENT_NOTE ); + + if ( ( !aSelfExplanatory ) || ( !aIconBitmap ) ) + { + // Set text + iPermanentNote->SetTextL( aText ); + } + + if ( aIconBitmap ) + { + //Set image + TFLOGSTRING( "CSatUiViewAppUi::PlayStandardToneL SetImage" ) + // Get scalable bitmap if available. + CEikImage* image = new ( ELeave ) CEikImage(); + CleanupStack::PushL( image ); + image->SetBitmap( aIconBitmap ); + iPermanentNote->SetImageL( image ); + CleanupStack::Pop( image ); + } + + iForegroundControl = iPermanentNote; + iPermanentNote->RunLD(); + iPermanentNote->DrawNow(); + iCoeEnv->WsSession().Flush(); + } + + iPlayer = CMdaAudioToneUtility::NewL(*this); + + TInt volume( iPlayer->MaxVolume() ); + iPlayer->SetVolume( volume ); + TFLOGSTRING2( "CSatUiViewAppUi::PlayStandardToneL SetVolume %d", + volume ) + + iPlayer->PrepareToPlayDesSequence( aSequence ); + + TTimeIntervalMicroSeconds max32Bit( + static_cast( K32TIntMaxValue ) ); + + if ( aDuration > max32Bit ) + { + // since timers can only handle 32-bit values, + // let's break the aDuration to smaller bits. + // we break it here to 8 bits to fit in 32-bit value + aDuration = aDuration.Int64() / KDivideByEight; + iTimerRepeatOn = ETrue; + } + + CreateCallBackTimerL( I64INT( aDuration.Int64() ), DelayCallback ); + + if ( !iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::PlayStandardToneL starting iWait" ) + iWait->Start(); + TFLOGSTRING( "CSatUiViewAppUi::PlayStandardToneL strarting done" ) + } + + iPlayer->CancelPlay(); + + DestroyCallBackTimer(); + + delete iPlayer; + iPlayer = NULL; + + if ( iPermanentNote ) + { + iPermanentNote->ExitSleepingDialog(); + delete iPermanentNote; + iPermanentNote = NULL; + } + iForegroundControl = NULL; + + if ( !iEndKeyPressed ) + { + ShowWaitNoteL(); + } + + //get warning and game tones setting from active profile + GetProfileParamsL(); + + if( ( EFalse == iWarningAndPlayTones ) && + ( ESatSuccess == iPlayToneError ) ) + { + iPlayToneError = ESatSuccessToneNotPlayed; + } + + TFLOGSTRING2( "CSatUiViewAppUi::PlayStandardToneL exit,return: %d", \ + iPlayToneError ) + return iPlayToneError; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ConfirmSendL +// Displays a query to get confirmation for Send SMS, +// Send SS or Send USSD command. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::ConfirmSendL( + const TDesC& /* aText */, + TBool& aActionAccepted, + TInt aType) + { + TFLOGSTRING2( "CSatUiViewAppUi::ConfirmSendL called, aType: %d", \ + aType ) + HBufC* textHolder = NULL; + + switch ( aType ) + { + case ESatUiConfirmSendSms: + textHolder = StringLoader::LoadLC( R_TEXT_SIMATK_SEND_SMS, + iCoeEnv ); + break; + case ESatUiConfirmSendSs: + case ESatUiConfirmSendUssd: //the same string for SS and USSD + textHolder = StringLoader::LoadLC( R_TEXT_SIMATK_SEND_SS, + iCoeEnv ); + break; + default: + return ESatFailure; + } + + TInt userResponse = RunQueryDialogL( R_SATUI_CONFIRM_SEND_CANCEL_QUERY, + *textHolder, NULL, EFalse, ESatUiSoftkeySend ); + + TFLOGSTRING2( "CSatUiViewAppUi::ConfirmSendL userResponse: %d", \ + userResponse ) + if ( userResponse ) + { + aActionAccepted = ETrue; + } + else + { + aActionAccepted = EFalse; + } + + if ( textHolder ) + { + CleanupStack::PopAndDestroy( textHolder ); //textHolder + } + + TFLOGSTRING( "CSatUiViewAppUi::ConfirmSendL return ESatSuccess" ) + return ESatSuccess; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ShowSmsWaitNoteL +// Displays a wait note to indicate SMS sending. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ShowSmsWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmapSendSM, + const TBool aSelfExplanatoryIcon ) + { + + TFLOGSTRING( "CSatUiViewAppUi::ShowSmsWaitNoteL called" ) + + iWaitNoteInUse = ETrue; + + TFLOGSTRING2( "CSatUiViewAppUi::ShowSmsWaitNoteL iWaitNote: %d", \ + iWaitNote ) + if ( NULL == iWaitNote ) + { + iWaitNote = new(ELeave) CAknWaitDialog( + ( REINTERPRET_CAST( CEikDialog**, &iWaitNote ) ), ETrue ); + iWaitNote->PrepareLC( R_SATUI_SMS_WAIT_NOTE ); + + if ( ( aText.Length() > 0 ) && ( !aSelfExplanatoryIcon || + !aIconBitmapSendSM ) ) + { + //Set text + TFLOGSTRING( "CSatUiViewAppUi::ShowSmsWaitNoteL SetText" ) + iWaitNote->SetTextL( aText ); + } + + if ( aIconBitmapSendSM ) + { + //Set image + TFLOGSTRING( "CSatUiViewAppUi::ShowSmsWaitNoteL SetImage" ) + CEikImage* image = new ( ELeave ) CEikImage(); + CleanupStack::PushL( image ); + image->SetBitmap( aIconBitmapSendSM ); + iWaitNote->SetImageL( image ); + CleanupStack::Pop( image ); + } + + iForegroundControl = iWaitNote; + iWaitNote->RunLD(); + // iForegroundControl won't be clear until the wait dialog + // closed. It will avoid we lose the chance to set focus for + // the wait dialog when the switch of foreground/background + // happened. + } + + TFLOGSTRING( "CSatUiViewAppUi::ShowSmsWaitNoteL exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ShowSsWaitNoteL +// Displays a wait note to indicate SS sending. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ShowSsWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatoryIcon ) + { + TFLOGSTRING( "CSatUiViewAppUi::ShowSsWaitNoteL called" ) + + iWaitNoteInUse = ETrue; + + TFLOGSTRING2( "CSatUiViewAppUi::ShowSsWaitNoteL iWaitNote: %d", \ + iWaitNote ) + if ( !iWaitNote ) + { + iWaitNote = new ( ELeave ) CSatUiWaitDialog( + ( REINTERPRET_CAST ( CEikDialog**,&iWaitNote ) ), + *iAdapter, ETrue ); + iForegroundControl = iWaitNote; + + TFLOGSTRING2( "CSatUiViewAppUi::ShowSsWaitNoteL length of aText: %d",\ + aText.Length() ) + // if there is an alpha id + if ( aText.Length() > 0 ) + { + // if there is not an icon or it's not self explanatory + if ( ( !aSelfExplanatoryIcon ) || ( !aIconBitmap ) ) + { + iWaitNote->SetTextL( aText ); + } + + if ( aIconBitmap ) + { + //Set image + TFLOGSTRING( "CSatUiViewAppUi::ShowSsWaitNoteL SetImage" ) + CEikImage* image = new ( ELeave ) CEikImage(); + CleanupStack::PushL( image ); + image->SetBitmap( aIconBitmap ); + iWaitNote->SetImageL( image ); + CleanupStack::Pop( image ); + } + + iWaitNote->ExecuteLD( R_SATUI_SS_WAIT_NOTE ); + } + else + { + iWaitNote->ExecuteLD( R_SATUI_REQUESTING_WAIT_NOTE ); + } + // iForegroundControl won't be clear until the wait dialog + // closed. It will avoid we lose the chance to set focus for + // the wait dialog when the switch of foreground/background + // happened. + } + TFLOGSTRING( "CSatUiViewAppUi::ShowSsWaitNoteL exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ShowDtmfWaitNoteL +// Shows a wait note while DTMF are being sent. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::ShowDtmfWaitNoteL( const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatoryIcon ) + { + TFLOGSTRING( "CSatUiViewAppUi::ShowDtmfWaitNoteL called" ) + TSatUiResponse response(ESatFailure); + + iWaitNoteInUse = ETrue; + + TFLOGSTRING2( "CSatUiViewAppUi::ShowDtmfWaitNoteL iWaitNote: %d", \ + iWaitNote ) + if ( !iWaitNote ) + { + iWaitNote = new ( ELeave ) CSatUiWaitDialog( + (REINTERPRET_CAST( CEikDialog**,&iWaitNote ) ), *iAdapter, ETrue ); + + if ( ( aText.Length() > 0 ) && + ( ( !aSelfExplanatoryIcon ) || ( !aIconBitmap ) ) ) + { + iWaitNote->SetTextL( aText ); + } + + if ( aIconBitmap ) + { + //Set image + TFLOGSTRING( "CSatUiViewAppUi::ShowDtmfWaitNoteL SetImage" ) + CEikImage* image = new ( ELeave ) CEikImage(); + CleanupStack::PushL( image ); + image->SetBitmap( aIconBitmap ); + iWaitNote->SetImageL( image ); + CleanupStack::Pop( image ); + } + + iForegroundControl = iWaitNote; + iWaitNote->ExecuteLD( R_SATUI_DTMF_WAIT_NOTE ); + // iForegroundControl won't be clear until the wait dialog + // closed. It will avoid we lose the chance to set focus for + // the wait dialog when the switch of foreground/background + // happened. + response = ESatSuccess; + } + TFLOGSTRING2( "CSatUiViewAppUi::ShowDtmfWaitNoteL exit, return: %d",\ + response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ConfirmRefreshL +// Displays a query to get confirmation Refresh command. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::ConfirmRefreshL(TBool& aActionAccepted) + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmRefreshL called" ) + StopShowWaitNote(); + + TSatUiResponse response( ESatSuccess ); + + HBufC* textHolder = NULL; + + textHolder = StringLoader::LoadLC( R_QTN_SAT_QUERY_ALLOW_RESET, + iCoeEnv ); + + TInt userResponse = RunQueryDialogL( R_SATUI_CONFIRM_OK_CANCEL_QUERY, + *textHolder, NULL, EFalse, EAknSoftkeyOk ); + + TFLOGSTRING2( "CSatUiViewAppUi::ConfirmRefreshL userResponse: %d", \ + userResponse ) + if ( userResponse ) + { + aActionAccepted = ETrue; + } + else + { + aActionAccepted = EFalse; + } + + if ( textHolder ) + { + CleanupStack::PopAndDestroy( textHolder ); //textHolder + } + + ShowWaitNoteL(); + + TFLOGSTRING2( "CSatUiViewAppUi::ConfirmRefreshL exit, return: %d",\ + response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::CallControlL +// Displays info about call control to user +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::CallControlL( + const TDesC& aText, + const TSatAlphaIdStatus aAlphaIdStatus ) + { + TFLOGSTRING( "CSatUiViewAppUi::CallControlL called" ) + + if ( !iCcNote ) + { + iCcNote = CAknGlobalNote::NewL(); + } + iCcNote->SetTone( CAknNoteDialog::ENoTone ); + + if ( ESatAlphaIdNotNull == aAlphaIdStatus ) + { + TFLOGSTRING( "CSatUiViewAppUi::CallControlL AlphaIdNotNull" ) + + // The note will be disabled by the phone UI when the call is + // in connecting status. But call controll case is an exception, So we + // use RAknKeyLock to enable soft notifications. + RAknKeyLock keyLock; + TInt errorCode = keyLock.Connect(); + TFLOGSTRING2( "CSatUiViewAppUi::CallControlL connect error %d", \ + errorCode ) + if ( KErrNone == errorCode ) + { + keyLock.EnableSoftNotifications( ETrue ); + } + keyLock.Close(); + + iCcNote->SetSoftkeys( R_AVKON_SOFTKEYS_OK_EMPTY ); + iCcNoteId = iCcNote->ShowNoteL( + EAknGlobalInformationNote, aText ); + CreateCallBackTimerL( K3Seconds, CloseCallControlNoteL ); + if ( iWait && !iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::CallControlL iWait starting" ) + iWait->Start(); + } + DestroyCallBackTimer(); + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::CallControlL AlphaId Null" ) + iCcNote->ShowNoteL( EAknGlobalInformationNote, aText ); + } + + if ( iCcNote ) + { + delete iCcNote; + iCcNote = NULL; + } + TFLOGSTRING( "CSatUiViewAppUi::CallControlL exit" ) + + return ESatSuccess; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::MoSmControlL +// Displays info about Mo SM control to user +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::MoSmControlL( + const TDesC& aText, + const TSatAlphaIdStatus aAlphaIdStatus ) + { + TFLOGSTRING( "CSatUiViewAppUi::MoSmControlL called" ) + if ( ESatAlphaIdNotNull == aAlphaIdStatus ) + { + TFLOGSTRING( "CSatUiViewAppUi::MoSmControlL AlphaIdNotNull" ) + CAknNoteDialog* dialog = new (ELeave) CAknNoteDialog( + REINTERPRET_CAST( CEikDialog**,&dialog ), + CAknNoteDialog::ENoTone, + CAknNoteDialog::ELongTimeout ); + + dialog->PrepareLC( R_SATUI_MOSM_CONTROL_NOTE ); + + dialog->SetTextL( aText ); + + iForegroundControl = dialog; + dialog->RunLD(); + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::MoSmControlL AlphaId Null" ) + CAknNoteDialog* dialog = new (ELeave) CAknNoteDialog( + REINTERPRET_CAST( CEikDialog**,&dialog ), + CAknNoteDialog::ENoTone, + CAknNoteDialog::ELongTimeout ); + + dialog->PrepareLC( R_SATUI_INFORMATION_NOTE ); + + dialog->SetTextL( aText ); + + iForegroundControl = dialog; + dialog->RunLD(); + } + iForegroundControl = NULL; + TFLOGSTRING( "CSatUiViewAppUi::MoSmControlL exit" ) + return ESatSuccess; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ConfirmLaunchBrowserL +// Displays a query to get confirmation for Launch Browser +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ConfirmLaunchBrowserL( + const TDesC& aText, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmLaunchBrowserL called" ) + + TInt resource( 0 ); + + if ( aIconBitmap ) + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmLaunchBrowserL icon" ) + resource = R_SATUI_CONFIRM_OK_CANCEL_QUERY_WITH_ICON; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmLaunchBrowserL no icon" ) + resource = R_SATUI_CONFIRM_OK_CANCEL_QUERY; + } + + TInt userResponse = RunQueryDialogL( resource, aText, aIconBitmap, + aSelfExplanatory, EAknSoftkeyOk ); + + TFLOGSTRING2( "CSatUiViewAppUi::ConfirmLaunchBrowserL userResponse %d",\ + userResponse ) + if ( userResponse ) + { + aActionAccepted = ETrue; + } + else + { + aActionAccepted = EFalse; + } + + TFLOGSTRING( "CSatUiViewAppUi::ConfirmLaunchBrowserL exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::HandleCommandL +// Called by CSatUiView::HandleCommandL. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::HandleCommandL( + TInt aCommand ) + { + TFLOGSTRING2( "CSatUiViewAppUi::HandleCommandL called, aCommand: %d",\ + aCommand ) + switch ( aCommand ) + { + case EEikCmdExit: + { + HandleExitCommandL(); + break; + } + case EAknCmdHelp: + { + //Show Series 60 Help + HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), + AppHelpContextL() ); + break; + } + default: + break; + } + TFLOGSTRING( "CSatUiViewAppUi::HandleCommandL exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::HandleExitCommandL +// Handling of the exit softkey. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::HandleExitCommandL() + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL called" ) + + if ( iBipWaitNote ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL iBipWaitNote" ) + SetCommandPending( EFalse ); + } + + if ( iWait ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL iWait " ) + if ( iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL \ + iWait->AsyncStop()" ) + iWait->AsyncStop(); + } + } + + CloseDialogs(); + + if ( iEndKeyPressed ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL endkeypressed" ) + // Inform SAT Server that end key has been pressed + iAdapter->SessionTerminated( EEndKeyUsed ); + } + + if ( !iCommandPending ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL !iCommandPending" ) + + if ( iPlayer && EMdaAudioToneUtilityPlaying == iPlayer->State() ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL cancel playtone") + iPlayer->CancelPlay(); + } + + if ( iAudioPlayer ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL cancel \ + userselected tone" ) + iAudioPlayer->Stop(); + delete iAudioPlayer; + iAudioPlayer = NULL; + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL\ + iAudioPlayer deleted" ) + } + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL exiting AppUI ") + Exit(); + } + if ( iWaitNoteInUse ) + { + iCommandPending = EFalse; + } + if ( iSelectItemPending && !iEndKeyPressed ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL SelectItem pending" ) + iSessionTerminated = ETrue; + iSelectItemView->HandleCommandL( ESatUiCmdExit ); + } + + TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::HandleWsEventL +// Handling of the window server events. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::HandleWsEventL( + const TWsEvent& aEvent, + CCoeControl* aDestination ) + { + switch ( aEvent.Type() ) + { + // This is End key closing event. If this window server event is + // received, by default application will be closed unless it is + // the system application. + case KAknUidValueEndKeyCloseEvent: + { + // Performs the same behaviour as when Exit softkey is pressed. + TFLOGSTRING( "CSatUiViewAppUi::HandleWsEventL End key pressed" ) + iEndKeyPressed = ETrue; + HandleExitCommandL(); + break; + } + case EEventPointer: + { + TFLOGSTRING( "CSatUiViewAppUi::HandleWsEventL EEventPointer" ) + const TPointerEvent& pointer = *( aEvent.Pointer() ); + const TPointerEvent::TType pointerType = pointer.iType; + + if ( ( TPointerEvent::EButton1Down == pointerType ) || + ( TPointerEvent::EButton2Down == pointerType ) || + ( TPointerEvent::EButton3Down == pointerType ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleWsEventL EEventPointer\ + handle the event" ) + // Check if we need to end play tone + StopPlayToneL(); + } + break; + } + case EEventKeyDown: + { + // Handles other user key presses + TFLOGSTRING( "CSatUiViewAppUi::HandleWsEventL EEventKeyDown" ) + // Check if we need to end play tone + StopPlayToneL(); + if ( iImmediateDigitResponse ) + { + HandleImmediateDigitResponse( aEvent.Key()->iScanCode ); + } + break; + } + + default: + break; + } + // Forwards event to the base class. + CAknViewAppUi::HandleWsEventL( aEvent, aDestination ); + PriorityVerifyAndClose( aEvent ); + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::HelpStatus +// Help support status +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::HelpStatus( TBool aStatus ) + { + TFLOGSTRING( "CSatUiViewAppUi::HelpStatus calling" ) + iHelp = aStatus; + TFLOGSTRING( "CSatUiViewAppUi::HelpStatus exiting" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::DelayCallback +// Delay Callback function. Completes after predefined +// time has passed +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CSatUiViewAppUi::DelayCallback( TAny* aPtr ) + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback calling" ) + if ( ((CSatUiViewAppUi* )aPtr)->iTimerRepeatOn ) + { + if ( ((CSatUiViewAppUi* )aPtr)->iTimerRepeatCount++ == KDivideByEight ) + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 1" ) + if ( ((CSatUiViewAppUi* )aPtr)->iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 2" ) + ((CSatUiViewAppUi* )aPtr)->iWait->AsyncStop(); + } + if ( ( ( CSatUiViewAppUi* ) aPtr )->iGetInputDialog || + ( ( CSatUiViewAppUi* ) aPtr )->iQueryDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 3" ) + ( ( CSatUiViewAppUi* ) aPtr )-> + iNoResponseFromUserAfterDelay = ETrue; + ( ( CSatUiViewAppUi* ) aPtr )->CloseDialogs(); + } + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 4" ) + return ( ETrue ); + } + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 5" ) + if ( ((CSatUiViewAppUi* )aPtr)->iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 6" ) + ((CSatUiViewAppUi* )aPtr)->iWait->AsyncStop(); + } + } + + // Close DisplayText dialog if clearing after delay is requested + if ( ((CSatUiViewAppUi* )aPtr)->iDisplayTextDialog || + ((CSatUiViewAppUi* )aPtr)->iDisplayTextIconDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 7" ) + ( ( CSatUiViewAppUi* ) aPtr )->iNoResponseFromUserAfterDelay = ETrue; + ( ( CSatUiViewAppUi* ) aPtr )->ClearScreen(); + } + else if ( ( ( CSatUiViewAppUi* ) aPtr )->iGetInputDialog || + ( ( CSatUiViewAppUi* ) aPtr )->iQueryDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 8" ) + ( ( CSatUiViewAppUi* ) aPtr )->iNoResponseFromUserAfterDelay = ETrue; + ( ( CSatUiViewAppUi* ) aPtr )->CloseDialogs(); + } + + TFLOGSTRING( "CSatUiViewAppUi::DelayCallback exiting" ) + return ( EFalse ); + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::CreateCallBackTimerLC +// Creates a callback timer +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::CreateCallBackTimerL( const TInt aDelay, + TInt (*aFunction)(TAny* aPtr) ) + { + TFLOGSTRING( "CSatUiViewAppUi::CreateCallBackTimerLC called" ) + iTimerRepeatCount = 0; + iTimer = CPeriodic::NewL( CActive::EPriorityStandard ); + + if ( iTimerRepeatOn ) + { + TFLOGSTRING( "CSatUiViewAppUi::CreateCallBackTimerLC repeating" ) + iTimer->Start( aDelay, aDelay, + TCallBack( aFunction, this ) ); + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::CreateCallBackTimerLC \ + no repeating" ) + iTimer->Start( aDelay, KMicroSecondsInSecond, + TCallBack( aFunction, this ) ); + } + + TFLOGSTRING( "CSatUiViewAppUi::CreateCallBackTimerLC exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::DestroyCallBackTimer +// Destroys the callback timer +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::DestroyCallBackTimer( ) + { + TFLOGSTRING( "CSatUiViewAppUi::DestroyCallBackTimer() called" ) + delete iTimer; + iTimer = NULL; + iTimerRepeatOn = EFalse; + TFLOGSTRING( "CSatUiViewAppUi::DestroyCallBackTimer() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ProcessCommandParametersL +// Takes care of external launching. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TBool CSatUiViewAppUi::ProcessCommandParametersL( + TApaCommand aCommand, + TFileName& aDocumentName, + const TDesC8& aTail ) + { + TFLOGSTRING2( "CSatUiViewAppUi::ProcessCommandParametersL called,\ + aCommand: %d", aCommand ) + // TApaCommand is 0 for SIM originated opening and 2 for user originated + // opening. Empty view is only needed for SIM originated opening. + if ( EApaCommandOpen == aCommand ) + { + // Creates empty view for commands without view. + CreateEmptyMenuL(); + } + + TFLOGSTRING( "CSatUiViewAppUi::ProcessCommandParametersL exit" ) + return CAknViewAppUi::ProcessCommandParametersL( aCommand, aDocumentName, + aTail ); + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::DispatchUserInactive +// Called when user has been inactive for a pre-defined time period +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CSatUiViewAppUi::DispatchUserInactive( TAny* aPtr ) + { + TFLOGSTRING( "CSatUiViewAppUi::DispatchUserInactive calling" ) + ((CSatUiViewAppUi* )aPtr)->iNoResponseFromUserAfterDelay = ETrue; + + //lint -e{961} else block not needed. + if ( ( ( CSatUiViewAppUi* ) aPtr )->iDisplayTextDialog || + ( ( CSatUiViewAppUi* ) aPtr )->iDisplayTextIconDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::DispatchUserInactive clear screen" ) + ( ( CSatUiViewAppUi* ) aPtr )->ClearScreen(); + } + else if ( ( ( CSatUiViewAppUi* ) aPtr )->iQueryDialog || + ( (CSatUiViewAppUi* ) aPtr )->iGetInputDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::DispatchUserInactive close dialog" ) + ( ( CSatUiViewAppUi* ) aPtr )->CloseDialogs(); + } + + TFLOGSTRING( "CSatUiViewAppUi::DispatchUserInactive exiting" ) + return (EFalse); + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::MakeGetInputBitmapMask +// Make a mask for get input icon +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::MakeGetInputBitmapMask( CFbsBitmap* aMask, + TSize aSize ) const + { + TFLOGSTRING( "CSatUiViewAppUi::MakeGetInputBitmapMask calling" ) + TInt width = aSize.iWidth; + TInt height = aSize.iHeight; + aMask->Create( TSize( width, height ), EColor16M ); + + TBitmapUtil bitmap1Util( aMask ); + // Begin manipulation with bitmap1Util, setting initial pixel to 0,0 + bitmap1Util.Begin( TPoint( 0,0 ) ); + + // Make mask which covers whole icon + for ( TInt y = 0; y < height; y++ ) + { + for ( TInt x = 0; x < width; x++ ) + { + bitmap1Util.SetPos( TPoint( x, y ) ); + bitmap1Util.SetPixel( 0x0000ff ); + } + } + bitmap1Util.End(); + TFLOGSTRING( "CSatUiViewAppUi::MakeGetInputBitmapMask exiting" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::DispatchTimer +// Dispatch iWait to action implementer. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::DispatchTimer( CActiveSchedulerWait& aWait ) + { + TFLOGSTRING( "CSatUiViewAppUi::DispatchTimer calling" ) + iWait = &aWait; + TFLOGSTRING( "CSatUiViewAppUi::DispatchTimer exiting" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::GetEndKey +// Get a flag which is indicating if end key is pressed. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TBool CSatUiViewAppUi::GetEndKey() + { + TFLOGSTRING( "CSatUiViewAppUi::GetEndKey calling-exiting" ) + return iEndKeyPressed; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::SetEndKey +// Set a flag which is indicating if end key is pressed. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::SetEndKey( TBool aValue ) + { + TFLOGSTRING2( "CSatUiViewAppUi::SetEndKey calling, aValue:%d", aValue ) + iEndKeyPressed = aValue; + TFLOGSTRING( "CSatUiViewAppUi::SetEndKey exiting" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::SetCommandPending +// Set a flag which is indicating proactive command is pending. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::SetCommandPending( TBool aValue ) + { + TFLOGSTRING2( "CSatUiViewAppUi::SetCommandPending calling, aValue:%d", \ + aValue ) + iCommandPending = aValue; + if ( aValue ) + { + // Cancels a request to save RAM when higher than normal buffer size is + // no longer required. + CAknEnv::Static()->CancelWsBufferRequest( iReqWSBufferID ); + } + TFLOGSTRING( "CSatUiViewAppUi::SetCommandPending exiting" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::CloseDialogs +// Close all existing dialogs. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::CloseDialogs() + { + TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() called" ) + if ( iWaitNote || iBipWaitNote || iNoteDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() StopShowWaitNote" ) + StopShowWaitNote(); + } + if ( iDisplayTextDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iDisplayTextDialog" ) + delete iDisplayTextDialog; + iDisplayTextDialog = NULL; + iImmediateRsp = EFalse; + } + if ( iDisplayTextIconDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iDisplayTextIconDialog" ) + delete iDisplayTextIconDialog; + iDisplayTextIconDialog = NULL; + iImmediateRsp = EFalse; + } + if ( iGetInputDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iGetInputDialog" ) + TRAP_IGNORE( iGetInputDialog->DismissQueryL() ) + iGetInputDialog = NULL; + } + if ( iQueryDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iQueryDialog" ) + delete iQueryDialog; + iQueryDialog = NULL; + } + if ( iPermanentNote ) + { + TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iPermanentNote" ) + // CAknNoteDialog has already performed deletion when user action. + iPermanentNote = NULL; + } + TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::MapcInitComplete +// Plays the tone. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::MapcInitComplete( TInt aError, + const TTimeIntervalMicroSeconds& /*aDuration*/ ) + { + TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete called" ) + // Audio player is initialised, so if there is no error, we can start + // playing the tone. + if( KErrNone == aError ) + { + const TInt volume( Max( 0, Min( iVolume, + iAudioPlayer->MaxVolume() ) ) ); + TFLOGSTRING2( "CSatUiViewAppUi::\ + MapcInitComplete SetVolume %i", volume ) + // Set volume according Settings. + iAudioPlayer->SetVolume( volume ); + iAudioPlayer->Play(); + TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete Play" ) + } + else + { + // Otherwise, we delete the initialised audio player. + if ( iAudioPlayer ) + { + TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete iAudioPlayer \ + true" ) + delete iAudioPlayer; + iAudioPlayer = NULL; + } + + // Remove also the note for play tone + if ( iPermanentNote ) + { + TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete iPermanentNote \ + true" ) + iPermanentNote->ExitSleepingDialog(); + delete iPermanentNote; + iPermanentNote = NULL; + } + + // If there was a duration for play tone, stop waiting + if ( iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete stop iWait" ) + iWait->AsyncStop(); + } + + TFLOGSTRING2( "CSatUiViewAppUi::MapcInitComplete Error %i", aError ) + } + + TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::MapcPlayComplete +// Deletes audio player after playing is completed. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::MapcPlayComplete( TInt aError ) + { + TFLOGSTRING( "CSatUiViewAppUi::MapcPlayComplete called" ) + + // When playing is completed, deleting the audio player. + if ( iAudioPlayer ) + { + TFLOGSTRING( "CSatUiViewAppUi::MapcPlayComplete delete iAudioPlayer" ) + delete iAudioPlayer; + iAudioPlayer = NULL; + } + // Remove note after play has completed. + if ( iPermanentNote ) + { + TFLOGSTRING( "CSatUiViewAppUi::MapcPlayComplete ExitSleepingDialog" ) + iPermanentNote->ExitSleepingDialog(); + delete iPermanentNote; + iPermanentNote = NULL; + } + // Show wait note only for samples that have duration, otherwise there is + // chance that wait note is not stopped. + if ( TTimeIntervalMicroSeconds( static_cast( 0 ) ) != iDuration ) + { + // It does not affect for tone playing if wait note + // is not able to show. + TFLOGSTRING( "CSatUiViewAppUi::MapcPlayComplete ShowWaitNoteL" ) + TRAP_IGNORE( ShowWaitNoteL() ) + } + + TFLOGSTRING2( "CSatUiViewAppUi::MapcPlayComplete exit, error:%i", aError ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::PlayUserSelectedToneL +// Plays user selected tone from active Profile. +// If needed displays the text in a note while playing. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::PlayUserSelectedToneL( + const TDesC& aText, + TTimeIntervalMicroSeconds aDuration, + TSatTone aTone, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) + { + TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL called" ) + StopShowWaitNote(); + // Delete timer just in case e.g. if DisplayText was on the screen + DestroyCallBackTimer(); + + iPermanentNote = NULL; + iDuration = aDuration; + + TFLOGSTRING2( "CSatUiViewAppUi::PlayUserSelectedToneL length of aText \ + %d", aText.Length() ) + if ( 0 != aText.Length() ) + { + iPermanentNote = new (ELeave) CAknStaticNoteDialog(); + iPermanentNote->PrepareLC( R_SATUI_PERMANENT_NOTE ); + + if ( ( !aSelfExplanatory ) || ( !aIconBitmap ) ) + { + // Set text + iPermanentNote->SetTextL( aText ); + } + + if ( aIconBitmap ) + { + //Set image + TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL SetImage" ) + CEikImage* image = new ( ELeave ) CEikImage(); + CleanupStack::PushL( image ); + image->SetBitmap( aIconBitmap ); + iPermanentNote->SetImageL( image ); + CleanupStack::Pop( image ); + } + + iPermanentNote->SetTimeout( CAknNoteDialog::ENoTimeout ); + iForegroundControl = iPermanentNote; + iPermanentNote->RunLD(); + } + + // If several messages/calls arrive during a small amount of time and if the + // message received or incoming call tone is already being played we do not + // restart it. + if ( iAudioPlayer ) + { + TFLOGSTRING( "CSatUiViewAppUi::\ + PlayUserSelectedToneL Error - already played" ) + return ESatFailure; + } + + // This defines name for the current message alert or incoming call tone. + TBuf soundFileName; + GetProfileParamsL( aTone, &soundFileName ); + // This defines the behaviour to be adopted by an + // audio client if a higher priority client takes over the device. + TInt mdaPriority( KAudioPrefIncomingCall ); + // This is used to resolve conflicts when more than one client tries to + // access the same sound output device simultaneously. + TInt audioPriority( KAudioPriorityPhoneCall ); + + TFLOGSTRING2( "CSatUiViewAppUi::PlayUserSelectedToneL\ + Volume is %i ", iVolume ) + + // Creates the audio player. + iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL( + soundFileName, + *this, + audioPriority, + ( TMdaPriorityPreference ) mdaPriority ); + + if ( TTimeIntervalMicroSeconds( static_cast( 0 ) ) != aDuration ) + { + TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL duration not 0" ) + TTimeIntervalMicroSeconds max32Bit( + static_cast( K32TIntMaxValue ) ); + if ( aDuration > max32Bit ) + { + // Timers can only handle 32-bit values + // and 64-bit value is received. + // Let's break the aDuration to smaller bits. + // Divided here by 8 to fit in 32-bit maxvalue. + // Loops 8 times in DelayCallback to play tone + // right duration. + aDuration = aDuration.Int64() / KDivideByEight; + iTimerRepeatOn = ETrue; + } + iAudioPlayer->SetRepeats( KSoundPlayerRepeatForever, + TTimeIntervalMicroSeconds( + static_cast( 0 ) ) ); + CreateCallBackTimerL( I64INT( aDuration.Int64() ), DelayCallback ); + + if ( !iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL\ + starting iWait" ) + iWait->Start(); + TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL\ + strarting done" ) + } + + // Sample is played in forever loop for the duration. + // After duration call back timers are destroyed + DestroyCallBackTimer(); + // If player exists, stop playing and delete player. MapcPlayComplete + // is not called because CallBackTimer stops the playing. + if ( iAudioPlayer ) + { + iAudioPlayer->Stop(); + delete iAudioPlayer; + iAudioPlayer = NULL; + TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL\ + iAudioPlayer deleted" ) + } + // Remove note after play has completed. + if ( iPermanentNote ) + { + iPermanentNote->ExitSleepingDialog(); + delete iPermanentNote; + iPermanentNote = NULL; + } + iForegroundControl = NULL; + + if ( !iEndKeyPressed ) + { + ShowWaitNoteL(); + } + + } + else + { + // If duration is zero then tone is played only once. + // Playing duration is same as duration of the sample. + iAudioPlayer->SetRepeats( + 0, TTimeIntervalMicroSeconds( static_cast( 0 ) ) ); + TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL SetRepeats 0" ) + } + + TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL exit" ) + if( EFalse == iWarningAndPlayTones ) + { + return ESatSuccessToneNotPlayed; + } + + return ESatSuccess; + } + + +// --------------------------------------------------------- +// CSatUiViewAppUi::ConfirmOpenChannelL +// Displays a query to get confirmation for Open Channel command. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TSatUiResponse CSatUiViewAppUi::ConfirmOpenChannelL( + const TDesC& aText, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmapOpenChannel, + const TBool aSelfExplanatory ) + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL called" ) + + TSatUiResponse response( ESatSuccess ); + TInt resource( 0 ); + TPtrC textPtr( aText ); + HBufC* textHolder = NULL; + + if ( aIconBitmapOpenChannel ) + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL have icon" ) + resource = R_SATUI_CONFIRM_OK_CANCEL_QUERY_WITH_ICON; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL no icon" ) + resource = R_SATUI_CONFIRM_OK_CANCEL_QUERY; + + TFLOGSTRING2( "CSatUiViewAppUi::ConfirmOpenChannelL length of \ + aText %d", aText.Length() ) + if ( 0 == aText.Length() ) + { + textHolder = StringLoader::LoadLC( R_QTN_SAT_CONF_OPEN_CHANNEL_BIP, + iCoeEnv ); + textPtr.Set( *textHolder ); + } + } + + TInt userResponse = RunQueryDialogL( resource, textPtr, + aIconBitmapOpenChannel, aSelfExplanatory, EAknSoftkeyOk ); + + if ( textHolder ) + { + CleanupStack::PopAndDestroy( textHolder ); + } + + if ( userResponse ) + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL action accepted" ) + aActionAccepted = ETrue; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL action not \ + accepted" ) + aActionAccepted = EFalse; + } + + + + ShowWaitNoteL(); + + TFLOGSTRING2( "CSatUiViewAppUi::ConfirmOpenChannelL exit,return: %d",\ + response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ShowBIPNoteL +// Displays the BIP note. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ShowBIPNoteL( TInt aCommand, const TDesC& aText, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) + { + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() called" ) + TFLOGSTRING2( "CSatUiViewAppUi::ShowBIPNoteL() aCommand: %d", aCommand ) + + iWaitNoteInUse = ETrue; + TBool showNote( EFalse ); + TInt resourceId( 0 ); + switch ( aCommand ) + { + case ESendDataIdentier: // fall through + case EReceiveDataIdentifier: + { + resourceId = R_SATUI_BIP_WAIT_NOTE; + showNote = ETrue; + break; + } + case ECloseChannelIdentifier: + { + HBufC* textHolder = StringLoader::LoadLC( + R_QTN_SAT_CONF_CLOSE_CHANNEL_BIP, iCoeEnv ); + + if ( !iNoteDialog ) + { + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL no NoteDialog" ) + iNoteDialog = new (ELeave) CAknNoteDialog( + REINTERPRET_CAST( CEikDialog**, &iNoteDialog ), + CAknNoteDialog::ENoTone, + CAknNoteDialog::EShortTimeout ); + + if ( aIconBitmap ) + { + iNoteDialog->PrepareLC( R_SATUI_CLOSE_CHANNEL_ICON_NOTE ); + //Set image + TFLOGSTRING( + "CSatUiViewAppUi::ShowBIPNoteL SetImage" ) + CEikImage* image = new ( ELeave ) CEikImage(); + CleanupStack::PushL( image ); + image->SetBitmap( aIconBitmap ); + iNoteDialog->SetImageL( image ); + CleanupStack::Pop( image ); + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL no Icon" ) + iNoteDialog->PrepareLC( R_SATUI_CLOSE_CHANNEL_NOTE ); + } + + // inform the user using received alpha id + if ( ( aText.Length() > 0 ) && + ( !aSelfExplanatory || !aIconBitmap ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL using \ + received alpha id" ) + iNoteDialog->SetTextL( aText ); + } + // inform the user using localized text + else if ( aText.Length() == 0 ) + { + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL using \ + localized text" ) + iNoteDialog->SetTextL( *textHolder ); + } + + iForegroundControl = iNoteDialog; + iNoteDialog->RunLD(); + // iForegroundControl won't be clear until the note dialog + // closed. It will avoid we lose the chance to set focus for + // the wait dialog when the switch of foreground/background + // happened. + } + + CleanupStack::PopAndDestroy( textHolder ); // textHolder + + showNote = EFalse; + break; + } + default: + { + showNote = EFalse; + break; + } + } + if ( showNote ) + { + + // First, stop normal wait note. + if ( iWaitNote ) + { + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() Closing WaitNote" ) + TRAP_IGNORE( iWaitNote->ProcessFinishedL() ) + iWaitNote = NULL; + } + + if ( !iBipWaitNote ) + { + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() no BipWaitNote" ) + iBipWaitNote = new ( ELeave ) CSatUiWaitDialog( + (REINTERPRET_CAST(CEikDialog**,&iBipWaitNote)), + *iAdapter, ETrue ); + + if ( ( aText.Length() > 0 ) && ( !aSelfExplanatory || + !aIconBitmap ) ) + { + iBipWaitNote->SetTextL( aText ); + } + + if ( aIconBitmap ) + { + //Set image + TFLOGSTRING( + "CSatUiViewAppUi::ShowBIPNoteL SetImage" ) + CEikImage* image = new ( ELeave ) CEikImage(); + CleanupStack::PushL( image ); + image->SetBitmap( aIconBitmap ); + iBipWaitNote->SetImageL( image ); + CleanupStack::Pop( image ); + } + + iForegroundControl = iBipWaitNote; + iBipWaitNote->ExecuteLD( resourceId ); + // iForegroundControl won't be clear until the BipWait dialog + // closed. It will avoid we lose the chance to set focus for + // the wait dialog when the switch of foreground/background + // happened. + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() have BipWaitNote" ) + // BIP note already exists, update text if not with self + // explanatory icon + if ( ( aText.Length() > 0 ) && + ( !aSelfExplanatory || !aIconBitmap ) ) + { + iBipWaitNote->SetTextL( aText ); + } + else if ( aSelfExplanatory && aIconBitmap ) + { + const TDesC emptyText( KNullDesC ); + iBipWaitNote->SetTextL( emptyText ); + } + // BIP note already exists, update image + if ( aIconBitmap ) + { + //Set image + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL SetImage" ) + CEikImage* image = new ( ELeave ) CEikImage(); + CleanupStack::PushL( image ); + image->SetBitmap( aIconBitmap ); + iBipWaitNote->SetImageL( image ); + CleanupStack::Pop( image ); + } + } + } + TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::RemoveNullCharacters +// Null characters are removed from text +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::RemoveNullCharacters( HBufC* aText ) + { + TFLOGSTRING( "CSatUiViewAppUi::RemoveNullCharacters calling" ) + TPtr titleptr = aText->Des(); + TInt nullLocation( 0 ); + while ( ( nullLocation = titleptr.Locate( NULL ) ) >= 0 ) + { + titleptr.Delete( nullLocation, 1 ); + } + TFLOGSTRING( "CSatUiViewAppUi::RemoveNullCharacters exiting" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ConfirmSetUpCallL +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ConfirmSetUpCallL( + const TDesC& aText, + const TDesC& aSimAppName, + TBool& aActionAccepted, + const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory ) + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmSetUpCallL calling" ) + + aActionAccepted = EFalse; + TPtrC text( aText ); + HBufC* textHolder = NULL; + HBufC* titleHolder = NULL; + TInt resource( 0 ); + + if ( aIconBitmap ) + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmSetUpCallL have icon" ) + resource = R_SATUI_CONFIRM_CALL_CANCEL_QUERY_WITH_ICON; + + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::ConfirmSetUpCallL no icon" ) + resource = R_SATUI_CONFIRM_CALL_CANCEL_QUERY; + + TFLOGSTRING2( "CSatUiViewAppUi::ConfirmSetUpCallL length of aText, \ + %d", aText.Length() ) + if ( aText.Length() == 0 ) + { + + if ( aSimAppName.Length() > 0 ) + { + titleHolder = aSimAppName.AllocLC(); + } + else + { + titleHolder = StringLoader::LoadLC( R_QTN_SAT_QUERY_TITLE, + iCoeEnv ); + } + + textHolder = StringLoader::LoadLC( R_TEXT_CALL_SETUP_BY_SIMATK, + *titleHolder, iCoeEnv ); + + RemoveNullCharacters( textHolder ); + + text.Set(*textHolder); + } + } + + TInt userResponse = RunQueryDialogL( resource, text, aIconBitmap, + aSelfExplanatory, ESatUiSoftkeyCall ); + + if ( textHolder ) + { + CleanupStack::PopAndDestroy( textHolder ); //textHolder + } + + if ( titleHolder ) + { + CleanupStack::PopAndDestroy( titleHolder ); //titleHolder + } + + if ( userResponse ) + { + aActionAccepted = ETrue; + } + + TFLOGSTRING( "CSatUiViewAppUi::ConfirmSetUpCallL exiting" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ShowNotAvailableNoteL +// Show note indicating SAT is not available +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ShowNotAvailableNoteL() + { + TFLOGSTRING( "CSatUiViewAppUi::ShowNotAvailableNoteL() called" ) + CAknNoteDialog* noteDialog = new (ELeave) CAknNoteDialog( + REINTERPRET_CAST(CEikDialog**,¬eDialog), + CAknNoteDialog::ENoTone, + CAknNoteDialog::ELongTimeout ); + + HBufC* textHolder = StringLoader::LoadLC( R_QTN_SAT_SERVICES_NOT_AVAILABLE, + iCoeEnv ); + + noteDialog->PrepareLC( R_SATUI_INFORMATION_NOTE ); + noteDialog->SetTextL( *textHolder ); + iForegroundControl = noteDialog; + noteDialog->RunLD(); + iForegroundControl = NULL; + + CleanupStack::PopAndDestroy( textHolder ); + + TFLOGSTRING( "CSatUiViewAppUi::ShowNotAvailableNoteL() exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::RunQueryIconDialogL +// Make and run note dialog with an icon +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CSatUiViewAppUi::RunQueryDialogL( + TInt aResourceId, const TDesC& aText, const CFbsBitmap* aIconBitmap, + const TBool aSelfExplanatory, TInt aMskCommand ) + { + TFLOGSTRING( "CSatUiViewAppUi::RunQueryDialogL called" ) + CEikImage* image = new(ELeave) CEikImage; + CleanupStack::PushL( image ); + iQueryDialog = CAknQueryDialog::NewL(); + iQueryDialog->PrepareLC( aResourceId ); + TInt userResponse( 0 ); + + if ( aIconBitmap ) + { + TFLOGSTRING( "CSatUiViewAppUi::RunQueryDialogL set icon" ) + image->SetBitmap( aIconBitmap ); + + // Create mask for icon bitmap + CFbsBitmap* mask = new(ELeave) CFbsBitmap; + TSize size = aIconBitmap->SizeInPixels(); + MakeGetInputBitmapMask( mask, size ); + image->SetMask( mask ); + // Add icon to query + iQueryDialog->QueryHeading()->SetHeaderImageL( image ); + } + + if ( !aSelfExplanatory || !aIconBitmap ) + { + TFLOGSTRING( "CSatUiViewAppUi::RunQueryDialogL set text" ) + TPtrC textPtr( aText ); + // Icon is not self-explanatory, show also text + iQueryDialog->SetPromptL( textPtr ); + } + + // Set MSK same as LSK without any text causing the icon drawing + iQueryDialog->ButtonGroupContainer().SetCommandL( + CEikButtonGroupContainer::EMiddleSoftkeyPosition, aMskCommand, + KSatEmptyDes ); + iForegroundControl = iQueryDialog; + userResponse = iQueryDialog->RunLD(); + iForegroundControl = NULL; + CleanupStack::PopAndDestroy( image ); // image + + iQueryDialog = NULL; + + TFLOGSTRING2( "CSatUiViewAppUi::RunQueryDialogL exit,return: %d", \ + userResponse ) + return userResponse; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::CloseSatUI +// Start SatUi closing process +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::CloseSatUI() + { + TFLOGSTRING( "CSatUiViewAppUi::CloseSatUI called" ) + + TRAP_IGNORE( HandleExitCommandL() ); + + if ( !IsAppShutterRunning() ) + { + TFLOGSTRING( "CSatUiViewAppUi::CloseSatUI RunAppShutter" ) + RunAppShutter(); + } + + TFLOGSTRING( "CSatUiViewAppUi::CloseSatUI exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::GetProfileParamsL +// Get and store settings from current profile +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::GetProfileParamsL( TSatTone aTone /*= ESatToneNotSet*/, + TDes* aToneName /*= NULL*/ ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetProfileParamsL calling" ) + + MProfile* profile = NULL; + MProfileEngine* engine = NULL; + + engine = CreateProfileEngineL(); + CleanupReleasePushL( *engine ); + + profile = engine->ActiveProfileLC(); + + const MProfileTones& tones = profile->ProfileTones(); + + // Takes a current warning and gametones setting. + const TProfileToneSettings& ts = tones.ToneSettings(); + iWarningAndPlayTones = ts.iWarningAndGameTones; + iVolume = ts.iRingingVolume; + TFLOGSTRING2( "CSatUiViewAppUi::GetProfileParamsL \ + iVolume before mapping %d", iVolume ) + + // Max volume from profile is KMaxVolumeFromProfile, Max volume from + // CMdaAudioToneUtility is different, maybe 10,000. So, + // rate = maxVolumeFromPlayer / KMaxVolumeFromProfile + // User may never hear the TONE, because volume is too small. + // iVolume times the rate make it can be heard. + + CMdaAudioToneUtility* toneUtl = CMdaAudioToneUtility::NewL( *this ); + TInt maxVolumeFromPlayer( toneUtl->MaxVolume() ); + iVolume *= maxVolumeFromPlayer / KMaxVolumeFromProfile; + delete toneUtl; + toneUtl = NULL; + TFLOGSTRING2( "CSatUiViewAppUi::GetProfileParamsL \ + iVolume after mapping %d", iVolume ) + + if ( ( ESatUserSelectedToneIncomingSms == aTone ) && ( aToneName ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetProfileParamsL message tone" ) + aToneName->Copy( tones.MessageAlertTone() ); + } + else if( aToneName ) + { + TFLOGSTRING( "CSatUiViewAppUi::GetProfileParamsL ring tone" ) + aToneName->Copy( tones.RingingTone1() ); + } + + CleanupStack::PopAndDestroy( 2 ); // engine, profile + + TFLOGSTRING( "CSatUiViewAppUi::GetProfileParamsL exits" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::HandleImmediateDigitResponse +// Check received key event. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::HandleImmediateDigitResponse( TInt aScanCode ) + { + TFLOGSTRING2( "CSatUiViewAppUi::HandleImmediateDigitResponse() code: %d", + aScanCode ) + TBool closeDialog( ETrue ); + + // If number button is pressed + if ( ( KKeyZero <= aScanCode ) && ( KKeyNine >= aScanCode ) ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse press \ + digit 0-9" ) + iKey = aScanCode; + } + else if ( EStdKeyNkpAsterisk == aScanCode || KHwAsterisk == aScanCode ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse press \ + *" ) + iKey = 0x2A; + } + else if ( EStdKeyHash == aScanCode ) + { + TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse press \ + #" ) + iKey = 0x23; + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse press \ + others" ) + closeDialog = EFalse; + iKey = 0x00; + } + + if( closeDialog ) + { + CloseDialogs(); + } + + TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse exits" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::PriorityVerifyAndClose +// Handle closing display text in high priority events +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::PriorityVerifyAndClose( const TWsEvent& aEvent ) + { + TFLOGSTRING( "CSatUiViewAppUi::PriorityVerifyAndClose calling" ) + + if ( ( iDisplayTextDialog || iDisplayTextIconDialog ) && + ( EEventFocusLost == aEvent.Type() ) ) + { + // Open the WS server session. + RWsSession wsSession; + if ( KErrNone == wsSession.Connect() ) + { + TInt wgFocus( wsSession.GetFocusWindowGroup() ); + TInt wgPriority( + wsSession.GetWindowGroupOrdinalPriority( wgFocus ) ); + TFLOGSTRING2( + "CSatUiViewAppUi::PriorityVerifyAndClose priority=%d", + wgPriority ) + + // For some reason window group priority for call dialogs was 0 + // so those cases must be checked in addition + TInt callActiveState = EPSCTsyCallStateNone; + + // Get current call status from P&S + const TInt errCode( RProperty::Get( + KPSUidCtsyCallInformation, + KCTsyCallState, + callActiveState ) ); + + // Receiving MT or creating MO call + const TBool callIncoming( + ( EPSCTsyCallStateAlerting == callActiveState ) || + ( EPSCTsyCallStateRinging == callActiveState ) || + ( EPSCTsyCallStateDialling == callActiveState ) ); + TFLOGSTRING2( + "CSatUiViewAppUi::PriorityVerifyAndClose callActiveState=%d", + callActiveState ) + TFLOGSTRING2( + "CSatUiViewAppUi::PriorityVerifyAndClose iImmediateRsp=%d", + iImmediateRsp ) + + // If the new focus window group has high priority + // close dialog + if ( ( wgPriority > 0 && iForeground ) || + ( iImmediateRsp && callIncoming ) ) + { + iHighPriorityEvent = ETrue; + CloseDialogs(); + } + + wsSession.Close(); + } + } + + TFLOGSTRING( "CSatUiViewAppUi::PriorityVerifyAndClose exiting" ) + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::CloseCallControlNote +// Call back method, close the note in call control. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CSatUiViewAppUi::CloseCallControlNoteL( TAny* aPtr ) + { + TFLOGSTRING( "CSatUiViewAppUi::CloseCallControlNote calling" ) + + if ( !aPtr ) + { + return KErrArgument; + } + + CSatUiViewAppUi* pAppUi = + reinterpret_cast( aPtr ); + + TRAPD( err, pAppUi->iCcNote->CancelNoteL( pAppUi->iCcNoteId ) ); + if( KErrNone != err ) + { + return err; + } + + if ( pAppUi->iWait->IsStarted() ) + { + pAppUi->iWait->AsyncStop(); + } + delete pAppUi->iCcNote; + pAppUi->iCcNote = NULL; + + TFLOGSTRING( "CSatUiViewAppUi::CloseCallControlNote exiting" ) + + return 0; + } + +// --------------------------------------------------------- +// CSatUiViewAppUi::ShowSsErrorNoteL +// Show a Ss Error note. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewAppUi::ShowSsErrorNoteL() + { + TFLOGSTRING( "CSatUiViewAppUi::ShowSsErrorNoteL calling" ) + CAknNoteDialog* errorNote = new ( ELeave ) CAknNoteDialog( + REINTERPRET_CAST( CEikDialog**,&errorNote ), + CAknNoteDialog::ENoTone, + CAknNoteDialog::ELongTimeout ); + CleanupStack::PushL( errorNote ); + + HBufC* textHolder = StringLoader::LoadLC(R_TEXT_NOT_DONE, iCoeEnv ); + errorNote->SetTextL( *textHolder ); + CleanupStack::PopAndDestroy( textHolder ); + CleanupStack::Pop( errorNote ); + errorNote->ExecuteLD( R_SATUI_INFORMATION_NOTE ); + + TFLOGSTRING( "CSatUiViewAppUi::ShowSsErrorNoteL exiting" ) + } + +// ----------------------------------------------------------------------------- +// CSatUiViewAppUi::ProfileState +// Return current profile state +// ----------------------------------------------------------------------------- +// +TInt CSatUiViewAppUi::ProfileState() + { + TFLOGSTRING( "CSatUiViewAppUi::ProfileState called" ) + + TInt profileId( 0 ); + CRepository* cr ( NULL ); + + TRAPD( err, cr = CRepository::NewL( KCRUidProfileEngine ) ); + if ( ( KErrNone == err ) && cr ) + { + TFLOGSTRING( "CSatUiViewAppUi::ProfileState no err" ) + // Get the ID of the currently active profile: + cr->Get( KProEngActiveProfile, profileId ); + delete cr; + } + + else + { + TFLOGSTRING2( "CR failed: %i", err ) + } + + TFLOGSTRING2( "CSatUiViewAppUi::ProfileState exit value: %d", + profileId ) + + return profileId; + } +// ----------------------------------------------------------------------------- +// CSatUiViewAppUi::StopPlayToneL +// Stops playing play tone. Used when user terminates play tone +// ----------------------------------------------------------------------------- +// +void CSatUiViewAppUi::StopPlayToneL() + { + TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL called" ) + if ( iPlayer && iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\ + iPlayer exists" ) + iPlayToneError = ESatSessionTerminatedByUser; + iWait->AsyncStop(); + } + if ( iAudioPlayer ) + { + TFLOGSTRING( "StopPlayToneL iAudioPlayer exists" ) + if ( iWait->IsStarted() ) + { + TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\ + iWait started" ) + // Remove note when play has been interrupted. + if ( iPermanentNote ) + { + iPermanentNote->ExitSleepingDialog(); + delete iPermanentNote; + iPermanentNote = NULL; + } + iPlayToneError = ESatSessionTerminatedByUser; + iWait->AsyncStop(); + } + else + { + TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\ + iWait not started" ) + iAudioPlayer->Stop(); + // When playing is stopped, deleting the audio player. + // MapcPlayComplete is not called because user stops + // the playing. + if ( iAudioPlayer ) + { + delete iAudioPlayer; + iAudioPlayer = NULL; + TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\ + iAudioPlayer deleted" ) + + // Remove note after play has completed. + if ( iPermanentNote ) + { + TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\ + iPermanentNote true" ) + iPermanentNote->ExitSleepingDialog(); + delete iPermanentNote; + iPermanentNote = NULL; + } + + // Show wait note only for samples that have + // duration, otherwise there is chance that wait + // note is not stopped. + if ( TTimeIntervalMicroSeconds( + static_cast( 0 ) ) != iDuration ) + { + ShowWaitNoteL(); + } + } + } + } + TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL exiting" ) + } + +// ----------------------------------------------------------------------------- +// CSatUiViewAppUi::ForegroundAlive +// Check if foreground control is alive when HandleForegroundEventL is called. +// ----------------------------------------------------------------------------- +// +TBool CSatUiViewAppUi::ForegroundAlive() const + { + TFLOGSTRING( "CSatUiViewAppUi::ForegroundAlive called" ) + + // Only if value of iForegroundControl equals to one of the following 8 + // pointers, the alive value will be set to true. This will check if + // the foreground control is alive. + TBool alive = + iForegroundControl == static_cast( iWaitNote ) + || iForegroundControl == static_cast( + iDisplayTextIconDialog ) + || iForegroundControl == static_cast( + iDisplayTextDialog ) + || iForegroundControl == static_cast( iGetInputDialog ) + || iForegroundControl == static_cast( iPermanentNote ) + || iForegroundControl == static_cast( iNoteDialog ) + || iForegroundControl == static_cast( iBipWaitNote ) + || iForegroundControl == static_cast( iQueryDialog ); + + TFLOGSTRING2( "CSatUiViewAppUi::ForegroundAlive exiting alive=%d", alive ) + + return alive; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiViewContainer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiViewContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,271 @@ +/* +* Copyright (c) 2002-2007 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: +* Defines CSatUiViewContainer class +* +* +*/ + + +// INCLUDE FILES +#include +#include //for CEikListBox +#include +#include +#include + +#include + +#include +#include +#include // New Akn header +#include // For help + +#include "CSatUiApplication.h" +#include "CSatUiViewContainer.h" +#include "CSatUiView.h" +#include "tflogger.h" + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CSatUiViewContainer::CSatUiViewContainer( CSatUiView* aView ) : + iView( aView ) + { + } + +// --------------------------------------------------------- +// CSatUiViewContainer::ConstructL +// Symbian OS default constructor can leave. +// (other items were commented in a header). +// ---------------------------------------------------------. +void CSatUiViewContainer::ConstructL( TBool aIconOn ) + { + TFLOGSTRING( "CSatUiViewContainer::ConstructL called" ) + CreateWindowL(); + iIconOn = aIconOn; + + TResourceReader resourceReader; + + iCoeEnv->CreateResourceReaderLC( resourceReader , + R_SATUI_LISTBOX ); + + //different listbox depends on item icon + if ( iIconOn ) + { + TFLOGSTRING( "CSatUiViewContainer::ConstructL iIconOn true" ) + iListBox = new (ELeave) + CAknSingleGraphicStyleListBox; + } + else + { + TFLOGSTRING( "CSatUiViewContainer::ConstructL iIconOn false" ) + iListBox = new (ELeave) CAknSingleStyleListBox; + } + + iListBox->SetContainerWindowL( *this ); + + iListBox->ConstructFromResourceL( resourceReader ); + + iListBox->CreateScrollBarFrameL( ETrue ); + + iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); + + iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue ); + + // resourceReader. Cannot add this as a parameter since + // TResourceReader is not derived from CBase + CleanupStack::PopAndDestroy(); + TFLOGSTRING( "CSatUiViewContainer::ConstructL exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewContainer::NewL +// Two-phased constructor. +// (other items were commented in a header). +// ---------------------------------------------------------. +CSatUiViewContainer* CSatUiViewContainer::NewL( TBool aIconOn, + CSatUiView* aView ) + { + TFLOGSTRING( "CSatUiViewContainer::NewL called-exit" ) + CSatUiViewContainer* self = + new (ELeave) CSatUiViewContainer( aView ); + + CleanupStack::PushL( self ); + self->ConstructL( aIconOn ); + CleanupStack::Pop( self ); + + return self; + } + +// --------------------------------------------------------- +// CSatUiViewContainer::~CSatUiViewContainer +// Destructor. +// (other items were commented in a header). +// --------------------------------------------------------- +// +CSatUiViewContainer::~CSatUiViewContainer() + { + TFLOGSTRING( "CSatUiViewContainer::~CSatUiViewContainer called" ) + //need to reset first if contains icons + if ( iListBox->ItemDrawer()->ColumnData()->IconArray() ) + { + iListBox->ItemDrawer()->ColumnData()->IconArray()->Reset(); + } + delete iListBox; + TFLOGSTRING( "CSatUiViewContainer::~CSatUiViewContainer exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewContainer::ListBox +// Returns a pointer to a listbox object. +// (other items were commented in a header). +// --------------------------------------------------------- +// +CAknColumnListBox* CSatUiViewContainer::ListBox() + { + TFLOGSTRING( "CSatUiViewContainer::ListBox called-exit" ) + return iListBox; + } + +// --------------------------------------------------------- +// CSatUiViewContainer::CountComponentControls +// The only control is a listbox. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CSatUiViewContainer::CountComponentControls() const + { + TFLOGSTRING( "CSatUiViewContainer::CountComponentControls called-exit" ) + return 1; + } + +// --------------------------------------------------------- +// CSatUiViewContainer::ComponentControl +// The only control is a listbox. +// (other items were commented in a header). +// --------------------------------------------------------- +// +CCoeControl* CSatUiViewContainer::ComponentControl( + TInt /* aIndex */) const + { + TFLOGSTRING( "CSatUiViewContainer::ComponentControl called-exit" ) + return iListBox; + } + +// --------------------------------------------------------- +// CSatUiViewContainer::SizeChanged +// Sets the available size. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewContainer::SizeChanged() + { + TFLOGSTRING( "CSatUiViewContainer::SizeChanged called" ) + TRect parentRect( Rect() ); + if ( iListBox ) + { + iListBox->SetRect( parentRect ); + } + TFLOGSTRING( "CSatUiViewContainer::SizeChanged exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewContainer::OfferKeyEventL +// Listbox takes all event even if it doesn't use them. +// (other items were commented in a header). +// --------------------------------------------------------- +// +TKeyResponse CSatUiViewContainer::OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + TFLOGSTRING( "CSatUiViewContainer::OfferKeyEventL called" ) + TKeyResponse response( EKeyWasNotConsumed ); + + if ( ( EKeyLeftArrow != aKeyEvent.iCode ) && + ( EKeyRightArrow != aKeyEvent.iCode ) ) + { + response = iListBox->OfferKeyEventL( aKeyEvent, aType ); + } + + if ( ( EKeyUpArrow == aKeyEvent.iCode ) || + ( EKeyDownArrow == aKeyEvent.iCode ) ) + { + iView->UpdateMskL( iListBox->CurrentItemIndex(), EFalse ); + } + TFLOGSTRING2( "CSatUiViewContainer::OfferKeyEventL exit, return: %d", \ + response ) + return response; + } + +// --------------------------------------------------------- +// CSatUiViewContainer::GetHelpContext +// Returns SatUi help context. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewContainer::GetHelpContext( + TCoeHelpContext& aContext ) const + { + TFLOGSTRING( "CSatUiViewContainer::GetHelpContext called" ) + aContext.iMajor = KUidSATUI; + aContext.iContext = KSAT_HLP_APP; + TFLOGSTRING( "CSatUiViewContainer::GetHelpContext exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewContainer::HandleResourceChange +// Handles control's layout change. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewContainer::HandleResourceChange( TInt aType ) + { + TFLOGSTRING2( "CSatUiViewContainer::HandleResourceChange called, \ + aType: %d", aType ) + if ( aType == KEikDynamicLayoutVariantSwitch ) + { + TRect mainPaneRect; + AknLayoutUtils::LayoutMetricsRect( + AknLayoutUtils::EMainPane, mainPaneRect ); + SetRect( mainPaneRect ); + DrawDeferred(); + } + + CCoeControl::HandleResourceChange( aType ); + TFLOGSTRING( "CSatUiViewContainer::HandleResourceChange exit" ) + } + +// --------------------------------------------------------- +// CSatUiViewContainer::FocusChanged +// Indicate the requirements for control redrawing. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CSatUiViewContainer::FocusChanged( TDrawNow aDrawNow ) + { + TFLOGSTRING( "CSatUiViewContainer::FocusChanged called" ) + CCoeControl::FocusChanged( aDrawNow ); + if ( iListBox ) + { + iListBox->SetFocus( IsFocused(), aDrawNow ); + } + TFLOGSTRING( "CSatUiViewContainer::FocusChanged exit" ) + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/CSatUiWaitDialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/CSatUiWaitDialog.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,63 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Implements the feature for investigating length of the input. Softkeys +* are set based on this information. +* +* +*/ + + +#include +#include +#include +#include +#include +#include "CSatUiWaitDialog.h" +#include "tflogger.h" + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CSatUiWaitDialog::CSatUiWaitDialog( + CEikDialog** aSelfPtr, + MSatUiAdapter& aAdapter, + TBool aVisibilityDelayOff ) : + CAknWaitDialog( aSelfPtr, aVisibilityDelayOff ), + iAdapter( aAdapter ) + { + } + +// Destructor. +CSatUiWaitDialog::~CSatUiWaitDialog() + { + } + +// --------------------------------------------------------- +// CSatUiWaitDialog::OkToExitL() +// --------------------------------------------------------- +// +TBool CSatUiWaitDialog::OkToExitL( TInt aButtonId ) + { + TFLOGSTRING( "CSatUiWaitDialog::OkToExitL called" ) + if ( aButtonId == EAknSoftkeyCancel ) + { + iAdapter.SessionTerminated( ESessionCancel ); + } + TFLOGSTRING( "CSatUiWaitDialog::OkToExitL exit" ) + return ETrue; + } +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/SATUISrc/csatuiiconhandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/SATUISrc/csatuiiconhandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,245 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of CSatUiIconHandler class. +* +*/ + + +#include +#include +#include + +#include "csatuiiconhandler.h" +#include "tflogger.h" + +// ============================ MEMBER FUNCTIONS ============================= + +// --------------------------------------------------------------------------- +// First part of Two-phased constructor. +// --------------------------------------------------------------------------- +// +CSatUiIconHandler* CSatUiIconHandler::NewL() + { + TFLOGSTRING( "CSatUiIconHandler::NewL enter" ) + CSatUiIconHandler* self = new ( ELeave ) CSatUiIconHandler; + TFLOGSTRING( "CSatUiIconHandler::NewL exit" ) + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CSatUiIconHandler::~CSatUiIconHandler() + { + TFLOGSTRING( "CSatUiIconHandler::~CSatUiIconHandler enter" ) + // Close RSatService interface + iSatService.Close(); + TFLOGSTRING( "CSatUiIconHandler::~CSatUiIconHandler exit" ) + } + +// --------------------------------------------------------------------------- +// Fetches first icon information, then the handle to the icon and at last +// does the duplication of the icon bitmap. Object is set to wait the +// completion of the request. +// --------------------------------------------------------------------------- +// +CFbsBitmap* CSatUiIconHandler::FetchIconL( const RSatSession& aSatSession, + const TUint8 aIconId, + const TInt aOptWidth, + const TInt aOptHeight, + TBool& aIconSupport ) + { + TFLOGSTRING( "CSatUiIconHandler::FetchIconL enter" ) + TFLOGSTRING3( "CSatUiIconHandler::FetchIconL aOptWidth=%d aOptHeight=%d", + aOptWidth, aOptHeight ) + + iSatService.OpenL( aSatSession ); + CleanupClosePushL( iSatService ); + + RIconEf iconEf; + CleanupClosePushL( iconEf ); + // Order of superiority list + RArray selectedIcons; + CleanupClosePushL( selectedIcons ); + CFbsBitmap* iconBitmap = NULL; + + // Getting the information of the icon + TRAPD( err, iSatService.GetIconInfoL( aIconId, iconEf ); ); + + if ( KErrNone == err ) + { + TFLOGSTRING( "CSatUiIconHandler::FetchIconL no error" ) + // Sorting into order of superiority + SortIconsL( iconEf, selectedIcons, aOptWidth, aOptHeight ); + + // Reset iconCount by approved icons + const TInt iconCount = selectedIcons.Count() <= iconEf.Count() ? + selectedIcons.Count() : + iconEf.Count(); + TBool fetchSuccess( EFalse ); + + TFLOGSTRING2( "CSatUiIconHandler::FetchIconL iconCount: %d", iconCount ) + // If there were icons to be fetched + if ( 0 < iconCount ) + { + // start going through approved icons list from the + // first and biggest icon + TInt counter( 0 ); + for ( counter = 0; ( counter < iconCount ) && !fetchSuccess; + counter++ ) + { + TInt selectedIconCounter = selectedIcons.operator[]( counter ); + TFLOGSTRING2( "CSatUiIconHandler::\ + FetchIconL selectedIconCounter: %d", selectedIconCounter ) + TRAPD( err, + iconBitmap = iSatService.GetIconL( iconEf.operator[]( + selectedIconCounter ) ) ); + if ( KErrNone == err ) + { + fetchSuccess = ETrue; + TFLOGSTRING( "CSatUiIconHandler::FetchIconL fetchSuccess!" ) + } + else + { + delete iconBitmap; + } + } + } + } + + TFLOGSTRING2( "CSatUiIconHandler::FetchIconL icon info error=%d", err ) + if ( KErrNotSupported == err ) + { + TFLOGSTRING( "CSatUiIconHandler::FetchIconL icons not supported" ) + aIconSupport = EFalse; + } + + // selectedIcons, iconEf and iSatService not deleted but closed + CleanupStack::PopAndDestroy( 3, &iSatService ); + + TFLOGSTRING( "CSatUiIconHandler::FetchIconL exit" ) + // Icon was not found, icons are not supported or an error was received. + return iconBitmap; + } + +// --------------------------------------------------------------------------- +// C++ default constructor cannot contain any code that might leave. +// --------------------------------------------------------------------------- +// +CSatUiIconHandler::CSatUiIconHandler() + { + TFLOGSTRING( "CSatUiIconHandler::CSatUiIconHandler enter - exit" ) + } + +// --------------------------------------------------------------------------- +// Sorts icons into order of superiority +// --------------------------------------------------------------------------- +// +void CSatUiIconHandler::SortIconsL( const RIconEf& aIconEf, + RArray& aSelectedIcons, const TInt aOptWidth, + const TInt aOptHeight ) const + { + TFLOGSTRING( "CSatUiIconHandler::SortIcons enter" ) + + const TInt iconCount = aIconEf.Count(); + TFLOGSTRING2( "CSatUiIconHandler::SortIcons iconCount=%d", iconCount ) + TInt counter( 0 ); + // Search icon from available iconarray + for ( counter = 0; counter < iconCount; counter++ ) + { + TFLOGSTRING3( "CSatUiIconHandler::SortIcons Icon Width=%d Height=%d", + aIconEf.operator[]( counter ).IconSize().iWidth, + aIconEf.operator[]( counter ).IconSize().iHeight ) + + const TInt selectedCount( aSelectedIcons.Count() ); + TBool replacement( EFalse ); + + // Count the difference of the icon versus layout + TInt newWidthDifference( + aOptWidth - aIconEf.operator[]( counter ).IconSize().iWidth ); + TInt newHeightDifference( + aOptHeight - aIconEf.operator[]( counter ).IconSize().iHeight ); + + // Make the difference absolute value + if ( newWidthDifference < 0 ) + { + newWidthDifference = -newWidthDifference; + } + + if ( newHeightDifference < 0 ) + { + newHeightDifference = -newHeightDifference; + } + TInt listCounter( 0 ); + // Going through the list of icons of suitable size + for ( listCounter = 0; ( listCounter < selectedCount ) && + !replacement; listCounter++ ) + { + + // Count the difference of the icon versus layout + TInt oldWidthDifference( aOptWidth - aIconEf.operator[]( + aSelectedIcons.operator[]( listCounter ) ).IconSize().iWidth ); + TInt oldHeightDifference( aOptHeight - aIconEf.operator[]( + aSelectedIcons.operator[]( listCounter ) ).IconSize().iHeight ); + + // Make the difference absolute value + if ( oldWidthDifference < 0 ) + { + oldWidthDifference = -oldWidthDifference; + } + + if ( oldHeightDifference < 0 ) + { + oldHeightDifference = -oldHeightDifference; + } + + // New icon is better either by being closer to the layout or by + // being same size and color instead of black and white + if ( ( ( newWidthDifference < oldWidthDifference ) && + ( newHeightDifference <= oldHeightDifference ) ) || + ( ( newWidthDifference <= oldWidthDifference ) && + ( newHeightDifference < oldHeightDifference ) ) || + ( ( newWidthDifference == oldWidthDifference ) && + ( newHeightDifference == oldHeightDifference ) && + ( TSatIconInfo::EBasic == aIconEf.operator[]( aSelectedIcons. + operator[]( listCounter ) ).CodingScheme() ) && + ( TSatIconInfo::EColor == aIconEf.operator[]( counter ). + CodingScheme() ) ) ) + { + TFLOGSTRING2( "CSatUiIconHandler::SortIcons \ + newWidthDifference: %d", newWidthDifference ) + TFLOGSTRING2( "CSatUiIconHandler::SortIcons \ + oldHeightDifference: %d", oldHeightDifference ) + // Insert new icon to correct place + aSelectedIcons.InsertL( counter, listCounter ); + replacement = ETrue; + } + } + + TFLOGSTRING2( "CSatUiIconHandler::SortIcons listCounter: %d", \ + listCounter ) + // Either first item or was not better than any in the list + // New icon is added to the end of the array + if ( !replacement ) + { + aSelectedIcons.AppendL( counter ); + } + } + + TFLOGSTRING2( "CSatUiIconHandler::SortIcons counter: %d", \ + counter ) + TFLOGSTRING( "CSatUiIconHandler::SortIcons exit" ) + } + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/aif/Satui.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/aif/Satui.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,42 @@ +/* +* Copyright (c) 2002-2007 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: +* Application information (AIF) resource file for SatUi application. +* +* +*/ + + +// INCLUDES + +#include +#include + +// RESOURCE DEFINITIONS + +RESOURCE AIF_DATA + { + // App UID + app_uid = 0x101f4ce0; + + // Number of icons + num_icons = 2; + + // Application capabilities + hidden = KAppIsHidden; + embeddability = KAppNotEmbeddable; + newfile = KAppDoesNotSupportNewFile; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/aif/Satui_caption.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/aif/Satui_caption.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2000 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: Resource file. +* +*/ + + +#include +#include + +// --------------------------------------------------------- +// +// Application captions. +// +// --------------------------------------------------------- +// +RESOURCE CAPTION_DATA + { + caption = qtn_apps_simapps_list; + shortcaption = qtn_apps_simapps_grid; + } diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/aif/TSatui.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/aif/TSatui.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,50 @@ +/* +* Copyright (c) 2003 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: Application information (AIF) resource file for SatUi +* application. +* +*/ + + +// INCLUDES + +#include +#include + +// RESOURCE DEFINITIONS + +/* +----------------------------------------------------------------------------- + + AIF_DATA + + Standard EPOC application information structure. + +----------------------------------------------------------------------------- +*/ +RESOURCE AIF_DATA + { + // App UID + app_uid = 0x101f4ce0; + + // Number of icons + num_icons = 2; + + // Application capabilities + hidden = KAppNotHidden; + embeddability = KAppNotEmbeddable; + newfile = KAppDoesNotSupportNewFile; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/bmarm/SATSHELLCNTRLU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/bmarm/SATSHELLCNTRLU.DEF Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,3 @@ +EXPORTS + NewSatController__Fv @ 1 NONAME R3UNUSED ; NewSatController(void) + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/bwins/SATSHELLCNTRLU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/bwins/SATSHELLCNTRLU.DEF Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,3 @@ +EXPORTS + ?NewSatController@@YAPAVMSatShellController@@XZ @ 1 NONAME ; class MSatShellController * __cdecl NewSatController(void) + diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/data/SatApp_stub.SIS Binary file satui/satapp/data/SatApp_stub.SIS has changed diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/data/SatUi.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/data/SatUi.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,1760 @@ +/* +* Copyright (c) 2002-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: +* This file contains all the resources for the module. +* +*/ + + +// RESOURCE IDENTIFIER +NAME SATU + +// INCLUDES +#include +#include + +#include +#include +#include +#include +#include +#include // AVKON_ICON_FILE +#include //2.8 SCALABLE UI + +#include +#include "satui.hrh" +#include +#include + + +#define satui_bitmap_file APP_BITMAP_DIR"\\satui.mbm" + +#define avkon_bitmap_file AVKON_ICON_FILE + +#define space " " + +// RESOURCE DEFINITIONS + +// --------------------------------------------------------- +// +// Standard resource signature. +// +// --------------------------------------------------------- +// +RESOURCE RSS_SIGNATURE { } + +// --------------------------------------------------------- +// +// Unique name-identifier. +// +// --------------------------------------------------------- +// +RESOURCE TBUF16 { buf = "SATU"; } + +// --------------------------------------------------------- +// +// This is used when you enter first time to +// the application. +// +// --------------------------------------------------------- +// +RESOURCE EIK_APP_INFO + { + } + +RESOURCE LOCALISABLE_APP_INFO r_satui_localisable_app_info + { + short_caption = qtn_apps_simapps_grid; + caption_and_icon = + CAPTION_AND_ICON_INFO + { + caption = qtn_apps_simapps_list; +#ifdef __SCALABLE_ICONS + number_of_icons = 1; + + icon_file = APP_BITMAP_DIR"\\Satui_aif.mif"; + +#else + number_of_icons = 2; + + icon_file = APP_BITMAP_DIR"\\Satui_aif.mbm"; + +#endif //__SCALABLE_ICONS + }; + } + + +/******************** SET UP MENU *************************/ + +//---------------------------------------------------------- +// +// r_satui_setupmenu_view +// Defines the main view +// +//---------------------------------------------------------- +// +RESOURCE AVKON_VIEW r_satui_setupmenu_view + { + cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT; + menubar = r_satui_setupmenu_menubar; + } + +//---------------------------------------------------------- +// +// r_satui_setupmenu_menubar +// Defines the menu bar on the view +// +//---------------------------------------------------------- +// +RESOURCE MENU_BAR r_satui_setupmenu_menubar + { + titles= + { + MENU_TITLE {menu_pane = r_satui_setupmenu_options_menu;} + }; + } + +// --------------------------------------------------------- +// +// r_satui_setupmenu_options_menu +// Defines the menu pane on the view +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_satui_setupmenu_options_menu + { + items= + { + MENU_ITEM + { command = ESatUiCmdSelect; + txt = qtn_sat_option_select; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { command = EAknCmdHelp; + txt = qtn_options_help; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { command = EAknCmdExit; + txt = qtn_options_exit; + } + }; + } + +/******************** SELECT ITEM *************************/ + +// --------------------------------------------------------- +// +// r_satui_selectitem_view +// Defines the SelectItem view +// +// --------------------------------------------------------- +// +RESOURCE AVKON_VIEW r_satui_selectitem_view + { + cba = R_AVKON_SOFTKEYS_SELECTION_LIST; + menubar = r_satui_selectitem_menubar; + } + +//---------------------------------------------------------- +// +// r_satui_selectitem_menubar +// Defines the menu bar on the view +// +//---------------------------------------------------------- +// +RESOURCE MENU_BAR r_satui_selectitem_menubar + { + titles= + { + MENU_TITLE {menu_pane = r_satui_selectitem_options_menu;} + }; + } + +// --------------------------------------------------------- +// +// r_satui_selectitem_options_menu +// Defines the menu pane on the view +// +// --------------------------------------------------------- +// +RESOURCE MENU_PANE r_satui_selectitem_options_menu + { + items= + { + MENU_ITEM + { command = ESatUiCmdSelect; + txt = qtn_sat_option_select; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { command = EAknCmdHelp; + txt = qtn_options_help; + flags = EEikMenuItemSpecific; + }, + MENU_ITEM + { command = ESatUiCmdExit; + txt = qtn_options_exit; + } + }; + } + +// --------------------------------------------------------- +// +// r_satui_listbox +// Defines the listbox on the main pane +// +// --------------------------------------------------------- +// +RESOURCE LISTBOX r_satui_listbox + { + flags = EAknListBoxSelectionList; + } + +/******************** EMPTY MENU **************************/ + +//---------------------------------------------------------- +// +// r_satui_emptymenu_view +// Defines the main view +// +//---------------------------------------------------------- +// +RESOURCE AVKON_VIEW r_satui_emptymenu_view + { + cba = R_AVKON_SOFTKEYS_EMPTY; + menubar = r_satui_setupmenu_menubar; + } + +/********************** DIALOGS ***************************/ + +//---------------------------------------------------------- +// +// r_satui_wait_note +// Defines the wait note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_wait_note + { + flags = EAknWaitNoteFlags; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiWaitNote; + control = AVKON_NOTE + { + layout = EWaitLayout; + singular_label = qtn_gen_note_processing; + imagefile = satui_bitmap_file; + imageid = EMbmSatuiQgn_note_sim; + imagemask = EMbmSatuiQgn_note_sim_mask; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_wait_note_with_cancel +// Defines the wait note with cancel (modal dialog) +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_wait_note_with_cancel + { + flags = EAknWaitNoteFlags | EEikDialogFlagWait; + + buttons = R_AVKON_SOFTKEYS_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiWaitNoteWithCancel; + control = AVKON_NOTE + { + layout = EWaitLayout; + singular_label = qtn_gen_note_processing; + imagefile = satui_bitmap_file; + imageid = EMbmSatuiQgn_note_sim; + imagemask = EMbmSatuiQgn_note_sim_mask; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_refresh_wait_note +// Defines the refresh wait note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_refresh_wait_note + { + flags = EAknWaitNoteFlags; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiRefreshWaitNote; + control = AVKON_NOTE + { + layout = EWaitLayout; + singular_label = qtn_sat_wait_refresh_update; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_sms_wait_note +// Defines the sms sending wait note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_sms_wait_note + { + flags = EAknWaitNoteFlags; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiSmsWaitNote; + control = AVKON_NOTE + { + layout = EWaitLayout; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_ss_wait_note +// Defines the ss sending wait note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_ss_wait_note + { + flags = EAknWaitNoteFlags; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiSsWaitNote; + control = AVKON_NOTE + { + layout = EWaitLayout; + singular_label = qtn_sat_sending_sms; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_dtmf_wait_note +// Defines the dtmf sending wait note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_dtmf_wait_note + { + flags = EAknWaitNoteFlags; + + buttons = R_AVKON_SOFTKEYS_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiDtmfWaitNote; + control = AVKON_NOTE + { + // text will be set at run-time + layout = EWaitLayout; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_permanent_note +// Defines the permanent note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_permanent_note + { + flags = EEikDialogFlagNoDrag | + EEikDialogFlagNoTitleBar | + EEikDialogFlagCbaButtons; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiPermanentNote; + control = AVKON_NOTE + { + layout = EGeneralLayout; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_confirm_yes_no_query +// Defines the yes/no confirmation query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_confirm_yes_no_query + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_YES_NO; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_confirm_yes_no_query_with_icon +// Defines the yes/no confirmation query with icon +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_confirm_yes_no_query_with_icon + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_YES_NO; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + label = space; + }; + }, + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_immediate_digit_query +// Defines the immediate digit response query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_immediate_digit_query + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_immediate_digit_note_with_icon +// Defines the immediate digit response note with icon +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_immediate_digit_note_with_icon + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + label = space; + }; + }, + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_confirm_ok_cancel_query +// Defines the ok/cancel confirmation query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_confirm_ok_cancel_query + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_confirm_ok_cancel_query_with_icon +// Defines the ok/cancel confirmation query with icon +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_confirm_ok_cancel_query_with_icon + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + label = space; + }; + }, + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + + }; + } + +//---------------------------------------------------------- +// +// r_satui_confirm_send_cancel_query +// Defines the send/cancel confirmation query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_confirm_send_cancel_query + { + flags = EGeneralQueryFlags; + buttons = r_satui_softkeys_send_cancel; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + }; + } + + + +//---------------------------------------------------------- +// +// r_satui_confirm_call_cancel_query +// Defines the call/cancel confirmation query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_confirm_call_cancel_query + { + flags = EGeneralQueryFlags; + buttons = r_satui_softkeys_call_cancel; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_confirm_call_cancel_query_with_icon +// Defines the call/cancel confirmation query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_confirm_call_cancel_query_with_icon + { + flags = EGeneralQueryFlags; + buttons = r_satui_softkeys_call_cancel; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + label = space; + }; + }, + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_CONFIRMATION_QUERY + { + layout = EConfirmationLayout; + animation = R_QGN_NOTE_QUERY_ANIM; + }; + } + + }; + } + +//---------------------------------------------------------- +// +// r_satui_information_note +// Defines the information note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_information_note + { + flags = EEikDialogFlagNoDrag | + EEikDialogFlagNoTitleBar | + EEikDialogFlagCbaButtons | + EEikDialogFlagWait; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiInformationNote; + control = AVKON_NOTE + { + layout = EGeneralLayout; + singular_label = space; + animation = R_QGN_NOTE_INFO_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_call_control_note +// Defines the call control +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_call_control_note + { + flags = EGeneralQueryFlags; + + buttons = R_AVKON_SOFTKEYS_OK_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiInformationNote; + control = AVKON_NOTE + { + layout = EGeneralLayout; + singular_label = space; + animation = R_QGN_NOTE_INFO_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_mosm_control_note +// Defines the mo sm control note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_mosm_control_note + { + flags = EGeneralQueryFlags; + + buttons = R_AVKON_SOFTKEYS_OK_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiInformationNote; + control = AVKON_NOTE + { + layout = EGeneralLayout; + singular_label = space; + animation = R_QGN_NOTE_INFO_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_message +// Defines the message query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_message + { + flags = EGeneralQueryFlags| + EEikDialogFlagNoBorder| + EEikDialogFlagNoShadow| + EEikDialogFlagWait; + + buttons = R_AVKON_SOFTKEYS_OK_BACK; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE; + }; + }, + DLG_LINE + { + type = EAknCtMessageQuery; + id = EAknMessageQueryContentId; + control = AVKON_MESSAGE_QUERY + { + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_message_text_icon +// Defines the message query with icon and text +// +//---------------------------------------------------------- +// + + +RESOURCE DIALOG r_satui_message_text_icon + { + flags= EEikDialogFlagWait; + buttons=R_AVKON_SOFTKEYS_OK_BACK; + items= + { + DLG_LINE + { + type = EEikCtLabel; + id = ESatUiDisplayTextIconLabel; + control = LABEL + { + }; + }, + DLG_LINE + { + type = EEikCtSpacer; + id = ESatUiDisplayTextIconSpacer; + control = SPACER + { + color=EEikSpacerBlack; + }; + }, + DLG_LINE + { + type=EEikCtRichTextEditor; + id = ESatUiDisplayTextIconRTxtEd; + control = RTXTED + { + width=170; + height=150; + numlines = 10; + max_view_height_in_lines=6; + flags= EEikEdwinNoHorizScrolling | EEikEdwinDisplayOnly | + EEikEdwinReadOnly | EEikEdwinNoAutoSelection | + EEikEdwinAvkonDisableCursor; + }; + } + }; + } + + +//---------------------------------------------------------- +// +// r_satui_text_query_without_label +// Defines the text query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_text_query_without_label + { + flags = EEikDialogFlagWait| + EEikDialogFlagNoDrag| + EEikDialogFlagNoTitleBar| + EEikDialogFlagCbaButtons| + EEikDialogFlagNoShadow; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_DATA_QUERY + { + layout = EDataLayout; + control = EDWIN + { + width=16; + lines=1; + maxlength = 256; + + }; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_number_query_without_label +// Defines the number query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_number_query_without_label + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_DATA_QUERY + { + layout = EPhoneLayout; + label = space; + control = EDWIN + { + numeric_keymap = EAknEditorSATNumberModeKeymap; + maxlength=256; + width=16; + lines=1; + }; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_hidden_number_query_without_label +// Defines the hidden number query +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_hidden_number_query_without_label + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_DATA_QUERY + { + layout = EPinLayout; + control = SECRETED + { + num_letters = 32; + }; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_number_query_with_label_and_icon +// Defines the number query with label and icon +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_number_query_with_label_and_icon + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + label = space; + }; + }, + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_DATA_QUERY + { + layout = EPhoneLayout; + control = EDWIN + { + numeric_keymap = EAknEditorSATNumberModeKeymap; + maxlength=256; + width=16; + lines=1; + }; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_text_query_with_label_and_icon +// Defines the text query with label and icon +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_text_query_with_label_and_icon + { + flags=EGeneralQueryFlags; + buttons=R_AVKON_SOFTKEYS_OK_CANCEL; + items= + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + label = space; + }; + }, + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_DATA_QUERY + { + layout = EDataLayout; + control = EDWIN + { + width=16; + lines=1; + maxlength = 256; + }; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_hidden_number_query_with_label_and_icon +// Defines the hidden number query with label and icon +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_hidden_number_query_with_label_and_icon + { + flags = EGeneralQueryFlags; + buttons = R_AVKON_SOFTKEYS_OK_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + label = space; + }; + }, + DLG_LINE + { + type = EAknCtQuery; + id = EGeneralQuery; + control = AVKON_DATA_QUERY + { + layout = EPinLayout; + control = SECRETED + { + num_letters = 32; + }; + }; + } + }; + } + +// --------------------------------------------------------- +// +// r_satui_bip_wait_note +// Defines send data wait dialog +// +// --------------------------------------------------------- +RESOURCE DIALOG r_satui_bip_wait_note + { + flags = EAknWaitNoteFlags; + + buttons = R_AVKON_SOFTKEYS_CANCEL; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiWaitNote; + control = AVKON_NOTE + { + layout = EWaitLayout; + //singular_label = qtn_sat_conf_send_data_bip; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_close_channel_icon_note +// Defines the information note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_close_channel_icon_note + { + flags = EEikDialogFlagNoDrag | + EEikDialogFlagNoTitleBar | + EEikDialogFlagCbaButtons; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiInformationNote; + control = AVKON_NOTE + { + layout = EGeneralLayout; + singular_label = space; + }; + } + }; + } + +//---------------------------------------------------------- +// +// r_satui_close_channel_note +// Defines the information note +// +//---------------------------------------------------------- +// +RESOURCE DIALOG r_satui_close_channel_note + { + flags = EEikDialogFlagNoDrag | + EEikDialogFlagNoTitleBar | + EEikDialogFlagCbaButtons; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiInformationNote; + control = AVKON_NOTE + { + layout = EGeneralLayout; + singular_label = space; + animation = R_QGN_NOTE_INFO_ANIM; + }; + } + }; + } + +//---------------------------------------------------- +// +// r_satui_requesting_wait_note +// Wait note for requesting. +// +//---------------------------------------------------- +// +RESOURCE DIALOG r_satui_requesting_wait_note + { + flags = EAknWaitNoteFlags; + + buttons = R_AVKON_SOFTKEYS_EMPTY; + items = + { + DLG_LINE + { + type = EAknCtNote; + id = ESatUiWaitNote; + control = AVKON_NOTE + { + layout = EWaitLayout; + singular_label = text_sending; + animation = R_QGN_GRAF_WAIT_BAR_ANIM; + }; + } + }; + } + +/******************* Additional CBA ***********************/ + +//---------------------------------------------------------- +// +// r_satui_softkeys_send_cancel +// Defines Send softkey and Cancel softkey +// +//---------------------------------------------------------- +// +RESOURCE CBA r_satui_softkeys_send_cancel + { + buttons = + { + CBA_BUTTON {id = ESatUiSoftkeySend; txt = text_softkey_send;}, + CBA_BUTTON {id = EAknSoftkeyCancel; txt = text_softkey_cancel;} + }; + } + +//---------------------------------------------------------- +// +// r_satui_softkeys_call_cancel +// Defines Call softkey and Cancel softkey +// +//---------------------------------------------------------- +// +RESOURCE CBA r_satui_softkeys_call_cancel + { + buttons = + { + CBA_BUTTON {id = ESatUiSoftkeyCall; txt = text_softkey_call;}, + CBA_BUTTON {id = EAknSoftkeyCancel; txt = text_softkey_cancel;} + }; + } + + +//---------------------------------------------------- +// +// r_satui_softkey_quit +// +// +//---------------------------------------------------- +// +RESOURCE CBA r_satui_softkey_quit + { + buttons = + { + CBA_BUTTON {}, + CBA_BUTTON {id=EAknSoftkeyClose; txt=text_softkey_quit;} + }; + } + +/******************* Localized texts **********************/ + +// --------------------------------------------------------- +// +// r_qtn_sat_title +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_title + { + buf = qtn_sat_title; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_message_header +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_message_header + { + buf = qtn_sat_message_header; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_help_header +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_help_header + { + buf = qtn_sat_help_header; + } + +// --------------------------------------------------------- +// +// r_text_simatk_enter_char +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_simatk_enter_char + { + buf = text_simatk_enter_char; + } + +// --------------------------------------------------------- +// +// r_text_simatk_enter_char_string +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_simatk_enter_char_string + { + buf = text_simatk_enter_char_string; + } + +// --------------------------------------------------------- +// +// r_text_simatk_enter_nbr +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_simatk_enter_nbr + { + buf = text_simatk_enter_nbr; + } + +// --------------------------------------------------------- +// +// r_text_simatk_enter_nbr_string +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_simatk_enter_nbr_string + { + buf = text_simatk_enter_nbr_string; + } + +// --------------------------------------------------------- +// +// r_text_done +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_done + { + buf = text_done; + } + +// --------------------------------------------------------- +// +// r_text_not_done +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_not_done + { + buf = text_not_done; + } + +// --------------------------------------------------------- +// +// r_text_simatk_send_sms; +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_simatk_send_sms + { + buf = text_simatk_send_sms; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_note_sms_send; +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_note_sms_send + { + buf = qtn_sat_note_sms_send; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_note_sending_dtmf_template; +// Defines localized text +// +// --------------------------------------------------------- +// + +RESOURCE TBUF r_qtn_sat_note_sending_dtmf_template + { + buf = qtn_sat_note_sending_dtmf_template; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_cc_not_allowed; +// Defines localized text +// +// --------------------------------------------------------- +// + +RESOURCE TBUF r_qtn_sat_cc_not_allowed + { + buf = qtn_sat_cc_not_allowed; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_cc_modified; +// Defines localized text +// +// --------------------------------------------------------- +// + +RESOURCE TBUF r_qtn_sat_cc_modified + { + buf = qtn_sat_cc_modified; + } + +// --------------------------------------------------------- + +// r_qtn_sat_mosm_not_allowed; +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_mosm_not_allowed + { + buf = text_request_rejected; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_mosm_modified; +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_mosm_modified + { + buf = qtn_sat_request_modified; + } + +// --------------------------------------------------------- +// +// r_text_simatk_send_ss; +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_simatk_send_ss + { + buf = text_simatk_send_ss; + } + +// --------------------------------------------------------- +// +// r_text_call_setup_by_simatk +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_text_call_setup_by_simatk + { + buf = text_call_setup_by_simatk; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_query_title +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_query_title + { + buf = qtn_sat_query_title; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_query_allow_reset +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_query_allow_reset + { + buf = qtn_sat_query_allow_reset; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_timeout; +// Defines localized text +// +// --------------------------------------------------------- +// + +RESOURCE TBUF r_qtn_sat_timeout + { + buf = qtn_sat_timeout; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_conf_receive_data_bip +// Defines receive data localized text +// +// --------------------------------------------------------- +RESOURCE TBUF r_qtn_sat_conf_receive_data_bip + { + buf = qtn_sat_conf_receive_data_bip; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_conf_send_data_bip +// Defines send data localized text +// +// --------------------------------------------------------- +RESOURCE TBUF r_qtn_sat_conf_send_data_bip + { + buf = qtn_sat_conf_send_data_bip; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_services_not_available +// Defines SAT not available localized text +// +// --------------------------------------------------------- +RESOURCE TBUF r_qtn_sat_services_not_available + { + buf = qtn_sat_services_not_available; + } + +/****** Localized texts for the Next Action Indicator *****/ +/************ (an item in the Options menu) ***************/ + +// --------------------------------------------------------- +// +// r_qtn_sat_option_call +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_option_call + { + buf = qtn_options_call; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_option_send +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_option_send + { + buf = qtn_sat_option_send; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_option_play +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_option_play_tone + { + buf = qtn_sat_option_play_tone; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_option_read +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_option_read + { + buf = qtn_sat_option_read; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_option_select +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_option_select + { + buf = qtn_cffh_options_select; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_option_open +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_option_open + { + buf = qtn_options_open; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_option_goto +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_option_goto + { + buf = qtn_sat_option_goto; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_conf_open_channel_bip +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_conf_open_channel_bip + { + buf = qtn_sat_conf_open_channel_bip; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_conf_close_channel_bip +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_conf_close_channel_bip + { + buf = qtn_sat_conf_close_channel_bip; + } + +// --------------------------------------------------------- +// +// r_qtn_sat_sending_sms +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_sending_sms + { + buf = qtn_sat_sending_sms; + } + +// --------------------------------------------------------- +// +// qtn_sat_conf_launch_brow +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_sat_conf_launch_brow + { + buf = qtn_sat_conf_launch_brow; + } + +// --------------------------------------------------------- +// +// r_qtn_offline_not_possible_sap +// The note that is shown when the user attempts to connect +// the network when in SIM Access Profile mode. +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_offline_not_possible_sap + { + buf = qtn_offline_not_possible_sap; + } + +// --------------------------------------------------------- +// +// r_qtn_msk_call_sat +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_msk_call_sat + { + buf = qtn_msk_call_sat; + } + +// --------------------------------------------------------- +// +// r_qtn_msk_read_sat +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_msk_read_sat + { + buf = qtn_msk_read_sat; + } + +// --------------------------------------------------------- +// +// r_qtn_msk_open_sat +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_msk_open_sat + { + buf = qtn_msk_open; + } + +// --------------------------------------------------------- +// +// r_qtn_msk_goto_sat +// Defines localized text +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_qtn_msk_goto_sat + { + buf = qtn_msk_goto_sat; + } diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/data/Satui_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/data/Satui_reg.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,35 @@ +/* +* Copyright (c) 2004 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: Resource file for satui. +* +*/ + + +#include +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x101F4CE0 // Define your application UID here + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "Satui"; + + localisable_resource_file = APP_RESOURCE_DIR"\\Satui"; + localisable_resource_id = R_SATUI_LOCALISABLE_APP_INFO; + embeddability = KAppNotEmbeddable; + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/help/data/xhtml.zip Binary file satui/satapp/help/data/xhtml.zip has changed diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/help/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/help/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,26 @@ +/* +* 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: +* Export help related files. +* +*/ + +#include +PRJ_EXPORTS +:zip ../data/xhtml.zip /epoc32/data/z/resource/ overwrite +:zip ../data/xhtml.zip /epoc32/winscw/c/resource/ overwrite + +../inc/sat.hlp.hrh MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/sat.hlp.hrh) +../rom/satuihelps_variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(satuihelps_variant.iby) diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/help/inc/sat.hlp.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/help/inc/sat.hlp.hrh Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,27 @@ +/* +* 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: +* +*/ + +// +// sat.hlp.hrh generated by CSXHelp Utilities. +// + +#ifndef __SAT_HLP_HRH__ +#define __SAT_HLP_HRH__ + +_LIT(KSAT_HLP_APP, "SAT_HLP_APP"); // + +#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/help/rom/satuihelps_variant.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/help/rom/satuihelps_variant.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,28 @@ +/* +* 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 __SATUIHELPS_VARIANT_IBY__ +#define __SATUIHELPS_VARIANT_IBY__ + +#if defined(FF_S60_HELPS_IN_USE) && defined(__SIMCARD) + data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CE0\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CE0\contents.zip) + data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CE0\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CE0\index.xml) + data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CE0\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CE0\keywords.xml) + data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CE0\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CE0\meta.xml) +#endif + +#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satappaction.h --- a/satui/satapp/inc/satappaction.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* 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: -* -* -*/ - -#ifndef SATAPPACTION_H -#define SATAPPACTION_H - -#include -#include -#include -#include -#include // for symbian-to-qt conversions -#include "MSatUiObserver.h" // for the param type definitions -#include "satappconstant.h" - -// class declaration -class SatAppAction : public QObject -{ - Q_OBJECT - -public: - /** creates an action with given identity (TSatAction) */ - SatAppAction(int action, QObject *parent = 0); - ~SatAppAction(); - - /** synchronous wait until the action has been completed */ - void waitUntilCompleted(); - /** completes the action with guiven response */ - void complete(TSatUiResponse resp); - -public slots: - - /** completes the action */ - void complete() {complete(response());} - - // comfy methods for completing with certain response - void completeWithSuccess() {complete(ESatSuccess);} - void completeWithFailure() {complete(ESatFailure);} - void completeWithNoResponse() {complete(ESatNoResponseFromUser);} - void completeWithBackRequested() {complete(ESatBackwardModeRequestedByUser);} - void completeWithSessionTerminated() {complete(ESatSessionTerminatedByUser);} - -signals: - - /** signalled when the action has been completed */ - void actionCompleted(SatAppAction *action); - -public: // param access - - /** returns the identity of the action (TSatAction) */ - int action() {return mAction;} - - /** sets the action response */ - void setResponse(TSatUiResponse resp) {mResponse=resp;} - /** the action response (TSatUiResponse) */ - TSatUiResponse response() {return mResponse;} - - /** sets a value (arbitary type) */ - void set(const QString& key, QVariant value); - - /** sets QString value after doing symbian-to-qt conversion */ - void set(const QString& key, const TDesC& value); - /** sets QStringList value after doing symbian-to-qt conversion */ - void set(const QString& key, const MDesCArray& value); - /** sets QList value after doing symbian-to-qt conversion */ - void set(const QString& key, CArrayFixFlat& value); - /** sets int(millisec) value after doing symbian-to-qt conversion */ - void set(const QString& key, TTimeIntervalSeconds& value); - /** sets int(millisec) value after doing symbian-to-qt conversion */ - void set(const QString& key, TTimeIntervalMicroSeconds& value); - - /** returns a value (arbitary type) */ - QVariant value(const QString &key); - /** whether a value is present */ - bool hasValue(const QString &key); - -private: // data - - // identity of this action - int mAction; - - // response - TSatUiResponse mResponse; - - // parameter map - QMap mParams; - - // internal action state - enum State {Active,Waiting,Completed}; - State mState; -}; - -#endif // SATAPPACTION_H - diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satappconfirmprovider.h --- a/satui/satapp/inc/satappconfirmprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* 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: Provides SAT user confim notes -* -*/ - -#ifndef SATAPPCONFIRMPROVIDER_H -#define SATAPPCONFIRMPROVIDER_H - -// includes -#include - -// forward declarations -class HbMessageBox; -class SatAppAction; - -class SatAppConfirmProvider : public QObject -{ - Q_OBJECT - -public: - /** Constructor */ - SatAppConfirmProvider(QObject *parent = 0); - - /** Destructor */ - virtual ~SatAppConfirmProvider(); - -public slots: - - /** - * General confirmation request - * @param userAccepted Indicates whether the command was accepted. - */ - void confirmCommand(SatAppAction &action); - - /** clear the current dialog in screen */ - void clearScreen(); - - /** reset some data members */ - void resetState(); - -private: - - /** Shows the confirm note about Open Channel */ - void showOpenChannelConfirm(SatAppAction &action); - - /** Shows the confirmation not about SetUpCall*/ - void showSetUpCallConfirm(SatAppAction &action); - -private: - - /** Own.*/ - HbMessageBox *mConfirmQuery; - - SatAppAction *mAction; - - /** For unit testing.*/ - friend class ConfirmProviderTest; -}; - -#endif /* SATAPPCONFIRMPROVIDER_H */ diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satappconstant.h --- a/satui/satapp/inc/satappconstant.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef SATAPPCONSTANT_H -#define SATAPPCONSTANT_H - -#ifdef _UDEB -#define SAT_ASSERT Q_ASSERT -#else -#define SAT_ASSERT(cond) cond -#endif - -// CONSTANTS - -const int KDisplayTxtUserClearTimeout( 60000 ); -// As the QT for S60 is slow, we use 6 sec, in symbian sat ui we use 3 sec. -// Rollback to 3s -const int KDisplayTxtDefaultduration( 3000 ); - -const unsigned int KGetInputStringMaxSize = 0xEF; - -const int KExtendTimeoutMseconds(3000); -// 1 minute -const int KDefaultSelectionTimeoutMseconds(60000); -const int KSymbianTimeConvertQtTime(100); -const int KMoSmControlTimeOut(3000); -const int KPlayToneSymbianConvertQtTime(1000); - -// extensions to ConfirmAction -const int ESatConfirmAction = 0x35; -// extensions to TSatAction -const int ESatNotifyAction = 0x1001; - -// SatAppAction -// parameter keys -const QString KeyText="text"; // QString -const QString KeyMenu="menu"; // QList -const QString KeyDefault="default"; // int - default selected item index -const QString KeySelection="selection"; // int - real selected index -const QString KeyCharacterSet="charset"; // int(TSatCharacterSet) -const QString KeyInKey="inkey"; // int(char pressed) -const QString KeyDuration="duration"; // int(milliseconds) -const QString KeyImmediate="immediate"; // bool - immediate response -const QString KeyInputString="input"; // QString - user input string -const QString KeyMinLength="min"; // int -const QString KeyMaxLength="max"; // int -const QString KeyHideInput="hide"; // bool - password mode -const QString KeyToneId="tone"; // int(TSatTone) -const QString KeySustainedText="sustained"; // bool - sustained text -const QString KeyWaitUserToClear="waitusertoclear"; // bool -const QString KeyHelpRequested="helprequested"; // bool -const QString KeyApplicationName="applicationname"; // QString - app.name -const QString KeyCommandId="commandid"; // int(TSatSNotifyCommand) -const QString KeyControlResult="controlresult"; // int(TSatControlResult) -const QString KeyAlphaIdStatus="alphaidstatus"; // int(TSatAlphaIdStatus) -const QString KeyAdditionalText="additionaltext"; //QString - aAdditionalText -const QString KeyQueryCommandId="querycommandid";//int(TSatSQueryCommand) -const QString KeyActionAccepted="actionaccepted";//bool - -const QString KeyselfExp="sekfexp";//bool - -// icon identifiers -const QString KeyIconId="iconid"; // int - icon id -const QString KeyIconIdArray="iconidarray"; // QList (icon id) -const QString KeyIconQualifier="iconqualifier"; // int (TSatIconQualifier) - -// icons -const QString KeyIcon="icon"; // HbIcon -const QString KeyIconArray="icons"; // QList - -/** - * Play Tone Constants - */ -// Tone Sequence -const char KNetToneSeqNetBusy[] = "\x00\x11\x05\x4E\x30\x40\x30\x07\x0B"; -const char KNetToneSeqNetCallWaiting[] = "\x00\x11\x05\x4E\x14\x40\x3C\x4E\x14" -"\x40\x64\x40\x64\x40\x64\x4E\x14\x40\x3C\x4E\x14\x40\x64\x40\x64\x40\x64" -"\x07\x0B"; -const char KNetToneSeqNetCongestion[] = "\x00\x11\x05\x4E\x14\x40\x14\x07\x0B"; -const char KNetToneSeqNetSpecialInformation[] = "\x00\x11\x05\x4F\x21\x50" -"\x21\x51\x21\x40\x64\x07\x0B"; -const char KNetToneSeqDial[] = "\x00\x11\x05\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE" -"\x4E\xFE\x4E\xFE\x4E\xFE\x07\x0B"; -const char KNetToneSeqRingGoing[] = "\x00\x11\x05\x4E\x64\x05\x04\x40\x64\06\x07\x0B"; -const char KGeneralBeep[] = "\x00\x11\x0A\x76\x00\x0B"; -const char KErrorTone[] = "\x00\x11\x0A\x6C\x19\x0B"; -const char KRadioPathNotAvailable[] = "\x00\x11\x0A\x05\x03\x4E\x14\x40\x14\x06\x0B"; -const char KRadioPathAck[] = "\x00\x11\x0A\x02\xFC\x0A\x80\x4E\x14\x0A\x7f\x0B"; - -// PlayTone durations -const int KSatDur170ms = 170; // 170ms -const int KSatDur200ms = 200; // 200ms -const int KSatDur250ms = 250; // 250ms -const int KSatDur1200ms = 1200; // 1200ms - -//enum for SendSms -/**Sat send sms user response*/ -enum TSatAppConfirmType - { - ESatUiConfirmSendSms = 1, - ESatUiConfirmSendSs, - ESatUiConfirmSendUssd - }; - -enum TSatAppUserResponse -{ - /** - * default, user no response - */ - EUserNoResponse = 0, - /** - * OK, user response - */ - EUserPrimaryResponse, - /** - * Back, user response - */ - EUserSecondaryResponse, - /** - * requested to clear by the server - */ - EUserClearResponse, - /** - * requested to close application by the server - */ - EUserCloseResponse -}; - -enum TSatAppDialogActionType - { - ESatDialogDisplayText = 0, // Ok Back - ESatDialogGetInput, // Cancel ->Ok Cancel - ESatDialogGetInkey, // Cancel ->Ok Cancel - ESatDialogGetYesNo, // Yes No - ESatDialogGetDigitalRsp, // Cancel - ESatDialogSetUpCall, // Call Cancel - ESatDialogConfirmSend, // Yes No - ESatDialogConfirmBip // Ok Cancel - }; - -#endif diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satappinputprovider.h --- a/satui/satapp/inc/satappinputprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* 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: Provides input methods like query dialogs -* -*/ - -#ifndef SATAPPINPUTPROVIDER_H -#define SATAPPINPUTPROVIDER_H - -// includes -#include -#include -#include - -// forward declarations -class HbDialog; -class SatAppAction; -class QTimer; - -class SatAppInputProvider : public QObject -{ - Q_OBJECT - -public: - SatAppInputProvider(QObject *parent = 0); - virtual ~SatAppInputProvider(); - -public slots: - - /** requests user to enter a SINGLE key, character or digit */ - void getInkey(SatAppAction& action); - - /** requests user to enter a STRING of free text, number or password etc. */ - void getInput(SatAppAction& action); - - /** Resets the UI state commits pending server requests if any */ - void resetState(); - -private slots: - - /** update the actions when content in getinput changed */ - void updateQueryAction(); - /** update the actions according the text */ - void updateQueryAction(QString text); - /** get the input key in get inkey */ - void transmitInkeyFromDialog(); - /** get the input key in get inkey immediate */ - void transmitInkeyImmediately(QString text); - /** get the input key in get inkey yesno query */ - void transmitInkeyTrue(); - /** get the input key in get inkey yesno query */ - void transmitInkeyFalse(); - /** get the get input string */ - void transmitStringFromDialog(); - /** clear the query timeout timer */ - void clearDurationTimer(); - -private: // private implementation - - /** show get inkey query */ - void showGetInkeyQuery(const QString &aHeading, - TSatCharacterSet aCharacterSet, int aDuration); - /** show get inkey immediate query */ - void showGetImmediateQuery(const QString &aHeading, int aDuration); - /** show get inkey yes no query */ - void showGetYesNoQuery(const QString &aText, int aDuration); - - /** show get input query */ - void showGetInputQuery(const QString &heading, const QString &content, - TSatCharacterSet characterSet, int minLength, int maxLength, - bool aHideInput); - /** dialog type */ - enum DialogMode { - GetInkey, - GetYesNo, - GetImmediate, - GetInput}; - - /** update dialog according type */ - void composeDialog(HbDialog *dlg, DialogMode mode); - /** set the get inkey result to action */ - void transmitInkey(int key); - /** start dialog timeout timer */ - void startDurationTimer(int duration); - -private: - /** not own */ - SatAppAction* mCurrentAction; - /** own */ - HbDialog* mCurrentDialog; - /** own */ - QTime mInputTimer; - /** own */ - QTimer* mDurationTimer; - - /**for unit testing */ - friend class InputProviderTest; -}; - -#endif /* SATAPPINPUTPROVIDER_H */ diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satappmainhandler.h --- a/satui/satapp/inc/satappmainhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* 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: -* -* -*/ - -#ifndef SATAPPMAINHANDLER_H -#define SATAPPMAINHANDLER_H - -#include -#include - -class HbMainWindow; -class HbMessageBox; -class SatAppServerDispatcher; -class SatAppMenuProvider; -class SatAppInputProvider; -class SatAppToneProvider; -class SatAppPopupProvider; -class SatAppConfirmProvider; - -class SatAppMainHandler : public QObject -{ - Q_OBJECT - -public: - SatAppMainHandler(HbMainWindow &window, QObject *parent = 0); - ~SatAppMainHandler(); - void showOfflineWarning(); - -private: - void initConnections(); - -private slots: - void updateActivity(); - void saveActivity(); - -private: - void removeActivity(); - bool isOffline(); -private: // data - - SatAppServerDispatcher* mServer; - SatAppMenuProvider* mMenu; - SatAppInputProvider* mInput; - SatAppToneProvider* mTone; - SatAppPopupProvider* mPopup; - SatAppConfirmProvider *mConfirm; - QVariantHash mActivity; - - HbMessageBox *mOfflineWarningDlg; -}; - -#endif // SATAPPMAINHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satappmenuprovider.h --- a/satui/satapp/inc/satappmenuprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* 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: Provides and maintains SAT main view (selection list)s -* -*/ - -#ifndef SATAPPMENUPROVIDER_H -#define SATAPPMENUPROVIDER_H - -#include -#include //for TSatUiResponse - -class SatAppAction; -class HbMainWindow; -class HbListWidgetItem; -class HbView; -class QEventLoop; -class QTimer; -class HbMainWindow; -class HbAction; -class HbListWidget; -class HbLabel; -class QPixmap; - -class SatAppMenuProvider : public QObject -{ - Q_OBJECT - -public: - - SatAppMenuProvider(HbMainWindow *window, QObject *parent = 0); - - virtual ~SatAppMenuProvider(); - - /** takes a screen shot of the menu */ - QPixmap takeScreenShot(); - -public slots: - - /** signal request to display a menu */ - void setUpMenu(SatAppAction &action); - - /** requests a list selection menu to be displayed */ - void selectItem(SatAppAction &action); - - void resetState(); - -private slots: - void menuItemSelected(HbListWidgetItem *item); - -private: - - void loadMainView(); - void switchView(); - void connectItem(); - void disconnectItem(); - -private: - - QList mObjects; - HbMainWindow *mMainWindow; - HbView *mSetupMenuView; - HbView *mSelectItemView; - HbAction *mSoftKeyQuitAction; - HbAction *mSoftKeyBackAction; - HbListWidget *mListWidget; - HbListWidget *mSelectListWidget; - HbLabel *mSubTitle; - SatAppAction* mCurrentAction; // not own - - // for unit testing - friend class MenuProviderTest; -}; - -#endif /* SATAPPMENUPROVIDER_H */ diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satapppopupprovider.h --- a/satui/satapp/inc/satapppopupprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* 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: Provides SAT popups info and progress notes -* -*/ - -#ifndef SATAPPPOPUPPROVIDER_H -#define SATAPPPOPUPPROVIDER_H - -// includes -#include - -// forward declarations -class HbMessageBox; -class HbDialog; -class HbDeviceMessageBox; -class SatAppAction; - -class SatAppPopupProvider : public QObject -{ - Q_OBJECT - -public: - SatAppPopupProvider(QObject *parent = 0); - virtual ~SatAppPopupProvider(); - -public slots: - - /** displays a text note on screen */ - void displayText(SatAppAction &action); - - /** shows a simple notification about an ongoing operation */ - void notification(SatAppAction &action); - - /** requests any ongoing wait note to be dismissed */ - void stopShowWaitNote(); - - /** show a error note for send ss command */ - void showSsErrorNote(); - - /** requests any ongoing wait note and display text to be dismissed */ - void clearScreen(); - - /** reset some data members */ - void resetState(); - -private: - QString alphaId(SatAppAction &action); - void showBIPWaitNote(SatAppAction &action); - void showCloseChannelWaitNote(SatAppAction &action); - void showMoSmControlNote(SatAppAction &action); - void showSatInfoNote(SatAppAction &action); - void showSmsWaitNote(SatAppAction &action); - void showCallControlNote(SatAppAction &action); - void showDtmfWaitNote(SatAppAction &action); - void showSsWaitNote(SatAppAction &action); - -private: - HbMessageBox *mDisplayText; - HbDialog *mWaitDialog; - HbDeviceMessageBox *mWaitDeviceDialog; - SatAppAction *mAction; - - // for unit testing - friend class PopupProviderTest; -}; - -#endif /* SATAPPPOPUPPROVIDER_H */ diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satappserverdispatcher.h --- a/satui/satapp/inc/satappserverdispatcher.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,209 +0,0 @@ -/* -* 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: Receives UI commands from SAT server and converts to QT -* -*/ - -#ifndef SATAPPSERVERDISPATCHER_H -#define SATAPPSERVERDISPATCHER_H - -#include -#include -#include -#include - -// forward declarations -class SatAppAction; - -class SatAppServerDispatcher: public QObject, public MSatUiObserver -{ - Q_OBJECT - -public: - - SatAppServerDispatcher(QObject *parent = 0); - - virtual ~SatAppServerDispatcher(); - -signals: - - /** signal request to display a menu */ - void setUpMenu(SatAppAction &action); - - /** requests a list selection menu to be displayed */ - void selectItem(SatAppAction &action); - - /** Requtes a text to be displayed to the user*/ - void displayText(SatAppAction &action); - - /** requests a key input to be displayed */ - void getInkey(SatAppAction &action); - - /** requests a string input to be displayed */ - void getInput(SatAppAction &action); - - /** Requests tone to be played */ - void playTone(SatAppAction &action); - - /** requests a confirm string to be displayed */ - void confirmCommand(SatAppAction &action); - - /** Requests an info notification or wait/status note */ - void notification(SatAppAction &action); - - /** requests any ongoing wait note to be dismissed */ - void stopShowWaitNote(); - - /** requests all ongoing activities to be cleared on SAT UI */ - void clearScreen(); - - /** requests to show ss error note*/ - void showSsErrorNote(); - -public slots: - - /** - * Response to the Set Up Menu command. - * @param aMenuItem The selected menu item. - * @param aHelpRequested Indicates whether help was requested. - */ - void menuSelection(SatAppAction* action); - - /** - * User cancel response, Send DTMF, Send Data, Receive Data - */ - void userCancelSession(SatAppAction* action); - - - // **************************************************************************** - // * ************************************************************************ * - // * * SYMBIAN PART * * - // * ************************************************************************ * - // **************************************************************************** - -private: - - void ConnectSatSessionL(); - void DisconnectSatSession(); - -public: // from MSatUiObserver - - /** - * see msatuiobserver.h - */ - TSatUiResponse DisplayTextL( const TDesC& aText, - const TDesC& aSimApplicationName, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed, - const TBool aSustainedText, - const TTimeIntervalSeconds aDuration, - const TBool aWaitUserToClear ); - - /** - * see msatuiobserver.h - */ - TSatUiResponse GetInkeyL( const TDesC& aText, - const TSatCharacterSet aCharacterSet, TChar& aInput, - const TBool aHelpIsAvailable, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed, - TUint& aDuration, - const TBool aImmediateDigitResponse ); - - /** - * see msatuiobserver.h - */ - TSatUiResponse GetInputL( const TDesC& aText, - const TSatCharacterSet aCharacterSet, TDes& aInput, - const TInt aMinLength, const TInt aMaxLength, - const TBool aHideInput, - const TBool aHelpIsAvailable, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed ); - - /** - * see msatuiobserver.h - */ - TSatUiResponse SetUpMenuL( const TDesC& aText, - const MDesCArray& aMenuItems, - const CArrayFixFlat* aMenuItemNextActions, - const TBool aHelpIsAvailable, - const TSatIconId& aIconId, - const CArrayFixFlat* aMenuIcons, - const enum TSatIconQualifier aIconListQualifier, - const enum TSatSelectionPreference aSelectionPreference ); - - /** - * see msatuiobserver.h - */ - TSatUiResponse SelectItemL( const TDesC& aText, - const MDesCArray& aMenuItems, - const CArrayFixFlat* aMenuItemNextActions, - const TInt aDefaultItem, TUint8& aSelection, - const TBool aHelpIsAvailable, - const TSatIconId& aIconId, - const CArrayFixFlat* aMenuIcons, - const enum TSatIconQualifier aIconListQualifier, - TBool& aRequestedIconDisplayed, - const enum TSatSelectionPreference aSelectionPreference ); - - /** - * see msatuiobserver.h - */ - TSatUiResponse PlayTone( const TDesC& aText, - const TSatTone aTone, - const TTimeIntervalMicroSeconds aDuration, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed ); - - /** - * see msatuiobserver.h - */ - void ConfirmCommand( - const TSatSQueryCommand aCommandId, - const TSatAlphaIdStatus aAlphaIdStatus, - const TDesC& aText, - const TDesC& aAdditionalText, - TBool& aActionAccepted, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed, - TBool& aTerminatedByUser ); - - /** - * see msatuiobserver.h - */ - TSatUiResponse Notification( - const TSatSNotifyCommand aCommandId, - const TSatAlphaIdStatus aAlphaIdStatus, - const TDesC& aText, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed, - const TSatControlResult aControlResult ); - - /** - * see msatuiobserver.h - */ - void EventNotification( - const TSatSEvent aEventId, - const TSatSEventStatus aEventStatus, - const TInt aError ); - -private: - - RSatUiSession iSat; - RSatSession iSatSession; - -}; - -#endif //SATAPPSERVERDISPATCHER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/inc/satapptoneprovider.h --- a/satui/satapp/inc/satapptoneprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* -* 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: -* -*/ -#ifndef SATAPPTONEPROVIDER_H -#define SATAPPTONEPROVIDER_H - -// includes -#include -#include -#include -#include //for TSatUiResponse -#include //MMdaAudioToneObserver -#include //MMdaAudioPlayerCallback - -// forward declarations -class QTimer; -class HbMessageBox; -class CMdaAudioToneUtility; -class CMdaAudioPlayerUtility; -class SatAppAction; - - -class SatAppToneProvider: - public QObject, - public MMdaAudioToneObserver, - public MMdaAudioPlayerCallback -{ - Q_OBJECT - -public: - - SatAppToneProvider(QObject *parent = 0); - virtual ~SatAppToneProvider(); - -public slots: - - void playTone(SatAppAction& action); - - void clearScreen(); - -private: - - enum State {Idle,PlayStandardTone,PlayUserSelectedTone}; - - State recognizeTone( - int tone, - QByteArray& sequence, - int& duration); - QByteArray charArrayToByteArray( - const char tone[], - int size); - void playStandardTone( - const QString& text, - const QByteArray& sequence, - int duration); - void playUserSelectedTone( - const QString& text, - int tone, - int duration); - -public slots: - /** - * Resets the UI state within the tone provider, - * commits pending server requests if any - */ - void resetState(); - -private slots: - - void stopPlayTone(); - -// **************************************************************************** -// * ************************************************************************ * -// * * SYMBIAN PART * * -// * ************************************************************************ * -// **************************************************************************** - -private: - - void SymbianPrepareAudioToneUtilityL(const TDesC8& sequence); - void SymbianStopAudioToneUtility(); - void SymbianPrepareAudioPlayerL(int tone, int duration); - void SymbianStopAudioPlayer(); - void GetProfileParamsL( - int tone=ESatToneNotSet, TDes* toneName=NULL ); - -public: // from MMdaAudioToneObserver - - void MatoPrepareComplete( TInt aError ); - void MatoPlayComplete( TInt aError ); - -public: //from MMdaAudioPlayerCallback - - void MapcInitComplete( TInt aError, - const TTimeIntervalMicroSeconds& aDuration ); - void MapcPlayComplete( TInt aError ); - - -private: // Data - - State mState; - SatAppAction* mCurrentAction; - - bool mWarningAndPlayTones; - int mVolume; - CMdaAudioToneUtility *mPlayer; - TSatUiResponse mPlayToneError; - QTimer *mTimer; - HbMessageBox *mPermanentNote; - CMdaAudioPlayerUtility *mAudioPlayer; - - // for unit testing - friend class ToneProviderTest; -}; - -#endif //SATAPPTONEPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/loc/satui.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/loc/satui.loc Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,299 @@ +/* +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This is a localisation file for SatUi +* A .loc file is the one and only place where the logical strings +* to be localised are defined. +* +*/ + + +/** + * Default (implementation English) Resource localisation file for + * SatUi application information resource SatUi.rss. + */ + +// LOCALISATION STRINGS + +//d:SatUi application name in Application Shell +//l:list_single_large_graphic_pane_t1 +//w: +//r:2.8 +// +#define qtn_apps_simapps_list "SIM services" + +//d:SatUi application name in Application Shell +//l:cell_app_pane_t1 +//w: +//r:2.8 +// +#define qtn_apps_simapps_grid "SIM services" + +//d:SatUi application title +//l:title_pane_t2/opt9 +//w: +//r:2.8 +// +#define qtn_sat_title "SIM services" + +//d:SIM message header in the popup window +//l:heading_pane_t1 +//w: +//r:2.8 +// +#define qtn_sat_message_header "SIM note:" + +//d:SIM help header in the popup window +//l:heading_pane_t1 +//w: +//r:2.8 +// +#define qtn_sat_help_header "SIM help:" + +//d:Prompt text for Get Inkey data query if alpha entry is expected +//l:popup_query_data_window +//w: +//r:2.8 +// +#define text_simatk_enter_char "Enter:\n(1 character)" + +//d:Prompt text for Get Inkey data query if numeric entry is expected +//l:popup_query_data_window +//w: +//r:2.8 +// +#define text_simatk_enter_nbr "Enter:\n(1 digit 0-9)" + +//d:Prompt text for Get Input data query if alpha entry is expected +//l:popup_query_data_window +//w: +//r:2.8 +// +#define text_simatk_enter_char_string "Enter:" + +//d:Prompt text for Get Input data query if numeric entry is expected +//l:popup_query_data_window +//w: +//r:2.8 +// +#define text_simatk_enter_nbr_string "Enter:\n(number)" + +//d:SMS sending procedure is confirmed with a confirmation query +//d:with this text +//l:popup_note_window +//w: +//r:2.8 +// +#define text_simatk_send_sms "Allow SIM card to send a message?" + +//d:SMS sending procedure is indicated with an information note +//d:with this text +//l:popup_note_window +//w: +//r:2.8 +// +#define qtn_sat_note_sms_send "SMS sending by SIM" + +//d:SMS sending procedure is notified to the user with a wait note +//d:with this text +//l:popup_note_wait_window +//w: +//r:2.8 +// +#define qtn_sat_sending_sms "Sending..." + +//d:SS sending procedure is confirmed with a confirmation note with this text +//l:popup_note_window +//w: +//r:2.8 +// +#define text_simatk_send_ss "Allow SIM card to send a request to the network?" + +//d:Setting up call procedure is confirmed with a confirmation note +//d:with this text +//d:%0U is the name of SIM application or qtn_sat_query_title +//l:popup_note_window +//w: +//r:2.8 +// +#define text_call_setup_by_simatk "%U about to call" + +//d:Part of the text text_call_setup_by_simatk (see above) +//l:popup_note_window +//w: +//r:2.8 +// +#define qtn_sat_query_title "SIM services" + +//d:Refresh is confirmed with a confirmation note with this text +//l:popup_note_window +//w: +//r:2.8 +// +#define qtn_sat_query_allow_reset "Allow SIM update?" + +//d:The refresh is notified to the user with a wait note with this text +//l:popup_note_wait_window +//w: +//r:2.8 +// +#define qtn_sat_wait_refresh_update "SIM card updating" + +//d:Command text associated to an item in the Options Menu +//d:Selects the item in focus in the main pain +//l:list_single_pane_t1_cp2 +//w: +//r:2.8 +// +#define qtn_sat_option_send "Send" + +//d:Command text associated to an item in the Options Menu +//d:Selects the item in focus in the main pain +//l:list_single_pane_t1_cp2 +//w: +//r:2.8 +// +#define qtn_sat_option_play_tone "Play" + +//d:Command text associated to an item in the Options Menu +//d:Selects the item in focus in the main pain +//l:list_single_pane_t1_cp2 +//w: +//r:2.8 +// +#define qtn_sat_option_read "Read" + +//d:Command text associated to an item in the Options Menu +//d:Selects the item in focus in the main pain +//l:list_single_pane_t1_cp2 +//w: +//r:2.8 +// +#define qtn_sat_option_goto "Go to" + +/** + * Default (implementation English) Resource localisation file for + * SatUi application information resource SatUi.rss. + * Additional texts introduced during SAT joint development + * Moved from satuiadd.loc + */ + +//d:It is wait note during DTMF sending procedure. +//d:%U is replaced with the DTMF string to be sent. +//l:popup_note_wait_window +//w: +//r:2.8 +// +#define qtn_sat_note_sending_dtmf_template "Sending\n%U" + +//d:It is information note after SIM Toolkit's +//d:Mobile Outgoing Short Message Control +//d:has modified a short message request. +//l:popup_note_window +//w: +//r:2.8 +// +#define qtn_sat_request_modified "Request modified" + +//d:Information note about Call Control +//d:shows a message to user that call +//d:control has not allowed the action +//l:popup_note_window +//w: +//r:2.8 +// +#define qtn_sat_cc_not_allowed "Request not allowed" + +//d:Information note about Call Control +//d:shows a message to user that call +//d:control has changed the call +//l:popup_note_window +//w: +//r:2.8 +// +#define qtn_sat_cc_modified "Request Modified" + +//d:Information note about No response timeout +//d:shows a message to user that timeout +//d:has expired for input +//l:popup_note_window +//w: +//r:2.8 +// +#define qtn_sat_timeout "Timeout!" + +//d:Open Channel is confirmed with a confirmation note with this text +//l:popup_note_window +//w: +//r:3.0 +// +#define qtn_sat_conf_open_channel_bip "Open connection?" + +//d:Receive data procedure is notified to the user with a wait note +//l:popup_note_wait_window +//w: +//r:3.0 +// +#define qtn_sat_conf_receive_data_bip "Receiving data" + +//d:Send data procedure is notified to the user with a wait note +//l:list_single_popup_menu_pane_1 +//l:popup_note_wait_window +//w: +//r:3.0 +// +#define qtn_sat_conf_send_data_bip "Sending data" + +//d:Close Channel information note +//l:list_single_popup_menu_pane_1 +//l:popup_note_window +//w: +//r:3.0 +// +#define qtn_sat_conf_close_channel_bip "Connection closed" + +//d:Launch Browser is confirmed with this text +//l:popup_note_window +//w: +//r:3.0 +// +#define qtn_sat_conf_launch_brow "Open browser?" + +//d:Indicate SAT is not available +//l:popup_note_window +//w: +//r:3.0 +// +#define qtn_sat_services_not_available "SIM services not available" + +//d:Command text associated to the middle softkey +//l:control_pane_t3/opt7 +//w: +//r:3.2 +// +#define qtn_msk_call_sat "Call" + + +//d:Command text associated to the middle softkey +//l:control_pane_t3/opt7 +//w: +//r:3.2 +// +#define qtn_msk_read_sat "Read" + +//d:Command text associated to the middle softkey +//l:control_pane_t3/opt7 +//w: +//r:3.2 +// +#define qtn_msk_goto_sat "Go to" diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/resource/qtg_large_sat.svg --- a/satui/satapp/resource/qtg_large_sat.svg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/resource/sat_text_map.xls Binary file satui/satapp/resource/sat_text_map.xls has changed diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/resource/satapp.docml --- a/satui/satapp/resource/satapp.docml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/resource/satapp.qm Binary file satui/satapp/resource/satapp.qm has changed diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/resource/satapp.qrc --- a/satui/satapp/resource/satapp.qrc Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - satapp.docml - - - satapp.qm - - - qtg_large_sat.svg - - diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/resource/satapp.ts --- a/satui/satapp/resource/satapp.ts Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,268 +0,0 @@ - - - - - - Wait note text in message box. Displayed when something is being processed. - Processing - Processing - qtl_dialog_pri3_large_graphic - common - info - common - False - - - - Sending data - Sending data - qtl_dialog_pri3_large_graphic - simatk - dialog - simatk - False - - - notification dialog - Sending - Sending - qtl_dialog_pri3 - simatk - info - simatk - False - - - Default titlebar text - SIM Services - SIM Services - qtl_titlebar - simatk_02 - title - simatk - False - - - Button. Note! Use this text ID only if there are max. two buttons in the dialog. Allows the user to cancel the action or process. - Cancel - Cancel - qtl_dialog_softkey_2 - common - button - common - False - - - Default prompt text for input dialog - Enter:\n(number) - Enter:\n(number) - qtl_dialog_sec - simatk_06 - dialog - simatk - False - - - inputDialog label - Enter:\n(1 digit 0-9) - Enter:\n(1 digit 0-9) - qtl_dialog_sec - simatk_06 - dialog - simatk - False - - - title for CMCC - CMCC SIM Services - CMCC SIM Services - qtl_titlebar - simatk - title - simatk - False - - - Body text for note, shown when SAT App is opened but SAT is not supported (no SIM/offline/etc) - %1 about to call - %1 about to call - qtl_dialog_pri5_large_graphic - simatk_09 - info - simatk - False - - - list item in Application library - Short caption / grid view - SIM Services - SIM Services - qtl_grid_applications_sec - simatk_01 - grid - simatk - False - - - - Open browser? - - Open browser? - - qtl_dialog_pri5_large_graphic - simatk - dialog - simatk - False - - - - Receiving data - Receiving data - qtl_dialog_pri3_large_graphic - simatk - dialog - simatk - False - - - - Connection closed - Connection closed - qtl_dialog_pri3_large_graphic - simatk - dialog - simatk - False - - - Item in Task Switcher. - SIM Services - SIM Services - qtl_grid_taskswitcher_tiny - tsw_01 - caption - tsw - False - - - heading for dialog (input dialog, message box dialog) - SIM Services - SIM Services - qtl_dialog_pri_heading - simatk_03 - title - simatk - False - - - text for message box dialog - Open connection? - Open connection? - qtl_dialog_pri5_large_graphic - simatk - info - simatk - False - - - list item in Application library - Long caption / list view - SIM Services - SIM Services - qtl_list_pri_large_graphic - simatk_01 - dblist_1 - simatk - False - - - Default note body text if SIM doesn't provide one. Used when SIM does not allow a send SMS operation. Used also when SIM does not allow a Call/SendSS/SendUssd - Request not allowed - Request not allowed - qtl_notifdialog_pri2_medium_graphic - simatk - dpopinfo - simatk - False - - - inputDialog label - Enter: - Enter: - qtl_dialog_sec - simatk - dialog - simatk - False - - - notification dialog - Request modified - Request modified - qtl_notifdialog_pri2_medium_graphic - simatk - dpopinfo - simatk - False - - - inputDialog label - Enter:\n(1 character) - Enter:\n(1 character) - qtl_dialog_sec - simatk_05 - dialog - simatk - False - - - Default note body text if SIM doesn't provide one. Used when SIM modifies a send SMS operation (e.g. destination number) - SIM services not available - SIM services not available - qtl_notifdialog_pri2_medium_graphic - simatk - dpopinfo - simatk - False - - - Button. Note! Use this text ID only if there are max. two buttons in the dialog. Pressing this button confirms the selected operation. - Yes - Yes - qtl_dialog_softkey_2 - common - button - common - False - - - - Sending\n%U - Sending\n%U - qtl_dialog_pri5_large_graphic - simatk - dialog - simatk - False - - - Button. Note! Use this text ID only if there are max. two buttons in the dialog. Pressing this button rejects the selected operation. - No - No - qtl_dialog_softkey_2 - common - button - common - False - - - Button. Note! Use this text ID only if there are max. two buttons in the dialog. When this button is pressed, the focused item or operation will be selected or accepted. - OK - OK - qtl_dialog_softkey_2 - common - button - common - False - - - diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/rom/SatUiResources.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/rom/SatUiResources.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,30 @@ +/* +* Copyright (c) 2003-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: Sat UI Resources iby file. +* +*/ + + +#ifndef __SATUI_RESOURCES_IBY__ +#define __SATUI_RESOURCES_IBY__ + +#ifdef __SIMCARD + +S60_APP_CAPTION(SATUI) +//Resource file(s) for Satui +S60_APP_RESOURCE(SatUI) + +#endif + +#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/rom/satapp.iby --- a/satui/satapp/rom/satapp.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* 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: IBY file for satapp application -* -*/ - -#ifndef __SATAPP_IBY__ -#define __SATAPP_IBY__ - -#ifdef __SIMCARD -// SAT SHELL CONTROLLER -file=ABI_DIR\BUILD_DIR\satshellcntrl.dll SHARED_LIB_DIR\satshellcntrl.dll -file=ABI_DIR\BUILD_DIR\satapp.exe SHARED_LIB_DIR\satapp.exe - -data=DATAZ_\resource\apps\satapp.rsc resource\apps\satapp.rsc -data=DATAZ_\resource\apps\satapp.mif resource\apps\satapp.mif -data=ZSYSTEM\install\satapp_stub.sis system\install\satapp_stub.sis -data=ZPRIVATE\10003a3f\import\apps\satapp_reg.rsc private\10003a3f\import\apps\satapp_reg.rsc - -#endif - -#endif diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/rom/satapp.pkg --- a/satui/satapp/rom/satapp.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -; -; 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: For packing sat application update. -; - -; Language -&EN - -; Header -#{"satapp"}, (0x101f4ce0), 10, 1, 0, TYPE=PU - -; Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -; Localised Vendor name -;%{"Nokia, Qt Software"} - -; Unique Vendor name -;:"Nokia, Qt Software" - -; Dependencies -[0x101F7961],0,0,0,{"S60ProductID"} -[0x102032BE],0,0,0,{"S60ProductID"} -[0x102752AE],0,0,0,{"S60ProductID"} -[0x1028315F],0,0,0,{"S60ProductID"} -(0x2001E61C), 4, 5, 0, {"QtLibs pre-release"} - -; Executable and default resource files -"\epoc32\release\armv5\urel\satapp.exe" - "!:\sys\bin\satapp.exe" -"\epoc32\release\armv5\urel\satshellcntrl.dll" - "!:\sys\bin\satshellcntrl.dll" -"\epoc32\data\z\private\10003a3f\import\apps\satapp_reg.rsc" - "!:\private\10003a3f\import\apps\satapp_reg.rsc" -"\epoc32\data\z\resource\apps\satapp.mif" - "!:\resource\apps\satapp.mif" - diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/rom/satapp_stub.pkg --- a/satui/satapp/rom/satapp_stub.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -; -; Copyright (c) 2009-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: For packing sat application stub. -; -; Languages -&EN - -; Header -#{"satapp"}, (0x101f4ce0), 1, 0, 0, TYPE=SA - -; Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -; Files -""-"z:\sys\bin\satshellcntrl.dll" -""-"z:\sys\bin\satapp.exe" -""-"z:\resource\apps\satapp.rsc" -""-"z:\private\10003a3f\import\apps\satapp_reg.rsc" -""-"z:\resource\apps\satapp.mif" diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/rom/satapp_stub.sis Binary file satui/satapp/rom/satapp_stub.sis has changed diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/rom/satui.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satapp/rom/satui.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2003-2007 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: Sat UI iby file. +* +*/ + + +#ifndef __SATUI_IBY__ +#define __SATUI_IBY__ + +#ifdef __SIMCARD +S60_APP_EXE(SATUI) +S60_APP_AIF_ICONS(Satui) +S60_APP_BITMAP(Satui) + +// SAT SHELL CONTROLLER +file=ABI_DIR\BUILD_DIR\SATSHELLCNTRL.DLL SHARED_LIB_DIR\SATSHELLCNTRL.DLL + +// Application registration resource file +data=ZPRIVATE\10003a3f\apps\Satui_reg.rsc private\10003a3f\import\apps\Satui_reg.rsc + +// SAT Stub SIS +data=ZSYSTEM\install\SatApp_stub.sis System\Install\SatApp_stub.sis + +#endif + +#endif diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/satapp.pro --- a/satui/satapp/satapp.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -# -# 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: -# -# -# - -TEMPLATE = app -TARGET = satapp -DEPENDPATH += . -HEADERS += $$PUBLIC_HEADERS -MOC_DIR = moc - -CONFIG += hb - -ICON = resource/qtg_large_sat.svg -symbian: { - TARGET.CAPABILITY = CAP_APPLICATION NetworkControl - TARGET.UID3=0x101f4ce0 -} - -# enable this for tracing into a file (log/sat/satui.txt) -# DEFINES += SAT_DEBUG_TO_FILE -# LIBS += -lflogger - -INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \ - $$MOC_DIR \ - ../../inc - -LIBS += -lSatClient \ - -lSatInternalClient \ - -legul \ - -lfbscli \ - -lcentralrepository \ - -lCenRepNotifHandler \ - -lCdlEngine \ - -lmediaclientaudio \ - -lprofileeng \ - -lbafl - -HEADERS += inc/satappmainhandler.h \ - inc/satappserverdispatcher.h \ - inc/satappmenuprovider.h \ - inc/satappinputprovider.h \ - inc/satapptoneprovider.h \ - inc/satapppopupprovider.h\ - inc/satappconfirmprovider.h \ - inc/satappaction.h \ - inc/satappconstant.h - -SOURCES += src/main.cpp \ - src/satappmainhandler.cpp \ - src/satappserverdispatcher.cpp \ - src/satappmenuprovider.cpp \ - src/satappinputprovider.cpp \ - src/satapptoneprovider.cpp \ - src/satapppopupprovider.cpp \ - src/satappconfirmprovider.cpp \ - src/satappaction.cpp - -BLD_INF_RULES.prj_exports += "rom/satapp.iby CORE_MW_LAYER_IBY_EXPORT_PATH(satapp.iby)" \ - "rom/satapp_stub.sis /epoc32/data/z/system/install/satapp_stub.sis" \ - "resource/satapp.ts /epoc32/include/platform/qt/translations/satapp.ts" - - -RESOURCES += resource/satapp.qrc - diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/main.cpp --- a/satui/satapp/src/main.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* 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: satapp main -* -* -*/ - -#include -#include -#include -#include -#include -#include "satappmainhandler.h" - - -#ifdef SAT_DEBUG_TO_FILE - // ------------------------------------------------------------ - // this segment provides functionality that copies all QT debug - // output to RFileLogger, and also the standard QT debug stream - #include - #include - _LIT(KTfLogFolder, "sat"); - _LIT(KTfLogFile, "satui.txt"); - // original message handler - QtMsgHandler originalMsgHandler; - // debug redirection function - void qDebugToRFileLogger(QtMsgType type, const char *msg) - { - TPtrC8 symbian_msg((const TUint8*)msg); - RFileLogger::Write(KTfLogFolder,KTfLogFile, - EFileLoggingModeAppend,symbian_msg); - if (originalMsgHandler) originalMsgHandler(type,msg); - } - // ------------------------------------------------------------ -#endif - - - -int main(int argc, char *argv[]) -{ -#ifdef SAT_DEBUG_TO_FILE - originalMsgHandler = qInstallMsgHandler(qDebugToRFileLogger); -#endif - - qDebug("SATAPP: main"); - - HbApplication app(argc, argv); - qDebug("SATAPP: main app created"); - - QTranslator translator; - bool ok = translator.load(":/translations/satapp"); - qDebug("SATUI: main, translation %d (1=OK, 0=fail)", ok ); - app.installTranslator(&translator); - - HbMainWindow window; - qDebug("SATAPP: main window created"); - - SatAppMainHandler *mainHandler = new SatAppMainHandler(window); - - window.show(); - qDebug("SATAPP: main view showed"); - - int result = app.exec(); - qDebug("SATAPP: main exit %d", result); - - delete mainHandler; - return result; -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/satappaction.cpp --- a/satui/satapp/src/satappaction.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -/* -* 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: -* -* -*/ - -#include -#include -#include -#include -#include - -#include "satappaction.h" - -// ---------------------------------------------------------------------------- -// global des2str -// trasmit from symbian descripter to QString -// ---------------------------------------------------------------------------- -// -QString des2str(const TDesC& desc) -{ - return QString::fromUtf16(desc.Ptr(), desc.Length()); -} - -// ======== MEMBER FUNCTIONS ================================================== - -// ---------------------------------------------------------------------------- -// SatAppAction::SatAppAction -// ---------------------------------------------------------------------------- -// -SatAppAction::SatAppAction(int action, QObject *parent) -: QObject(parent) -{ - qDebug("SATAPP: SatAppAction::SatAppAction"); - mAction = action; - mResponse = ESatNoResponseFromUser; - mState = Active; - - //monitor application - SAT_ASSERT(connect( - qApp,SIGNAL(aboutToQuit()), - this,SLOT(completeWithSessionTerminated()))); -} - -// ---------------------------------------------------------------------------- -// SatAppAction::~SatAppAction -// ---------------------------------------------------------------------------- -// -SatAppAction::~SatAppAction() -{ - if (mState==Waiting) - complete(); // release waiting thread -} - -// ---------------------------------------------------------------------------- -// SatAppAction::waitUntilCompleted -// sync method that returns when this action is completed -// ---------------------------------------------------------------------------- -// -void SatAppAction::waitUntilCompleted() -{ - qDebug("SATAPP: SatAppAction::waitUntilCompleted"); - if (mState==Completed) return; // no need to wait! - QEventLoop loop; - SAT_ASSERT(connect( - this,SIGNAL(actionCompleted(SatAppAction*)), - &loop,SLOT(quit()))); - mState=Waiting; - qDebug("SATAPP: waitUntilCompleted: waiting..."); - loop.exec(); - // When use the FSW complete the satapp, the signal aboutToExit - // can not be recieved. temp solution - if(Waiting == mState){ - mState=Completed; - mResponse=ESatSessionTerminatedByUser; - } - qDebug("SATAPP: waitUntilCompleted: ...released"); -} - -// ---------------------------------------------------------------------------- -// SatAppAction::complete -// completes the action -// ---------------------------------------------------------------------------- -// -void SatAppAction::complete(TSatUiResponse resp) -{ - qDebug("SATAPP: SatAppAction::complete resp= %x in", resp); - if (mState!=Completed) { - qDebug("SATAPP: SatAppAction::completed"); - setResponse(resp); - mState = Completed; - emit actionCompleted(this); - } - qDebug("SATAPP: SatAppAction::complete resp= %x out", resp); -} - -// ---------------------------------------------------------------------------- -// SatAppAction::set -// setter for QVariant -// ---------------------------------------------------------------------------- -// -void SatAppAction::set(const QString& key, QVariant value) -{ - qDebug() << "SATAPP: SatAppAction::set(" << - key << "=" << value << ")"; - mParams[key] = value; -} - -// ---------------------------------------------------------------------------- -// SatAppAction::set -// setter for Symbian Descripter -// ---------------------------------------------------------------------------- -// -void SatAppAction::set(const QString& key, const TDesC& value) -{ - set(key,des2str(value)); -} - -// ---------------------------------------------------------------------------- -// SatAppAction::set -// setter for Symbian MDesCArray - Menu list -// ---------------------------------------------------------------------------- -// -void SatAppAction::set(const QString& key, const MDesCArray& value) -{ - QList list; - for(int i=0; i - mene icon -// ---------------------------------------------------------------------------- -// -void SatAppAction::set(const QString& key, CArrayFixFlat& value) -{ - QList list; - for(int i=0; imillisec - set(key,value_millisec); -} - -// ---------------------------------------------------------------------------- -// SatAppAction::set -// setter for TTimeIntervalMicroSeconds - duration -// ---------------------------------------------------------------------------- -// -void SatAppAction::set(const QString& key, TTimeIntervalMicroSeconds& value) -{ - int value_millisec = value.Int64() / 1000; // microsec->millisec - set(key,value_millisec); -} - -// ---------------------------------------------------------------------------- -// SatAppAction::value -// getter by key -// ---------------------------------------------------------------------------- -// -QVariant SatAppAction::value(const QString& key) -{ - if (!mParams.contains(key)) - { - // lazy-fetch params implementation goes here. - // for instance if Icon is requested, request for the icons here. - // however at this moment, all parameters should be present. - qFatal("SATAPP: SatAppAction::value - param missing: %s", - key.toLatin1().data()); - } - return mParams[key]; -} - -// ---------------------------------------------------------------------------- -// SatAppAction::hasValue -// ---------------------------------------------------------------------------- -// -bool SatAppAction::hasValue(const QString& key) -{ - return mParams.contains(key); -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/satappconfirmprovider.cpp --- a/satui/satapp/src/satappconfirmprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,195 +0,0 @@ -/* -* 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: -* -*/ - -// qt -#include -// hb -#include -#include -// satapp -#include "satappconfirmprovider.h" -#include "satappconstant.h" -#include "satappaction.h" - -// ---------------------------------------------------------------------------- -// SatAppConfirmProvider::SatAppConfirmProvider -// ---------------------------------------------------------------------------- -// -SatAppConfirmProvider::SatAppConfirmProvider(QObject *parent) - : QObject(parent), mConfirmQuery(0), mAction(0) -{ - qDebug("SATAPP: SatAppConfirmProvider::SatAppConfirmProvider"); -} - -// ---------------------------------------------------------------------------- -// SatAppConfirmProvider::~SatAppConfirmProvider -// ---------------------------------------------------------------------------- -// -SatAppConfirmProvider::~SatAppConfirmProvider() -{ - qDebug("SATAPP: SatAppConfirmProvider::~SatAppConfirmProvider >"); - delete mConfirmQuery; - mConfirmQuery = 0; - qDebug("SATAPP: SatAppConfirmProvider::~SatAppConfirmProvider <"); -} - -// ---------------------------------------------------------------------------- -// SatAppConfirmProvider::showOpenChannelConfirm -// ---------------------------------------------------------------------------- -// -void SatAppConfirmProvider::confirmCommand(SatAppAction &action) -{ - qDebug("SATAPP: SatAppConfirmProvider::confirmCommand >"); - mAction = &action; - delete mConfirmQuery; - mConfirmQuery = 0; - TSatSQueryCommand aCommandId = - static_cast(action.value(KeyQueryCommandId).toInt()); - - qDebug("SATAPP: SatAppConfirmProvider::ConfirmCommand aCommandId: %d", - aCommandId); - // Check quering command - switch (aCommandId) - { - case ESatOpenChannelQuery: - { - qDebug("SATAPP: SatAppConfirmProvider::ConfirmCommand:\ - Quering OpenChannel"); - showOpenChannelConfirm(action); - break; - } - case ESatSSetUpCallQuery: - { - qDebug("SATAPP: SatAppConfirmProvider::ConfirmCommand:\ - Quering SetUpCall"); - showSetUpCallConfirm(action); - break; - } - // TODO: implemente later - case ESatSRefreshQuery: - // TODO: implemente later - case ESatSLaunchBrowserQuery: - { - action.completeWithNoResponse(); - break; - } - default: - { - qDebug("SATAPP: SatAppConfirmProvider::ConfirmCommand:\ - Unknown quering command"); - action.completeWithNoResponse(); - } - break; - } - qDebug("SATAPP: SatAppConfirmProvider::ConfirmCommand <"); -} - -// ---------------------------------------------------------------------------- -// SatAppConfirmProvider::showOpenChannelConfirm -// ---------------------------------------------------------------------------- -// -void SatAppConfirmProvider::showOpenChannelConfirm(SatAppAction &action) -{ - qDebug("SATAPP: SatAppConfirmProvider::showOpenChannelConfirm >"); - QString content = action.value(KeyText).toString(); - if (!content.length()){ - content = hbTrId("txt_simatk_info_open_connection"); - } - mConfirmQuery = new HbMessageBox(HbMessageBox::MessageTypeQuestion); - // Sets the "Yes"-action/button - mConfirmQuery->setText(content); - mConfirmQuery->setStandardButtons(HbMessageBox::Ok | HbMessageBox::Cancel); - SAT_ASSERT(connect(mConfirmQuery->actions().at(0), SIGNAL(triggered()), - &action, SLOT(completeWithSuccess()))); - SAT_ASSERT(connect(mConfirmQuery->actions().at(1), SIGNAL(triggered()), - &action, SLOT(completeWithBackRequested()))); - SAT_ASSERT(connect(mAction, SIGNAL(actionCompleted(SatAppAction *)), - this, SLOT(resetState()))); - qDebug("SATAPP: SatAppUiProvider::showOpenChannelConfirm before open"); - mConfirmQuery->open(); - qDebug("SATAPP: SatAppConfirmProvider::showOpenChannelConfirm <"); -} - -// ---------------------------------------------------------------------------- -// SatAppConfirmProvider::showSetUpCallConfirm -// ---------------------------------------------------------------------------- -// -void SatAppConfirmProvider::showSetUpCallConfirm(SatAppAction &action) -{ - qDebug("SATAPP: SatAppConfirmProvider::showSetUpCallConfirm >"); - QString text = action.value(KeyText).toString(); - QString additionText = action.value(KeyAdditionalText).toString(); - QString alphaId; - if (text.length() == 0) { - qDebug("SATAPP: SatAppConfirmProvider::showSetUpCallConfirm length 0"); - alphaId = hbTrId("txt_simatk_info_1_about_to_call"); - if (additionText.length() > 0) { - alphaId = alphaId.arg(additionText); - } else { - alphaId = alphaId.arg(hbTrId("txt_simatk_title_sim_services")); - } - } else { - qDebug("SATAPP: SatAppConfirmProvider::showSetUpCallConfirm text"); - alphaId.append(text); - } - qDebug("SATAPP: SatAppConfirmProvider::showSetUpCallConfirm new"); - mConfirmQuery = new HbMessageBox(HbMessageBox::MessageTypeQuestion); - mConfirmQuery->setStandardButtons(HbMessageBox::Ok | HbMessageBox::Cancel); - mConfirmQuery->setText(alphaId); - SAT_ASSERT(connect(mConfirmQuery->actions().at(0), SIGNAL(triggered()), - &action, SLOT(completeWithSuccess()))); - SAT_ASSERT(connect(mConfirmQuery->actions().at(1), SIGNAL(triggered()), - &action, SLOT(completeWithBackRequested()))); - SAT_ASSERT(connect(mAction, SIGNAL(actionCompleted(SatAppAction *)), - this, SLOT(resetState()))); - qDebug("SATAPP: SatAppConfirmProvider::showSetUpCallConfirm before open"); - mConfirmQuery->open(); - qDebug("SATAPP: SatAppConfirmProvider::showSetUpCallConfirm <"); -} - -// ---------------------------------------------------------------------------- -// SatAppConfirmProvider::clearScreen -// ---------------------------------------------------------------------------- -// -void SatAppConfirmProvider::clearScreen() -{ - qDebug("SATAPP: SatAppConfirmProvider::clearScreen >"); - if (mAction) { - SAT_ASSERT(disconnect(mAction, SIGNAL(actionCompleted(SatAppAction *)), - this, SLOT(resetState()))); - qDebug("SATAPP: SatAppConfirmProvider::clearScreen quit event loop"); - mAction->completeWithNoResponse(); - mAction = 0; - } - delete mConfirmQuery; - mConfirmQuery = 0; - qDebug("SATAPP: SatAppConfirmProvider::clearScreen <"); -} - -// ---------------------------------------------------------------------------- -// SatAppConfirmProvider::resetState -// reset -// ---------------------------------------------------------------------------- -// -void SatAppConfirmProvider::resetState() -{ - qDebug( "SATAPP: SatAppConfirmProvider::resetState >" ); - mAction = 0; - qDebug( "SATAPP: SatAppConfirmProvider::resetState <" ); -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/satappinputprovider.cpp --- a/satui/satapp/src/satappinputprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,636 +0,0 @@ -/* -* 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: Provides input methods like query dialogs -* -*/ - -// qt -#include -#include -// hb -#include -#include -#include -#include -#include -#include -#include -// satapp -#include "satappinputprovider.h" -#include "satappconstant.h" -#include "satappaction.h" - - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::SatAppInputProvider -// ---------------------------------------------------------------------------- -// -SatAppInputProvider::SatAppInputProvider(QObject *parent) - : QObject(parent), mCurrentAction(0), mCurrentDialog(0) -{ - qDebug("SATAPP: SatAppInputProvider::SatAppInputProvider >"); - mDurationTimer = new QTimer(this); - qDebug("SATAPP: SatAppInputProvider::SatAppInputProvider <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::~SatAppInputProvider -// ---------------------------------------------------------------------------- -// -SatAppInputProvider::~SatAppInputProvider() -{ - qDebug("SATAPP: SatAppInputProvider::~SatAppInputProvider >"); - delete mCurrentDialog; - mCurrentDialog = 0; - qDebug("SATAPP: SatAppInputProvider::~SatAppInputProvider <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::getInkey -// requests user to enter a SINGLE key, character or digit -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::getInkey(SatAppAction& action) -{ - qDebug("SATAPP: SatAppInputProvider::getInkey >"); - - delete mCurrentDialog; - mCurrentDialog=0; - - QString heading = action.value(KeyText).toString(); - qDebug() << "SATAPP: getInkey: heading=" << heading; - - TSatCharacterSet characterSet = - static_cast(action.value(KeyCharacterSet).toInt()); - - qDebug("SATAPP: SatAppInputProvider::getInkey char set %d", characterSet); - - // yes no query must have text. - if ((0 == heading.length()) && (ESatYesNo == characterSet)) { - action.completeWithFailure(); - return; - } - - // duration - int duration = action.value(KeyDuration).toInt(); - if (duration == 0) { - duration = KDefaultSelectionTimeoutMseconds; - } - qDebug("SATAPP: getInkey: duration=%d", duration); - mInputTimer.start(); - - if (heading.isEmpty()) { - if (ESatDigitOnly == characterSet) { - heading = hbTrId("txt_simatk_dialog_entern1_digit_09"); - } else { - // ESatCharSmsDefaultAlphabet or ESatCharUcs2Alphabet - heading = hbTrId("txt_simatk_dialog_entern1_character"); - } - } - qDebug() << "SATAPP: getInkey: heading=" << heading; - - mCurrentAction = &action; - bool immediate = action.value(KeyImmediate).toBool(); - qDebug() << "SATAPP: getInkey: immediate=" << immediate; - - if (characterSet == ESatYesNo) { - //Yes no imediate will be combine with YES no. - showGetYesNoQuery(heading, duration); - } - else if (immediate) { - // we only have digit immediate - showGetImmediateQuery(heading, duration); - } - else { - // Reminder, there is no default inkey in get inkey - // proactive command. - showGetInkeyQuery(heading, characterSet, duration); - } - SAT_ASSERT(connect(mCurrentAction, SIGNAL(actionCompleted(SatAppAction*)), - this, SLOT(clearDurationTimer()))); - qDebug("SATAPP: SatAppInputProvider::getInkey <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::getInput -// requests user to enter a STRING of free text, number or password etc. -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::getInput(SatAppAction& action) -{ - qDebug("SATAPP: SatAppInputProvider::getInput >"); - - delete mCurrentDialog; - mCurrentDialog=0; - // character set - TSatCharacterSet characterSet = - static_cast(action.value(KeyCharacterSet).toInt()); - - qDebug("SATAPP: SatAppInputProvider::getInput char set %d", characterSet); - - // heading - QString heading = action.value(KeyText).toString(); - qDebug() << "SATAPP: getInput: heading=" << heading; - if (heading.isEmpty()) { - if (ESatDigitOnly == characterSet) { - heading = hbTrId("txt_simatk_dialog_entern1_digit_09"); - } else { - // ESatCharSmsDefaultAlphabet or ESatCharUcs2Alphabet - heading = hbTrId("txt_simatk_dialog_entern1_character"); - } - } - qDebug() << "SATAPP: getInput: heading=" << heading; - - // min length - int minLength = action.value(KeyMinLength).toInt(); - if (minLength<0) { - minLength=0; - } - if (minLength>KGetInputStringMaxSize){ - minLength=KGetInputStringMaxSize; - } - - // max length - int maxLength = action.value(KeyMaxLength).toInt(); - if (maxLengthKGetInputStringMaxSize) { - maxLength=KGetInputStringMaxSize; - } - qDebug("SATAPP: SatAppInputProvider::getInput min %d", minLength); - qDebug("SATAPP: SatAppInputProvider::getInput max %d", maxLength); - - // default input text - QString inputText = action.value(KeyInputString).toString(); - if (inputText.length() < minLength || inputText.length() > maxLength){ - inputText = ""; - } - qDebug() << "SATAPP: getInput: inputText=" << inputText; - - // hide input - bool hideInput = action.value(KeyHideInput).toBool(); - qDebug("SATAPP: SatAppInputProvider::getInput hide %d", hideInput); - - qDebug("SATAPP: getInput: min=%d,max=%d,hide=%d", - minLength, maxLength, hideInput); - - mCurrentAction = &action; - showGetInputQuery( heading, inputText, - characterSet, minLength, maxLength, hideInput); - - SAT_ASSERT(connect(mCurrentAction, SIGNAL(actionCompleted(SatAppAction*)), - this, SLOT(clearDurationTimer()))); - qDebug("SATAPP: SatAppInputProvider::getInput <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::showGetInkeyQuery -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::showGetInkeyQuery( - const QString &heading, - TSatCharacterSet characterSet, - int duration) -{ - qDebug("SATAPP: SatAppInputProvider::showGetInkeyQuery >"); - - HbInputDialog* inputDialog = new HbInputDialog(); - mCurrentDialog = inputDialog; - // Set PromptText - inputDialog->setPromptText(heading); - // Set ContentText - HbEditorInterface inputMode(inputDialog->lineEdit()); - inputDialog->lineEdit()->setFocus(); - if (ESatDigitOnly == characterSet) { - // digit mode, digits only (0 9, *, #, and +) - inputMode.setFilter(HbPhoneNumberFilter::instance()); - inputMode.setMode(HbInputModeNumeric); - inputMode.setInputConstraints(HbEditorConstraintFixedInputMode); - } else { - // char mode - inputMode.setUpAsLatinAlphabetOnlyEditor(); - } - composeDialog(inputDialog, GetInkey); - mCurrentAction->set(KeyMinLength, 1); - inputDialog->lineEdit()->setMaxLength(1); - - // when input changed, enable/disable OK button - SAT_ASSERT(connect(inputDialog->lineEdit(), SIGNAL(textChanged(QString)), - this, SLOT(updateQueryAction(QString)))); - // when OK pressed, fill in data to action and complete it - SAT_ASSERT(connect(inputDialog->actions().at(0), SIGNAL(triggered()), - this, SLOT(transmitInkeyFromDialog()))); - // when cancel pressed, complete action with ESatBackwardModeRequestedByUser - SAT_ASSERT(connect(inputDialog->actions().at(1), SIGNAL(triggered()), - mCurrentAction, SLOT(completeWithBackRequested()))); - // after timeout, reset the provider - startDurationTimer(duration); - // open the dialog. When the dialog closes, reset everything - inputDialog->open(); - - qDebug("SATAPP: SatAppInputProvider::showGetInkeyQuery <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::showGetImmediateQuery -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::showGetImmediateQuery( - const QString &heading, - int duration) -{ - qDebug("SATAPP: SatAppInputProvider::showGetImmediateQuery >"); - - HbInputDialog* inputDialog = new HbInputDialog(); - mCurrentDialog = inputDialog; - // Set PromptText - inputDialog->setPromptText(heading); - // Set ContentText - HbEditorInterface inputMode(inputDialog->lineEdit()); - inputDialog->lineEdit()->setFocus(); - - inputMode.setFilter(HbPhoneNumberFilter::instance()); - inputMode.setMode(HbInputModeNumeric); - inputMode.setInputConstraints(HbEditorConstraintFixedInputMode); - - composeDialog(inputDialog, GetImmediate); - - // when receiving first input character, send it immediately - SAT_ASSERT(connect(inputDialog->lineEdit(), SIGNAL(textChanged(QString)), - this, SLOT(transmitInkeyImmediately(QString)))); - // when cancel pressed, complete action with ESatBackwardModeRequestedByUser - SAT_ASSERT(connect(inputDialog->actions().at(0), SIGNAL(triggered()), - mCurrentAction, SLOT(completeWithBackRequested()))); - // after timeout, reset the provider - startDurationTimer(duration); - // open the dialog. When the dialog closes, reset everything - inputDialog->open(); - - qDebug("SATAPP: SatAppInputProvider::showGetImmediateQuery <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::showGetYesNoQuery -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::showGetYesNoQuery( - const QString &text, - int duration) -{ - qDebug("SATAPP: SatAppInputProvider::showGetYesNoQuery >"); - HbMessageBox* messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); - mCurrentDialog = messageBox; - - // Set the label as heading widget - HbLabel *lHeading = new HbLabel(text, messageBox); - messageBox->setHeadingWidget(lHeading); - messageBox->setIconVisible(false); - - composeDialog(messageBox, GetYesNo); - - // when YES pressed, complete action with ESatSuccess, inkey set to 1 - SAT_ASSERT(connect(messageBox->actions().at(0), SIGNAL(triggered()), - this, SLOT(transmitInkeyTrue()))); - // when NO pressed, complete action with ESatSuccess, inkey set to 0 - SAT_ASSERT(connect(messageBox->actions().at(1), SIGNAL(triggered()), - this, SLOT(transmitInkeyFalse()))); - - startDurationTimer(duration); - // show dialog. - messageBox->open(); - - qDebug("SATAPP: SatAppInputProvider::showGetYesNoQuery <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::showGetInputQuery -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::showGetInputQuery( - const QString& heading, - const QString& content, - TSatCharacterSet characterSet, - int minLength, - int maxLength, - bool hideInput) -{ - Q_UNUSED(minLength); - qDebug("SATAPP: SatAppInputProvider::showGetInputQuery >"); - - HbInputDialog* inputQuery = new HbInputDialog(); - mCurrentDialog = inputQuery; - inputQuery->setPromptText(heading); - inputQuery->setValue(QVariant(content)); - HbEditorInterface inputMode(inputQuery->lineEdit()); - inputQuery->lineEdit()->setFocus(); - if (ESatDigitOnly == characterSet) { - // digit mode, digits only (0 9, *, #, and +) - inputMode.setFilter(HbPhoneNumberFilter::instance()); - inputMode.setMode(HbInputModeNumeric); - inputMode.setInputConstraints(HbEditorConstraintFixedInputMode); - } else { - // char mode - inputMode.setUpAsLatinAlphabetOnlyEditor(); - } - - inputQuery->lineEdit()->setMaxLength(maxLength); - - composeDialog(inputQuery, GetInput); - // initially set the button states - updateQueryAction(inputQuery->value().toString()); - - if (hideInput) { - inputQuery->lineEdit()->setEchoMode(HbLineEdit::Password); - qDebug("SATAPP: showGetInputQuery: hiding input"); - } - - // when dialog content changes, dim ok button accordingly, use - // use contentChanged signal from the base class of the editor - // to get the signal when in password mode - SAT_ASSERT(connect(inputQuery->lineEdit(), SIGNAL(contentsChanged()), - this, SLOT(updateQueryAction()))); - // transmit the text on OK press - SAT_ASSERT(connect(inputQuery->actions().at(0), SIGNAL(triggered()), - this, SLOT(transmitStringFromDialog()))); - // on Cancel key complete action with ESatBackwardModeRequestedByUser - SAT_ASSERT(connect(inputQuery->actions().at(1), SIGNAL(triggered()), - mCurrentAction, SLOT(completeWithBackRequested()))); - // after timeout, reset the provider - startDurationTimer(KDefaultSelectionTimeoutMseconds); - // open dialog. When it closes, reset everything - inputQuery->open(); - - qDebug("SATAPP: SatAppInputProvider::showGetInputQuery <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::resetState -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::resetState() -{ - qDebug("SATAPP: SatAppInputProvider::resetState >"); - if (mCurrentAction) { - qDebug("SATAPP: SatAppInputProvider::resetState action"); - mCurrentAction->completeWithNoResponse(); - mCurrentAction = 0; - } - - qDebug("SATAPP: SatAppInputProvider::resetState action done"); - - delete mCurrentDialog; - mCurrentDialog = 0; - qDebug("SATAPP: SatAppInputProvider::resetState <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::composeDialog -// make sure dlg has 2 buttons -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::composeDialog( - HbDialog *dlg, - DialogMode mode) -{ - qDebug("SATAPP: SatAppInputProvider::composeDialog >"); - Q_ASSERT(mCurrentAction); - - dlg->setModal(true); - dlg->setDismissPolicy(HbDialog::NoDismiss); - - dlg->clearActions(); - HbAction *primaryAction = new HbAction(dlg); - dlg->addAction(primaryAction); - - HbAction *secondaryAction = new HbAction(dlg); - dlg->addAction(secondaryAction); - - switch(mode){ - case GetYesNo: - { - primaryAction->setText(hbTrId("txt_common_button_yes")); - secondaryAction->setText(hbTrId("txt_common_button_no")); - break; - } - case GetImmediate: - { - dlg->removeAction(primaryAction); - secondaryAction->setText(hbTrId("txt_common_button_cancel")); - break; - } - default: - { - primaryAction->setText(hbTrId("txt_common_button_ok")); - primaryAction->setEnabled(false); - secondaryAction->setText(hbTrId("txt_common_button_cancel")); - break; - } - } - qDebug("SATAPP: SatAppInputProvider::composeDialog <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::updateQueryAction -// Updates dialog's OK button according to input text length limits -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::updateQueryAction() -{ - qDebug("SATAPP: SatAppInputProvider::updateQueryAction >"); - Q_ASSERT(mCurrentDialog); - QString content = - qobject_cast(mCurrentDialog)->value().toString(); - qDebug() << "SATAPP: updateQueryAction: content=" << content; - updateQueryAction(content); - qDebug("SATAPP: SatAppInputProvider::updateQueryAction >"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::updateQueryAction -// Updates dialog's OK button according to input text length limits -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::updateQueryAction(QString text) -{ - qDebug("SATAPP: SatAppInputProvider::updateQueryAction 2>"); - Q_ASSERT(mCurrentDialog); - qDebug() << "SATAPP: updateQueryAction 2: text=" << text; - int min=0; - if (mCurrentAction->hasValue(KeyMinLength)) - min=mCurrentAction->value(KeyMinLength).toInt(); - int max=10; - if (mCurrentAction->hasValue(KeyMaxLength)) - max=mCurrentAction->value(KeyMaxLength).toInt(); - if (mCurrentDialog->actions().at(0)) { - if (text.length() >= min && text.length() <= max) { - mCurrentDialog->actions().at(0)->setEnabled(true); - } else { - mCurrentDialog->actions().at(0)->setEnabled(false); - } - } - qDebug("SATAPP: SatAppInputProvider::updateQueryAction 2<"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::transmitInkeyFromDialog -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::transmitInkeyFromDialog() -{ - qDebug("SATAPP: SatAppInputProvider::transmitInkeyFromDialog >"); - Q_ASSERT(mCurrentDialog); - Q_ASSERT(mCurrentAction->action()==ESatGetInkeyAction); - // grab the input string - HbInputDialog* inkeyQuery = static_cast(mCurrentDialog); - QString inputString = inkeyQuery->value().toString(); - qDebug() << "SATAPP: transmitInkeyFromDialog: input=" << inputString; - transmitInkeyImmediately(inputString); - qDebug("SATAPP: SatAppInputProvider::transmitInkeyFromDialog <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::transmitInkeyImmediately -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::transmitInkeyImmediately(QString text) -{ - qDebug("SATAPP: SatAppInputProvider::transmitInkeyImmediately >"); - transmitInkey((int)text.utf16()[0]); - qDebug("SATAPP: SatAppInputProvider::transmitInkeyImmediately <"); -} - - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::transmitInkeyTrue -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::transmitInkeyTrue() -{ - qDebug("SATAPP: SatAppInputProvider::transmitInkeyTrue >"); - Q_ASSERT(mCurrentAction); - Q_ASSERT(mCurrentAction->action()==ESatGetInkeyAction); - Q_ASSERT(mCurrentAction->value(KeyCharacterSet).toInt()==ESatYesNo); - transmitInkey(1); - qDebug("SATAPP: SatAppInputProvider::transmitInkeyTrue <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::transmitInkeyFalse -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::transmitInkeyFalse() -{ - qDebug("SATAPP: SatAppInputProvider::transmitInkeyFalse >"); - Q_ASSERT(mCurrentAction); - Q_ASSERT(mCurrentAction->action()==ESatGetInkeyAction); - Q_ASSERT(mCurrentAction->value(KeyCharacterSet).toInt()==ESatYesNo); - transmitInkey(0); - qDebug("SATAPP: SatAppInputProvider::transmitInkeyFalse >"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::transmit -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::transmitInkey(int key) -{ - qDebug("SATAPP: SatAppInputProvider::transmitInkey >"); - qDebug("SATAPP: SatAppInputProvider::transmitInkey %d",key); - Q_ASSERT(mCurrentAction); - Q_ASSERT(mCurrentAction->action()==ESatGetInkeyAction); - // write inkey - mCurrentAction->set(KeyInKey,key); - // overwrite timer duration - if (mCurrentAction->hasValue(KeyDuration)) { - int newDuration = mInputTimer.elapsed(); - qDebug("SATAPP: SatAppInputProvider::transmitInkey dur ", newDuration); - mCurrentAction->set(KeyDuration, newDuration); - } - bool immediate = mCurrentAction->value(KeyImmediate).toBool(); - if(immediate) { - mCurrentDialog->close(); - } - mCurrentAction->completeWithSuccess(); - mCurrentAction = 0; - qDebug("SATAPP: SatAppInputProvider::transmitInkey >"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::transmitStringFromDialog -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::transmitStringFromDialog() -{ - qDebug("SATAPP: SatAppInputProvider::transmitStringFromDialog >"); - Q_ASSERT(mCurrentDialog); - Q_ASSERT(mCurrentAction); - Q_ASSERT(mCurrentAction->action()==ESatGetInputAction); - // write input string - HbInputDialog* inputQuery = static_cast(mCurrentDialog); - QString inputString = inputQuery->value().toString(); - qDebug() << "SATAPP: transmitStringFromDialog: string=" << inputString; - - mCurrentAction->set(KeyInputString,inputString); - // overwrite timer duration - if (mCurrentAction->hasValue(KeyDuration)) { - int newDuration = mInputTimer.elapsed(); - qDebug("SATAPP: SatAppInputProvider::transmitStringFromDialog dur ", - newDuration); - mCurrentAction->set(KeyDuration, newDuration); - } - mCurrentAction->completeWithSuccess(); - mCurrentAction = 0; - qDebug("SATAPP: SatAppInputProvider::transmitStringFromDialog >"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::startDurationTimer -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::startDurationTimer(int duration) -{ - qDebug("SATAPP: SatAppInputProvider::startDurationTimer %d>", duration); - Q_ASSERT(mDurationTimer); - if (duration) { - mDurationTimer->setSingleShot(true); - SAT_ASSERT(connect(mDurationTimer, SIGNAL(timeout()), - this, SLOT(resetState()))); - mDurationTimer->start(duration); - } - qDebug("SATAPP: SatAppInputProvider::startDurationTimer <"); -} - -// ---------------------------------------------------------------------------- -// SatAppInputProvider::clearDurationTimer -// ---------------------------------------------------------------------------- -// -void SatAppInputProvider::clearDurationTimer() -{ - qDebug("SATAPP: SatAppInputProvider::clearDurationTimer >"); - Q_ASSERT(mDurationTimer); - Q_ASSERT(mCurrentAction); - - bool res = disconnect(mCurrentAction, SIGNAL(actionCompleted(SatAppAction*)), - this, SLOT(clearDurationTimer())); - qDebug("SATAPP: SatAppInputProvider::clearDurationTimer act %d>", res); - res = disconnect(mDurationTimer, SIGNAL(timeout()), - this, SLOT(resetState())); - qDebug("SATAPP: SatAppInputProvider::clearDurationTimer dur %d>", res); - - mDurationTimer->stop(); - qDebug("SATAPP: SatAppInputProvider::clearDurationTimer <"); -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/satappmainhandler.cpp --- a/satui/satapp/src/satappmainhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,303 +0,0 @@ -/* -* 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: -* -* -*/ -//Qt -#include -#include -#include -#include - -// symbian -#include -#include - -#include "satappmainhandler.h" -#include "satappserverdispatcher.h" -#include "satappmenuprovider.h" -#include "satappinputprovider.h" -#include "satapptoneprovider.h" -#include "satapppopupprovider.h" -#include "satappconstant.h" -#include "satappconfirmprovider.h" - -// Activity ID for Sat Application -const char *SATAPP_ACTIVITY_ID = "SIMServicesList"; - -// ======== MEMBER FUNCTIONS ================================================== - -// ---------------------------------------------------------------------------- -// SatAppMainHandler::SatAppMainHandler -// (Construtor). -// ---------------------------------------------------------------------------- -// -SatAppMainHandler::SatAppMainHandler(HbMainWindow &window, - QObject */*parent*/): -mOfflineWarningDlg(NULL) -{ - qDebug("SATAPP: SatAppMainHandler::SatAppMainHandler >"); - - if(!isOffline()){ - mServer = new SatAppServerDispatcher(this); - mMenu = new SatAppMenuProvider(&window, this); - mInput = new SatAppInputProvider(this); - mTone = new SatAppToneProvider(this); - mPopup = new SatAppPopupProvider(this); - mConfirm = new SatAppConfirmProvider(this); - initConnections(); - } - else{ - showOfflineWarning(); - } - removeActivity(); - - qDebug("SATAPP: SatAppMainHandler::SatAppMainHandler <"); -} - -// ---------------------------------------------------------------------------- -// SatAppMainHandler::~SatAppMainHandler -// (Destructor). -// ---------------------------------------------------------------------------- -// -SatAppMainHandler::~SatAppMainHandler() -{ - qDebug("SATAPP: SatAppMainHandler::~SatAppMainHandler >"); - delete mOfflineWarningDlg; - qDebug("SATAPP: SatAppMainHandler::~SatAppMainHandler <"); -} - -// ---------------------------------------------------------------------------- -// Local override for connect-function -// this method ENSURES that the connection is succesful. -// ---------------------------------------------------------------------------- -// -void doConnect( - const QObject *sender, - const char *signal, - const QObject *receiver, - const char *member) -{ - bool ret = QObject::connect(sender, signal, - receiver, member, Qt::DirectConnection); - Q_ASSERT_X(ret, "doConnect: connection failed for: ", signal); -} - -// ---------------------------------------------------------------------------- -// SatAppMainHandler::initConnections -// -// ---------------------------------------------------------------------------- -// -void SatAppMainHandler::initConnections() -{ - qDebug("SATAPP: SatAppMainHandler::initConnections >"); - - // -------------------------------------- - // MenuProvider - // -------------------------------------- - - // SetupMenu command from server - doConnect( - mServer, SIGNAL( setUpMenu( SatAppAction &) ), - mMenu, SLOT( setUpMenu( SatAppAction &) ) ); - - // SelectItem command from server - doConnect( - mServer, SIGNAL( selectItem( SatAppAction &) ), - mMenu, SLOT( selectItem( SatAppAction &) ) ); - - // -------------------------------------- - // InputProvider - // -------------------------------------- - - // GetInkey command - doConnect( - mServer, SIGNAL( getInkey( SatAppAction &) ), - mInput, SLOT( getInkey( SatAppAction &) ) ); - // GetInput command - doConnect( - mServer, SIGNAL( getInput( SatAppAction &) ), - mInput, SLOT( getInput( SatAppAction &) ) ); - - // clearScreen in InputProvider - doConnect( - mServer, SIGNAL( clearScreen() ), - mInput, SLOT( resetState() )); - - // -------------------------------------- - // Play tone - // -------------------------------------- - // Play tone - doConnect( - mServer, SIGNAL( playTone( SatAppAction &) ), - mTone, SLOT( playTone( SatAppAction &) ) ); - - // clearScreen in tone provider - doConnect( - mServer, SIGNAL( clearScreen() ), - mTone, SLOT( clearScreen() ) ); - - // -------------------------------------- - // Show Popups - // -------------------------------------- - - // display text - doConnect( - mServer, SIGNAL(displayText( SatAppAction & )), - mPopup, SLOT(displayText( SatAppAction & ))); - - // show notification - doConnect( - mServer, SIGNAL( notification( SatAppAction & ) ), - mPopup, SLOT( notification( SatAppAction & ) ) ); - - // hide wait note - doConnect( - mServer, SIGNAL( stopShowWaitNote() ), - mPopup, SLOT( stopShowWaitNote() ) ); - - // clearScreen in popup note provider - doConnect( - mServer, SIGNAL(clearScreen()), - mPopup, SLOT(clearScreen())); - - // clearScreen in popup note provider - doConnect( - mServer, SIGNAL(showSsErrorNote()), - mPopup, SLOT(showSsErrorNote())); - - // -------------------------------------- - // Show Confirm - // -------------------------------------- - - // show confirmCommand - doConnect( - mServer, SIGNAL( confirmCommand( SatAppAction & ) ), - mConfirm, SLOT( confirmCommand( SatAppAction & ) ) ); - - // clearScreen - doConnect( - mServer, SIGNAL( clearScreen() ), - mConfirm, SLOT( clearScreen() ) ); - - // Task switcher - doConnect( - mServer, SIGNAL( setUpMenu( SatAppAction & ) ), - this, SLOT( updateActivity() ) ); - - doConnect( - qApp, SIGNAL( aboutToQuit() ), - this, SLOT( saveActivity() ) ); - - qDebug("SATAPP: SatAppMainHandler::initConnections <"); -} - -// ---------------------------------------------------------------------------- -// SatAppMainHandler::updateActivity -// ---------------------------------------------------------------------------- -// -void SatAppMainHandler::updateActivity() -{ - qDebug("SATAPP: SatAppMainHandler::updateActivity >"); - mActivity.insert("screenshot", mMenu->takeScreenShot()); - qDebug("SATAPP: SatAppMainHandler::updateActivity <"); -} - -// ---------------------------------------------------------------------------- -// SatAppMainHandler::saveActivity -// ---------------------------------------------------------------------------- -// -void SatAppMainHandler::saveActivity() -{ - qDebug("SATAPP: SatAppMainHandler::saveActivity >"); - - // Add the activity to the activity manager - const bool ok = qobject_cast(qApp)->activityManager()-> - addActivity(SATAPP_ACTIVITY_ID, QVariant(), mActivity); - - qDebug("SATAPP: SatAppMainHandler::saveActivity < %d", ok); -} - -// ---------------------------------------------------------------------------- -// SatAppMainHandler::removeActivity -// ---------------------------------------------------------------------------- -// -void SatAppMainHandler::removeActivity() -{ - qDebug("SATAPP: SatAppMainHandler::removeActivity >"); - - QList activityList = - qobject_cast(qApp)->activityManager()->activities(); - qDebug("SATAPP: SatAppMenuProvider::removeActivity count=%d", - activityList.count()); - foreach (QVariantHash activity, activityList){ - if (activity.keys().contains(SATAPP_ACTIVITY_ID)){ - mActivity = activity; - qDebug("SATAPP: SatAppMenuProvider::removeActivity store"); - break; - } - } - - const bool ok = qobject_cast(qApp)->activityManager()-> - removeActivity(SATAPP_ACTIVITY_ID); - - qDebug("SATAPP: SatAppMainHandler::removeActivity < %d", ok); -} - -// ---------------------------------------------------------------------------- -// SatAppMainHandler::isOffline -// ---------------------------------------------------------------------------- -// -bool SatAppMainHandler::isOffline() -{ - //If current active profile is offline, show a warning and quit - qDebug("SATAPP: SatAppMainHandler::isOffline >"); - TInt profileId(0); - CRepository* cr (NULL); - TRAPD(err, cr = CRepository::NewL(KCRUidCoreApplicationUIs)); - if ( KErrNone == err ) - { - // Get the ID of the currently active profile: - const TInt error = - cr->Get(KCoreAppUIsNetworkConnectionAllowed, profileId); - qDebug("SATAPP: SatAppMainHandler::isOffline get active \ - profile error=%d",error); - delete cr; - } - qDebug("SATAPP: SatAppMainHandler::isOffline< profileId = %d",profileId); - return ( ECoreAppUIsNetworkConnectionNotAllowed == profileId ); -} - -// ---------------------------------------------------------------------------- -// SatAppMainHandler::showOfflineWarning -// ---------------------------------------------------------------------------- -// -void SatAppMainHandler::showOfflineWarning() -{ - qDebug("SATAPP: SatAppMainHandler::showOfflineWarning >"); - mOfflineWarningDlg = - new HbMessageBox(HbMessageBox::MessageTypeWarning); - mOfflineWarningDlg->setText( - hbTrId("txt_simatk_dpopinfo_sim_services_not_available")); - mOfflineWarningDlg->clearActions(); - mOfflineWarningDlg->setDismissPolicy(HbDialog::TapOutside); - mOfflineWarningDlg->setTimeout(KDisplayTxtUserClearTimeout); - SAT_ASSERT(connect(mOfflineWarningDlg, SIGNAL(aboutToClose()), - qApp, SLOT(quit()))); - mOfflineWarningDlg->open(); - qDebug("SATAPP: SatAppMainHandler::showOfflineWarning <"); -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/satappmenuprovider.cpp --- a/satui/satapp/src/satappmenuprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,347 +0,0 @@ -/* -* 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: Provides and maintains SAT main view (selection list) -* -*/ - -// qt -#include -#include -#include -#include -// hb -#include -#include -#include -#include -#include -#include -#include -// satapp -#include "satappmenuprovider.h" -#include "satappaction.h" -#include "satappconstant.h" - -// constants -const char *SATAPP_DOCML = ":/xml/satapp.docml"; -const char *SATAPP_SETUPMENU_VIEW = "setupmenu_view"; -const char *SATAPP_SELECTITEM_VIEW = "selectitem_view"; -const char *SATAPP_MENUITEM = "s:ListWidget"; -const char *SATAPP_SELECTITEM = "t:ListWidget"; -const char *SATAPP_SUBTITLE = "t:label"; - - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::SatAppMenuProvider -// ---------------------------------------------------------------------------- -// -SatAppMenuProvider::SatAppMenuProvider(HbMainWindow *window,QObject *parent) - : QObject(parent), mMainWindow(window),mSetupMenuView(0), - mSelectItemView(0),mSoftKeyQuitAction(0),mSoftKeyBackAction(0), - mListWidget(0),mSelectListWidget(0),mSubTitle(0),mCurrentAction(0) -{ - qDebug("SATAPP: SatAppMenuProvider::SatAppMenuProvider"); -} - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::~SatAppMenuProvider -// ---------------------------------------------------------------------------- -// -SatAppMenuProvider::~SatAppMenuProvider() -{ - qDebug("SATAPP: SatAppMenuProvider::~SatAppMenuProvider >"); - resetState(); - // delete all objects created from DOCML. - while (!mObjects.isEmpty()) { - delete mObjects.takeFirst(); - } - // delete actions - delete mSoftKeyQuitAction; - delete mSoftKeyBackAction; - qDebug("SATAPP: SatAppMenuProvider::~SatAppMenuProvider <"); -} - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::takeScreenShot -// ---------------------------------------------------------------------------- -// -QPixmap SatAppMenuProvider::takeScreenShot() -{ - qDebug("SATAPP: SatAppMenuProvider::takeScreenShot"); - return QPixmap::grabWidget(mMainWindow, mMainWindow->rect()); -} - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::loadMainView -// ---------------------------------------------------------------------------- -// -void SatAppMenuProvider::loadMainView() -{ - qDebug("SATAPP: SatAppMenuProvider::loadMainView >"); - - // create actions - mSoftKeyQuitAction = new HbAction(Hb::QuitNaviAction,this); - mSoftKeyBackAction = new HbAction(Hb::BackNaviAction,this); - - bool docmlLoad = false; - HbDocumentLoader loader; - // ownership of the objects are transferred to caller - mObjects = loader.load(SATAPP_DOCML,&docmlLoad); - Q_ASSERT(docmlLoad); - qDebug("SATAPP: SatAppMenuProvider main view found"); - // load setupmenu view - mSetupMenuView = qobject_cast(loader.findWidget - (SATAPP_SETUPMENU_VIEW)); - // find setupmenu view items - mListWidget = qobject_cast - ( loader.findWidget(SATAPP_MENUITEM )); - // connect setupmenu view menu - HbAction *menuAction = mSetupMenuView->menu()->addAction( - hbTrId("txt_common_menu_exit")); - SAT_ASSERT(connect(menuAction, SIGNAL(triggered()), - mMainWindow, SLOT(close()))); - SAT_ASSERT(connect(mSoftKeyQuitAction, SIGNAL(triggered()), - mMainWindow, SLOT(close()))); - // set this view as current view - mMainWindow->addView(mSetupMenuView); - mMainWindow->setCurrentView(mSetupMenuView); - - // load selectitem view - mSelectItemView = qobject_cast(loader.findWidget - (SATAPP_SELECTITEM_VIEW)); - // find selectitem view items - mSubTitle = qobject_cast - ( loader.findWidget(SATAPP_SUBTITLE) ); - mSelectListWidget = qobject_cast - ( loader.findWidget(SATAPP_SELECTITEM )); - // connect selectitem view menu - HbAction *menuBack = mSelectItemView->menu()->addAction( - hbTrId("txt_common_opt_back")); - SAT_ASSERT(connect(menuBack, SIGNAL(triggered()), - mSoftKeyBackAction, SIGNAL(triggered()))); - HbAction *menuQuit = mSelectItemView->menu()->addAction( - hbTrId("txt_common_menu_exit")); - - SAT_ASSERT(connect(menuQuit, SIGNAL(triggered()), - mMainWindow, SLOT(close()))); - qDebug("SATAPP: SatAppMenuProvider::loadMainView <"); - -} - -// ---------------------------------------------------------------------------- -// switchView -// ---------------------------------------------------------------------------- -// -void SatAppMenuProvider::switchView() -{ - qDebug("SATAPP: SatAppMenuProvider::switchView >"); - if (mCurrentAction && ESatSelectItemAction == mCurrentAction->action()) { - // switch to select item view - mMainWindow->removeView(mMainWindow->currentView()); - mMainWindow->addView(mSelectItemView); - mMainWindow->setCurrentView(mSelectItemView); - } else { - // switch to main menu view - mMainWindow->removeView(mMainWindow->currentView()); - mMainWindow->addView(mSetupMenuView); - mMainWindow->setCurrentView(mSetupMenuView); - } - qDebug("SATAPP: SatAppMenuProvider::switchView <"); -} - - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::setUpMenu -// constructs a menu in the main SAT application view -// ---------------------------------------------------------------------------- -// -void SatAppMenuProvider::setUpMenu(SatAppAction &action) -{ - qDebug("SATAPP: SatAppMenuProvider::setUpMenu >"); - if (!mSetupMenuView) { - loadMainView(); - } - resetState(); - mCurrentAction = &action; - switchView(); - action.setResponse(ESatSuccess); - - // The text is the application name - // should be shown on the menu area always - QString text = action.value(KeyText).toString(); - if (!text.isEmpty()) { - mSetupMenuView->setTitle(text); - mSelectItemView->setTitle(text); - } - qDebug() << "SATAPP: SetUpMenu title=" << text; - - // build the menu - QList menu = action.value(KeyMenu).toList(); - mListWidget->clear(); - for(int i = 0; i < menu.count(); i++ ) { - mListWidget->addItem(menu.at(i).toString()); - } - qDebug() << "SATAPP: SetUpMenu menu=" << menu; - - // back-key quits the application - mSetupMenuView->setNavigationAction(mSoftKeyQuitAction); - // completes action with ESatSuccess and selected item - connectItem(); - - qDebug("SATAPP: SatAppMenuProvider::setUpMenu <"); -} - - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::selectItem -// Constructs a SETECT ITEM view -// ---------------------------------------------------------------------------- -// -void SatAppMenuProvider::selectItem( SatAppAction &action) -{ - qDebug("SATAPP: SatAppMenuProvider::selectItem >"); - - if (!mSetupMenuView) { - loadMainView(); - } - - resetState(); - mCurrentAction = &action; - switchView(); - action.setResponse(ESatSuccess); - - // Set sub title - QString text = action.value(KeyText).toString(); - if (!text.isEmpty()) { - mSubTitle->setPlainText(text); - } else { - mSubTitle->setPlainText(hbTrId("txt_long_caption_sim_services")); - } - qDebug() << "SATAPP: selectItem text=" << text; - - // Set List widget - QList menu = action.value(KeyMenu).toList(); - mSelectListWidget->clear(); - for(int i = 0; i < menu.count(); i++ ) { - mSelectListWidget->addItem(menu.at( i ).toString()); - } - qDebug() << "SATAPP: selectItem menu=" << menu; - - // timeout completes action with ESatNoResponseFromUser - QTimer::singleShot(KDefaultSelectionTimeoutMseconds, - mCurrentAction,SLOT(completeWithNoResponse())); - // back-key completes action with ESatBackwardModeRequestedByUser - mSelectItemView->setNavigationAction(mSoftKeyBackAction); - SAT_ASSERT(connect(mSoftKeyBackAction, SIGNAL(triggered()), - mCurrentAction, SLOT(completeWithBackRequested()))); - SAT_ASSERT(connect(mSelectItemView->menu()->actions().at(1), - SIGNAL(triggered()), - mCurrentAction, SLOT(completeWithSessionTerminated()))); - - // completes action with ESatSuccess and selected item - connectItem(); - - qDebug("SATAPP: SatAppMenuProvider::selectItem <"); -} - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::resetState -// terminates ongoing events and clears the screen -// ---------------------------------------------------------------------------- -// -void SatAppMenuProvider::resetState() -{ - qDebug("SATAPP: SatAppMenuProvider::resetState >"); - mCurrentAction = 0; - disconnectItem(); - qDebug("SATAPP: SatAppMenuProvider::resetState <"); -} - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::menuItemSelected -// (Menu item selected). -// ---------------------------------------------------------------------------- -// -void SatAppMenuProvider::menuItemSelected(HbListWidgetItem *item) -{ - qDebug("SATAPP: SatAppMenuProvider::menuItemSelected >"); - Q_ASSERT(mCurrentAction); - if (ESatSetUpMenuAction == mCurrentAction->action()) { - int index = mListWidget->row(item); - mCurrentAction->set(KeySelection,index); - mCurrentAction->set(KeyHelpRequested,false); - mCurrentAction->completeWithSuccess(); - } else if(ESatSelectItemAction == mCurrentAction->action()) { - int index = mSelectListWidget->row(item); - mCurrentAction->set(KeySelection,index); - mCurrentAction->completeWithSuccess(); - } - qDebug("SATAPP: SatAppMenuProvider::menuItemSelected <"); -} - - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::connectItem -// (Connect listwidget item). -// ---------------------------------------------------------------------------- -// -void SatAppMenuProvider::connectItem() -{ - qDebug("SATAPP: SatAppMenuProvider::connectItem >"); - Q_ASSERT(mCurrentAction); - if (ESatSetUpMenuAction == mCurrentAction->action()) { - SAT_ASSERT(connect( - mListWidget, SIGNAL(activated(HbListWidgetItem *)), - this, SLOT(menuItemSelected(HbListWidgetItem *)))); - SAT_ASSERT(connect( - mListWidget, - SIGNAL(longPressed(HbListWidgetItem *, const QPointF &)), - this, SLOT(menuItemSelected(HbListWidgetItem *)))); - } else if(mCurrentAction->action()== ESatSelectItemAction) { - SAT_ASSERT(connect( - mSelectListWidget, SIGNAL(activated(HbListWidgetItem *)), - this, SLOT(menuItemSelected(HbListWidgetItem *)))); - SAT_ASSERT(connect( - mSelectListWidget, - SIGNAL(longPressed(HbListWidgetItem*, const QPointF &)), - this, SLOT(menuItemSelected(HbListWidgetItem *)))); - } - qDebug("SATAPP: SatAppMenuProvider::connectItem <"); -} - -// ---------------------------------------------------------------------------- -// SatAppMenuProvider::disconnectItem -// (Disconnect listwidget item). -// ---------------------------------------------------------------------------- -// -void SatAppMenuProvider::disconnectItem() -{ - qDebug("SATAPP: SatAppMenuProvider::disconnectItem >"); - // setup menu view - disconnect(mListWidget, SIGNAL( activated(HbListWidgetItem *)), - this, SLOT( menuItemSelected( HbListWidgetItem *))); - disconnect( - mListWidget, SIGNAL(longPressed(HbListWidgetItem*, const QPointF &)), - this, SLOT(menuItemSelected(HbListWidgetItem *))); - // select item view - disconnect(mSelectListWidget, SIGNAL( activated(HbListWidgetItem *)), - this, SLOT( menuItemSelected( HbListWidgetItem *))); - disconnect( - mSelectListWidget, - SIGNAL(longPressed(HbListWidgetItem*, const QPointF &)), - this, SLOT(menuItemSelected(HbListWidgetItem *))); - qDebug("SATAPP: SatAppMenuProvider::disconnectItem <"); -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/satapppopupprovider.cpp --- a/satui/satapp/src/satapppopupprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,520 +0,0 @@ -/* -* 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: -* -*/ - -// qt -#include -#include -#include -// hb -#include -#include -#include -#include -#include -// satapp -#include "satapppopupprovider.h" -#include "satappconstant.h" -#include "satappaction.h" - - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::SatAppPopupProvider -// ---------------------------------------------------------------------------- -// -SatAppPopupProvider::SatAppPopupProvider( QObject *parent) - : QObject(parent), mDisplayText(0), mWaitDialog(0), - mWaitDeviceDialog(0), mAction(0) -{ - qDebug("SATAPP: SatAppPopupProvider::SatAppPopupProvider"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::~SatAppPopupProvider -// ---------------------------------------------------------------------------- -// -SatAppPopupProvider::~SatAppPopupProvider() -{ - qDebug("SATAPP: SatAppPopupProvider::~SatAppPopupProvider >"); - - if (mWaitDialog) { - qDebug("SATAPP: SatAppPopupProvider::~SatAppPopupProvider wait note"); - mWaitDialog->close(); - delete mWaitDialog; - mWaitDialog = NULL; - } - - if (mWaitDeviceDialog) { - qDebug("SATAPP: SatAppPopupProvider::~SatAppPopupProvider device note"); - mWaitDeviceDialog->close(); - delete mWaitDeviceDialog; - mWaitDeviceDialog = NULL; - } - - if (mDisplayText){ - qDebug( "SatAppPopupProvider::~SatAppPopupProvider DisplayText" ); - delete mDisplayText; - mDisplayText = 0; - } - qDebug("SATAPP: SatAppPopupProvider::~SatAppPopupProvider <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::displayText -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::displayText(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::displayText >"); - mAction = &action; - delete mDisplayText; - mDisplayText = 0; - QString heading = action.value(KeyApplicationName).toString(); - if (heading.isEmpty()) { - heading = hbTrId("txt_simatk_dialog_sim_services"); - } - qDebug() << "SATAPP: displayText: heading=" << heading; - - // text - QString text = action.value(KeyText).toString(); - - // some flags - bool sustainedText = action.value(KeySustainedText).toBool(); - bool waitUserToClear = action.value(KeyWaitUserToClear).toBool(); - - // duration - int duration = action.value(KeyDuration).toInt(); - if (duration==0) { - duration = KDisplayTxtDefaultduration; - if (waitUserToClear) { - duration = KDisplayTxtUserClearTimeout; - } - } - if ( !(!sustainedText || - action.value(KeyDuration).toInt() || - !waitUserToClear) ) { - duration = 0; - } - qDebug("SATAPP: displayText: duration=%d",duration); - - // Show DisplayText dialog - mDisplayText = new HbMessageBox(HbMessageBox::MessageTypeInformation); - - // Set the label as heading widget - HbLabel *label = new HbLabel(heading, mDisplayText); - mDisplayText->setHeadingWidget(label); - mDisplayText->setText(text); - mDisplayText->setIconVisible(false); - mDisplayText->setStandardButtons(HbMessageBox::Ok | HbMessageBox::Cancel); - // ok pressed -> complete action with KSatSuccess - SAT_ASSERT(connect(mDisplayText->actions().at(0), SIGNAL(triggered()), - &action, SLOT(completeWithSuccess()))); - // cancel pressed -> complete action with ESatBackwardModeRequestedByUser - SAT_ASSERT(connect(mDisplayText->actions().at(1), SIGNAL(triggered()), - &action, SLOT(completeWithBackRequested()))); - SAT_ASSERT(connect(mAction, SIGNAL(actionCompleted(SatAppAction *)), - this, SLOT(resetState()))); - if (duration) { - if (waitUserToClear && !sustainedText) { - // in timeout, complete action with ESatNoResponseFromUser - QTimer::singleShot(duration, - &action, SLOT(completeWithNoResponse())); - } else { - QTimer::singleShot(duration, - &action, SLOT(completeWithSuccess())); - } - mDisplayText->setTimeout(duration); - } - - // open the popup. - mDisplayText->open(); - - qDebug("SATAPP: SatAppPopupProvider::displayText <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::notification -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::notification(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::notification >"); - // some flags - int commandId = action.value(KeyCommandId).toInt(); - int alphaIdStatus = action.value(KeyAlphaIdStatus).toInt(); - // reset mAction - mAction = 0; - qDebug("SATAPP: notification id=%d alphaSt=%d", - commandId, alphaIdStatus); - - switch (commandId) - { - case ESatSSendDataNotify: - case ESatSReceiveDataNotify: - { - qDebug("SATAPP: Notifying BIP Send/Receive"); - // need to complete action with success when use don't prees cancel - mAction = &action; - showBIPWaitNote(action); - break; - } - case ESatSCloseChannelNotify: - { - qDebug("SATAPP: Notifying BIP CloseChannel"); - showCloseChannelWaitNote(action); - break; - } - case ESatSMoSmControlNotify: - { - qDebug("SATAPP: Notifying MoSmControl"); - if (ESatAlphaIdNotNull == alphaIdStatus) { - showMoSmControlNote(action); - } else { - showSatInfoNote(action); - } - break; - } - case ESatSCallControlNotify: - { - qDebug("SATAPP: Notifying CallControl"); - showCallControlNote(action); - break; - } - case ESatSSendUssdNotify: // fall through - case ESatSSendSsNotify: - { - qDebug("SATAPP: Notifying SendSs / SendUssd"); - showSsWaitNote(action); - break; - } - case ESatSSendDtmfNotify: - { - qDebug("SATAPP: Notifying SendDtmf"); - // need to complete action with success when use don't prees cancel - mAction = &action; - showDtmfWaitNote(action); - break; - } - case ESatSSendSmsNotify: - { - qDebug("SATAPP: Notifying SendSms"); - showSmsWaitNote(action); - break; - } - default: - { - qDebug("SATAPP: Unkown notification"); - action.completeWithFailure(); - break; - } - } - qDebug("SATAPP: SatAppPopupProvider::notification <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::stopShowWaitNote -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::stopShowWaitNote() -{ - qDebug("SATAPP:SatAppPopupProvider::stopShowWaitNote: >mWaitDialog = %x", - mWaitDialog ); - if (mWaitDialog) { - mWaitDialog->close(); - delete mWaitDialog; - mWaitDialog = NULL; - if (mAction) { - qDebug("SATAPP: stopShowWaitNote: mAction"); - int commandId = mAction->value(KeyCommandId).toInt(); - if (ESatSSendDataNotify == commandId - || ESatSReceiveDataNotify == commandId - || ESatSSendDtmfNotify == commandId) { - mAction->completeWithSuccess(); - } - } - } - - qDebug("SATAPP: stopShowWaitNote: mWaitDeviceDialog=%x", - mWaitDeviceDialog); - if (mWaitDeviceDialog) { - mWaitDeviceDialog->close(); - delete mWaitDeviceDialog; - mWaitDeviceDialog = NULL; - } - - qDebug("SATAPP:SatAppPopupProvider::stopShowWaitNote: <" ); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::defaultAlphaId -// provides a default text in case it is empty -// ---------------------------------------------------------------------------- -// -QString SatAppPopupProvider::alphaId(SatAppAction& action) -{ - QString alpha = action.value(KeyText).toString(); - qDebug() << "SATAPP: SatAppPopupProvider::alphaId" << alpha; - - int commandId = action.value(KeyCommandId).toInt(); - int controlResult = action.value(KeyControlResult).toInt(); - - if (!alpha.isEmpty()) { - qDebug("SATAPP:SatAppPopupProvider::alphaId not empty<"); - return alpha; - } - switch (commandId) - { - case ESatSSendDataNotify: // SendData - { - alpha = hbTrId("txt_simatk_dialog_sendingdata"); - break; - } - case ESatSReceiveDataNotify: // ReceiveData - { - alpha = hbTrId("txt_simatk_dialog_receivingdata"); - break; - } - case ESatSCloseChannelNotify: // CloseChannel - { - alpha = hbTrId("txt_simatk_dialog_connectionclosed"); - break; - } - case ESatSMoSmControlNotify: // MoSmControl - { - if (ESatNotAllowed == controlResult) { - alpha = hbTrId("txt_simatk_dpopinfo_request_not_allowed"); - } else if (ESatAllowedWithModifications == controlResult) { - alpha = hbTrId("txt_simatk_dpopinfo_request_modified"); - } else { - alpha = hbTrId(""); // Allowed, default alpha -> no info - } - break; - } - case ESatSCallControlNotify: // CallControl - { - if (ESatNotAllowed == controlResult) { - alpha= hbTrId("txt_simatk_dpopinfo_request_not_allowed"); - } else if (ESatAllowedWithModifications == controlResult) { - alpha = hbTrId("txt_simatk_dpopinfo_request_modified"); - } else { - alpha = hbTrId(""); // Allowed, default alpha -> no info - } - break; - } - case ESatSSendSmsNotify: // fall through - case ESatSSendDtmfNotify: // fall through - case ESatSSendUssdNotify: // fall through - case ESatSSendSsNotify: // fall through - { - // alpha id is empty, set a default string - alpha = hbTrId("txt_common_info_processing"); - break; - } - default: - break; - } - qDebug("SATAPP:SatAppPopupProvider::alphaId <"); - return alpha; -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::showBIPWaitNote -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showBIPWaitNote(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::showBIPWaitNote >"); - - QString text = alphaId(action); - // this is a new SEND DATA action - delete mWaitDialog; - mWaitDialog = 0; - HbProgressDialog *pd = new HbProgressDialog(HbProgressDialog::WaitDialog); - pd->setText(text); - // cancel -> complete with ESatBackwardModeRequestedByUser - SAT_ASSERT(connect(pd->actions().at(0),SIGNAL(triggered()), - &action,SLOT(completeWithBackRequested()))); - - // open dialog - pd->open(); - mWaitDialog = pd; - - qDebug("SATAPP: SatAppPopupProvider::showBIPWaitNote <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::showCloseChannelWaitNote -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showCloseChannelWaitNote(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::showCloseChannelWaitNote >"); - HbProgressDialog *pd = new HbProgressDialog(HbProgressDialog::WaitDialog); - pd->clearActions(); - pd->setText(alphaId(action)); - pd->open(); - mWaitDialog = pd; - qDebug("SATAPP: SatAppPopupProvider::showCloseChannelWaitNote <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::showMoSmControlNote -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showMoSmControlNote(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::showMoSmControlNote >"); - HbMessageBox *mb = new HbMessageBox(HbMessageBox::MessageTypeInformation); - mb->clearActions(); - mb->setText(alphaId(action)); - mb->open(); - mWaitDialog = mb; - qDebug("SATAPP: SatAppPopupProvider::showMoSmControlNote <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::showSatInfoNote -// -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showSatInfoNote(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::showSatInfoNote >"); - HbMessageBox *mb = new HbMessageBox(HbMessageBox::MessageTypeInformation); - mb->setText(alphaId(action)); - mb->open(); - mWaitDialog = mb; - qDebug("SATAPP: SatAppPopupProvider::showSatInfoNote <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::showCallControlNote -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showCallControlNote(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::showCallControlNote >"); - HbDeviceMessageBox *dmb = new HbDeviceMessageBox(HbMessageBox::MessageTypeInformation); - // No cancel key - dmb->setText(alphaId(action)); - dmb->show(); - mWaitDeviceDialog = dmb; - - qDebug("SATAPP: SatAppPopupProvider::showCallControlNote <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::showSsWaitNote -// Displays a wait note to indicate SS sending. -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showSsWaitNote(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::showSsWaitNote >"); - HbProgressDialog *pd = new HbProgressDialog(HbProgressDialog::WaitDialog); - pd->clearActions(); - pd->setText(alphaId(action)); - pd->show(); - mWaitDialog = pd; - qDebug("SATAPP: SatAppPopupProvider::showSsWaitNote <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::showDtmfWaitNote -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showDtmfWaitNote(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::showDtmfWaitNote >"); - HbProgressDialog *pd = new HbProgressDialog(HbProgressDialog::WaitDialog); - // cancel -> complete action with ESatBackwardModeRequestedByUser - SAT_ASSERT(connect(pd->actions().at(0), SIGNAL(triggered()), - &action, SLOT(completeWithBackRequested()))); - pd->setText(alphaId(action)); - pd->open(); - mWaitDialog = pd; - qDebug("SATAPP: SatAppPopupProvider::showDtmfWaitNote <"); - } - - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::showDtmfWaitNote -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showSmsWaitNote(SatAppAction& action) -{ - qDebug("SATAPP: SatAppPopupProvider::showSmsWaitNote >"); - HbProgressDialog *pd = new HbProgressDialog(HbProgressDialog::WaitDialog); - //remove the default cancel softkey - pd->clearActions(); - pd->setText(alphaId(action)); - pd->open(); - mWaitDialog = pd; - qDebug("SATAPP: SatAppPopupProvider::showSmsWaitNote <"); - } - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::stopShowWaitNote -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::showSsErrorNote() -{ - qDebug("SATAPP: SatAppPopupProvider::showSsErrorNote >"); - HbMessageBox *mb = new HbMessageBox(HbMessageBox::MessageTypeWarning); - mb->setText(hbTrId("txt_sat_sendss_error_note")); - mb->open(); - mWaitDialog = mb; - qDebug("SATAPP: SatAppPopupProvider::showSsErrorNote <"); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::clearScreen -// terminates all ongoing UI actions -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::clearScreen() -{ - qDebug( "SATAPP: SatAppPopupProvider::clearScreen >" ); - stopShowWaitNote(); - if (mDisplayText){ - qDebug( "SatAppPopupProvider::clearScreen DisplayText" ); - delete mDisplayText; - mDisplayText = 0; - if (mAction) { - qDebug( "SatAppPopupProvider::clearScreen mAction" ); - SAT_ASSERT(disconnect(mAction, SIGNAL(actionCompleted(SatAppAction *)), - this, SLOT(resetState()))); - mAction->completeWithNoResponse(); - mAction = 0; - } - qDebug( "SatAppPopupProvider::clearScreen DisplayText <" ); - } - qDebug( "SATAPP: SatAppToneProvider::clearScreen <" ); -} - -// ---------------------------------------------------------------------------- -// SatAppPopupProvider::resetState -// reset -// ---------------------------------------------------------------------------- -// -void SatAppPopupProvider::resetState() -{ - qDebug( "SATAPP: SatAppPopupProvider::resetState >" ); - mAction = 0; - qDebug( "SATAPP: SatAppPopupProvider::resetState <" ); -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/satappserverdispatcher.cpp --- a/satui/satapp/src/satappserverdispatcher.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,586 +0,0 @@ -/* -* 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: Receives UI commands from SAT server and converts to QT -* -*/ - -// qt -#include -#include -#include -// symbian -#include -#include - -// sat -#include -#include "satappserverdispatcher.h" -#include "satappaction.h" -#include "satappconstant.h" - - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::SatAppServerDispatcher -// ---------------------------------------------------------------------------- -// -SatAppServerDispatcher::SatAppServerDispatcher(QObject *parent) : - QObject(parent) -{ - qDebug("SATAPP: SatAppServerDispatcher::SatAppServerDispatcher"); - QT_TRAP_THROWING(ConnectSatSessionL()); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::~SatAppServerDispatcher -// ---------------------------------------------------------------------------- -// -SatAppServerDispatcher::~SatAppServerDispatcher() -{ - qDebug("SATAPP: SatAppServerDispatcher::~SatAppServerDispatcher"); - DisconnectSatSession(); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::menuSelection -// ---------------------------------------------------------------------------- -// -void SatAppServerDispatcher::menuSelection(SatAppAction* action) -{ - qDebug("SATAPP: SatAppServerDispatcher::menuSelection >"); - if ( ESatSuccess == action->response() ) { - // user selected item from menu - int menuItem = action->value(KeySelection).toInt(); - int helpRequested = action->value(KeyHelpRequested).toBool(); - qDebug("SATAPP: SatAppServerDispatcher::MenuSelection item=%d", - menuItem); - iSat.Adapter()->MenuSelection(menuItem, helpRequested); - } else if (ESatSessionTerminatedByUser == action->response()) { - // session terminated while executing the menu action - qDebug("SATAPP: SatAppServerDispatcher::SessionTerminated"); - iSat.Adapter()->SessionTerminated(EEndKeyUsed); - } - delete action; - qDebug("SATAPP: SatAppServerDispatcher::menuSelection <"); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::userCancelResponse -// ---------------------------------------------------------------------------- -// -void SatAppServerDispatcher::userCancelSession(SatAppAction* action) -{ - qDebug("SATAPP: SatAppServerDispatcher::userCancelSession"); - if (action && ESatBackwardModeRequestedByUser == action->response()){ - iSat.Adapter()->SessionTerminated(ESessionCancel); - } - delete action; - action = 0; -} - - -// **************************************************************************** -// * ************************************************************************ * -// * * SYMBIAN PART * * -// * ************************************************************************ * -// **************************************************************************** - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::ConnectSatSessionL -// ---------------------------------------------------------------------------- -// -void SatAppServerDispatcher::ConnectSatSessionL() -{ - qDebug("SATAPP: SatAppServerDispatcher::ConnectSatSessionL>"); - //Register to Server as subsession - //If Server is not up, this function call may take time - iSatSession.ConnectL(); - iSat.RegisterL(iSatSession, this); - if (!iSat.Adapter()) - User::Leave(KErrNotFound); - qDebug("SATAPP: SatAppServerDispatcher::ConnectSatSessionL<"); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::DisconnectSatSession -// ---------------------------------------------------------------------------- -// -void SatAppServerDispatcher::DisconnectSatSession() -{ - qDebug("SATAPP: SatAppServerDispatcher::DisconnectSatSession>"); - iSat.Close(); - iSatSession.Close(); - qDebug("SATAPP: SatAppServerDispatcher::DisconnectSatSession<"); -} - -// ---------------------------------------------------------------------------- -// My own quick string -> descriptor conversion function :-) -// ---------------------------------------------------------------------------- -// -void s2d(const QString str, TDes& desc) -{ - desc.Copy(reinterpret_cast(str.utf16()), str.length()); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::DisplayTextL -// ---------------------------------------------------------------------------- -// -TSatUiResponse SatAppServerDispatcher::DisplayTextL( const TDesC& aText, - const TDesC& aSimApplicationName, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed, - const TBool aSustainedText, - const TTimeIntervalSeconds aDuration, - const TBool aWaitUserToClear ) -{ - qDebug("SATAPP: SatAppServerDispatcher::DisplayTextL >"); - Q_UNUSED(aIconId); - SatAppAction action(ESatDisplayTextAction); - // validate - if (aText.Length()== 0 || aText.Length()>RSat::KTextToDisplayMaxSize){ - qDebug("SATAPP: SatAppServerDispatcher::DisplayText no text"); - aRequestedIconDisplayed = EFalse; - return ESatFailure; - } - - QT_TRYCATCH_LEAVING( - // ensure state - emit stopShowWaitNote(); - - // call - action.set(KeyText,aText); - action.set(KeyApplicationName, aSimApplicationName); - action.set(KeySustainedText, aSustainedText); - action.set(KeyDuration, const_cast(aDuration)); - action.set(KeyWaitUserToClear, aWaitUserToClear); - - emit displayText(action); - action.waitUntilCompleted(); - ); - - // return - qDebug("SATAPP: SatAppServerDispatcher::DisplayTextL action.response() %x<", - action.response()); - return action.response(); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::GetInkeyL -// ---------------------------------------------------------------------------- -// -TSatUiResponse SatAppServerDispatcher::GetInkeyL( - const TDesC& aText, - const TSatCharacterSet aCharacterSet, - TChar& aInput, - const TBool aHelpIsAvailable, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed, - TUint& aDuration, - const TBool aImmediateDigitResponse ) -{ - Q_UNUSED(aHelpIsAvailable); - Q_UNUSED(aIconId); - - qDebug("SATAPP: SatAppServerDispatcher::GetInkeyL >"); - - // validate - aRequestedIconDisplayed = EFalse; - if (ESatYesNo == aCharacterSet && aText.Length() == 0) { - qDebug("SATAPP: CSatUiObserver::GetInkey return ESatFailure"); - return ESatFailure; - } - - SatAppAction action(ESatGetInkeyAction); - QT_TRYCATCH_LEAVING( - // ensure state - emit stopShowWaitNote(); - - // call - action.set(KeyText,aText); - action.set(KeyCharacterSet,(int)aCharacterSet); - action.set(KeyInKey,(int)aInput); - // convert from SAT time units(?) to milliseconds - action.set(KeyDuration,(int)aDuration*KSymbianTimeConvertQtTime); - action.set(KeyImmediate,(bool)aImmediateDigitResponse); - emit getInkey(action); - action.waitUntilCompleted(); - // convert from milliseconds to SAT time units(?) - aDuration = - action.value(KeyDuration).toInt()/KSymbianTimeConvertQtTime; - aInput = action.value(KeyInKey).toInt(); - ); - - // return - qDebug("SATAPP: SatAppServerDispatcher::GetInkeyL <"); - return action.response(); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::GetInputL -// ---------------------------------------------------------------------------- -// -TSatUiResponse SatAppServerDispatcher::GetInputL( - const TDesC& aText, - const TSatCharacterSet aCharacterSet, - TDes& aInput, - const TInt aMinLength, - const TInt aMaxLength, - const TBool aHideInput, - const TBool aHelpIsAvailable, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed ) -{ - Q_UNUSED(aHelpIsAvailable); - Q_UNUSED(aIconId); - qDebug("SATAPP: SatAppServerDispatcher::GetInputL >"); - - // validate - aRequestedIconDisplayed = EFalse; - if ((aCharacterSet == ESatCharSmsDefaultAlphabet || - aCharacterSet == ESatCharUcs2Alphabet) && - aHideInput) { - qDebug("SATAPP: SatAppServerDispatcher::GetInput return ESatFailure"); - return ESatFailure; - } - - SatAppAction action(ESatGetInputAction); - QT_TRYCATCH_LEAVING( - // ensure state - emit stopShowWaitNote(); - - // call - action.set(KeyText,aText); - action.set(KeyCharacterSet,(int)aCharacterSet); - action.set(KeyInputString,aInput); - action.set(KeyMinLength,aMinLength); - action.set(KeyMaxLength,aMaxLength); - action.set(KeyHideInput,(bool)aHideInput); - emit getInput(action); - action.waitUntilCompleted(); - s2d(action.value(KeyInputString).toString(), aInput); - ) - - // return - qDebug("SATAPP: SatAppServerDispatcher::GetInputL <"); - return action.response(); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::SetUpMenuL -// ---------------------------------------------------------------------------- -// -TSatUiResponse SatAppServerDispatcher::SetUpMenuL( - const TDesC& aText, - const MDesCArray& aMenuItems, - const CArrayFixFlat* aMenuItemNextActions, - const TBool aHelpIsAvailable, - const TSatIconId& aIconId, - const CArrayFixFlat* aMenuIcons, - const enum TSatIconQualifier aIconListQualifier, - const enum TSatSelectionPreference aSelectionPreference ) -{ - Q_UNUSED(aMenuItemNextActions); - Q_UNUSED(aHelpIsAvailable); - Q_UNUSED(aIconId); - Q_UNUSED(aMenuIcons); - Q_UNUSED(aIconListQualifier); - Q_UNUSED(aSelectionPreference); - qDebug("SATAPP: SatAppServerDispatcher::SetUpMenuL >"); - - QT_TRYCATCH_LEAVING( - - // validate - if (!aMenuItems.MdcaCount()) { - emit clearScreen(); - QCoreApplication::instance()->quit(); - return ESatSuccess; - } - - // ensure state - emit stopShowWaitNote(); - - // call - SatAppAction* action = new SatAppAction(ESatSetUpMenuAction, this); - action->set(KeyText,aText); - action->set(KeyMenu,aMenuItems); - // connect for asynchronous menu selection - connect( - action,SIGNAL(actionCompleted(SatAppAction*)), - this,SLOT(menuSelection(SatAppAction*))); - - emit setUpMenu(*action); - ) - - // return - qDebug("SATAPP: SatAppServerDispatcher::SetUpMenuL <"); - return ESatSuccess; -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::SelectItemL -// ---------------------------------------------------------------------------- -// -TSatUiResponse SatAppServerDispatcher::SelectItemL( - const TDesC& aText, - const MDesCArray& aMenuItems, - const CArrayFixFlat* aMenuItemNextActions, - const TInt aDefaultItem, - TUint8& aSelection, - const TBool aHelpIsAvailable, - const TSatIconId& aIconId, - const CArrayFixFlat* aMenuIcons, - const enum TSatIconQualifier aIconListQualifier, - TBool& aRequestedIconDisplayed, - const enum TSatSelectionPreference aSelectionPreference ) -{ - Q_UNUSED(aMenuItemNextActions); - Q_UNUSED(aHelpIsAvailable); - Q_UNUSED(aIconId); - Q_UNUSED(aMenuIcons); - Q_UNUSED(aIconListQualifier); - Q_UNUSED(aRequestedIconDisplayed); - Q_UNUSED(aSelectionPreference); - TSatUiResponse resp(ESatFailure); - SatAppAction action(ESatSelectItemAction); - qDebug("SATAPP: SatAppServerDispatcher::SelectItemL >"); - - QT_TRYCATCH_LEAVING( - // ensure state - emit stopShowWaitNote(); - - // call - action.set(KeyText,aText); - action.set(KeyMenu,aMenuItems); - action.set(KeyDefault,aDefaultItem); - emit selectItem(action); - action.waitUntilCompleted(); - resp = action.response(); - if ( ESatSuccess == resp ) { - aSelection = static_cast( - action.value(KeySelection).toInt()); - } - ) - - // return - qDebug("SATAPP: SatAppServerDispatcher::SelectItemL <"); - return resp; -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::PlayTone -// ---------------------------------------------------------------------------- -// -TSatUiResponse SatAppServerDispatcher::PlayTone( - const TDesC& aText, - const TSatTone aTone, - const TTimeIntervalMicroSeconds aDuration, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed ) -{ - Q_UNUSED(aIconId); - aRequestedIconDisplayed = EFalse; - TSatUiResponse resp(ESatSuccess); - qDebug("SATAPP: SatAppServerDispatcher::PlayTone >"); - SatAppAction action(ESatPlayToneAction); - int err(KErrNone); - QT_TRYCATCH_ERROR( - err, - // ensure state - emit stopShowWaitNote(); - - // call - action.set(KeyText,aText); - action.set(KeyToneId,aTone); - action.set(KeyDuration, const_cast(aDuration)); - emit playTone(action); - action.waitUntilCompleted(); - resp = action.response(); - ) - - // return - qDebug("SATAPP: SatAppServerDispatcher::PlayTone err = %d<", err); - return resp; -} - - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::ConfirmCommand -// ---------------------------------------------------------------------------- -// -void SatAppServerDispatcher::ConfirmCommand( - const TSatSQueryCommand aCommandId, - const TSatAlphaIdStatus aAlphaIdStatus, - const TDesC& aText, - const TDesC& aAdditionalText, - TBool& aActionAccepted, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed, - TBool& aTerminatedByUser ) -{ - qDebug("SATAPP: SatAppServerDispatcher::ConfirmCommand >"); - Q_UNUSED(aIconId); - aRequestedIconDisplayed = EFalse; - aTerminatedByUser = EFalse; - //ConfirmAction - SatAppAction action(ESatConfirmAction); - qDebug("SATAPP: SatAppServerDispatcher::ConfirmCommand"); - int err(KErrNone); - QT_TRYCATCH_ERROR( - err, - emit stopShowWaitNote(); - - action.set(KeyQueryCommandId, aCommandId); - action.set(KeyAlphaIdStatus, aAlphaIdStatus); - action.set(KeyText, aText); - action.set(KeyAdditionalText, aAdditionalText); - action.set(KeyActionAccepted, aActionAccepted); - - emit confirmCommand(action); - action.waitUntilCompleted(); - if (ESatSuccess == action.response() ) { - aActionAccepted = ETrue; - } - ) - qDebug("SATAPP: SatAppServerDispatcher::ConfirmCommand err = %d <", err); -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::Notification -// ---------------------------------------------------------------------------- -// -TSatUiResponse SatAppServerDispatcher::Notification( - const TSatSNotifyCommand aCommandId, - const TSatAlphaIdStatus aAlphaIdStatus, - const TDesC& aText, - const TSatIconId& aIconId, - TBool& aRequestedIconDisplayed, - const TSatControlResult aControlResult ) -{ - Q_UNUSED(aIconId); - Q_UNUSED(aRequestedIconDisplayed); - qDebug("SATAPP: SatAppServerDispatcher::Notification command id=%d", - aCommandId); - - TSatUiResponse res(ESatFailure); - int err(KErrNone); - switch (aCommandId) - { - // With cancel - case ESatSSendDataNotify: // fall through - case ESatSReceiveDataNotify: // fall through - case ESatSSendDtmfNotify: // fall through - { - QT_TRYCATCH_ERROR( - err, - emit stopShowWaitNote(); - SatAppAction *action = new SatAppAction(ESatNotifyAction, this); - action->set(KeyText, aText); - action->set(KeyCommandId, aCommandId); - action->set(KeyAlphaIdStatus, aAlphaIdStatus); - action->set(KeyControlResult, aControlResult); - // connect for asynchronous menu selection - connect( - action,SIGNAL(actionCompleted(SatAppAction*)), - this,SLOT(userCancelSession(SatAppAction*))); - emit notification(*action); - res = ESatSuccess; - ) - break; - } - // Without cancel - case ESatSMoSmControlNotify: // fall through - case ESatSCallControlNotify: // fall through - case ESatSSendUssdNotify: // fall through - case ESatSSendSsNotify: // fall through - case ESatSSendSmsNotify: // fall through - case ESatSCloseChannelNotify: // fall through - { - QT_TRYCATCH_ERROR( - err, - emit stopShowWaitNote(); - SatAppAction a(ESatNotifyAction); - a.set(KeyText, aText); - a.set(KeyCommandId, aCommandId); - a.set(KeyAlphaIdStatus, aAlphaIdStatus); - a.set(KeyControlResult, aControlResult); - emit notification(a); - res = ESatSuccess; - ) - break; - } - default: - { - break; - } - } - qDebug("SATAPP: SatAppServerDispatcher::Notification < ret=%d", err); - return res; -} - -// ---------------------------------------------------------------------------- -// SatAppServerDispatcher::EventNotification -// ---------------------------------------------------------------------------- -// -void SatAppServerDispatcher::EventNotification( - const TSatSEvent aEventId, - const TSatSEventStatus aEventStatus, - const TInt aError ) -{ - qDebug( "SATAPP: SatAppServerDispatcher::EventNotification aEventId %d", - aEventId ); - Q_UNUSED(aEventStatus); - Q_UNUSED(aError); - int err(KErrNone); - - QT_TRYCATCH_ERROR( err, - switch ( aEventId ) - { - case ESatSSmEndEvent: - case ESatSsEndEvent: - case ESatSDtmfEndEvent: - { - emit stopShowWaitNote(); - break; - } - case ESatSClearScreenEvent: - { - qDebug("SATAPP: ClearScreen event"); - emit clearScreen(); - break; - } - case ESatSsErrorEvent: - { - qDebug("SATAPP: Notifying Ss error" ); - // If error occurred (and Alpha ID provided), notify user - emit showSsErrorNote(); - break; - } - case ESatSCloseSatUiAppEvent: - { - qDebug(" Close UI event" ); - emit clearScreen(); - QCoreApplication::instance()->quit(); - break; - } - default: - { - qDebug("SATAPP: Unknown event occured: %i", aEventId); - break; - } - } - ) // end QT_TRYCATCH_ERROR - qDebug("SATAPP: SatAppServerDispatcher::EventNotification err = %d<", err); -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/src/satapptoneprovider.cpp --- a/satui/satapp/src/satapptoneprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,702 +0,0 @@ -/* -* 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: -* -*/ - -// includes -#include -#include -#include -#include //playtone note - -#include "SatAppToneProvider.h" -#include "satappconstant.h" -#include "satappaction.h" - -// ---------------------------------------------------------------------------- -// SatAppToneProvider::SatAppToneProvider -// ---------------------------------------------------------------------------- -// -SatAppToneProvider::SatAppToneProvider(QObject *parent) : - QObject(parent) -{ - qDebug("SATAPP: SatAppToneProvider::SatAppToneProvider <>"); - mState = Idle; - mWarningAndPlayTones = false; - mVolume = 0; - mPlayer = 0; - mPlayToneError = ESatSuccess; - mTimer = 0; - mPermanentNote = 0; - mAudioPlayer = 0; - mCurrentAction = 0; -} - -// ---------------------------------------------------------------------------- -// SatAppToneProvider::~SatAppToneProvider -// ---------------------------------------------------------------------------- -// -SatAppToneProvider::~SatAppToneProvider() -{ - qDebug("SATAPP: SatAppToneProvider::~SatAppToneProvider >"); - - if (mCurrentAction) { - stopPlayTone(); - } - - if (mPermanentNote) { - qDebug("SatAppToneProvider::resetState delete mPermanentNote"); - delete mPermanentNote; - mPermanentNote = 0; - } - - if (mTimer) { - qDebug("SatAppToneProvider::resetState delete timer"); - delete mTimer; - mTimer = 0; - } - - qDebug("SATAPP: SatAppToneProvider::~SatAppToneProvider <"); -} - -//----------------------------------------------------------------------------- -// SatAppToneProvider::playTone -//----------------------------------------------------------------------------- -void SatAppToneProvider::playTone(SatAppAction& action) -{ - qDebug("SATAPP: SatAppToneProvider::playTone >"); - resetState(); - - mCurrentAction = &action; - int tone = action.value(KeyToneId).toInt(); - int duration = action.value(KeyDuration).toInt(); - QString text = action.value(KeyText).toString(); - QByteArray sequence; - mState = recognizeTone(tone,sequence,duration); - if (mState == PlayStandardTone) - { - playStandardTone(text,sequence,duration); - } - else if (mState == PlayUserSelectedTone) - { - playUserSelectedTone(text,tone,duration); - } - else - { - mCurrentAction->complete(ESatCmdDataNotUnderstood); - mCurrentAction = 0; - } - qDebug("SATAPP: SatAppToneProvider::playTone <"); -} - -//----------------------------------------------------------------------------- -// SatAppToneProvider::recognizeTone -// @param tone the tone code from server (see TSatTone in MSatUiObserver) -// @param sequence (out) standard tone play sequence -// @param duration (out) stanrard tone play duration (manipulated in some cases) -// @return suggested state for the tone provider (or Idle if tone is not recognised) -//----------------------------------------------------------------------------- -SatAppToneProvider::State SatAppToneProvider::recognizeTone( - int tone, - QByteArray& sequence, - int& duration) -{ - qDebug("SATAPP: SatAppToneProvider::recognizeTone >"); - State ret = Idle; - qDebug("SATAPP: SatAppToneProvider::recognizeTone tone: %d", tone); - switch (tone) - { - case ESatGeneralBeep: - case ESatPositiveTone: - case ESatToneNotSet: - { - if (duration == 0) duration = KSatDur170ms; // 170ms - sequence = charArrayToByteArray(KGeneralBeep, - sizeof(KGeneralBeep)); - ret = PlayStandardTone; - break; - } - case ESatNegativeTone: - { - if (duration == 0) duration = KSatDur250ms; // 250ms - sequence = charArrayToByteArray(KErrorTone, - sizeof(KErrorTone)); - ret = PlayStandardTone; - break; - } - case ESatRadioPathNotAvailableCallDropped: - { - if (duration == 0) duration = KSatDur1200ms; // 1200ms - sequence = charArrayToByteArray(KRadioPathNotAvailable, - sizeof(KRadioPathNotAvailable)); - ret = PlayStandardTone; - break; - } - case ESatRadioPathAcknowledge: - { - if (duration == 0) duration = KSatDur200ms; // 200ms - sequence = charArrayToByteArray(KRadioPathAck, - sizeof(KRadioPathAck)); - ret = PlayStandardTone; - break; - } - case ESatDialTone: - { - if (duration == 0) break; - sequence = charArrayToByteArray(KNetToneSeqDial, - sizeof(KNetToneSeqDial)); - ret = PlayStandardTone; - break; - } - case ESatCalledSubscriberBusy: - { - if (duration == 0) break; - sequence = charArrayToByteArray(KNetToneSeqNetBusy, - sizeof(KNetToneSeqNetBusy)); - ret = PlayStandardTone; - break; - } - case ESatCongestion: - { - if (duration == 0) break; - sequence = charArrayToByteArray(KNetToneSeqNetCongestion, - sizeof(KNetToneSeqNetCongestion)); - ret = PlayStandardTone; - break; - } - case ESatErrorSpecialInfo: - { - if (duration == 0) break; - sequence = charArrayToByteArray(KNetToneSeqNetSpecialInformation, - sizeof(KNetToneSeqNetSpecialInformation)); - ret = PlayStandardTone; - break; - } - case ESatCallWaitingTone: - { - if (duration == 0) break; - sequence = charArrayToByteArray(KNetToneSeqNetCallWaiting, - sizeof(KNetToneSeqNetCallWaiting)); - ret = PlayStandardTone; - break; - } - case ESatRingingTone: - { - if (duration == 0) break; - sequence = charArrayToByteArray(KNetToneSeqRingGoing, - sizeof(KNetToneSeqRingGoing)); - ret = PlayStandardTone; - break; - } - case ESatUserSelectedToneIncomingSpeech: - case ESatUserSelectedToneIncomingSms: - { - ret = PlayUserSelectedTone; - break; - } - default: - break; - } - - qDebug("SATAPP: SatAppToneProvider::recognizeTone state=%d <", ret); - return ret; -} - -//----------------------------------------------------------------------------- -// SatAppToneProvider::charArrayToByteArray -//----------------------------------------------------------------------------- -QByteArray SatAppToneProvider::charArrayToByteArray( - const char tone[], - int size) -{ - qDebug("SATAPP: SatAppToneProvider::charArrayToByteArray >"); - QByteArray seq; - seq = QByteArray::fromRawData(tone, size); - qDebug("SATAPP: SatAppToneProvider::charArrayToByteArray <"); - return seq; -} - -//----------------------------------------------------------------------------- -// SatAppToneProvider::playStandardTone -//----------------------------------------------------------------------------- -void SatAppToneProvider::playStandardTone( - const QString& text, - const QByteArray& sequence, - int duration) -{ - qDebug("SATAPP: SatAppToneProvider::playStandardTone >"); - - if (text.length() > 0) { - mPermanentNote = new HbMessageBox(HbMessageBox::MessageTypeInformation); - SAT_ASSERT(connect(mPermanentNote, SIGNAL(aboutToClose()), - this, SLOT(stopPlayTone()))); - mPermanentNote->setText(text); - mPermanentNote->setStandardButtons(HbMessageBox::Cancel); - if (duration > 0 ) { - mPermanentNote->setTimeout(duration); - } - mPermanentNote->setDismissPolicy(HbPopup::TapAnywhere); - qDebug("SatAppToneProvider::playStandardTone show before"); - mPermanentNote->show(); - qDebug("SatAppToneProvider::playStandardTone show after"); - } - - TPtrC8 seq((unsigned char*)sequence.constData(), sequence.length()); - qDebug("SATAPP: SatAppToneProvider::playStandardTone TPtrC8 seq: %S", &seq); - QT_TRAP_THROWING(SymbianPrepareAudioToneUtilityL(seq)); - - if (duration > 0) { - mTimer = new QTimer(this); - SAT_ASSERT(connect(mTimer, SIGNAL(timeout()), - this, SLOT(stopPlayTone()))); - mTimer->start(duration); - } - - qDebug("SATAPP: SatAppToneProvider::playStandardTone <"); -} - -//----------------------------------------------------------------------------- -// SatAppToneProvider::playUserSelectedTone -//----------------------------------------------------------------------------- -void SatAppToneProvider::playUserSelectedTone( - const QString& text, - int tone, - int duration) -{ - qDebug("SatAppToneProvider::playUserSelectedTone >"); - - // If several messages/calls arrive during a small amount of time and if the - // message received or incoming call tone is already being played we do not - // restart it. - if (mAudioPlayer) { - qDebug( "SatAppToneProvider::\ - PlayUserSelectedToneL Error - already played" ); - mCurrentAction->complete(ESatFailure); - mCurrentAction = 0; - mState = Idle; - return; - } - - if (text.length() > 0) { - mPermanentNote = new HbMessageBox(HbMessageBox::MessageTypeInformation); - mPermanentNote->setText(text); - mPermanentNote->setStandardButtons(HbMessageBox::Cancel); - if (duration) { - mPermanentNote->setTimeout(duration); - } - mPermanentNote->setDismissPolicy(HbPopup::TapAnywhere); - qDebug("SatAppToneProvider::PlayUserSelectedToneL show before"); - mPermanentNote->show(); - qDebug("SatAppToneProvider::PlayUserSelectedToneL show after"); - } - - QT_TRAP_THROWING(SymbianPrepareAudioPlayerL(tone,duration)); - - if (duration > 0) { - qDebug( "SATAPP: SatAppToneProvider::PlayUserSelectedToneL\ - duration not 0" ); - mTimer = new QTimer(this); - mTimer->start(duration); - SAT_ASSERT(connect(mTimer, SIGNAL(timeout()), this, SLOT(stopPlayTone()))); - - if (mPermanentNote) { - SAT_ASSERT(connect(mPermanentNote, SIGNAL(aboutToClose()), - this, SLOT(stopPlayTone()))); - } - } - - qDebug( "SatAppToneProvider::PlayUserSelectedToneL <" ); -} - - -// ---------------------------------------------------------------------------- -// SatAppToneProvider::clearScreen -// terminates all ongoing UI actions -// ---------------------------------------------------------------------------- -// -void SatAppToneProvider::clearScreen() -{ - qDebug( "SatAppToneProvider::clearScreen >" ); - if (mCurrentAction) { - stopPlayTone(); - } - qDebug( "SatAppToneProvider::clearScreen <" ); -} - -// ---------------------------------------------------------------------------- -// SatAppToneProvider::stopPlayTone -// Stops the music, frees blocked functions -// ---------------------------------------------------------------------------- -// -void SatAppToneProvider::stopPlayTone() -{ - qDebug("SATAPP: SatAppToneProvider::stopPlayTone >"); - - if (mPermanentNote) { - qDebug("SatAppToneProvider::stopPlayTone close mPermanentNote"); - disconnect(mPermanentNote,SIGNAL(aboutToClose()), - this, SLOT(stopPlayTone())); - mPermanentNote->close(); - } - - if (mTimer) { - qDebug("SatAppToneProvider::stopPlayTone stop timer"); - disconnect(mTimer,SIGNAL(timeout()), this, SLOT(stopPlayTone())); - if (mTimer->isActive()) { - mTimer->stop(); - } - } - - switch(mState) { - case PlayStandardTone: { - qDebug("SATAPP: SatAppToneProvider::stopPlayTone before play cancel"); - SymbianStopAudioToneUtility(); - - //get warning and game tones setting from active profile - QT_TRAP_THROWING(GetProfileParamsL()); - if( EFalse == mWarningAndPlayTones - && ESatSuccess == mPlayToneError ) { - mPlayToneError = ESatSuccessToneNotPlayed; - } - break; - } - case PlayUserSelectedTone: { - // Sample is played in forever loop for the duration. - // After duration call back timers are destroyed - // If player exists, stop playing and delete player. MapcPlayComplete - // is not called because CallBackTimer stops the playing. - SymbianStopAudioPlayer(); - if( EFalse == mWarningAndPlayTones ) { - mPlayToneError = ESatSuccessToneNotPlayed; - } - break; - } - default: - break; - } - - mState = Idle; - if (mCurrentAction) { - mCurrentAction->complete(mPlayToneError); - mCurrentAction = 0; - } - - qDebug("SATAPP: SatAppToneProvider::stopPlayTone <"); -} - -void SatAppToneProvider::resetState() -{ - qDebug("SATAPP: SatAppToneProvider::resetState >"); - if (mCurrentAction) { - mCurrentAction->completeWithNoResponse(); - mCurrentAction = 0; - } - - if (mPermanentNote) { - qDebug("SatAppToneProvider::resetState delete mPermanentNote"); - delete mPermanentNote; - mPermanentNote = 0; - } - - if (mTimer) { - qDebug("SatAppToneProvider::resetState delete timer"); - delete mTimer; - mTimer = 0; - } - qDebug("SATAPP: SatAppToneProvider::resetState <"); -} - - - -// **************************************************************************** -// * ************************************************************************ * -// * * SYMBIAN PART * * -// * ************************************************************************ * -// **************************************************************************** - - -// includes -#include //TTimeIntervalMicroSeconds -#include -#include -#include -#include -#include //KAudioPriorityLowLevel -#include // for CMdaAudioToneUtility&CMdaAudioPlayerUtility -#include //KMdaRepeatForever - -//constants - -// Maximum length for sound file. -const TInt KMaxSoundFileLength = 256; -// Used when dividing some values. Used only for preventing the use of magic -// numbers -// Audio sample is repeated indefinitely. -const TInt KSoundPlayerRepeatForever = KMdaRepeatForever; - -// The max volume value from settings. -// From TProfileToneSettings.h -const TInt KMaxVolumeFromProfile( 10 ); - -// ---------------------------------------------------------------------------- -// SatAppToneProvider::SymbianPrepareAudioToneUtilityL -// creates and prepares CMdaAudioToneUtility -// ---------------------------------------------------------------------------- -// -void SatAppToneProvider::SymbianPrepareAudioToneUtilityL(const TDesC8& sequence) -{ - qDebug( "SatAppToneProvider::SymbianPrepareAudioToneUtilityL >" ); - if (mPlayer) { - delete mPlayer; - mPlayer = 0; - } - mPlayer = CMdaAudioToneUtility::NewL(*this); - TInt volume(mPlayer->MaxVolume()); - mPlayer->SetVolume(volume); - mPlayer->PrepareToPlayDesSequence(sequence); - qDebug( "SatAppToneProvider::SymbianPrepareAudioToneUtilityL <" ); -} - -// ---------------------------------------------------------------------------- -// SatAppToneProvider::SymbianStopAudioToneUtility -// cancels and deletes CMdaAudioToneUtility -// ---------------------------------------------------------------------------- -void SatAppToneProvider::SymbianStopAudioToneUtility() -{ - qDebug( "SatAppToneProvider::SymbianStopAudioToneUtility >" ); - if (mPlayer) { - mPlayer->CancelPlay(); - } - delete mPlayer; - mPlayer = NULL; - qDebug( "SatAppToneProvider::SymbianStopAudioToneUtility <" ); -} - -// ---------------------------------------------------------------------------- -// SatAppToneProvider::SymbianPrepareAudioPlayerL -// cancels and deletes CMdaAudioToneUtility -// ---------------------------------------------------------------------------- -void SatAppToneProvider::SymbianPrepareAudioPlayerL( - int tone, int duration) -{ - qDebug( "SatAppToneProvider::SymbianPrepareAudioPlayerL >" ); - // This defines name for the current message alert or incoming call tone. - TBuf soundFileName; - GetProfileParamsL(tone, &soundFileName); - - // This defines the behaviour to be adopted by an - // audio client if a higher priority client takes over the device. - TInt mdaPriority( KAudioPrefIncomingCall ); - // This is used to resolve conflicts when more than one client tries to - // access the same sound output device simultaneously. - TInt audioPriority( KAudioPriorityPhoneCall ); - - qDebug( "SATAPP: SatAppToneProvider::PlayUserSelectedToneL\ - Volume is %d ", mVolume ); - - // Creates the audio player. - mAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL( - soundFileName, - *this, - audioPriority, - ( TMdaPriorityPreference ) mdaPriority ); - - TTimeIntervalMicroSeconds no_silence(0); - if (duration > 0) - { - // repeat forever in a loop - mAudioPlayer->SetRepeats(KSoundPlayerRepeatForever, no_silence); - } - else - { - // play only once - mAudioPlayer->SetRepeats(0, no_silence); - } - qDebug( "SatAppToneProvider::SymbianPrepareAudioPlayerL <" ); - -} - -// ---------------------------------------------------------------------------- -// SatAppToneProvider::SymbianStopAudioPlayer -// cancels and deletes CMdaAudioToneUtility -// ---------------------------------------------------------------------------- -void SatAppToneProvider::SymbianStopAudioPlayer() -{ - qDebug( "SatAppToneProvider::SymbianStopAudioPlayer >" ); - if (mAudioPlayer) { - qDebug( "SatAppToneProvider::SymbianStopAudioPlayer AudioPlayer stop" ); - mAudioPlayer->Stop(); - } - delete mAudioPlayer; - mAudioPlayer = 0; - qDebug( "SatAppToneProvider::SymbianStopAudioPlayer <" ); -} - -// --------------------------------------------------------- -// SatAppCommandHandler::GetProfileParamsL -// Get and store settings from current profile -// (other items were commented in a header). -// --------------------------------------------------------- -// -void SatAppToneProvider::GetProfileParamsL( - int aTone /*= ESatToneNotSet*/, - TDes* aToneName /*= NULL*/ ) -{ - qDebug( "SatAppCommandHandler::GetProfileParamsL >" ); - MProfile* profile = NULL; - MProfileEngine* engine = NULL; - engine = CreateProfileEngineL(); - CleanupReleasePushL( *engine ); - - profile = engine->ActiveProfileLC(); - - const MProfileTones& tones = profile->ProfileTones(); - - // Takes a current warning and gametones setting. - const TProfileToneSettings& ts = tones.ToneSettings(); - mWarningAndPlayTones = ts.iWarningAndGameTones; - mVolume = ts.iRingingVolume; - - qDebug( "SatAppCommandHandler::GetProfileParamsL \ - mVolume before mapping %d", mVolume ); - - // Max volume from profile is KMaxVolumeFromProfile, Max volume from - // CMdaAudioToneUtility is different, maybe 10,000. So, - // rate = maxVolumeFromPlayer / KMaxVolumeFromProfile - // User may never hear the TONE, because volume is too small. - // iVolume times the rate make it can be heard. - - CMdaAudioToneUtility* toneUtl = CMdaAudioToneUtility::NewL( *this ); - TInt maxVolumeFromPlayer( toneUtl->MaxVolume() ); - mVolume *= maxVolumeFromPlayer / KMaxVolumeFromProfile; - delete toneUtl; - toneUtl = NULL; - qDebug( "CSatUiViewAppUi::GetProfileParamsL \ - mVolume after mapping %d", mVolume ); - - if ( ( ESatUserSelectedToneIncomingSms == aTone ) && ( aToneName ) ) - { - qDebug("SatAppCommandHandler::GetProfileParamsL message tone"); - aToneName->Copy( tones.MessageAlertTone() ); - } else if( aToneName ) { - qDebug("SatAppCommandHandler::GetProfileParamsL ring tone"); - aToneName->Copy( tones.RingingTone1() ); - } - - CleanupStack::PopAndDestroy(2); // engine, profile - qDebug("SatAppCommandHandler::GetProfileParamsL <"); -} - -// --------------------------------------------------------- -// SatAppToneProvider::MatoPrepareComplete -// Preparation is complete -> Starts playing tone -// --------------------------------------------------------- -// -void SatAppToneProvider::MatoPrepareComplete(TInt aError) -{ - qDebug("SatAppToneProvider::MatoPrepareComplete \ - aError = %d >", aError); - if (KErrNone == aError && mPlayer) { - mPlayToneError = ESatSuccess; - TTimeIntervalMicroSeconds zero(static_cast( 0 )); - mPlayer->SetPriority(KAudioPriorityLowLevel, - STATIC_CAST(TMdaPriorityPreference, KAudioPrefConfirmation)); - mPlayer->SetRepeats( KMdaAudioToneRepeatForever, zero ); - mPlayer->Play(); - } else { - mPlayToneError = ESatFailure; - stopPlayTone(); - } - qDebug( "SatAppToneProvider::MatoPrepareComplete <" ); -} - -//----------------------------------------------------------------------------- -// SatAppToneProvider::MatoPlayComplete -// Play complete -> Frees blocking function -// (other items were commented in a header). -// ---------------------------------------------------------------------------- -// -void SatAppToneProvider::MatoPlayComplete( TInt aError ) -{ - qDebug("SatAppToneProvider::MatoPlayComplete >"); - if (KErrNone == aError && mPlayer) { - qDebug("SatAppToneProvider::MatoPlayComplete play"); - mPlayer->Play(); - } else { - qDebug( "SatAppToneProvider::MatoPlayComplete stop playing"); - // Stops playing if error. - stopPlayTone(); - } - qDebug("SatAppToneProvider::MatoPlayComplete error %d <", aError); -} - -//----------------------------------------------------------------------------- -// SatAppToneProvider::MapcInitComplete -// Initialisation complete -> starts playing the tone. -// ---------------------------------------------------------------------------- -void SatAppToneProvider::MapcInitComplete( TInt aError, - const TTimeIntervalMicroSeconds& /*aDuration*/ ) -{ - qDebug( "SatAppToneProvider::MapcInitComplete >" ); - // Audio player is initialised, so if there is no error, we can start - // playing the tone. - if (KErrNone == aError && mAudioPlayer) { - const TInt volume( Max(0, Min(mVolume, - mAudioPlayer->MaxVolume()))); - qDebug("CSatUiViewAppUi::\ - MapcInitComplete SetVolume %d", volume ); - // Set volume according Settings. - mAudioPlayer->SetVolume( volume ); - mAudioPlayer->Play(); - qDebug( "SatAppToneProvider::MapcInitComplete Play" ); - } else { - // Otherwise, we delete the initialised audio player. - if ( mAudioPlayer ) { - qDebug( "SatAppToneProvider::MapcInitComplete mAudioPlayer \ - true" ); - delete mAudioPlayer; - mAudioPlayer = 0; - } - - // Remove also the note for play tone - // If there was a duration for play tone, stop waiting - stopPlayTone(); - - qDebug( "SatAppToneProvider::MapcInitComplete Error %d", aError ); - } - qDebug( "SatAppToneProvider::MapcInitComplete <" ); -} - -//----------------------------------------------------------------------------- -// SatAppToneProvider::MapcPlayComplete -// Deletes audio player after playing is completed. -// ---------------------------------------------------------------------------- -void SatAppToneProvider::MapcPlayComplete( TInt /*aError*/ ) -{ - qDebug( "SatAppToneProvider::MapcPlayComplete >" ); - - // When playing is completed, deleting the audio player. - if ( mAudioPlayer ) { - qDebug("SatAppToneProvider::MapcPlayComplete delete mAudioPlayer"); - delete mAudioPlayer; - mAudioPlayer = 0; - } - // Remove note after play has completed. - stopPlayTone(); - qDebug( "SatAppToneProvider::MapcPlayComplete <" ); -} - - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/inc/ut_satappaction.h --- a/satui/satapp/tsrc/ut_satapp/inc/ut_satappaction.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_SATAPPACTION_H -#define UT_SATAPPACTION_H - -// includes -#include -#include - - -// forward declarations -class SatAppAction; - - - -// QTest class -class Ut_SatAppAction : public QObject -{ - Q_OBJECT - -public: - - Ut_SatAppAction(QObject *parent = 0); - -private slots: - - void testAction(); - void testParams(); - void testComplete(); - void testCompleteSignal(); - void testDoubleComplete(); - void testAsyncActionRobustness(); - void testWait(); - -private: - - -}; - - - -// Helper object -class ActionHelper : public QObject -{ - Q_OBJECT - -public: - ActionHelper() {mCounter=0;} - int& count() {return mCounter;} - -public slots: - void inc() {++mCounter;} - void del(SatAppAction*); - -private: - int mCounter; -}; - - -#endif // UT_SATAPPACTION_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/inc/ut_satappconfirmprovider.h --- a/satui/satapp/tsrc/ut_satapp/inc/ut_satappconfirmprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_SATAPPCONFIRMPROVIDER_H -#define UT_SATAPPCONFIRMPROVIDER_H - -// includes -#include -#include - - -// forward declarations -class SatAppConfirmProvider; - - - -// QTest class -class Ut_SatAppConfirmProvider : public QObject -{ - Q_OBJECT - -public: - - Ut_SatAppConfirmProvider( - QObject *parent = 0); - -private slots: - - void testConfirmCommand_data(); - void testConfirmCommand(); - void testConfirmFirstAction(); - void testConfirmSecondAction(); - void testConfirmAndClearScreen(); - -}; - - -// internal helper class -class ConfirmProviderTest: public QObject -{ - Q_OBJECT - -public: - - ConfirmProviderTest(); - ~ConfirmProviderTest(); - -public slots: - - void simulateFirstActionClicked(); - void simulateSecondActionClicked(); - void simulateClearScreen(); - void cleanup(); - -public: - - // test data - SatAppConfirmProvider *mConfirm; - -}; - - -#endif // UT_SATAPPCONFIRMPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/inc/ut_satappinputprovider.h --- a/satui/satapp/tsrc/ut_satapp/inc/ut_satappinputprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_SATAPPINPUTPROVIDER_H -#define UT_SATAPPINPUTPROVIDER_H - -// includes -#include -#include - - -// forward declarations -class SatAppInputProvider; - - - -// QTest class -class Ut_SatAppInputProvider : public QObject -{ - Q_OBJECT - -public: - - Ut_SatAppInputProvider( - QObject *parent = 0); - -private slots: - - void testResetState(); - - void testGetInkeyAndOk_data(); - void testGetInkeyAndOk(); - void testGetInkeyAndCancel_data(); - void testGetInkeyAndCancel(); - void testGetInkeyAndTimeout(); - void testGetInkeyAndReset(); - void testGetInkeyAndDelete(); - - void testGetInkeyImmediateAndOk(); - void testGetInkeyImmediateAndCancel(); - - void testGetInputAndOk_data(); - void testGetInputAndOk(); - void testGetInputAndCancel_data(); - void testGetInputAndCancel(); - void testGetInputAndTimeout(); - void testGetInputAndReset(); - void testGetInputAndDelete(); - -private: - - -}; - - -// internal helper class -class InputProviderTest: public QObject -{ - Q_OBJECT - -public: - - InputProviderTest(); - ~InputProviderTest(); - -public slots: - - void simulateFirstActionClicked(); - void simulateSecondActionClicked(); - void simulateImmediateKeypress(QString s); - void cleanup(); - -public: - - - // test data - SatAppInputProvider *mInput; - -}; - - -#endif // UT_SATAPPINPUTPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/inc/ut_satappmainhandler.h --- a/satui/satapp/tsrc/ut_satapp/inc/ut_satappmainhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_SATAPPMAINHANDLER_H -#define UT_SATAPPMAINHANDLER_H - -#include -#include - - -// Class forwards -class HbMainWindow; -class SatAppMainHandler; - -/** - * Satapp unit test class. - * - * @since S60 - */ -class Ut_SatAppMainHandler : public QObject -{ - Q_OBJECT - -public: - - Ut_SatAppMainHandler( - HbMainWindow* mainWindow, QObject *parent = 0); - - virtual ~Ut_SatAppMainHandler(); - -private slots: - /** - * Called before the first testfunction is executed. - * Handles the SetUpMenu command. - */ - void initTestCase(); - - /** - * Called after the last testfunction has been executed. - * - */ - void cleanupTestCase(); - - /** - * Test SatAppMainHandler's constructor. - * - */ - void testCreateMainHandler(); - - /** - * Test SatAppMainHandler's constructor in offline. - * - */ - void testCreateMainHandler_OfflineMode(); - -private: - - HbMainWindow* mMainWindow; // not own - SatAppMainHandler *mMainHandler; - -}; - -#endif // UT_SATAPPMAINHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/inc/ut_satappmenuprovider.h --- a/satui/satapp/tsrc/ut_satapp/inc/ut_satappmenuprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_SATAPPMENUPROVIDER_H -#define UT_SATAPPMENUPROVIDER_H - -// includes -#include -#include - - -// forward declarations -class HbMainWindow; -class SatAppMenuProvider; - - - -// QTest class -class Ut_SatAppMenuProvider : public QObject -{ - Q_OBJECT - -public: - - Ut_SatAppMenuProvider( - HbMainWindow* mainWindow, QObject *parent = 0); - -private slots: - - void testResetState(); - - void testSetUpMenu_data(); - void testSetUpMenu(); - void testSetUpMenuAndReset(); - void testSetUpMenuAndDelete(); - - void testSelectItem_data(); - void testSelectItem(); - void testSelectItemAndBack(); - void testSelectItemAndTimeout(); - void testSelectItemAndReset(); - void testSelectItemAndDelete(); - -private: - - HbMainWindow* mMainWindow; // not own - -}; - - -// internal helper class -class MenuProviderTest: public QObject -{ - Q_OBJECT - -public: - - MenuProviderTest(HbMainWindow* mainWindow); - ~MenuProviderTest(); - -public slots: - void loadMainview(); - void simulateItemSelected(); - void simulateBackButtonClicked(); - void cleanup(); - -public: - - // test data - SatAppMenuProvider *mMenu; - int mItemIndexToBeSelected; - -}; - - -#endif // UT_SATAPPMENUPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/inc/ut_satapppopupprovider.h --- a/satui/satapp/tsrc/ut_satapp/inc/ut_satapppopupprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_SATAPPPOPUPPROVIDER_H -#define UT_SATAPPPOPUPPROVIDER_H - -// includes -#include -#include - - -// forward declarations -class SatAppPopupProvider; - - - -// QTest class -class Ut_SatAppPopupProvider : public QObject -{ - Q_OBJECT - -public: - - Ut_SatAppPopupProvider( - QObject *parent = 0); - -private slots: - - - void testDisplayTextAndOk_data(); - void testDisplayTextAndOk(); - - void testDisplayTextAndCancel_data(); - void testDisplayTextAndCancel(); - - void testDisplayTextAndTimeout(); - - void testNotificationWithCancel_data(); - void testNotificationWithCancel(); - - void testNotification_data(); - void testNotification(); - -}; - - -// internal helper class -class PopupProviderTest: public QObject -{ - Q_OBJECT - -public: - - PopupProviderTest(); - ~PopupProviderTest(); - -public slots: - - bool simulateOkClicked(); - bool simulateCancelClicked(); - void cleanup(); - -public: - - // test data - SatAppPopupProvider *mPopup; - -}; - - -#endif // UT_SATAPPPOPUPPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/inc/ut_satappserverdispatcher.h --- a/satui/satapp/tsrc/ut_satapp/inc/ut_satappserverdispatcher.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* 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: Unit test CSatUiObserver class -* -*/ - -#ifndef UT_SATAPPSERVERDISPATCHER_H -#define UT_SATAPPSERVERDISPATCHER_H - -#include -#include - -// Class forwards -class SatAppServerDispatcher; -class SatAppAction; - -/** - * CSatUiObserver unit test class. - */ -class Ut_SatAppServerDispatcher : public QObject -{ - Q_OBJECT - -public: - Ut_SatAppServerDispatcher(QObject *parent = 0); - -private slots: - - void initTestCase(); - void cleanupTestCase(); - - //test MSatUiObserver api - void testDisplayText_data(); - void testDisplayText(); - void testGetInkey_data(); - void testGetInkey(); - void testGetInput_data(); - void testGetInput(); - void testSetUpMenu_data(); - void testSetUpMenu(); - void testSelectItem_data(); - void testSelectItem(); - void testPlayTone_data(); - void testPlayTone(); - void testConfirmCommand_data(); - void testConfirmCommand(); - void testNotification_data(); - void testNotification(); - void testEventNotification_data(); - void testEventNotification(); - - // test slots - void testMenuSelection(); - void testUserCancelSession(); - -private: - - SatAppServerDispatcher *mServer; - -}; - - -// internal helper class -class ServerDispatcherHelper: public QObject -{ - Q_OBJECT - -public slots: - void exec(SatAppAction& action); - void simulateItemSelected(SatAppAction& action); -}; - -#endif // UT_SATAPPSERVERDISPATCHER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/inc/ut_satapptoneprovider.h --- a/satui/satapp/tsrc/ut_satapp/inc/ut_satapptoneprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_SATAPPTONEPROVIDER_H -#define UT_SATAPPTONEPROVIDER_H - -#include -#include -#include - - -// Class forwards -class SatAppToneProvider; - -// class declaration -class Ut_SatAppToneProvider : public QObject -{ - Q_OBJECT - -public: - - Ut_SatAppToneProvider(QObject *parent = 0); - -private slots: - - void testCreateProvider_data(); - void testCreateProvider(); - void testClearScreen(); - - void testPlayTone_data(); - void testPlayTone(); - void testplayDoubleTone_data(); - void testplayDoubleTone(); - void testPlayToneAndClearScreen(); - - void testMatoPrepareComplete_data(); - void testMatoPrepareComplete(); -// void testMatoPlayComplete_data(); -// void testMatoPlayComplete(); -// void testMapcPlayComplete_data(); -// void testMapcPlayComplete(); - void testMapcInitComplete_data(); - void testMapcInitComplete(); - void testRecognizeTone_data(); - void testRecognizeTone(); - void testPrepareAudioToneUtility(); - -}; - -// internal helper class -class ToneProviderTest: public QObject -{ - Q_OBJECT - -public: - - ToneProviderTest(); - ~ToneProviderTest(); - static SatAppToneProvider* getToneInstance(); - bool isMessageBoxShown(); - bool isTimerActive(); - void ConstructAudioTone(); - void DestroyAudioTone(); - void ConstructAudioPlayer(); - void DestroyAudioPlayer(); - void ConstructTimer(bool active); - void DestroyTimer(); - void SetPlayToneResult(TSatUiResponse error); - void TestRecognizeTone(int tone, int duration); - -public slots: - - void cleanup(); - -public: - - // test data - SatAppToneProvider *mTone; - -}; - -#endif // UT_SATAPPTONEPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/sis/utsatapp_template.SIS Binary file satui/satapp/tsrc/ut_satapp/sis/utsatapp_template.SIS has changed diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/sis/utsatapp_template.pkg --- a/satui/satapp/tsrc/ut_satapp/sis/utsatapp_template.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -; utsatapp_template.pkg generated by qmake at 2010-02-04T14:06:21 -; This file is generated by qmake and should not be modified by the user -; - -; Language -&EN - -; SIS header: name, uid, version -#{"utsatapp"},(0xEead1c8b),1,0,0 - -; Localised Vendor name -%{"Vendor"} - -; Unique Vendor name -:"Vendor" - -; Manual PKG pre-rules from PRO files -; Default HW/platform dependencies -[0x101F7961],0,0,0,{"S60ProductID"} -[0x102032BE],0,0,0,{"S60ProductID"} -[0x102752AE],0,0,0,{"S60ProductID"} -[0x1028315F],0,0,0,{"S60ProductID"} - -; Default dependency to Qt libraries -;(0x2001E61C), , , , {"Qt"} - -; Executable and default resource files -"/epoc32/release/armv5/urel/utsatapp.exe" - "!:\sys\bin\utsatapp.exe" -"/epoc32/data/z/resource/apps/utsatapp.rsc" - "!:\resource\apps\utsatapp.rsc" -"/epoc32/data/z/private/10003a3f/import/apps/utsatapp_reg.rsc" - "!:\private\10003a3f\import\apps\utsatapp_reg.rsc" - -; Manual PKG post-rules from PRO files diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/main.cpp --- a/satui/satapp/tsrc/ut_satapp/src/main.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* 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:Unit testing of SatApp -* -* -*/ - - -#include -#include "hbapplication.h" -#include "hbinstance.h" - -#include "ut_satappmainhandler.h" -#include "ut_satappmenuprovider.h" -#include "ut_satappinputprovider.h" -#include "ut_satapptoneprovider.h" -#include "ut_satapppopupprovider.h" -#include "ut_satappserverdispatcher.h" -#include "ut_satappconfirmprovider.h" -#include "ut_satappaction.h" - -int main(int argc, char *argv[]) -{ - qDebug("Ut_SatApp: main() >"); - HbApplication app(argc,argv); - HbInstance::instance(); - HbMainWindow mainWindow; - - // test cmdline parameters - char *pass[3]; - pass[0] = argv[0]; - pass[1] = "-o"; - - int result(0); - - Ut_SatAppPopupProvider utPopupProvider; - pass[2] = "c:\\logs\\sat\\Ut_SatAppPopupProvider.txt"; - result += QTest::qExec(&utPopupProvider, /*3*/ 1, pass); - - Ut_SatAppConfirmProvider utConfirmProvide; - pass[2] = "c:\\logs\\sat\\Ut_SatAppConfirmProvider.txt"; - result += QTest::qExec(&utConfirmProvide, /*3*/ 1, pass); - - Ut_SatAppAction utAction; - pass[2] = "c:\\logs\\sat\\Ut_SatAppAction.txt"; - result += QTest::qExec(&utAction, /*3*/ 1, pass); - - Ut_SatAppMenuProvider utMenuProvider(&mainWindow); - pass[2] = "c:\\logs\\sat\\Ut_SatAppMenuProvider.txt"; - result += QTest::qExec(&utMenuProvider, /*3*/ 1, pass); - - Ut_SatAppInputProvider utInputProvider; - pass[2] = "c:\\logs\\sat\\Ut_SatAppInputProvider.txt"; - result += QTest::qExec(&utInputProvider, /*3*/ 1, pass); - - Ut_SatAppToneProvider utToneProvider; - pass[2] = "c:\\logs\\sat\\Ut_SatAppToneProvider.txt"; - result += QTest::qExec(&utToneProvider, /*3*/ 1, pass); - - Ut_SatAppServerDispatcher utServerDispatcher; - pass[2] = "c:\\logs\\sat\\Ut_SatAppServerDispatcher.txt"; - result += QTest::qExec(&utServerDispatcher, /*3*/ 1, pass); - - Ut_SatAppMainHandler utMainHandler(&mainWindow); - pass[2] = "c:\\logs\\sat\\ut_SatAppMainHandler.txt"; - result = QTest::qExec(&utMainHandler, /*3*/ 1, pass); - - // cause a crash to free binary, so that we can recompile and run - // unit tests without restarting the emulator - //int crash = ((QString*)0)->length(); - return result; -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/rsat_stub.cpp --- a/satui/satapp/tsrc/ut_satapp/src/rsat_stub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* 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: Stub implementations for RSatSession and RSatUiSession -* (used in unit testing the SAT APP) -* -* -*/ - - -#include -#include -#include -#include - -// adapter -class CSatCCommandProcessor: public MSatUiAdapter { - void MenuSelection(TInt aMenuItem, TBool aHelpRequested) - { - } - - void SessionTerminated(TInt8 aType) - { - } -}; - - -// RSatSession - -RSatSession::RSatSession() -{ -} - -void RSatSession::ConnectL() -{ -} - -// RSatUiSession - -RSatUiSession::RSatUiSession() -{ -} - -void RSatUiSession::RegisterL(const RSatSession&,MSatUiObserver*) -{ - iCommandProcessor = new CSatCCommandProcessor(); -} - -void RSatUiSession::Close() -{ - delete iCommandProcessor; -} - -MSatUiAdapter* RSatUiSession::Adapter() const -{ - return iCommandProcessor; -} - - - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/ut_satappaction.cpp --- a/satui/satapp/tsrc/ut_satapp/src/ut_satappaction.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,201 +0,0 @@ -/* -* 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: Unit test for satappmainhandler -* -*/ - -#include -#include -#include - -#include -#include - -#include "ut_satappaction.h" -#include "satappaction.h" - - - -// -------------------------------------------------------- -// The unit tests begin here -// -------------------------------------------------------- - -Ut_SatAppAction::Ut_SatAppAction(QObject *parent) - :QObject(parent) -{ -} - - -void Ut_SatAppAction::testAction() -{ - SatAppAction a(ESatDisplayTextAction); - SatAppAction b(ESatGetInputAction); - SatAppAction c(ESatPlayToneAction); - - QCOMPARE(a.action(),(int)ESatDisplayTextAction); - QCOMPARE(b.action(),(int)ESatGetInputAction); - QCOMPARE(c.action(),(int)ESatPlayToneAction); - -} - -void Ut_SatAppAction::testParams() -{ - SatAppAction a(ESatDisplayTextAction); - // qvariant - a.set(KeyText, QVariant("hello")); - QCOMPARE(a.value(KeyText).toString(),QString("hello")); - - // int - a.set(KeyMinLength, 25); - QCOMPARE(a.value(KeyMinLength).toInt(),25); - - // string - a.set(KeyInputString,_L("kiss")); - QCOMPARE(a.value(KeyInputString).toString(),QString("kiss")); - - // descriptor array - CDesCArrayFlat* array1 = new CDesCArrayFlat(8); - array1->AppendL(_L("item_0")); - array1->AppendL(_L("item_1")); - array1->AppendL(_L("item_2")); - a.set(KeyMenu,*array1); - QList list1 = a.value(KeyMenu).toList(); - QCOMPARE(list1.size(), 3); - QCOMPARE(list1[0].toString(), QString("item_0")); - QCOMPARE(list1[1].toString(), QString("item_1")); - QCOMPARE(list1[2].toString(), QString("item_2")); - - // int array - CArrayFixFlat* array2 = new CArrayFixFlat(8); - array2->AppendL(1); - array2->AppendL(2); - array2->AppendL(3); - a.set(KeyIconIdArray,*array2); - QList list2 = a.value(KeyIconIdArray).toList(); - QCOMPARE(list2.size(), 3); - QCOMPARE(list2[0].toInt(), 1); - QCOMPARE(list2[1].toInt(), 2); - QCOMPARE(list2[2].toInt(), 3); - - // TTimeIntervalSeconds - TTimeIntervalSeconds seconds(3); - a.set(KeyDuration,seconds); - QCOMPARE(a.value(KeyDuration).toInt(),3000); - - // TTimeIntervalMicroSeconds - TTimeIntervalMicroSeconds ysec(TInt64(500000)); - a.set(KeyDuration,ysec); - QCOMPARE(a.value(KeyDuration).toInt(),500); - - // test hasValue - QVERIFY(a.hasValue(KeyText)); - QVERIFY(a.hasValue(KeyMinLength)); - QVERIFY(a.hasValue(KeyInputString)); - QVERIFY(a.hasValue(KeyMenu)); - QVERIFY(a.hasValue(KeyIconIdArray)); - QVERIFY(a.hasValue(KeyDuration)); - QVERIFY(!a.hasValue(KeyHelpRequested)); // <-- not set - QVERIFY(!a.hasValue(KeyHelpRequested)); // <-- not set - QVERIFY(!a.hasValue(KeyCharacterSet)); // <-- not set - QVERIFY(!a.hasValue(QString("billy the kid"))); // <-- definitely not set -} - -void Ut_SatAppAction::testComplete() -{ - SatAppAction a(ESatDisplayTextAction); - SatAppAction b(ESatGetInputAction); - SatAppAction c(ESatPlayToneAction); - SatAppAction d(ESatPlayToneAction); - SatAppAction e(ESatPlayToneAction); - a.complete(); - b.completeWithSuccess(); - c.completeWithFailure(); - d.completeWithBackRequested(); - e.completeWithSessionTerminated(); - QCOMPARE(a.response(),ESatNoResponseFromUser); - QCOMPARE(b.response(),ESatSuccess); - QCOMPARE(c.response(),ESatFailure); - QCOMPARE(d.response(),ESatBackwardModeRequestedByUser); - QCOMPARE(e.response(),ESatSessionTerminatedByUser); -} - -void Ut_SatAppAction::testCompleteSignal() -{ - SatAppAction a(ESatDisplayTextAction); - SatAppAction b(ESatGetInputAction); - SatAppAction c(ESatPlayToneAction); - SatAppAction d(ESatPlayToneAction); - SatAppAction e(ESatPlayToneAction); - ActionHelper x; - connect(&a, SIGNAL(actionCompleted(SatAppAction*)), &x, SLOT(inc())); - connect(&b, SIGNAL(actionCompleted(SatAppAction*)), &x, SLOT(inc())); - connect(&c, SIGNAL(actionCompleted(SatAppAction*)), &x, SLOT(inc())); - connect(&d, SIGNAL(actionCompleted(SatAppAction*)), &x, SLOT(inc())); - connect(&e, SIGNAL(actionCompleted(SatAppAction*)), &x, SLOT(inc())); - a.complete(); - b.completeWithSuccess(); - c.completeWithFailure(); - d.completeWithBackRequested(); - e.completeWithSessionTerminated(); - QCOMPARE(x.count(),5); -} - -void Ut_SatAppAction::testDoubleComplete() -{ - SatAppAction a(ESatDisplayTextAction); - a.completeWithSuccess(); - QCOMPARE(a.response(),ESatSuccess); - a.completeWithFailure(); // <-- no effect because already completed - QCOMPARE(a.response(),ESatSuccess); // <-- still in same state! -} - -void Ut_SatAppAction::testAsyncActionRobustness() -{ - // this function tests if an action can be safely deleted in the "completed" - // slot, at the same time testing robustness and memory leaks by repeating - // the sequence multiple times - ActionHelper x; - for(int i=0; i<10000; ++i) - { - SatAppAction* a = new SatAppAction(ESatDisplayTextAction, this); - connect(a,SIGNAL(actionCompleted(SatAppAction*)),&x,SLOT(del(SatAppAction*))); - a->complete(); - } -} - - -void Ut_SatAppAction::testWait() -{ - SatAppAction a(ESatDisplayTextAction); - QTimer::singleShot(1000, &a, SLOT(completeWithSuccess())); - // this should last 1 second - a.waitUntilCompleted(); - QCOMPARE(a.response(),ESatSuccess); - - // this should flow through directly, because already completed - a.waitUntilCompleted(); - QCOMPARE(a.response(),ESatSuccess); // <-- response remains unchanged - -} - - - -// helper -void ActionHelper::del(SatAppAction* action) -{ - delete action; -} - - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/ut_satappconfirmprovider.cpp --- a/satui/satapp/tsrc/ut_satapp/src/ut_satappconfirmprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* 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: Unit test for satappmainhandler -* -*/ - -#include -#include - -#include - -#include "ut_satappconfirmprovider.h" -#include "satappconfirmprovider.h" -#include "satappaction.h" - -// -------------------------------------------------------- -// The unit tests begin here -// -------------------------------------------------------- - -Ut_SatAppConfirmProvider::Ut_SatAppConfirmProvider( - QObject *parent) - :QObject(parent) -{ -} - -void Ut_SatAppConfirmProvider::testConfirmCommand_data() -{ - QTest::addColumn("commandId"); - QTest::addColumn("alphaIdStatus"); - QTest::addColumn("text"); - QTest::addColumn("additionText"); - QTest::addColumn("userAccepted"); - QTest::addColumn("expectRes"); - - - QTest::newRow("t01") << (int)ESatOpenChannelQuery << (int)ESatAlphaIdNull - << "comfrm" << "addition"<< false << false; - QTest::newRow("t02") << (int)ESatOpenChannelQuery << (int)ESatAlphaIdNotProvided - << "comfrm" << "addition"<< true << true; - QTest::newRow("t03") << (int)ESatOpenChannelQuery << (int)ESatAlphaIdNotProvided - << "" << "addition"<< true << true; - QTest::newRow("t04") << (int)ESatOpenChannelQuery << (int)ESatAlphaIdNotProvided - << "comfrm" << ""<< true << true; - QTest::newRow("t05") << (int)ESatSSendSmQuery << (int)ESatAlphaIdNull - << "comfrm" << "addition"<< true << true; - QTest::newRow("t06") << (int)ESatSSetUpCallQuery << (int)ESatAlphaIdNull - << "comfrm" << "addition"<< true << true; - QTest::newRow("t07") << (int)ESatSSetUpCallQuery << (int)ESatAlphaIdNull - << "" << "addition"<< true << true; - QTest::newRow("t08") << (int)ESatSSetUpCallQuery << (int)ESatAlphaIdNull - << "" << ""<< true << true; - QTest::newRow("t09") << (int)ESatSLaunchBrowserQuery << (int)ESatAlphaIdNull - << "" << ""<< true << true; - QTest::newRow("t10") << (int)ESatSLaunchBrowserQuery << (int)ESatAlphaIdNotProvided - << "" << ""<< true << true; - QTest::newRow("t11") << (int)ESatSLaunchBrowserQuery << (int)ESatAlphaIdNull - << "" << ""<< true << true; - QTest::newRow("t12") << 10 << (int)ESatAlphaIdNull - << "" << ""<< true << true; - QTest::newRow("t05") << (int)ESatSSendUssdQuery << (int)ESatAlphaIdNull - << "comfrm" << "addition"<< true << true; - QTest::newRow("t05") << (int)ESatSSendSsQuery << (int)ESatAlphaIdNull - << "comfrm" << "addition"<< true << true; - QTest::newRow("t05") << (int)ESatSRefreshQuery << (int)ESatAlphaIdNull - << "comfrm" << "addition"<< true << true; -} - - -void Ut_SatAppConfirmProvider::testConfirmCommand() -{ - QFETCH(int, commandId); - QFETCH(int, alphaIdStatus); - QFETCH(QString, text); - QFETCH(QString, additionText); - QFETCH(bool, userAccepted); - QFETCH(bool, expectRes); - - SatAppAction action(ESatConfirmAction); - action.set(KeyQueryCommandId, commandId); - action.set(KeyAlphaIdStatus, alphaIdStatus); - action.set(KeyText, text); - action.set(KeyAdditionalText, additionText); - action.set(KeyActionAccepted, userAccepted); - - ConfirmProviderTest test; - QTimer::singleShot(1000, &test, SLOT(simulateFirstActionClicked())); - test.mConfirm->confirmCommand(action); - QCOMPARE(userAccepted,expectRes); -} - -void Ut_SatAppConfirmProvider::testConfirmFirstAction() -{ - ConfirmProviderTest test; - - SatAppAction action(ESatConfirmAction); - action.set(KeyQueryCommandId, ESatOpenChannelQuery); - action.set(KeyAlphaIdStatus, ESatAlphaIdNull); - action.set(KeyText, "OpenChannel"); - action.set(KeyAdditionalText, "yes"); - test.mConfirm->confirmCommand(action); - QTimer::singleShot(1000, &test, SLOT(simulateFirstActionClicked())); - action.waitUntilCompleted(); - QCOMPARE(action.response(), ESatSuccess); -} - -void Ut_SatAppConfirmProvider::testConfirmSecondAction() -{ - ConfirmProviderTest test; - - SatAppAction action(ESatConfirmAction); - action.set(KeyQueryCommandId, ESatOpenChannelQuery); - action.set(KeyAlphaIdStatus, ESatAlphaIdNull); - action.set(KeyText, "OpenChannel"); - action.set(KeyAdditionalText, "No"); - test.mConfirm->confirmCommand(action); - QTimer::singleShot(1000, &test, SLOT(simulateSecondActionClicked())); - action.waitUntilCompleted(); - QCOMPARE(action.response(), ESatBackwardModeRequestedByUser); -} - - -void Ut_SatAppConfirmProvider::testConfirmAndClearScreen() -{ - ConfirmProviderTest test; - - SatAppAction action(ESatConfirmAction); - action.set(KeyQueryCommandId, ESatOpenChannelQuery); - action.set(KeyAlphaIdStatus, ESatAlphaIdNull); - action.set(KeyText, "OpenChannel"); - action.set(KeyAdditionalText, "ClearScreen"); - test.mConfirm->confirmCommand(action); - QTimer::singleShot(1000, &test, SLOT(simulateClearScreen())); - action.waitUntilCompleted(); - QCOMPARE(action.response(), ESatNoResponseFromUser); - - action.set(KeyQueryCommandId, ESatSSetUpCallQuery); - action.set(KeyText, "SetUpCall"); - test.mConfirm->confirmCommand(action); - QTimer::singleShot(1000, &test, SLOT(simulateClearScreen())); - action.waitUntilCompleted(); - QCOMPARE(action.response(), ESatNoResponseFromUser); -} - -// --------------------------------------------------------------- -// internal helper class -// --------------------------------------------------------------- - -ConfirmProviderTest::ConfirmProviderTest() -{ - mConfirm = new SatAppConfirmProvider(this); -} - -ConfirmProviderTest::~ConfirmProviderTest() -{ - cleanup(); -} - -void ConfirmProviderTest::simulateFirstActionClicked() -{ - if (mConfirm->mConfirmQuery) - mConfirm->mConfirmQuery->actions().at(0)->trigger(); -} - -void ConfirmProviderTest::simulateSecondActionClicked() -{ - if (mConfirm->mConfirmQuery) - mConfirm->mConfirmQuery->actions().at(1)->trigger(); - -} - -void ConfirmProviderTest::simulateClearScreen() -{ - if (mConfirm->mConfirmQuery) mConfirm->clearScreen(); -} - -void ConfirmProviderTest::cleanup() -{ - delete mConfirm; - mConfirm = 0; -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/ut_satappinputprovider.cpp --- a/satui/satapp/tsrc/ut_satapp/src/ut_satappinputprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,411 +0,0 @@ -/* -* 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: Unit test for satappmainhandler -* -*/ - -#include -#include - -#include -#include - -#include "ut_satappinputprovider.h" -#include "satappinputprovider.h" -#include "satappaction.h" - - -// -------------------------------------------------------- -// The unit tests begin here -// -------------------------------------------------------- - -Ut_SatAppInputProvider::Ut_SatAppInputProvider( - QObject *parent) - :QObject(parent) -{ -} - -void Ut_SatAppInputProvider::testResetState() -{ - InputProviderTest test; - test.mInput->resetState(); -} - -void Ut_SatAppInputProvider::testGetInkeyAndOk_data() -{ - QTest::addColumn("text"); - QTest::addColumn("charset"); - QTest::addColumn("inkey"); - - QTest::newRow("t01") << "title" << (int)ESatDigitOnly << 0; - QTest::newRow("t02") << "title" << (int)ESatCharSmsDefaultAlphabet << 0; - QTest::newRow("t03") << "title" << (int)ESatCharUcs2Alphabet << 0; - QTest::newRow("t04") << "title" << (int)ESatYesNo << 0; - QTest::newRow("t05") << "long title that does not fix to screen" << (int)ESatDigitOnly << 0; - QTest::newRow("t06") << "long title that does not fix to screen" << (int)ESatCharSmsDefaultAlphabet << 0; - QTest::newRow("t07") << "long title that does not fix to screen" << (int)ESatCharUcs2Alphabet << 0; - QTest::newRow("t08") << "long title that does not fix to screen" << (int)ESatYesNo << 0; - QTest::newRow("t09") << "" << (int)ESatDigitOnly << 1; - QTest::newRow("t10") << "" << (int)ESatCharSmsDefaultAlphabet << 47; - QTest::newRow("t11") << "" << (int)ESatCharUcs2Alphabet << 58; - QTest::newRow("t12") << "" << (int)ESatYesNo << 0; -} - -void Ut_SatAppInputProvider::testGetInkeyAndOk() -{ - QFETCH(QString, text); - QFETCH(int, charset); - QFETCH(int, inkey); - bool selfExp = false; - - SatAppAction a(ESatGetInkeyAction); - a.set(KeyText,text); - a.set(KeyCharacterSet,charset); - a.set(KeyInKey,inkey); - a.set(KeyImmediate,false); - a.set(KeyDuration,10000); - - InputProviderTest test; - test.mInput->getInkey(a); - // simulate press OK - if( (charset!=ESatYesNo) || (text.length()>0)){ - test.simulateFirstActionClicked(); - } - - if (charset==ESatYesNo) { - if( text.length()>0 ){ - QCOMPARE(a.response(),ESatSuccess); - QCOMPARE(a.value(KeyInKey).toInt(),1); - } - else { - QCOMPARE(a.response(),ESatFailure); - } - - } - else { - QCOMPARE(a.response(),ESatSuccess); - } - -} - -void Ut_SatAppInputProvider::testGetInkeyAndCancel_data() -{ - // uses same test materil as testGetInkeyAndOk() - testGetInkeyAndOk_data(); -} - -void Ut_SatAppInputProvider::testGetInkeyAndCancel() -{ - QFETCH(QString, text); - QFETCH(int, charset); - QFETCH(int, inkey); - bool selfExp = false; - - SatAppAction a(ESatGetInkeyAction); - a.set(KeyText,text); - a.set(KeyCharacterSet,charset); - a.set(KeyInKey,inkey); - a.set(KeyImmediate,false); - a.set(KeyDuration,10000); - - InputProviderTest test; - test.mInput->getInkey(a); - // simulate press CANCEL - if((charset!=ESatYesNo) || (text.length()>0)) { - test.simulateSecondActionClicked(); - } - - if (charset==ESatYesNo) { - if( text.length()>0 ){ - QCOMPARE(a.response(),ESatSuccess); - QCOMPARE(a.value(KeyInKey).toInt(),0); - } - else { - QCOMPARE(a.response(),ESatFailure); - } } - else { - QCOMPARE(a.response(),ESatBackwardModeRequestedByUser); - } -} - -void Ut_SatAppInputProvider::testGetInkeyAndTimeout() -{ - SatAppAction a(ESatGetInkeyAction); - a.set(KeyText,"hello"); - a.set(KeyCharacterSet,ESatCharSmsDefaultAlphabet); - a.set(KeyInKey,64); - a.set(KeyImmediate,false); - a.set(KeyDuration,1000); - - InputProviderTest test; - test.mInput->getInkey(a); - a.waitUntilCompleted(); - - QCOMPARE(a.response(),ESatNoResponseFromUser); -} - -void Ut_SatAppInputProvider::testGetInkeyAndReset() -{ - SatAppAction a(ESatGetInkeyAction); - a.set(KeyText,"hello"); - a.set(KeyCharacterSet,ESatCharSmsDefaultAlphabet); - a.set(KeyInKey,64); - a.set(KeyImmediate,false); - a.set(KeyDuration,10000); - a.setResponse(ESatFailure); - - InputProviderTest test; - test.mInput->getInkey(a); - test.mInput->resetState(); - - QCOMPARE(a.response(),ESatNoResponseFromUser); -} - -void Ut_SatAppInputProvider::testGetInkeyAndDelete() -{ - SatAppAction a(ESatGetInkeyAction); - a.set(KeyText,"hello"); - a.set(KeyCharacterSet,ESatCharSmsDefaultAlphabet); - a.set(KeyInKey,64); - a.set(KeyImmediate,false); - a.set(KeyDuration,10000); - a.setResponse(ESatFailure); - - { - InputProviderTest test; - test.mInput->getInkey(a); - } - // at this point everything should be cleaned up safely, and action - // should be completed later when application exit or timeout - - QCOMPARE(a.response(),ESatFailure); -} - -void Ut_SatAppInputProvider::testGetInkeyImmediateAndOk() -{ - SatAppAction a(ESatGetInkeyAction); - a.set(KeyText,"hello"); - a.set(KeyCharacterSet,ESatDigitOnly); - a.set(KeyInKey,64); - a.set(KeyImmediate,true); - a.set(KeyDuration,10000); - a.setResponse(ESatFailure); - - InputProviderTest test; - test.mInput->getInkey(a); - test.simulateImmediateKeypress("0"); - - QCOMPARE(a.response(),ESatSuccess); - QCOMPARE(a.value(KeyInKey).toInt(),0x30); -} - -void Ut_SatAppInputProvider::testGetInkeyImmediateAndCancel() -{ - SatAppAction a(ESatGetInkeyAction); - a.set(KeyText,"hello"); - a.set(KeyCharacterSet,ESatDigitOnly); - a.set(KeyInKey,64); - a.set(KeyImmediate,true); - a.set(KeyDuration,10000); - a.setResponse(ESatFailure); - - InputProviderTest test; - test.mInput->getInkey(a); - test.simulateFirstActionClicked(); // cancel - - QCOMPARE(a.response(),ESatBackwardModeRequestedByUser); -} - -void Ut_SatAppInputProvider::testGetInputAndOk_data() -{ - QTest::addColumn("text"); - QTest::addColumn("charset"); - QTest::addColumn("input"); - QTest::addColumn("min"); - QTest::addColumn("max"); - QTest::addColumn("hide"); - - QTest::newRow("t01") << "title" << (int)ESatDigitOnly << "" << 1 << 5 << false; - QTest::newRow("t02") << "title" << (int)ESatCharSmsDefaultAlphabet << "" << 1 << 5 << false; - QTest::newRow("t03") << "title" << (int)ESatCharUcs2Alphabet << "" << 1 << 5 << false; - QTest::newRow("t04") << "very long title that does not fit into screen" << (int)ESatDigitOnly << "" << 1 << 5 << false; - QTest::newRow("t05") << "very long title that does not fit into screen" << (int)ESatCharSmsDefaultAlphabet << "" << 2 << 8 << false; - QTest::newRow("t06") << "very long title that does not fit into screen" << (int)ESatCharUcs2Alphabet << "" << 2 << 8 << false; - QTest::newRow("t07") << "title" << (int)ESatDigitOnly << "12345" << 1 << 5 << false; - QTest::newRow("t08") << "title" << (int)ESatCharSmsDefaultAlphabet << "12345" << 1 << 5 << false; - QTest::newRow("t09") << "title" << (int)ESatCharUcs2Alphabet << "12345" << 1 << 5 << false; - QTest::newRow("t10") << "title" << (int)ESatDigitOnly << "12345" << 1 << 5 << true; - QTest::newRow("t11") << "title" << (int)ESatCharSmsDefaultAlphabet << "12345" << 1 << 5 << true; - QTest::newRow("t12") << "title" << (int)ESatCharUcs2Alphabet << "12345" << 1 << 5 << true; - QTest::newRow("t13") << "" << (int)ESatDigitOnly << "" << 1 << 5 << false; - QTest::newRow("t14") << "" << (int)ESatCharSmsDefaultAlphabet << "" << 1 << 5 << false; - QTest::newRow("t15") << "" << (int)ESatCharUcs2Alphabet << "" << 1 << 5 << false; - QTest::newRow("t16") << "" << (int)ESatDigitOnly << "123456789123456789" << 1 << 5 << false; - QTest::newRow("t17") << "" << (int)ESatCharSmsDefaultAlphabet << "123456789123456789" << 1 << 5 << false; - QTest::newRow("t18") << "" << (int)ESatCharUcs2Alphabet << "123456789123456789" << 1 << 5 << false; - -} - -void Ut_SatAppInputProvider::testGetInputAndOk() -{ - QFETCH(QString, text); - QFETCH(int, charset); - QFETCH(QString, input); - QFETCH(int, min); - QFETCH(int, max); - QFETCH(bool, hide); - - SatAppAction a(ESatGetInputAction); - a.set(KeyText,text); - a.set(KeyCharacterSet,charset); - a.set(KeyInputString,input); - a.set(KeyMinLength,min); - a.set(KeyMaxLength,max); - a.set(KeyHideInput,hide); - a.set(KeyDuration,10000); - - InputProviderTest test; - test.mInput->getInput(a); - test.simulateFirstActionClicked(); - - QCOMPARE(a.response(),ESatSuccess); -} - -void Ut_SatAppInputProvider::testGetInputAndCancel_data() -{ - // uses same test data as testGetInputAndOk - testGetInputAndOk_data(); -} - -void Ut_SatAppInputProvider::testGetInputAndCancel() -{ - QFETCH(QString, text); - QFETCH(int, charset); - QFETCH(QString, input); - QFETCH(int, min); - QFETCH(int, max); - QFETCH(bool, hide); - - SatAppAction a(ESatGetInputAction); - a.set(KeyText,text); - a.set(KeyCharacterSet,charset); - a.set(KeyInputString,input); - a.set(KeyMinLength,min); - a.set(KeyMaxLength,max); - a.set(KeyHideInput,hide); - a.set(KeyDuration,10000); - - InputProviderTest test; - test.mInput->getInput(a); - test.simulateSecondActionClicked(); - - QCOMPARE(a.response(),ESatBackwardModeRequestedByUser); -} - -void Ut_SatAppInputProvider::testGetInputAndTimeout() -{ - SatAppAction a(ESatGetInputAction); - a.set(KeyText,"hello"); - a.set(KeyCharacterSet,ESatCharSmsDefaultAlphabet); - a.set(KeyInputString,"12345"); - a.set(KeyMinLength,1); - a.set(KeyMaxLength,10); - a.set(KeyHideInput,false); - a.set(KeyDuration,1000); - - InputProviderTest test; - test.mInput->getInput(a); - a.waitUntilCompleted(); - - QCOMPARE(a.response(),ESatNoResponseFromUser); -} - -void Ut_SatAppInputProvider::testGetInputAndReset() -{ - SatAppAction a(ESatGetInputAction); - a.set(KeyText,"hello"); - a.set(KeyCharacterSet,ESatCharSmsDefaultAlphabet); - a.set(KeyInputString,"12345"); - a.set(KeyMinLength,1); - a.set(KeyMaxLength,10); - a.set(KeyHideInput,false); - a.set(KeyDuration,10000); - - InputProviderTest test; - test.mInput->getInput(a); - test.mInput->resetState(); - - QCOMPARE(a.response(),ESatNoResponseFromUser); -} - -void Ut_SatAppInputProvider::testGetInputAndDelete() -{ - SatAppAction a(ESatGetInputAction); - a.set(KeyText,"hello"); - a.set(KeyCharacterSet,ESatCharSmsDefaultAlphabet); - a.set(KeyInputString,"12345"); - a.set(KeyMinLength,1); - a.set(KeyMaxLength,10); - a.set(KeyHideInput,false); - a.set(KeyDuration,10000); - a.setResponse(ESatFailure); - - { - InputProviderTest test; - test.mInput->getInput(a); - } - // at this point input dialog out of scope and destroyed. - // pending action should have been completed later when application exit or timeout - - QCOMPARE(a.response(),ESatFailure); -} - - -// --------------------------------------------------------------- -// internal helper class -// --------------------------------------------------------------- - -InputProviderTest::InputProviderTest() -{ - mInput = new SatAppInputProvider(this); -} - -InputProviderTest::~InputProviderTest() -{ - cleanup(); -} - -void InputProviderTest::simulateFirstActionClicked() -{ - mInput->mCurrentDialog->actions().at(0)->trigger(); -} - -void InputProviderTest::simulateSecondActionClicked() -{ - mInput->mCurrentDialog->actions().at(1)->trigger(); -} - -void InputProviderTest::simulateImmediateKeypress(QString s) -{ - mInput->transmitInkeyImmediately(s); -} - -void InputProviderTest::cleanup() -{ - delete mInput; - mInput = 0; -} - - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/ut_satappmainhandler.cpp --- a/satui/satapp/tsrc/ut_satapp/src/ut_satappmainhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* -* 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: Unit test for satappmainhandler -* -*/ - - -#include -#include -#include -#include "ut_satappmainhandler.h" -//test class -#include "satappmainhandler.h" -#include "satappconstant.h" - -// ----------------------------------------------------------------------------- -// Ut_SatAppMainHandler::Ut_SatAppMainHandler -// ----------------------------------------------------------------------------- -// -Ut_SatAppMainHandler::Ut_SatAppMainHandler( - HbMainWindow* mainWindow, QObject *parent) - :QObject(parent), mMainWindow(mainWindow) -{ - qDebug("Ut_SatAppMainHandler::Ut_SatAppMainHandler >"); - qDebug("Ut_SatAppMainHandler::Ut_SatAppMainHandler <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppMainHandler::~Ut_SatAppMainHandler -// ----------------------------------------------------------------------------- -// -Ut_SatAppMainHandler::~Ut_SatAppMainHandler() -{ - qDebug("Ut_SatAppMainHandler::~Ut_SatAppMainHandler >"); - qDebug("Ut_SatAppMainHandler::~Ut_SatAppMainHandler <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppMainHandler::initTestCase -// QTestLib cleanup method, called after the last testfunction . -// ----------------------------------------------------------------------------- -void Ut_SatAppMainHandler::initTestCase() -{ - qDebug("Ut_SatAppMainHandler::initTestCase >"); - qDebug("Ut_SatAppMainHandler::initTestCase <"); -} - - -// ----------------------------------------------------------------------------- -// Ut_SatAppMainHandler::cleanupTestCase -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppMainHandler::cleanupTestCase() -{ - qDebug("Ut_SatAppMainHandler::cleanupTestCase >"); - if (mMainHandler) { - qDebug("Ut_SatAppMainHandler::cleanupTestCase delete mMainHandler..."); - delete mMainHandler; - mMainHandler = 0; - } - qDebug("Ut_SatAppMainHandler::cleanupTestCase <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppMainHandler::testCreateMainHandler -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppMainHandler::testCreateMainHandler() -{ - qDebug("Ut_SatAppMainHandler::testCreateMainHandler >"); - mMainHandler = new SatAppMainHandler(*mMainWindow); - QVERIFY(mMainHandler); - qDebug("Ut_SatAppMainHandler::testCreateMainHandler <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppMainHandler::testCreateMainHandler_OfflineMode -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppMainHandler::testCreateMainHandler_OfflineMode() -{ - qDebug("Ut_SatAppMainHandler::testCreateMainHandler_OfflineMode >"); - cleanupTestCase(); - TInt profileId(0); - CRepository* cr (NULL); - TRAPD(err, cr = CRepository::NewL(KCRUidCoreApplicationUIs)); - if ( KErrNone == err ) - { - // Get the ID of the currently active profile: - TInt error = cr->Get(KCoreAppUIsNetworkConnectionAllowed, profileId); - qDebug("Ut_SatAppMainHandler::SatAppMainHandler get active \ - profile error=%d, profileId=%d", error, profileId); - if( KErrNone != error){ - delete cr; - return; - } - error = cr->Set(KCoreAppUIsNetworkConnectionAllowed, - ECoreAppUIsNetworkConnectionNotAllowed); - qDebug("Ut_SatAppMainHandler::SatAppMainHandler set active \ - profile error=%d",error); - mMainHandler = new SatAppMainHandler(*mMainWindow); - QVERIFY(mMainHandler); - error = cr->Set(KCoreAppUIsNetworkConnectionAllowed, profileId); - qDebug("Ut_SatAppMainHandler::SatAppMainHandler set active \ - profile error=%d",error); - delete cr; - } - - qDebug("Ut_SatAppMainHandler::testCreateMainHandler_OfflineMode <"); -} -// End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/ut_satappmenuprovider.cpp --- a/satui/satapp/tsrc/ut_satapp/src/ut_satappmenuprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,268 +0,0 @@ -/* -* 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: Unit test for satappmainhandler -* -*/ - -#include -#include -#include - -#include "ut_satappmenuprovider.h" -#include "satappmenuprovider.h" -#include "satappaction.h" - - - -// -------------------------------------------------------- -// The unit tests begin here -// -------------------------------------------------------- - -Ut_SatAppMenuProvider::Ut_SatAppMenuProvider( - HbMainWindow* mainWindow, QObject *parent) - :QObject(parent) -{ - mMainWindow = mainWindow; -} - -void Ut_SatAppMenuProvider::testResetState() -{ - MenuProviderTest test(mMainWindow); - test.mMenu->resetState(); -} - -void Ut_SatAppMenuProvider::testSetUpMenu_data() -{ - QTest::addColumn("text"); - QTest::addColumn("menuitems"); - QTest::addColumn("selection"); - - QTest::newRow("t1") << "title" << 1 << 0; - QTest::newRow("t2") << "a very long title that does not fit to screen" << 2 << 1; - QTest::newRow("t3") << "manyrows" << 999 << 444; - QTest::newRow("t4") << "" << 1 << 0; - QTest::newRow("t5") << "" << 10 << 1; - QTest::newRow("t6") << "a" << 10 << 9; -} - -void Ut_SatAppMenuProvider::testSetUpMenu() -{ - QFETCH(QString, text); - QFETCH(int, menuitems); - QFETCH(int, selection); - - SatAppAction a(ESatSetUpMenuAction); - a.set(KeyText,text); - QStringList list; - for(int i=0; isetUpMenu(a); - - test.mItemIndexToBeSelected = selection; - test.simulateItemSelected(); - - QCOMPARE(a.response(), ESatSuccess); - QVERIFY(a.hasValue(KeySelection)); - -} - -void Ut_SatAppMenuProvider::testSetUpMenuAndReset() -{ - SatAppAction a(ESatSetUpMenuAction); - a.set(KeyText,"hello"); - QStringList list; - for(int i=0; i<10; ++i) {list<setUpMenu(a); - - test.mMenu->resetState(); - - QCOMPARE(a.response(), ESatSuccess); - -} - -void Ut_SatAppMenuProvider::testSetUpMenuAndDelete() -{ - SatAppAction a(ESatSetUpMenuAction); - a.set(KeyText,"hello"); - QStringList list; - for(int i=0; i<10; ++i) {list<setUpMenu(a); - } - // now SatAppMenuProvider is out of scope and deleted. - QCOMPARE(a.response(), ESatSuccess); -} - -void Ut_SatAppMenuProvider::testSelectItem_data() -{ - QTest::addColumn("text"); - QTest::addColumn("menuitems"); - QTest::addColumn("defaultitem"); - QTest::addColumn("selection"); - - QTest::newRow("t1") << "title" << 1 << 0 << 0; - QTest::newRow("t2") << "a very long title that does not fit to screen" << 2 << 0 << 1; - QTest::newRow("t3") << "manyrows" << 999 << 333 << 444 ; - QTest::newRow("t4") << "" << 3 << 2 << 1 ; - QTest::newRow("t5") << "" << 4 << 3 << 0 ; - QTest::newRow("t6") << "default out of range" << 5 << 7 << 1 ; -} - -void Ut_SatAppMenuProvider::testSelectItem() -{ - QFETCH(QString, text); - QFETCH(int, menuitems); - QFETCH(int, defaultitem); - QFETCH(int, selection); - - SatAppAction a(ESatSelectItemAction); - a.set(KeyText,text); - QStringList list; - for(int i=0; iselectItem(a); - - test.mItemIndexToBeSelected = selection; - test.simulateItemSelected(); - - QCOMPARE(a.response(), ESatSuccess); - QVERIFY(a.hasValue(KeySelection)); - -} - -void Ut_SatAppMenuProvider::testSelectItemAndBack() -{ - SatAppAction a(ESatSelectItemAction); - a.set(KeyText,"hello"); - QStringList list; - for(int i=0; i<10; ++i) {list<selectItem(a); - test.simulateBackButtonClicked(); - - QCOMPARE(a.response(), ESatBackwardModeRequestedByUser); - -} - - -void Ut_SatAppMenuProvider::testSelectItemAndTimeout() -{ - SatAppAction a(ESatSelectItemAction); - a.set(KeyText,"hello"); - QStringList list; - for(int i=0; i<10; ++i) {list<selectItem(a); - a.waitUntilCompleted(); // wait selectItem timeout - - QCOMPARE(a.response(), ESatNoResponseFromUser); - -} - -void Ut_SatAppMenuProvider::testSelectItemAndReset() -{ - SatAppAction a(ESatSelectItemAction); - a.set(KeyText,"hello"); - QStringList list; - for(int i=0; i<10; ++i) {list<selectItem(a); - test.mMenu->resetState(); - - QCOMPARE(a.response(), ESatSuccess); - -} - -void Ut_SatAppMenuProvider::testSelectItemAndDelete() -{ - SatAppAction a(ESatSelectItemAction); - a.set(KeyText,"hello"); - QStringList list; - for(int i=0; i<10; ++i) {list<selectItem(a); - } - - // object deleted, blocking function should return safely - QCOMPARE(a.response(), ESatSuccess); -} - -// --------------------------------------------------------------- -// internal helper class -// --------------------------------------------------------------- - -MenuProviderTest::MenuProviderTest(HbMainWindow* mainWindow) -{ - mMenu = new SatAppMenuProvider(mainWindow,this); -} - -MenuProviderTest::~MenuProviderTest() -{ - cleanup(); -} - -void MenuProviderTest::loadMainview() -{ - mMenu->loadMainView(); -} - -void MenuProviderTest::simulateItemSelected() -{ - mMenu->menuItemSelected(mMenu->mSelectListWidget->item( - mItemIndexToBeSelected)); -} - -void MenuProviderTest::simulateBackButtonClicked() -{ - mMenu->mSoftKeyBackAction->trigger(); -} - - -void MenuProviderTest::cleanup() -{ - delete mMenu; - mMenu = 0; -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/ut_satapppopupprovider.cpp --- a/satui/satapp/tsrc/ut_satapp/src/ut_satapppopupprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,284 +0,0 @@ -/* -* 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: Unit test for satappmainhandler -* -*/ - -#include -#include - -#include -#include -#include - -#include "ut_satapppopupprovider.h" -#include "satapppopupprovider.h" -#include "satappaction.h" - - - -// -------------------------------------------------------- -// The unit tests begin here -// -------------------------------------------------------- - -Ut_SatAppPopupProvider::Ut_SatAppPopupProvider( - QObject *parent) - :QObject(parent) -{ -} - - -void Ut_SatAppPopupProvider::testDisplayTextAndOk_data() -{ - QTest::addColumn("text"); - QTest::addColumn("appName"); - QTest::addColumn("sustainedText"); - QTest::addColumn("duration"); - - QTest::newRow("t01") << "title" << "sat" << true << 1000; - QTest::newRow("t02") << "" << "sat" << false << 100; - QTest::newRow("t03") << "" << "sat" << true << 500; - QTest::newRow("t04") << "title" << "sat" << true << 0; - QTest::newRow("t05") << "a bit longer title that does not fit" << "" << false << 900; - QTest::newRow("t06") << "title" << "" << false << 400; - QTest::newRow("t07") << "" << "" << true << 150; - QTest::newRow("t08") << "a bit longer title that does not fit" << "sat" << true << 2000; - QTest::newRow("t09") << "title" << "sat" << false << 600; - QTest::newRow("t10") << "" << "somewhat longer application name" << false << 200; - QTest::newRow("t11") << "" << "" << false << 0; - QTest::newRow("t12") << "title" << "" << true << 500; - QTest::newRow("t13") << "title" << "somewhat longer application name" << false << 0; - QTest::newRow("t14") << "" << "sat" << true << 700; - QTest::newRow("t15") << "title" << "sat" << false << 3000; - -} - -void Ut_SatAppPopupProvider::testDisplayTextAndOk() -{ - QFETCH(QString, text); - QFETCH(QString, appName); - QFETCH(bool, sustainedText); - QFETCH(int, duration); - - SatAppAction a(ESatDisplayTextAction); - a.set(KeyText,text); - a.set(KeyApplicationName,appName); - a.set(KeySustainedText,sustainedText); - a.set(KeyDuration,duration); - a.set(KeyWaitUserToClear,false); - a.setResponse(ESatFailure); - - PopupProviderTest test; - test.mPopup->displayText(a); - test.simulateOkClicked(); - - QCOMPARE(a.response(),ESatSuccess); -} - - -void Ut_SatAppPopupProvider::testDisplayTextAndCancel_data() -{ - testDisplayTextAndOk_data(); // same test material -} - -void Ut_SatAppPopupProvider::testDisplayTextAndCancel() -{ - QFETCH(QString, text); - QFETCH(QString, appName); - QFETCH(bool, sustainedText); - QFETCH(int, duration); - - SatAppAction a(ESatDisplayTextAction); - a.set(KeyText,text); - a.set(KeyApplicationName,appName); - a.set(KeySustainedText,sustainedText); - a.set(KeyDuration,duration); - a.set(KeyWaitUserToClear,false); - a.setResponse(ESatFailure); - - PopupProviderTest test; - test.mPopup->displayText(a); - test.simulateCancelClicked(); - - QCOMPARE(a.response(),ESatBackwardModeRequestedByUser); -} - - -void Ut_SatAppPopupProvider::testDisplayTextAndTimeout() -{ - SatAppAction a(ESatDisplayTextAction); - a.set(KeyText,"hello world"); - a.set(KeyApplicationName,"sat"); - a.set(KeySustainedText,false); - a.set(KeyDuration,1000); - a.set(KeyWaitUserToClear,true); - a.setResponse(ESatFailure); - - PopupProviderTest test; - test.mPopup->displayText(a); - a.waitUntilCompleted(); - QCOMPARE(a.response(),ESatNoResponseFromUser); -} - -void Ut_SatAppPopupProvider::testNotificationWithCancel_data() -{ - QTest::addColumn("commandId"); - QTest::addColumn("alphaIdStatus"); - QTest::addColumn("text"); - QTest::addColumn("controlResult"); - QTest::addColumn("clickState"); // clikcked->state - - QTest::newRow("t01") << (int)ESatSSendDataNotify << (int)ESatAlphaIdNotNull << "notify" - << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t02") << (int)ESatSSendDataNotify << (int)ESatAlphaIdNull << "" - << (int)ESatNotAllowed << (int)ESatSuccess; - - QTest::newRow("t03") << (int)ESatSReceiveDataNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t04") << (int)ESatSReceiveDataNotify << (int)ESatAlphaIdNull - << "" << (int)ESatNotAllowed << (int)ESatSuccess; - - QTest::newRow("t05") << (int)ESatSSendDtmfNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t06") << (int)ESatSSendDtmfNotify << (int)ESatAlphaIdNull - << "" << (int)ESatNotAllowed << (int)ESatSuccess; -} - -void Ut_SatAppPopupProvider::testNotificationWithCancel() -{ - QFETCH(int, commandId); - QFETCH(int, alphaIdStatus); - QFETCH(QString, text); - QFETCH(int, controlResult); - QFETCH(int, clickState); - - SatAppAction *a = new SatAppAction(ESatNotifyAction); - a->set(KeyCommandId,commandId); - a->set(KeyAlphaIdStatus,alphaIdStatus); - a->set(KeyText,text); - a->set(KeyControlResult,controlResult); - a->setResponse(ESatSuccess); - - PopupProviderTest test; - test.mPopup->notification(*a); - qDebug() << "action response" << a->response() << "/" << clickState; - QVERIFY(a->response()==(TSatUiResponse)clickState); -} - -void Ut_SatAppPopupProvider::testNotification_data() -{ - QTest::addColumn("commandId"); - QTest::addColumn("alphaIdStatus"); - QTest::addColumn("text"); - QTest::addColumn("controlResult"); - QTest::addColumn("clickState"); // clikcked->state - - QTest::newRow("t01") << (int)ESatSCloseChannelNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatNotAllowed << (int)ESatSuccess; - QTest::newRow("t02") << (int)ESatSCloseChannelNotify << (int)ESatAlphaIdNull - << "" << (int)ESatAllowedNoModification << (int)ESatSuccess; - - QTest::newRow("t03") << (int)ESatSMoSmControlNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t04") << (int)ESatSMoSmControlNotify << (int)ESatAlphaIdNull - << "" << (int)ESatNotAllowed << (int)ESatSuccess; - QTest::newRow("t05") << (int)ESatSMoSmControlNotify << (int)ESatAlphaIdNotProvided - << "" << (int)ESatAllowedWithModifications << (int)ESatSuccess; - - QTest::newRow("t06") << (int)ESatSCallControlNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t07") << (int)ESatSCallControlNotify << (int)ESatAlphaIdNull - << "" << (int)ESatNotAllowed << (int)ESatSuccess; - QTest::newRow("t08") << (int)ESatSCallControlNotify << (int)ESatAlphaIdNotProvided - << "" << (int)ESatAllowedWithModifications << (int)ESatSuccess; - - QTest::newRow("t09") << (int)ESatSSendUssdNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t10") << (int)ESatSSendUssdNotify << (int)ESatAlphaIdNull - << "" << (int)ESatNotAllowed << (int)ESatSuccess; - - QTest::newRow("t11") << (int)ESatSSendUssdNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t12") << (int)ESatSSendUssdNotify << (int)ESatAlphaIdNull - << "" << (int)ESatNotAllowed << (int)ESatSuccess; - - QTest::newRow("t13") << (int)ESatSSendSsNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t14") << (int)ESatSSendSsNotify << (int)ESatAlphaIdNull - << "" << (int)ESatNotAllowed << (int)ESatSuccess; - - QTest::newRow("t15") << (int)ESatSSendSmsNotify << (int)ESatAlphaIdNotNull - << "notify" << (int)ESatAllowedNoModification << (int)ESatSuccess; - QTest::newRow("t16") << (int)ESatSSendSmsNotify << (int)ESatAlphaIdNull - << "" << (int)ESatNotAllowed << (int)ESatSuccess; -} - -void Ut_SatAppPopupProvider::testNotification() -{ - QFETCH(int, commandId); - QFETCH(int, alphaIdStatus); - QFETCH(QString, text); - QFETCH(int, controlResult); - QFETCH(int, clickState); - - SatAppAction a(ESatNotifyAction); - a.set(KeyCommandId,commandId); - a.set(KeyAlphaIdStatus,alphaIdStatus); - a.set(KeyText,text); - a.set(KeyControlResult,controlResult); - a.setResponse(ESatSuccess); - - PopupProviderTest test; - test.mPopup->notification(a); - - qDebug() << "action response:" << a.response() << "/" << clickState; - QCOMPARE(a.response(),(TSatUiResponse)clickState); -} - -// --------------------------------------------------------------- -// internal helper class -// --------------------------------------------------------------- - -PopupProviderTest::PopupProviderTest() -{ - mPopup = new SatAppPopupProvider(this); -} - -PopupProviderTest::~PopupProviderTest() -{ - cleanup(); -} - -bool PopupProviderTest::simulateOkClicked() -{ - if (mPopup->mDisplayText->actions().size()<=0) return false; - mPopup->mDisplayText->actions().at(0)->trigger(); - return true; -} - -bool PopupProviderTest::simulateCancelClicked() -{ - if (mPopup->mDisplayText->actions().size()<=1) return false; - mPopup->mDisplayText->actions().at(1)->trigger(); - return true; -} - -void PopupProviderTest::cleanup() -{ - delete mPopup; - mPopup = 0; -} - - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/ut_satappserverdispatcher.cpp --- a/satui/satapp/tsrc/ut_satapp/src/ut_satappserverdispatcher.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1043 +0,0 @@ -/* -* 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: Unit test for CSatUiObserver -* -*/ - -#include "ut_satappserverdispatcher.h" -#include "satappserverdispatcher.h" -#include "satappaction.h" - -Ut_SatAppServerDispatcher::Ut_SatAppServerDispatcher(QObject *parent):QObject(parent) -{ -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::initTestCase -// QTestLib cleanup method, called after the last testfunction . -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::initTestCase() -{ - mServer = new SatAppServerDispatcher(this); -} - - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::cleanupTestCase -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::cleanupTestCase() -{ - delete mServer; - mServer = 0; -} - - - - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testDisplayText_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testDisplayText_data() -{ - qDebug("Ut_SatAppServerDispatcher::testDisplayText_data >"); - QTest::addColumn("text"); - QTest::addColumn("appName"); - QTest::addColumn("iconIdIdentifier"); - QTest::addColumn("iconIdQualifier");//enum 0~3 - QTest::addColumn("isIconDisplayed"); - QTest::addColumn("sustainedText"); - QTest::addColumn("duration"); - QTest::addColumn("isWaitUsertoClear"); - QTest::addColumn("expectValue"); - - QTest::newRow("first") << "Show Display text!" << "Unit test SIM Service" << - 84 << 1 << false << false << 2500 << true << 0; - - QTest::newRow("second") << "Show Display text!" << "SIM Service" << - 84 << 1 << true << false << 2500 << false << 0; - // test null text - QTest::newRow("third") << "" << "SIM Service" << - 84 << 1 << true << false << 2500 << false << -1; - - // test icon is available for command - QTest::newRow("fouth") << "Show Display text!" << "SIM Service" << - 84 << 2 << true << false << 2500 << false << 0; - - // test show a log text over the limitation - QTest::newRow("five") << "Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. Show a very very long text. " - << "SIM Service" << 84 << 2 << true << false << 2500 << false << -1; - - // test leave occurs - //QTest::newRow("forth") << "Show Display text!" << "" << - // 84 << 2 << true << false << 2500 << false << 1; - - qDebug("Ut_SatAppServerDispatcher::testDisplayText_data <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testDisplayText -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testDisplayText() -{ - qDebug("Ut_SatAppServerDispatcher::testDisplayText >"); - QVERIFY(mServer); - QFETCH(QString, text); - QFETCH(QString, appName); - QFETCH(int, iconIdIdentifier); - QFETCH(int, iconIdQualifier); - QFETCH(bool, isIconDisplayed); - QFETCH(bool, sustainedText); - QFETCH(int, duration); - QFETCH(bool, isWaitUsertoClear); - QFETCH(int, expectValue); - - // text - HBufC* hText = HBufC::New(text.length()); - TPtr aText( hText->Des() ); - aText.Copy( text.utf16() ); - // sim name - HBufC* hSimAppName = HBufC::New(appName.length()); - TPtr aSimApplicationName( hSimAppName->Des() ); - aSimApplicationName.Copy( appName.utf16() ); - - TSatIconId aIconId; - aIconId.iIdentifier = iconIdIdentifier; - aIconId.iIconQualifier = static_cast(iconIdQualifier); - TBool aIsIconDisplayed(isIconDisplayed); - - TSatUiResponse result(ESatSuccess); - ServerDispatcherHelper helper; - connect(mServer,SIGNAL(displayText(SatAppAction&)),&helper,SLOT(exec(SatAppAction&))); - // It seems that TRAPD&QT_TRAP_THROWING does nothing if leave occurs, need - // to investigate. - QT_TRAP_THROWING( result = mServer->DisplayTextL( - aText, - aSimApplicationName, - aIconId, - aIsIconDisplayed, - sustainedText, - duration, - isWaitUsertoClear - )); - delete hText; - hText = 0; - TSatUiResponse exValue = static_cast(expectValue); - QCOMPARE(exValue, result); - qDebug("Ut_SatAppServerDispatcher::testDisplayText <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testGetInkey_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testGetInkey_data() -{ - qDebug("Ut_SatAppServerDispatcher::testGetInkey_data >"); - QTest::addColumn("text"); - QTest::addColumn("characterSet");//enum 0~3 - QTest::addColumn("input"); - QTest::addColumn("isHelpIsAvailable"); - QTest::addColumn("iconIdIdentifier"); - QTest::addColumn("iconIdQualifier");//enum 0~3 - QTest::addColumn("isRequestedIconDisplayed"); - QTest::addColumn("duration"); - QTest::addColumn("isImmediateDigitResponse"); - QTest::addColumn("expectValue"); - //// test ESatDigitOnly - QTest::newRow("first") << "Test GetInKey" << 0 << - "8" << false << 60 << 1 << false << 2500 << true << 0; - // null text - QTest::newRow("second") << "" << 0 << - "s" << false<< 60 << 1 << false << 2500 << true << 0; - // test EIconGetYesNo - QTest::newRow("third") << "Test GetInKey" << 3 << - "s" << false << 60 << 1 << false << 2500 << true << 0; - // test ESatCharSmsDefaultAlphabet - QTest::newRow("fourth") << "Test GetInKey" << 3 << - "$" << false << 60 << 1 << false << 2500 << true << 0; - // ino immediateDigitResponse - QTest::newRow("fifth") << "Test GetInKey" << 1 << - "#" << false<< 60 << 1 << false << 2500 << false << 0; - // test zero lenght and yes no - QTest::newRow("sisth") << "" << 3 << - "S" << false << 60 << 1 << false << 2500 << true << -1; - qDebug("Ut_SatAppServerDispatcher::testGetInkey_data <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testGetInkey -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testGetInkey() -{ - qDebug("Ut_SatAppServerDispatcher::testGetInkey >"); - QVERIFY(mServer); - QFETCH(QString, text); - QFETCH(int, characterSet); - QFETCH(QString, input); - QFETCH(bool, isHelpIsAvailable); - QFETCH(int, iconIdIdentifier); - QFETCH(int, iconIdQualifier); - QFETCH(bool, isRequestedIconDisplayed); - QFETCH(int, duration); - QFETCH(bool, isImmediateDigitResponse); - QFETCH(int, expectValue); - - // text - HBufC* hText = HBufC::New(text.length()); - TPtr aText( hText->Des() ); - aText.Copy( text.utf16() ); - // aCharacterSet - TSatCharacterSet aCharacterSet = static_cast(characterSet); - // aInput - TBuf<1> tInput = input.utf16(); - TChar aInput(tInput[0]); - // aHelpIsAvailable - TBool aHelpIsAvailable(isHelpIsAvailable); - // aIconId - TSatIconId aIconId; - aIconId.iIdentifier = iconIdIdentifier; - aIconId.iIconQualifier = static_cast(iconIdQualifier); - // aRequestedIconDisplayed - TBool aRequestedIconDisplayed(isRequestedIconDisplayed); - // aDuration - TUint aDuration= static_cast(duration); - // aRequestedIconDisplayed - //TBool aImmediateDigitResponse(isImmediateDigitResponse); - ServerDispatcherHelper helper; - connect(mServer,SIGNAL(getInkey(SatAppAction&)),&helper,SLOT(exec(SatAppAction&))); - TSatUiResponse result(ESatSuccess); - QT_TRAP_THROWING( result = mServer->GetInkeyL( - aText, - aCharacterSet, - aInput, - aHelpIsAvailable, - aIconId, - aRequestedIconDisplayed, - aDuration, - isImmediateDigitResponse - )); - delete hText; - hText = 0; - TSatUiResponse exValue = static_cast(expectValue); - QCOMPARE(exValue, result); - - qDebug("Ut_SatAppServerDispatcher::testGetInkey <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testGetInput_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testGetInput_data() -{ - qDebug("Ut_SatAppServerDispatcher::testGetInput_data >"); - QTest::addColumn("text"); - QTest::addColumn("characterSet");//enum 0~3 - QTest::addColumn("input"); - QTest::addColumn("minLength"); - QTest::addColumn("maxLength"); - QTest::addColumn("isHideInput"); - QTest::addColumn("isHelpIsAvailable"); - QTest::addColumn("iconIdIdentifier"); - QTest::addColumn("iconIdQualifier");//enum 0~3 - QTest::addColumn("isRequestedIconDisplayed"); - QTest::addColumn("expectValue"); - // test characterSet ESatCharSmsDefaultAlphabet - QTest::newRow("first") << "Test GetInput" << 1 << - "get input" << 1 << 5 << false << false <<60 << 1 << true << 0; - // test iconIdQualifier ESatSelfExplanatory - QTest::newRow("second") << "Test GetInput" << 0 << - "get input" << 1 << 5 << false << false <<60 << 2 << true << 0; - // test hide - QTest::newRow("third") << "Test GetInput" << 1 << - "" << 1 << 5 << true << false <<60 << 2 << true << -1; - qDebug("Ut_SatAppServerDispatcher::testGetInput_data <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testGetInput -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testGetInput() -{ - qDebug("Ut_SatAppServerDispatcher::testGetInput >"); - QVERIFY(mServer); - QFETCH(QString, text); - QFETCH(int, characterSet); - QFETCH(QString, input); - QFETCH(int, minLength); - QFETCH(int, maxLength); - QFETCH(bool, isHideInput); - QFETCH(bool, isHelpIsAvailable); - QFETCH(int, iconIdIdentifier); - QFETCH(int, iconIdQualifier); - QFETCH(bool, isRequestedIconDisplayed); - QFETCH(int, expectValue); - - // text - HBufC* hText = HBufC::New(text.length()); - TPtr aText( hText->Des() ); - aText.Copy( text.utf16() ); - // aCharacterSet - TSatCharacterSet aCharacterSet = static_cast(characterSet); - // aInput - HBufC* hInput = HBufC::New(input.length()); - TPtr aInput( hInput->Des() ); - aInput.Copy( input.utf16() ); - // aIconId - TSatIconId aIconId; - aIconId.iIdentifier = iconIdIdentifier; - aIconId.iIconQualifier = static_cast(iconIdQualifier); - // aRequestedIconDisplayed - TBool aRequestedIconDisplayed(isRequestedIconDisplayed); - ServerDispatcherHelper helper; - connect(mServer,SIGNAL(getInput(SatAppAction&)),&helper,SLOT(exec(SatAppAction&))); - TSatUiResponse result(ESatSuccess); - QT_TRAP_THROWING( result = mServer->GetInputL( - aText, - aCharacterSet, - aInput, - minLength, - maxLength, - isHideInput, - isHelpIsAvailable, - aIconId, - aRequestedIconDisplayed - )); - delete hText; - hText = 0; - delete hInput; - hInput = 0; - TSatUiResponse exValue = static_cast(expectValue); - QCOMPARE(exValue, result); - qDebug("Ut_SatAppServerDispatcher::testGetInput <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testSetUpMenu_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testSetUpMenu_data() -{ - qDebug("Ut_SatAppServerDispatcher::testSetUpMenu_data >"); - QTest::addColumn("text"); - QTest::addColumn("setupMenuItem"); - QTest::addColumn("isHelpIsAvailable"); - QTest::addColumn("iconIdIdentifier"); - QTest::addColumn("iconIdQualifier");//enum 0~3 - QTest::addColumn("iconListQualifier"); - QTest::addColumn("expectReturnValue"); - - QStringList testSetUpMenu_1_items; - testSetUpMenu_1_items - << "SendData" - << "ReceiveData" - << "CloseChannel" - << "OpenChannel" - << "GetChannelStatus" - << "DisplayText with different symbols and durations" - << "GetInkey" - << "GetInput" - << "SelectItem" - << "PlayTone" - << "RefreshRequired" - << "DoRefresh" - << "SendSm" - << "SendSs" - << "SendUssd" - << "SetUpCall" - << "SetUpIdleModeText" - << "CallControl" - << "MoSmControl" - << "LaunchBrowser" - << "SendDTMF" - << "SetUpEventList" - << "ProvideLocalInfo" - << "EventDownload for IdleScreen available event" - << "SetUpMenu"; - - QTest::newRow("first") << "SAT" << testSetUpMenu_1_items << - false << 80 << 1 << 2 << 0; - - qDebug("Ut_SatAppServerDispatcher::testSetUpMenu_data <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testSetUpMenu -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testSetUpMenu() -{ - qDebug("Ut_SatAppServerDispatcher::testSetUpMenu >"); - QVERIFY(mServer); - QFETCH(QString, text); - QFETCH(QStringList, setupMenuItem); - QFETCH(bool, isHelpIsAvailable); - QFETCH(int, iconIdIdentifier); - QFETCH(int, iconIdQualifier); - QFETCH(int, iconListQualifier); - QFETCH(int, expectReturnValue); - - // aText - HBufC* hText = HBufC::New(text.length()); - TPtr aText( hText->Des() ); - aText.Copy( text.utf16() ); - // aMenuItems - TBuf<128> menuItem; - CDesCArrayFlat* aMenuItems = new CDesCArrayFlat(4); - QVERIFY(aMenuItems); - for (int i = 0; i< setupMenuItem.count(); i++) { - menuItem = setupMenuItem.at(i).utf16(); - QT_TRAP_THROWING(aMenuItems->AppendL(menuItem)); - } - // aIconId - TSatIconId aIconId; - aIconId.iIdentifier = iconIdIdentifier; - aIconId.iIconQualifier = static_cast(iconIdQualifier); - // aMenuItemNextActions - CArrayFixFlat* aMenuItemNextActions = - new CArrayFixFlat (4); - QVERIFY(aMenuItemNextActions); - // Temp test - QT_TRAP_THROWING(aMenuItemNextActions->AppendL(ESatSetUpMenuAction)); - // aMenuIcons - CArrayFixFlat* aMenuIcons = new CArrayFixFlat(2); - QVERIFY(aMenuIcons); - // Temp test - QT_TRAP_THROWING(aMenuIcons->AppendL(1)); - // aIconListQualifier - TSatIconQualifier aIconListQualifier = - static_cast(iconListQualifier); - // TSatSelectionPreference, useless - TSatSelectionPreference aSelectionPreference(ESatNoSelectionPreference); - TSatUiResponse result(ESatSuccess); - QT_TRAP_THROWING(result = mServer->SetUpMenuL( - aText, - *aMenuItems, - aMenuItemNextActions, - isHelpIsAvailable, - aIconId, - aMenuIcons, - aIconListQualifier, - aSelectionPreference - )); - TSatUiResponse exValue = static_cast(expectReturnValue); - QCOMPARE(exValue, result); - - delete hText; - hText = 0; - delete aMenuItems; - aMenuItems = 0; - delete aMenuItemNextActions; - aMenuItemNextActions = 0; - delete aMenuIcons; - aMenuIcons = 0; - qDebug("Ut_SatAppServerDispatcher::testSetUpMenu <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testSelectItem_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testSelectItem_data() -{ - qDebug("Ut_SatAppServerDispatcher::testSelectItem_data >"); - QTest::addColumn("text"); - QTest::addColumn("selectItemItem"); - QTest::addColumn("defaultItem"); - QTest::addColumn("isHelpIsAvailable"); - QTest::addColumn("iconIdIdentifier"); - QTest::addColumn("iconIdQualifier");//enum 0~3 - QTest::addColumn("iconListQualifier"); - QTest::addColumn("expectReturnValue"); - - QStringList testSelectItem_1_items; - testSelectItem_1_items - << "Select Item 1" - << "Select Item 2" - << "Select Item 3" - << "Select Item 4" - << "Select Item 5"; - - QTest::newRow("first") << "Make a Choice" << testSelectItem_1_items << - 0 << false << 80 << 1 << 2 << 0; - - qDebug("Ut_SatAppServerDispatcher::testSelectItem_data <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testSetUpMenu -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testSelectItem() -{ - qDebug("Ut_SatAppServerDispatcher::testSelectItem >"); - QVERIFY(mServer); - QFETCH(QString, text); - QFETCH(QStringList, selectItemItem); - QFETCH(int, defaultItem); - QFETCH(bool, isHelpIsAvailable); - QFETCH(int, iconIdIdentifier); - QFETCH(int, iconIdQualifier); - QFETCH(int, iconListQualifier); - QFETCH(int, expectReturnValue); - - // aText - HBufC* hText = HBufC::New(text.length()); - TPtr aText( hText->Des() ); - aText.Copy( text.utf16() ); - // aMenuItems - TBuf<128> menuItem; - CDesCArrayFlat* aMenuItems = new CDesCArrayFlat(4); - QVERIFY(aMenuItems); - for (int i = 0; i< selectItemItem.count(); i++) { - menuItem = selectItemItem.at(i).utf16(); - QT_TRAP_THROWING(aMenuItems->AppendL(menuItem)); - } - - TUint8 aSelectedItem( 1 ); - // aIconId - TSatIconId aIconId; - aIconId.iIdentifier = iconIdIdentifier; - aIconId.iIconQualifier = static_cast(iconIdQualifier); - // aMenuItemNextActions - CArrayFixFlat* aMenuItemNextActions = - new CArrayFixFlat (4); - QVERIFY(aMenuItemNextActions); - // Temp test - QT_TRAP_THROWING(aMenuItemNextActions->AppendL(ESatSelectItemAction)); - // aMenuIcons - CArrayFixFlat* aMenuIcons = new CArrayFixFlat(2); - QVERIFY(aMenuIcons); - // Temp test - QT_TRAP_THROWING(aMenuIcons->AppendL(1)); - // aIconListQualifier - TSatIconQualifier aIconListQualifier = - static_cast(iconListQualifier); - // TSatSelectionPreference, useless - TSatSelectionPreference aSelectionPreference(ESatNoSelectionPreference); - TBool aRequestIconDisplayed (EFalse); - - TSatUiResponse result(ESatSuccess); - ServerDispatcherHelper helper; - connect(mServer,SIGNAL(selectItem(SatAppAction&)),&helper,SLOT(exec(SatAppAction&))); - connect(mServer,SIGNAL(selectItem(SatAppAction&)), - &helper,SLOT(simulateItemSelected(SatAppAction&))); - QT_TRAP_THROWING(result = mServer->SelectItemL( - aText, - *aMenuItems, - aMenuItemNextActions, - defaultItem, - aSelectedItem, - isHelpIsAvailable, - aIconId, - aMenuIcons, - aIconListQualifier, - aRequestIconDisplayed, - aSelectionPreference - )); - TSatUiResponse exValue = static_cast(expectReturnValue); - QCOMPARE(exValue, result); - - delete hText; - hText = 0; - delete aMenuItems; - aMenuItems = 0; - delete aMenuItemNextActions; - aMenuItemNextActions = 0; - delete aMenuIcons; - aMenuIcons = 0; - qDebug("Ut_SatAppServerDispatcher::testSelectItem <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testSetUpMenu -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testPlayTone_data() -{ - qDebug("Ut_SatAppServerDispatcher::testPlayTone_data >"); - QTest::addColumn("text");//enum 0~3 - QTest::addColumn("satTone"); - QTest::addColumn("duration"); - QTest::addColumn("iconIdIdentifier"); - QTest::addColumn("iconIdQualifier");//enum 0~3 - QTest::addColumn("isRequestedIconDisplayed"); - QTest::addColumn("expectReturnValue"); - QTest::newRow("Response_Failure") << "PlayStandardTone" << 100 << - 0 << 80 << 1 << false << 0; - QTest::newRow("ToneNotSet") << "PlayStandardTone" << -1 << - 0 << 80<< 0 << false << 0; - QTest::newRow("DialTone_0") << "PlayStandardTone" << 1 << - 0 << 80<< 1 << false << 0; - QTest::newRow("DialTone_2000") << "PlayStandardTone" << 1 << - 2000 << 80 << 2 << false << 0; - QTest::newRow("DialTone_true") << "PlayStandardTone" << 1 << - 2000 << 80 << 3 << true << 0; - QTest::newRow("Busy") << "PlayStandardTone" << 2 << - 2000 << 80 << 3 << false << 0; - QTest::newRow("Congestion") << "PlayStandardTone" << 3 << - 25000 << 80 << 3 << false << 0; - QTest::newRow("Congestion_0") << "PlayStandardTone" << 3 << - 0 << 80 << 3 << false << 0; - QTest::newRow("Acknowledge ") << "PlayStandardTone" << 4 << - 25000 << 80 << 3 << false << 0; - QTest::newRow("Acknowledge_0") << "PlayStandardTone" << 4 << - 0 << 80 << 3 << false << 0; - QTest::newRow("CallDropped") << "PlayStandardTone" << 5 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("CallDropped_0") << "PlayStandardTone" << 5 << - 0 << 80 << 1 << false << 0; - QTest::newRow("SpecialInfo") << "PlayStandardTone" << 6 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("SpecialInfo_0") << "PlayStandardTone" << 6 << - 0 << 80 << 1 << false << 0; - QTest::newRow("WaitingTone") << "PlayStandardTone" << 7 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("WaitingTone_0") << "PlayStandardTone" << 7 << - 0 << 80 << 1 << false << 0; - QTest::newRow("RingingTone") << "PlayStandardTone" << 8 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("RingingTone_0") << "PlayStandardTone" << 8 << - 0 << 80 << 1 << false << 0; - QTest::newRow("GeneralBeep") << "PlayStandardTone" << 16 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("GeneralBeep_0") << "PlayStandardTone" << 16 << - 0 << 80 << 1 << false << 0; - QTest::newRow("PositiveTone") << "PlayStandardTone" << 17 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("PositiveTone_0") << "PlayStandardTone" << 17 << - 0 << 80 << 1 << false << 0; - QTest::newRow("NegativeTone") << "PlayStandardTone" << 18 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("NegativeTone_0") << "PlayStandardTone" << 18 << - 0 << 80 << 1 << false << 0; - QTest::newRow("Speech") << "PlayStandardTone" << 19 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("Speech_0") << "PlayStandardTone" << 19 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("Sms") << "PlayStandardTone" << 20 << - 25000 << 80 << 1 << false << 0; - QTest::newRow("Sms_0") << "PlayStandardTone" << 20 << - 0 << 80 << 1 << false << 0; - QTest::newRow("Busy_0") << "PlayStandardTone" << 2 << - 0 << 80 << 3 << false << 0; - qDebug("Ut_SatAppServerDispatcher::testPlayTone_data <"); -} - - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testSetUpMenu -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testPlayTone() -{ - qDebug("Ut_SatAppServerDispatcher::testPlayTone >"); - QVERIFY(mServer); - QFETCH(QString, text); - QFETCH(int, duration); - QFETCH(int, satTone); - QFETCH(int, iconIdIdentifier); - QFETCH(int, iconIdQualifier); - QFETCH(bool, isRequestedIconDisplayed); - QFETCH(int, expectReturnValue); - qDebug("Ut_SatAppServerDispatcher::testPlayTone after fetch"); - // text - HBufC* hText = HBufC::New(text.length()); - TPtr aText( hText->Des() ); - aText.Copy( text.utf16() ); - // aTone - TSatTone aTone = static_cast(satTone); - // aDuration - TUint aDuration= static_cast(duration); - // aIconId - TSatIconId aIconId; - aIconId.iIdentifier = iconIdIdentifier; - aIconId.iIconQualifier = static_cast(iconIdQualifier); - // aRequestedIconDisplayed - TBool aRequestedIconDisplayed(isRequestedIconDisplayed); - qDebug("Ut_SatAppServerDispatcher::testPlayTone call observer"); - ServerDispatcherHelper helper; - connect(mServer,SIGNAL(playTone(SatAppAction&)),&helper,SLOT(exec(SatAppAction&))); - TSatUiResponse result(ESatSuccess); - result = mServer->PlayTone( - aText, - aTone, - aDuration, - aIconId, - aRequestedIconDisplayed - ); - TSatUiResponse exValue = static_cast(expectReturnValue); - QCOMPARE(exValue, result); - delete hText; - hText = 0; - qDebug("Ut_SatAppServerDispatcher::testPlayTone <"); -} - - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testConfirmCommand_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testConfirmCommand_data() -{ - qDebug("Ut_SatAppServerDispatcher::testConfirmCommand_data >"); - QTest::addColumn("commandId");// enum 0~6 - QTest::addColumn("alphaIdStatus"); - QTest::addColumn("text"); - QTest::addColumn("additionalText"); - QTest::addColumn("isctionAccepted"); - QTest::addColumn("iconIdIdentifier"); - QTest::addColumn("iconIdQualifier");//enum 0~3 - QTest::addColumn("isRequestedIconDisplayed"); - QTest::addColumn("isterminatedByUser"); - // test commandId ESatSSendSmQuery - QTest::newRow("first") << 0 << 1 << "ConfirmCommand SendSm" - << "SendSm" <"); - QVERIFY(mServer); - QFETCH(int, commandId); - QFETCH(int, alphaIdStatus); - QFETCH(QString, text); - QFETCH(QString, additionalText); - QFETCH(bool, isctionAccepted); - QFETCH(int, iconIdIdentifier); - QFETCH(int, iconIdQualifier); - QFETCH(bool, isRequestedIconDisplayed); - QFETCH(bool, isterminatedByUser); - - // aCharacterSet - TSatSQueryCommand aCommandId = static_cast(commandId); - // aAlphaIdStatus - TSatAlphaIdStatus aAlphaIdStatus = static_cast(alphaIdStatus); - // text - HBufC* hText = HBufC::New(text.length()); - TPtr aText( hText->Des() ); - aText.Copy( text.utf16() ); - // aAdditionalText - HBufC* hAdditionalText = HBufC::New(additionalText.length()); - TPtr aAdditionalText( hAdditionalText->Des() ); - aAdditionalText.Copy( additionalText.utf16() ); - // aActionAccepted - TBool aActionAccepted(isctionAccepted); - // aIconId - TSatIconId aIconId; - aIconId.iIdentifier = iconIdIdentifier; - aIconId.iIconQualifier = static_cast(iconIdQualifier); - // aRequestedIconDisplayed - TBool aRequestedIconDisplayed(isRequestedIconDisplayed); - // aRequestedIconDisplayed - TBool aTerminatedByUser(isterminatedByUser); - ServerDispatcherHelper helper; - connect(mServer,SIGNAL(confirmCommand(SatAppAction&)),&helper,SLOT(exec(SatAppAction&))); - mServer->ConfirmCommand( - aCommandId, - aAlphaIdStatus, - aText, - aAdditionalText, - aActionAccepted, - aIconId, - aRequestedIconDisplayed, - aTerminatedByUser - ); - delete hText; - hText = 0; - delete hAdditionalText; - hAdditionalText = 0; - qDebug("Ut_SatAppServerDispatcher::testConfirmCommand <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testNotification_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testNotification_data() -{ - qDebug("Ut_SatAppServerDispatcher::testNotification_data >"); - QTest::addColumn("commandId");// enum 0~6 - QTest::addColumn("alphaIdStatus"); - QTest::addColumn("text"); - QTest::addColumn("iconIdIdentifier"); - QTest::addColumn("iconIdQualifier");//enum 0~3 - QTest::addColumn("isRequestedIconDisplayed"); - QTest::addColumn("controlResult"); - - // test commandId ESatSSendDataNotify - QTest::newRow("Senddata_0id") << 0 << 0 << "Send data notify" - << 2 << 0 << false <<0; - // test commandId ESatSSendDataNotify alpha id not null but string length is zero - QTest::newRow("Senddata_1id") << 0 << 1 << "" - << 2 << 0 << false <<0; - QTest::newRow("Senddata_2id") << 0 << 2 << "Send data notify AlphaIdNotProvided" - << 2 << 0 << false <<0; - // test commandId ESatSReceiveDataNotify - QTest::newRow("Recievedata_0id") << 1 << 0 << "Recieve data notify" - << 2 << 3 << false <<0; - QTest::newRow("Recievedata_1id") << 1 << 1 << "Recieve data notify" - << 2 << 3 << false <<0; - QTest::newRow("Recievedata_2id") << 1 << 2 << "Recieve data notify AlphaIdNotProvided" - << 2 << 3 << false <<0; - // test commandId ESatSCloseChannelNotify - QTest::newRow("CloseChannel_0id") << 2 << 0 << "Close channel notify" - << 2 << 3 << false <<0; - QTest::newRow("CloseChannel_1id") << 2 << 1 << "" - << 2 << 3 << false <<0; - QTest::newRow("CloseChannel_2id") << 2 << 2 << "Close channel notify AlphaIdNotProvided" - << 2 << 3 << false <<0; - // test commandId ESatSMoSmControlNotify - QTest::newRow("MoSm_0id") << 3 << 0 << "SM control notify" - << 2 << 0 << false <<0; - QTest::newRow("MoSm_1id") << 3 << 1 << "0" - << 2 << 0 << false <<0; - QTest::newRow("MoSm_2id") << 3 << 2 << "SM control notify AlphaIdNotProvided" - << 2 << 0 << false <<0; - // test commandId ESatSCallControlNotify - QTest::newRow("CallControl_0id") << 4 << 0 << "Call control notify" - << 2 << 1 << false <<0; - QTest::newRow("CallControl_1id") << 4 << 1 << "" - << 2 << 1 << false <<0; - QTest::newRow("CallControl_2id") << 4 << 2 << "Call control notify AlphaIdNotProvided" - << 2 << 1 << false <<0; - // test commandId ESatSSendSsNotify - QTest::newRow("SendSs_0id") << 5 << 0 << "Send SS notify" - << 2 << 2 << false <<0; - QTest::newRow("SendSs_1id") << 5 << 1 << "" - << 2 << 2 << false <<0; - QTest::newRow("SendSs_2id") << 5 << 2 << "Send SS notify AlphaIdNotProvided" - << 2 << 2 << false <<0; - // test commandId ESatSSendUssdNotify - QTest::newRow("SendUssd_0id") << 6 << 0 << "Send Ussd notify" - << 2 << 3 << false <<0; - // test commandId ESatSSendUssdNotify - QTest::newRow("SendUssd_1id") << 6 << 1 << "" - << 2 << 3 << false <<0; - // test commandId ESatSSendUssdNotify - QTest::newRow("SendUssd_2id") << 6 << 2 << "Send Ussd notify AlphaIdNotProvided" - << 2 << 3 << false <<0; - // test commandId ESatSSendDtmfNotify - QTest::newRow("SendDtmf_0id") << 7 << 0 << "Send dtmf notify" - << 2 << 3 << false <<0; - QTest::newRow("SendDtmf_1id") << 7 << 1 << "Send dtmf notify" - << 2 << 3 << false <<0; - QTest::newRow("SendDtmf_2id") << 7 << 2 << "Send dtmf notify AlphaIdNotProvided" - << 2 << 3 << false <<0; - // test commandId ESatSSendSmsNotify - QTest::newRow("SendSm_0id") << 8 << 0 << "SendSm notify" - << 2 << 2 << false <<0; - QTest::newRow("SendSm_1id") << 8 << 1 << "SendSm notify" - << 2 << 2 << false <<0; - QTest::newRow("SendSm_2id") << 8 << 2 << "SendSm notify AlphaIdNotProvided" - << 2 << 2 << false <<0; - qDebug("Ut_SatAppServerDispatcher::testNotification_data <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testNotification -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testNotification() -{ - qDebug("Ut_SatAppServerDispatcher::testNotification >"); - QVERIFY(mServer); - QFETCH(int, commandId); - QFETCH(int, alphaIdStatus); - QFETCH(QString, text); - QFETCH(int, iconIdIdentifier); - QFETCH(int, iconIdQualifier); - QFETCH(bool, isRequestedIconDisplayed); - QFETCH(int, controlResult); - - // aCommandId - TSatSNotifyCommand aCommandId = static_cast(commandId); - // aAlphaIdStatus - TSatAlphaIdStatus aAlphaIdStatus = static_cast(alphaIdStatus); - // text - HBufC* hText = HBufC::New(text.length()); - TPtr aText( hText->Des() ); - aText.Copy( text.utf16() ); - - // aIconId - TSatIconId aIconId; - aIconId.iIdentifier = iconIdIdentifier; - aIconId.iIconQualifier = static_cast(iconIdQualifier); - // aRequestedIconDisplayed - TBool aRequestedIconDisplayed(isRequestedIconDisplayed); - // aRequestedIconDisplayed - TSatControlResult aControlResult = static_cast(controlResult); - ServerDispatcherHelper helper; - connect(mServer,SIGNAL(notification(SatAppAction&)),&helper,SLOT(exec(SatAppAction&))); - mServer->Notification( - aCommandId, - aAlphaIdStatus, - aText, - aIconId, - aRequestedIconDisplayed, - aControlResult - ); - delete hText; - hText = 0; - qDebug("Ut_SatAppServerDispatcher::testNotification <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testEventNotification_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testEventNotification_data() -{ - qDebug("Ut_SatAppServerDispatcher::testEventNotification_data >"); - QTest::addColumn("eventId");// enum 0~6 - - // test eventId ESatSRefreshStartEvent - QTest::newRow("RefreshStartEvent") << 0 ; - // test eventId ESatSRefreshEndEvent - QTest::newRow("RefreshEndEvent") << 1; - // test eventId ESatSSmEndEvent - QTest::newRow("SSmEndEvent") << 2; - // test eventId ESatSClearScreenEvent - QTest::newRow("ClearScreenEvent") << 3; - // test eventId ESatSCloseSatUiAppEvent - QTest::newRow("CloseSatUiAppEvent") << 4; - // test eventId ESatSsEndEvent - QTest::newRow("SsEndEvent") << 5; - // test eventId ESatSsErrorEvent - QTest::newRow("SsErrorEvent") << 6; - // test eventId ESatSDtmfEndEvent - QTest::newRow("DtmfEndEvent") << 7; - - qDebug("Ut_SatAppServerDispatcher::testEventNotification_data <"); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppServerDispatcher::testEventNotification -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppServerDispatcher::testEventNotification() -{ - qDebug("Ut_SatAppServerDispatcher::testEventNotification >"); - QVERIFY(mServer); - QFETCH(int, eventId); - - TSatSEvent aEventId = static_cast(eventId); - TSatSEventStatus aEventStatus = ESatEventCompleteOk; - mServer->EventNotification(aEventId, aEventStatus, 0); - qDebug("Ut_SatAppServerDispatcher::testEventNotification <"); -} - - -void Ut_SatAppServerDispatcher::testMenuSelection() -{ - // menu selection 1 - SatAppAction* a = new SatAppAction(ESatSetUpMenuAction,mServer); - a->set(KeySelection,4); - a->set(KeyHelpRequested,false); - connect(a,SIGNAL(actionCompleted(SatAppAction*)),mServer,SLOT(menuSelection(SatAppAction*))); - a->completeWithSuccess(); - - // menu selection 2 - with different params - SatAppAction* b = new SatAppAction(ESatSetUpMenuAction,mServer); - b->set(KeySelection,4); - b->set(KeyHelpRequested,false); - connect(b,SIGNAL(actionCompleted(SatAppAction*)),mServer,SLOT(menuSelection(SatAppAction*))); - b->completeWithSuccess(); - - // menu selection 3 - no user resp - SatAppAction* c = new SatAppAction(ESatSetUpMenuAction,mServer); - connect(c,SIGNAL(actionCompleted(SatAppAction*)),mServer,SLOT(menuSelection(SatAppAction*))); - c->completeWithNoResponse(); - - // menu selection 4 - session terminated - SatAppAction* d = new SatAppAction(ESatSetUpMenuAction,mServer); - connect(d,SIGNAL(actionCompleted(SatAppAction*)),mServer,SLOT(menuSelection(SatAppAction*))); - d->completeWithSessionTerminated(); - -} - -void Ut_SatAppServerDispatcher::testUserCancelSession() -{ - SatAppAction* a = new SatAppAction(ESatSetUpMenuAction); - mServer->userCancelSession(a); -} - - -/*! -*User cancel response, Send DTMF, Send Data, Receive Data -*/ - -// helper class -void ServerDispatcherHelper::exec(SatAppAction& action) -{ - action.completeWithSuccess(); -} - -void ServerDispatcherHelper::simulateItemSelected(SatAppAction& action) -{ - action.set(KeySelection, 0); -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/src/ut_satapptoneprovider.cpp --- a/satui/satapp/tsrc/ut_satapp/src/ut_satapptoneprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,625 +0,0 @@ -/* -* 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: Unit test for satappmainhandler -* -*/ - -#include -#include "ut_satapptoneprovider.h" -#include "satapptoneprovider.h" -#include "satappaction.h" - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::Ut_SatAppToneProvider -// ----------------------------------------------------------------------------- -// -Ut_SatAppToneProvider::Ut_SatAppToneProvider(QObject *parent):QObject(parent) -{ -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testCreateProvider -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testCreateProvider_data() -{ - QTest::addColumn("timer"); - QTest::newRow("t01") << false; - QTest::newRow("t01") << true; -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testCreateProvider -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testCreateProvider() -{ - QFETCH(bool, timer); - ToneProviderTest test; - if(timer){ - test.ConstructTimer(false); - } - QVERIFY(test.mTone); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testClearScreen -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testClearScreen() -{ - ToneProviderTest test; - test.mTone->clearScreen(); - QVERIFY(!test.isMessageBoxShown()); - QVERIFY(!test.isTimerActive()); -} - - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testPlayTone_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testPlayTone_data() -{ - QTest::addColumn("text"); - QTest::addColumn("tone"); - QTest::addColumn("duration"); - QTest::addColumn("exp_result"); - - QTest::newRow("t01") << "Standard" << 0x01 << 0 << 0x32; // exp result changed - QTest::newRow("t02") << "Standard" << 0x02 << 100 << 0; - QTest::newRow("t03") << "Standard" << 0x03 << 1000 << 0; - QTest::newRow("t04") << "Standard" << 0x04 << 0 << 0; - QTest::newRow("t05") << "Standard" << 0x05 << 100 << 0; - QTest::newRow("t06") << "Standard" << 0x07 << 1000 << 0; - QTest::newRow("t07") << "" << 0x07 << 100 << 0; - QTest::newRow("t08") << "" << 0x08 << 500 << 0; - QTest::newRow("t09") << "" << 0x09 << 1000 << 0x32; // exp result changed - QTest::newRow("t10") << "User" << 0x13 << 1000 << 0; - QTest::newRow("t11") << "User" << 0x14 << 500 << 0; - QTest::newRow("t12") << "Illegal" << 0x99 << 100 << 0x32; -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testPlayTone -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testPlayTone() -{ - QFETCH(QString, text); - QFETCH(int, tone); - QFETCH(int, duration); - QFETCH(int, exp_result); - - ToneProviderTest test; - TSatUiResponse resp(ESatSuccess); - - SatAppAction action(ESatPlayToneAction); - action.set(KeyToneId,tone); - action.set(KeyDuration,duration); - action.set(KeyText,text); - test.mTone->playTone(action); - action.waitUntilCompleted(); - resp = action.response(); - - QCOMPARE((int)resp, exp_result); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testplayStandardTone_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testplayDoubleTone_data() -{ - QTest::addColumn("text"); - QTest::addColumn("tone"); - QTest::addColumn("duration"); - QTest::addColumn("timer"); - QTest::addColumn("active"); - - QTest::newRow("t01") << "Standard" << 0x10 << 0 << false << false; - QTest::newRow("t02") << "Standard" << 0x10 << 0 << true << true; - QTest::newRow("t03") << "Standard" << 0x10 << 0 << true << false; - QTest::newRow("t04") << "Standard" << 0x13 << 0 << false << false; - QTest::newRow("t04") << "Standard" << 0x14 << 0 << true << true; - QTest::newRow("t04") << "" << 0x13 << 0 << true << false; - -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testplayStandardTone -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testplayDoubleTone() -{ - QFETCH(QString, text); - QFETCH(int, tone); - QFETCH(int, duration); - QFETCH(bool, timer); - QFETCH(bool, active); - - ToneProviderTest test; - TSatUiResponse resp(ESatSuccess); - if(timer){ - test.ConstructTimer(active); - } - - SatAppAction action(ESatPlayToneAction); - action.set(KeyToneId,tone); - action.set(KeyDuration,duration); - action.set(KeyText,text); - test.mTone->playTone(action); - action.waitUntilCompleted(); - resp = action.response(); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testPlayToneAndClearScreen -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testPlayToneAndClearScreen() -{ - ToneProviderTest test; - - // timer for clearing screen after 1 sec. - QTimer::singleShot(1000, test.mTone, SLOT(clearScreen())); - - // start playing - TSatUiResponse result(ESatFailure); - SatAppAction action(ESatPlayToneAction); - action.set(KeyToneId,0x01); - action.set(KeyDuration,3000); - action.set(KeyText,QString("play")); - test.mTone->playTone(action); - action.waitUntilCompleted(); - result = action.response(); - -// QCOMPARE(result, ESatSuccessToneNotPlayed); TODO:which? - QCOMPARE(result, ESatSuccess); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testMatoPlayComplete_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testMatoPrepareComplete_data() -{ - QTest::addColumn("error"); - QTest::addColumn("tone"); - QTest::newRow("error_0") << 0 << true; - QTest::newRow("error_-1") << -1 << false; - QTest::newRow("error_-2") << 0 << false; -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testMatoPlayComplete -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testMatoPrepareComplete() -{ - QFETCH(int, error); - QFETCH(bool, tone); - ToneProviderTest test; - - if(tone) - test.ConstructAudioTone(); - - test.mTone->MatoPrepareComplete(error); - - test.DestroyAudioTone(); -} - -//// ----------------------------------------------------------------------------- -//// Ut_SatAppToneProvider::testMatoPlayComplete_data -//// -//// Connects to test object signal and verifies received data. -//// ----------------------------------------------------------------------------- -//void Ut_SatAppToneProvider::testMatoPlayComplete_data() -//{ -// QTest::addColumn("error"); -// QTest::addColumn("tone"); -// QTest::newRow("error_0") << 0 << true; -// QTest::newRow("error_-1") << -1 << false; -// QTest::newRow("error_-2") << 0 << false; -//} -// -//// ----------------------------------------------------------------------------- -//// Ut_SatAppToneProvider::testMatoPlayComplete -//// -//// Connects to test object signal and verifies received data. -//// ----------------------------------------------------------------------------- -//void Ut_SatAppToneProvider::testMatoPlayComplete() -//{ -// QFETCH(int, error); -// QFETCH(bool, tone); -// ToneProviderTest test; -// -// if(tone) -// test.ConstructAudioTone(); -// -// test.mTone->MatoPrepareComplete(error); -// test.mTone->MatoPlayComplete(error); -// -// test.DestroyAudioTone(); -//} -// -//// ----------------------------------------------------------------------------- -//// Ut_SatAppToneProvider::testMapcPlayComplete_data -//// -//// Connects to test object signal and verifies received data. -//// ----------------------------------------------------------------------------- -//void Ut_SatAppToneProvider::testMapcPlayComplete_data() -//{ -// QTest::addColumn("player"); -// QTest::newRow("t_true") << true; -// QTest::newRow("t_false") << false; -//} -// -//// ----------------------------------------------------------------------------- -//// Ut_SatAppToneProvider::testMapcPlayComplete -//// -//// Connects to test object signal and verifies received data. -//// ----------------------------------------------------------------------------- -//void Ut_SatAppToneProvider::testMapcPlayComplete() -//{ -// QFETCH(bool, player); -// TInt error = 0; -// ToneProviderTest test; -// -// if(player) -// test.ConstructAudioPlayer(); -// -// test.mTone->MapcPlayComplete(error); -// -// test.DestroyAudioPlayer(); -//} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testMapcInitComplete_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testMapcInitComplete_data() -{ - QTest::addColumn("error"); - QTest::addColumn("player"); - QTest::newRow("error_0") << 0 << false; - QTest::newRow("error_-6") << -6 << true; - QTest::newRow("error_-6") << -6 << false; -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testMapcInitComplete -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testMapcInitComplete() -{ - QFETCH(int, error); - QFETCH(bool, player); - ToneProviderTest test; - - if(player) - test.ConstructAudioPlayer(); - - test.mTone->MapcInitComplete(error, 0); - - test.DestroyAudioPlayer(); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testRecognizeTone_data -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testRecognizeTone_data() -{ - QTest::addColumn("tone"); - QTest::addColumn("duration"); - - QTest::newRow("t01") << -1 << 0; - QTest::newRow("t01") << -1 << 1; - QTest::newRow("t01") << 0x01 << 0; - QTest::newRow("t01") << 0x01 << 1; - QTest::newRow("t01") << 0x02 << 0; - QTest::newRow("t01") << 0x02 << 1; - QTest::newRow("t01") << 0x03 << 0; - QTest::newRow("t01") << 0x03 << 1; - QTest::newRow("t01") << 0x04 << 0; - QTest::newRow("t01") << 0x04 << 1; - QTest::newRow("t01") << 0x05 << 0; - QTest::newRow("t01") << 0x05 << 1; - QTest::newRow("t01") << 0x06 << 0; - QTest::newRow("t01") << 0x06 << 1; - QTest::newRow("t01") << 0x07 << 0; - QTest::newRow("t01") << 0x07 << 1; - QTest::newRow("t01") << 0x08 << 0; - QTest::newRow("t01") << 0x08 << 1; - QTest::newRow("t01") << 0x09 << 0; - - QTest::newRow("t01") << 0x10 << 0; - QTest::newRow("t01") << 0x10 << 1; - QTest::newRow("t01") << 0x11 << 0; - QTest::newRow("t01") << 0x11 << 1; - QTest::newRow("t01") << 0x12 << 0; - QTest::newRow("t01") << 0x12 << 1; - QTest::newRow("t02") << 0x13 << 0; - - QTest::newRow("t02") << 0x14 << 0; - - -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testRecognizeTone -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testRecognizeTone() -{ - QFETCH(int, tone); - QFETCH(int, duration); - - ToneProviderTest test; - test.TestRecognizeTone(tone, duration); -} - -// ----------------------------------------------------------------------------- -// Ut_SatAppToneProvider::testPrepareAudioToneUtility -// -// Connects to test object signal and verifies received data. -// ----------------------------------------------------------------------------- -void Ut_SatAppToneProvider::testPrepareAudioToneUtility() -{ - ToneProviderTest test; - test.ConstructAudioTone(); - test.ConstructAudioTone(); -} - -// --------------------------------------------------------------- -// internal helper class -// --------------------------------------------------------------- - -ToneProviderTest::ToneProviderTest() -{ - mTone = new SatAppToneProvider(this); -} - -ToneProviderTest::~ToneProviderTest() -{ - cleanup(); -} - -/** - * Singleton Pattern - not used - */ -SatAppToneProvider* ToneProviderTest::getToneInstance() -{ - -} - -bool ToneProviderTest::isMessageBoxShown() -{ - if (mTone->mPermanentNote) { - return true; - } - return false; -} - -bool ToneProviderTest::isTimerActive() -{ - if (mTone->mTimer && mTone->mTimer->isActive()) { - return true; - } - return false; -} - -void ToneProviderTest::ConstructAudioTone() -{ - QByteArray sequence; - sequence = KNetToneSeqDial; - TPtrC8 seq((unsigned char*)sequence.constData(),sequence.length()); - if(mTone) - QT_TRAP_THROWING(mTone->SymbianPrepareAudioToneUtilityL(seq)); -} - -void ToneProviderTest::DestroyAudioTone() -{ - if(mTone) - mTone->SymbianStopAudioToneUtility(); -} - -void ToneProviderTest::ConstructAudioPlayer() -{ - int tone = ESatToneNotSet; - int duration = 0; - if(mTone) - QT_TRAP_THROWING(mTone->SymbianPrepareAudioPlayerL(tone,duration)); -} - -void ToneProviderTest::DestroyAudioPlayer() -{ - if(mTone) - mTone->SymbianStopAudioPlayer(); -} - -void ToneProviderTest::ConstructTimer(bool active) -{ - mTone->mTimer = new QTimer(mTone); - connect(mTone->mTimer, SIGNAL(timeout()), - mTone, SLOT(stopPlayTone())); - if(active) - mTone->mTimer->start(3000); -} - -void ToneProviderTest::DestroyTimer() -{ - -} - -void ToneProviderTest::SetPlayToneResult(TSatUiResponse error) -{ - mTone->mPlayToneError = error; -} - -void ToneProviderTest::TestRecognizeTone(int tone, int duration) -{ - QByteArray sequence; - mTone->recognizeTone(tone, sequence, duration); -} - -void ToneProviderTest::cleanup() -{ - delete mTone; - mTone = 0; -} - -// **************************************************************************** -// * ************************************************************************ * -// * * SYMBIAN MOC PART * * -// * ************************************************************************ * -// **************************************************************************** - - -// includes -#include -#include -#include -#include -#include -#include //MMdaAudioToneObserver - -class CMocProfileTones : public MProfileTones - { - public: - CMocProfileTones() - { - // Set TProfileToneSettings with specified value - iToneSettings.iWarningAndGameTones = EFalse; - TBuf<256> ringTone(_L("Z:\\Data\\Sounds\\Digital\\Nokia tune.aac")); - TBuf<256> alertTone(_L("Z:\\Data\\Sounds\\Digital\\Message 1.aac")); - iTone = ringTone; - } - virtual ~CMocProfileTones() {} - - public: - virtual const TDesC& RingingTone1() const - { - //DONE - return iTone; - } - virtual const TDesC& RingingTone2() const - { - //DONE - return iTone; - } - virtual const TDesC& MessageAlertTone() const - { - //DONE - return iTone; - } - virtual const TProfileToneSettings& ToneSettings() const - { - //DONE: Return TProfileToneSettings - return iToneSettings; - } - private: - TProfileToneSettings iToneSettings; - TBuf<256> iTone; - }; - -class CMocProFile : public MProfile - { - public: - static CMocProFile* NewLC() - { - CMocProFile* self = new( ELeave ) CMocProFile; - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - virtual ~CMocProFile() {} - protected: - CMocProFile() {} - void ConstructL() - { - iTones = new(ELeave) CMocProfileTones; - } - - public: // New functions - virtual void Release() {} - virtual const TArray AlertForL() {} - virtual TBool IsSilent() const { return EFalse; } - virtual const MProfileName& ProfileName() const {} - virtual const MProfileTones& ProfileTones() const - { - //DONE: return an MProfileTones object - return *iTones; - } - virtual const MProfileExtraTones& ProfileExtraTones() const {} - virtual const MProfileExtraSettings& ProfileExtraSettings() const {} - - private: - MProfileTones* iTones; - }; - -class CMocProfileEngine : public MProfileEngine - { - public: - CMocProfileEngine() {}; - virtual ~CMocProfileEngine() {}; - public: - virtual void Release() {}; - virtual MProfile* ActiveProfileLC() - { - //DONE: Create an MProfile object - MProfile* pf = CMocProFile::NewLC(); - return pf; - } - virtual MProfile* ActiveProfileL() { return NULL; }; - virtual TInt ActiveProfileId() { return 0; }; - virtual MProfilesNamesArray* ProfilesNamesArrayLC() { return NULL; }; - virtual void SetActiveProfileL( TInt /*aId*/ ) {}; - virtual void SetTempRingingVolumeL( TProfileRingingVolume /*aVolume*/ ) {}; - virtual TProfileRingingVolume TempRingingVolumeL() const { - return EProfileRingingVolumeLevel1; - } - virtual void SetTempMediaVolumeL( TProfileRingingVolume /*aVolume*/ ) {}; - virtual TProfileRingingVolume TempMediaVolumeL() const { - return EProfileRingingVolumeLevel1; - } - virtual TBool IsFeatureSupported( - TProfileFeatureId /*aFeatureId*/ ) const { return EFalse; }; - virtual TBool IsActiveProfileTimedL() { return EFalse; }; - - }; - -// ---------------------------------------------------------------------------- -// CreateProfileEngineL moc -// create profile engine -// ---------------------------------------------------------------------------- -// -//MProfileEngine* CreateProfileEngineL() -// { -// -// MProfileEngine* pe = new( ELeave ) CMocProfileEngine; -// return pe; -// } - -// End of file - diff -r 7d48bed6ce0c -r 987c9837762f satui/satapp/tsrc/ut_satapp/ut_satapp.pro --- a/satui/satapp/tsrc/ut_satapp/ut_satapp.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -# -# 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: unit test pro file for satapp. -# - -TEMPLATE = app -TARGET = ut_satapp -DEPENDPATH += . -INCLUDEPATH += . -CONFIG += hb -CONFIG += qtestlib -HEADERS += $$PUBLIC_HEADERS -MOC_DIR = moc - -symbian { - TARGET.CAPABILITY = CAP_APPLICATION -} - -INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \ - $$MOC_DIR \ - ../../../../inc \ - ../../inc - -LIBS += -legul \ - -lfbscli \ - -lcentralrepository \ - -lCenRepNotifHandler \ - -lCdlEngine \ - -lbafl \ - -lmediaclientaudio \ - -lprofileeng \ - -lFlogger - -HEADERS += ../../inc \ - ../../inc/satappmainhandler.h \ - ../../inc/satappserverdispatcher.h \ - ../../inc/satappmenuprovider.h \ - ../../inc/satappinputprovider.h \ - ../../inc/satapptoneprovider.h \ - ../../inc/satapppopupprovider.h \ - ../../inc/satappconfirmprovider.h \ - ../../inc/satappaction.h \ - ../../inc/satappconstant.h \ - inc/ut_satappmainhandler.h \ - inc/ut_satappserverdispatcher.h \ - inc/ut_satappmenuprovider.h \ - inc/ut_satappinputprovider.h \ - inc/ut_satapptoneprovider.h \ - inc/ut_satapppopupprovider.h \ - inc/ut_satappconfirmprovider.h \ - inc/ut_satappaction.h - - -SOURCES += ../../src/satappmainhandler.cpp \ - ../../src/satappserverdispatcher.cpp \ - ../../src/satappmenuprovider.cpp \ - ../../src/satappinputprovider.cpp \ - ../../src/satapptoneprovider.cpp \ - ../../src/satapppopupprovider.cpp \ - ../../src/satappconfirmprovider.cpp \ - ../../src/satappaction.cpp \ - src/main.cpp \ - src/ut_satappmainhandler.cpp \ - src/ut_satappserverdispatcher.cpp \ - src/ut_satappmenuprovider.cpp \ - src/ut_satappinputprovider.cpp \ - src/ut_satapptoneprovider.cpp \ - src/ut_satapppopupprovider.cpp \ - src/ut_satappconfirmprovider.cpp \ - src/ut_satappaction.cpp \ - src/rsat_stub.cpp - -RESOURCES += ../../resource/satapp.qrc - diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatplugininc/aisatcontentmodel.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatplugininc/aisatcontentmodel.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,78 @@ +/* +* Copyright (c) 2006 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: Content model for SAT Plug-in. +* +*/ + + +#ifndef AISATCONTENTMODEL_H +#define AISATCONTENTMODEL_H + + +#include +#include "aisatpluginuids.hrh" + +// SAT Operator Info Plug-in XML implementation UID +const TInt KImplUidSatPlugin = + AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN; +const TUid KUidSatPlugin = { KImplUidSatPlugin }; + +/** + * Content Ids. + */ +enum TSatContentIds + { + ESatContentText, + ESatContentIcon + }; + +enum TSatEventIds + { + ESatLaunchSatapp = 1 + }; + +const TAiContentItem KSatContent[] = + { + { ESatContentText, L"SatIdleModeText", "text/plain" }, + { ESatContentIcon, L"SatIdleModeIcon", "image/x-s60-bitmap" } + }; + +/** + * Resource Ids. + */ +enum TSatPluginResourceIds + { + ESatResourceEmptyIcon, + ESatResourceEmptyCaption + }; + +/** + * Resources that the plug-in will publish. + */ +const TAiContentItem KSatResources[] = + { + { ESatResourceEmptyCaption, L"EmptyCaption", "text/plain" }, + { ESatResourceEmptyIcon, L"EmptyIcon", "image/*" } + }; + +/** + * Event Ids. + */ +const TAiContentItem KSatEvents[] = + { + { ESatLaunchSatapp, L"LaunchSatapp", "int" } + }; + +#endif //AISATCONTENTMODEL_H + diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatplugininc/aisatpluginuids.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatplugininc/aisatpluginuids.hrh Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2006 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: UIDs for the Active Idle subsystem components. +* +*/ + + +#ifndef AISATPLUGINUIDS_HRH +#define AISATPLUGINUIDS_HRH + +/** + * Ecom dll uid for sat plugin. + */ +#define AI_UID_ECOM_DLL_CONTENTPUBLISHER_SATPLUGIN 0x102078EA + +/** + * Ecom implementation uid for sat plugin. + */ +#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN 0x102078EB + +#endif //AISATPLUGINUIDS_HRH diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatplugininc/caisatengine.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatplugininc/caisatengine.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,167 @@ +/* +* Copyright (c) 2006-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: Header file for the CAiSatEngine class +* +*/ + + +#ifndef CAISATENGINE_H +#define CAISATENGINE_H + +// INCLUDE FILES + +#include +#include +#include // For idle mode text and icon +#include // For idle mode text and icon +#include + +class CAiSatNotifier; +class TAIPluginInitData; +class MPluginAPI; + +/** + * CAiSatEngine + * + * @since S60 v3.2 + */ +class CAiSatEngine : public CBase + { + +public: // Constructors and destructor + + /** + * Part of the two phased constuction + * + * @param MPluginAPI& aPlugin a ref to a object implementing MPluginAPI + * (the object ordering a notification of the content status change) + * @return Pointer to the created CAiSatEngine object + */ + static CAiSatEngine* NewL( MPluginAPI& aPlugin ); + + /** + * Destructor + */ + ~CAiSatEngine(); + +public: // New functions + + /** + * Offers the Idle Mode text + * + * @param aString Idle mode text for publishing + */ + void ContentText( TPtrC& aString ); + + /** + * Offers the Idle Mode icon + * + * @param aGulIcon icon for publishing + * + */ + void ContentIconL( CGulIcon*& aGulIcon ); + + /** + * Formulates response to SatIcon API. + */ + void HandleNotifyL(); + + /** + * Get idle text, icon id, icon qulifier and load icon as bitmap. + * + * @param aDupIcon If the icon is the same as previous one. + * @param aDupText If the text is the same as previous one. + */ + void PrepareIdleModeDataL( TBool& aDupIcon, TBool& aDupText ); + +private: // private construction method + + /** + * Constructor to use in the object creation. + * Initializes the necessary data. + * + * @param MPluginAPI& aPlugin a ref to a object implementing MPluginAPI + * (the object ordering a notification of the content status change) + */ + CAiSatEngine( MPluginAPI& aPlugin); + + /** + * Part of the two phased construction + */ + void ConstructL(); + +private: // New functions + + /** + * Loads the Idle Mode icon from SatIcon. + * + * @param aIconId The icon record id. + * @param aIconQualifier the icon qualifier. + * @return The Idle Mode icon id in TInt, the caller need to delete + * the pointer. + */ + CFbsBitmap* LoadIconL( TUint8 aIconId, + RSatService::TSatIconQualifier aIconQualifier ); + + /** + * Information of the content availability. + * + * @return ETrue if there is content to show, EFalse if not. + */ + TBool HasContent(); + + /** + * Sends idle information to satIconInfo + * + * @param const RSatService::TSATIdleResult& aResponse + */ + void SendSatResponseL( + const RSatService::TSATIdleResult& aResponse ) const; + +private: // Data + + /** + * Pointer to the Display Text proactive command handler + * Own + */ + CAiSatNotifier* iNotifier; + + /** + * ref to the class implementing the MPluginAPI interface + */ + MPluginAPI& iPlugin; + + /** + * SIM icon buffer + * Own + */ + CFbsBitmap* iIcon; + + /** + * Icon id in previous icon loading (to check if icon is changed) + */ + TUint8 iPreviousIconId; + + /** + * SatClient session. + */ + RSatSession iSatSession; + + /** + * SatClient service. + */ + RSatService iSatService; + }; + +#endif // CAISATENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatplugininc/caisatnotifier.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatplugininc/caisatnotifier.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,168 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: The handler for the SAT Plug-in +* Set Up Idle Mode Text proactive command. +* +*/ + + +#ifndef CAISATNOTIFIER_H +#define CAISATNOTIFIER_H + +// INCLUDES +#include "mpluginapi.h" // Needed in cpp and header + +class RSatSession; +class RSatService; + +// CLASS DECLARATION + +/** + * This is the handler for the Set Up Idle Mode Text proactive command. + * This active objects is registered with ETel SAT Api to receive notifications + * about the incoming Display Text commands. + * + * @since S60 v3.2 + * + */ +class CAiSatNotifier : public CActive + { +public: // Constructors and destructor + + /** + * Part of the two phased constuction + * + * @param MPluginAPI& aPlugin a ref to a object implementing MPluginAPI + * (the object ordering a notification of the content status change) + * @param RSatService& aSatService a ref to RSatService + * @return Pointer to the created CAiSatNotifier object + */ + static CAiSatNotifier* NewL( MPluginAPI& aPlugin, + RSatService& aSatService ); + + /** + * Destructor + */ + virtual ~CAiSatNotifier(); + + /** + * Starts listening for the Sat command. + * @return Error code. + */ + TInt Start(); + + /** + * Whether the P&S has content or not. + * @return whether has content or not. + */ + TBool HasContent(); + + /** + * Get Idle mode data to member: string, icon qualifier, icon id. + * + * @param aDupIcon Whether the icon is the same with previous one + * @param aDupText Whether the icon is the same with previous one + */ + void GetIdleModeDataL( TBool& aDupIcon, TBool& aDupText ); + + /** + * Get idle text string + * + * @param aString Idle text string. + */ + void GetIdleTextString( TPtrC& aString ); + + /** + * Idle icon record id + * + * @return Icon record id + */ + TUint8 IdleIconId(); + + /** + * Idle icon qualifier + * + * @return Icon qualifier + */ + RSatService::TSatIconQualifier IdleIconQualifier(); + +protected: // From base class CActive + + /** + * From CActive + * Handles the request completion. + */ + void RunL(); + + /** + * From CActive + * Implements the cancel protocol. + */ + void DoCancel(); + +private: // Constructors + + /** + * Constructor to use in the object creation. + * Initializes the necessary data. + * + * @param aPlugin Ref to a object implementing MPluginAPI + * (the object ordering a notification of the content status change) + * @param aSatService Ref to a RSatService + */ + CAiSatNotifier( MPluginAPI& aPlugin, + RSatService& aSatService ); + + /** + * To continue listening to the Sat command. + */ + void Activate(); + +private: // Data + + /** + * Idle mode text. + * Own + */ + HBufC* iString; + + /** + * Idle mode icon id. + */ + TUint8 iRecordId; + + /** + * Idle mode icon qualifier. + */ + RSatService::TSatIconQualifier iIconQualifier; + + /** + * CAiSatPlugin reference. + */ + MPluginAPI& iPlugin; + + /** + * RSatService reference from CAiSatEngine. + */ + RSatService& iSatService; + + /** + * Identify the first start up. + */ + TBool iFirstStartup; + + }; + +#endif // CAISATNOTIFIER_H + diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatplugininc/caisatplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatplugininc/caisatplugin.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,201 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Plug-in main class +* +*/ + + +#ifndef CAISATPLUGIN_H +#define CAISATPLUGIN_H + +#include +#include + +#include "mpluginapi.h" +#include "caisatengine.h" + +class MAiContentObserver; +class MAiContentItemIterator; + +/** + * Plug-in main class + * + * @since S60 v3.2 + */ +class CAiSatPlugin : public CHsContentPublisher, + public MPluginAPI + { + +public: + + /** + * Part of the two phased constuction + */ + static CAiSatPlugin* NewL(); + + /** + * Destructor + */ + ~CAiSatPlugin(); + + /** + * Publishes SAT Set Up Idle Mode Text + */ + void PublishSatL(); + +// from base class CHsContentPublisher + + /** + * @see CHsContentPublisher + */ + void Start( TStartReason aReason ); + + /** + * @see CHsContentPublisher + */ + void Stop( TStopReason aReason ); + + /** + * @see CHsContentPublisher + */ + void Resume( TResumeReason aReason ); + + /** + * @see CHsContentPublisher + */ + void Suspend( TSuspendReason aReason ); + + /** + * @see CHsContentPublisher + */ + void SubscribeL( MAiContentObserver& aObserver ); + + /** + * @see CHsContentPublisher + */ + void ConfigureL( RAiSettingsItemArray& aSettings ); + + /** + * @see CHsContentPublisher + */ + TAny* GetProperty( TProperty aProperty ); + + /** + * Receives a notification of the content update event + */ + void NotifyContentUpdate(); + +private: + + /** + * Constructor to use in the object creation. + * Initializes the necessary data. + */ + CAiSatPlugin(); + + /** + * Part of the two phased construction + */ + void ConstructL(); + + /** + * Update idle area when plug in reload. + */ + void UpdateSatL(); + + /** + * Publish a icon to the idle area. + * + * @param aObserver The Active Idle content observer. + * @param aIcon The icon to be published. + * @return The error code. + */ + TInt PublishIcon( MAiContentObserver& aObserver, CGulIcon* aIcon ); + + /** + * Clean setup idle mode icon. + * + * @param aObserver The Active Idle content observer. + * @return The error code. + */ + TInt CleanIcon( MAiContentObserver& aObserver ); + + /** + * Publish a SetUpIdleModeText string. + * + * @param aObserver The Active Idle content observer. + * @param aContent The SetUpIdleModeText string would be published. + * @return The error code. + */ + TInt PublishText( MAiContentObserver& aObserver, + const TDesC& aText ); + + /** + * Clean setup idle mode text. + * + * @param aObserver The Active Idle content observer. + * @return The error code. + */ + TInt CleanText( MAiContentObserver& aObserver ); + +private: // data + + /** + * Iterator for plugin content + * Own + */ + MAiContentItemIterator* iContent; + + /** + * Iterator for plugin resources + * Own + */ + MAiContentItemIterator* iResources; + + /** + * Iterator for plugin events + * Own + */ + MAiContentItemIterator* iEvents; + + /** + * Plugin engine + * Own + */ + CAiSatEngine* iEngine; + + /** + * Array of content observers + */ + RPointerArray iObservers; + + /** + * Whether the icon is the same with previous one. + */ + TBool iDupIcon; + + /** + * Whether the text is the same with previous one. + */ + TBool iDupText; + + /** + * ETrue, if data should be published in Resume() + */ + TBool iPublishRequired; + }; + +#endif // CAISATPLUGIN_H + + diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatplugininc/mpluginapi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatplugininc/mpluginapi.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,43 @@ +/* +* Copyright (c) 2002-2004 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: Defines interface for the operator info engine user +* +*/ + + +#ifndef MPLUGINAPI_H +#define MPLUGINAPI_H + +// CLASS DECLARATION +/** +* It defines interface for the plugin, contains virtual method which offers plugin +* a way to notify the client e.g. P&S data changes +* +* @since S60 v3.2 +*/ +class MPluginAPI + { + public: + + /** + * Virtual method, which the plugin class has to implement. + * Method is used to send notification of P&S data's change event + * from engine to plugin. + * + */ + inline virtual void NotifyContentUpdate() = 0; + }; + +#endif //MPLUGINAPI_H + diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatplugininc/tflogger.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatplugininc/tflogger.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2006 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: Defines logging macroes +* +*/ + + +#ifndef __TFLOGGER_H__ +#define __TFLOGGER_H__ + +#include +#include + +_LIT( KTfLogFolder, "sat" ); +_LIT( KTfLogFile, "satplugin.TXT" ); + +/** +* ------------------------------------------------------------------------------ +* +* Remove #define LOGGING_ENABLED from comments to enable logging +* +* ------------------------------------------------------------------------------ +*/ + +//#define LOGGING_ENABLED + +/** +* ------------------------------------------------------------------------------ +* +* LOGGING MACROs +* +* USE THESE MACROS IN YOUR CODE +* +* Example: TFLOGTEXT( own_desc ) +* Example: TFLOGSTRING( "Test" ) +* Example: TFLOGSTRING( "Test %i", aValue ) +* Example: TFLOGSTRING( "Test %i %i", aValue1, aValue2 ) +* +* ------------------------------------------------------------------------------ +*/ + +#ifdef LOGGING_ENABLED + + #define TFLOGTEXT( TEXT ) \ + { \ + RFileLogger::Write( KTfLogFolder,KTfLogFile, \ + EFileLoggingModeAppend, TEXT ); \ + RDebug::Print( TEXT ); \ + } + + #define TFLOGSTRING( TEXT ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::Write( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + tempLogDes() ); \ + RDebug::Print( _L( TEXT ) ); \ + } + + #define TFLOGSTRING2( TEXT, VAR1 ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::WriteFormat( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + TRefByValue( tempLogDes() ), VAR1 ); \ + RDebug::Print( _L( TEXT ), VAR1 ); \ + } + + #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) \ + { \ + _LIT( tempLogDes, TEXT ); \ + RFileLogger::WriteFormat( \ + KTfLogFolder, \ + KTfLogFile, \ + EFileLoggingModeAppend, \ + TRefByValue( tempLogDes() ), VAR1, VAR2 ); \ + RDebug::Print( _L( TEXT ), VAR1, VAR2 ); \ + } + +#else + + #define TFLOGTEXT( TEXT ) + #define TFLOGSTRING( TEXT ) + #define TFLOGSTRING2( TEXT, VAR1 ) + #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) + +#endif // LOGGING_ENABLED + +#endif // __TFLOGGER_H__ diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatpluginsrc/caisatengine.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatpluginsrc/caisatengine.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,310 @@ +/* +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: The engine class of operator info plugin. Handles the +* communication with Publish&Subscribe data. +* +*/ + + +// INCLUDE FILES +#include // For itemsicon +#include // For itemsicon +#include // For TAknWindowLineLayout +#include // For scalable layouts +#include +#include + +#include "caisatengine.h" +#include "caisatnotifier.h" +#include "mpluginapi.h" +#include "tflogger.h" + +// ============================ MEMBER FUNCTIONS =============================== +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +CAiSatEngine::CAiSatEngine( MPluginAPI& aPlugin ) : + iPlugin ( aPlugin ), + iIcon( NULL ), + iPreviousIconId( 0 ) + { + } + +// ----------------------------------------------------------------------------- +// Two-phased constructor. +// Create instance of concrete ECOM interface implementation +// ----------------------------------------------------------------------------- +CAiSatEngine* CAiSatEngine::NewL( MPluginAPI& aPlugin ) + { + TFLOGSTRING( "CAiSatEngine::NewL called" ) + + CAiSatEngine* self = new( ELeave )CAiSatEngine( aPlugin ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + + TFLOGSTRING( "CAiSatEngine::NewL exits" ) + return self; + } + +// ----------------------------------------------------------------------------- +// Destructor. +// Closes the connection to the P&S and deletes +// all the dynamic content. +// ----------------------------------------------------------------------------- +// +CAiSatEngine::~CAiSatEngine() + { + TFLOGSTRING( "CAiSatEngine::~CAiSatEngine called" ) + + delete iNotifier; + + // Delete icon and null the pointer. + delete iIcon; + iIcon = NULL; + + iSatService.Close(); + iSatSession.Close(); + + TFLOGSTRING( "CAiSatEngine::~CAiSatEngine exits" ) + } + +// ----------------------------------------------------------------------------- +// Offers information about the content +// Returns ETrue if there is content available, +// EFalse if not. +// ----------------------------------------------------------------------------- +// +TBool CAiSatEngine::HasContent() + { + TFLOGSTRING( "CAiSatEngine::HasContent called - exits" ) + return iNotifier->HasContent(); + } + +// ----------------------------------------------------------------------------- +// Retrieves the operator info text from RSatService +// ----------------------------------------------------------------------------- +// +void CAiSatEngine::ContentText( TPtrC& aString ) + { + TFLOGSTRING( "CAiSatEngine::ContentText called" ) + + iNotifier->GetIdleTextString( aString ); + + TFLOGSTRING( "CAiSatEngine::ContentText exits" ) + } + +// ----------------------------------------------------------------------------- +// Offers the Idle Mode icon +// ----------------------------------------------------------------------------- +// +void CAiSatEngine::ContentIconL( CGulIcon*& aGulIcon ) + { + TFLOGSTRING( "CAiSatEngine::ContentIconL called" ) + + // Active Idle framework will release the bitmap we would + // publish. So a new bitmap should be created to avoid + // destroying the bitmap owned by UAA. + if ( iIcon ) + { + TFLOGSTRING( "CAiSatEngine::ContentIconL iIcon != NULL" ) + // The bitmap for publishing. + CFbsBitmap* bitmapToPublish( NULL ); + + bitmapToPublish = new (ELeave) CFbsBitmap; + CleanupStack::PushL( bitmapToPublish ); + + TSize size = iIcon->SizeInPixels(); + TInt error = bitmapToPublish->Create( size, iIcon->DisplayMode() ); + TFLOGSTRING2( "CFbsBitmap::Create returns %d", error ) + // Duplicate the bitmap owned by UAA into the new bitmap. + if ( !error ) + { + error = bitmapToPublish->Duplicate( iIcon->Handle() ); + TFLOGSTRING2( "CFbsBitmap::Duplicate returns %d", error ) + if ( !error ) + { + // Create a icon from the bitmap and publish it. + aGulIcon = CGulIcon::NewL( bitmapToPublish ); + CleanupStack::Pop( bitmapToPublish ); + TFLOGSTRING( "CAiSatEngine::ContentIconL create GulIcon" ) + } + } + if ( error ) + { + CleanupStack::PopAndDestroy( bitmapToPublish ); + aGulIcon = NULL; + } + } + TFLOGSTRING( "CAiSatEngine::ContentIconL exits" ) + } + +//------------------------------------------------------------------------------ +// Loads icon provided by SIM from RSatIcon +//------------------------------------------------------------------------------ +CFbsBitmap* CAiSatEngine::LoadIconL( TUint8 aIconId, + RSatService::TSatIconQualifier aIconQualifier ) + { + TFLOGSTRING( "CAiSatEngine::LoadIconL called" ) + CFbsBitmap* simIconBuffer( NULL ); + + // If icon allready has been got from SIM (via satIcon and SATServer) + // Because mechanism for fetching icon is very slow, it has been + // stored in class variable to make reasonable speed for + // Active Idle refreshing. + if ( RSatService::ESatIconSelfExplanatory == aIconQualifier || + RSatService::ESatIconNotSelfExplanatory == aIconQualifier ) + { + TFLOGSTRING( "CAiSatEngine::LoadIconL having icon" ) + RIconEf iconEf; + CleanupClosePushL( iconEf ); + + // Get icon info + iSatService.GetIconInfoL( aIconId, iconEf ); + // Get the an available icon from info array. + TInt infoCount( iconEf.Count() ); + TInt error( KErrNotFound ); + for ( TInt i = 0; i < infoCount && KErrNone != error; i++ ) + { + TRAP( error, simIconBuffer = iSatService.GetIconL( iconEf[i] ) ); + } + + // Check whether the for loop ends without icon gotton. + if ( error != KErrNone ) + { + TFLOGSTRING2( "CAiSatEngine::LoadIconL: error=%d",error ) + simIconBuffer = NULL; + } + + CleanupStack::PopAndDestroy( &iconEf ); + } + TFLOGSTRING( "CAiSatEngine::LoadIconL exit" ) + return simIconBuffer; + } + +// --------------------------------------------------------------------------- +// Formulates response to SatIcon API +// --------------------------------------------------------------------------- +// +void CAiSatEngine::HandleNotifyL() + { + TFLOGSTRING( "CAiSatEngine::HandleNotifyL called" ) + TUint8 id( iNotifier->IdleIconId() ); + RSatService::TSatIconQualifier iconQualifier( + iNotifier->IdleIconQualifier() ); + + if ( !HasContent() && RSatService::ESatIconNoIcon == iconQualifier ) + { + // Removal of text = No text and no icon + TFLOGSTRING( "CAiSatNotifier::HasContent ETrue remove text success" ) + SendSatResponseL( RSatService::ESATIdleSuccess ); + } + else + { + TFLOGSTRING2( "CAiSatEngine::HandleNotifyL Icon: %d", iconQualifier ) + if ( RSatService::ESatIconNoIcon == iconQualifier) + { + TFLOGSTRING( "CAiSatEngine::HandleNotifyL ESatIconNoIcon" ) + SendSatResponseL( RSatService::ESATIdleSuccess ); + } + else if ( RSatService::ESatIconSelfExplanatory == iconQualifier || + RSatService::ESatIconNotSelfExplanatory == iconQualifier ) + { + SendSatResponseL( RSatService::ESATIdleSuccess ); + TFLOGSTRING( "CAiSatEngine::HandleNotify icon & success resp" ) + } + else if ( RSatService::ESatIconNotSelfExplanatory != iconQualifier && + RSatService::ESatIconNoIcon != iconQualifier ) + { + SendSatResponseL( RSatService::ESATIdleSuccessRequestedIconNotDisplayed ); + TFLOGSTRING( "CAiSatEngine: KSATIdleSuccessRequestedIconNotDisplayed" ) + } + else + { + TFLOGSTRING( "CAiSatEngine::HandleNotifyL others" ) + // Report error + SendSatResponseL( RSatService::ESATIdleMeUnableToProcessCmd ); + } + } + + TFLOGSTRING( "CAiSatEngine::HandleNotify exit" ) + } + +// --------------------------------------------------------------------------- +// Get Idle mode data first, and load icon for publishing +// --------------------------------------------------------------------------- +// +void CAiSatEngine::PrepareIdleModeDataL( TBool& aDupIcon, TBool& aDupText ) + { + TFLOGSTRING( "CAiSatEngine::PrepareGetIdleModeDataL called" ) + + // Get icon Id, icon qualifier and text. + iNotifier->GetIdleModeDataL( aDupIcon, aDupText ); + + // Load icon, and check whether it is the same with previous one. + // if not, Load icon, otherwise, do nothing. + TUint8 id ( iNotifier->IdleIconId() ); + RSatService::TSatIconQualifier iconQualifier( + iNotifier->IdleIconQualifier() ); + + if ( !( RSatService::ESatIconNoIcon == iconQualifier ) || + !( id == iPreviousIconId && iIcon ) ) + { + TFLOGSTRING( "CAiSatEngine::PrepareIdleModeDataL load icon" ) + delete iIcon; + iIcon = NULL; + + // The bitmap is fetched from UAA. + iIcon = LoadIconL( id, iconQualifier ); + iPreviousIconId = id; + } + TFLOGSTRING( "CAiSatEngine::PrepareGetIdleModeDataL exits" ) + } + +// --------------------------------------------------------------------------- +// Symbian 2nd phase constructor can leave +// --------------------------------------------------------------------------- +// +void CAiSatEngine::ConstructL() + { + TFLOGSTRING( "CAiSatEngine::ConstructL called" ) + + iSatSession.ConnectL(); + TFLOGSTRING( "CAiSatEngine::ConstructL connect sat session" ) + + iSatService.OpenL( iSatSession ); + TFLOGSTRING( "CAiSatEngine::ConstructL open sat service" ) + + iNotifier = CAiSatNotifier::NewL( iPlugin, iSatService ); + User::LeaveIfError( iNotifier->Start() ); + + TFLOGSTRING( "CAiSatEngine::ConstructL exits" ) + } + +// --------------------------------------------------------------------------- +// Sends SAT response to RSatIcon +// --------------------------------------------------------------------------- +// +void CAiSatEngine::SendSatResponseL( + const RSatService::TSATIdleResult& aResponse ) const + { + TFLOGSTRING( "CAiSatEngine::SendSatResponseL called") + + iSatService.SetIdleModeTextResponse( aResponse ); + + TFLOGSTRING( "CAiSatEngine::SendSatResponseL exits" ) + } + +// End Of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatpluginsrc/caisatnotifier.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatpluginsrc/caisatnotifier.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,294 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: The handler for the SAT Plug-in +* Set Up Idle Mode Text proactive command. +* +*/ + + +// INCLUDE FILES +#include +#include +#include +#include + +#include "caisatnotifier.h" +#include "mpluginapi.h" // Needed in cpp and header +#include "tflogger.h" + +// ============================ MEMBER FUNCTIONS ============================= +// --------------------------------------------------------------------------- +// Symbian 2nd phase constructor can leave +// --------------------------------------------------------------------------- +// +CAiSatNotifier* CAiSatNotifier::NewL( MPluginAPI& aPlugin, + RSatService& aSatService ) + { + TFLOGSTRING( "CAiSatNotifier::NewL calling" ) + CAiSatNotifier* self = new ( ELeave ) CAiSatNotifier( aPlugin, + aSatService ); + + TFLOGSTRING( "CAiSatNotifier::NewL exits" ) + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// Cancels and deletes +// all the dynamic content +// --------------------------------------------------------------------------- +// +CAiSatNotifier::~CAiSatNotifier() + { + TFLOGSTRING( "CAiSatNotifier::~CAiSatNotifier calling" ) + + // Cancel any outstanding requests + Cancel(); + delete iString; + + TFLOGSTRING( "CAiSatNotifier::~CAiSatNotifier exits" ) + } + +// --------------------------------------------------------------------------- +// Starts the handler +// --------------------------------------------------------------------------- +// +TInt CAiSatNotifier::Start() + { + TFLOGSTRING( "CAiSatNotifier::Start calling" ) + + TInt error( KErrNotReady ); + if ( !IsActive() ) + { + error = iSatService.NotifySetupIdleModeTextChange( iStatus ); + TFLOGSTRING2( "CAiSatNotifier::Start error %i", error ) + if ( KErrNone == error ) + { + // Set to active so that requests can be received + SetActive(); + } + } + + TFLOGSTRING( "CAiSatNotifier::Start exits" ) + return error; + } + +// --------------------------------------------------------------------------- +// Get the idle mode data to member: string, icon qualifier, icon id. +// --------------------------------------------------------------------------- +// +TBool CAiSatNotifier::HasContent() + { + TFLOGSTRING( "CAiSatNotifier::HasContent calling" ) + TBool ret( EFalse ); + if ( ( iString && iString->Length() ) || + RSatService::ESatIconNoIcon != iIconQualifier ) + { + TFLOGSTRING( "CAiSatNotifier::HasContent ETrue" ) + ret = ETrue; + } + TFLOGSTRING( "CAiSatNotifier::HasContent exits" ) + return ret; + } + +// --------------------------------------------------------------------------- +// Get the idle mode data to member: string, icon qualifier, icon id. +// --------------------------------------------------------------------------- +// +void CAiSatNotifier::GetIdleModeDataL( TBool& aDupIcon, TBool& aDupText ) + { + TFLOGSTRING( "CAiSatNotifier::GetIdleModeData calling" ) + HBufC* string( NULL ); + TUint8 recordId( NULL ); + RSatService::TSatIconQualifier iconQualifier( + RSatService::ESatIconNoIcon ); + + // Get setup idle mode text, icon qualifier and record id. + iSatService.GetSetupIdleModeTextL( string, iconQualifier, recordId ); + + // If the icon is self explanatory, NULL the string. + if ( string && RSatService::ESatIconSelfExplanatory == iconQualifier ) + { + TPtr ptr( string->Des() ); + ptr.Copy( KNullDesC ); + } + + // Check if the icon or text is the same as previous one. + if ( iFirstStartup ) + { + aDupIcon = EFalse; + aDupText = EFalse; + iFirstStartup = EFalse; + } + else + { + // Check if setup idle mode icon is changed. + aDupIcon = ( iRecordId == recordId ); + + // Check if setup idle mode text is changed. + // If both of the iString and string are NULL, it is duplicated. + // If both of the iString and string are not NULL, and they have + // the same content, it is duplicated. + // Otherwise, it is not duplicated. + + aDupText = ( ( ( !iString || !iString->Length() ) && + ( !string || !string->Length() ) ) || + ( iString && string && + *iString == string->Des() ) ); + } + + // Save the setup idle mode text, icon qulifier + // and record id to member params. + delete iString; + iString = NULL; + if ( string ) + { + CleanupStack::PushL( string ); + iString = HBufC::NewL( string->Size() ); + TPtr ptr( iString->Des() ); + ptr.Copy( string->Des() ); + CleanupStack::PopAndDestroy( string ); + } + + iIconQualifier = iconQualifier; + + iRecordId = recordId; + + TFLOGSTRING( "CAiSatNotifier::GetIdleModeData exits" ) + } + +// --------------------------------------------------------------------------- +// Handles the Idle Text string command +// --------------------------------------------------------------------------- +// +void CAiSatNotifier::GetIdleTextString( TPtrC& aString ) + { + TFLOGSTRING( "CAiSatNotifier::GetIdleTextString calling" ) + + if ( iString ) + { + TFLOGSTRING2( "CAiSatNotifier::IdleTextStringL exits, \ + length of string: %i", iString->Length() ) + aString.Set( iString->Des() ); + } + else + { + aString.Set( KNullDesC ); + } + TFLOGSTRING( "CAiSatNotifier::GetIdleTextString exits" ) + } + + +// --------------------------------------------------------------------------- +// Handles the Idle Icon command. +// --------------------------------------------------------------------------- +// +TUint8 CAiSatNotifier::IdleIconId() + { + TFLOGSTRING( "CAiSatNotifier::IdleIconId calling" ) + + TFLOGSTRING2( "CAiSatNotifier::IdleIconId exits, id: %i", iRecordId ) + + return iRecordId; + } + +// --------------------------------------------------------------------------- +// Handles the Idle Icon Qulifier command. +// --------------------------------------------------------------------------- +// +RSatService::TSatIconQualifier CAiSatNotifier::IdleIconQualifier() + { + TFLOGSTRING( "CAiSatNotifier::IdleIconQualifier calling" ) + + TFLOGSTRING2( "CAiSatNotifier::IdleIconQualifier exits, \ + iconQualifier: %d", iIconQualifier ) + + return iIconQualifier; + } + +// --------------------------------------------------------------------------- +// Handles the Plugin's NotifyContentUpdate command. +// --------------------------------------------------------------------------- +// +void CAiSatNotifier::RunL() + { + TFLOGSTRING( "CAiSatNotifier::RunL calling" ) + + // Notify the plugin about the event through the MPluginAPI interface + if ( KErrNone == iStatus.Int() ) + { + // Notify plugin when the content update. + // The plugin should get data again. + iPlugin.NotifyContentUpdate(); + } + if ( !IsActive() ) + { + Activate(); + } + TFLOGSTRING( "CAiSatNotifier::RunL exits" ) + + } + +// --------------------------------------------------------------------------- +// Cancels the pending request +// --------------------------------------------------------------------------- +// +void CAiSatNotifier::DoCancel() + { + TFLOGSTRING( "CAiSatNotifier::DoCancel calling" ) + + iSatService.NotifySetupIdleModeTextChangeCancel(); + + TFLOGSTRING( "CAiSatNotifier::DoCancel exits" ) + } + +// --------------------------------------------------------------------------- +// Default constructor +// --------------------------------------------------------------------------- +// +CAiSatNotifier::CAiSatNotifier( MPluginAPI& aPlugin, + RSatService& aSatService ): + CActive( EPriorityStandard ), + iString( NULL ), + iRecordId( 0 ), + iIconQualifier( RSatService::ESatIconNoIcon ), + iPlugin( aPlugin ), + iSatService( aSatService ), + iFirstStartup( ETrue ) + { + TFLOGSTRING( "CAiSatNotifier::CAiSatNotifier calling" ) + + // Add to active scheduler + CActiveScheduler::Add( this ); + + TFLOGSTRING( "CAiSatNotifier::CAiSatNotifier exits" ) + } + +// --------------------------------------------------------------------------- +// Continues listening to the Sat command +// --------------------------------------------------------------------------- +// +void CAiSatNotifier::Activate() + { + TFLOGSTRING( "CAiSatNotifier:Activate() calling" ) + + Cancel(); + TInt error = iSatService.NotifySetupIdleModeTextChange( iStatus ); + TFLOGSTRING2( "CAiSatNotifier::Activate error: %i", error ) + if ( KErrNone == error ) + { + SetActive(); + } + TFLOGSTRING( "CAiSatNotifier:Activate() exits" ) + } diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/aisatpluginsrc/caisatplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/aisatpluginsrc/caisatplugin.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,498 @@ +/* +* Copyright (c) 2006-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: SAT Active Idle publisher +* +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include // For CGulIcon +#include // For CFbsBitmap +#include + +#include "aisatcontentmodel.h" +#include "caisatplugin.h" +#include "caisatengine.h" +#include "tflogger.h" + +const TImplementationProxy KImplementationTable[] = + { + //lint -e{611,1924} Warning "Suspicious cast" can not be avoided. + IMPLEMENTATION_PROXY_ENTRY( KImplUidSatPlugin, CAiSatPlugin::NewL ) + }; + +// static cleanup function +static void TransactionCleanup( TAny* aAny ) + { + static_cast( aAny )-> + CancelTransaction( KImplUidSatPlugin ); + } + +// ============================ MEMBER FUNCTIONS ============================= + +// --------------------------------------------------------------------------- +// Symbian 2nd phase constructor can leave +// --------------------------------------------------------------------------- +// +CAiSatPlugin* CAiSatPlugin::NewL() + { + TFLOGSTRING( "CAiSatPlugin::NewL() starts" ) + + CAiSatPlugin* self = new ( ELeave ) CAiSatPlugin; + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + + TFLOGSTRING( "CAiSatPlugin::NewL() exits" ) + return self; + } + +// --------------------------------------------------------------------------- +// Destructor +// Deletes all data created to heap +// --------------------------------------------------------------------------- +// +CAiSatPlugin::~CAiSatPlugin() + { + TFLOGSTRING( "CAiSatPlugin::~CAiSatPlugin() starts" ) + + Release( iContent ); + iContent = NULL; + + Release( iResources ); + iResources = NULL; + + Release( iEvents ); + iEvents = NULL; + + delete iEngine; + + iObservers.Close(); + + TFLOGSTRING( "CAiSatPlugin::~CAiSatPlugin() exits" ) + } + +// --------------------------------------------------------------------------- +// Publish a icon to the idle area. +// --------------------------------------------------------------------------- +// +TInt CAiSatPlugin::PublishIcon( + MAiContentObserver& aObserver, + CGulIcon* aIcon ) + { + TFLOGSTRING( "CAiSatPlugin::PublishIcon() starts" ) + + TInt error( KErrNotSupported ); + + // Check whether the icon can be published or not. + if ( aIcon && aObserver.CanPublish( *this, KSatContent[ESatContentIcon].id, + ESatContentIcon ) ) + { + // If the icon can be published, and then publish it. + error = aObserver.Publish( *this, KSatContent[ESatContentIcon].id, + TPckgC( aIcon ), ESatContentIcon ); + } + + TFLOGSTRING2( "CAiSatPlugin::PublishIcon() exits, error: %d", error ) + + return error; + } + +// --------------------------------------------------------------------------- +// Clean idle area icon +// --------------------------------------------------------------------------- +// +TInt CAiSatPlugin::CleanIcon( MAiContentObserver& aObserver ) + { + TFLOGSTRING( "CAiSatPlugin::CleanIcon() starts" ) + TInt error( KErrNotSupported ); + + error = aObserver.Clean( *this, KSatContent[ESatContentIcon].id, + ESatContentIcon ); + + TFLOGSTRING2( "CAiSatPlugin::CleanIcon() exits, error %d", error ) + return error; + } + +// --------------------------------------------------------------------------- +// Publish a SetUpIdleModeText string. +// --------------------------------------------------------------------------- +// +TInt CAiSatPlugin::PublishText( MAiContentObserver& aObserver, + const TDesC& aText ) + { + TFLOGSTRING( "CAiSatPlugin::PublishText() starts" ) + TFLOGSTRING2( "CAiSatPlugin::PublishText() length %i", aText.Length() ) + + TInt error( KErrNotSupported ); + + // Check whether the SetUpIdleModeText string can be published or not + if ( aText.Length() && + aObserver.CanPublish( *this, KSatContent[ESatContentText].id, + ESatContentText ) ) + { + // If SetUpIdleModeText can be published, and then publish it. + error = aObserver.Publish( *this, KSatContent[ESatContentText].id, + aText, ESatContentText ); + } + TFLOGSTRING2( "CAiSatPlugin::PublishText() exits, error: \ + %d", error ) + + return error; + } + +// --------------------------------------------------------------------------- +// Clean idle area text +// --------------------------------------------------------------------------- +// +TInt CAiSatPlugin::CleanText( MAiContentObserver& aObserver ) + { + TFLOGSTRING( "CAiSatPlugin::CleanText() starts" ) + TInt error( KErrNotSupported ); + + error = aObserver.Clean( *this, KSatContent[ESatContentText].id, + ESatContentText ); + + TFLOGSTRING2( "CAiSatPlugin::CleanText() exits, error %d", error ) + + return error; + } + +// --------------------------------------------------------------------------- +// Publishes the SAT Set Up Idle Mode Text and or Icon +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::PublishSatL() + { + TFLOGSTRING( "CAiSatPlugin::PublishSatL() starts" ) + + TInt error( KErrNone ); + TInt iconError( KErrNone ); + TInt textError( KErrNone ); + TInt observers( iObservers.Count() ); + TInt transactionId( KImplUidSatPlugin ); + MAiContentObserver* observer( NULL ); + CGulIcon* icon( NULL ); // The icon for publishing. + TInt i( 0 ); + TBool commitNeeded( EFalse ); + + // Publish sat data to all observers. + TFLOGSTRING2( "CAiSatPlugin::PublishSatL() observer count: %i", observers ) + for ( i = 0; i < observers; i++ ) + { + commitNeeded = EFalse; + observer = iObservers[i]; + TFLOGSTRING2( "CAiSatPlugin::PublishSatL() observer id: %i", observer ) + + // Start publish transaciton. + error = observer->StartTransaction( transactionId ); + TCleanupItem item( TransactionCleanup, observer ); + CleanupStack::PushL( item ); + + // Publish icon and text to idle mode area. + iEngine->ContentIconL( icon ); + TPtrC text( KNullDesC ); + iEngine->ContentText( text ); + if ( !icon && !text.Length() ) // Nothing + { + if ( !iDupIcon ) + { + error = CleanIcon( *observer ); + commitNeeded = ETrue; + } + if ( !iDupText ) + { + error = CleanText( *observer ); + commitNeeded = ETrue; + } + } + else if ( icon && !text.Length() ) // Icon only + { + if ( !iDupIcon ) + { + error = CleanIcon( *observer ); + iconError = PublishIcon( *observer, icon ); + commitNeeded = ETrue; + } + if ( !iDupText ) + { + error = CleanText( *observer ); + commitNeeded = ETrue; + } + } + else if ( !icon && text.Length() ) // Text only + { + if ( !iDupIcon ) + { + error = CleanIcon( *observer ); + commitNeeded = ETrue; + } + if ( !iDupText ) + { + error = CleanText( *observer ); + textError = PublishText( *observer, text ); + commitNeeded = ETrue; + } + } + else // Text and icon + { + if ( !iDupIcon ) + { + error = CleanIcon( *observer ); + iconError = PublishIcon( *observer, icon ); + commitNeeded = ETrue; + } + if ( !iDupText ) + { + error = CleanText( *observer ); + textError = PublishText( *observer, text ); + commitNeeded = ETrue; + } + } + + // Commit the publishing of the icon and text. + if ( !textError && !iconError && commitNeeded ) + { + TFLOGSTRING( "CAiSatPlugin::PublishSatL() commit transaction" ) + error = observer->Commit( transactionId ); + } + else + { + TFLOGSTRING( "CAiSatPlugin::PublishSatL() cancel transaction" ) + error = observer->CancelTransaction( transactionId ); + } + CleanupStack::Pop(); + } + + TFLOGSTRING( "CAiSatPlugin::PublishSatL() exits" ) + } + +// --------------------------------------------------------------------------- +// CAiSatPlugin::Start +// +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::Start( TStartReason /*aReason*/ ) + { + TFLOGSTRING( "CAiSatPlugin::Start() starts" ) + + iPublishRequired = ETrue; + + TFLOGSTRING( "CAiSatPlugin::Start() exits" ) + } + +// --------------------------------------------------------------------------- +// CAiSatPlugin::Stop +// +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::Stop( TStopReason /*aReason*/ ) + { + TFLOGSTRING( "CAiSatPlugin::Stop() starts - exits" ) + } + +// --------------------------------------------------------------------------- +// CAiSatPlugin::Resume +// +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::Resume( TResumeReason aReason ) + { + TFLOGSTRING2( "CAiSatPlugin::Resume() reason %d", aReason ) + + if ( aReason == EForeground ) + { + if ( iPublishRequired ) + { + iPublishRequired = EFalse; + + TRAP_IGNORE( UpdateSatL() ) + } + } + + TFLOGSTRING( "CAiSatPlugin::Resume() exits" ) + } + +// --------------------------------------------------------------------------- +// CAiSatPlugin::Suspend +// +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::Suspend( TSuspendReason aReason ) + { + TFLOGSTRING( "CAiSatPlugin::Suspend() starts" ) + + if ( aReason == EGeneralThemeChange ) + { + iPublishRequired = ETrue; + } + + TFLOGSTRING( "CAiSatPlugin::Suspend() exits" ) + } + +// --------------------------------------------------------------------------- +// CAiSatPlugin::SubscribeL +// +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::SubscribeL( MAiContentObserver& aObserver ) + { + TFLOGSTRING( "CAiSatPlugin::SubscribeL() starts" ) + + iObservers.AppendL( &aObserver ); + + TFLOGSTRING( "CAiSatPlugin::SubscribeL() exits" ) + } + +// --------------------------------------------------------------------------- +// CAiSatPlugin::ConfigureL +// +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::ConfigureL( RAiSettingsItemArray& aSettings ) + { + TFLOGSTRING( "CAiSatPlugin::ConfigureL() starts" ) + + TInt count = aSettings.Count(); + TFLOGSTRING2( "CAiSatPlugin::ConfigureL count: %d", count ) + if ( count > 0 ) + { + TInt i( 0 ); + for ( i = 0; i < count; i++ ) + { + MAiPluginSettings* settings = aSettings[i]; + MAiPluginSettingsItem& item = settings->AiPluginSettingsItem(); + item.SetValueL( item.Value(), EFalse ); + } + TFLOGSTRING2( "CAiSatPlugin::ConfigureL i: %d", i ) + } + + TFLOGSTRING( "CAiSatPlugin::ConfigureL() exits" ) + } + +// --------------------------------------------------------------------------- +// CAiSatPlugin::GetProperty +// +// --------------------------------------------------------------------------- +// +TAny* CAiSatPlugin::GetProperty( TProperty aProperty ) + { + TFLOGSTRING( "CAiSatPlugin::GetProperty() starts" ) + + TAny* property( NULL ); + + TFLOGSTRING2( "CAiSatPlugin::GetProperty aProperty: %d", aProperty ) + + if ( aProperty == EPublisherContent ) + { + property = iContent; + } + else if ( aProperty == EPublisherResources ) + { + property = iResources; + } + else if ( aProperty == EPublisherEvents ) + { + property = iEvents; + } + + TFLOGSTRING( "CAiSatPlugin::GetProperty() exits" ) + + return property; + } + +// --------------------------------------------------------- +// This method is called from the engine, when the P&S +// data content has been changed. Method call is made through +// the MPluginAPI interface. +// --------------------------------------------------------- +// +void CAiSatPlugin::NotifyContentUpdate() + { + TFLOGSTRING( "CAiSatPlugin::NotifyContentUpdate() starts" ) + + if ( iEngine ) + { + // Get the idle mode data first. + TRAP_IGNORE( iEngine->PrepareIdleModeDataL( iDupIcon, iDupText ) ); + + // Send response to client side + TRAP_IGNORE( iEngine->HandleNotifyL() ); + + // Publish set up idle mode data + TRAP_IGNORE( PublishSatL() ); + } + + TFLOGSTRING( "CAiSatPlugin::NotifyContentUpdate() exits" ) + } + +// --------------------------------------------------------------------------- +// Default constructor +// --------------------------------------------------------------------------- +// +CAiSatPlugin::CAiSatPlugin() + { + TFLOGSTRING( "CAiSatPlugin::CAiSatPlugin() starts-exits" ) + } + +// --------------------------------------------------------------------------- +// Symbian 2nd phase constructor can leave +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::ConstructL() + { + TFLOGSTRING( "CAiSatPlugin::ConstructL() starts" ) + + iContent = AiUtility::CreateContentItemArrayIteratorL( KSatContent ); + iResources = AiUtility::CreateContentItemArrayIteratorL( KSatResources ); + iEvents = AiUtility::CreateContentItemArrayIteratorL( KSatEvents ); + + iEngine = CAiSatEngine::NewL( *this ); + + TFLOGSTRING( "CAiSatPlugin::ConstructL() exits" ) + } + +// --------------------------------------------------------------------------- +// Update idle area when plug in reload. +// --------------------------------------------------------------------------- +// +void CAiSatPlugin::UpdateSatL() + { + TFLOGSTRING( "CAiSatPlugin::UpdateSatL() starts" ) + iEngine->PrepareIdleModeDataL( iDupIcon, iDupText ); + PublishSatL(); + TFLOGSTRING( "CAiSatPlugin::UpdateSatL() exits" ) + } + +// ============================ GLOBAL FUNCTIONS ============================= + +// --------------------------------------------------------------------------- +// Constructs and returns an application object. +// --------------------------------------------------------------------------- +// +EXPORT_C const TImplementationProxy* ImplementationGroupProxy( + TInt& aTableCount ) + { + TFLOGSTRING( "CAiSatPlugin::ImplementationGroupProxy() starts-exits" ) + aTableCount = + sizeof( KImplementationTable ) / sizeof( TImplementationProxy ); + + return KImplementationTable; + } diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/data/SatPlugin_Stub.SIS Binary file satui/satplugin/data/SatPlugin_Stub.SIS has changed diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/data/aisatplugin.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/data/aisatplugin.rss Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Registry info + * +*/ + + +// INCLUDES +#include +#include +#include "../aisatplugininc/aisatpluginuids.hrh" + +/** + * Ecom interface uid for CAiContentPublisher. + */ + + +// RESOURCE DEFINITIONS +// ----------------------------------------------------------------------------- +// +// registry_info +// Registry information required for identifying the ECOM component +// +// ----------------------------------------------------------------------------- +// + +RESOURCE REGISTRY_INFO registry_info +{ + resource_format_version = RESOURCE_FORMAT_VERSION_2; + + // UID for the DLL + dll_uid = AI_UID_ECOM_DLL_CONTENTPUBLISHER_SATPLUGIN; // SAT plugin UID + + // Declare array of interface info + interfaces = + { + INTERFACE_INFO + { + // UID of interface that is implemented + interface_uid = HS_UID_ECOM_INTERFACE_CONTENTPUBLISHER; + + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN; + version_no = 1; + display_name = ""; + default_data = ""; + opaque_data = ""; + } + }; + } + }; +} + + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/group/SatPlugin_stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/group/SatPlugin_stub.pkg Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,29 @@ +; +; 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: For packing aisatplugin stub. +; +; Languages +&EN + +; Header +#{"aisatplugin"}, (0x102078EA), 1, 0, 0, TYPE=SA + +; Localised Vendor name +%{"Nokia"} + +; Unique Vendor name +:"Nokia" + +; Files +""-"z:\sys\bin\aisatplugin.dll" \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/group/aisatplugin.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/group/aisatplugin.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,66 @@ +/* +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Project definition file for project SatPlugin +* +*/ + + +// USED FOR RESOURCE +#include +#include +#include "../aisatplugininc/aisatpluginuids.hrh" + +TARGET aisatplugin.dll + +TARGETTYPE PLUGIN + +// Nokia's Vendor ID +VENDORID VID_DEFAULT +// Capability assignment +CAPABILITY CAP_ECOM_PLUGIN + +// ECom Dll recognition UID followed by the unique UID for this dll +UID 0x10009D8D AI_UID_ECOM_DLL_CONTENTPUBLISHER_SATPLUGIN + +SOURCEPATH ../aisatpluginsrc +SOURCE caisatplugin.cpp +SOURCE caisatengine.cpp +SOURCE caisatnotifier.cpp + +USERINCLUDE ../aisatplugininc + +APP_LAYER_SYSTEMINCLUDE // Temp fix for Symbian foundation structure change. +SYSTEMINCLUDE ../../../inc // Domain telephony +SYSTEMINCLUDE ../../inc // Subsystem satui + +TARGETPATH ECOM_RESOURCE_DIR + +SOURCEPATH ../data +START RESOURCE aisatplugin.rss +TARGET aisatplugin.rsc +END + +// Symbian OS general +LIBRARY euser.lib +LIBRARY ECom.lib +LIBRARY fbscli.lib +LIBRARY flogger.lib +LIBRARY bitgdi.lib +LIBRARY Gdi.lib +LIBRARY bafl.lib +LIBRARY CentralRepository.lib +LIBRARY CenRepNotifHandler.lib +LIBRARY satclient.lib +LIBRARY aiutils.lib +LIBRARY egul.lib // CGulIcon diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: The build information file of SatPlug-in +* +*/ + + +#include + +PRJ_EXPORTS +../data/SatPlugin_Stub.SIS /epoc32/data/z/system/install/SatPlugin_stub.sis +../rom/aisatplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH( aisatplugin.iby ) + +PRJ_PLATFORMS +DEFAULT + +PRJ_MMPFILES + ./aisatplugin.mmp + +PRJ_TESTMMPFILES + diff -r 7d48bed6ce0c -r 987c9837762f satui/satplugin/rom/aisatplugin.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satui/satplugin/rom/aisatplugin.iby Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,29 @@ +/* +* Copyright (c) 2006 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: IBY file for SAT plug-in +* +*/ + + +#ifndef AISATPLUGIN_IBY +#define AISATPLUGIN_IBY +#include + +ECOM_PLUGIN(aisatplugin.dll, aisatplugin.rsc) + +// SAT Stub SIS +data=ZSYSTEM\install\SatPlugin_stub.sis System\Install\SatPlugin_stub.sis + +#endif // AISATPLUGIN_IBY + diff -r 7d48bed6ce0c -r 987c9837762f satui/satshellcontroller/bwins/SATSHELLCNTRLU.DEF --- a/satui/satshellcontroller/bwins/SATSHELLCNTRLU.DEF Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?NewSatController@@YAPAVMSatShellController@@XZ @ 1 NONAME ; class MSatShellController * __cdecl NewSatController(void) - diff -r 7d48bed6ce0c -r 987c9837762f satui/satshellcontroller/eabi/SatShellCntrlU.DEF --- a/satui/satshellcontroller/eabi/SatShellCntrlU.DEF Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -EXPORTS - _Z16NewSatControllerv @ 1 NONAME - _ZTI19CSatShellController @ 2 NONAME ; ## - _ZTV19CSatShellController @ 3 NONAME ; ## - diff -r 7d48bed6ce0c -r 987c9837762f satui/satshellcontroller/group/bld.inf --- a/satui/satshellcontroller/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2002-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 for project SATUI -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_MMPFILES -./satshellcntrl.mmp - diff -r 7d48bed6ce0c -r 987c9837762f satui/satshellcontroller/group/satshellcntrl.mmp --- a/satui/satshellcontroller/group/satshellcntrl.mmp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2003-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: SatShellCntrl mmp- file -* -*/ - - -#include - -TARGET satshellcntrl.dll -TARGETTYPE dll -UID 0x1000008D 0x1000A835 -SECUREID 0x1000A835 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE csatshellcontroller.cpp - -USERINCLUDE ../inc - -// Application layer system include is needed due MenuSatInterface provided by AppShell -APP_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../../inc // Domain telephony - -LIBRARY euser.lib -LIBRARY apparc.lib // RApaLsSession -LIBRARY apgrfx.lib // CApaCommandLine -LIBRARY ws32.lib // RWsSession -LIBRARY menuinterface.lib -LIBRARY flogger.lib - - diff -r 7d48bed6ce0c -r 987c9837762f satui/satshellcontroller/inc/csatshellcontroller.h --- a/satui/satshellcontroller/inc/csatshellcontroller.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,189 +0,0 @@ -/* -* Copyright (c) 2003-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: -* This file contains the SAT Shell Controller class that is responsible -* for the actual implementation of the following functionality: -* - add SAT UI application to Desk (or similar) -* - remove SAT UI application from Desk (or similar) -* - bring SAT UI application to foreground if it already is up -* and running -* - launching the SAT UI application -* - launching the Browser -* - resolving default access point -* - bring Browser to the foreground -* -* -*/ - - -#ifndef CSATSHELLCONTROLLER_H -#define CSATSHELLCONTROLLER_H - -// INCLUDES -#include -#include - -// CONSTS -const TInt KSatAppNameSize = 255; //Context pane max - -// CLASS DECLARATION - -// DESCRIPTION -// This class is used to control adding, removing and launching of -// the SAT UI Client application. It connects to appropriate module -// and is used by the SAT Server. - -class CSatShellController : public CBase, - public MSatShellController - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CSatShellController* NewL(); - - /** - * Destructor. - */ - virtual ~CSatShellController(); - - public: // New functions - - /** - * Adds SAT UI Client to the Application Shell (or similar). - * @param aName Name of the entry - * @param aUid UID of the SAT UI Application - * @return Nothing - */ - void AddSatUiL( TDesC& aName ); - - /** - * Adds SAT UI Client to the Application Shell (or similar). - * @param aName Name of the entry - * @param aIconId Id for icons - * @return Nothing - */ - void AddSatUiL( TDesC& aName, TUint8 aIconId ); - - /** - * Removes SAT UI Client from the Application Shell (or similar). - * @param aUid UID of the SAT UI Application - * @return Nothing - */ - void RemoveSatUiL(); - - /** - * Launches the SAT UI Client. - * @param aUid UID of the SAT UI Application - * @return Nothing - */ - void LaunchSatUiL(); - - /** - * Brings Browser to foreground after period of time. - * @param Nothing - * @return Nothing - */ - void BringBrowserToForegroundAfterPeriod(); - - /** - * Bring the SAT UI Application to foreground. - * @param Nothing - * @return Nothing - */ - void BringSatUiToForeground(); - - /** - * Sets SAT UI Application to background if needed. - */ - void SetSatUiToBackground() const; - - /** - * Launch XHTML-browser - * @param aUrl URL to be opened when launching browser - * @param aAccessPointUid ID number of access point in CommDb - * @return The result of the operation - */ - TInt LaunchBrowserL( const TDesC& aUrl, TUid aAccessPointUid ); - - /** - * Resolves Browsers default accesspoint, if any available. - * @return Accesspoint identifier. - */ - TInt ResolveDefaultAccesspoint(); - - /** - * This callback function is used to call Browser to the foreground - * after short while. - * @param aObject Pointer to caller is passed to callback function. - * @return Callback function should return TInt. - */ - static TInt TimerCompleted( TAny* aObject ); - - private: - - /** - * C++ default constructor. - */ - CSatShellController(); - - /** - * By default constructor is private. - */ - void ConstructL(); - - /** - * Bring the SAT UI Application to foreground. - * @param aAppUid The UID value of application. - * @return Nothing - */ - void BringApplicationToForeground( const TUid& aAppUid ) const; - - /** - * Brings Browser to foreground. - * @param Nothing - * @return Nothing - */ - void BringBrowserToForeground() const; - - /** - * Checks if Browser is not foreground and starts that if needed. - * @param Nothing - * @return Nothing - */ - void CycleSatUiBackwards(); - - /** - * Check if SatUi is needed to set to background. - * @param Nothing - * @return Nothing - */ - void CheckSatUiStatus(); - - private: // Data - - TBufC iSimAppName; - TUid iUidWmlBrowser; - RWsSession iWsSession; - RApaLsSession iApaLsSession; - // Timer for checking Browser start. - CPeriodic* iTimer; - TBool iSetSatUiToBackground; - - }; - -#endif // CSATSHELLCONTROLLER_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f satui/satshellcontroller/inc/tflogger.h --- a/satui/satshellcontroller/inc/tflogger.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2002-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: Defines logging macroes -* -*/ - - -#ifndef __TFLOGGER_H__ -#define __TFLOGGER_H__ - -#include -#include - -_LIT( KTfLogFolder, "sat" ); -_LIT( KTfLogFile, "sat.txt" ); - -/** -* ------------------------------------------------------------------------------ -* -* Remove #define LOGGING_ENABLED from comments to enable logging -* -* ------------------------------------------------------------------------------ -*/ - -//#define LOGGING_ENABLED - -/** -* ------------------------------------------------------------------------------ -* -* LOGGING MACROs -* -* USE THESE MACROS IN YOUR CODE -* -* Example: TFLOGTEXT( own_desc ) -* Example: TFLOGSTRING( "Test" ) -* Example: TFLOGSTRING( "Test %i", aValue ) -* Example: TFLOGSTRING( "Test %i %i", aValue1, aValue2 ) -* -* ------------------------------------------------------------------------------ -*/ - -#ifdef LOGGING_ENABLED - - #define TFLOGTEXT( TEXT ) \ - { \ - RFileLogger::Write( KTfLogFolder,KTfLogFile, \ - EFileLoggingModeAppend, TEXT ); \ - RDebug::Print( TEXT ); \ - } - - #define TFLOGSTRING( TEXT ) \ - { \ - _LIT( tempLogDes, TEXT ); \ - RFileLogger::Write( \ - KTfLogFolder, \ - KTfLogFile, \ - EFileLoggingModeAppend, \ - tempLogDes() ); \ - RDebug::Print( _L( TEXT ) ); \ - } - - #define TFLOGSTRING2( TEXT, VAR1 ) \ - { \ - _LIT( tempLogDes, TEXT ); \ - RFileLogger::WriteFormat( \ - KTfLogFolder, \ - KTfLogFile, \ - EFileLoggingModeAppend, \ - TRefByValue( tempLogDes() ), VAR1 ); \ - RDebug::Print( _L( TEXT ), VAR1 ); \ - } - - #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) \ - { \ - _LIT( tempLogDes, TEXT ); \ - RFileLogger::WriteFormat( \ - KTfLogFolder, \ - KTfLogFile, \ - EFileLoggingModeAppend, \ - TRefByValue( tempLogDes() ), VAR1, VAR2 ); \ - RDebug::Print( _L( TEXT ), VAR1, VAR2 ); \ - } - -#else - - #define TFLOGTEXT( TEXT ) - #define TFLOGSTRING( TEXT ) - #define TFLOGSTRING2( TEXT, VAR1 ) - #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) - -#endif // LOGGING_ENABLED - -#endif // __TFLOGGER_H__ diff -r 7d48bed6ce0c -r 987c9837762f satui/satshellcontroller/src/csatshellcontroller.cpp --- a/satui/satshellcontroller/src/csatshellcontroller.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,551 +0,0 @@ -/* -* Copyright (c) 2003-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: -* This file contains the SAT Shell Controller class that is responsible -* for the actual implementation of the following functionality: -* - add SAT UI application to Desk (or similar) -* - remove SAT UI application from Desk (or similar) -* - bring SAT UI application to foreground if it already is up -* and running -* - launching the SAT UI application -* - launching the Browser -* - resolving default access point -* - bring Browser to the foreground -* -* -*/ - - -// INCLUDE FILES -#include // RWsSession -#include // TApaAppInfo -#include // CApaCommandLine -#include // RApaLsSession -#include // TApaTaskList -#include // CApaWindowGroupName -#include // CMenuSATInterface -#include // KWmlcHandler -#include "csatshellcontroller.h" - -// Browser Cen Rep Keys. -#ifdef __SERIES60_NATIVE_BROWSER -// #include Commented out to allow sat server boot TB10.1 -// #include -#endif // __SERIES60_NATIVE_BROWSER -#include "tflogger.h" - -// CONSTANTS -const TUid KUidSatUi = { 0x101f4ce0 }; -_LIT( KFour, "4" ); // Browser parameter. -_LIT( KFive, "5" ); // Browser parameter. -_LIT( KSpace, " " ); // Used as Browser parameter. -static const TUid KEmptyUid = { KErrNotFound }; -static const TUid KUidBrowser = { KWmlcHandler }; -const TInt KTimerTime( 2000000 ); // 2 seconds. -const TInt KBrowserParamAndTwoSpaces( 3 ); -#ifndef __SERIES60_NATIVE_BROWSER - const TUid KCRUidBrowser = { 0x10008D39 }; - const TUint32 KBrowserDefaultAccessPoint( 0x0000000E ); -#endif // __SERIES60_NATIVE_BROWSER - -// ================= MEMBER FUNCTIONS ======================================= - -// C++ default constructor can NOT contain any code that -// might leave. -// -CSatShellController::CSatShellController(): - iUidWmlBrowser( TUid::Uid( KWmlcHandler )) - { - TFLOGSTRING( "CSatShellController::CSatShellController called-exit" ) - } - -// Symbian OS constructor -void CSatShellController::ConstructL() - { - TFLOGSTRING( "CSatShellController::ConstructL called" ) - - // Timer is used to get the Browser application to the foreground. - iTimer = CPeriodic::NewL( EPriorityNormal ); - - TFLOGSTRING( "CSatShellController::ConstructL exit" ) - } - -// Two-phased constructor. -CSatShellController* CSatShellController::NewL() - { - TFLOGSTRING( "CSatShellController::NewL called" ) - - CSatShellController* self = new ( ELeave ) CSatShellController; - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - TFLOGSTRING( "CSatShellController::NewL exit" ) - return self; - } - - -// Destructor -CSatShellController::~CSatShellController() - { - TFLOGSTRING( "CSatShellController::~CSatShellController called" ) - - // Frees resources. - if ( iTimer ) - { - iTimer->Cancel(); - } - delete iTimer; - - TFLOGSTRING( "CSatShellController::~CSatShellController exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::AddSatUiL -// Adds SAT UI Client application to phone's -// Application Shell (or similar). -// --------------------------------------------------------- -// -void CSatShellController::AddSatUiL( - TDesC& aName ) - { - TFLOGSTRING( "CSatShellController::AddSatUiL(name) called" ) - - iSimAppName = aName; - - CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface; - menu->MakeSatUiVisible( ETrue, aName ); - delete menu; - - TFLOGSTRING( "CSatShellController::AddSatUiL exit" ) - } - -//------------------------------------------------------------ -// CSatShellController::AddSatUiL -// Adds SAT UI Client application to phone's -// Application Shell (or similar). -// --------------------------------------------------------- -// -void CSatShellController::AddSatUiL( - TDesC& aName, TUint8 aIconId ) - { - TFLOGSTRING( "CSatShellController::AddSatUiL(name,icon) called" ) - - iSimAppName = aName; - - CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface; - menu->MakeSatUiVisible( ETrue, aName, aIconId ); - delete menu; - - TFLOGSTRING( "CSatShellController::AddSatUiL exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::RemoveSatUiL -// Removes SAT UI Client application from phone's -// Application Shell (or similar). -// --------------------------------------------------------- -// - -void CSatShellController::RemoveSatUiL() - { - TFLOGSTRING( "CSatShellController::RemoveSatUiL called" ) - - CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface; - menu->MakeSatUiVisible( EFalse, iSimAppName ); - delete menu; - - TFLOGSTRING( "CSatShellController::RemoveSatUiL exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::LaunchSatUiL -// Launches SAT UI Client application. -// --------------------------------------------------------- -// -void CSatShellController::LaunchSatUiL() - { - TFLOGSTRING( "CSatShellController::LaunchSatUiL called" ) - - RApaLsSession rapaLsSession; - User::LeaveIfError( rapaLsSession.Connect() ); - CleanupClosePushL( rapaLsSession ); - TThreadId id( static_cast( 0 ) ); - TApaAppInfo appInfo; - - User::LeaveIfError( rapaLsSession.GetAppInfo( appInfo, KUidSatUi ) ); - CApaCommandLine* cmdLine = CApaCommandLine::NewLC(); - cmdLine->SetExecutableNameL( appInfo.iFullName ); - cmdLine->SetCommandL( EApaCommandOpen ); - rapaLsSession.StartApp( *cmdLine, id ); - - CleanupStack::PopAndDestroy( cmdLine ); - CleanupStack::PopAndDestroy( &rapaLsSession ); - - TFLOGSTRING( "CSatShellController::LaunchSatUiL exit" ) - } - - -// --------------------------------------------------------- -// CSatShellController::BringBrowserToForeground -// Brings the Browser to foreground. -// --------------------------------------------------------- -// -void CSatShellController::BringBrowserToForeground() const - { - TFLOGSTRING( "CSatShellController::BringBrowserToForeground called" ) - - BringApplicationToForeground( iUidWmlBrowser ); - - TFLOGSTRING( "CSatShellController::BringBrowserToForeground exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::BringBrowserToForegroundAfterPeriod -// Brings the Browser to foreground after time has passed. -// --------------------------------------------------------- -// -void CSatShellController::BringBrowserToForegroundAfterPeriod() - { - TFLOGSTRING( - "CSatShellController::BringBrowserToForegroundAfterPeriod called" ) - - if ( !iTimer->IsActive() ) - { - TFLOGSTRING( - "CSatShellController::BringBrowserToForegroundAfterPeriod \ - start iTimer" ) - iTimer->Start( KTimerTime, - KTimerTime, - TCallBack( TimerCompleted, this ) ); - } - - TFLOGSTRING( - "CSatShellController::BringBrowserToForegroundAfterPeriod exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::BringSatUiToForeground -// Brings the SAT UI application to foreground. -// --------------------------------------------------------- -// -void CSatShellController::BringSatUiToForeground() - { - TFLOGSTRING( "CSatShellController::BringSatUiToForeground called" ) - - CheckSatUiStatus(); - BringApplicationToForeground( KUidSatUi ); - - TFLOGSTRING( "CSatShellController::BringSatUiToForeground exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::BringApplicationToForeground -// Brings the SAT UI application to foreground. -// --------------------------------------------------------- -// -void CSatShellController::BringApplicationToForeground( - const TUid& aAppUid ) const - { - TFLOGSTRING( "CSatShellController::BringApplicationToForeground called" ) - - RWsSession wsSession; - // Open the WS server session. - if ( KErrNone == wsSession.Connect() ) - { - TFLOGSTRING( "CSatShellController::BringApplicationToForeground \ - open WS server session" ) - TApaTaskList tasklist( wsSession ); - // Find the task with uid - TApaTask task = tasklist.FindApp( aAppUid ); - task.BringToForeground(); - wsSession.Close(); - } - - TFLOGSTRING( "CSatShellController::BringApplicationToForeground exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::SetSatUiToBackground -// Sets SAT UI Application to background if needed. -// --------------------------------------------------------- -// -void CSatShellController::SetSatUiToBackground() const - { - TFLOGSTRING( "CSatShellController::SetSatUiToBackground called" ) - - if ( iSetSatUiToBackground ) - { - RWsSession wsSession; - // Open the WS server session. - if ( KErrNone == wsSession.Connect() ) - { - TFLOGSTRING( "CSatShellController::SetSatUiToBackground \ - open WS server session" ) - TApaTaskList tasklist( wsSession ); - // Find the task with uid - TApaTask task = tasklist.FindApp( KUidSatUi ); - task.SendToBackground(); - wsSession.Close(); - } - } - - TFLOGSTRING( "CSatShellController::SetSatUiToBackground exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::CycleSatUiBackwards -// Brings the SAT UI application to foreground. -// --------------------------------------------------------- -// -void CSatShellController::CycleSatUiBackwards() - { - TFLOGSTRING( "CSatShellController::BringSatUiToForeground called" ) - - RWsSession wsSession; - // Open the WS server session. - if ( KErrNone == wsSession.Connect() ) - { - TFLOGSTRING( "CSatShellController::CycleSatUiBackwards \ - open WS server session" ) - TApaTaskList taskList( wsSession ); - // Finds topmost application. - TApaTask task = taskList.FindByPos(0); - iTimer->Cancel(); - - CApaWindowGroupName* name = 0; - TRAPD( err, - name = CApaWindowGroupName::NewL( wsSession, task.WgId() ) ); - - if ( name ) - { - // Check is that Browser is foremost application. - if ( !err && ( name->AppUid() == KUidBrowser ) ) - { - TFLOGSTRING( - "CSatShellController::BSUTF Browser is in foreground" ) - } - else - { - TFLOGSTRING( - "CSatShellController::BSUTF Browser isn't in foreground" ) - TApaTask browserTask = taskList.FindApp( KUidBrowser ); - browserTask.BringToForeground(); - iTimer->Start( - KTimerTime, KTimerTime, TCallBack( TimerCompleted, this ) ); - } - - delete name; - } - - wsSession.Close(); - } - - TFLOGSTRING( "CSatShellController::BringSatUiToForeground exit" ) - } - -// --------------------------------------------------------- -// CSatShellController::TimerCompleted -// Callback function. Completes after predefined -// time has passed -// --------------------------------------------------------- -// -TInt CSatShellController::TimerCompleted( TAny* aObject ) - { - TFLOGSTRING( "CSatShellController::TimerCompleted called" ) - - if ( aObject ) - { - STATIC_CAST( CSatShellController*, aObject )->CycleSatUiBackwards(); - } - - TFLOGSTRING( "CSatShellController::TimerCompleted exit" ) - return KErrNone; - } - -// --------------------------------------------------------- -// CSatShellController::LaunchBrowserL -// Launch XHTML-browser -// Browser launched with parameter -// "4" + "" + "" + "" + "" or "5" -// More information see Browser API Specification Document -// --------------------------------------------------------- -// -TInt CSatShellController::LaunchBrowserL( const TDesC& aUrl, - TUid aAccessPointUid ) - { - TFLOGSTRING( "CSatShellController::LaunchBrowserL called" ) - - TInt errorCode( KErrNone ); - HBufC* param = HBufC::NewLC( aUrl.Length() + KMaxUidName + - KBrowserParamAndTwoSpaces ); - - TFLOGSTRING2( "CSatShellController::LaunchBrowserL length of aUrl: %d", \ - aUrl.Length() ) - if ( aUrl.Length() > 0 ) - { - param->Des().Copy( KFour ); - param->Des().Append( KSpace ); - param->Des().Append( aUrl ); - TFLOGSTRING2( "CSatShellController::LaunchBrowserL \ - aAccessPointUid: %d", aAccessPointUid ) - // Create script for Browser if not empty accesspoint UID. - if ( aAccessPointUid != KEmptyUid ) - { - TFLOGSTRING( "CSatShellController::LaunchBrowserL not empty \ - accesspoint" ) - // Uid is in decimal format - param->Des().Append( KSpace ); - param->Des().AppendNum( aAccessPointUid.iUid ); - } - - } - else - { - param->Des().Copy( KFive ); - } - - User::LeaveIfError( iWsSession.Connect() ); - - TFLOGSTRING2( "CSatShellController::LaunchBrowserL \ - param string: %S", param ) - TApaTaskList taskList( iWsSession ); - TApaTask task = taskList.FindApp( iUidWmlBrowser ); - - // If browser already open. - if ( task.Exists() ) - { - TFLOGSTRING( "CSatShellController::LaunchBrowserL browser open" ) - HBufC8* param8 = HBufC8::NewLC( param->Length() ); - param8->Des().Append( *param ); - errorCode = task.SendMessage( TUid::Uid( 0 ), param8->Des() ); - CleanupStack::PopAndDestroy( param8 ); - } - else - { - TFLOGSTRING( "CSatShellController::LaunchBrowserL launch browser" ) - // Launch the Browser. - TThreadId id( static_cast( 0 ) ); - RApaLsSession rapaLsSession; - User::LeaveIfError( rapaLsSession.Connect() ); - errorCode = rapaLsSession.StartDocument( *param, iUidWmlBrowser, id ); - rapaLsSession.Close(); - } - - BringBrowserToForeground(); - - iWsSession.Close(); - CleanupStack::PopAndDestroy( param ); - - TFLOGSTRING2( "CSatShellController::LaunchBrowserL exit %d", errorCode ) - return errorCode; - } - -// ----------------------------------------------------------------------------- -// CSatShellController::ResolveDefaultAccesspoint -// Resolves Browser's default accesspoint. -// ----------------------------------------------------------------------------- -// -TInt CSatShellController::ResolveDefaultAccesspoint() - { - TFLOGSTRING( "CSatShellController::ResolveDefaultAccesspoint called" ) - - // Initialize with error value for wrong access point. - TInt apInt( KErrNotFound ); -/* Commented out to enable SAT Server boot, -add TB10.1 implementation later - - TInt err( KErrNone ); - CRepository* repository = NULL; - - // Which UID to monitor. - TRAP( err, repository = CRepository::NewL( KCRUidBrowser ) ); - - if ( ( KErrNone == err ) && repository ) - { - err = repository->StartTransaction( - CRepository::EReadWriteTransaction ); - err = repository->Get( KBrowserDefaultAccessPoint, apInt ); - TFLOGSTRING2( "CSatShellController::ResolveDefaultAccesspoint \ - KBrowserDefaultAccessPoint: %d", apInt ) - } - - delete repository; - repository = NULL; -*/ - TFLOGSTRING( "CSatShellController::ResolveDefaultAccesspoint exit" ) - return apInt; - } - -// ----------------------------------------------------------------------------- -// CSatShellController::CheckSatUiStatus -// Check if SatUi is needed to set to background. -// ----------------------------------------------------------------------------- -// -void CSatShellController::CheckSatUiStatus() - { - TFLOGSTRING( "CSatShellController::CheckSatUiStatus called" ) - - // if SatUi task is found and SatUi is not in foreground flag is set ETrue - iSetSatUiToBackground = EFalse; - - RWsSession wsSession; - // Open the WS server session. - if ( KErrNone == wsSession.Connect() ) - { - TFLOGSTRING( "CSatShellController::CheckSatUiStatus \ - open WS server session" ) - TApaTaskList tasklist( wsSession ); - TApaTask satUiTask = tasklist.FindApp( KUidSatUi ); - - if ( satUiTask.Exists() ) - { - TFLOGSTRING( - "CSatShellController::CheckSatUiStatus task exists" ) - TApaTask topMostTask = tasklist.FindByPos( 0 ); - - if ( topMostTask.ThreadId() != satUiTask.ThreadId() ) - { - TFLOGSTRING( - "CSatShellController::CheckSatUiStatus set SatUI to BG" ) - iSetSatUiToBackground = ETrue; - } - } - - wsSession.Close(); - } - - TFLOGSTRING( "CSatShellController::CheckSatUiStatus exit" ) - } - -// ================= OTHER EXPORTED FUNCTIONS =============================== - -EXPORT_C MSatShellController* NewSatController() - { - TFLOGSTRING( "CSatShellController::NewSatController called" ) - - MSatShellController* satController = NULL; - TRAPD( err, satController = CSatShellController::NewL() ) - if ( KErrNone != err ) - { - TFLOGSTRING2( " CSatShellController::NewSatController \ - failed: %d", err ) - satController = NULL; - } - - TFLOGSTRING( "CSatShellController::NewSatController exit" ) - return satController; - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f sysdef_1_4_0.dtd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysdef_1_4_0.dtd Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 7d48bed6ce0c -r 987c9837762f sysdef_1_5_1.dtd --- a/sysdef_1_5_1.dtd Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/bwins/dialpadu.def --- a/telutils/dialpad/bwins/dialpadu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -EXPORTS - ??1DialpadVtKeyHandler@@UAE@XZ @ 1 NONAME ; DialpadVtKeyHandler::~DialpadVtKeyHandler(void) - ?initialize@Dialpad@@AAEXXZ @ 2 NONAME ; void Dialpad::initialize(void) - ?metaObject@DialpadVtKeyHandler@@UBEPBUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const * DialpadVtKeyHandler::metaObject(void) const - ?closeEvent@Dialpad@@MAEXPAVQCloseEvent@@@Z @ 4 NONAME ; void Dialpad::closeEvent(class QCloseEvent *) - ?trUtf8@DialpadKeyHandler@@SA?AVQString@@PBD0H@Z @ 5 NONAME ; class QString DialpadKeyHandler::trUtf8(char const *, char const *, int) - ?openAnimValueChanged@Dialpad@@IAEXM@Z @ 6 NONAME ; void Dialpad::openAnimValueChanged(float) - ?getStaticMetaObject@DialpadKeyHandler@@SAABUQMetaObject@@XZ @ 7 NONAME ; struct QMetaObject const & DialpadKeyHandler::getStaticMetaObject(void) - ?showEvent@Dialpad@@MAEXPAVQShowEvent@@@Z @ 8 NONAME ; void Dialpad::showEvent(class QShowEvent *) - ?tr@DialpadVtKeyHandler@@SA?AVQString@@PBD0H@Z @ 9 NONAME ; class QString DialpadVtKeyHandler::tr(char const *, char const *, int) - ?metaObject@Dialpad@@UBEPBUQMetaObject@@XZ @ 10 NONAME ; struct QMetaObject const * Dialpad::metaObject(void) const - ??0DialpadVtKeyHandler@@QAE@PAVDialpad@@AAVHbMainWindow@@PAVQObject@@@Z @ 11 NONAME ; DialpadVtKeyHandler::DialpadVtKeyHandler(class Dialpad *, class HbMainWindow &, class QObject *) - ?trUtf8@DialpadVtKeyHandler@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString DialpadVtKeyHandler::trUtf8(char const *, char const *, int) - ?staticMetaObject@Dialpad@@2UQMetaObject@@B @ 13 NONAME ; struct QMetaObject const Dialpad::staticMetaObject - ?trUtf8@DialpadVtKeyHandler@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString DialpadVtKeyHandler::trUtf8(char const *, char const *) - ?staticMetaObject@DialpadVtKeyHandler@@2UQMetaObject@@B @ 15 NONAME ; struct QMetaObject const DialpadVtKeyHandler::staticMetaObject - ??1Dialpad@@UAE@XZ @ 16 NONAME ; Dialpad::~Dialpad(void) - ?setTapOutsideDismiss@Dialpad@@QAEX_N@Z @ 17 NONAME ; void Dialpad::setTapOutsideDismiss(bool) - ?getStaticMetaObject@Dialpad@@SAABUQMetaObject@@XZ @ 18 NONAME ; struct QMetaObject const & Dialpad::getStaticMetaObject(void) - ?trUtf8@DialpadKeyHandler@@SA?AVQString@@PBD0@Z @ 19 NONAME ; class QString DialpadKeyHandler::trUtf8(char const *, char const *) - ?qt_metacall@DialpadVtKeyHandler@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int DialpadVtKeyHandler::qt_metacall(enum QMetaObject::Call, int, void * *) - ?gestureEvent@Dialpad@@MAEXPAVQGestureEvent@@@Z @ 21 NONAME ; void Dialpad::gestureEvent(class QGestureEvent *) - ?paint@Dialpad@@MAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 22 NONAME ; void Dialpad::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *) - ?layoutBackgroundItem@Dialpad@@AAEXXZ @ 23 NONAME ; void Dialpad::layoutBackgroundItem(void) - ?updateLayout@Dialpad@@AAEXW4Orientation@Qt@@@Z @ 24 NONAME ; void Dialpad::updateLayout(enum Qt::Orientation) - ?openAnimFinished@Dialpad@@IAEXXZ @ 25 NONAME ; void Dialpad::openAnimFinished(void) - ?getStaticMetaObject@DialpadVtKeyHandler@@SAABUQMetaObject@@XZ @ 26 NONAME ; struct QMetaObject const & DialpadVtKeyHandler::getStaticMetaObject(void) - ?setCallButtonEnabled@Dialpad@@QAEX_N@Z @ 27 NONAME ; void Dialpad::setCallButtonEnabled(bool) - ?startCloseAnimation@Dialpad@@AAEXXZ @ 28 NONAME ; void Dialpad::startCloseAnimation(void) - ?closeDialpad@Dialpad@@QAEXXZ @ 29 NONAME ; void Dialpad::closeDialpad(void) - ?aboutToClose@Dialpad@@IAEXXZ @ 30 NONAME ; void Dialpad::aboutToClose(void) - ?qt_metacast@DialpadKeyHandler@@UAEPAXPBD@Z @ 31 NONAME ; void * DialpadKeyHandler::qt_metacast(char const *) - ??_EDialpadVtKeyHandler@@UAE@I@Z @ 32 NONAME ; DialpadVtKeyHandler::~DialpadVtKeyHandler(unsigned int) - ??0Dialpad@@QAE@ABVHbMainWindow@@@Z @ 33 NONAME ; Dialpad::Dialpad(class HbMainWindow const &) - ?isOpen@Dialpad@@QBE_NXZ @ 34 NONAME ; bool Dialpad::isOpen(void) const - ?trUtf8@Dialpad@@SA?AVQString@@PBD0H@Z @ 35 NONAME ; class QString Dialpad::trUtf8(char const *, char const *, int) - ?closeAnimValueChanged@Dialpad@@IAEXM@Z @ 36 NONAME ; void Dialpad::closeAnimValueChanged(float) - ?qt_metacast@Dialpad@@UAEPAXPBD@Z @ 37 NONAME ; void * Dialpad::qt_metacast(char const *) - ?tr@DialpadKeyHandler@@SA?AVQString@@PBD0@Z @ 38 NONAME ; class QString DialpadKeyHandler::tr(char const *, char const *) - ??0Dialpad@@QAE@XZ @ 39 NONAME ; Dialpad::Dialpad(void) - ?openDialpad@Dialpad@@QAEXXZ @ 40 NONAME ; void Dialpad::openDialpad(void) - ?staticMetaObject@DialpadKeyHandler@@2UQMetaObject@@B @ 41 NONAME ; struct QMetaObject const DialpadKeyHandler::staticMetaObject - ?aboutToOpen@Dialpad@@IAEXXZ @ 42 NONAME ; void Dialpad::aboutToOpen(void) - ??1DialpadKeyHandler@@UAE@XZ @ 43 NONAME ; DialpadKeyHandler::~DialpadKeyHandler(void) - ?orientationChangeFinished@Dialpad@@IAEXW4Orientation@Qt@@@Z @ 44 NONAME ; void Dialpad::orientationChangeFinished(enum Qt::Orientation) - ?qt_metacall@DialpadKeyHandler@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 45 NONAME ; int DialpadKeyHandler::qt_metacall(enum QMetaObject::Call, int, void * *) - ?hideEvent@Dialpad@@MAEXPAVQHideEvent@@@Z @ 46 NONAME ; void Dialpad::hideEvent(class QHideEvent *) - ?tr@Dialpad@@SA?AVQString@@PBD0@Z @ 47 NONAME ; class QString Dialpad::tr(char const *, char const *) - ?qt_metacast@DialpadVtKeyHandler@@UAEPAXPBD@Z @ 48 NONAME ; void * DialpadVtKeyHandler::qt_metacast(char const *) - ?orientationChangeStarted@Dialpad@@IAEXXZ @ 49 NONAME ; void Dialpad::orientationChangeStarted(void) - ?trUtf8@Dialpad@@SA?AVQString@@PBD0@Z @ 50 NONAME ; class QString Dialpad::trUtf8(char const *, char const *) - ?tr@DialpadKeyHandler@@SA?AVQString@@PBD0H@Z @ 51 NONAME ; class QString DialpadKeyHandler::tr(char const *, char const *, int) - ?qt_metacall@Dialpad@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 52 NONAME ; int Dialpad::qt_metacall(enum QMetaObject::Call, int, void * *) - ?tr@DialpadVtKeyHandler@@SA?AVQString@@PBD0@Z @ 53 NONAME ; class QString DialpadVtKeyHandler::tr(char const *, char const *) - ?tr@Dialpad@@SA?AVQString@@PBD0H@Z @ 54 NONAME ; class QString Dialpad::tr(char const *, char const *, int) - ??_EDialpadKeyHandler@@UAE@I@Z @ 55 NONAME ; DialpadKeyHandler::~DialpadKeyHandler(unsigned int) - ??0DialpadKeyHandler@@QAE@PAVDialpad@@V?$QFlags@W4DialpadKeyEventFilter@DialpadKeyHandler@@@@PAVQObject@@@Z @ 56 NONAME ; DialpadKeyHandler::DialpadKeyHandler(class Dialpad *, class QFlags, class QObject *) - ??_EDialpad@@UAE@I@Z @ 57 NONAME ; Dialpad::~Dialpad(unsigned int) - ?editor@Dialpad@@QBEAAVHbLineEdit@@XZ @ 58 NONAME ; class HbLineEdit & Dialpad::editor(void) const - ?closeAnimFinished@Dialpad@@IAEXXZ @ 59 NONAME ; void Dialpad::closeAnimFinished(void) - ?metaObject@DialpadKeyHandler@@UBEPBUQMetaObject@@XZ @ 60 NONAME ; struct QMetaObject const * DialpadKeyHandler::metaObject(void) const - ??0DialpadKeyHandler@@QAE@PAVDialpad@@AAVHbMainWindow@@PAVQObject@@@Z @ 61 NONAME ; DialpadKeyHandler::DialpadKeyHandler(class Dialpad *, class HbMainWindow &, class QObject *) - ?isCallButtonEnabled@Dialpad@@QBE_NXZ @ 62 NONAME ; bool Dialpad::isCallButtonEnabled(void) const - ?changeEvent@Dialpad@@MAEXPAVQEvent@@@Z @ 63 NONAME ; void Dialpad::changeEvent(class QEvent *) - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/dialpad.pro --- a/telutils/dialpad/dialpad.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = lib -TARGET = dialpad -CONFIG += hb -HB += hbinput - -INCLUDEPATH += . inc ../../inc - -HEADERS += ../../phonesrv_plat/dialpad_api/inc/dialpad.h \ - ../../phonesrv_plat/dialpad_api/inc/dialpadkeyhandler.h \ - ../../phonesrv_plat/dialpad_api/inc/dialpadvtkeyhandler.h \ - inc/dialpadbutton.h \ - inc/dialpadinputfield.h \ - inc/dialpadkeypad.h \ - inc/dialpadmultitaphandler.h\ - inc/dialpadsymbianwrapper.h \ - inc/dialpadbackground.h \ - inc/dialpadvoicemailboxeventfilter.h \ - inc/dialpadbluetootheventfilter.h \ - inc/dialpadkeysequenceeventfilter.h \ - inc/dialpadvideomailboxeventfilter.h \ - inc/dialpadmailboxeventfilterbase.h \ - inc/dialpademergencycalleventfilter.h \ - inc/dialpadhasheventfilter.h \ - inc/dialpadnumericbutton.h - -SOURCES += src/dialpad.cpp \ - src/dialpadbutton.cpp \ - src/dialpadinputfield.cpp \ - src/dialpadkeypad.cpp \ - src/dialpadmultitaphandler.cpp\ - src/dialpadkeyhandler.cpp \ - src/dialpadsymbianwrapper.cpp \ - src/dialpadbackground.cpp \ - src/dialpadvoicemailboxeventfilter.cpp \ - src/dialpadbluetootheventfilter.cpp \ - src/dialpadkeysequenceeventfilter.cpp \ - src/dialpadvideomailboxeventfilter.cpp \ - src/dialpadmailboxeventfilterbase.cpp \ - src/dialpademergencycalleventfilter.cpp \ - src/dialpadvtkeyhandler.cpp \ - src/dialpadhasheventfilter.cpp \ - src/dialpadnumericbutton.cpp - -RESOURCES += dialpad.qrc - -symbian { - TARGET.EPOCALLOWDLLDATA = 1 - TARGET.CAPABILITY = ALL -TCB - TARGET.UID3 = 0x102078ED - - defFiles = \ - "$${LITERAL_HASH}ifdef WINS" \ - "DEFFILE bwins/dialpad.def" \ - "$${LITERAL_HASH}else" \ - "DEFFILE eabi/dialpad.def" \ - "$${LITERAL_HASH}endif" - - MMP_RULES += defFiles - - HEADERS += inc/dialpadsymbianwrapper_p.h - SOURCES += src/dialpadsymbianwrapper_p.cpp - - BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "./rom/dialpad.iby CORE_MW_LAYER_IBY_EXPORT_PATH(dialpad.iby)" - - LIBS += -lxqservice \ - -lxqserviceutil \ - -lvmbxengine \ - -lfeatmgr \ - -lphoneclient \ - -lcentralrepository \ - -lxqsettingsmanager -} -else:win32 { - HEADERS += inc/dialpadsymbianwrapper_p_stub.h - SOURCES += src/dialpadsymbianwrapper_p_stub.cpp - - # Put it to Hb/lib because it is in path - DESTDIR = c:/hb/lib - DLLDESTDIR = c:/hb/bin - INCLUDEPATH += ../../phonesrv_plat/dialpad_api/inc \ - c:/hb/include/hbcore \ - c:/hb/include/hbwidgets \ - c:/hb/include/hbtools \ - c:/hb/include/hbinput - INCLUDEPATH += ../xqtelephonyservice/inc -} - -DEFINES += BUILD_DIALPAD \ - BUILD_DIALPADKEYHANDLER diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/dialpad.qrc --- a/telutils/dialpad/dialpad.qrc Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - resources/dialpad.css - resources/dialpad_color.css - resources/dialpad_to_prt.fxml - resources/dialpad_to_lsc.fxml - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/eabi/dialpadu.def --- a/telutils/dialpad/eabi/dialpadu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -EXPORTS - _ZN17DialpadKeyHandler11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME - _ZN17DialpadKeyHandler11qt_metacastEPKc @ 2 NONAME - _ZN17DialpadKeyHandler16staticMetaObjectE @ 3 NONAME DATA 16 - _ZN17DialpadKeyHandler19getStaticMetaObjectEv @ 4 NONAME - _ZN17DialpadKeyHandlerC1EP7Dialpad6QFlagsINS_21DialpadKeyEventFilterEEP7QObject @ 5 NONAME - _ZN17DialpadKeyHandlerC1EP7DialpadR12HbMainWindowP7QObject @ 6 NONAME - _ZN17DialpadKeyHandlerC2EP7Dialpad6QFlagsINS_21DialpadKeyEventFilterEEP7QObject @ 7 NONAME - _ZN17DialpadKeyHandlerC2EP7DialpadR12HbMainWindowP7QObject @ 8 NONAME - _ZN17DialpadKeyHandlerD0Ev @ 9 NONAME - _ZN17DialpadKeyHandlerD1Ev @ 10 NONAME - _ZN17DialpadKeyHandlerD2Ev @ 11 NONAME - _ZN19DialpadVtKeyHandler11qt_metacallEN11QMetaObject4CallEiPPv @ 12 NONAME - _ZN19DialpadVtKeyHandler11qt_metacastEPKc @ 13 NONAME - _ZN19DialpadVtKeyHandler16staticMetaObjectE @ 14 NONAME DATA 16 - _ZN19DialpadVtKeyHandler19getStaticMetaObjectEv @ 15 NONAME - _ZN19DialpadVtKeyHandlerC1EP7DialpadR12HbMainWindowP7QObject @ 16 NONAME - _ZN19DialpadVtKeyHandlerC2EP7DialpadR12HbMainWindowP7QObject @ 17 NONAME - _ZN19DialpadVtKeyHandlerD0Ev @ 18 NONAME - _ZN19DialpadVtKeyHandlerD1Ev @ 19 NONAME - _ZN19DialpadVtKeyHandlerD2Ev @ 20 NONAME - _ZN7Dialpad10closeEventEP11QCloseEvent @ 21 NONAME - _ZN7Dialpad10initializeEv @ 22 NONAME - _ZN7Dialpad11aboutToOpenEv @ 23 NONAME - _ZN7Dialpad11openDialpadEv @ 24 NONAME - _ZN7Dialpad11qt_metacallEN11QMetaObject4CallEiPPv @ 25 NONAME - _ZN7Dialpad11qt_metacastEPKc @ 26 NONAME - _ZN7Dialpad12aboutToCloseEv @ 27 NONAME - _ZN7Dialpad12closeDialpadEv @ 28 NONAME - _ZN7Dialpad12gestureEventEP13QGestureEvent @ 29 NONAME - _ZN7Dialpad12updateLayoutEN2Qt11OrientationE @ 30 NONAME - _ZN7Dialpad16openAnimFinishedEv @ 31 NONAME - _ZN7Dialpad16staticMetaObjectE @ 32 NONAME DATA 16 - _ZN7Dialpad17closeAnimFinishedEv @ 33 NONAME - _ZN7Dialpad19getStaticMetaObjectEv @ 34 NONAME - _ZN7Dialpad19startCloseAnimationEv @ 35 NONAME - _ZN7Dialpad20layoutBackgroundItemEv @ 36 NONAME - _ZN7Dialpad20openAnimValueChangedEf @ 37 NONAME - _ZN7Dialpad20setCallButtonEnabledEb @ 38 NONAME - _ZN7Dialpad20setTapOutsideDismissEb @ 39 NONAME - _ZN7Dialpad21closeAnimValueChangedEf @ 40 NONAME - _ZN7Dialpad24orientationChangeStartedEv @ 41 NONAME - _ZN7Dialpad25orientationChangeFinishedEN2Qt11OrientationE @ 42 NONAME - _ZN7Dialpad5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 43 NONAME - _ZN7Dialpad9hideEventEP10QHideEvent @ 44 NONAME - _ZN7Dialpad9showEventEP10QShowEvent @ 45 NONAME - _ZN7DialpadC1ERK12HbMainWindow @ 46 NONAME - _ZN7DialpadC1Ev @ 47 NONAME - _ZN7DialpadC2ERK12HbMainWindow @ 48 NONAME - _ZN7DialpadC2Ev @ 49 NONAME - _ZN7DialpadD0Ev @ 50 NONAME - _ZN7DialpadD1Ev @ 51 NONAME - _ZN7DialpadD2Ev @ 52 NONAME - _ZNK17DialpadKeyHandler10metaObjectEv @ 53 NONAME - _ZNK19DialpadVtKeyHandler10metaObjectEv @ 54 NONAME - _ZNK7Dialpad10metaObjectEv @ 55 NONAME - _ZNK7Dialpad6editorEv @ 56 NONAME - _ZNK7Dialpad6isOpenEv @ 57 NONAME - _ZTI17DialpadKeyHandler @ 58 NONAME - _ZTI19DialpadVtKeyHandler @ 59 NONAME - _ZTI7Dialpad @ 60 NONAME - _ZTV17DialpadKeyHandler @ 61 NONAME - _ZTV19DialpadVtKeyHandler @ 62 NONAME - _ZTV7Dialpad @ 63 NONAME - _ZThn16_N7DialpadD0Ev @ 64 NONAME - _ZThn16_N7DialpadD1Ev @ 65 NONAME - _ZThn8_N7Dialpad5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 66 NONAME - _ZThn8_N7DialpadD0Ev @ 67 NONAME - _ZThn8_N7DialpadD1Ev @ 68 NONAME - _ZNK7Dialpad19isCallButtonEnabledEv @ 69 NONAME - _ZN7Dialpad11changeEventEP6QEvent @ 70 NONAME - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadbackground.h --- a/telutils/dialpad/inc/dialpadbackground.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/*! -* 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: Background item to close dialpad when tapping outside. -* -*/ - -#ifndef DIALPADBACKGROUND_H -#define DIALPADBACKGROUND_H - -#include "qgraphicsitem.h" - -class Dialpad; - -class DialpadBackground : public QGraphicsItem -{ -public: - DialpadBackground(Dialpad& dialpad); - virtual ~DialpadBackground(); - - void setRect(QRectF rect); - QRectF boundingRect() const; - -protected: - void paint( - QPainter *painter, - const QStyleOptionGraphicsItem *option, - QWidget *widget = 0); - void mousePressEvent(QGraphicsSceneMouseEvent * event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent * event); - -private: - Dialpad& mDialpad; - QRectF mRect; - bool mPressed; -}; - -#endif // DIALPADBACKGROUND_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadbluetootheventfilter.h --- a/telutils/dialpad/inc/dialpadbluetootheventfilter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADBLUETOOTHEVENTFILTER_H -#define DIALPADBLUETOOTHEVENTFILTER_H - -#include - -class QTimer; -class Dialpad; - -/*! - DialpadBluetoothEventFilter - Class provides bluetooth on/off key handling. -*/ -class DialpadBluetoothEventFilter : public QObject -{ - Q_OBJECT - -public: - explicit DialpadBluetoothEventFilter(Dialpad* dialpad, QObject* parent = 0); - virtual ~DialpadBluetoothEventFilter(); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - -private slots: - /*! - \fn void toggleBluetooth() - - Toggles bluetooth on or off. - */ - void toggleBluetooth(); - - -private: - QTimer *mLongPressTimer; - Dialpad* mDialpad; -}; - -#endif // DIALPADBLUETOOTHEVENTFILTER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadbutton.h --- a/telutils/dialpad/inc/dialpadbutton.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +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: Custom button -* -*/ - -#ifndef DIALPADBUTTON_H -#define DIALPADBUTTON_H - -#include "hbpushbutton.h" - -class DialpadButton : public HbPushButton -{ - Q_OBJECT - - Q_PROPERTY(DialpadButtonType buttonType READ buttonType WRITE setButtonType) - Q_ENUMS(DialpadButtonType) - -public: - enum DialpadButtonType { - FunctionButton = 0x1, // Backspace - CallButton = 0x2 // Dial button - }; - -public: - explicit DialpadButton(QGraphicsItem *parent = 0 ); - virtual ~DialpadButton( ); - - DialpadButtonType buttonType() const; - void setButtonType(DialpadButtonType type); - -protected: - bool sceneEvent(QEvent *event); - void polish(HbStyleParameters& params); - - void updatePrimitives(); - -private: - DialpadButtonType mButtonType; -}; - -#endif // DIALPADBUTTON_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpademergencycalleventfilter.h --- a/telutils/dialpad/inc/dialpademergencycalleventfilter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADEMERGENCYCALLEVENTFILTER_H -#define DIALPADEMERGENCYCALLEVENTFILTER_H - -#include - -class Dialpad; -class CPhCltEmergencyCall; - -/*! - DialpadEmergencyCallEventFilter - Class provides emergency call key handling. -*/ -class DialpadEmergencyCallEventFilter : public QObject -{ - Q_OBJECT - -public: - explicit DialpadEmergencyCallEventFilter(Dialpad* dialpad, QObject* parent = 0); - virtual ~DialpadEmergencyCallEventFilter(); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - -private: - - /*! - \fn void isEmergencyNumber() - - Checks is string emergency number. - */ - bool isEmergencyNumber(QString string); - - /*! - \fn void editorText() - - Returns text from editor (in western digits). - */ - QString editorText(); - - /*! - \fn createCall(const QString phoneNumber) - - Creates call request to QT Highway. - */ - void createCall(const QString &phoneNumber); - -protected slots: - - /*! - \fn void editorTextChanged() - - This slot is called when dialpad editor text is changed. - */ - void editorTextChanged(); - -private: - Dialpad* mDialpad; - CPhCltEmergencyCall* mEmergency; -}; - -#endif // DIALPADEMERGENCYCALLEVENTFILTER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadhasheventfilter.h --- a/telutils/dialpad/inc/dialpadhasheventfilter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADHASHEVENTFILTER_H -#define DIALPADHASHEVENTFILTER_H - -#include "dialpadmailboxeventfilterbase.h" - -class QTimer; -class Dialpad; -class DialpadSymbianWrapper; - -/*! - DialpadHashEventFilter - Class provides hash key handling. -*/ -class DialpadHashEventFilter : public DialpadMailboxEventFilterBase -{ - Q_OBJECT - - friend class UT_DialpadHashEventFilter; - -public: - explicit DialpadHashEventFilter(Dialpad* dialpad, QObject* parent = 0); - virtual ~DialpadHashEventFilter(); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - - /*! - \fn bool handleCallButtonPress() - - Check if editor has number string and if it does then createCall - is called and funtion returns true, if there is no number then - funtion return false. - */ - bool handleCallButtonPress(); - - /*! - \fn handleMailboxOperation - - Start vmbx call or number definition procedures. - */ - void handleMailboxOperation(); - -protected slots: - - /*! - \fn void handleLongKeyPress() - - Handles long key presses. - */ - void handleLongKeyPress(); -}; - -#endif // DIALPADHASHEVENTFILTER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadinputfield.h --- a/telutils/dialpad/inc/dialpadinputfield.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +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: Input field -* -*/ - -#ifndef DIALPADINPUTFIELD_H -#define DIALPADINPUTFIELD_H - -#include - -class HbLineEdit; -class DialpadButtonStyle; -class DialpadButton; - -class DialpadInputField : public HbWidget -{ - Q_OBJECT - -public: - DialpadInputField(QGraphicsItem* parent=0); - ~DialpadInputField(); - - HbLineEdit& editor() const; - - DialpadButton& backspaceButton() const; - -protected: - QSizeF sizeHint(Qt::SizeHint which, - const QSizeF & constraint = QSizeF()) const; - -private slots: - void onEditorContentChanged(); - -private: - HbLineEdit* mNumberEditor; - DialpadButton* mBackspace; - int mHeight; -}; - -#endif // DIALPADINPUTFIELD_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadkeypad.h --- a/telutils/dialpad/inc/dialpadkeypad.h Tue Aug 31 15:45:17 2010 +0300 +++ /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: Dialpad keypad -* -*/ - -#ifndef DIALPADKEYPAD_H -#define DIALPADKEYPAD_H - -#include -#include -#include - -class DialpadInputField; -class DialpadButton; -class DialpadNumericButton; -class QSignalMapper; -class QGraphicsGridLayout; - -class DialpadKeypad : public HbInputButtonGroup -{ - Q_OBJECT - -public: - explicit DialpadKeypad( - const HbMainWindow& mainWindow, - DialpadInputField& inputField, - QGraphicsItem* parent=0); - - ~DialpadKeypad(); - -public: - void setCallButtonEnabled(bool enabled); - - void resetButtons(); - - DialpadButton& callButton() const; - -protected slots: - void setButtonTexts(); - - void handleKeyClicked(int key); - void sendKeyPressEvent(const QKeyEvent& event); - void sendKeyReleaseEvent(const QKeyEvent& event); - void sendLongPressEvent(const QKeyEvent& event); - void handleKeyChangeEvent(const QKeyEvent& releaseEvent, - const QKeyEvent& pressEvent); - void cancelButtonPress(); - -protected: - void postKeyEvent(QEvent::Type type, int key); - void sendKeyEventToEditor(QEvent::Type type, int key); - - inline DialpadNumericButton* button(int i) const; - void updateButtonLabels(); - void updateColorArray(); - void updateIconColor(); - void updateTextLayouts(const QSizeF &size); - void resolveTextContent(QList &content); - void createTextLayouts(const QSizeF &size, - const QList &content); - void layoutTextLines(const QSizeF &size, - QTextLayout &textLayout, - int state, - int type); - -protected: - void paint(QPainter* painter, - const QStyleOptionGraphicsItem* option, - QWidget* widget); - void setGeometry(const QRectF &rect); - void changeEvent(QEvent *event); - -private: - enum ButtonState { - Normal = 0, - Pressed, - StateCount - }; - - enum TextType { - PrimaryText = 0, - SecondaryText, - TextTypeCount - }; - -private: - const HbMainWindow& mMainWindow; - DialpadInputField& mInputField; - QSignalMapper* mKeyClickedSignalMapper; - QMap mGeneratedChar; - int mPressedNumericKey; - DialpadButton* mCallButton; - QList mColors; - QList mTextLayouts; - qreal mUnit; - qreal mMaxPrimaryLineWidth; -}; - -#endif // DIALPADKEYPAD_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadkeysequenceeventfilter.h --- a/telutils/dialpad/inc/dialpadkeysequenceeventfilter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/*! -* 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: Implements key sequence recognition filter for Dialpad. -* -*/ - -#ifndef DIALPADKEYSEQUENCEEVENTFILTER_H -#define DIALPADKEYSEQUENCEEVENTFILTER_H - -#include -#include -#include - -class Dialpad; - -/*! - DialpadKeySequenceEventFilter - Class provides key sequence recognition and handling. -*/ -class DialpadKeySequenceEventFilter : public QObject -{ - Q_OBJECT - -public: - explicit DialpadKeySequenceEventFilter( - Dialpad* dialpad, - QObject* parent = 0); - virtual ~DialpadKeySequenceEventFilter(); - -public: - bool eventFilter(QObject *watched, QEvent *event); - -private: - void constructKeySequenceToHandlerMappings(); - XQAiwInterfaceDescriptor findKeySequenceHandler( - const QString &keySequenceCandidate); - -private: - /*! Dialpad. Not own. */ - Dialpad* mDialpad; - - /*! Application manager. */ - XQApplicationManager mAiwMgr; - - /*! Key sequence validators and associated sequence handlers. */ - QMap mValidators; -}; - -#endif // DIALPADKEYSEQUENCEEVENTFILTER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadmailboxeventfilterbase.h --- a/telutils/dialpad/inc/dialpadmailboxeventfilterbase.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADMAILBOXEVENTFILTERBASE_H -#define DIALPADMAILBOXEVENTFILTERBASE_H - -#include - -class QTimer; -class Dialpad; -class DialpadSymbianWrapper; - -enum err { - DialpadErrorNone = 0, - DialpadErrorCancel = -3 -}; -const int DialpadLongKeyPressTimeOut(1000); - -/*! - DialpadMailboxEventFilterBase - Class provides voice mailbox key handling. -*/ -class DialpadMailboxEventFilterBase : public QObject -{ - Q_OBJECT - -public: - explicit DialpadMailboxEventFilterBase(Dialpad* dialpad, QObject* parent = 0); - virtual ~DialpadMailboxEventFilterBase(); - -protected: - virtual bool eventFilter(QObject *watched, QEvent *event) = 0; - - /*! - \fn bool isLongKeyPressSupported(const int key) - - Checks if key is numeric key'1' or numbersign key if it is then - function return true, if key is something else for example - yes/send then this returns false. - */ - bool isLongKeyPressSupported(const int key); - - /*! - \fn bool checkIfSendEventAndConsumeEvent(const int pressedKey, const int eventType) - - Checks that keycode is call related key if it is then handle it. - */ - bool checkIfSendEventAndConsumeEvent(const int pressedKey, const int eventType); - - /*! - \fn bool handleCallButtonPress() - - Check if editor has number string and if it does then createCall - is called and funtion returns true, if there is no number then - funtion return false. - */ - virtual bool handleCallButtonPress() = 0; - - /*! - \fn void clearEditor() - - Clears dialpad editor. - */ - void clearEditor(); - - /*! - \fn createCall(const QString phoneNumber) - - Creates call request to QT Highway. - */ - void createCall(const QString &phoneNumber, bool createVideoCall = false); - - /*! - \fn handleMailboxOperation - - Start vmbx call or number definition procedures. - */ - virtual void handleMailboxOperation() = 0; - - -protected slots: - - /*! - \fn void handleLongKeyPress() - - Handles long key presses. - */ - virtual void handleLongKeyPress() = 0; - - -protected: - QTimer *mLongPressTimer; - DialpadSymbianWrapper *mSymbianWrapper; - Dialpad* mDialpad; - int mKeyEvent; -}; - -#endif // DIALPADMAILBOXEVENTFILTERBASE_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadmultitaphandler.h --- a/telutils/dialpad/inc/dialpadmultitaphandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +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: Multitap handler -* -*/ - -#ifndef DIALPADMULTITAPHANDLER_H_ -#define DIALPADMULTITAPHANDLER_H_ - -#include -#include -#include - -class HbLineEdit; - -class DialpadMultitapHandler : public QObject - { -public: - explicit DialpadMultitapHandler(HbLineEdit& editor, QObject* parent=0); - virtual ~DialpadMultitapHandler(); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - -private: - inline bool isNumericKey(int key); - -private: - HbLineEdit& mEditor; - QTime mMultitapTimer; - int mAsteriskMultitapIndex; - bool mGeneratedAsterisk; - QMap mExtraChar; - }; - -#endif /* DIALPADMULTITAPHANDLER_H_ */ diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadnumericbutton.h --- a/telutils/dialpad/inc/dialpadnumericbutton.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/*! -* 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: Extends HbInputButton -* -*/ - -#ifndef DIALPADNUMERICBUTTON_H -#define DIALPADNUMERICBUTTON_H - -#include -#include - -class DialpadNumericButton : public HbInputButton -{ - Q_OBJECT - -public: - explicit DialpadNumericButton(int keyCode, const QPoint &position, const QSize &size = QSize(1, 1)); - virtual ~DialpadNumericButton(); - - void setIcon(const HbIcon& icon); - HbIcon& icon(); - - void setText(const QString& text); - QString text() const; - - void setSecondaryText(const QString& text); - QString secondaryText() const; - -private: - HbIcon mIcon; - QString mText; - QString mSecondaryText; -}; - -#endif // DIALPADNUMERICBUTTON_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadsymbianwrapper.h --- a/telutils/dialpad/inc/dialpadsymbianwrapper.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADSYMBIANWRAPPER_H -#define DIALPADSYMBIANWRAPPER_H - -#include -#include -#include - -class DialpadSymbianWrapperPrivate; - -/*! - DialpadSymbianWrapper -*/ -class DialpadSymbianWrapper : public QObject -{ - -Q_OBJECT - -public: - explicit DialpadSymbianWrapper(QObject *parent = 0); - ~DialpadSymbianWrapper(); - - int getMailboxNumber(QString &vmbxNumber); - int getVideoMailboxNumber(QString &vmbxNumber); - - int defineMailboxNumber(QString &vmbxNumber); - int defineVideoMailboxNumber(QString &vmbxNumber); - - bool changeSilentModeState(); - -protected: - DialpadSymbianWrapperPrivate *const d_ptr; - - Q_DECLARE_PRIVATE(DialpadSymbianWrapper) -}; - -#endif // DIALPADSYMBIANWRAPPER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadsymbianwrapper_p.h --- a/telutils/dialpad/inc/dialpadsymbianwrapper_p.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADSYMBIANWRAPPERPRIVATE_H -#define DIALPADSYMBIANWRAPPERPRIVATE_H - -#include -#include - -class CVoiceMailbox; -class CVoiceMailboxEntry; -class DialpadSymbianWrapper; - -/*! - DialpadSymbianWrapperPrivate - -*/ -class DialpadSymbianWrapperPrivate -{ - -public: - - DialpadSymbianWrapperPrivate(DialpadSymbianWrapper *parent); - ~DialpadSymbianWrapperPrivate(); - - int getMailboxNumber(QString &vmbxNumber); - int getVideoMailboxNumber(QString &vmbxNumber); - - int defineMailboxNumber(QString &vmbxNumber); - int defineVideoMailboxNumber(QString &vmbxNumber); - - bool changeSilentModeState(); - -private: - - QString getVmbxNumber(CVoiceMailboxEntry &vmbxEntry); - - CVoiceMailbox *mVmbx; - - DialpadSymbianWrapper *const q_ptr; - Q_DECLARE_PUBLIC(DialpadSymbianWrapper) -}; - -#endif // DIALPADSYMBIANWRAPPERPRIVATE_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadsymbianwrapper_p_stub.h --- a/telutils/dialpad/inc/dialpadsymbianwrapper_p_stub.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADSYMBIANWRAPPERPRIVATE_H -#define DIALPADSYMBIANWRAPPERPRIVATE_H - -#include -#include - -class DialpadSymbianWrapper; - - -/*! - DialpadSymbianWrapperPrivate - -*/ -class DialpadSymbianWrapperPrivate -{ - -public: - - DialpadSymbianWrapperPrivate(DialpadSymbianWrapper *parent); - ~DialpadSymbianWrapperPrivate(); - - int getMailboxNumber(QString &vmbxNumber); - int getVideoMailboxNumber(QString &vmbxNumber); - - int defineMailboxNumber(QString &vmbxNumber); - int defineVideoMailboxNumber(QString &vmbxNumber); - -private: - - DialpadSymbianWrapper *const q_ptr; - Q_DECLARE_PUBLIC(DialpadSymbianWrapper) - - int mTimes; -}; - -#endif // DIALPADSYMBIANWRAPPERPRIVATE_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadvideomailboxeventfilter.h --- a/telutils/dialpad/inc/dialpadvideomailboxeventfilter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADVIDEOMAILBOXEVENTFILTER_H -#define DIALPADVIDEOMAILBOXEVENTFILTER_H - -#include "dialpadmailboxeventfilterbase.h" - -class QTimer; -class Dialpad; -class DialpadSymbianWrapper; - -/*! - DialpadVideoMailboxEventFilter - Class provides video mailbox key handling. -*/ -class DialpadVideoMailboxEventFilter : public DialpadMailboxEventFilterBase -{ - Q_OBJECT - -public: - explicit DialpadVideoMailboxEventFilter(Dialpad* dialpad, QObject* parent = 0); - virtual ~DialpadVideoMailboxEventFilter(); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - - /*! - \fn bool handleCallButtonPress() - - Check if editor has number string and if it does then createVideoCall - is called and funtion returns true, if there is no number then - funtion return false. - */ - bool handleCallButtonPress(); - - /*! - \fn handleMailboxOperation - - Start vmbx call or number definition procedures. - */ - void handleMailboxOperation(); - -protected slots: - - /*! - \fn void handleLongKeyPress() - - Handles long key presses. - */ - void handleLongKeyPress(); - -private: - bool isVideoMbxSupported(); -}; - -#endif // DIALPADVIDEOMAILBOXEVENTFILTER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/inc/dialpadvoicemailboxeventfilter.h --- a/telutils/dialpad/inc/dialpadvoicemailboxeventfilter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/*! -* 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: -* -*/ - -#ifndef DIALPADVOICEMAILBOXEVENTFILTER_H -#define DIALPADVOICEMAILBOXEVENTFILTER_H - -#include "dialpadmailboxeventfilterbase.h" - -class QTimer; -class Dialpad; -class DialpadSymbianWrapper; - -/*! - DialpadVoiceMailboxEventFilter - Class provides voice mailbox key handling. -*/ -class DialpadVoiceMailboxEventFilter : public DialpadMailboxEventFilterBase -{ - Q_OBJECT - -public: - explicit DialpadVoiceMailboxEventFilter(Dialpad* dialpad, QObject* parent = 0); - virtual ~DialpadVoiceMailboxEventFilter(); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - - /*! - \fn bool handleCallButtonPress() - - Check if editor has number string and if it does then createCall - is called and funtion returns true, if there is no number then - funtion return false. - */ - bool handleCallButtonPress(); - - /*! - \fn handleMailboxOperation - - Start vmbx call or number definition procedures. - */ - void handleMailboxOperation(); - -protected slots: - - /*! - \fn void handleLongKeyPress() - - Handles long key presses. - */ - void handleLongKeyPress(); -}; - -#endif // DIALPADVOICEMAILBOXEVENTFILTER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/resources/dialpad.css --- a/telutils/dialpad/resources/dialpad.css Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - -/* icon only */ -DialpadButton[icon][!text][!additionalText]{ - layout:icon_button; - min-height:6.25un; /* default min-height is too small */ - min-width:6.25un; -} - -DialpadInputField > HbLineEdit{ - text-align: right; - size-policy: expanding expanding; -} - -DialpadInputField > HbLineEdit::text{ - left: -var(hb-param-margin-gene-middle-horizontal); - right: var(hb-param-margin-gene-middle-horizontal); - top: -var(hb-param-margin-gene-middle-vertical); - bottom: var(hb-param-margin-gene-middle-vertical); -} - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/resources/dialpad_color.css --- a/telutils/dialpad/resources/dialpad_color.css Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - -/* backspace */ -DialpadButton[state = "normal"][buttonType = "1"]::icon{ - color: var(qtc_input_function_normal); -} - -DialpadButton[state = "pressed"][buttonType = "1"]::icon{ - color: var(qtc_input_function_pressed); -} - -DialpadButton[buttonType = "1"]::icon[!enabled]{ - color: var(qtc_input_function_disabled); -} - -/* call button */ -DialpadButton[state = "normal"][buttonType = "2"]::icon{ - color: var(qtc_callhandling_answer_normal); -} - -DialpadButton[state = "pressed"][buttonType = "2"]::icon{ - color: var(qtc_callhandling_answer_pressed); -} - -DialpadButton[buttonType = "2"]::icon[!enabled]{ - color: var(qtc_input_function_disabled); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/resources/dialpad_to_lsc.fxml --- a/telutils/dialpad/resources/dialpad_to_lsc.fxml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ - - - - - 1.0 - - 0 - 0 - 1 - - - - 0.5 - - -90 - 0 - - - 0.5 - 0.5 - - 0 - 0 - 1 - - - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/resources/dialpad_to_prt.fxml --- a/telutils/dialpad/resources/dialpad_to_prt.fxml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ - - - - - 1.0 - - 0 - 0 - 1 - - - - 0.5 - - 90 - 0 - - - 0.5 - 0.5 - - 0 - 0 - 1 - - - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/rom/dialpad.iby --- a/telutils/dialpad/rom/dialpad.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +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: Dialpad iby file. -* -*/ - - -#ifndef __DIALPAD_IBY__ -#define __DIALPAD_IBY__ - -#include - -file=ABI_DIR\BUILD_DIR\dialpad.dll SHARED_LIB_DIR\dialpad.dll - -#endif // __DIALPAD_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpad.cpp --- a/telutils/dialpad/src/dialpad.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,489 +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: Dialpad popup -* -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dialpad.h" -#include "dialpadinputfield.h" -#include "dialpadkeypad.h" -#include "dialpadbutton.h" -#include "dialpadmultitaphandler.h" -#include "dialpadbackground.h" -#include "dialpadbutton.h" - -static const QLatin1String backgroundGraphics("qtg_fr_input_v_bg"); -static const QLatin1String backgroundGraphicsH("qtg_fr_input_h_bg"); -static const QLatin1String minimizeIcon("qtg_graf_input_v_swipe"); -static const QLatin1String minimizeIconH("qtg_graf_input_h_swipe"); -static const int DialpadCloseAnimDuration = 200; // ms -static const int DialpadOpenAnimDuration = 200; // ms -static const qreal DialpadComponentMargin = 0.75; // units -static const qreal DialpadCloseHandleHeight = 2.23; // units -static const qreal DialpadCloseHandleWidth = 18.8; // units -static const qreal DialpadCallButtonHeight = 8.75; // units, same as numeric buttons -static const qreal DialpadCallButtonHeightH = 7.25; // units - -static const QLatin1String handsetIcon("qtg_mono_call"); -static const QLatin1String vmbxIcon("qtg_mono_voice_mailbox"); - -const QLatin1String DIALPAD_TO_PRT_FXML(":/dialpad_to_prt.fxml"); -const QLatin1String DIALPAD_TO_LSC_FXML(":/dialpad_to_lsc.fxml"); -const QLatin1String DIALPAD_TO_PRT_EVENT("prt_activated"); -const QLatin1String DIALPAD_TO_LSC_EVENT("lsc_activated"); - -Dialpad::Dialpad() : - mMainWindow(*hbInstance->allMainWindows().at(0)), - mBackgroundItem(0), - mOpenTimeLine(DialpadOpenAnimDuration), - mCloseTimeLine(DialpadCloseAnimDuration), - mAnimationOngoing(false), - mOrientation(Qt::Vertical), - mIsOpen(false) -{ - // this constuctor is deprecated - initialize(); -} - -Dialpad::Dialpad(const HbMainWindow& mainWindow) : - mMainWindow(mainWindow), - mBackgroundItem(0), - mOpenTimeLine(DialpadOpenAnimDuration), - mCloseTimeLine(DialpadCloseAnimDuration), - mAnimationOngoing(false), - mOrientation(Qt::Vertical), - mIsOpen(false) -{ - initialize(); -} - -void Dialpad::initialize() -{ - setFocusPolicy(Qt::StrongFocus); - setFlag(QGraphicsItem::ItemIsFocusable,true); - setFlag(QGraphicsItem::ItemHasNoContents, false); - - // create input field - mInputField = new DialpadInputField(this); - - // create keypad - mKeypad = new DialpadKeypad(mMainWindow,*mInputField,this); - - // layouting params - qreal unit = HbDeviceProfile::current().unitValue(); - qreal margin = DialpadComponentMargin * unit; - mCloseHandleHeight = DialpadCloseHandleHeight * unit; - mCloseHandleWidth = DialpadCloseHandleWidth * unit; - - mKeypad->callButton().setPreferredHeight(DialpadCallButtonHeight*unit); - mKeypad->callButton().setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - - // create popup background - mBackgroundDrawer = new HbFrameDrawer(); - mIconDrawer = new HbFrameDrawer(); - - // popup layout - QGraphicsLinearLayout* popupLayout = - new QGraphicsLinearLayout(Qt::Vertical); - popupLayout->addItem(mInputField); - popupLayout->addItem(mKeypad); - popupLayout->addItem(&mKeypad->callButton()); - popupLayout->setContentsMargins(margin, mCloseHandleHeight, margin, margin); - popupLayout->setSpacing(0); - popupLayout->setItemSpacing(0,margin); - setLayout(popupLayout); - setLayoutDirection(Qt::LeftToRight); - - // asterisk multitap handler - mMultitap = new DialpadMultitapHandler(mInputField->editor(),this); - mInputField->editor().installEventFilter(mMultitap); - - // close animation - mCloseTimeLine.setUpdateInterval(16); - mCloseTimeLine.setEasingCurve(QEasingCurve::InQuad); - connect(&mCloseTimeLine, SIGNAL(finished()), - SLOT(closeAnimFinished())); - connect(&mCloseTimeLine, SIGNAL(valueChanged(qreal)), - SLOT(closeAnimValueChanged(qreal))); - - // open animation - mOpenTimeLine.setUpdateInterval(16); - mOpenTimeLine.setEasingCurve(QEasingCurve::OutQuad); - connect(&mOpenTimeLine, SIGNAL(finished()), - SLOT(openAnimFinished())); - connect(&mOpenTimeLine, SIGNAL(valueChanged(qreal)), - SLOT(openAnimValueChanged(qreal))); - - // default values - setPos(0,0); - setPreferredSize(360,360); - setZValue(0x00004000); // Hb PopupZValueRangeStart - hide(); - mMainWindow.scene()->addItem(this); - - // custom button style - HbStyleLoader::registerFilePath(QLatin1String(":/dialpad.css")); - HbStyleLoader::registerFilePath(QLatin1String(":/dialpad_color.css")); - - // grab gestures so that those are not passed to widgets behind dialpad - grabGesture(Qt::TapGesture); - grabGesture(Qt::TapAndHoldGesture); - grabGesture(Qt::PanGesture); - grabGesture(Qt::SwipeGesture); - grabGesture(Qt::PinchGesture); - - // effects - HbEffect::add(this, DIALPAD_TO_PRT_FXML, DIALPAD_TO_PRT_EVENT); - HbEffect::add(this, DIALPAD_TO_LSC_FXML, DIALPAD_TO_LSC_EVENT); -} - -Dialpad::~Dialpad() -{ - delete mBackgroundDrawer; - delete mIconDrawer; - delete mBackgroundItem; -} - -void Dialpad::paint( - QPainter* painter, - const QStyleOptionGraphicsItem* option, - QWidget* widget) -{ - Q_UNUSED(option); - Q_UNUSED(widget); - - // paint popup background - if ( mOrientation == Qt::Vertical ) { - mBackgroundDrawer->setFrameGraphicsName(backgroundGraphics); - mIconDrawer->setFrameGraphicsName(minimizeIcon); - mBackgroundDrawer->setFrameType(HbFrameDrawer::ThreePiecesVertical); - mBackgroundDrawer->setBorderWidths(0.0, mCloseHandleHeight, 0.0, 0.0); - } else { - mBackgroundDrawer->setFrameGraphicsName(backgroundGraphicsH); - mIconDrawer->setFrameGraphicsName(minimizeIconH); - mBackgroundDrawer->setFrameType(HbFrameDrawer::ThreePiecesHorizontal); - mBackgroundDrawer->setBorderWidths(mCloseHandleHeight, 0.0, 0.0, 0.0); - } - - // draw background - QRectF rect = boundingRect(); - mBackgroundDrawer->setFillWholeRect(true); - mBackgroundDrawer->paint(painter, rect); - - // adjust rectangle to close bar position - if ( mOrientation == Qt::Vertical ) { - rect.setLeft((rect.width()- mCloseHandleWidth)/2); - rect.setWidth(mCloseHandleWidth); - rect.setHeight(mCloseHandleHeight); - } else { - rect.setTop((rect.height() - mCloseHandleWidth)/2); - rect.setWidth(mCloseHandleHeight); - rect.setHeight(mCloseHandleWidth); - } - - mIconDrawer->setFrameType(HbFrameDrawer::OnePiece); - mIconDrawer->paint(painter, rect); -} - -void Dialpad::changeEvent(QEvent *event) -{ - if (event->type() == QEvent::LayoutDirectionChange) { - mBackgroundDrawer->setLayoutDirection(layoutDirection()); - } else if (event->type() == HbEvent::ThemeChanged) { - mBackgroundDrawer->themeChanged(); - mIconDrawer->themeChanged(); - } -} - -bool Dialpad::isOpen() const -{ - return mIsOpen; -} - -bool Dialpad::isCallButtonEnabled() const -{ - return mKeypad->callButton().isEnabled(); -} - -void Dialpad::openDialpad() -{ - mKeypad->resetButtons(); - - if (mIsOpen) { - return; - } - - connect(&mMainWindow,SIGNAL(aboutToChangeOrientation()), - SLOT(orientationChangeStarted())); - connect(&mMainWindow,SIGNAL(orientationChanged(Qt::Orientation)), - SLOT(orientationChangeFinished(Qt::Orientation))); - - // set offset for open animation - int previousOrientation = mOrientation; - mOrientation = mMainWindow.orientation(); - - mPosition = pos(); - if (mOrientation==Qt::Vertical) { - qreal height = geometry().height(); - setPos(mPosition.x(),mPosition.y()+height); - } else { - qreal width = geometry().width(); - setPos(mPosition.x()+width,mPosition.y()); - } - - if (mOrientation!=previousOrientation) { - updateLayout((Qt::Orientation)mOrientation); - } - - show(); - - setFocusProxy(&mInputField->editor()); - mInputField->editor().setFocus(); - - mOpenTimeLine.start(); - mAnimationOngoing = true; - if (!mInputField->editor().text().isEmpty()) { - setCallButtonEnabled(true); - } - mIsOpen = true; - - emit aboutToOpen(); -} - -void Dialpad::closeDialpad() -{ - close(); - - disconnect(&mMainWindow,SIGNAL(aboutToChangeOrientation()), - this, SLOT(orientationChangeStarted())); - disconnect(&mMainWindow,SIGNAL(orientationChanged(Qt::Orientation)), - this, SLOT(orientationChangeFinished(Qt::Orientation))); - - if (mBackgroundItem) { - mBackgroundItem->hide(); - } -} - -HbLineEdit& Dialpad::editor() const -{ - return mInputField->editor(); -} - -void Dialpad::setCallButtonEnabled(bool enabled) -{ - mKeypad->setCallButtonEnabled(enabled); -} - -void Dialpad::setTapOutsideDismiss(bool dismiss) -{ - // set dismiss policy before opening dialpad - Q_ASSERT(!isVisible()); - - if (dismiss) { - mBackgroundItem = new DialpadBackground(*this); - mBackgroundItem->setZValue(zValue()-1); - mMainWindow.scene()->addItem(mBackgroundItem); - qreal chromeHeight = 0; - hbInstance->style()->parameter(QLatin1String("hb-param-widget-chrome-height"), - chromeHeight); - mTitleBarHeight = chromeHeight; - } else { - delete mBackgroundItem; - mBackgroundItem = 0; - } -} - -void Dialpad::startCloseAnimation() -{ - if (!mAnimationOngoing) { - mCloseTimeLine.start(); - mAnimationOngoing = true; - } -} - -void Dialpad::showEvent(QShowEvent *event) -{ - HbWidget::showEvent(event); - - if (mBackgroundItem) { - layoutBackgroundItem(); - mBackgroundItem->show(); - } -} - -void Dialpad::hideEvent(QHideEvent *event) -{ - HbWidget::hideEvent(event); -} - -void Dialpad::closeEvent(QCloseEvent * event) -{ - mIsOpen = false; - HbWidget::closeEvent(event); - emit aboutToClose(); -} - -void Dialpad::closeAnimValueChanged(qreal value) -{ - QPointF currentPos = pos(); - QPointF newPos; - - if (mOrientation==Qt::Vertical) { - qreal height = geometry().height(); - - newPos.setX(currentPos.x()); - newPos.setY(mPosition.y()+(height*value)); - } else { - qreal width = geometry().width(); - - newPos.setY(currentPos.y()); - newPos.setX(mPosition.x()+(width*value)); - } - - setPos(newPos); -} - - -void Dialpad::closeAnimFinished() -{ - mAnimationOngoing = false; - closeDialpad(); - setPos(mPosition); -} - -void Dialpad::openAnimValueChanged(qreal value) -{ - QPointF currentPos = pos(); - QPointF newPos; - - if (mOrientation==Qt::Vertical) { - qreal height = geometry().height(); - - newPos.setX(currentPos.x()); - newPos.setY(mPosition.y()+(height*(1-value))); - } else { - qreal width = geometry().width(); - - newPos.setY(currentPos.y()); - newPos.setX(mPosition.x()+(width*(1-value))); - } - - setPos(newPos); -} - -void Dialpad::openAnimFinished() -{ - mAnimationOngoing = false; - setPos(mPosition); -} - -void Dialpad::orientationChangeStarted() -{ - hide(); -} - -void Dialpad::orientationChangeFinished(Qt::Orientation current) -{ - updateLayout(current); - - show(); - - // run orientation change effect - if (current==Qt::Horizontal) { - HbEffect::start(this, DIALPAD_TO_LSC_EVENT); - } else { - HbEffect::start(this, DIALPAD_TO_PRT_EVENT); - } - - mOrientation = current; - - mPosition = pos(); - - if (mBackgroundItem) { - layoutBackgroundItem(); - } -} - -void Dialpad::layoutBackgroundItem() -{ - Q_ASSERT(mBackgroundItem); - QRectF backgroundRect(mMainWindow.layoutRect()); - backgroundRect.adjust(0,mTitleBarHeight,0,0); - mBackgroundItem->setRect(backgroundRect); -} - -void Dialpad::updateLayout(Qt::Orientation orientation) -{ - Q_ASSERT(layout()); - - qreal unit = HbDeviceProfile::current().unitValue(); - qreal margin = DialpadComponentMargin * unit; - - QGraphicsLinearLayout* mainLayout = - static_cast(layout()); - - // close handle location changes, update margin values - if (orientation==Qt::Vertical) { - mainLayout->setContentsMargins(margin, - mCloseHandleHeight, - margin, - margin); - mKeypad->callButton().setPreferredHeight(DialpadCallButtonHeight*unit); - } else { - mainLayout->setContentsMargins(mCloseHandleHeight, - margin, - margin, - margin); - mKeypad->callButton().setPreferredHeight(DialpadCallButtonHeightH*unit); - } -} - -void Dialpad::gestureEvent(QGestureEvent *event) -{ - bool closeGesture(false); - - if(HbSwipeGesture *gesture = qobject_cast( - event->gesture(Qt::SwipeGesture))) { - if (gesture->state() == Qt::GestureFinished) { - if ( mOrientation==Qt::Vertical && - gesture->sceneVerticalDirection() == QSwipeGesture::Down ) { - closeGesture = true; - } else if (mOrientation==Qt::Horizontal && - gesture->sceneHorizontalDirection() == QSwipeGesture::Right) { - closeGesture = true; - } - } - } - - if (closeGesture) { - startCloseAnimation(); - event->accept(); - } else { - event->ignore(); - } -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadbackground.cpp --- a/telutils/dialpad/src/dialpadbackground.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/*! -* 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: Background item to close dialpad when tapping outside. -* -*/ - -#include -#include "dialpadbackground.h" -#include "dialpad.h" - -DialpadBackground::DialpadBackground(Dialpad& dialpad) : - mDialpad(dialpad), mPressed(false) -{ - setFlag(QGraphicsItem::ItemIsFocusable,true); -} - -DialpadBackground::~DialpadBackground() -{ - -} - -void DialpadBackground::setRect(QRectF rect) -{ - mRect = rect; -} - -QRectF DialpadBackground::boundingRect() const -{ - return mRect; -} - -void DialpadBackground::paint( - QPainter *painter, - const QStyleOptionGraphicsItem *option, - QWidget *widget) -{ - Q_UNUSED(painter); - Q_UNUSED(option); - Q_UNUSED(widget); -} - -void DialpadBackground::mousePressEvent(QGraphicsSceneMouseEvent * event) -{ - mPressed = true; - event->accept(); -} - -void DialpadBackground::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - if ( !boundingRect().contains(event->pos()) && mPressed ) { - ungrabMouse(); - mPressed = false; - } -} - -void DialpadBackground::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) -{ - if (mPressed) { - mPressed = false; - event->accept(); - mDialpad.startCloseAnimation(); - } -} - - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadbluetootheventfilter.cpp --- a/telutils/dialpad/src/dialpadbluetootheventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include "dialpadbluetootheventfilter.h" -#include "dialpad.h" -#include "qtphonesrvlog.h" - -#ifdef Q_OS_SYMBIAN -#include -#endif //Q_OS_SYMBIAN - -const int DialpadLongKeyPressTimeOut(1000); -const QString BluetoothCharacter("*"); - -DialpadBluetoothEventFilter::DialpadBluetoothEventFilter(Dialpad* dialpad, QObject* parent) : - QObject(parent), mDialpad(dialpad) -{ - PHONE_TRACE; - mLongPressTimer = new QTimer(this); - mLongPressTimer->setSingleShot(true); - connect(mLongPressTimer,SIGNAL(timeout()), this, SLOT(toggleBluetooth())); -} - -DialpadBluetoothEventFilter::~DialpadBluetoothEventFilter() -{ -} - -bool DialpadBluetoothEventFilter::eventFilter(QObject *watched, QEvent *event) -{ - Q_UNUSED(watched) - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - if (keyEvent->key() == Qt::Key_Asterisk && - !(mDialpad->editor().text().length() >= 1)) { - //Check that there is only one item in dialpad, if there is more than one - //do not handle long key press. - mLongPressTimer->stop(); - mLongPressTimer->start(DialpadLongKeyPressTimeOut); - } - } else if (event->type() == QEvent::KeyRelease) { - mLongPressTimer->stop(); - } - - // Don't consume the key - return false; -} - -void DialpadBluetoothEventFilter::toggleBluetooth() -{ - PHONE_TRACE; - mDialpad->editor().setText(QString("")); -#ifdef Q_OS_SYMBIAN - XQServiceRequest snd("com.nokia.services.btservices.ToggleBluetooth","toggleBluetooth()", false); - QVariant retValue; - snd.send(retValue); -#endif // Q_OS_SYMBIAN -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadbutton.cpp --- a/telutils/dialpad/src/dialpadbutton.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +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: Custom button -* -*/ - - -#include -#include - -#include "dialpadbutton.h" - -DialpadButton::DialpadButton(QGraphicsItem *parent) - : HbPushButton(parent), mButtonType(FunctionButton) -{ -} - -DialpadButton::~DialpadButton() -{ -} - -DialpadButton::DialpadButtonType DialpadButton::buttonType() const -{ - return mButtonType; -} - -void DialpadButton::setButtonType(DialpadButtonType type) -{ - mButtonType = type; -} - -bool DialpadButton::sceneEvent(QEvent *event) -{ - bool result = HbPushButton::sceneEvent(event); - - if (event->type() == QEvent::UngrabMouse) { - if (isVisible() && isDown()) { - // this is needed in situation, where - // longpress launches a dialog (vmbx) - // and button release event goes to - // dialog (HbPopup grabs mouse). - setDown(false); - emit clicked(); - emit released(); - } - } - - return result; -} - -void DialpadButton::polish(HbStyleParameters& params) -{ - // HbPushButton::polish() prevents layouting - // text and additional-text horizontally. - HbAbstractButton::polish( params ); -} - -void DialpadButton::updatePrimitives() -{ - HbPushButton::updatePrimitives(); - - HbFrameItem* frame = - qgraphicsitem_cast(HbWidget::primitive(QLatin1String("background"))); - - if (!frame) { - return; - } - - QString graphicsName; - - if (!isEnabled()) { - graphicsName = QLatin1String("qtg_fr_input_btn_function_disabled"); - } else if (isDown()) { - if (buttonType()==CallButton) { - graphicsName = QLatin1String("qtg_fr_btn_green_pressed"); - } else { - graphicsName = QLatin1String("qtg_fr_input_btn_function_pressed"); - } - } else { - if (buttonType()==CallButton) { - graphicsName = QLatin1String("qtg_fr_btn_green_normal"); - } else { - graphicsName = QLatin1String("qtg_fr_input_btn_function_normal"); - } - } - - frame->frameDrawer().setFrameGraphicsName(graphicsName); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpademergencycalleventfilter.cpp --- a/telutils/dialpad/src/dialpademergencycalleventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include "dialpademergencycalleventfilter.h" -#include "dialpad.h" -#include "qtphonesrvlog.h" - -#ifdef Q_OS_SYMBIAN -#include -#include -#endif //Q_OS_SYMBIAN - - -DialpadEmergencyCallEventFilter::DialpadEmergencyCallEventFilter(Dialpad* dialpad, QObject* parent) : - QObject(parent), mDialpad(dialpad), mEmergency(0) -{ - PHONE_TRACE; -#ifdef Q_OS_SYMBIAN - TRAP_IGNORE(mEmergency = CPhCltEmergencyCall::NewL( NULL )); -#endif // Q_OS_SYMBIAN - mDialpad->setCallButtonEnabled(false); - connect(&mDialpad->editor(),SIGNAL(contentsChanged()), - this,SLOT(editorTextChanged())); -} - -DialpadEmergencyCallEventFilter::~DialpadEmergencyCallEventFilter() -{ -} - -bool DialpadEmergencyCallEventFilter::eventFilter(QObject *watched, QEvent *event) -{ - PHONE_TRACE; - Q_UNUSED(watched) - - bool eventFiltered = false; -#ifdef Q_OS_SYMBIAN - - const int eventType = event->type(); - - if (eventType == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - const int keyCode = keyEvent->key(); - if (keyCode == Qt::Key_Yes || - keyCode == Qt::Key_Enter) { - if (isEmergencyNumber(editorText())) { - createCall(editorText()); - eventFiltered = true; - } - } - } -#else - Q_UNUSED(event) -#endif // Q_OS_SYMBIAN - - return eventFiltered; -} - -bool DialpadEmergencyCallEventFilter::isEmergencyNumber(QString string) -{ - PHONE_TRACE; - bool ret = false; -#ifdef Q_OS_SYMBIAN - if (KPhCltTelephoneNumberLength >= string.length()) { - TBool emergency; - TPhCltTelephoneNumber number(reinterpret_cast(string.utf16())); - if (mEmergency && - KErrNone == mEmergency->IsEmergencyPhoneNumber(number, emergency)) { - ret = emergency; - } - } -#else - Q_UNUSED(string) -#endif // Q_OS_SYMBIAN - return ret; -} - -QString DialpadEmergencyCallEventFilter::editorText() -{ - PHONE_TRACE; - return HbStringUtil::convertDigitsTo( - mDialpad->editor().text(), WesternDigit); -} - -void DialpadEmergencyCallEventFilter::createCall(const QString &phoneNumber) -{ - PHONE_TRACE2("phoneNumber:", phoneNumber); -#ifdef Q_OS_SYMBIAN - TPtrC number (static_cast(phoneNumber.utf16()), - phoneNumber.length()); - TRAP_IGNORE(mEmergency->DialEmergencyCallL(number)); -#endif // Q_OS_SYMBIAN -} - -void DialpadEmergencyCallEventFilter::editorTextChanged() -{ - mDialpad->setCallButtonEnabled(isEmergencyNumber(editorText())); -} - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadhasheventfilter.cpp --- a/telutils/dialpad/src/dialpadhasheventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include "dialpadhasheventfilter.h" -#include "dialpadsymbianwrapper.h" -#include "dialpad.h" -#include "qtphonesrvlog.h" - -const QString HashCharacter("#"); - -DialpadHashEventFilter::DialpadHashEventFilter(Dialpad* dialpad, QObject* parent) : - DialpadMailboxEventFilterBase(dialpad, parent) -{ -} - -DialpadHashEventFilter::~DialpadHashEventFilter() -{ -} - -bool DialpadHashEventFilter::eventFilter(QObject *watched, QEvent *event) -{ - Q_UNUSED(watched) - bool keyEventEaten(false); - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - if ((isLongKeyPressSupported(keyEvent->key())) && - !(mDialpad->editor().text().length() >= 1)) { - //Check that there is only one item in dialpad, if there is more than one - //do not handle long key press. - mLongPressTimer->stop(); - mLongPressTimer->start(DialpadLongKeyPressTimeOut); - } - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - if (isLongKeyPressSupported(keyEvent->key())){ - mLongPressTimer->stop(); - } - } - - return keyEventEaten; -} - -void DialpadHashEventFilter::handleLongKeyPress() -{ - PHONE_TRACE; - switch(mKeyEvent) { - case Qt::Key_NumberSign:{ - handleMailboxOperation(); - break; - } - default: - // Do nothing. - break; - } - - // Reset key code. - mKeyEvent = NULL; -} - -bool DialpadHashEventFilter::handleCallButtonPress() -{ - // not supported - return EFalse; -} - -void DialpadHashEventFilter::handleMailboxOperation() -{ - PHONE_TRACE; - // change KCRUidProfileEngine KProEngSilenceMode value and show note - if (mSymbianWrapper->changeSilentModeState()) { - HbNotificationDialog::launchDialog( - hbTrId( "txt_dialer_dpopinfo_silent_mode_activated" ) ); - } - else { - HbNotificationDialog::launchDialog( - hbTrId( "txt_dialer_dpopinfo_silent_mode_deactivated" ) ); - } - clearEditor(); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadinputfield.cpp --- a/telutils/dialpad/src/dialpadinputfield.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /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: Input field -* -*/ - -#include - -#include -#include -#include -#include - -#include "dialpadinputfield.h" -#include "dialpadbutton.h" - -static const QLatin1String HbBackspaceIcon("qtg_mono_backspace2"); -static const int DialpadAutoRepeatInterval = 150; // ms -static const int DialpadAutoRepeatDelay = 1000; // ms -static const qreal DialpadComponentMargin = 0.75; // units -static const qreal DialpadBackspaceWidth = 9.4; // units -static const qreal DialpadInputFieldHeight = 6.3; // units -static const int DialpadMaxEditStringLenght = 100; - -DialpadInputField::DialpadInputField(QGraphicsItem* parent) - : HbWidget(parent) -{ - // create editor - mNumberEditor = new HbLineEdit(this); - HbEditorInterface editorInterface(mNumberEditor); - editorInterface.setFilter(HbPhoneNumberFilter::instance()); - editorInterface.setInputConstraints(HbEditorConstraintIgnoreFocus); - mNumberEditor->setMaxLength(DialpadMaxEditStringLenght); - mNumberEditor->setMinRows(1); - mNumberEditor->setMaxRows(1); - mNumberEditor->setAdjustFontSizeToFitHeight(true); - - // create backspace button - mBackspace = new DialpadButton(this); - mBackspace->setButtonType(DialpadButton::FunctionButton); // for css - mBackspace->setFocusPolicy(Qt::NoFocus); - mBackspace->setFlag(QGraphicsItem::ItemIsFocusable,false); - mBackspace->setIcon(HbIcon(HbBackspaceIcon)); - mBackspace->setEnabled(false); - QString buttonName; - buttonName.setNum(Qt::Key_Backspace); - mBackspace->setObjectName(buttonName); - mBackspace->setAutoRepeat(true); - mBackspace->setAutoRepeatInterval(DialpadAutoRepeatInterval); - mBackspace->setAutoRepeatDelay(DialpadAutoRepeatDelay); - - connect(mNumberEditor,SIGNAL(contentsChanged()), - SLOT(onEditorContentChanged())); - - // set input field layout - qreal unit = HbDeviceProfile::current().unitValue(); - mHeight = (int) DialpadInputFieldHeight * unit; - QGraphicsLinearLayout* layout = new QGraphicsLinearLayout; - layout->addItem(mNumberEditor); - layout->setAlignment(mNumberEditor,Qt::AlignVCenter); - layout->addItem(mBackspace); - layout->setContentsMargins(0,0,0,0); - layout->setSpacing(DialpadComponentMargin* unit); - // layout parameters - mBackspace->setPreferredWidth(DialpadBackspaceWidth * unit); - mBackspace->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding); - setLayout(layout); -} - -DialpadInputField::~DialpadInputField() -{ -} - -HbLineEdit& DialpadInputField::editor() const -{ - return *mNumberEditor; -} - -DialpadButton& DialpadInputField::backspaceButton() const -{ - return *mBackspace; -} - -void DialpadInputField::onEditorContentChanged() -{ - mBackspace->setEnabled(mNumberEditor->text().length()); -} - -QSizeF DialpadInputField::sizeHint( - Qt::SizeHint which, - const QSizeF & constraint) const -{ - Q_UNUSED(which); - Q_UNUSED(constraint); - - // input field height is fixed - QSizeF sh; - sh.setHeight(mHeight); - return sh; -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadkeyhandler.cpp --- a/telutils/dialpad/src/dialpadkeyhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/*! -* 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: Custom button -* -*/ - -#include -#ifdef Q_OS_SYMBIAN -#include -#endif // Q_OS_SYMBIAN -#include "dialpad.h" -#include "dialpadkeyhandler.h" -#include "dialpadvoicemailboxeventfilter.h" -#include "dialpadvideomailboxeventfilter.h" -#include "dialpadbluetootheventfilter.h" -#include "dialpadkeysequenceeventfilter.h" -#include "dialpademergencycalleventfilter.h" -#include "dialpadhasheventfilter.h" -#include "qtphonesrvlog.h" - -DialpadKeyHandler::DialpadKeyHandler( - Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) - : - QObject(parent), - mMainWindow(mainWindow), - mVmbxFilter(0), - mVideoVmbxFilter(0), - mBtFilter(0), - mKeySequenceFilter(0), - mEmergencyCallFilter(0), - mHashFilter(0) -{ - PHONE_TRACE; - - // Variations - bool isVideoMailboxSupported = false; -#ifdef Q_OS_SYMBIAN - isVideoMailboxSupported = FeatureManager::FeatureSupported(KFeatureIdCsVideoTelephony); -#endif // Q_OS_SYMBIAN - - mVmbxFilter.reset(new DialpadVoiceMailboxEventFilter(dialPad)); - if (isVideoMailboxSupported) { - mVideoVmbxFilter.reset(new DialpadVideoMailboxEventFilter(dialPad)); - } - mBtFilter.reset(new DialpadBluetoothEventFilter(dialPad)); - mKeySequenceFilter.reset(new DialpadKeySequenceEventFilter(dialPad)); - mHashFilter.reset(new DialpadHashEventFilter(dialPad)); - - // Stack different event filters - mMainWindow.installEventFilter(mVmbxFilter.data()); - if (isVideoMailboxSupported) { - mMainWindow.installEventFilter(mVideoVmbxFilter.data()); - } - mMainWindow.installEventFilter(mBtFilter.data()); - mMainWindow.installEventFilter(mKeySequenceFilter.data()); - mMainWindow.installEventFilter(mHashFilter.data()); -} - - -DialpadKeyHandler::DialpadKeyHandler( - Dialpad *dialPad, - DialpadKeyHandler::DialpadKeyEventFilters filters, - QObject *parent) - : - QObject(parent), - mMainWindow(*(dialPad->mainWindow())), - mVmbxFilter(0), - mVideoVmbxFilter(0), - mBtFilter(0), - mKeySequenceFilter(0), - mEmergencyCallFilter(0), - mHashFilter(0) -{ - PHONE_TRACE; - - if (filters.testFlag(VoiceMailbox)) { - mVmbxFilter.reset(new DialpadVoiceMailboxEventFilter(dialPad)); - mMainWindow.installEventFilter(mVmbxFilter.data()); - } - - if (filters.testFlag(VideoMailBox)) { - mVideoVmbxFilter.reset( - new DialpadVideoMailboxEventFilter(dialPad)); - mMainWindow.installEventFilter(mVideoVmbxFilter.data()); - } - - if (filters.testFlag(Bluetooth)) { - mBtFilter.reset(new DialpadBluetoothEventFilter(dialPad)); - mMainWindow.installEventFilter(mBtFilter.data()); - } - - if (filters.testFlag(KeySequence)) { - mKeySequenceFilter.reset( - new DialpadKeySequenceEventFilter(dialPad)); - mMainWindow.installEventFilter(mKeySequenceFilter.data()); - } - - if (filters.testFlag(EmergencyCall)) { - mEmergencyCallFilter.reset( - new DialpadEmergencyCallEventFilter(dialPad)); - mMainWindow.installEventFilter(mEmergencyCallFilter.data()); - } - - if (filters.testFlag(Hash)) { - mHashFilter.reset(new DialpadHashEventFilter(dialPad)); - mMainWindow.installEventFilter(mHashFilter.data()); - } -} - - -DialpadKeyHandler::~DialpadKeyHandler() -{ - mMainWindow.removeEventFilter(mVmbxFilter.data()); - mMainWindow.removeEventFilter(mVideoVmbxFilter.data()); - mMainWindow.removeEventFilter(mBtFilter.data()); - mMainWindow.removeEventFilter(mKeySequenceFilter.data()); - mMainWindow.removeEventFilter(mEmergencyCallFilter.data()); - mMainWindow.removeEventFilter(mHashFilter.data()); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadkeypad.cpp --- a/telutils/dialpad/src/dialpadkeypad.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,577 +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: Dialpad keypad -* -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dialpadnumericbutton.h" -#include "dialpadkeypad.h" -#include "dialpadbutton.h" -#include "dialpadinputfield.h" - -static const int DialpadRowCount = 4; -static const int DialpadColumnCount = 3; -static const QLatin1String handsetIcon("qtg_mono_call"); -static const QLatin1String vmbxIcon("qtg_mono_voice_mailbox"); -// layout values in units -static const qreal DialpadPrimaryTextSize = 5.5; -static const qreal DialpadSecondaryTextSize = 4.0; -static const qreal DialpadIconSize = 4.0; -static const qreal DialpadPrimaryTextLeftMargin = 1.5; -static const qreal DialpadPrimarySecondaryMargin = 0.75; - -static const int DialpadKeyCodeTable[DialpadRowCount*DialpadColumnCount] = -{ - Qt::Key_1, Qt::Key_2, Qt::Key_3, - Qt::Key_4, Qt::Key_5, Qt::Key_6, - Qt::Key_7, Qt::Key_8, Qt::Key_9, - Qt::Key_Asterisk, Qt::Key_0, Qt::Key_NumberSign - // Qt::Key_Yes and Qt::Key_BackSpace are handled separately -}; - -DialpadKeypad::DialpadKeypad( - const HbMainWindow& mainWindow, - DialpadInputField& inputField, - QGraphicsItem* parent) : - HbInputButtonGroup(parent), - mMainWindow(mainWindow), - mInputField(inputField), - mMaxPrimaryLineWidth(0) -{ - setObjectName("keypad"); - - // create clicked signal mapper - mKeyClickedSignalMapper = new QSignalMapper(this); - connect(mKeyClickedSignalMapper,SIGNAL(mapped(int)), - SLOT(handleKeyClicked(int))); - - // connect backspace signals - connect(&mInputField.backspaceButton(),SIGNAL(clicked()), - mKeyClickedSignalMapper,SLOT(map())); - mKeyClickedSignalMapper->setMapping(&mInputField.backspaceButton(), - Qt::Key_Backspace); - - // create keypad - setGridSize(QSize(DialpadColumnCount, DialpadRowCount)); - setButtonBorderSize(0); - - QList buttons; - - for (int i = 0; i < DialpadRowCount * DialpadColumnCount; ++i) { - DialpadNumericButton *item = new DialpadNumericButton( - DialpadKeyCodeTable[i], - QPoint(i % DialpadColumnCount, i / DialpadColumnCount)); - buttons.append(item); - - item->setType(HbInputButton::ButtonTypeNormal); - } - - setButtons(buttons); - - // connect keypad signals - QObject::connect(this, SIGNAL(buttonPressed(const QKeyEvent&)), - this, SLOT(sendKeyPressEvent(const QKeyEvent&))); - QObject::connect(this, SIGNAL(buttonReleased(const QKeyEvent&)), - this, SLOT(sendKeyReleaseEvent(const QKeyEvent&))); - QObject::connect(this, SIGNAL(buttonLongPressed(const QKeyEvent&)), - this, SLOT(sendLongPressEvent(const QKeyEvent&))); - QObject::connect(this, SIGNAL(pressedButtonChanged(const QKeyEvent&, - const QKeyEvent&)), - this, SLOT(handleKeyChangeEvent(const QKeyEvent&, - const QKeyEvent&))); - - // create call button (parent layouts this) - mCallButton = new DialpadButton(parent); - mCallButton->setButtonType(DialpadButton::CallButton); - mCallButton->setIcon(HbIcon(handsetIcon)); - QString buttonName; - buttonName.setNum(Qt::Key_Yes); - mCallButton->setObjectName(buttonName); - connect(mCallButton,SIGNAL(clicked()), - mKeyClickedSignalMapper,SLOT(map())); - connect(mCallButton,SIGNAL(longPress(QPointF)), - mKeyClickedSignalMapper,SLOT(map())); - mKeyClickedSignalMapper->setMapping(mCallButton, - Qt::Key_Yes); - - // set button texts - setButtonTexts(); - // set button icons - button(0)->setIcon(HbIcon(vmbxIcon)); - - // update button texts when input language is changed - connect(HbInputSettingProxy::instance(), - SIGNAL(globalInputLanguageChanged(HbInputLanguage)), - this,SLOT(setButtonTexts())); - - updateColorArray(); - - mUnit = HbDeviceProfile::profile(this).unitValue(); -} - -DialpadKeypad::~DialpadKeypad() -{ -} - -void DialpadKeypad::setButtonTexts() -{ - HbInputLanguage inputLanguage = - HbInputSettingProxy::instance()->globalInputLanguage(); - const HbKeymap *keymap = - HbKeymapFactory::instance()->keymap(inputLanguage.language()); - - mGeneratedChar.clear(); - - if (keymap) { - int buttonCount = (DialpadRowCount*DialpadColumnCount); - for (int i = 0; i < buttonCount; i++) { - int keyCode = DialpadKeyCodeTable[i]; - - if (keyCode == Qt::Key_Asterisk) { - // asterisk is not localized - QChar asterisk('*'); - button(i)->setText(asterisk); - button(i)->setSecondaryText(QLatin1String("+")); - mGeneratedChar.insert(Qt::Key_Asterisk, asterisk); - continue; - } - - if (keyCode == Qt::Key_NumberSign) { - // number sign is not localized - QChar numberSign('#'); - button(i)->setText(numberSign); - mGeneratedChar.insert(Qt::Key_NumberSign, numberSign); - continue; - } - - int index = i; - if (keyCode==Qt::Key_0) { - index = i-1; - } - - const HbMappedKey *key = - keymap->keyForIndex(HbKeyboardVirtual12Key, index); - - if (key) { - QChar numberChar = - HbInputUtils::findFirstNumberCharacterBoundToKey( - key, - inputLanguage.language(), - HbInputUtils::inputDigitType(inputLanguage.language())); - - // button text - button(i)->setText(numberChar); - mGeneratedChar.insert(keyCode,numberChar); - - // additional text (letters) - int numberOfCharacters; - if (keyCode==Qt::Key_7 || keyCode == Qt::Key_9) { - numberOfCharacters = 4; - } else if (keyCode==Qt::Key_0||keyCode==Qt::Key_1) { - numberOfCharacters = 0; - } else { - numberOfCharacters = 3; - } - - QString characters = key->characters(HbModifierNone); - - if (numberOfCharacters!=0 && keyCode!=Qt::Key_1) { - button(i)->setSecondaryText(characters.left(numberOfCharacters)); - } - } - } - } -} - -void DialpadKeypad::handleKeyClicked(int key) -{ - // concerns only yes and backspace keys - postKeyEvent(QEvent::KeyPress, key); - postKeyEvent(QEvent::KeyRelease, key); -} - -void DialpadKeypad::postKeyEvent(QEvent::Type type, int key) -{ - // send simulated key to application - QKeyEvent *keyEvent = new QKeyEvent(type, key, Qt::NoModifier); - HbApplication::postEvent(const_cast(&mMainWindow),keyEvent); -} - -void DialpadKeypad::sendKeyEventToEditor(QEvent::Type type, int key) -{ - // send key event to editor - QKeyEvent keyEvent(type, key, Qt::NoModifier, mGeneratedChar.value(key)); - HbApplication::sendEvent(&mInputField.editor(), &keyEvent); -} - -void DialpadKeypad::sendKeyPressEvent(const QKeyEvent& event) -{ - updateButtonLabels(); - mPressedNumericKey = event.key(); - postKeyEvent(QEvent::KeyPress, event.key()); -} - -void DialpadKeypad::sendKeyReleaseEvent(const QKeyEvent& event) -{ - updateButtonLabels(); - - if (mPressedNumericKey) { - // short press, update editor here - sendKeyEventToEditor(QEvent::KeyPress, event.key()); - } - - postKeyEvent(QEvent::KeyRelease, event.key()); -} - -void DialpadKeypad::sendLongPressEvent(const QKeyEvent& event) -{ - sendKeyEventToEditor(QEvent::KeyPress, event.key()); - mPressedNumericKey = 0; -} - -void DialpadKeypad::handleKeyChangeEvent( - const QKeyEvent& releaseEvent, - const QKeyEvent& pressEvent) -{ - Q_UNUSED(pressEvent) - - postKeyEvent(QEvent::KeyRelease, releaseEvent.key()); - cancelButtonPress(); -} - -void DialpadKeypad::setCallButtonEnabled(bool enabled) -{ - mCallButton->setEnabled(enabled); -} - -void DialpadKeypad::resetButtons() -{ - cancelButtonPress(); - mCallButton->setDown(false); -} - -DialpadButton& DialpadKeypad::callButton() const -{ - return *mCallButton; -} - -DialpadNumericButton* DialpadKeypad::button(int i) const -{ - return static_cast(HbInputButtonGroup::button(i)); -} - -void DialpadKeypad::updateButtonLabels() -{ - // update numeric buttons according to button state (pressed/released) - updateIconColor(); - updateTextLayouts(rect().size()); -} - -void DialpadKeypad::paint( - QPainter* painter, - const QStyleOptionGraphicsItem* option, - QWidget* widget) -{ - Q_UNUSED(option); - Q_UNUSED(widget); - - // Paints empty buttons - HbInputButtonGroup::paint(painter,option,widget); - - qreal cellWidth = boundingRect().width() / gridSize().width(); - qreal cellHeight = boundingRect().height() / gridSize().height(); - - // Draw icons - for (int i = 0; i < DialpadRowCount * DialpadColumnCount; i++) { - DialpadNumericButton *item = button(i); - - if (!item->icon().isNull()) { - // icon is centered to button - qreal x = (item->position().x() * cellWidth) + (cellWidth / 2) - - ((DialpadIconSize * mUnit) / 2); - qreal y = (item->position().y() * cellHeight) + (cellHeight / 2) - - ((DialpadIconSize * mUnit) / 2); - - qreal width = DialpadIconSize * mUnit; - qreal height = DialpadIconSize * mUnit; - - Qt::Alignment alignment = - static_cast(Qt::AlignVCenter | Qt::AlignHCenter); - item->icon().paint(painter, - QRectF(x,y,width,height), - Qt::KeepAspectRatio, - alignment); - } - } - - // Draw texts - QPen origPen = painter->pen(); - for (int i = 0; i < mTextLayouts.count(); ++i) { - if (i==SecondaryText) { - // dimmed in normal state - painter->setPen(mColors.at(Pressed+1)); - } else { - // otherwise normal or pressed color - painter->setPen(mColors.at(i/TextTypeCount)); - } - mTextLayouts.at(i)->draw(painter, QPointF(0, 0)); - } - painter->setPen(origPen); -} - -void DialpadKeypad::updateColorArray() -{ - mColors.clear(); - - QColor normalColor = HbColorScheme::color("qtc_input_button_normal"); - mColors.insert(Normal, normalColor); - - QColor pressedColor = HbColorScheme::color("qtc_input_button_pressed"); - mColors.insert(Pressed, pressedColor); - - // this is used for alphabets shown dimmed, use alpha until exact color - // is specified - QColor disabledColor = HbColorScheme::color("qtc_input_button_normal"); - disabledColor.setAlpha(128); - mColors.insert(Pressed+1, disabledColor); -} - -void DialpadKeypad::updateIconColor() -{ - for (int i = 0; i < (DialpadRowCount * DialpadColumnCount); i++) { - DialpadNumericButton *item = button(i); - - if (item->state()==HbInputButton::ButtonStatePressed) { - item->icon().setColor(mColors.at(Pressed)); - } else { - item->icon().setColor(mColors.at(Normal)); - } - } -} - -void DialpadKeypad::cancelButtonPress() -{ - HbInputButtonGroup::cancelButtonPress(); - updateButtonLabels(); -} - -void DialpadKeypad::setGeometry(const QRectF &rect) -{ - HbInputButtonGroup::setGeometry(rect); - updateTextLayouts(rect.size()); -} - -void DialpadKeypad::changeEvent(QEvent *event) -{ - HbInputButtonGroup::changeEvent(event); - - if (event->type() == HbEvent::ThemeChanged) { - updateColorArray(); - updateIconColor(); - } -} - -void DialpadKeypad::updateTextLayouts(const QSizeF &size) -{ - if (!size.width() && !size.height()) { - return; - } - - // get normal and pressed state texts - QList textContent; - resolveTextContent(textContent); - - // layout the texts - createTextLayouts(size, textContent); -} - -void DialpadKeypad::resolveTextContent(QList &content) -{ - QString normalState; - QString normalStateSecondary; - QString pressedState; - QString pressedStateSecondary; - - for (int i = 0; i < (DialpadRowCount*DialpadColumnCount); i++) { - DialpadNumericButton *item = button(i); - if (item->state()==HbInputButton::ButtonStatePressed) { - if (item->text().length()) { - pressedState.append(item->text()); - pressedState.append(QChar(QChar::LineSeparator)); - } - - if (item->secondaryText().length()) { - pressedStateSecondary.append(item->secondaryText()); - pressedStateSecondary.append(QChar(QChar::LineSeparator)); - } - } else { // ButtonStateNormal - if (item->text().length()) { - normalState.append(item->text()); - normalState.append(QChar(QChar::LineSeparator)); - } - - if (item->secondaryText().length()) { - normalStateSecondary.append(item->secondaryText()); - normalStateSecondary.append(QChar(QChar::LineSeparator)); - } - } - } - - content.insert(PrimaryText, normalState); - content.insert(SecondaryText, normalStateSecondary); - content.insert(TextTypeCount + Pressed, pressedState); - content.insert(StateCount + SecondaryText, pressedStateSecondary); -} - -void DialpadKeypad::createTextLayouts( - const QSizeF &size, const QList &content) -{ - // clear old layouts - qDeleteAll(mTextLayouts); - mTextLayouts.clear(); - - if (content.count()==2) { - // line width is measured only when all buttons are in normal state - mMaxPrimaryLineWidth = 0; - } - - QFont primaryfFont = HbFontSpec(HbFontSpec::Primary).font(); - primaryfFont.setPixelSize(DialpadPrimaryTextSize * mUnit); - - QFont secondaryFont = HbFontSpec(HbFontSpec::Secondary).font(); - secondaryFont.setPixelSize(DialpadSecondaryTextSize * mUnit); - - for (int i=0; i < (StateCount*TextTypeCount); i++ ) { - QString text = content.at(i); - - if (!text.isNull()) { - QTextLayout* textLayout; - int type; - - if (i%TextTypeCount) { - textLayout = new QTextLayout(text,secondaryFont); - type = SecondaryText; - } else { - textLayout = new QTextLayout(text,primaryfFont); - type = PrimaryText; - } - - mTextLayouts.append(textLayout); - - textLayout->beginLayout(); - - int state = (i>=TextTypeCount) ? Pressed : Normal; - - layoutTextLines(size,*textLayout,state,type); - - textLayout->endLayout(); - - textLayout->setCacheEnabled(true); - } - } -} - -void DialpadKeypad::layoutTextLines( - const QSizeF &size, - QTextLayout &textLayout, - int state, - int type) -{ - QFontMetricsF fontMetrics(textLayout.font()); - qreal textHeight = fontMetrics.height(); - - qreal cellWidth = size.width() / gridSize().width(); - qreal cellHeight = size.height() / gridSize().height(); - qreal maxLineWidth = 0; - - for (int j = 0; j < (DialpadRowCount*DialpadColumnCount); j++) { - DialpadNumericButton *item = button(j); - - if ((type==PrimaryText && item->text().isNull()) || - (type==SecondaryText && item->secondaryText().isNull())) { - continue; // no text for this button -> next button - } - - if ( ( state==Normal && - item->state()==HbInputButton::ButtonStateReleased ) || - ( state==Pressed && - item->state()==HbInputButton::ButtonStatePressed ) ) { - - QTextLine line = textLayout.createLine(); - - qreal textPositionX = 0; - qreal textPositionY = 0; - - if (line.isValid()) { - line.setNumColumns(item->text().length()); - // layout text line - if (type==SecondaryText) { - if (j==9) { - // + is centered to button - qreal lineWidth = fontMetrics.width(item->text()); - textPositionX = (item->position().x() * cellWidth) + - (cellWidth / 2) - - (lineWidth / 2); - textPositionY = (item->position().y() + - (0.5 * item->size().height())) * - cellHeight - (0.5 * textHeight); - - } else { - textPositionX = (item->position().x() * cellWidth) + - (DialpadPrimaryTextLeftMargin * mUnit) + - mMaxPrimaryLineWidth + - (DialpadPrimarySecondaryMargin * mUnit) - + buttonBorderSize(); - textPositionY = (item->position().y() + - (0.5 * item->size().height())) * - cellHeight - (0.5 * textHeight); - } - } else { - textPositionX = (item->position().x() * cellWidth) + - (DialpadPrimaryTextLeftMargin * mUnit) - + buttonBorderSize(); - textPositionY = (item->position().y() + - (0.5 * item->size().height())) * - cellHeight - (0.5 * textHeight); - - // store line width, for drawing secondary text - qreal lineWidth = fontMetrics.width(item->text()); - if (mMaxPrimaryLineWidth == 0 && (j>0 && j<10) && - lineWidth > maxLineWidth) { - maxLineWidth = lineWidth; - } - } - } - - line.setPosition(QPointF(textPositionX, textPositionY)); - } - } - - mMaxPrimaryLineWidth = maxLineWidth; -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadkeysequenceeventfilter.cpp --- a/telutils/dialpad/src/dialpadkeysequenceeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -/* -* 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: Implements key sequence recognition filter for Dialpad. -* -*/ -#include -#include -#include -#include -#ifdef Q_OS_SYMBIAN -#include -#include -#endif //Q_OS_SYMBIAN -#include "dialpadkeysequenceeventfilter.h" -#include "dialpad.h" -#include "qtphonesrvlog.h" - -/*! - DialpadKeySequenceEventFilter::DialpadKeySequenceEventFilter. - */ -DialpadKeySequenceEventFilter::DialpadKeySequenceEventFilter( - Dialpad* dialpad, QObject* parent) - : - QObject(parent), mDialpad(dialpad) -{ - PHONE_TRACE; - - constructKeySequenceToHandlerMappings(); -} - - -/*! - DialpadKeySequenceEventFilter::~DialpadKeySequenceEventFilter. - */ -DialpadKeySequenceEventFilter::~DialpadKeySequenceEventFilter() -{ - PHONE_TRACE; -} - - -/*! - DialpadKeySequenceEventFilter::eventFilter. - */ -bool DialpadKeySequenceEventFilter::eventFilter(QObject *watched, QEvent *event) -{ - Q_UNUSED(watched) - - const bool eventFiltered = false; -#ifdef Q_OS_SYMBIAN - // Code is executed after '#' is pressed as specified in Dialer UI - // specification. - if (QEvent::KeyRelease == event->type()){ - QKeyEvent *keyEvent = static_cast(event); - if (Qt::Key_NumberSign == keyEvent->key()) { - QString keySequenceCandidate = HbStringUtil::convertDigitsTo( - mDialpad->editor().text(), WesternDigit); - XQAiwInterfaceDescriptor keySequenceHandler = - findKeySequenceHandler(keySequenceCandidate); - if (keySequenceHandler.isValid()) { - QScopedPointer request(mAiwMgr.create( - keySequenceHandler, - "executeKeySequence(QString)", - false)); - request->setSynchronous(true); - request->setBackground(true); - QList arguments; - arguments << keySequenceCandidate; - request->setArguments(arguments); - - QVariant keySequenceProcessed; - bool requestOk = request->send(keySequenceProcessed); - if (requestOk && keySequenceProcessed.toBool()) { - mDialpad->editor().setText(QString("")); - } - } - } - } -#else - Q_UNUSED(event) -#endif // Q_OS_SYMBIAN - - return eventFiltered; -} - - -/*! - DialpadKeySequenceEventFilter::constructKeySequenceToHandlerMappings. - */ -void DialpadKeySequenceEventFilter::constructKeySequenceToHandlerMappings() -{ - PHONE_TRACE; - - QList implementations = mAiwMgr.list( - "com.nokia.symbian.IKeySequenceRecognition", - ""); - - foreach (XQAiwInterfaceDescriptor d, implementations) - { - QScopedPointer request(mAiwMgr.create( - d, - "keySequenceValidator()", - false)); - request->setSynchronous(true); - request->setBackground(true); - - QVariant keySequenceValidator; - bool requestOk = request->send(keySequenceValidator); - if (requestOk && keySequenceValidator.toString().size()) { - QString validator = keySequenceValidator.toString(); - mValidators[validator] = d; - } - } -} - - -/*! - DialpadKeySequenceEventFilter::findKeySequenceHandler. - */ -XQAiwInterfaceDescriptor DialpadKeySequenceEventFilter::findKeySequenceHandler( - const QString &keySequenceCandidate) -{ - PHONE_TRACE; - - XQAiwInterfaceDescriptor keySequenceHandler; - - QList validatorExpressions = mValidators.keys(); - QList::const_iterator it; - for (it = validatorExpressions.constBegin(); - (it != validatorExpressions.constEnd()) && (!keySequenceHandler.isValid()); - ++it) { - QString validatorExpression = *it; - QRegExp expression(validatorExpression); - if (expression.exactMatch(keySequenceCandidate)) { - keySequenceHandler = mValidators.value(*it); - } - } - - return keySequenceHandler; -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadmailboxeventfilterbase.cpp --- a/telutils/dialpad/src/dialpadmailboxeventfilterbase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include -#include "dialpadmailboxeventfilterbase.h" -#include "dialpadsymbianwrapper.h" -#include "dialpad.h" -#include "qtphonesrvlog.h" - -#ifdef Q_OS_SYMBIAN -#include -#include -#endif //Q_OS_SYMBIAN - -const int DialpadLongKeyPressButtonCount(3); -static const int DialpadLongKeyPressSupportingButtons[DialpadLongKeyPressButtonCount] = -{ Qt::Key_1, Qt::Key_2, Qt::Key_NumberSign }; - - -DialpadMailboxEventFilterBase::DialpadMailboxEventFilterBase(Dialpad* dialpad, QObject* parent) : - QObject(parent), mDialpad(dialpad), mKeyEvent(NULL) -{ - PHONE_TRACE; - mLongPressTimer = new QTimer(this); - mLongPressTimer->setSingleShot(true); - connect(mLongPressTimer,SIGNAL(timeout()),this,SLOT(handleLongKeyPress())); - mSymbianWrapper = new DialpadSymbianWrapper(this); -} - -DialpadMailboxEventFilterBase::~DialpadMailboxEventFilterBase() -{ -} - -bool DialpadMailboxEventFilterBase::checkIfSendEventAndConsumeEvent(const int pressedKey, const int eventType) -{ - PHONE_TRACE4("pressedKey:", pressedKey, "eventType:", eventType); - bool sendKeyHandled(false); - // first check that pressed key is send key. - if (pressedKey == Qt::Key_Yes || - pressedKey == Qt::Key_Enter) { - if (eventType == QEvent::KeyPress) { - sendKeyHandled = handleCallButtonPress(); - } else if ((eventType == QEvent::KeyRelease) && - (!mDialpad->editor().text().isEmpty())) { - sendKeyHandled = true; - } - } - return sendKeyHandled; -} - -bool DialpadMailboxEventFilterBase::isLongKeyPressSupported(const int key) -{ - PHONE_TRACE2("key:", key); - bool longKeySupport(false); - // check if dialpad button is pressed. - for (int i = 0; i < DialpadLongKeyPressButtonCount; i++) { - if (key==DialpadLongKeyPressSupportingButtons[i]) { - longKeySupport = true; - // Save key code for handleCallButtonPress. - mKeyEvent = key; - } - } - return longKeySupport; -} - -void DialpadMailboxEventFilterBase::clearEditor() -{ - PHONE_TRACE; - // Erase data from dialpad editor. - mDialpad->editor().setText(QString("")); -} - -void DialpadMailboxEventFilterBase::createCall(const QString &phoneNumber, bool createVideoCall) -{ - PHONE_TRACE2("phoneNumber:", phoneNumber); -#ifdef Q_OS_SYMBIAN - if(createVideoCall) { - XQServiceRequest snd("com.nokia.symbian.ICallDial","dialVideo(QString)", false); - snd << phoneNumber; - QVariant retValue; - snd.send(retValue); - } else { - XQServiceRequest snd("com.nokia.symbian.ICallDial","dial(QString)", false); - snd << phoneNumber; - QVariant retValue; - snd.send(retValue); - } -#endif // Q_OS_SYMBIAN -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadmultitaphandler.cpp --- a/telutils/dialpad/src/dialpadmultitaphandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +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: Dialpad multitap handler -* -*/ - -#include -#include -#include -#include "dialpadmultitaphandler.h" - -static const int DialpadMaxMultitapTime = 800; // ms -static const int DialpadAsteriskMultitapCount = 4; -static const int DialpadAsteriskMultitapChars[DialpadAsteriskMultitapCount] = - {Qt::Key_Asterisk, Qt::Key_Plus, Qt::Key_P, Qt::Key_W}; - - -DialpadMultitapHandler::DialpadMultitapHandler( - HbLineEdit& editor, - QObject* parent) : - QObject(parent), - mEditor(editor), - mAsteriskMultitapIndex(0), - mGeneratedAsterisk(false) -{ - // extra characters - mExtraChar.insert(Qt::Key_Asterisk, '*'); - mExtraChar.insert(Qt::Key_Plus, '+'); - mExtraChar.insert(Qt::Key_P, 'p'); - mExtraChar.insert(Qt::Key_W, 'w'); -} - -DialpadMultitapHandler::~DialpadMultitapHandler() -{ -} - -bool DialpadMultitapHandler::eventFilter(QObject *watched, QEvent *event) -{ - if (watched!=&mEditor) { - return false; - } - - int type = event->type(); - - if (type==QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - if (isNumericKey(keyEvent->key()) && - keyEvent->text().isEmpty() ) { - return true; - } - } - - bool keyEventEaten = false; - - if (type==QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - - if (keyEvent->key()==Qt::Key_Asterisk) { - if ((mMultitapTimer.elapsed() <= DialpadMaxMultitapTime) && - !mGeneratedAsterisk) { - // remove the last char by generated backspace - QKeyEvent backspaceEvent(QEvent::KeyPress, - Qt::Key_Backspace, - Qt::NoModifier, ""); - HbApplication::sendEvent(&mEditor,&backspaceEvent); - - // generate +,p,w,* character - mAsteriskMultitapIndex = - ++mAsteriskMultitapIndex % DialpadAsteriskMultitapCount; - - int key = DialpadAsteriskMultitapChars[mAsteriskMultitapIndex]; - - // Allow + character only as a first char in editor - int cursorPosition = mEditor.cursorPosition(); - if(cursorPosition != 0 && key == Qt::Key_Plus) { - mAsteriskMultitapIndex = ++mAsteriskMultitapIndex; - Q_ASSERT(mAsteriskMultitapIndex < DialpadAsteriskMultitapCount); - key = DialpadAsteriskMultitapChars[mAsteriskMultitapIndex]; - } - - QKeyEvent generatedEvent(QEvent::KeyPress, key, - Qt::KeypadModifier, - mExtraChar.value(key)); - if (key==Qt::Key_Asterisk) { - mGeneratedAsterisk = true; - } - - HbApplication::sendEvent(&mEditor,&generatedEvent); - keyEventEaten = true; - mMultitapTimer.start(); - } else { - mMultitapTimer.start(); - mAsteriskMultitapIndex = 0; - } - - mGeneratedAsterisk = false; - } - } - - return keyEventEaten; -} - -bool DialpadMultitapHandler::isNumericKey(int key) -{ - if (key==Qt::Key_Yes || key==Qt::Key_Backspace) { - return false; - } else { - return true; - } -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadnumericbutton.cpp --- a/telutils/dialpad/src/dialpadnumericbutton.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/*! -* 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: Extends HbInputButton -* -*/ - - -#include "dialpadnumericbutton.h" - -DialpadNumericButton::DialpadNumericButton( - int keyCode, const QPoint &position, const QSize &size) - : HbInputButton(keyCode, position, size) -{ -} - -DialpadNumericButton::~DialpadNumericButton() -{ -} - -void DialpadNumericButton::setIcon(const HbIcon& icon) -{ - mIcon = icon; -} - -HbIcon& DialpadNumericButton::icon() -{ - return mIcon; -} - -void DialpadNumericButton::setText(const QString& text) -{ - mText = text; -} - -QString DialpadNumericButton::text() const -{ - return mText; -} - -void DialpadNumericButton::setSecondaryText(const QString& text) -{ - mSecondaryText = text; -} - -QString DialpadNumericButton::secondaryText() const -{ - return mSecondaryText; -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadsymbianwrapper.cpp --- a/telutils/dialpad/src/dialpadsymbianwrapper.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/*! -* 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: Provides information about ongoing calls. -* -*/ - -#include "dialpadsymbianwrapper.h" -#include "dialpadsymbianwrapper_p.h" - - -DialpadSymbianWrapper::DialpadSymbianWrapper(QObject *parent) : - QObject(parent), - d_ptr(new DialpadSymbianWrapperPrivate(this)) -{ -} - -DialpadSymbianWrapper::~DialpadSymbianWrapper() -{ - delete d_ptr; -} - -int DialpadSymbianWrapper::getMailboxNumber(QString &vmbxNumber) -{ - //Q_D(DialpadSymbianWrapper); - return d_ptr->getMailboxNumber(vmbxNumber); -} - -int DialpadSymbianWrapper::getVideoMailboxNumber(QString &vmbxNumber) -{ - return d_ptr->getVideoMailboxNumber(vmbxNumber); -} - -int DialpadSymbianWrapper::defineMailboxNumber(QString &vmbxNumber) -{ - //Q_D(DialpadSymbianWrapper); - return d_ptr->defineMailboxNumber(vmbxNumber); -} - -int DialpadSymbianWrapper::defineVideoMailboxNumber(QString &vmbxNumber) -{ - return d_ptr->defineVideoMailboxNumber(vmbxNumber); -} - -bool DialpadSymbianWrapper::changeSilentModeState() -{ - return d_ptr->changeSilentModeState(); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadsymbianwrapper_p.cpp --- a/telutils/dialpad/src/dialpadsymbianwrapper_p.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/*! -* 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: Provides information about ongoing calls. -* -*/ - -#include "dialpadsymbianwrapper.h" -#include "dialpadsymbianwrapper_p.h" -#include -#include -#include -#include -#include - -DialpadSymbianWrapperPrivate::DialpadSymbianWrapperPrivate(DialpadSymbianWrapper *parent) : - q_ptr(parent) -{ - TRAPD(error, mVmbx = CVoiceMailbox::NewL()); - qt_symbian_throwIfError(error); -} - -DialpadSymbianWrapperPrivate::~DialpadSymbianWrapperPrivate() -{ - delete mVmbx; - mVmbx = NULL; -} - -int DialpadSymbianWrapperPrivate::getMailboxNumber(QString &vmbxNumber) -{ - int errValue(KErrNone); - CVoiceMailboxEntry* vmbxEntry = NULL; - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVoice; - - errValue = mVmbx->GetStoredEntry(vmbxParams, vmbxEntry); - - if (KErrNone == errValue) { - // Number retrieved succesfully: - vmbxNumber = getVmbxNumber(*vmbxEntry); - } - // Entry ownership was transferred. - delete vmbxEntry; - vmbxEntry = NULL; - return errValue; -} - -int DialpadSymbianWrapperPrivate::getVideoMailboxNumber(QString &vmbxNumber) -{ - int errValue(KErrNone); - CVoiceMailboxEntry* vmbxEntry = NULL; - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVideo; - - errValue = mVmbx->GetStoredEntry(vmbxParams, vmbxEntry); - - if (KErrNone == errValue) { - // Number retrieved succesfully: - vmbxNumber = getVmbxNumber(*vmbxEntry); - } - // Entry ownership was transferred. - delete vmbxEntry; - vmbxEntry = NULL; - return errValue; -} - -int DialpadSymbianWrapperPrivate::defineMailboxNumber(QString &vmbxNumber) -{ - CVoiceMailboxEntry* vmbxEntry = NULL; - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVoice; - - int errValue = mVmbx->QueryNewEntry(vmbxParams, vmbxEntry); - if (KErrNone == errValue) { - mVmbx->SaveEntry(*vmbxEntry); - // Do appropriate tasks, e.g. save number. - vmbxNumber = getVmbxNumber(*vmbxEntry); - } - - return errValue; -} - -int DialpadSymbianWrapperPrivate::defineVideoMailboxNumber(QString &vmbxNumber) -{ - CVoiceMailboxEntry* vmbxEntry = NULL; - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVideo; - - int errValue = mVmbx->QueryNewEntry(vmbxParams, vmbxEntry); - if (KErrNone == errValue) { - mVmbx->SaveEntry(*vmbxEntry); - // Do appropriate tasks, e.g. save number. - vmbxNumber = getVmbxNumber(*vmbxEntry); - } - - return errValue; -} - -QString DialpadSymbianWrapperPrivate::getVmbxNumber(CVoiceMailboxEntry &vmbxEntry) -{ - TPtrC ptrNumber(KNullDesC); - QString dialpadText = NULL; - if(KErrNone == vmbxEntry.GetVmbxNumber(ptrNumber)) { - dialpadText = QString::fromUtf16(ptrNumber.Ptr(), ptrNumber.Length()); - } - return dialpadText; -} - -bool DialpadSymbianWrapperPrivate::changeSilentModeState() -{ - // first get present value from cenrep - int silenceMode( 0 ); - CRepository* cenRep = CRepository::NewL( KCRUidProfileEngine ); - int err = cenRep->Get( KProEngSilenceMode, silenceMode ); - - // then set it to another one - if (KErrNone == err) { - if (silenceMode) { - silenceMode = 0; - } - else { - silenceMode = 1; - } - } - - err = cenRep->Set( KProEngSilenceMode, silenceMode ); - delete cenRep; - return silenceMode; -} - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadsymbianwrapper_p_stub.cpp --- a/telutils/dialpad/src/dialpadsymbianwrapper_p_stub.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/*! -* 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: Provides information about ongoing calls. -* -*/ - -#include "dialpadsymbianwrapper.h" -#include "dialpadsymbianwrapper_p_stub.h" - -DialpadSymbianWrapperPrivate::DialpadSymbianWrapperPrivate(DialpadSymbianWrapper *parent) : - q_ptr(parent), - mTimes(0) -{ -} - -DialpadSymbianWrapperPrivate::~DialpadSymbianWrapperPrivate() -{ -} - -int DialpadSymbianWrapperPrivate::getMailboxNumber(QString &vmbxNumber) -{ - int errValue(0); - switch( mTimes ) { - case 0: - case 1:{ - errValue = -1; - break; - } - case 2:{ - errValue = 0; - break; - } - default: - break; - } - - return errValue; -} - -int DialpadSymbianWrapperPrivate::getVideoMailboxNumber(QString &vmbxNumber) -{ - return getMailboxNumber(vmbxNumber); -} - -int DialpadSymbianWrapperPrivate::defineMailboxNumber(QString &vmbxNumber) -{ - int errValue(0); - - switch( mTimes ) { - case 0:{ - errValue = 0; - vmbxNumber.append("12345678"); - break; - } - case 1:{ - errValue = -3; - vmbxNumber.append(""); - break; - } - default: - break; - } - mTimes++; - return errValue; -} - -int DialpadSymbianWrapperPrivate::defineVideoMailboxNumber(QString &vmbxNumber) -{ - return defineMailboxNumber(vmbxNumber); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadvideomailboxeventfilter.cpp --- a/telutils/dialpad/src/dialpadvideomailboxeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include -#include "dialpadvideomailboxeventfilter.h" -#include "dialpadsymbianwrapper.h" -#include "dialpad.h" -#include "qtphonesrvlog.h" - -#ifdef Q_OS_SYMBIAN -#include -#endif //Q_OS_SYMBIAN - -#include -#include -#include - - -const QString VideoVmbxCharacter("2"); - -DialpadVideoMailboxEventFilter::DialpadVideoMailboxEventFilter(Dialpad* dialpad, QObject* parent) : - DialpadMailboxEventFilterBase(dialpad, parent) -{ -} - -DialpadVideoMailboxEventFilter::~DialpadVideoMailboxEventFilter() -{ -} - -bool DialpadVideoMailboxEventFilter::eventFilter(QObject *watched, QEvent *event) -{ - Q_UNUSED(watched) - bool keyEventEaten(false); - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - if (checkIfSendEventAndConsumeEvent(keyEvent->key(), event->type())) { - keyEventEaten = true; - } else if ((isLongKeyPressSupported(keyEvent->key())) && - !(mDialpad->editor().text().length() >= 1)) { - //Check that there is only one item in dialpad, if there is more than one - //do not handle long key press. - mLongPressTimer->stop(); - mLongPressTimer->start(DialpadLongKeyPressTimeOut); - } - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - if (checkIfSendEventAndConsumeEvent(keyEvent->key(), event->type())) { - keyEventEaten = true; - } else if (isLongKeyPressSupported(keyEvent->key())){ - mLongPressTimer->stop(); - } - } - - return keyEventEaten; -} - -void DialpadVideoMailboxEventFilter::handleLongKeyPress() -{ - PHONE_TRACE; - switch(mKeyEvent) { - case Qt::Key_2:{ - handleMailboxOperation(); - break; - } - default: - // Do nothing. - break; - } - - // Reset key code. - mKeyEvent = NULL; -} - -bool DialpadVideoMailboxEventFilter::handleCallButtonPress() -{ - PHONE_TRACE; - bool callButtonhandled(false); - if (!mDialpad->editor().text().isEmpty()) { -#ifdef Q_OS_SYMBIAN - // check if editor has '2' character if does then - // get MailboxNumber. - QString editorContent = HbStringUtil::convertDigitsTo( - mDialpad->editor().text(), WesternDigit); - if (VideoVmbxCharacter==editorContent) { - handleMailboxOperation(); - callButtonhandled = true; - } -#endif //Q_OS_SYMBIAN - } - return callButtonhandled; -} - -void DialpadVideoMailboxEventFilter::handleMailboxOperation() -{ - PHONE_TRACE; - - if (isVideoMbxSupported()) { - QString mailboxNumber; - int error = mSymbianWrapper->getVideoMailboxNumber(mailboxNumber); - // If here is no vmbx number and dialpad must start vmbx number definition procedures. - if (DialpadErrorNone != error || mailboxNumber.length() == 0) { - mDialpad->closeDialpad(); - // If define mailbox query was interupted than reopen dialpad. - error = mSymbianWrapper->defineVideoMailboxNumber(mailboxNumber); - if (DialpadErrorCancel == error) { - mDialpad->openDialpad(); - } - } - - // Valid vmbx number found or defined and there vmbx didnt - // return error values then create a call. - if ((DialpadErrorNone == error) && - (mailboxNumber.length() != 0)) { - createCall(mailboxNumber, true); - clearEditor(); - mDialpad->openDialpad(); - } - } -} - -bool DialpadVideoMailboxEventFilter::isVideoMbxSupported() -{ - XQSettingsKey key(XQSettingsKey::TargetCentralRepository, - KCRUidVideoMailbox.iUid, - KVideoMbxSupport); - XQSettingsManager settingsMgr; - - int ret = settingsMgr.readItemValue(key, XQSettingsManager::TypeInt).toInt(); - PHONE_TRACE2("Video mbx support:", ret); - return ret; -} - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadvoicemailboxeventfilter.cpp --- a/telutils/dialpad/src/dialpadvoicemailboxeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include -#include "dialpadvoicemailboxeventfilter.h" -#include "dialpadsymbianwrapper.h" -#include "dialpad.h" -#include "qtphonesrvlog.h" - -#ifdef Q_OS_SYMBIAN -#include -#include -#endif //Q_OS_SYMBIAN - -const QString VmbxCharacter("1"); - -DialpadVoiceMailboxEventFilter::DialpadVoiceMailboxEventFilter(Dialpad* dialpad, QObject* parent) : - DialpadMailboxEventFilterBase(dialpad, parent) -{ -} - -DialpadVoiceMailboxEventFilter::~DialpadVoiceMailboxEventFilter() -{ -} - -bool DialpadVoiceMailboxEventFilter::eventFilter(QObject *watched, QEvent *event) -{ - Q_UNUSED(watched) - bool keyEventEaten(false); - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - if (checkIfSendEventAndConsumeEvent(keyEvent->key(), event->type())) { - keyEventEaten = true; - } else if ((isLongKeyPressSupported(keyEvent->key())) && - !(mDialpad->editor().text().length() >= 1)) { - //Check that there is only one item in dialpad, if there is more than one - //do not handle long key press. - mLongPressTimer->stop(); - mLongPressTimer->start(DialpadLongKeyPressTimeOut); - } - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - if (checkIfSendEventAndConsumeEvent(keyEvent->key(), event->type())) { - keyEventEaten = true; - } else if (isLongKeyPressSupported(keyEvent->key())){ - mLongPressTimer->stop(); - } - } - - return keyEventEaten; -} - -void DialpadVoiceMailboxEventFilter::handleLongKeyPress() -{ - PHONE_TRACE; - switch(mKeyEvent) { - case Qt::Key_1:{ - handleMailboxOperation(); - break; - } - default: - // Do nothing. - break; - } - - // Reset key code. - mKeyEvent = NULL; -} - -bool DialpadVoiceMailboxEventFilter::handleCallButtonPress() -{ - PHONE_TRACE; - bool callButtonhandled(false); - if (!mDialpad->editor().text().isEmpty()) { -#ifdef Q_OS_SYMBIAN - // check if editor has '1' character if does then - // get MailboxNumber. - QString editorContent = HbStringUtil::convertDigitsTo( - mDialpad->editor().text(), WesternDigit); - if (VmbxCharacter==editorContent) { - handleMailboxOperation(); - callButtonhandled = true; - } -#endif //Q_OS_SYMBIAN - } - return callButtonhandled; -} - -void DialpadVoiceMailboxEventFilter::handleMailboxOperation() -{ - PHONE_TRACE; - QString mailboxNumber; - int error = mSymbianWrapper->getMailboxNumber(mailboxNumber); - // If here is no vmbx number and dialpad must start vmbx number definition procedures. - if (DialpadErrorNone != error || mailboxNumber.length() == 0) { - mDialpad->closeDialpad(); - // If define mailbox query was interupted than reopen dialpad. - error = mSymbianWrapper->defineMailboxNumber(mailboxNumber); - if (DialpadErrorCancel == error) { - mDialpad->openDialpad(); - } - } - // Valid vmbx number found or defined and there vmbx didnt - // return error values then create a call. - if ((DialpadErrorNone == error) && - (mailboxNumber.length() != 0)) { - createCall(mailboxNumber); - clearEditor(); - mDialpad->openDialpad(); - } -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/src/dialpadvtkeyhandler.cpp --- a/telutils/dialpad/src/dialpadvtkeyhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/*! -* 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: Custom button -* -*/ - -#include -#include "dialpadvtkeyhandler.h" -#include "dialpadkeysequenceeventfilter.h" -#include "dialpademergencycalleventfilter.h" -#include "qtphonesrvlog.h" - -DialpadVtKeyHandler::DialpadVtKeyHandler( - Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) - : - QObject(parent), - mMainWindow(mainWindow), - mEmergencyCallFilter(0), - mKeySequenceFilter(0) -{ - PHONE_TRACE; - mEmergencyCallFilter = new DialpadEmergencyCallEventFilter(dialPad, this); - mKeySequenceFilter = new DialpadKeySequenceEventFilter(dialPad, this); - - // Stack different event filters - mMainWindow.installEventFilter(mKeySequenceFilter); - mMainWindow.installEventFilter(mEmergencyCallFilter); -} - -DialpadVtKeyHandler::~DialpadVtKeyHandler() -{ -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/dialpadtest/dialpadtest.pro --- a/telutils/dialpad/tsrc/dialpadtest/dialpadtest.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = app -CONFIG += hb -TARGET = dialpadtest -DEPENDPATH += . - -INCLUDEPATH += . - -HEADERS += dialpadtestview.h - -SOURCES += main.cpp \ - dialpadtestview.cpp - -RESOURCES += resources/dialpadtest.qrc - -symbian { -TARGET.EPOCHEAPSIZE = 0x1000 0xA00000 -TARGET.CAPABILITY = CAP_APPLICATION -} else:win32 { -INCLUDEPATH += ../../../../phonesrv_plat/dialpad_api/inc \ - c:/hb/include/hbcore \ - c:/hb/include/hbwidgets -} - -# Libraries -LIBS += -ldialpad - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp --- a/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,227 +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 -#include - -#include "dialpadtestview.h" -#include "dialpad.h" -#include "dialpadkeyhandler.h" - -DialpadTestView::DialpadTestView( HbMainWindow& mainWindow ) : - mMainWindow(mainWindow), mTapOutsideDismiss(0) -{ - setTitle("DialpadTest"); - - // create toolbar with launch dialer action - HbToolBar* tb = toolBar(); - if (mMainWindow.orientation()==Qt::Horizontal) { - tb->setOrientation(mMainWindow.orientation()); - } - - tb->addAction(""); - tb->addAction(HbIcon(":/qtg_large_tb_dialler.svg"),"",this,SLOT(openDialpad())); - tb->addAction(""); - - - // create menu - menu()->addAction("Switch orientation",this,SLOT(switchOrientation())); - connect(&mMainWindow, - SIGNAL(orientationChanged(Qt::Orientation)), - SLOT(onOrientationChange(Qt::Orientation))); - - menu()->addAction("Tap outside dismiss",this,SLOT(setTapOutsideDismiss())); - - // create view widget (recent calls list mockup) - createListWidget(); - - // create dialpad popup - mDialpad = new Dialpad(); // Note! no parent for popup - mDialpad->setCallButtonEnabled(false); - connect(mDialpad,SIGNAL(aboutToClose()),SLOT(onDialpadClosed())); - connect(&mDialpad->editor(),SIGNAL(contentsChanged()), - SLOT(onEditorContentChanged())); - - // create key event handler - mLongPressTimer = new QTimer(this); - mLongPressTimer->setSingleShot(true); - connect(mLongPressTimer,SIGNAL(timeout()),this,SLOT(handleLongKeyPress())); - - mKeyhandler = new DialpadKeyHandler(mDialpad, mMainWindow, this); - - mMainWindow.installEventFilter(this); -} - -DialpadTestView::~DialpadTestView() -{ - delete mDialpad; -} - -void DialpadTestView::openDialpad() -{ - toolBar()->hide(); - setDialpadPosition(); - mDialpad->openDialpad(); -} - -void DialpadTestView::onDialpadClosed() -{ - toolBar()->show(); - mDialpad->editor().setText(QString()); -} - -void DialpadTestView::onEditorContentChanged() -{ - mDialpad->setCallButtonEnabled( - mDialpad->editor().text().length()); -} - -void DialpadTestView::setDialpadPosition() -{ - QRectF screenRect(mMainWindow.layoutRect()); - - if (mMainWindow.orientation() == Qt::Horizontal) { - // dialpad takes half of the screen - mDialpad->setPos(QPointF(screenRect.width()/2, - this->scenePos().y())); - mDialpad->resize(screenRect.width()/2, - (screenRect.height()-scenePos().y())); - } else { - qreal screenHeight = screenRect.height(); - mDialpad->setPos(0, screenHeight/2.25); - mDialpad->resize(screenRect.width(),screenHeight - screenHeight/2.25); - } -} - -void DialpadTestView::switchOrientation() -{ - if (mMainWindow.orientation()==Qt::Vertical) { - mMainWindow.setOrientation(Qt::Horizontal); - - } else { - mMainWindow.setOrientation(Qt::Vertical); - } -} - -void DialpadTestView::onOrientationChange(Qt::Orientation orientation) -{ - if (orientation==Qt::Horizontal) { - toolBar()->setOrientation(Qt::Horizontal); - } - - setDialpadPosition(); -} - -void DialpadTestView::createListWidget() -{ - mListWidget = new HbListWidget(this); - for (int i=0; i<10; i++) { - HbListWidgetItem* listItem = new HbListWidgetItem; - QString logEvent("Log event "); - QString index; index.setNum(i+1); - logEvent.append(index); - listItem->setText(logEvent); - QString phoneNum("+35850123456"); - phoneNum.append(index); - listItem->setSecondaryText(phoneNum); - HbIcon icon(":/qgn_prop_pb_comm_call_large.svg"); - listItem->setIcon(icon); - mListWidget->addItem(listItem); - } - setWidget(mListWidget); -} - -bool DialpadTestView::eventFilter(QObject* watched, QEvent * event) -{ - if (watched!=&mMainWindow) { - return false; - } - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - qDebug() << "KeyEventHandler: key press:" << keyEvent->key(); - - mPressedKey = keyEvent->text(); - - if (keyEvent->key()>=Qt::Key_0 && keyEvent->key()<=Qt::Key_9) { - mLongPressTimer->stop(); - mLongPressTimer->start(1500); - } - - return false; - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - qDebug() << "KeyEventHandler: key release:" << keyEvent->key(); - - mLongPressTimer->stop(); - - if (keyEvent->key()==Qt::Key_Yes || - keyEvent->key()==Qt::Key_Enter) { - handleDial(); - } - - return false; - } - - return false; -} - -bool DialpadTestView::event(QEvent * event) -{ - if (event->type() == QEvent::LayoutDirectionChange) { - setDialpadPosition(); - } - - return HbView::event(event); -} - -void DialpadTestView::handleLongKeyPress() -{ - QString msg; - msg.append("Long press: "); - msg.append(mPressedKey); - - HbMessageBox::information(msg); -} - -void DialpadTestView::handleDial() -{ - QString msg; - if (mDialpad->editor().text().length()) { - msg.append("Dialing to number: "); - msg.append(mDialpad->editor().text()); - } else { - msg.append("Please, enter phone number first"); - } - - HbMessageBox::information(msg); -} - -void DialpadTestView::setTapOutsideDismiss() -{ - mTapOutsideDismiss = !mTapOutsideDismiss; - mDialpad->setTapOutsideDismiss(mTapOutsideDismiss); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/dialpadtest/dialpadtestview.h --- a/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +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 DIALPADTESTVIEW_H -#define DIALPADTESTVIEW_H - -#include - -class HbMainWindow; -class HbListWidget; -class Dialpad; -class DialpadKeyHandler; - -class DialpadTestView : public HbView -{ - Q_OBJECT - -public: - DialpadTestView( HbMainWindow& mainWindow ); - ~DialpadTestView(); - -protected: - bool eventFilter(QObject * watched, QEvent * event); - bool event(QEvent * event); - -private: - void createListWidget(); - void setDialpadPosition(); - void handleDial(); - -private slots: - void openDialpad(); - void onDialpadClosed(); - void switchOrientation(); - void onOrientationChange(Qt::Orientation orientation); - void onEditorContentChanged(); - void handleLongKeyPress(); - void setTapOutsideDismiss(); - -private: - HbMainWindow& mMainWindow; - HbListWidget* mListWidget; - Dialpad* mDialpad; - DialpadKeyHandler *mKeyhandler; - QTimer* mLongPressTimer; - QString mPressedKey; - bool mTapOutsideDismiss; -}; - -#endif // DIALPADTESTVIEW_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/dialpadtest/main.cpp --- a/telutils/dialpad/tsrc/dialpadtest/main.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +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 "dialpadtestview.h" - -int main(int argc, char *argv[]) -{ - HbApplication app(argc, argv); - - HbMainWindow window; - - DialpadTestView *view = new DialpadTestView(window); - window.addView(view); - - window.show(); - - return app.exec(); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/dialpadtest/resources/dialpadtest.qrc --- a/telutils/dialpad/tsrc/dialpadtest/resources/dialpadtest.qrc Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - qtg_large_tb_dialler.svg - qgn_prop_pb_comm_call_large.svg - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/dialpadtest/resources/qgn_prop_pb_comm_call_large.svg --- a/telutils/dialpad/tsrc/dialpadtest/resources/qgn_prop_pb_comm_call_large.svg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/dialpadtest/resources/qtg_large_tb_dialler.svg --- a/telutils/dialpad/tsrc/dialpadtest/resources/qtg_large_tb_dialler.svg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/dialpadtest/rom/dialpadtest.iby --- a/telutils/dialpad/tsrc/dialpadtest/rom/dialpadtest.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +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 __DIALPADTEST_IBY__ -#define __DIALPADTEST_IBY__ - -file=ABI_DIR\UREL\dialpadtest.exe PROGRAMS_DIR\dialpadtest.exe -data=DATAZ_\resource\apps\dialpadtest.rsc \resource\apps\dialpadtest.rsc -data=DATAZ_\private\10003a3f\import\apps\dialpadtest_reg.rsc \private\10003a3f\import\apps\dialpadtest_reg.rsc - -#endif diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/checkcoverage.cmd --- a/telutils/dialpad/tsrc/unit/checkcoverage.cmd Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -@echo on -:FINAL - -@echo off - -rmdir /q /s coverage -mkdir coverage -cd coverage - -if "%1"=="mt_dialpad" ( -echo Instrumenting dialpad.dll -call qmake^ - ..\..\..\dialpad.pro -call ctcwrap^ - mingw32-make debug -call qmake^ - ..\%1\%1.pro -call mingw32-make^ - debug -if "%2"=="mt_keyhandler" ( -call qmake^ - ..\%2\%2.pro -call mingw32-make^ - debug -) -call %1.exe -call %2.exe -) - -if not "%1"=="mt_dialpad" ( -echo Instrumenting %1 -call qmake^ - ..\%1\%1.pro -call ctcwrap^ - mingw32-make debug -call %1.exe -) - -call ctcpost^ - mon.sym mon.dat^ - -p profile.txt -call ctc2html -i profile.txt -cd .. -echo All done! - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/mt_dialpad/mt_dialpad.cpp --- a/telutils/dialpad/tsrc/unit/mt_dialpad/mt_dialpad.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,401 +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 "dialpadtest.h" -#include "dialpadtestutil.h" -#include "dialpad.h" - -const int WAIT_TIME = 300; -const int LONGPRESS_DURATION = 1000; - -// helper class -class KeyEventCatcher : public QObject -{ -public: - bool eventFilter(QObject* watched, QEvent * event) - { - Q_UNUSED(watched); - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - mKeyPresses.append(keyEvent->key()); - return false; - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - mKeyReleases.append(keyEvent->key()); - return false; - } - return false; - } - -public: - QList mKeyPresses; - QList mKeyReleases; -}; - -// test cases -class mt_Dialpad : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void cleanupTestCase(); - void cleanup(); - - void testNumericButtons(); - void testNumericButtonLongPress(); - void testBackspace(); - void testAsteriskMultitap(); - void testCallButton(); - void testCloseGesture(); - void testOpenDialogWhileButtonPressed(); - void testTapOutsideDismiss(); - -#ifndef Q_OS_SYMBIAN - void testCloseGestureLandscape(); - void testOrientationChange(); -#endif - -private: - HbMainWindow* mMainWindow; - Dialpad* mDialpad; - KeyEventCatcher* mKeyCatcher; - DialpadTestUtil* mUtil; -}; - -void mt_Dialpad::initTestCase() -{ - mMainWindow = new HbMainWindow; - - mKeyCatcher = new KeyEventCatcher; - mMainWindow->installEventFilter(mKeyCatcher); - - mUtil = new DialpadTestUtil(*mMainWindow); - - mDialpad = new Dialpad(*mMainWindow); - - QRectF rect(mMainWindow->contentsRect()); - rect.setHeight(rect.height()*0.7); - rect.moveTop((mMainWindow->contentsRect().height()-rect.height())/2); - - mDialpad->resize(mMainWindow->layoutRect().width(), - mMainWindow->layoutRect().height()/2); - mDialpad->setPos(0,mMainWindow->layoutRect().height()/4); - - mMainWindow->show(); - mDialpad->show(); - mDialpad->hide(); -} - -void mt_Dialpad::cleanupTestCase() -{ - delete mDialpad; - delete mMainWindow; - delete mKeyCatcher; - delete mUtil; -} - -void mt_Dialpad::cleanup() -{ - mKeyCatcher->mKeyPresses.clear(); - mKeyCatcher->mKeyReleases.clear(); - mDialpad->editor().setText(QString()); - QTest::qWait( WAIT_TIME ); // delay between tests -} - -void mt_Dialpad::testNumericButtons() -{ - QSignalSpy aboutToOpenSpy( mDialpad, SIGNAL(aboutToOpen())); - QSignalSpy aboutToCloseSpy( mDialpad, SIGNAL(aboutToClose())); - - QVERIFY(mDialpad->isOpen()==false); - mDialpad->openDialpad(); - QVERIFY(mDialpad->isOpen()==true); - QVERIFY(aboutToOpenSpy.count()==1); - QTest::qWait( 2*WAIT_TIME ); - - mUtil->mouseClickDialpad(Qt::Key_1); - mUtil->mouseClickDialpad(Qt::Key_2); - mUtil->mouseClickDialpad(Qt::Key_3); - mUtil->mouseClickDialpad(Qt::Key_4); - mUtil->mouseClickDialpad(Qt::Key_5); - mUtil->mouseClickDialpad(Qt::Key_6); - mUtil->mouseClickDialpad(Qt::Key_7); - mUtil->mouseClickDialpad(Qt::Key_8); - mUtil->mouseClickDialpad(Qt::Key_9); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - mUtil->mouseClickDialpad(Qt::Key_0); - mUtil->mouseClickDialpad(Qt::Key_NumberSign); - - QVERIFY(mDialpad->editor().text()=="123456789*0#"); - - QVERIFY(mKeyCatcher->mKeyPresses.count()==12); - QVERIFY(mKeyCatcher->mKeyReleases.count()==12); - QVERIFY(mKeyCatcher->mKeyPresses.at(0)==Qt::Key_1); - QVERIFY(mKeyCatcher->mKeyReleases.at(0)==Qt::Key_1); - QVERIFY(mKeyCatcher->mKeyPresses.at(11)==Qt::Key_NumberSign); - QVERIFY(mKeyCatcher->mKeyReleases.at(11)==Qt::Key_NumberSign); - mDialpad->closeDialpad(); - QVERIFY(mDialpad->isOpen()==false); - QVERIFY(aboutToCloseSpy.count()==1); -} - -void mt_Dialpad::testNumericButtonLongPress() -{ - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Press); - QTest::qWait( LONGPRESS_DURATION ); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Release); - QVERIFY(mDialpad->editor().text()=="1"); - mDialpad->closeDialpad(); -} - -void mt_Dialpad::testBackspace() -{ - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_1); - QVERIFY(mDialpad->editor().text()=="1"); - mUtil->mouseClickDialpad(Qt::Key_Backspace); - QVERIFY(mDialpad->editor().text()==""); - QVERIFY(mKeyCatcher->mKeyPresses.count()==2); - QVERIFY(mKeyCatcher->mKeyReleases.count()==2); - QVERIFY(mKeyCatcher->mKeyPresses.at(1)==Qt::Key_Backspace); - QVERIFY(mKeyCatcher->mKeyReleases.at(1)==Qt::Key_Backspace); - // test repeats - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_1); - mUtil->mouseClickDialpad(Qt::Key_2); - mUtil->mouseClickDialpad(Qt::Key_3); - QVERIFY(mDialpad->editor().text()=="123"); - mUtil->mouseClickDialpad(Qt::Key_Backspace, DialpadTestUtil::Press); - QTest::qWait( 1500 ); - mUtil->mouseClickDialpad(Qt::Key_Backspace, DialpadTestUtil::Release); - QVERIFY(mDialpad->editor().text()==""); - mDialpad->closeDialpad(); -} - -void mt_Dialpad::testAsteriskMultitap() -{ - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QVERIFY(mDialpad->editor().text()=="*"); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QVERIFY(mDialpad->editor().text()=="+"); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QVERIFY(mDialpad->editor().text()=="p"); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QVERIFY(mDialpad->editor().text()=="w"); - - QVERIFY(mKeyCatcher->mKeyPresses.count()==4); - QVERIFY(mKeyCatcher->mKeyReleases.count()==4); - QVERIFY(mKeyCatcher->mKeyPresses.at(1)==Qt::Key_Asterisk); - QVERIFY(mKeyCatcher->mKeyReleases.at(1)==Qt::Key_Asterisk); - QVERIFY(mKeyCatcher->mKeyPresses.at(2)==Qt::Key_Asterisk); - QVERIFY(mKeyCatcher->mKeyReleases.at(2)==Qt::Key_Asterisk); - - // Verify that the second char can't be + - QTest::qWait(1000); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QCOMPARE(mDialpad->editor().text(), QString("w*")); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QCOMPARE(mDialpad->editor().text(), QString("wp")); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QCOMPARE(mDialpad->editor().text(), QString("ww")); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QCOMPARE(mDialpad->editor().text(), QString("w*")); - - // test entering two asterisk - QTest::qWait(1000); - mDialpad->editor().setText(QString()); - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QTest::qWait( 1000 ); // longer than short tap - mUtil->mouseClickDialpad(Qt::Key_Asterisk); - QCOMPARE(mDialpad->editor().text(), QString("**")); - - mDialpad->closeDialpad(); -} - -void mt_Dialpad::testCallButton() -{ - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - mDialpad->setCallButtonEnabled(false); - mUtil->mouseClickDialpad(Qt::Key_Yes); - QVERIFY(mKeyCatcher->mKeyPresses.count()==0); - QVERIFY(mKeyCatcher->mKeyReleases.count()==0); - mDialpad->setCallButtonEnabled(true); - mUtil->mouseClickDialpad(Qt::Key_Yes); - QTest::qWait( WAIT_TIME ); - QVERIFY(mKeyCatcher->mKeyPresses.count()==1); - QVERIFY(mKeyCatcher->mKeyReleases.count()==1); - QVERIFY(mKeyCatcher->mKeyPresses.at(0)==Qt::Key_Yes); - QVERIFY(mKeyCatcher->mKeyReleases.at(0)==Qt::Key_Yes); - mDialpad->closeDialpad(); -} - -void mt_Dialpad::testCloseGesture() -{ - // QTest::mouseMove() doesn't work -} - -void mt_Dialpad::testOpenDialogWhileButtonPressed() -{ - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_5, DialpadTestUtil::Press); - QTest::qWait( LONGPRESS_DURATION ); - - HbMessageBox* box = new HbMessageBox("Test dialog!"); - box->setAttribute(Qt::WA_DeleteOnClose); - box->setTimeout(1000); - box->show(); - QTest::qWait( 500 ); - mUtil->mouseClickDialpad(Qt::Key_5, DialpadTestUtil::Release); - QTest::qWait( 100 ); - - QVERIFY(mDialpad->editor().text()=="5"); - QVERIFY(mKeyCatcher->mKeyPresses.at(0)==Qt::Key_5); - QVERIFY(mKeyCatcher->mKeyReleases.at(0)==Qt::Key_5); - mDialpad->closeDialpad(); -} - -void mt_Dialpad::testTapOutsideDismiss() -{ - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - - QPointF aboveTop = mDialpad->scenePos(); - aboveTop.setY(aboveTop.y()-10); - aboveTop.setX(aboveTop.x()+mDialpad->rect().center().x()); - QPoint windowPos = mMainWindow->mapFromScene( aboveTop ); - - // test tap outside dismiss is OFF (default) - QTest::mouseClick( mMainWindow->viewport(), Qt::LeftButton, - 0, windowPos ); - QTest::qWait( 500 ); - QVERIFY(mDialpad->isVisible()); - mDialpad->closeDialpad(); - - // test tap outside dismiss is ON - mDialpad->setTapOutsideDismiss(true); - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - QTest::mouseClick( mMainWindow->viewport(), Qt::LeftButton, - 0, windowPos ); - QTest::qWait( 500 ); - QVERIFY(!mDialpad->isVisible()); -} - -#ifndef Q_OS_SYMBIAN -void mt_Dialpad::testCloseGestureLandscape() -{ - /* - // switch to landscape - mMainWindow->setOrientation(Qt::Horizontal); - mMainWindow->resize(640,360); - QTest::qWait( 1000 ); - - mDialpad->resize(mMainWindow->layoutRect().width()/2, - mMainWindow->layoutRect().height()); - mDialpad->setPos(mMainWindow->layoutRect().width()/2,0); - - mDialpad->openDialpad(); - - // slow swipe - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_4, Press, false); - QTest::qWait( 500 ); // longer than swipe - mUtil->mouseClickDialpad(Qt::Key_6, Release, false); - QTest::qWait( 500 ); - QVERIFY(mDialpad->isVisible()==true); - - // short swipe - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_4, Press, false); - QTest::qWait( 200 ); - mUtil->mouseClickDialpad(Qt::Key_5, Release, false); - QTest::qWait( 500 ); - QVERIFY(mDialpad->isVisible()==true); - - // ok swipe - mDialpad->editor().setText(QString()); - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_4, Press, false); - QTest::qWait( 200 ); - mUtil->mouseClickDialpad(Qt::Key_6, Release, false); - QVERIFY(mDialpad->editor().text()==""); - QTest::qWait( 1000 ); - QVERIFY(mDialpad->isVisible()==false);*/ -} - -void mt_Dialpad::testOrientationChange() -{ - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - - // test landscape - mMainWindow->setOrientation(Qt::Horizontal); - mMainWindow->resize(640,360); - QTest::qWait( 1000 ); - mDialpad->resize(mMainWindow->layoutRect().width()/2, - mMainWindow->layoutRect().height()); - mDialpad->setPos(mMainWindow->layoutRect().width()/2,0); - QTest::qWait( 1000 ); - - QVERIFY(mDialpad->isVisible()==true); - mUtil->mouseClickDialpad(Qt::Key_5); - QVERIFY(mDialpad->editor().text()=="5"); - QTest::qWait( 500 ); - - // test portrait - mMainWindow->setOrientation(Qt::Vertical); - mMainWindow->resize(360,640); - mDialpad->resize(mMainWindow->layoutRect().width(), - mMainWindow->layoutRect().height()/2); - mDialpad->setPos(0,mMainWindow->layoutRect().height()/4); - QTest::qWait( 1000 ); - - QVERIFY(mDialpad->isVisible()==true); - mDialpad->editor().setText(""); - mUtil->mouseClickDialpad(Qt::Key_5); - QVERIFY(mDialpad->editor().text()=="5"); - - mDialpad->closeDialpad(); - QTest::qWait( 500 ); - QVERIFY(mDialpad->isVisible()==false); -} - -#endif //Q_OS_SYMBIAN - -DIALPAD_TEST_MAIN(mt_Dialpad) -#include "mt_dialpad.moc" - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/mt_dialpad/mt_dialpad.pro --- a/telutils/dialpad/tsrc/unit/mt_dialpad/mt_dialpad.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../shared - -CONFIG += hb qtestlib - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc -} - -# -HEADERS += ../shared/dialpadtestutil.h -SOURCES += mt_dialpad.cpp ../shared/dialpadtestutil.cpp - -# -LIBS += -ldialpad diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/mt_keyhandler/mt_keyhandler.cpp --- a/telutils/dialpad/tsrc/unit/mt_keyhandler/mt_keyhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "dialpadtest.h" -#include "dialpad.h" -#include "dialpadkeyhandler.h" -#include "dialpadvoicemailboxeventfilter.h" - -bool mVmbxFilterConstructed; -Dialpad* mParameter1; -QObject* mParameter2; - -#ifdef Q_OS_SYMBIAN -/*DialpadVoiceMailboxEventFilter::DialpadVoiceMailboxEventFilter(Dialpad* dialPad, QObject* parent) -{ - mVmbxFilterConstructed = true; - mParameter1 = dialPad; - mParameter2 = parent; -}*/ -#endif - -// test cases -class mt_KeyHandler : public QObject -{ - Q_OBJECT - -private slots: - void init(); - void cleanup(); - -private: - HbMainWindow* mMainWindow; - Dialpad* mDialpad; - DialpadKeyHandler *mKeyhandler; -}; - -void mt_KeyHandler::init() -{ - mVmbxFilterConstructed = false; - mDialpad = new Dialpad(*mMainWindow); - mKeyhandler = new DialpadKeyHandler(mDialpad, *hbInstance->allMainWindows().at(0), this); - QVERIFY(mKeyhandler != NULL); - //QVERIFY(mVmbxFilterConstructed == true); - //QVERIFY(mParameter1 == mDialpad); - //QVERIFY(mParameter2 == this); -} - -void mt_KeyHandler::cleanup() -{ - delete mDialpad; - delete mMainWindow; -} - - -DIALPAD_TEST_MAIN(mt_KeyHandler) -#include "mt_keyhandler.moc" diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/mt_keyhandler/mt_keyhandler.pro --- a/telutils/dialpad/tsrc/unit/mt_keyhandler/mt_keyhandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../shared - -CONFIG += hb qtestlib - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc -} - -# -SOURCES += mt_keyhandler.cpp - -# -LIBS += -ldialpad diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/runall.cmd --- a/telutils/dialpad/tsrc/unit/runall.cmd Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem -@echo off - -if "%1"=="winscw" ( -call runtest.cmd ut_dialpademergencycalleventfilter -call runtest.cmd ut_dialpadmultitaphandler -call runtest.cmd mt_dialpad -call runtest.cmd ut_dialpadvoicemailboxeventfilter -call runtest.cmd ut_dialpadvideomailboxeventfilter -call runtest.cmd mt_keyhandler -call runtest.cmd ut_dialpadbluetootheventfilter -call runtest.cmd ut_dialpadkeysequenceeventfilter -call runtest.cmd ut_dialpadkeyhandler -call runtest.cmd ut_dialpadhasheventfilter -) - -@echo off -if "%1"=="win32" ( -call runtest_w32.cmd ut_dialpadmultitaphandler -call runtest_w32.cmd mt_dialpad -) - -@echo off -if "%2"=="ctc" ( -call ctcpost^ - ut_dialpad\mon.sym ut_dialpad\mon.dat^ - -p profile.txt -call ctc2html -i profile.txt -) - -@echo off -if "%1"=="" echo Usage: 'runall winscw' or 'runall win32' - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/runtest.cmd --- a/telutils/dialpad/tsrc/unit/runtest.cmd Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -call del %1.log -@echo on -:FINAL -call \epoc32\release\winscw\udeb\%1.exe -o c:\%1.log -call type \epoc32\winscw\c\%1.log diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/runtest_w32.cmd --- a/telutils/dialpad/tsrc/unit/runtest_w32.cmd Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -@echo on -:FINAL -call %1\%1.exe diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/dialpadtest.h --- a/telutils/dialpad/tsrc/unit/shared/dialpadtest.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +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 DIALPADTEST_H -#define DIALPADTEST_H - -#include - -#define DIALPAD_TEST_MAIN(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ - HbApplication app(argc, argv); \ - TestObject tc; \ - QResource::registerResource("../hbcore.rcc"); \ - int ret = QTest::qExec(&tc, argc, argv); \ - /* Core dump if HbIconLoader instance is not destroyed before the application instance. */ \ - /* HbIconLoader uses QCoreApplication::aboutToQuit() signal to destroy itself. */ \ - /* app.exec() where the signal is normally emitted is not called here. */ \ - /* So, invoking the signal explicitly. */ \ - QMetaObject::invokeMethod(&app, "aboutToQuit", Qt::DirectConnection); \ - return ret; \ -} - -#endif // DIALPADTEST_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/dialpadtestutil.cpp --- a/telutils/dialpad/tsrc/unit/shared/dialpadtestutil.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/*! -* 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: Dialpad test utility -* -*/ - -#include -#include -#include - -#include "dialpadtestutil.h" - -const int WAIT_TIME = 300; - -DialpadTestUtil::DialpadTestUtil(HbMainWindow& mainWindow, QObject* parent) : - QObject(parent), mMainWindow(mainWindow) -{ - mKeyNames.insert(Qt::Key_1,"keypad"); - mKeyNames.insert(Qt::Key_2,"keypad"); - mKeyNames.insert(Qt::Key_3,"keypad"); - mKeyNames.insert(Qt::Key_4,"keypad"); - mKeyNames.insert(Qt::Key_5,"keypad"); - mKeyNames.insert(Qt::Key_6,"keypad"); - mKeyNames.insert(Qt::Key_7,"keypad"); - mKeyNames.insert(Qt::Key_8,"keypad"); - mKeyNames.insert(Qt::Key_9,"keypad"); - mKeyNames.insert(Qt::Key_Asterisk,"keypad"); - mKeyNames.insert(Qt::Key_0,"keypad"); - mKeyNames.insert(Qt::Key_NumberSign,"keypad"); - mKeyNames.insert(Qt::Key_Backspace,"16777219"); - mKeyNames.insert(Qt::Key_Yes,"16842753"); -} - -DialpadTestUtil::~DialpadTestUtil() -{ -} - -QGraphicsWidget* DialpadTestUtil::getWidgetByName(const QString& name) -{ - QGraphicsWidget* widget = 0; - - QList items = mMainWindow.scene()->items(); - foreach (QGraphicsItem* item, items) { - if (item->isWidget()) { - QGraphicsWidget *w = static_cast(item); - if (w->objectName()==name) { - widget = w; - } - } - } - - return widget; -} - -QPointF DialpadTestUtil::keyPosition(QGraphicsWidget* widget, int key) -{ - QPointF keyPos; - QRectF rect = widget->rect(); - - // 3 x 4 grid - int cellWidth = rect.width() / 3; - int cellHeight = rect.height() / 4; - - if (key==Qt::Key_Asterisk) { - keyPos = QPointF( 0.5 * cellWidth, 3.5 * cellHeight ); - } else if (key==Qt::Key_NumberSign) { - keyPos = QPointF( 2.5 * cellWidth, 3.5 * cellHeight ); - } else if (key==Qt::Key_0) { - keyPos = QPointF( 1.5 * cellWidth, 3.5 * cellHeight ); - } else { - int normalized = key - 49; - // qDebug() << normalized; - int column = normalized % 3; - int row = (normalized / 3); - // qDebug() << column << row; - - keyPos = QPointF((column+0.5)*cellWidth,(row+0.5)*cellHeight); - } - - return keyPos; -} - -void DialpadTestUtil::mouseClickDialpad(int key, MouseEventType type, bool pause) -{ - QString name = mKeyNames.value(key); - - QGraphicsWidget* widget = getWidgetByName(name); - - if ( widget ) { - QPointF widgetPos; - - if (name=="keypad") { - widgetPos = widget->scenePos() + - keyPosition(widget, key); - } else { - widgetPos = widget->scenePos() + - widget->rect().center(); - } - - QPoint windowPos = mMainWindow.mapFromScene( widgetPos ); - - if (type==Press) { - QTest::mousePress( mMainWindow.viewport(), Qt::LeftButton, - 0, windowPos ); - } else if (type==Release) { - QTest::mouseRelease( mMainWindow.viewport(), Qt::LeftButton, - 0, windowPos ); - } else { - QTest::mouseClick( mMainWindow.viewport(), Qt::LeftButton, - 0, windowPos ); - } - - if (pause) { - QTest::qWait( WAIT_TIME ); - } - } else { - QFAIL( "Button could not be accessed!" ); - } -} - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/dialpadtestutil.h --- a/telutils/dialpad/tsrc/unit/shared/dialpadtestutil.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +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: Dialpad test utility -* -*/ - -#ifndef DIALPADTESTUTIL_H -#define DIALPADTESTUTIL_H - -#include -#include -#include -#include - -class HbMainWindow; - -class DialpadTestUtil : public QObject -{ - -public: - enum MouseEventType - { - Press, - Release, - Click - }; - -public: - explicit DialpadTestUtil(HbMainWindow& mainWindow, QObject* parent=0); - ~DialpadTestUtil(); - - void mouseClickDialpad(int key, MouseEventType type=Click, bool pause=true); - -private: - QGraphicsWidget* getWidgetByName(const QString& name); - QPointF keyPosition(QGraphicsWidget* widget, int key); - -private: - QMap mKeyNames; - HbMainWindow& mMainWindow; -}; - -#endif // DIALPADTESTUTIL_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_cenrep.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_cenrep.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -#include -#include - -// TODO: Add a new class named Ut_Utility to config all CR key -// to simulate 3 different images -CRepository* CRepository::NewL(TUid /*aRepositoryUid*/) -{ - CRepository *self = new (ELeave) CRepository(); - return self; -} - -CRepository::~CRepository() -{ -} - -TInt CRepository::Get(TUint32 aKey, TInt& aValue) -{ - aValue = mValue; - return KErrNone; -} -TInt CRepository::Set(TUint32 /*aKey*/, TInt aValue) -{ - mValue = aValue; - return KErrNone; -} - -TInt CRepository::Get(TUint32 /*aKey*/, TDes16& aValue) -{ - return KErrNone; -} - -TInt CRepository::Set(TUint32 /*aKey*/, const TDesC16& /*aValue*/) -{ - return KErrNone; -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_centralrepository.h --- a/telutils/dialpad/tsrc/unit/shared/mock_centralrepository.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,214 +0,0 @@ -// Copyright (c) 2004-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 __CENTRALREPOSITORY_H__ -#define __CENTRALREPOSITORY_H__ - -#include - -#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS - #include -#endif - -namespace NCentralRepositoryConstants -/** Namespace encapsulating the CentralRepository constants. -@publishedAll -@released -*/ -{ - -/** The maximum number of unicode characters that can be stored in a setting -@publishedAll -@released -*/ -const TInt KMaxUnicodeStringLength = 1024; - -/** The maximum number of bytes that can be stored in a setting -@publishedAll -@released -*/ -const TInt KMaxBinaryLength = KMaxUnicodeStringLength*2; - -/** Error key returned by CommitTransaction in case of an error that cannot be -attributed to any single or partial key. Also notify value for spurious -notifications (eg when a notification is cancelled or several values change at once ) -@publishedAll -@released -*/ -const TUint32 KUnspecifiedKey = 0xffffffffUL; - -/** Use KUnspecifiedKey instead of this value. -@publishedAll -@deprecated -*/ -const TUint32 KInvalidNotificationId = KUnspecifiedKey; - -/** The 8 most significant bits of a setting's meta-data are reserved for internal use. -Clients should not make use of the reserved bits (unless it is specifically stated -otherwise in Symbian developer documentation). Clients should not rely on the value -of the reserved bits. Reserved bits are not guaranteed to be 0 or 1 and are not -guaranteed to stay constant from one GetMeta call to the next. -@released -@see CRepository::GetMeta -@see KMetaUnreserved -*/ -const TUint32 KMetaSymbianReserved = 0xFF000000; - -/** The 24 least significant bits of a setting's meta-data are available for use. Clients -should make use of KMetaUnreserved to mask out the reserved bits following a call -to GetMeta. Clients should not rely on the value of the reserved bits. Reserved bits -are not guaranteed to be 0 or 1 and are not guaranteed to stay constant from one -GetMeta call to the next. -@released -@see CRepository::GetMeta -@see KMetaSymbianReserved -*/ -const TUint32 KMetaUnreserved = 0x00FFFFFF; - -} // namespace NCentralRepositoryConstants - -/** Provides access to a repository. - -There are potentially 2^32 repositories, each identified by a UID. Within each -repository up to 2^32 settings can be stored. Settings within a repository are -identified by a 32-bit key and may be of the types integer, real or descriptor. -@publishedAll -@released -*/ -class CRepository : public CBase - { -public: - - /** Transaction mode chosen with StartTransaction. - */ - enum TTransactionMode - { - /** Standard optimistic non-serialised transaction. Can be started at any time - Commit fails with KErrLocked if another client interrupts it by first committing - changes: transaction should be repeated until KErrLocked is not returned. - */ - EConcurrentReadWriteTransaction = 2, - /** Pessimistic locking transaction intended for reading consistent values. - Can only be started if EReadWriteTransaction is not in progress. - Automatically promoted to EReadWriteTransaction on first write operation - if no other read transaction is in progress (or fails if not attainable). - Use ONLY if all clients can agree not to use EConcurrentReadWriteTransaction, - and only make changes in an EReadWriteTransaction. - */ - EReadTransaction = 1, - /** Pessimistic locking transaction intended for writing values. Can only be - started if no EReadTransaction or EReadWriteTransactions are in progress. - Use ONLY if all clients can agree not to use EConcurrentReadWriteTransaction, - and only make changes in an EReadWriteTransaction. - */ - EReadWriteTransaction = 3 - }; - - /** Buffer type for aKeyInfo parameter to asynchronous CommitTransaction. - @see CRepository::CommitTransaction(TDes8& aKeyInfo, TRequestStatus& aStatus) - */ - typedef TPckgBuf TTransactionKeyInfoBuf; - - IMPORT_C static CRepository* NewL(TUid aRepositoryUid); - IMPORT_C static CRepository* NewLC(TUid aRepositoryUid); - - IMPORT_C virtual ~CRepository(); - IMPORT_C TInt Create(TUint32 aKey, TInt aValue); - IMPORT_C TInt Create(TUint32 aKey, const TReal& aValue); - IMPORT_C TInt Create(TUint32 aKey, const TDesC8& aValue); - IMPORT_C TInt Create(TUint32 aKey, const TDesC16& aValue); - - IMPORT_C TInt Delete(TUint32 aKey); - IMPORT_C TInt Delete(TUint32 aPartialKey, TUint32 aMask, TUint32 &aErrorKey) ; - - IMPORT_C TInt Get(TUint32 aKey, TInt& aValue); - IMPORT_C TInt Set(TUint32 aKey, TInt aValue); - - IMPORT_C TInt Get(TUint32 aKey, TReal& aValue); - IMPORT_C TInt Set(TUint32 aKey, const TReal& aValue); - - IMPORT_C TInt Get(TUint32 aKey, TDes8& aValue); - IMPORT_C TInt Get(TUint32 aId, TDes8& aValue, TInt& aActualLength); - IMPORT_C TInt Set(TUint32 aKey, const TDesC8& aValue); - - IMPORT_C TInt Get(TUint32 aKey, TDes16& aValue); - IMPORT_C TInt Get(TUint32 aId, TDes16& aValue, TInt& aActualLength); - IMPORT_C TInt Set(TUint32 aKey, const TDesC16& aValue); - - IMPORT_C TInt GetMeta(TUint32 aKey, TUint32& aMeta); - - IMPORT_C TInt Move (TUint32 aSourcePartialKey, TUint32 aTargetPartialKey, - TUint32 aMask, TUint32 &aErrorKey) ; - - IMPORT_C TInt FindL(TUint32 aPartialKey, TUint32 aMask, - RArray& aFoundKeys); - - IMPORT_C TInt FindEqL(TUint32 aPartialKey, TUint32 aMask, - TInt aValue, RArray& aFoundKeys); - IMPORT_C TInt FindEqL(TUint32 aPartialKey, TUint32 aMask, - const TReal& aValue, RArray& aFoundKeys); - IMPORT_C TInt FindEqL(TUint32 aPartialKey, TUint32 aMask, - const TDesC8& aValue, RArray& aFoundKeys); - IMPORT_C TInt FindEqL(TUint32 aPartialKey, TUint32 aMask, - const TDesC16& aValue, RArray& aFoundKeys); - - IMPORT_C TInt FindNeqL(TUint32 aPartialKey, TUint32 aMask, - TInt aValue, RArray& aFoundKeys); - IMPORT_C TInt FindNeqL(TUint32 aPartialKey, TUint32 aMask, - const TReal& aValue, RArray& aFoundKeys); - IMPORT_C TInt FindNeqL(TUint32 aPartialKey, TUint32 aMask, - const TDesC8& aValue, RArray& aFoundKeys); - IMPORT_C TInt FindNeqL(TUint32 aPartialKey, TUint32 aMask, - const TDesC16& aValue, RArray& aFoundKeys); - - IMPORT_C TInt NotifyRequest(TUint32 aKey, TRequestStatus& aStatus); - IMPORT_C TInt NotifyRequest(TUint32 aPartialKey, TUint32 aMask, - TRequestStatus& aStatus); - - IMPORT_C TInt NotifyCancel(TUint32 aKey); - IMPORT_C TInt NotifyCancel(TUint32 aPartialKey, TUint32 aMask); - IMPORT_C TInt NotifyCancelAll(); - - IMPORT_C TInt Reset(); - IMPORT_C TInt Reset(TUint32 aKey); - - IMPORT_C TInt StartTransaction(TTransactionMode aMode); - IMPORT_C void StartTransaction(TTransactionMode aMode, TRequestStatus& aStatus); - IMPORT_C TInt CommitTransaction(TUint32& aKeyInfo); - IMPORT_C void CommitTransaction(TDes8& aKeyInfo, TRequestStatus& aStatus); - IMPORT_C void CancelTransaction(); - IMPORT_C void CleanupCancelTransactionPushL(); - IMPORT_C void FailTransaction(); - IMPORT_C void CleanupFailTransactionPushL(); - - /** Same as CancelTransaction. - @see CancelTransaction - */ - inline void RollbackTransaction() - { - CancelTransaction(); - } - - /** Same as CleanupCancelTransactionPushL. - @see CleanupCancelTransactionPushL - */ - inline void CleanupRollbackTransactionPushL() - { - CleanupCancelTransactionPushL(); - } - int mValue; - }; - -#endif // __CENTRALREPOSITORY_H__ diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_cphcltemergencycall.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_cphcltemergencycall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +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 "mock_cphcltemergencycall.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCall::CPhCltEmergencyCall -// C++ constructor. -// ----------------------------------------------------------------------------- -// -CPhCltEmergencyCall::CPhCltEmergencyCall( - MPhCltEmergencyCallObserver* aObserver ) - : CActive( EPriorityStandard ), iObserver( aObserver ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCall::CPhCltEmergencyCall -// ----------------------------------------------------------------------------- -// -CPhCltEmergencyCall* CPhCltEmergencyCall::NewL( - MPhCltEmergencyCallObserver* aObserver ) - { - return CPhCltEmergencyCallMock::NewL( aObserver ); - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::CPhCltEmergencyCallMock -// C++ constructor. -// ----------------------------------------------------------------------------- -// -CPhCltEmergencyCallMock::CPhCltEmergencyCallMock( - MPhCltEmergencyCallObserver * aObserver ) - : CPhCltEmergencyCall( aObserver ) - { - - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::NewL -// ----------------------------------------------------------------------------- -// -CPhCltEmergencyCallMock * CPhCltEmergencyCallMock::NewL( - MPhCltEmergencyCallObserver * aObserver ) - { - SMC_MOCK_NEWL1( CPhCltEmergencyCallMock *, MPhCltEmergencyCallObserver *, aObserver ) - - CPhCltEmergencyCallMock* self = new( ELeave ) CPhCltEmergencyCallMock( aObserver ); - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::IsEmergencyPhoneNumber -// ----------------------------------------------------------------------------- -// -TInt CPhCltEmergencyCallMock::IsEmergencyPhoneNumber( - const TDesC & aNumber, - TBool & aIsEmergencyNumber ) - { - SMC_MOCK_METHOD2( TInt, const TDesC &, aNumber, - TBool &, aIsEmergencyNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::FindEmergencyPhoneNumber -// ----------------------------------------------------------------------------- -// -TInt CPhCltEmergencyCallMock::FindEmergencyPhoneNumber( - TDes & aNumber, - TBool & aIsEmergencyNumber ) - { - SMC_MOCK_METHOD2( TInt, TDes &, aNumber, - TBool &, aIsEmergencyNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::DialEmergencyCallL -// ----------------------------------------------------------------------------- -// -void CPhCltEmergencyCallMock::DialEmergencyCallL( - const TDesC & aNumber ) - { - SMC_MOCK_METHOD1( void, const TDesC &, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::IsEmergencyPhoneNumber -// ----------------------------------------------------------------------------- -// -TInt CPhCltEmergencyCallMock::IsEmergencyPhoneNumber( - const TDesC & aNumber, - TDes & aMatchedEmergencyNumber, - TBool & aIsEmergencyNumber ) - { - SMC_MOCK_METHOD3( TInt, const TDesC &, aNumber, - TDes &, aMatchedEmergencyNumber, - TBool &, aIsEmergencyNumber ) - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::RunL -// Declaration needed due to vftable references. -// ----------------------------------------------------------------------------- -// -void CPhCltEmergencyCallMock::RunL() - { - - } - - -// ----------------------------------------------------------------------------- -// CPhCltEmergencyCallMock::DoCancel -// Declaration needed due to vftable references. -// ----------------------------------------------------------------------------- -// -void CPhCltEmergencyCallMock::DoCancel() - { - - } diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_cphcltemergencycall.h --- a/telutils/dialpad/tsrc/unit/shared/mock_cphcltemergencycall.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +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 CPHCLTEMERGENCYCALLMOCK_H -#define CPHCLTEMERGENCYCALLMOCK_H - -#include -#include - -// FORWARD DECLARATIONS -class MPhCltEmergencyCallObserver; - -// CLASS DECLARATION -/** -* Phone Client Emergency Call Api for emergency number query -* and emergency dialing. -* -* @lib phoneclient.lib -* @since SeriesS60_3.2 -*/ -class CPhCltEmergencyCallMock : public CPhCltEmergencyCall - { - public: - static TBool iSimulateEmergencyNumberMatch; - - public: // Constructors and destructor - - /** - * Create an instance that implements the interface. - * - * @param aObserver It is the observer for the instance. - * @return Returns the created instance. - */ - static CPhCltEmergencyCallMock* NewL( - MPhCltEmergencyCallObserver* aObserver ); - - public: // New functions - - /** - * Returns information whether the number specified was an emergency number. - * - * @param aNumber Number to be queried. aNumber might contain prefix (SS code) - * and/or postfix (DTMF part). - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumber. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber - * parameter included emergency number. - * @return Returns error code of the success of the operation. - */ - TInt IsEmergencyPhoneNumber( const TDesC& aNumber, - TBool& aIsEmergencyNumber ); - - /** - * Method can be used to check if the number specified contains - * a valid emergency number in the end of the number. - * - * @param aNumber Number to be queried, matched emergency number - * is returned in this parameter. - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltTelephoneNumber. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber parameter - * was emergency number. - * @return Returns error code of the success of the operation. - */ - TInt FindEmergencyPhoneNumber( TDes& aNumber, - TBool& aIsEmergencyNumber ); - - /** - * Initiates an emergency call. - * - * @param aNumber Emergency number to be dialed. - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumber. - * - * If the aNumber parameter supplies an "empty" buffer - * the call is created either dialing the default emergency - * phone number or use the SET UP EMERGENCY request - * that does not contain a dialling number. - * - * Leaves with KErrArgument, if parameter aNumber was - * not an emergency number. - * - * @pre IsActive() returns EFalse, otherwise leaves with KErrInUse. - */ - void DialEmergencyCallL( const TDesC& aNumber ); - - /** - * Returns information whether the number specified was an emergency - * number and also returns the plain emergency number. - * - * @param aNumber Number to be queried.aNumber might contain prefix (SS code) - * and/or postfix (DTMF part). - * The aNumber parameter should be a buffer and the - * clients are provided with a typedef called - * TPhCltEmergencyNumber. - * - * @param aMatchedEmergencyNumber Matched emergencynumber without prefix or - * postfix is returned in this parameter. The aMatchedEmergencyNumber - * parameter should be a buffer and the clients are - * provided with atypedef called TPhCltEmergencyNumber. - * - * @param aIsEmergencyNumber If ETrue, then the aNumber - * parameter included emergency number. - * - * @return Returns error code of the success of the operation. - */ - TInt IsEmergencyPhoneNumber( const TDesC& aNumber, - TDes& aMatchedEmergencyNumber, TBool& aIsEmergencyNumber ); - - protected: - - /** - * C++ constructor. - */ - CPhCltEmergencyCallMock( MPhCltEmergencyCallObserver* aObserver ); - - void RunL(); - - void DoCancel(); - - }; - -#endif // CPHCLTEMERGENCYCALLMOCK_H - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_cvoicemailbox.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_cvoicemailbox.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +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 - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// TVoiceMailboxParams::TVoiceMailboxParams -// ----------------------------------------------------------------------------- -// -TVoiceMailboxParams::TVoiceMailboxParams( ) - { - - } - - -// ----------------------------------------------------------------------------- -// TVoiceMailboxParams::Version -// ----------------------------------------------------------------------------- -// -TInt TVoiceMailboxParams::Version( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// TVoiceMailboxParams::TVoiceMailboxParams -// ----------------------------------------------------------------------------- -// -TVoiceMailboxParams::TVoiceMailboxParams( - const CVoiceMailboxEntry & aEntry ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::CVoiceMailbox -// ----------------------------------------------------------------------------- -// -CVoiceMailbox::CVoiceMailbox( ) - //: - //CBase( /**/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::ConstructL -// ----------------------------------------------------------------------------- -// -void CVoiceMailbox::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::NewL -// ----------------------------------------------------------------------------- -// -CVoiceMailbox * CVoiceMailbox::NewL( ) - { - SMC_MOCK_NEWL0( CVoiceMailbox * ) - - CVoiceMailbox* self = new( ELeave ) CVoiceMailbox; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::NewLC -// ----------------------------------------------------------------------------- -// -CVoiceMailbox * CVoiceMailbox::NewLC( ) - { - SMC_MOCK_NEWLC0( CVoiceMailbox * ) - - CVoiceMailbox* self = new( ELeave ) CVoiceMailbox; - CleanupStack::PushL( self ); - //self->ConstructL() - return self; - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::~CVoiceMailbox -// ----------------------------------------------------------------------------- -// -CVoiceMailbox::~CVoiceMailbox( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::GetStoredEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::GetStoredEntry( - const TVoiceMailboxParams & aParams, - CVoiceMailboxEntry * & aEntry ) const - { - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::SaveEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::SaveEntry( - const CVoiceMailboxEntry & aEntry ) - { - SMC_MOCK_METHOD1( TInt, const CVoiceMailboxEntry &, aEntry ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::QueryNewEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryNewEntry( - const TVoiceMailboxParams & aParams, - CVoiceMailboxEntry * & aEntry ) - { - SMC_MOCK_METHOD2( TInt, const TVoiceMailboxParams &, aParams, - CVoiceMailboxEntry *, aEntry ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::QueryChangeEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryChangeEntry( - const TVoiceMailboxParams & aParams, - CVoiceMailboxEntry * & aEntry ) - { - SMC_MOCK_METHOD2( TInt, const TVoiceMailboxParams &, aParams, - CVoiceMailboxEntry *, aEntry ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::QueryVmbxType -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryVmbxType( - TVoiceMailboxParams & aParams ) - { - SMC_MOCK_METHOD1( TInt, TVoiceMailboxParams &, aParams ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::NotifyVmbxNumberChangeL -// ----------------------------------------------------------------------------- -// -void CVoiceMailbox::NotifyVmbxNumberChangeL( - MVoiceMailboxObserver & aObserver, - const TBool aNotifyOnActiveLineOnly ) - { - SMC_MOCK_METHOD2( void, MVoiceMailboxObserver &, aObserver, - const TBool, aNotifyOnActiveLineOnly ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::NotifyVmbxNumberChangeCancel -// ----------------------------------------------------------------------------- -// -void CVoiceMailbox::NotifyVmbxNumberChangeCancel( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::CheckConfiguration -// ----------------------------------------------------------------------------- -// -TBool CVoiceMailbox::CheckConfiguration( - const TVoiceMailboxParams & aParams, - const TInt aFlags ) - { - SMC_MOCK_METHOD2( TBool, const TVoiceMailboxParams &, aParams, - const TInt, aFlags ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::GetServiceIds -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::GetServiceIds( - RIdArray & aProfileIds ) const - { - SMC_MOCK_METHOD1( TInt, RIdArray &, aProfileIds ) - } - - -// ----------------------------------------------------------------------------- -// CVoiceMailbox::SaveProvisionedEntry -// ----------------------------------------------------------------------------- -// -TInt CVoiceMailbox::SaveProvisionedEntry( - const CVoiceMailboxEntry & aEntry ) - { - SMC_MOCK_METHOD1( TInt, const CVoiceMailboxEntry &, aEntry ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_dialpad.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_dialpad.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,269 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "dialpad.h" - -static const int DialpadCloseAnimDuration = 200; // ms -static const int DialpadOpenAnimDuration = 200; // ms - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// Dialpad::Dialpad -// ----------------------------------------------------------------------------- -// -Dialpad::Dialpad( ) - : - mMainWindow(*hbInstance->allMainWindows().at(0)), - mBackgroundDrawer(0), - mIconDrawer(0), - mBackgroundItem(0), - mInputField(0), - mKeypad(0), - mMultitap(0), - mOpenTimeLine(DialpadOpenAnimDuration), - mCloseTimeLine(DialpadCloseAnimDuration), - mAnimationOngoing(false), - mOrientation(Qt::Vertical), - mIsOpen(false) - { - - } - - -// ----------------------------------------------------------------------------- -// Dialpad::Dialpad -// ----------------------------------------------------------------------------- -// -Dialpad::Dialpad( const HbMainWindow & mainWindow ) - : - mMainWindow(mainWindow) - { - - } - - -// ----------------------------------------------------------------------------- -// Dialpad::~Dialpad -// ----------------------------------------------------------------------------- -// -Dialpad::~Dialpad( ) - { - } - - -// ----------------------------------------------------------------------------- -// Dialpad::editor -// ----------------------------------------------------------------------------- -// -HbLineEdit & Dialpad::editor( ) const - { - SMC_MOCK_METHOD0( HbLineEdit & ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::changeEvent -// ----------------------------------------------------------------------------- -// -void Dialpad::changeEvent(QEvent *event) - { - SMC_MOCK_METHOD1( void, QEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::isOpen -// ----------------------------------------------------------------------------- -// -bool Dialpad::isOpen( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::openDialpad -// ----------------------------------------------------------------------------- -// -void Dialpad::openDialpad( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::closeDialpad -// ----------------------------------------------------------------------------- -// -void Dialpad::closeDialpad( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::setCallButtonEnabled -// ----------------------------------------------------------------------------- -// -void Dialpad::setCallButtonEnabled( - bool enabled ) - { - SMC_MOCK_METHOD1( void, bool, enabled ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::setTapOutsideDismiss -// ----------------------------------------------------------------------------- -// -void Dialpad::setTapOutsideDismiss( - bool dismiss ) - { - SMC_MOCK_METHOD1( void, bool, dismiss ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::paint -// ----------------------------------------------------------------------------- -// -void Dialpad::paint( - QPainter * painter, - const QStyleOptionGraphicsItem * option, - QWidget * widget ) - { - SMC_MOCK_METHOD3( void, QPainter *, painter, - const QStyleOptionGraphicsItem *, option, - QWidget *, widget ) - } - -// ----------------------------------------------------------------------------- -// Dialpad::showEvent -// ----------------------------------------------------------------------------- -// -void Dialpad::showEvent( - QShowEvent * event ) - { - SMC_MOCK_METHOD1( void, QShowEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::hideEvent -// ----------------------------------------------------------------------------- -// -void Dialpad::hideEvent( - QHideEvent * event ) - { - SMC_MOCK_METHOD1( void, QHideEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::closeEvent -// ----------------------------------------------------------------------------- -// -void Dialpad::closeEvent( - QCloseEvent * event ) - { - SMC_MOCK_METHOD1( void, QCloseEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::closeAnimValueChanged -// ----------------------------------------------------------------------------- -// -void Dialpad::closeAnimValueChanged( - qreal value ) - { - SMC_MOCK_METHOD1( void, qreal, value ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::closeAnimFinished -// ----------------------------------------------------------------------------- -// -void Dialpad::closeAnimFinished( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::openAnimValueChanged -// ----------------------------------------------------------------------------- -// -void Dialpad::openAnimValueChanged( - qreal value ) - { - SMC_MOCK_METHOD1( void, qreal, value ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::openAnimFinished -// ----------------------------------------------------------------------------- -// -void Dialpad::openAnimFinished( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::orientationChangeStarted -// ----------------------------------------------------------------------------- -// -void Dialpad::orientationChangeStarted( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// Dialpad::orientationChangeFinished -// ----------------------------------------------------------------------------- -// -void Dialpad::orientationChangeFinished( - Qt::Orientation current ) - { - SMC_MOCK_METHOD1( void, Qt::Orientation, current ) - } - -// ----------------------------------------------------------------------------- -// Dialpad::gestureEvent -// ----------------------------------------------------------------------------- -// -void Dialpad::gestureEvent(QGestureEvent *event) - { - SMC_MOCK_METHOD1( void, QGestureEvent *, event ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_dialpadbluetootheventfilter.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_dialpadbluetootheventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +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 "dialpadbluetootheventfilter.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DialpadBluetoothEventFilter::DialpadBluetoothEventFilter -// ----------------------------------------------------------------------------- -// -DialpadBluetoothEventFilter::DialpadBluetoothEventFilter( - Dialpad * dialpad, - QObject * parent ) - : - QObject( parent ) - { - Q_UNUSED(dialpad) - } - - -// ----------------------------------------------------------------------------- -// DialpadBluetoothEventFilter::~DialpadBluetoothEventFilter -// ----------------------------------------------------------------------------- -// -DialpadBluetoothEventFilter::~DialpadBluetoothEventFilter( ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadBluetoothEventFilter::eventFilter -// ----------------------------------------------------------------------------- -// -bool DialpadBluetoothEventFilter::eventFilter( - QObject * watched, - QEvent * event ) - { - SMC_MOCK_METHOD2( bool, QObject *, watched, - QEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// DialpadBluetoothEventFilter::toggleBluetooth -// ----------------------------------------------------------------------------- -// -void DialpadBluetoothEventFilter::toggleBluetooth() -{ - SMC_MOCK_METHOD0( void ) -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_dialpademergencycalleventfilter.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_dialpademergencycalleventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +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 "dialpademergencycalleventfilter.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DialpadEmergencyCallEventFilter::DialpadEmergencyCallEventFilter -// ----------------------------------------------------------------------------- -// -DialpadEmergencyCallEventFilter::DialpadEmergencyCallEventFilter( - Dialpad * dialpad, - QObject * parent ) - : - QObject( parent ) - { - Q_UNUSED(dialpad) - } - - -// ----------------------------------------------------------------------------- -// DialpadEmergencyCallEventFilter::~DialpadEmergencyCallEventFilter -// ----------------------------------------------------------------------------- -// -DialpadEmergencyCallEventFilter::~DialpadEmergencyCallEventFilter( ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadEmergencyCallEventFilter::eventFilter -// ----------------------------------------------------------------------------- -// -bool DialpadEmergencyCallEventFilter::eventFilter( - QObject * watched, - QEvent * event ) - { - SMC_MOCK_METHOD2( bool, QObject *, watched, - QEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// DialpadEmergencyCallEventFilter::editorTextChanged -// ----------------------------------------------------------------------------- -// -void DialpadEmergencyCallEventFilter::editorTextChanged( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_dialpadhasheventfilter.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_dialpadhasheventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +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 "dialpadhasheventfilter.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DialpadHashEventFilter::DialpadHashEventFilter -// ----------------------------------------------------------------------------- -// -DialpadHashEventFilter::DialpadHashEventFilter( - Dialpad * dialpad, - QObject * parent ) - : - DialpadMailboxEventFilterBase(dialpad, parent) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadHashEventFilter::~DialpadHashEventFilter -// ----------------------------------------------------------------------------- -// -DialpadHashEventFilter::~DialpadHashEventFilter( ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadHashEventFilter::eventFilter -// ----------------------------------------------------------------------------- -// -bool DialpadHashEventFilter::eventFilter( - QObject * watched, - QEvent * event ) - { - SMC_MOCK_METHOD2( bool, QObject *, watched, - QEvent *, event ) - } - -// ----------------------------------------------------------------------------- -// DialpadHashEventFilter::handleCallButtonPress -// ----------------------------------------------------------------------------- -// -bool DialpadHashEventFilter::handleCallButtonPress() -{ - return false; -} - -// ----------------------------------------------------------------------------- -// DialpadHashEventFilter::handleMailboxOperation -// ----------------------------------------------------------------------------- -// -void DialpadHashEventFilter::handleMailboxOperation() -{ - -} - -// ----------------------------------------------------------------------------- -// DialpadHashEventFilter::handleLongKeyPress -// ----------------------------------------------------------------------------- -// -void DialpadHashEventFilter::handleLongKeyPress() -{ - -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_dialpadkeysequenceeventfilter.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_dialpadkeysequenceeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +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 "dialpadkeysequenceeventfilter.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DialpadKeySequenceEventFilter::DialpadKeySequenceEventFilter -// ----------------------------------------------------------------------------- -// -DialpadKeySequenceEventFilter::DialpadKeySequenceEventFilter( - Dialpad * dialpad, - QObject * parent ) - : - QObject( parent ) - { - Q_UNUSED(dialpad) - } - - -// ----------------------------------------------------------------------------- -// DialpadKeySequenceEventFilter::~DialpadKeySequenceEventFilter -// ----------------------------------------------------------------------------- -// -DialpadKeySequenceEventFilter::~DialpadKeySequenceEventFilter( ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadKeySequenceEventFilter::eventFilter -// ----------------------------------------------------------------------------- -// -bool DialpadKeySequenceEventFilter::eventFilter( - QObject * watched, - QEvent * event ) - { - SMC_MOCK_METHOD2( bool, QObject *, watched, - QEvent *, event ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_dialpadmailboxeventfilterbase.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_dialpadmailboxeventfilterbase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +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 "dialpadmailboxeventfilterbase.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::DialpadMailboxEventFilterBase -// ----------------------------------------------------------------------------- -// -DialpadMailboxEventFilterBase::DialpadMailboxEventFilterBase( - Dialpad * dialpad, - QObject * parent ) - : - QObject( parent ) - { - Q_UNUSED(dialpad) - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::~DialpadMailboxEventFilterBase -// ----------------------------------------------------------------------------- -// -DialpadMailboxEventFilterBase::~DialpadMailboxEventFilterBase( ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::eventFilter -// ----------------------------------------------------------------------------- -// -bool DialpadMailboxEventFilterBase::eventFilter( - QObject * watched, - QEvent * event ) - { - SMC_MOCK_METHOD2( bool, QObject *, watched, - QEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::isLongKeyPressSupported -// ----------------------------------------------------------------------------- -// -bool DialpadMailboxEventFilterBase::isLongKeyPressSupported( - const int key ) - { - SMC_MOCK_METHOD1( bool, const int, key ) - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::checkIfSendEventAndConsumeEvent -// ----------------------------------------------------------------------------- -// -bool DialpadMailboxEventFilterBase::checkIfSendEventAndConsumeEvent( - const int pressedKey, - const int eventType ) - { - SMC_MOCK_METHOD2( bool, const int, pressedKey, - const int, eventType ) - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::handleCallButtonPress -// ----------------------------------------------------------------------------- -// -bool DialpadMailboxEventFilterBase::handleCallButtonPress( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::clearEditor -// ----------------------------------------------------------------------------- -// -void DialpadMailboxEventFilterBase::clearEditor( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::createCall -// ----------------------------------------------------------------------------- -// -void DialpadMailboxEventFilterBase::createCall( - const QString & phoneNumber, - bool createVideoCall ) - { - SMC_MOCK_METHOD2( void, const QString &, phoneNumber, - bool, createVideoCall ) - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::handleMailboxOperation -// ----------------------------------------------------------------------------- -// -void DialpadMailboxEventFilterBase::handleMailboxOperation( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// DialpadMailboxEventFilterBase::handleLongKeyPress -// ----------------------------------------------------------------------------- -// -void DialpadMailboxEventFilterBase::handleLongKeyPress( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_dialpadvideomailboxeventfilter.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_dialpadvideomailboxeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +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 "dialpadvideomailboxeventfilter.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DialpadVideoMailboxEventFilter::DialpadVideoMailboxEventFilter -// ----------------------------------------------------------------------------- -// -DialpadVideoMailboxEventFilter::DialpadVideoMailboxEventFilter( - Dialpad * dialpad, - QObject * parent ) - : - DialpadMailboxEventFilterBase( dialpad, parent ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadVideoMailboxEventFilter::~DialpadVideoMailboxEventFilter -// ----------------------------------------------------------------------------- -// -DialpadVideoMailboxEventFilter::~DialpadVideoMailboxEventFilter( ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadVideoMailboxEventFilter::eventFilter -// ----------------------------------------------------------------------------- -// -bool DialpadVideoMailboxEventFilter::eventFilter( - QObject * watched, - QEvent * event ) - { - SMC_MOCK_METHOD2( bool, QObject *, watched, - QEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// DialpadVideoMailboxEventFilter::handleCallButtonPress -// ----------------------------------------------------------------------------- -// -bool DialpadVideoMailboxEventFilter::handleCallButtonPress( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// DialpadVideoMailboxEventFilter::handleMailboxOperation -// ----------------------------------------------------------------------------- -// -void DialpadVideoMailboxEventFilter::handleMailboxOperation( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// DialpadVideoMailboxEventFilter::handleLongKeyPress -// ----------------------------------------------------------------------------- -// -void DialpadVideoMailboxEventFilter::handleLongKeyPress( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_dialpadvoicemailboxeventfilter.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_dialpadvoicemailboxeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +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 "dialpadvoicemailboxeventfilter.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DialpadVoiceMailboxEventFilter::DialpadVoiceMailboxEventFilter -// ----------------------------------------------------------------------------- -// -DialpadVoiceMailboxEventFilter::DialpadVoiceMailboxEventFilter( - Dialpad * dialpad, - QObject * parent ) - : - DialpadMailboxEventFilterBase( dialpad, parent ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadVoiceMailboxEventFilter::~DialpadVoiceMailboxEventFilter -// ----------------------------------------------------------------------------- -// -DialpadVoiceMailboxEventFilter::~DialpadVoiceMailboxEventFilter( ) - { - - } - - -// ----------------------------------------------------------------------------- -// DialpadVoiceMailboxEventFilter::eventFilter -// ----------------------------------------------------------------------------- -// -bool DialpadVoiceMailboxEventFilter::eventFilter( - QObject * watched, - QEvent * event ) - { - SMC_MOCK_METHOD2( bool, QObject *, watched, - QEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// DialpadVoiceMailboxEventFilter::handleCallButtonPress -// ----------------------------------------------------------------------------- -// -bool DialpadVoiceMailboxEventFilter::handleCallButtonPress( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// DialpadVoiceMailboxEventFilter::handleMailboxOperation -// ----------------------------------------------------------------------------- -// -void DialpadVoiceMailboxEventFilter::handleMailboxOperation( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// DialpadVoiceMailboxEventFilter::handleLongKeyPress -// ----------------------------------------------------------------------------- -// -void DialpadVoiceMailboxEventFilter::handleLongKeyPress( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_featmgr.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_featmgr.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// FeatureManager::FeatureManager -// ----------------------------------------------------------------------------- -// -FeatureManager::FeatureManager( ) - { - - } - - -// ----------------------------------------------------------------------------- -// FeatureManager::InitializeLibL -// ----------------------------------------------------------------------------- -// -void FeatureManager::InitializeLibL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// FeatureManager::UnInitializeLib -// ----------------------------------------------------------------------------- -// -void FeatureManager::UnInitializeLib( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// FeatureManager::FeatureSupported -// ----------------------------------------------------------------------------- -// -TBool FeatureManager::FeatureSupported( - TInt aFeature ) - { - SMC_MOCK_METHOD1( TBool, TInt, aFeature ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_hblineedit.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_hblineedit.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,381 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include -#include -#include - -#include -#include "hblineedit.h" -#include "hbabstractedit.h" -#include "hbwidget.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// HbLineEdit::HbLineEdit -// ----------------------------------------------------------------------------- -// -HbLineEdit::HbLineEdit(QGraphicsItem *parent) -{ - Q_UNUSED(parent) -} - -// ----------------------------------------------------------------------------- -// HbLineEdit::HbLineEdit -// ----------------------------------------------------------------------------- -// -HbLineEdit::HbLineEdit( - const QString & text, - QGraphicsItem * parent ) - { - Q_UNUSED(text) - Q_UNUSED(parent) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::~HbLineEdit -// ----------------------------------------------------------------------------- -// -HbLineEdit::~HbLineEdit( ) - { - - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::type -// ----------------------------------------------------------------------------- -// -int HbLineEdit::type( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::maxLength -// ----------------------------------------------------------------------------- -// -int HbLineEdit::maxLength( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::setMaxLength -// ----------------------------------------------------------------------------- -// -void HbLineEdit::setMaxLength( - int length ) - { - SMC_MOCK_METHOD1( void, int, length ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::setMinRows -// ----------------------------------------------------------------------------- -// -void HbLineEdit::setMinRows( - int rows ) - { - SMC_MOCK_METHOD1( void, int, rows ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::minRows -// ----------------------------------------------------------------------------- -// -int HbLineEdit::minRows( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::setMaxRows -// ----------------------------------------------------------------------------- -// -void HbLineEdit::setMaxRows( - int rows ) - { - SMC_MOCK_METHOD1( void, int, rows ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::maxRows -// ----------------------------------------------------------------------------- -// -int HbLineEdit::maxRows( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::isExpandable -// ----------------------------------------------------------------------------- -// -bool HbLineEdit::isExpandable( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::text -// ----------------------------------------------------------------------------- -// -QString HbLineEdit::text( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::displayText -// ----------------------------------------------------------------------------- -// -QString HbLineEdit::displayText( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::hasSelectedText -// ----------------------------------------------------------------------------- -// -bool HbLineEdit::hasSelectedText( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::selectedText -// ----------------------------------------------------------------------------- -// -QString HbLineEdit::selectedText( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::selectionStart -// ----------------------------------------------------------------------------- -// -int HbLineEdit::selectionStart( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::setSelection -// ----------------------------------------------------------------------------- -// -void HbLineEdit::setSelection( - int start, - int length ) - { - SMC_MOCK_METHOD2( void, int, start, - int, length ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::cursorPosition -// ----------------------------------------------------------------------------- -// -int HbLineEdit::cursorPosition() const - { - SMC_MOCK_METHOD0( int ) - } - -// ----------------------------------------------------------------------------- -// HbLineEdit::setCursorPosition -// ----------------------------------------------------------------------------- -// -void HbLineEdit::setCursorPosition( - int pos ) - { - SMC_MOCK_METHOD1( void, int, pos ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::echoMode -// ----------------------------------------------------------------------------- -// -HbLineEdit::EchoMode HbLineEdit::echoMode( ) const - { - SMC_MOCK_METHOD0( HbLineEdit::EchoMode ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::setEchoMode -// ----------------------------------------------------------------------------- -// -void HbLineEdit::setEchoMode( HbLineEdit::EchoMode echoMode ) - { - SMC_MOCK_METHOD1( void, HbLineEdit::EchoMode, echoMode ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::setCapitalization -// ----------------------------------------------------------------------------- -// -void HbLineEdit::setCapitalization( - QFont::Capitalization caps ) - { - SMC_MOCK_METHOD1( void, QFont::Capitalization, caps ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::capitalization -// ----------------------------------------------------------------------------- -// -QFont::Capitalization HbLineEdit::capitalization( ) const - { - SMC_MOCK_METHOD0( QFont::Capitalization ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::setText -// ----------------------------------------------------------------------------- -// -void HbLineEdit::setText( - const QString & text ) - { - SMC_MOCK_METHOD1( void, const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::HbLineEdit -// ----------------------------------------------------------------------------- -// -HbLineEdit::HbLineEdit( - HbLineEditPrivate & dd, - QGraphicsItem * parent ) - { - Q_UNUSED(dd) - Q_UNUSED(parent) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::inputMethodEvent -// ----------------------------------------------------------------------------- -// -void HbLineEdit::inputMethodEvent( - QInputMethodEvent * event ) - { - SMC_MOCK_METHOD1( void, QInputMethodEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::keyPressEvent -// ----------------------------------------------------------------------------- -// -void HbLineEdit::keyPressEvent( - QKeyEvent * event ) - { - SMC_MOCK_METHOD1( void, QKeyEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::keyReleaseEvent -// ----------------------------------------------------------------------------- -// -void HbLineEdit::keyReleaseEvent( - QKeyEvent * event ) - { - SMC_MOCK_METHOD1( void, QKeyEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::resizeEvent -// ----------------------------------------------------------------------------- -// -void HbLineEdit::resizeEvent( - QGraphicsSceneResizeEvent * event ) - { - SMC_MOCK_METHOD1( void, QGraphicsSceneResizeEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::canInsertFromMimeData -// ----------------------------------------------------------------------------- -// -bool HbLineEdit::canInsertFromMimeData( - const QMimeData * source ) const - { - SMC_MOCK_METHOD1( bool, const QMimeData *, source ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::insertFromMimeData -// ----------------------------------------------------------------------------- -// -void HbLineEdit::insertFromMimeData( - const QMimeData * source ) - { - SMC_MOCK_METHOD1( void, const QMimeData *, source ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::focusOutEvent -// ----------------------------------------------------------------------------- -// -void HbLineEdit::focusOutEvent( - QFocusEvent * event ) - { - SMC_MOCK_METHOD1( void, QFocusEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbLineEdit::focusInEvent -// ----------------------------------------------------------------------------- -// -void HbLineEdit::focusInEvent( - QFocusEvent * event ) - { - SMC_MOCK_METHOD1( void, QFocusEvent *, event ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_hbmainwindow.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_hbmainwindow.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,413 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// HbMainWindow::~HbMainWindow -// ----------------------------------------------------------------------------- -// -HbMainWindow::~HbMainWindow( ) - { - - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::addView -// ----------------------------------------------------------------------------- -// -HbView * HbMainWindow::addView( - QGraphicsWidget * widget ) - { - SMC_MOCK_METHOD1( HbView *, QGraphicsWidget *, widget ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::insertView -// ----------------------------------------------------------------------------- -// -HbView * HbMainWindow::insertView( - int index, - QGraphicsWidget * widget ) - { - SMC_MOCK_METHOD2( HbView *, int, index, - QGraphicsWidget *, widget ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::removeView -// ----------------------------------------------------------------------------- -// -void HbMainWindow::removeView( - QGraphicsWidget * widget ) - { - SMC_MOCK_METHOD1( void, QGraphicsWidget *, widget ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::views -// ----------------------------------------------------------------------------- -// -QList HbMainWindow::views( ) const - { - SMC_MOCK_METHOD0( QList ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::currentView -// ----------------------------------------------------------------------------- -// -HbView * HbMainWindow::currentView( ) const - { - SMC_MOCK_METHOD0( HbView * ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::setCurrentView -// ----------------------------------------------------------------------------- -// -void HbMainWindow::setCurrentView( - HbView * view, - bool animate, - Hb::ViewSwitchFlags flags ) - { - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::orientation -// ----------------------------------------------------------------------------- -// -Qt::Orientation HbMainWindow::orientation( ) const - { - SMC_MOCK_METHOD0( Qt::Orientation ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::setOrientation -// ----------------------------------------------------------------------------- -// -void HbMainWindow::setOrientation( - Qt::Orientation orientation, - bool animate ) - { - SMC_MOCK_METHOD2( void, Qt::Orientation, orientation, - bool, animate ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::unsetOrientation -// ----------------------------------------------------------------------------- -// -void HbMainWindow::unsetOrientation( - bool animate ) - { - SMC_MOCK_METHOD1( void, bool, animate ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::nativeBackgroundWindow -// ----------------------------------------------------------------------------- -// -WId HbMainWindow::nativeBackgroundWindow( ) - { - SMC_MOCK_METHOD0( WId ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::resetNativeBackgroundWindow -// ----------------------------------------------------------------------------- -// -void HbMainWindow::resetNativeBackgroundWindow( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::layoutRect -// ----------------------------------------------------------------------------- -// -QRectF HbMainWindow::layoutRect( ) const - { - SMC_MOCK_METHOD0( QRectF ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::setBackgroundImageName -// ----------------------------------------------------------------------------- -// -void HbMainWindow::setBackgroundImageName( - Qt::Orientation orientation, - const QString & name ) - { - SMC_MOCK_METHOD2( void, Qt::Orientation, orientation, - const QString &, name ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::backgroundImageName -// ----------------------------------------------------------------------------- -// -QString HbMainWindow::backgroundImageName( - Qt::Orientation orientation ) const - { - SMC_MOCK_METHOD1( QString, Qt::Orientation, orientation ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::setBackgroundImageMode -// ----------------------------------------------------------------------------- -// -void HbMainWindow::setBackgroundImageMode( - Hb::BackgroundImageMode mode ) - { - SMC_MOCK_METHOD1( void, Hb::BackgroundImageMode, mode ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::backgroundImageMode -// ----------------------------------------------------------------------------- -// -Hb::BackgroundImageMode HbMainWindow::backgroundImageMode( ) const - { - SMC_MOCK_METHOD0( Hb::BackgroundImageMode ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::setAutomaticOrientationEffectEnabled -// ----------------------------------------------------------------------------- -// -void HbMainWindow::setAutomaticOrientationEffectEnabled( - bool enabled ) - { - SMC_MOCK_METHOD1( void, bool, enabled ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::automaticOrientationEffectEnabled -// ----------------------------------------------------------------------------- -// -bool HbMainWindow::automaticOrientationEffectEnabled( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::broadcastEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::broadcastEvent( - int eventType ) - { - SMC_MOCK_METHOD1( void, int, eventType ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::viewReady -// ----------------------------------------------------------------------------- -// -void HbMainWindow::viewReady( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::aboutToChangeView -// ----------------------------------------------------------------------------- -// -void HbMainWindow::aboutToChangeView( - HbView * oldView, - HbView * newView ) - { - SMC_MOCK_METHOD2( void, HbView *, oldView, - HbView *, newView ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::currentViewChanged -// ----------------------------------------------------------------------------- -// -void HbMainWindow::currentViewChanged( - HbView * view ) - { - SMC_MOCK_METHOD1( void, HbView *, view ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::aboutToChangeOrientation -// ----------------------------------------------------------------------------- -// -void HbMainWindow::aboutToChangeOrientation( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::aboutToChangeOrientation -// ----------------------------------------------------------------------------- -// -void HbMainWindow::aboutToChangeOrientation( - Qt::Orientation newOrientation, - bool animated ) - { - SMC_MOCK_METHOD2( void, Qt::Orientation, newOrientation, - bool, animated ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::orientationChanged -// ----------------------------------------------------------------------------- -// -void HbMainWindow::orientationChanged( - Qt::Orientation orientation ) - { - SMC_MOCK_METHOD1( void, Qt::Orientation, orientation ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::changeEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::changeEvent( - QEvent * event ) - { - SMC_MOCK_METHOD1( void, QEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::closeEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::closeEvent( - QCloseEvent * event ) - { - SMC_MOCK_METHOD1( void, QCloseEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::keyPressEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::keyPressEvent( - QKeyEvent * event ) - { - SMC_MOCK_METHOD1( void, QKeyEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::keyReleaseEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::keyReleaseEvent( - QKeyEvent * event ) - { - SMC_MOCK_METHOD1( void, QKeyEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::resizeEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::resizeEvent( - QResizeEvent * event ) - { - SMC_MOCK_METHOD1( void, QResizeEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::customEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::customEvent( - QEvent * event ) - { - SMC_MOCK_METHOD1( void, QEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::scrollContentsBy -// ----------------------------------------------------------------------------- -// -void HbMainWindow::scrollContentsBy( - int dx, - int dy ) - { - SMC_MOCK_METHOD2( void, int, dx, - int, dy ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::paintEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::paintEvent( - QPaintEvent * event ) - { - SMC_MOCK_METHOD1( void, QPaintEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbMainWindow::showEvent -// ----------------------------------------------------------------------------- -// -void HbMainWindow::showEvent( - QShowEvent * event ) - { - SMC_MOCK_METHOD1( void, QShowEvent *, event ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_hbnotificationdialog.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_hbnotificationdialog.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,296 +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 "hbnotificationdialog.h" -#include - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::Q_PROPERTY -// ----------------------------------------------------------------------------- -// -/*Q_OBJECT HbNotificationDialog::Q_PROPERTY( - QString text READ text WRITE setText ) Q_PROPERTY ( QString title READ title WRITE setTitle ) Q_PROPERTY ( HbIcon icon READ icon WRITE setIcon ) Q_PROPERTY ( Hb::TextWrapping titleTextWrapping READ titleTextWrapping WRITE setTitleTextWrapping ) Q_PROPERTY ( bool sequentialShow READ isSequentialShow WRITE setSequentialShow ):HbNotificationDialog ( ) - { - SMC_MOCK_METHOD1( Q_OBJECT, QString text READ text WRITE setText ) Q_PROPERTY ( QString title READ title WRITE setTitle ) Q_PROPERTY ( HbIcon icon READ icon WRITE setIcon ) Q_PROPERTY ( Hb::TextWrapping titleTextWrapping READ titleTextWrapping WRITE setTitleTextWrapping ) Q_PROPERTY ( bool sequentialShow READ isSequentialShow WRITE setSequentialShow ):HbNotificationDialog, ( ) - }*/ - -HbNotificationDialog::HbNotificationDialog() //: HbDialog(*new HbNotificationDialogPrivate, 0) -{ -} - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::~HbNotificationDialog -// ----------------------------------------------------------------------------- -// -HbNotificationDialog::~HbNotificationDialog( ) - { - //SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::launchDialog -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::launchDialog( - const QString & title, - QGraphicsScene * scene ) - { - SMC_MOCK_METHOD2( void, const QString &, title, - QGraphicsScene *, scene ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::launchDialog -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::launchDialog( - const QString & title, - const QString & text, - QGraphicsScene * scene ) - { - SMC_MOCK_METHOD3( void, const QString &, title, - const QString &, text, - QGraphicsScene *, scene ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::launchDialog -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::launchDialog( - const HbIcon & icon, - const QString & title, - const QString & text, - QGraphicsScene * scene ) - { - SMC_MOCK_METHOD4( void, const HbIcon &, icon, - const QString &, title, - const QString &, text, - QGraphicsScene *, scene ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::enableTouchActivation -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::enableTouchActivation( - bool enabled ) - { - SMC_MOCK_METHOD1( void, bool, enabled ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::isTouchActivating -// ----------------------------------------------------------------------------- -// -bool HbNotificationDialog::isTouchActivating( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::setTitle -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::setTitle( - const QString & text ) - { - SMC_MOCK_METHOD1( void, const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::setText -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::setText( - const QString & text ) - { - SMC_MOCK_METHOD1( void, const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::setIcon -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::setIcon( - const HbIcon & icon ) - { - SMC_MOCK_METHOD1( void, const HbIcon &, icon ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::title -// ----------------------------------------------------------------------------- -// -QString HbNotificationDialog::title( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::text -// ----------------------------------------------------------------------------- -// -QString HbNotificationDialog::text( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::icon -// ----------------------------------------------------------------------------- -// -HbIcon HbNotificationDialog::icon( ) const - { - SMC_MOCK_METHOD0( HbIcon ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::setTitleTextWrapping -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::setTitleTextWrapping( - Hb::TextWrapping wrapping ) - { - SMC_MOCK_METHOD1( void, Hb::TextWrapping, wrapping ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::titleTextWrapping -// ----------------------------------------------------------------------------- -// -Hb::TextWrapping HbNotificationDialog::titleTextWrapping( ) const - { - SMC_MOCK_METHOD0( Hb::TextWrapping ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::setSequentialShow -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::setSequentialShow( - bool sequential ) - { - SMC_MOCK_METHOD1( void, bool, sequential ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::isSequentialShow -// ----------------------------------------------------------------------------- -// -bool HbNotificationDialog::isSequentialShow( ) const - { - SMC_MOCK_METHOD0( bool ) - } - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::primitive -// ----------------------------------------------------------------------------- -// -QGraphicsItem * HbNotificationDialog::primitive( - const QString & itemName ) const - { - SMC_MOCK_METHOD1( QGraphicsItem *, const QString &, itemName ) - } - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::HbNotificationDialog -// ----------------------------------------------------------------------------- -// -/*void*/ HbNotificationDialog::HbNotificationDialog( - HbNotificationDialogPrivate & dd, - QGraphicsItem * parent ) - { - Q_UNUSED(dd) - Q_UNUSED(parent) - //SMC_MOCK_METHOD2( void, HbNotificationDialogPrivate &, dd, - // QGraphicsItem *, parent ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::gestureEvent -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::gestureEvent( - QGestureEvent * event ) - { - SMC_MOCK_METHOD1( void, QGestureEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::hideEvent -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::hideEvent( - QHideEvent * event ) - { - SMC_MOCK_METHOD1( void, QHideEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::showEvent -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::showEvent( - QShowEvent * event ) - { - SMC_MOCK_METHOD1( void, QShowEvent *, event ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::itemChange -// ----------------------------------------------------------------------------- -// -QVariant HbNotificationDialog::itemChange( - GraphicsItemChange change, - const QVariant & value ) - { - SMC_MOCK_METHOD2( QVariant, GraphicsItemChange, change, - const QVariant &, value ) - } - - -// ----------------------------------------------------------------------------- -// HbNotificationDialog::orientationChanged -// ----------------------------------------------------------------------------- -// -void HbNotificationDialog::orientationChanged(Qt::Orientation orientation) -{ - SMC_MOCK_METHOD1( void, Qt::Orientation, orientation ) -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_xqaiwinterfacedescriptor.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_xqaiwinterfacedescriptor.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor -// ----------------------------------------------------------------------------- -// -XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor -// ----------------------------------------------------------------------------- -// -XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor( - const XQAiwInterfaceDescriptor & other ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::~XQAiwInterfaceDescriptor -// ----------------------------------------------------------------------------- -// -XQAiwInterfaceDescriptor::~XQAiwInterfaceDescriptor( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::= -// ----------------------------------------------------------------------------- -// -XQAiwInterfaceDescriptor & XQAiwInterfaceDescriptor::operator =( - const XQAiwInterfaceDescriptor & other ) - { - return *this; - //SMC_MOCK_METHOD1( XQAiwInterfaceDescriptor &, const XQAiwInterfaceDescriptor &, other ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::= -// ----------------------------------------------------------------------------- -// -bool XQAiwInterfaceDescriptor::operator==( - const XQAiwInterfaceDescriptor & other ) const - { - SMC_MOCK_METHOD1( bool, const XQAiwInterfaceDescriptor &, other ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::serviceName -// ----------------------------------------------------------------------------- -// -QString XQAiwInterfaceDescriptor::serviceName( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::interfaceName -// ----------------------------------------------------------------------------- -// -QString XQAiwInterfaceDescriptor::interfaceName( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::majorVersion -// ----------------------------------------------------------------------------- -// -int XQAiwInterfaceDescriptor::majorVersion( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::minorVersion -// ----------------------------------------------------------------------------- -// -int XQAiwInterfaceDescriptor::minorVersion( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::isValid -// ----------------------------------------------------------------------------- -// -bool XQAiwInterfaceDescriptor::isValid( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::inSystemScope -// ----------------------------------------------------------------------------- -// -bool XQAiwInterfaceDescriptor::inSystemScope( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::property -// ----------------------------------------------------------------------------- -// -QVariant XQAiwInterfaceDescriptor::property( - XQAiwInterfaceDescriptor::PropertyKey key ) const - { - SMC_MOCK_METHOD1( QVariant, XQAiwInterfaceDescriptor::PropertyKey, key ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::customProperty -// ----------------------------------------------------------------------------- -// -QString XQAiwInterfaceDescriptor::customProperty( - const QString & key ) const - { - SMC_MOCK_METHOD1( QString, const QString &, key ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::customPropertyKeys -// ----------------------------------------------------------------------------- -// -QStringList XQAiwInterfaceDescriptor::customPropertyKeys( ) const - { - SMC_MOCK_METHOD0( QStringList ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwInterfaceDescriptor::setProperty -// ----------------------------------------------------------------------------- -// -bool XQAiwInterfaceDescriptor::setProperty( - XQAiwInterfaceDescriptor::PropertyKey key, - const QVariant value ) - { - SMC_MOCK_METHOD2( bool, XQAiwInterfaceDescriptor::PropertyKey, key, - const QVariant, value ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_xqaiwrequest.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_xqaiwrequest.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,318 +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 "xqaiwrequest.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQAiwRequest::XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::XQAiwRequest( - const XQAiwInterfaceDescriptor & descriptor, - const QString & operation, - bool embedded ) - : - QObject() - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::XQAiwRequest( - const QUrl & uri, - const XQAiwInterfaceDescriptor & descriptor, - const QString & operation ) - : - QObject( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::XQAiwRequest( - const QFile & file, - const XQAiwInterfaceDescriptor & descriptor, - const QString & operation ) - : - QObject() - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::XQAiwRequest( - const XQSharableFile & file, - const XQAiwInterfaceDescriptor & descriptor, - const QString & operation ) - : - QObject() - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::~XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::~XQAiwRequest( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::createAction -// ----------------------------------------------------------------------------- -// -QAction * XQAiwRequest::createAction( ) - { - SMC_MOCK_METHOD0( QAction * ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setArguments -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setArguments( - const QList & arguments ) - { - SMC_MOCK_METHOD1( void, const QList &, arguments ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::lastError -// ----------------------------------------------------------------------------- -// -int XQAiwRequest::lastError( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::lastErrorMessage -// ----------------------------------------------------------------------------- -// -const QString & XQAiwRequest::lastErrorMessage( ) const - { - SMC_MOCK_METHOD0( const QString & ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::descriptor -// ----------------------------------------------------------------------------- -// -const XQAiwInterfaceDescriptor & XQAiwRequest::descriptor( ) const - { - SMC_MOCK_METHOD0( const XQAiwInterfaceDescriptor & ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::send -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::send( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::send -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::send( - QVariant & returnValue ) - { - SMC_MOCK_METHOD1( bool, QVariant &, returnValue ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setEmbedded -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setEmbedded( - bool embedded ) - { - SMC_MOCK_METHOD1( void, bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::isEmbedded -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::isEmbedded( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setOperation -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setOperation( - const QString & operation ) - { - SMC_MOCK_METHOD1( void, const QString &, operation ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::operation -// ----------------------------------------------------------------------------- -// -const QString & XQAiwRequest::operation( ) const - { - SMC_MOCK_METHOD0( const QString & ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setSynchronous -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setSynchronous( - bool synchronous ) - { - SMC_MOCK_METHOD1( void, bool, synchronous ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::isSynchronous -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::isSynchronous( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setBackground -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setBackground( - bool background ) - { - SMC_MOCK_METHOD1( void, bool, background ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::isBackground -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::isBackground( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setInfo -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setInfo( - const XQRequestInfo & requestInfo ) - { - SMC_MOCK_METHOD1( void, const XQRequestInfo &, requestInfo ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::info -// ----------------------------------------------------------------------------- -// -XQRequestInfo XQAiwRequest::info( ) const - { - SMC_MOCK_METHOD0( XQRequestInfo ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::results -// ----------------------------------------------------------------------------- -// -const QVariant & XQAiwRequest::results( ) const - { - SMC_MOCK_METHOD0( const QVariant & ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::sendExecute -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::sendExecute( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::handleAsyncResponse -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::handleAsyncResponse(const QVariant& value) -{ - Q_UNUSED(value); -} - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::sendFromAction -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::sendFromAction(bool checked) -{ - Q_UNUSED(checked); -} - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::handleAsyncError -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::handleAsyncError(int err) -{ - Q_UNUSED(err); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_xqappmgr.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_xqappmgr.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,299 +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 "xqappmgr.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQApplicationManager::XQApplicationManager -// ----------------------------------------------------------------------------- -// -XQApplicationManager::XQApplicationManager( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::~XQApplicationManager -// ----------------------------------------------------------------------------- -// -XQApplicationManager::~XQApplicationManager( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QString & interface, - const QString & operation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const QString &, interface, - const QString &, operation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const XQAiwInterfaceDescriptor & implementation, - const QString & operation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const XQAiwInterfaceDescriptor &, implementation, - const QString &, operation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QString & service, - const QString & interface, - const QString & operation, - bool embedded ) - { - SMC_MOCK_METHOD4( XQAiwRequest *, const QString &, service, - const QString &, interface, - const QString &, operation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const QString & interface, - const QString & operation ) - { - SMC_MOCK_METHOD2( QList , const QString &, interface, - const QString &, operation ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const QString & service, - const QString & interface, - const QString & operation ) - { - SMC_MOCK_METHOD3( QList , const QString &, service, - const QString &, interface, - const QString &, operation ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QUrl & url, - bool embedded ) - { - SMC_MOCK_METHOD2( XQAiwRequest *, const QUrl &, url, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QUrl & url, - const XQAiwInterfaceDescriptor & implementation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const QUrl &, url, - const XQAiwInterfaceDescriptor &, implementation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QFile & file, - bool embedded ) - { - SMC_MOCK_METHOD2( XQAiwRequest *, const QFile &, file, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QFile & file, - const XQAiwInterfaceDescriptor & implementation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const QFile &, file, - const XQAiwInterfaceDescriptor &, implementation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const QUrl & uri ) - { - SMC_MOCK_METHOD1( QList , const QUrl &, uri ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const QFile & file ) - { - SMC_MOCK_METHOD1( QList , const QFile &, file ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const XQSharableFile & file ) - { - SMC_MOCK_METHOD1( QList , const XQSharableFile &, file ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const XQSharableFile & file, - bool embedded ) - { - SMC_MOCK_METHOD2( XQAiwRequest *, const XQSharableFile &, file, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const XQSharableFile & file, - const XQAiwInterfaceDescriptor & implementation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const XQSharableFile &, file, - const XQAiwInterfaceDescriptor &, implementation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::lastError -// ----------------------------------------------------------------------------- -// -int XQApplicationManager::lastError( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::isRunning -// ----------------------------------------------------------------------------- -// -bool XQApplicationManager::isRunning( - const XQAiwInterfaceDescriptor & implementation ) const - { - SMC_MOCK_METHOD1( bool, const XQAiwInterfaceDescriptor &, implementation ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::getDrmAttributes -// ----------------------------------------------------------------------------- -// -bool XQApplicationManager::getDrmAttributes( - const QFile & file, - const QList & attributeNames, - QVariantList & attributeValues ) - { - SMC_MOCK_METHOD3( bool, const QFile &, file, - const QList &, attributeNames, - QVariantList &, attributeValues ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::getDrmAttributes -// ----------------------------------------------------------------------------- -// -bool XQApplicationManager::getDrmAttributes( - const XQSharableFile & file, - const QList & attributeNames, - QVariantList & attributeValues ) - { - SMC_MOCK_METHOD3( bool, const XQSharableFile &, file, - const QList &, attributeNames, - QVariantList &, attributeValues ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::status -// ----------------------------------------------------------------------------- -// -XQApplicationManager::ServiceStatus XQApplicationManager::status( - const XQAiwInterfaceDescriptor & implementation ) - { - SMC_MOCK_METHOD1( ServiceStatus, const XQAiwInterfaceDescriptor &, implementation ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_xqrequestinfo.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_xqrequestinfo.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,199 +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 "xqrequestinfo.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQRequestInfo::XQRequestInfo -// ----------------------------------------------------------------------------- -// -XQRequestInfo::XQRequestInfo( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::~XQRequestInfo -// ----------------------------------------------------------------------------- -// -XQRequestInfo::~XQRequestInfo( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::isValid -// ----------------------------------------------------------------------------- -// -bool XQRequestInfo::isValid( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::setEmbedded -// ----------------------------------------------------------------------------- -// -void XQRequestInfo::setEmbedded( - bool on ) - { - SMC_MOCK_METHOD1( void, bool, on ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::isEmbedded -// ----------------------------------------------------------------------------- -// -bool XQRequestInfo::isEmbedded( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::setBackground -// ----------------------------------------------------------------------------- -// -void XQRequestInfo::setBackground( - bool on ) - { - SMC_MOCK_METHOD1( void, bool, on ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::isBackground -// ----------------------------------------------------------------------------- -// -bool XQRequestInfo::isBackground( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::isSynchronous -// ----------------------------------------------------------------------------- -// -bool XQRequestInfo::isSynchronous( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::setForeground -// ----------------------------------------------------------------------------- -// -void XQRequestInfo::setForeground( - bool on ) - { - SMC_MOCK_METHOD1( void, bool, on ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::isForeground -// ----------------------------------------------------------------------------- -// -bool XQRequestInfo::isForeground( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::clientSecureId -// ----------------------------------------------------------------------------- -// -quint32 XQRequestInfo::clientSecureId( ) const - { - SMC_MOCK_METHOD0( quint32 ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::clientVendorId -// ----------------------------------------------------------------------------- -// -quint32 XQRequestInfo::clientVendorId( ) const - { - SMC_MOCK_METHOD0( quint32 ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::clientCapabilities -// ----------------------------------------------------------------------------- -// -QSet XQRequestInfo::clientCapabilities( ) const - { - SMC_MOCK_METHOD0( QSet ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::id -// ----------------------------------------------------------------------------- -// -int XQRequestInfo::id( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::setInfo -// ----------------------------------------------------------------------------- -// -void XQRequestInfo::setInfo( - const QString & key, - const QVariant & value ) - { - SMC_MOCK_METHOD2( void, const QString &, key, - const QVariant &, value ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::info -// ----------------------------------------------------------------------------- -// -QVariant XQRequestInfo::info( - const QString & key ) const - { - SMC_MOCK_METHOD1( QVariant, const QString &, key ) - } - - -// ----------------------------------------------------------------------------- -// XQRequestInfo::infoKeys -// ----------------------------------------------------------------------------- -// -QStringList XQRequestInfo::infoKeys( ) const - { - SMC_MOCK_METHOD0( QStringList ) - } diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_xqservicerequest.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_xqservicerequest.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,284 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include -#include - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQServiceRequest::XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::XQServiceRequest( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::XQServiceRequest( - const QString & service, - const QString & message, - const bool & synchronous ) - { - Q_UNUSED(service) - Q_UNUSED(message) - Q_UNUSED(synchronous) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::XQServiceRequest( - const XQServiceRequest & orig ) - { - Q_UNUSED(orig) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::XQServiceRequest( - const XQAiwInterfaceDescriptor & descriptor, - const QString & message, - const bool & synchronous ) - { - Q_UNUSED(descriptor) - Q_UNUSED(message) - Q_UNUSED(synchronous) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::~XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::~XQServiceRequest( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::send -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::send( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::send -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::send( - QVariant & retValue ) - { - SMC_MOCK_METHOD1( bool, QVariant &, retValue ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::isNull -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::isNull( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setSynchronous -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setSynchronous( - const bool & synchronous ) - { - SMC_MOCK_METHOD1( void, const bool &, synchronous ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::isSynchronous -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::isSynchronous( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setService -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setService( - const QString & service ) - { - SMC_MOCK_METHOD1( void, const QString &, service ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::service -// ----------------------------------------------------------------------------- -// -QString XQServiceRequest::service( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setMessage -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setMessage( - const QString & message ) - { - SMC_MOCK_METHOD1( void, const QString &, message ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::message -// ----------------------------------------------------------------------------- -// -QString XQServiceRequest::message( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::arguments -// ----------------------------------------------------------------------------- -// -const QList & XQServiceRequest::arguments( ) const - { - SMC_MOCK_METHOD0( const QList & ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setArguments -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setArguments( - const QList & arguments ) - { - SMC_MOCK_METHOD1( void, const QList &, arguments ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::latestError -// ----------------------------------------------------------------------------- -// -int XQServiceRequest::latestError( ) - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setInfo -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setInfo( - const XQRequestInfo & requestInfo ) - { - SMC_MOCK_METHOD1( void, const XQRequestInfo &, requestInfo ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::info -// ----------------------------------------------------------------------------- -// -XQRequestInfo XQServiceRequest::info( ) const - { - SMC_MOCK_METHOD0( XQRequestInfo ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::= -// ----------------------------------------------------------------------------- -// -XQServiceRequest & XQServiceRequest::operator=( - const XQServiceRequest & orig ) - { - SMC_MOCK_METHOD1( XQServiceRequest &, const XQServiceRequest &, orig ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::serializeArguments -// ----------------------------------------------------------------------------- -// -QByteArray XQServiceRequest::serializeArguments( - const XQServiceRequest & request ) - { - SMC_MOCK_METHOD1( QByteArray, const XQServiceRequest &, request ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::deserializeArguments -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::deserializeArguments( - XQServiceRequest & request, - const QByteArray & data ) - { - SMC_MOCK_METHOD2( void, XQServiceRequest &, request, - const QByteArray &, data ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::addArg -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::addArg(const QVariant& v) -{ - Q_UNUSED(v) -} - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::handleSharableFileArgs -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::handleSharableFileArgs() -{ - SMC_MOCK_METHOD0( bool ) -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_xqsettingskey.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_xqsettingskey.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +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 "xqsettingskey.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQSettingsKey::XQSettingsKey -// ----------------------------------------------------------------------------- -// -XQSettingsKey::XQSettingsKey( - XQSettingsKey::Target target, - long int uid, - unsigned long int key ) - { - Q_UNUSED(target) - Q_UNUSED(uid) - Q_UNUSED(key) - } - - -// ----------------------------------------------------------------------------- -// XQSettingsKey::~XQSettingsKey -// ----------------------------------------------------------------------------- -// -XQSettingsKey::~XQSettingsKey( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQSettingsKey::target -// ----------------------------------------------------------------------------- -// -XQSettingsKey::Target XQSettingsKey::target( ) const - { - - XQSettingsKey::Target variable = (XQSettingsKey::Target)1; - return variable; - } - - -// ----------------------------------------------------------------------------- -// XQSettingsKey::uid -// ----------------------------------------------------------------------------- -// -long int XQSettingsKey::uid( ) const - { - - return 0; - } - - -// ----------------------------------------------------------------------------- -// XQSettingsKey::key -// ----------------------------------------------------------------------------- -// -unsigned long int XQSettingsKey::key( ) const - { - - return 0; - } - - -// ----------------------------------------------------------------------------- -// XQPublishAndSubscribeSettingsKey::XQPublishAndSubscribeSettingsKey -// ----------------------------------------------------------------------------- -// -XQPublishAndSubscribeSettingsKey::XQPublishAndSubscribeSettingsKey( - long int categoryUid, - unsigned long int key ) : - XQSettingsKey( XQSettingsKey::TargetPublishAndSubscribe, categoryUid, key ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQPublishAndSubscribeSettingsKey::~XQPublishAndSubscribeSettingsKey -// ----------------------------------------------------------------------------- -// -XQPublishAndSubscribeSettingsKey::~XQPublishAndSubscribeSettingsKey( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey -// ----------------------------------------------------------------------------- -// -XQCentralRepositorySettingsKey::XQCentralRepositorySettingsKey( - long int repositoryUid, - unsigned long int key ) : - XQSettingsKey( XQSettingsKey::TargetCentralRepository, repositoryUid, key ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey -// ----------------------------------------------------------------------------- -// -XQCentralRepositorySettingsKey::~XQCentralRepositorySettingsKey( ) - { - - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/shared/mock_xqsettingsmanager.cpp --- a/telutils/dialpad/tsrc/unit/shared/mock_xqsettingsmanager.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +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 "xqsettingsmanager.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQSettingsManager::XQSettingsManager -// ----------------------------------------------------------------------------- -// -XQSettingsManager::XQSettingsManager( - QObject * parent ) - : QObject( parent ) - { - - } - -// ----------------------------------------------------------------------------- -// XQSettingsManager::~XQSettingsManager -// ----------------------------------------------------------------------------- -// -XQSettingsManager::~XQSettingsManager( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::readItemValue -// ----------------------------------------------------------------------------- -// -QVariant XQSettingsManager::readItemValue( - const XQSettingsKey & key, - XQSettingsManager::Type type ) - { - SMC_MOCK_METHOD2( QVariant, const XQSettingsKey &, key, XQSettingsManager::Type, type ) - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::writeItemValue -// ----------------------------------------------------------------------------- -// -bool XQSettingsManager::writeItemValue( - const XQSettingsKey & key, - const QVariant & value ) - { - SMC_MOCK_METHOD2( bool, const XQSettingsKey &, key, const QVariant &, value ) - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::startMonitoring -// ----------------------------------------------------------------------------- -// -bool XQSettingsManager::startMonitoring( - const XQSettingsKey & key, - XQSettingsManager::Type type ) - { - SMC_MOCK_METHOD2( bool, const XQSettingsKey &, key, XQSettingsManager::Type, type ) - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::stopMonitoring -// ----------------------------------------------------------------------------- -// -bool XQSettingsManager::stopMonitoring( - const XQSettingsKey & key ) - { - SMC_MOCK_METHOD1( bool, const XQSettingsKey &, key ) - } - - -// ----------------------------------------------------------------------------- -// XQSettingsManager::error -// ----------------------------------------------------------------------------- -// -XQSettingsManager::Error XQSettingsManager::error( ) const - { - SMC_MOCK_METHOD0( XQSettingsManager::Error ) - } - - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/unit.pro --- a/telutils/dialpad/tsrc/unit/unit.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = subdirs -SUBDIRS += ut_dialpademergencycalleventfilter -SUBDIRS += ut_dialpadbutton -SUBDIRS += ut_dialpadmultitaphandler -SUBDIRS += ut_dialpadvoicemailboxeventfilter -SUBDIRS += ut_dialpadvideomailboxeventfilter -SUBDIRS += ut_dialpadbluetootheventfilter -SUBDIRS += ut_dialpadkeysequenceeventfilter -SUBDIRS += ut_dialpadkeyhandler -SUBDIRS += mt_dialpad -SUBDIRS += mt_keyhandler -SUBDIRS += ut_dialpadhasheventfilter -SUBDIRS += ut_dialpadnumericbutton diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadbluetootheventfilter/ut_dialpadbluetootheventfilter.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadbluetootheventfilter/ut_dialpadbluetootheventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_OS_SYMBIAN -#include "xqservicerequest.h" -#endif - -#include "dialpadtest.h" -#include "dialpadtestutil.h" -#include "dialpadbluetootheventfilter.h" -#include "dialpad.h" - -const int WAIT_TIME = 300; -QString mService; -QString mMessage; -bool mXQServiceConstructed; -bool mSendCalled; - -#ifdef Q_OS_SYMBIAN -XQServiceRequest::XQServiceRequest(const QString& service, const QString& message, const bool& synchronous) { mService=service; mMessage=message; mXQServiceConstructed=true; } -XQServiceRequest::~XQServiceRequest() {} -bool XQServiceRequest::send(QVariant& retValue) { mSendCalled=true; return true; } -void XQServiceRequest::addArg(const QVariant& v) {} -#endif - -// helper class -class KeyEventCatcher : public QObject -{ -public: - bool eventFilter(QObject* watched, QEvent * event) - { - Q_UNUSED(watched); - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - mKeyPresses.append(keyEvent->key()); - return false; - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - mKeyReleases.append(keyEvent->key()); - return false; - } - return false; - } - -public: - QList mKeyPresses; - QList mKeyReleases; -}; - -// test cases -class ut_DialpadBluetoothEventFilter : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void init(); - void cleanup(); - void cleanupTestCase(); - void testLongPressAsteriskKey(); - void testShortAndLongPressAsteriskKey(); - -private: - HbMainWindow* mMainWindow; - Dialpad* mDialpad; - DialpadBluetoothEventFilter *mEventFilter; - KeyEventCatcher* mKeyCatcher; - DialpadTestUtil* mUtil; -}; - -void ut_DialpadBluetoothEventFilter::initTestCase() -{ - mMainWindow = new HbMainWindow; - - mKeyCatcher = new KeyEventCatcher; - mMainWindow->installEventFilter(mKeyCatcher); - - mUtil = new DialpadTestUtil(*mMainWindow); - - mDialpad = new Dialpad(); - mEventFilter = new DialpadBluetoothEventFilter(mDialpad, this); - hbInstance->allMainWindows().at(0)->installEventFilter(mEventFilter); - - QRectF rect(mMainWindow->contentsRect()); - rect.setHeight(rect.height()*0.7); - rect.moveTop((mMainWindow->contentsRect().height()-rect.height())/2); - - mDialpad->setPreferredSize(360,400); - mDialpad->setPos(0,100); - - mMainWindow->show(); - mDialpad->show(); - mDialpad->hide(); -} - -void ut_DialpadBluetoothEventFilter::init() -{ - mService = QString(""); - mMessage = QString(""); - mXQServiceConstructed = false; - mSendCalled = false; -} - -void ut_DialpadBluetoothEventFilter::cleanupTestCase() -{ - delete mDialpad; - delete mMainWindow; - delete mKeyCatcher; - delete mUtil; -} - -void ut_DialpadBluetoothEventFilter::cleanup() -{ - mKeyCatcher->mKeyPresses.clear(); - mKeyCatcher->mKeyReleases.clear(); - mDialpad->editor().setText(QString()); - QTest::qWait(WAIT_TIME); // delay between tests -} - -void ut_DialpadBluetoothEventFilter::testLongPressAsteriskKey() -{ - mDialpad->openDialpad(); - QTest::qWait(2*WAIT_TIME); - - // Basic long press - mUtil->mouseClickDialpad(Qt::Key_Asterisk, DialpadTestUtil::Press); - QTest::qWait(2000); - mUtil->mouseClickDialpad(Qt::Key_Asterisk, DialpadTestUtil::Release); - QTest::qWait(1000); - QCOMPARE(mDialpad->editor().text(), QString("")); - mDialpad->closeDialpad(); - - QVERIFY(mXQServiceConstructed == true); - QCOMPARE(mService, QString("com.nokia.services.btservices.ToggleBluetooth")); - QCOMPARE(mMessage, QString("toggleBluetooth()")); - QVERIFY(mSendCalled == true); -} - -void ut_DialpadBluetoothEventFilter::testShortAndLongPressAsteriskKey() -{ - mDialpad->openDialpad(); - - // Short press and long press shouldn't do anything - mUtil->mouseClickDialpad(Qt::Key_Asterisk, DialpadTestUtil::Press); - mUtil->mouseClickDialpad(Qt::Key_Asterisk, DialpadTestUtil::Release); - mUtil->mouseClickDialpad(Qt::Key_Asterisk, DialpadTestUtil::Press); - QTest::qWait(2000); - mUtil->mouseClickDialpad(Qt::Key_Asterisk, DialpadTestUtil::Release); - QCOMPARE(mDialpad->editor().text(), QString("**")); - mDialpad->closeDialpad(); -} - -DIALPAD_TEST_MAIN(ut_DialpadBluetoothEventFilter) -#include "ut_dialpadbluetootheventfilter.moc" - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadbluetootheventfilter/ut_dialpadbluetootheventfilter.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadbluetootheventfilter/ut_dialpadbluetootheventfilter.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../../../../../inc ../shared - -CONFIG += hb qtestlib - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc -} - -# -HEADERS += ../../../inc/dialpadbluetootheventfilter.h \ - xqservicerequest.h \ - dialpadtestutil.h -SOURCES += ut_dialpadbluetootheventfilter.cpp \ - ../../../src/dialpadbluetootheventfilter.cpp \ - ../shared/dialpadtestutil.cpp - -# -LIBS += -ldialpad diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadbluetootheventfilter/xqservicerequest.h --- a/telutils/dialpad/tsrc/unit/ut_dialpadbluetootheventfilter/xqservicerequest.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* 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: -* -*/ - -class XQServiceRequest : public QObject -{ -public: - XQServiceRequest(const QString& service, const QString& message, const bool& synchronous); - ~XQServiceRequest(); - bool send(QVariant& retValue); - void addArg(const QVariant& v); - template - inline XQServiceRequest &operator<< (const T &var) - { - QVariant v = qVariantFromValue(var); - addArg(v); - return *this; - } -}; diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadbutton/ut_dialpadbutton.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadbutton/ut_dialpadbutton.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +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 "dialpadtest.h" -#include "dialpadbutton.h" - -class TestDialpadButton : public DialpadButton -{ -public: - TestDialpadButton() {}; - ~TestDialpadButton() {}; - - bool testSceneEvent(QEvent *event) { return DialpadButton::sceneEvent(event); }; -}; - -class ut_DialpadButton : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void cleanupTestCase(); - - void testButtonType(); - void testUpdatePrimitives(); - void testSceneEvent(); - -private: - TestDialpadButton *mButton; -}; - -void ut_DialpadButton::initTestCase() -{ - mButton = new TestDialpadButton(); -} - -void ut_DialpadButton::cleanupTestCase() -{ - delete mButton; -} - -void ut_DialpadButton::testButtonType() -{ - QVERIFY(mButton->buttonType()==DialpadButton::FunctionButton); - mButton->setButtonType(DialpadButton::CallButton); - QVERIFY(mButton->buttonType()==DialpadButton::CallButton); -} - -void ut_DialpadButton::testUpdatePrimitives() -{ - // function button - - mButton->setEnabled(false); - mButton->setButtonType(DialpadButton::FunctionButton); - HbFrameItem* frame = - qgraphicsitem_cast(static_cast(mButton)->primitive("background")); - QVERIFY(frame->frameDrawer().frameGraphicsName()=="qtg_fr_input_btn_function_disabled"); - - mButton->setEnabled(true); - QVERIFY(frame->frameDrawer().frameGraphicsName()=="qtg_fr_input_btn_function_normal"); - - mButton->setDown(true); - QVERIFY(frame->frameDrawer().frameGraphicsName()=="qtg_fr_input_btn_function_pressed"); - mButton->setDown(false); - - // call button - mButton->setEnabled(false); - mButton->setButtonType(DialpadButton::CallButton); - QVERIFY(frame->frameDrawer().frameGraphicsName()=="qtg_fr_input_btn_function_disabled"); - - mButton->setEnabled(true); - QVERIFY(frame->frameDrawer().frameGraphicsName()=="qtg_fr_btn_green_normal"); - - mButton->setDown(true); - QVERIFY(frame->frameDrawer().frameGraphicsName()=="qtg_fr_btn_green_pressed"); - mButton->setDown(false); -} - -void ut_DialpadButton::testSceneEvent() -{ - QEvent event(QEvent::UngrabMouse); - QSignalSpy spy( mButton, SIGNAL( clicked()) ); - QSignalSpy spy2( mButton, SIGNAL( released()) ); - mButton->setVisible(false); - mButton->setDown(false); - mButton->testSceneEvent(&event); - QVERIFY(spy.count()==0); - QVERIFY(spy2.count()==0); - - QEvent eventNone(QEvent::None); - mButton->testSceneEvent(&eventNone); - QVERIFY(spy.count()==0); - QVERIFY(spy2.count()==0); - - mButton->setVisible(true); - mButton->setDown(true); - mButton->testSceneEvent(&event); - QVERIFY(spy.count()==1); - QVERIFY(spy2.count()==1); - QVERIFY(mButton->isDown()==false); -} - -DIALPAD_TEST_MAIN(ut_DialpadButton) -#include "ut_dialpadbutton.moc" diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadbutton/ut_dialpadbutton.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadbutton/ut_dialpadbutton.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../../src -INCLUDEPATH += . ../../../inc ../shared -CONFIG += hb qtestlib - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ -} - -HEADERS += ../../../inc/dialpadbutton.h - -SOURCES += ut_dialpadbutton.cpp \ - ../../../src/dialpadbutton.cpp - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpademergencycalleventfilter/ut_dialpademergencycalleventfilter.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpademergencycalleventfilter/ut_dialpademergencycalleventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "mock_cphcltemergencycall.h" -#include "dialpadtest.h" -#include "dialpadtestutil.h" -#include "dialpademergencycalleventfilter.h" -#include "dialpad.h" - -const int WAIT_TIME = 300; - -// test cases -class ut_DialpadEmergencyCallEventFilter : public QObject, public MockService -{ - Q_OBJECT - -private slots: - void initTestCase(); - void init(); - void cleanupTestCase(); - void cleanup(); - - // These are actual emergency call event filter unit tests - void testEmergencyCallEventFilter(); - -private: - HbMainWindow* mMainWindow; - Dialpad* mDialpad; - DialpadEmergencyCallEventFilter *mEventFilter; - DialpadTestUtil* mUtil; -}; - -void ut_DialpadEmergencyCallEventFilter::initTestCase() -{ - mMainWindow = new HbMainWindow; - - mDialpad = new Dialpad(); - mEventFilter = new DialpadEmergencyCallEventFilter(mDialpad, this); - //hbInstance->allMainWindows().at(0)->installEventFilter(mEventFilter); - mMainWindow->installEventFilter(mEventFilter); - - mUtil = new DialpadTestUtil(*mMainWindow); - - QRectF rect(mMainWindow->contentsRect()); - rect.setHeight(rect.height()*0.7); - rect.moveTop((mMainWindow->contentsRect().height()-rect.height())/2); - - mDialpad->setPreferredSize(mMainWindow->layoutRect().width(), - mMainWindow->layoutRect().height()/2); - mDialpad->setPos(0,mMainWindow->layoutRect().height()/4); - - mMainWindow->show(); - mDialpad->show(); - mDialpad->hide(); -} - -void ut_DialpadEmergencyCallEventFilter::init() -{ - initialize(); -} - -void ut_DialpadEmergencyCallEventFilter::cleanupTestCase() -{ - delete mDialpad; - delete mMainWindow; - delete mUtil; -} - -void ut_DialpadEmergencyCallEventFilter::cleanup() -{ - reset(); - mDialpad->editor().setText(QString()); - QTest::qWait( WAIT_TIME ); // delay between tests -} - -void checkNumber(const TDesC& aNumber, TBool& aIsEmergencyNumber) -{ - if (aNumber == _L("112")) { - aIsEmergencyNumber = true; - } -} - -void ut_DialpadEmergencyCallEventFilter::testEmergencyCallEventFilter() -{ - EXPECT(CPhCltEmergencyCallMock, IsEmergencyPhoneNumber).willOnce( - invoke(checkNumber)); - EXPECT(CPhCltEmergencyCallMock, DialEmergencyCallL); - - mDialpad->openDialpad(); - QTest::qWait(WAIT_TIME); - mUtil->mouseClickDialpad(Qt::Key_1); - QTest::qWait(1000); - mUtil->mouseClickDialpad(Qt::Key_1); - QTest::qWait(1000); - mUtil->mouseClickDialpad(Qt::Key_2); - QTest::qWait(1000); - mUtil->mouseClickDialpad(Qt::Key_Yes); - QTest::qWait(1000); - - mDialpad->closeDialpad(); - - QVERIFY(verify()); -} - -DIALPAD_TEST_MAIN(ut_DialpadEmergencyCallEventFilter) -#include "ut_dialpademergencycalleventfilter.moc" - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpademergencycalleventfilter/ut_dialpademergencycalleventfilter.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpademergencycalleventfilter/ut_dialpademergencycalleventfilter.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../../../../../inc ../shared - -CONFIG += hb qtestlib - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - LIBS += -lphoneclient -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc - INCLUDEPATH += ../../../../xqtelephonyservice/inc -} - -#ß -HEADERS += ../../../inc/dialpademergencycalleventfilter.h \ - ../shared/dialpadtestutil.h -SOURCES += ut_dialpademergencycalleventfilter.cpp \ - ../../../src/dialpademergencycalleventfilter.cpp \ - ../shared/dialpadtestutil.cpp \ - ../shared/mock_cphcltemergencycall.cpp - -# -LIBS += -ldialpad -lmocklib -lsymbianmock diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/hblineedit.h --- a/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/hblineedit.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbWidgets module of the UI Extensions for Mobile. -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this file. -** Please review the following information to ensure the GNU Lesser General -** Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#ifndef HBLINEEDIT_H -#define HBLINEEDIT_H - -#include -#include -#include -#include - -class HbLineEditPrivate; - -class HB_WIDGETS_EXPORT HbLineEdit: public QObject -{ - Q_OBJECT - - Q_ENUMS(EchoMode) - - Q_PROPERTY(QString text READ text WRITE setText USER true) - Q_PROPERTY(QString displayText READ displayText) - Q_PROPERTY(int maxLength READ maxLength WRITE setMaxLength) - Q_PROPERTY(bool hasSelectedText READ hasSelectedText) - Q_PROPERTY(QString selectedText READ selectedText) - Q_PROPERTY(int selectionStart READ selectionStart) - Q_PROPERTY(int maxRows READ maxRows WRITE setMaxRows) - Q_PROPERTY(int minRows READ minRows WRITE setMinRows) - Q_PROPERTY(bool expandable READ isExpandable) - Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode) - -public: - - explicit HbLineEdit(QGraphicsItem *parent = 0); - explicit HbLineEdit(const QString &text, QGraphicsItem *parent = 0); - virtual ~HbLineEdit(); - - enum { - Type = Hb::ItemType_LineEdit - }; - - int type() const; - - int maxLength() const; - void setMaxLength(int length); - - void setMinRows(int rows); - int minRows() const; - - void setMaxRows(int rows); - int maxRows() const; - - bool isExpandable() const; - - QString text() const; - QString displayText() const; - - bool hasSelectedText() const; - QString selectedText() const; - int selectionStart() const; - void setSelection(int start, int length); - - int cursorPosition() const; - void setCursorPosition(int pos); - - enum EchoMode { Normal, NoEcho, Password, PasswordEchoOnEdit }; - EchoMode echoMode() const; - void setEchoMode(EchoMode); - - void setCapitalization ( QFont::Capitalization caps ); - QFont::Capitalization capitalization () const; - -public slots: - void setText(const QString &text); - -signals: - void editingFinished(); - void textChanged(const QString &text); - void selectionChanged(); - -protected: - HbLineEdit(HbLineEditPrivate &dd, QGraphicsItem *parent); - - void inputMethodEvent(QInputMethodEvent *event); - void keyPressEvent(QKeyEvent *event); - void keyReleaseEvent(QKeyEvent *event); - - void resizeEvent(QGraphicsSceneResizeEvent *event); - - bool canInsertFromMimeData(const QMimeData *source) const; - void insertFromMimeData(const QMimeData *source); - - void focusOutEvent ( QFocusEvent * event ); - void focusInEvent ( QFocusEvent * event ); -private: - Q_DISABLE_COPY(HbLineEdit) -// Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit) -// Q_PRIVATE_SLOT(d_func(), void _q_textChanged()) -}; - -#endif // HBLINEEDIT_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include -#include -#ifdef Q_OS_SYMBIAN -#include -#include -#endif -#include "ut_dialpadhasheventfilter.h" -#include "dialpadtest.h" -#include "dialpadhasheventfilter.h" -#include "dialpad.h" - -const int WAIT_TIME = 300; - -/*void setValidatorReturnValue(QVariant &returnValue) -{ - returnValue.setValue(QRegExp::escape(KValidKeySequence)); -}*/ - -UT_DialpadHashEventFilter::UT_DialpadHashEventFilter() - : - m_dialPad(0), - m_eventFilter(0), - m_lineEditMock(0) -{ - -} - -UT_DialpadHashEventFilter::~UT_DialpadHashEventFilter() -{ - delete m_dialPad; - delete m_eventFilter; - delete m_lineEditMock; -} - -void UT_DialpadHashEventFilter::init() -{ - initialize(); - - m_lineEditMock = new HbLineEdit(); - QT_TRAP_THROWING(SmcDefaultValue::SetL(*m_lineEditMock)) - - XQAiwInterfaceDescriptor descriptor; - QString dummyOperation; - bool isEmbedded = false; - QList interfaceList; - interfaceList.append(descriptor); - /*EXPECT(XQApplicationManager, list).returns(interfaceList); - QPointer aiwRequest(new XQAiwRequest( - descriptor, dummyOperation, isEmbedded)); - EXPECT(XQApplicationManager, create).returns(aiwRequest.data()); - EXPECT(XQAiwRequest, send) - .willOnce(invoke(setValidatorReturnValue)) - .returns(true);*/ - - SmcDefaultValue::SetL(QString()); - HbMainWindow *dummyWindow = NULL; - m_dialPad = new Dialpad(*dummyWindow); - m_eventFilter = new DialpadHashEventFilter(m_dialPad); - - //QVERIFY(aiwRequest.isNull()); - QVERIFY(verify()); -} - -void UT_DialpadHashEventFilter::cleanup() -{ - reset(); - - SmcDefaultValue::Reset(); - SmcDefaultValue::Reset(); - delete m_dialPad; - m_dialPad = NULL; - delete m_eventFilter; - m_eventFilter = NULL; - delete m_lineEditMock; - m_lineEditMock = NULL; -} - -#ifdef Q_OS_SYMBIAN - -/*void setServiceRequestReturnValue(QVariant & returnValue) -{ - returnValue.setValue(true); -}*/ - -void UT_DialpadHashEventFilter::testeventFilter() -{ - // start long press timer - EXPECT(XQAiwRequest, send).times(0); - QKeyEvent keyEvent( - QEvent::KeyPress, - Qt::Key_NumberSign, - Qt::NoModifier); - bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - QVERIFY(verify()); - - // stop long press timer - QKeyEvent keyEvent2( - QEvent::KeyRelease, - Qt::Key_NumberSign, - Qt::NoModifier); - - filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent2); - QVERIFY(!filtered); - QVERIFY(verify()); - - // some other buttons pressed and released - EXPECT(XQAiwRequest, send).times(0); - QKeyEvent keyEvent3( - QEvent::KeyPress, - Qt::Key_3, - Qt::NoModifier); - // start long press timer - filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent3); - QVERIFY(!filtered); - QVERIFY(verify()); - - QKeyEvent keyEvent4( - QEvent::FocusIn, - Qt::Key_1, - Qt::NoModifier); - // stop long press timer - filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent4); - QVERIFY(!filtered); - QVERIFY(verify()); - -} - -void UT_DialpadHashEventFilter::testhandleLongKeyPress() -{ - m_eventFilter->handleLongKeyPress(); - m_eventFilter->mKeyEvent = Qt::Key_NumberSign; - m_eventFilter->handleLongKeyPress(); -} - -void UT_DialpadHashEventFilter::testhandleCallButtonPress() -{ - // inherited method not supported - EXPECT(XQAiwRequest, send).times(0); - bool callButtonPress = m_eventFilter->handleCallButtonPress(); - QVERIFY(!callButtonPress); -} - -void UT_DialpadHashEventFilter::testhandleMailboxOperation() -{ - m_eventFilter->handleMailboxOperation(); - - // another call to test other note - m_eventFilter->handleMailboxOperation(); -} - -#endif - -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - UT_DialpadHashEventFilter tc; - return QTest::qExec(&tc, argc, argv); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.h --- a/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_DIALPADHASHEVENTFILTER_H -#define UT_DIALPADHASHEVENTFILTER_H - -#include -#include - -class Dialpad; -class DialpadHashEventFilter; -class HbLineEdit; -class QTimer; - -// helper class -class KeyEventCatcher : public QObject -{ -public: - bool eventFilter(QObject* watched, QEvent * event) - { - Q_UNUSED(watched); - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - mKeyPresses.append(keyEvent->key()); - return false; - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - mKeyReleases.append(keyEvent->key()); - return false; - } - return false; - } - -public: - QList mKeyPresses; - QList mKeyReleases; -}; - -class UT_DialpadHashEventFilter : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_DialpadHashEventFilter(); - ~UT_DialpadHashEventFilter(); - -private slots: - - void init(); - void cleanup(); - // void callEventFilter(); - -#ifdef Q_OS_SYMBIAN - // These are actual hash event filter unit tests - void testeventFilter(); - void testhandleLongKeyPress(); - void testhandleCallButtonPress(); - void testhandleMailboxOperation(); -#endif - -private: - Dialpad *m_dialPad; - DialpadHashEventFilter *m_eventFilter; - HbLineEdit *m_lineEditMock; - QTimer *mLongPressTimer; -}; - -#endif // UT_DIALPADHASHEVENTFILTER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadhasheventfilter/ut_dialpadhasheventfilter.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../../../../../inc ../shared - -CONFIG += hb qtestlib - -QT -= gui - -DEFINES += BUILD_DIALPAD \ - BUILD_DIALPADKEYHANDLER \ - XQ_BUILD_XQSERVICE_LIB \ - BUILD_HB_WIDGETS - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc -} - -# -HEADERS += ../../../inc/dialpadhasheventfilter.h \ - ut_dialpadhasheventfilter.h \ - ../../../inc/dialpadmailboxeventfilterbase.h \ - ../../../inc/dialpadsymbianwrapper.h \ - ../../../inc/dialpadsymbianwrapper_p.h \ - /epoc32/include/mw/xqservicerequest.h \ - /epoc32/include/mw/xqappmgr.h \ - /epoc32/include/mw/xqaiwrequest.h \ - ../../../../../phonesrv_plat/dialpad_api/inc/dialpad.h \ - /epoc32/include/mw/hb/hbwidgets/hbnotificationdialog.h \ - hblineedit.h - -SOURCES += ut_dialpadhasheventfilter.cpp \ - ../../../src/dialpadhasheventfilter.cpp \ - ../../../src/dialpadmailboxeventfilterbase.cpp \ - ../../../src/dialpadsymbianwrapper.cpp \ - ../../../src/dialpadsymbianwrapper_p.cpp \ - ../shared/mock_dialpad.cpp \ - ../shared/mock_xqservicerequest.cpp \ - ../shared/mock_hblineedit.cpp \ - ../shared/mock_xqappmgr.cpp \ - ../shared/mock_xqaiwrequest.cpp \ - ../shared/mock_xqaiwinterfacedescriptor.cpp \ - ../shared/mock_cenrep.cpp \ - ../shared/mock_cvoicemailbox.cpp \ - ../shared/mock_hbnotificationdialog.cpp - - -# -LIBS += -lmocklib -lsymbianmock -lxqserviceutil diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include -#ifdef Q_OS_SYMBIAN -#include -#endif // Q_OS_SYMBIAN - -#include -#include "ut_dialpadkeyhandler.h" -#include "dialpad.h" -#include "dialpadkeyhandler.h" -#include "dialpadtest.h" - -HbMainWindow *HbWidget::mainWindow() const -{ - return 0; -} - - -void QObject::installEventFilter(QObject *obj) -{ - SMC_MOCK_METHOD1( void, QObject *, obj ) -} - -void QObject::removeEventFilter(QObject *obj) -{ - SMC_MOCK_METHOD1( void, QObject *, obj ) -} - -UT_DialpadKeyHandler::UT_DialpadKeyHandler() - : - m_dialPad(0), - m_keyHandler(0) -{ - -} - - -UT_DialpadKeyHandler::~UT_DialpadKeyHandler() -{ - delete m_dialPad; - delete m_keyHandler; -} - - -void UT_DialpadKeyHandler::init() -{ - initialize(); - - HbMainWindow *dummyWindow = 0; - m_dialPad = new Dialpad(*dummyWindow); -} - - -void UT_DialpadKeyHandler::cleanup() -{ - reset(); - - delete m_dialPad; - m_dialPad = NULL; - delete m_keyHandler; - m_keyHandler = NULL; -} - - -void UT_DialpadKeyHandler::t_constructionWithAllFilters() -{ - EXPECT(QObject, installEventFilter).times(5); - EXPECT(QObject, removeEventFilter).times(5); - - DialpadKeyHandler::DialpadKeyEventFilters filters( - DialpadKeyHandler::VoiceMailbox | - DialpadKeyHandler::VideoMailBox | - DialpadKeyHandler::Bluetooth | - DialpadKeyHandler::KeySequence | - DialpadKeyHandler::EmergencyCall | - DialpadKeyHandler::Hash ); - - m_keyHandler = new DialpadKeyHandler(m_dialPad, filters, this); - delete m_keyHandler; - m_keyHandler = 0; - - QVERIFY(verify()); -} - - -void UT_DialpadKeyHandler::t_constructionWithNoFilters() -{ - EXPECT(QObject, installEventFilter).times(0); - - DialpadKeyHandler::DialpadKeyEventFilters filters; - m_keyHandler = new DialpadKeyHandler(m_dialPad, filters, this); - - QVERIFY(verify()); -} - - -void UT_DialpadKeyHandler::t_deprecatedConstructionWithVideoMailbox() -{ -#ifdef Q_OS_SYMBIAN - EXPECT(FeatureManager, FeatureSupported).returns(true); - EXPECT(QObject, installEventFilter).times(4); - - HbMainWindow *dummyWindow = 0; - m_keyHandler = new DialpadKeyHandler(m_dialPad, *dummyWindow, this); - - QVERIFY(verify()); -#endif // Q_OS_SYMBIAN -} - - -void UT_DialpadKeyHandler::t_deprecatedConstructionWithoutVideoMailbox() -{ - EXPECT(FeatureManager, FeatureSupported).returns(false); - EXPECT(QObject, installEventFilter).times(3); - - HbMainWindow *dummyWindow = 0; - m_keyHandler = new DialpadKeyHandler(m_dialPad, *dummyWindow, this); - - QVERIFY(verify()); -} - - -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - UT_DialpadKeyHandler tc; - return QTest::qExec(&tc, argc, argv); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.h --- a/telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_DIALPADKEYHANDLER_H -#define UT_DIALPADKEYHANDLER_H - -#include -#include - -class Dialpad; -class DialpadKeyHandler; - -class UT_DialpadKeyHandler : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_DialpadKeyHandler(); - ~UT_DialpadKeyHandler(); - -private slots: - - void init(); - void cleanup(); - - void t_constructionWithAllFilters(); - void t_constructionWithNoFilters(); - void t_deprecatedConstructionWithVideoMailbox(); - void t_deprecatedConstructionWithoutVideoMailbox(); - -private: - Dialpad *m_dialPad; - DialpadKeyHandler *m_keyHandler; -}; - -#endif // UT_DIALPADKEYHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadkeyhandler/ut_dialpadkeyhandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../../../../../inc ../shared - -CONFIG += hb qtestlib - -QT -= gui - -DEFINES += BUILD_DIALPAD \ - BUILD_DIALPADKEYHANDLER \ - XQ_BUILD_XQSERVICE_LIB \ - XQ_BUILD_XQSERVICEUTIL_LIB \ - BUILD_HB_WIDGETS - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc -} - -HEADERS += ../../../../../phonesrv_plat/dialpad_api/inc/dialpadkeyhandler.h -SOURCES += ../../../src/dialpadkeyhandler.cpp - -HEADERS += ut_dialpadkeyhandler.h -SOURCES += ut_dialpadkeyhandler.cpp - -HEADERS += ../../../../../phonesrv_plat/dialpad_api/inc/dialpad.h \ - ../../../inc/dialpadbluetootheventfilter.h \ - ../../../inc/dialpademergencycalleventfilter.h \ - ../../../inc/dialpadkeysequenceeventfilter.h \ - ../../../inc/dialpadmailboxeventfilterbase.h \ - ../../../inc/dialpadvideomailboxeventfilter.h \ - ../../../inc/dialpadvoicemailboxeventfilter.h \ - ../../../inc/dialpadhasheventfilter.h \ - #/epoc32/include/mw/xqservicerequest.h \ - /epoc32/include/mw/xqappmgr.h \ - /epoc32/include/mw/xqaiwrequest.h \ - /epoc32/include/mw/xqrequestinfo.h - -SOURCES += ../shared/mock_dialpad.cpp \ - ../shared/mock_dialpadbluetootheventfilter.cpp \ - ../shared/mock_dialpademergencycalleventfilter.cpp \ - ../shared/mock_dialpadkeysequenceeventfilter.cpp \ - ../shared/mock_dialpadmailboxeventfilterbase.cpp \ - ../shared/mock_dialpadvideomailboxeventfilter.cpp \ - ../shared/mock_dialpadvoicemailboxeventfilter.cpp \ - ../shared/mock_dialpadhasheventfilter.cpp \ - ../shared/mock_featmgr.cpp \ - ../shared/mock_xqappmgr.cpp \ - ../shared/mock_xqaiwrequest.cpp \ - ../shared/mock_xqaiwinterfacedescriptor.cpp \ - ../shared/mock_hbmainwindow.cpp \ - ../shared/mock_xqrequestinfo.cpp - -LIBS += -lmocklib -lsymbianmock -lxqservice -lxqserviceutil diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/hblineedit.h --- a/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/hblineedit.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbWidgets module of the UI Extensions for Mobile. -** -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this file. -** Please review the following information to ensure the GNU Lesser General -** Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#ifndef HBLINEEDIT_H -#define HBLINEEDIT_H - -#include -#include -#include -#include - -class HbLineEditPrivate; - -class HB_WIDGETS_EXPORT HbLineEdit: public QObject -{ - Q_OBJECT - - Q_ENUMS(EchoMode) - - Q_PROPERTY(QString text READ text WRITE setText USER true) - Q_PROPERTY(QString displayText READ displayText) - Q_PROPERTY(int maxLength READ maxLength WRITE setMaxLength) - Q_PROPERTY(bool hasSelectedText READ hasSelectedText) - Q_PROPERTY(QString selectedText READ selectedText) - Q_PROPERTY(int selectionStart READ selectionStart) - Q_PROPERTY(int maxRows READ maxRows WRITE setMaxRows) - Q_PROPERTY(int minRows READ minRows WRITE setMinRows) - Q_PROPERTY(bool expandable READ isExpandable) - Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode) - -public: - - explicit HbLineEdit(QGraphicsItem *parent = 0); - explicit HbLineEdit(const QString &text, QGraphicsItem *parent = 0); - virtual ~HbLineEdit(); - - enum { - Type = Hb::ItemType_LineEdit - }; - - int type() const; - - int maxLength() const; - void setMaxLength(int length); - - void setMinRows(int rows); - int minRows() const; - - void setMaxRows(int rows); - int maxRows() const; - - bool isExpandable() const; - - QString text() const; - QString displayText() const; - - bool hasSelectedText() const; - QString selectedText() const; - int selectionStart() const; - void setSelection(int start, int length); - - int cursorPosition() const; - void setCursorPosition(int pos); - - enum EchoMode { Normal, NoEcho, Password, PasswordEchoOnEdit }; - EchoMode echoMode() const; - void setEchoMode(EchoMode); - - void setCapitalization ( QFont::Capitalization caps ); - QFont::Capitalization capitalization () const; - -public slots: - void setText(const QString &text); - -signals: - void editingFinished(); - void textChanged(const QString &text); - void selectionChanged(); - -protected: - HbLineEdit(HbLineEditPrivate &dd, QGraphicsItem *parent); - - void inputMethodEvent(QInputMethodEvent *event); - void keyPressEvent(QKeyEvent *event); - void keyReleaseEvent(QKeyEvent *event); - - void resizeEvent(QGraphicsSceneResizeEvent *event); - - bool canInsertFromMimeData(const QMimeData *source) const; - void insertFromMimeData(const QMimeData *source); - - void focusOutEvent ( QFocusEvent * event ); - void focusInEvent ( QFocusEvent * event ); -private: - Q_DISABLE_COPY(HbLineEdit) - //Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit) - //Q_PRIVATE_SLOT(d_func(), void _q_textChanged()) -}; - -#endif // HBLINEEDIT_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,227 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include -#include -#ifdef Q_OS_SYMBIAN -#include -#include -#endif -#include "ut_dialpadkeysequenceeventfilter.h" -#include "dialpadtest.h" -#include "dialpadkeysequenceeventfilter.h" -#include "dialpad.h" - -const QString KValidKeySequence("*#1#"); - -void setValidatorReturnValue(QVariant &returnValue) -{ - returnValue.setValue(QRegExp::escape(KValidKeySequence)); -} - -UT_DialpadKeySequenceEventFilter::UT_DialpadKeySequenceEventFilter() - : - m_dialPad(0), - m_eventFilter(0), - m_lineEditMock(0) -{ - -} - -UT_DialpadKeySequenceEventFilter::~UT_DialpadKeySequenceEventFilter() -{ - delete m_dialPad; - delete m_eventFilter; - delete m_lineEditMock; -} - -void UT_DialpadKeySequenceEventFilter::init() -{ - initialize(); - - m_lineEditMock = new HbLineEdit(); - QT_TRAP_THROWING(SmcDefaultValue::SetL(*m_lineEditMock)) - - XQAiwInterfaceDescriptor descriptor; - QString dummyOperation; - bool isEmbedded = false; - QList interfaceList; - interfaceList.append(descriptor); - EXPECT(XQApplicationManager, list).returns(interfaceList); - QPointer aiwRequest(new XQAiwRequest( - descriptor, dummyOperation, isEmbedded)); - EXPECT(XQApplicationManager, create).returns(aiwRequest.data()); - EXPECT(XQAiwRequest, send) - .willOnce(invoke(setValidatorReturnValue)) - .returns(true); - - SmcDefaultValue::SetL(QString()); - HbMainWindow *dummyWindow = NULL; - m_dialPad = new Dialpad(*dummyWindow); - m_eventFilter = new DialpadKeySequenceEventFilter(m_dialPad); - - QVERIFY(aiwRequest.isNull()); - QVERIFY(verify()); -} - -void UT_DialpadKeySequenceEventFilter::cleanup() -{ - reset(); - - SmcDefaultValue::Reset(); - SmcDefaultValue::Reset(); - delete m_dialPad; - m_dialPad = NULL; - delete m_eventFilter; - m_eventFilter = NULL; - delete m_lineEditMock; - m_lineEditMock = NULL; -} - -#ifdef Q_OS_SYMBIAN - -void setServiceRequestReturnValue(QVariant & returnValue) -{ - returnValue.setValue(true); -} - -void UT_DialpadKeySequenceEventFilter::eventFilterValidKeySequence() -{ - EXPECT(HbLineEdit, text).returns(KValidKeySequence); - EXPECT(XQAiwInterfaceDescriptor, isValid).returns(false); - EXPECT(XQAiwInterfaceDescriptor, isValid).returns(true); - XQAiwInterfaceDescriptor dummyDescriptor; - QString dummyOperation; - QPointer aiwRequest(new XQAiwRequest( - dummyDescriptor, dummyOperation, false)); - EXPECT(XQApplicationManager, create).returns(aiwRequest.data()); - EXPECT(XQAiwRequest, send) - .willOnce(invoke(setServiceRequestReturnValue)) - .returns(true); - QKeyEvent keyEvent( - QEvent::KeyRelease, - Qt::Key_NumberSign, - Qt::NoModifier); - bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - QVERIFY(aiwRequest.isNull()); - QVERIFY(verify()); -} - -void UT_DialpadKeySequenceEventFilter::eventFilterNotAKeyEvent() -{ - EXPECT(XQAiwRequest, send).times(0); - QMouseEvent mouseEvent( - QEvent::MouseMove, - QPoint(), - Qt::LeftButton, - Qt::LeftButton, - Qt::NoModifier); - bool filtered = m_eventFilter->eventFilter(m_dialPad, &mouseEvent); - QVERIFY(!filtered); - QVERIFY(verify()); -} - -void UT_DialpadKeySequenceEventFilter::eventFilterNotAHashKey() -{ - EXPECT(XQAiwRequest, send).times(0); - QKeyEvent keyEvent( - QEvent::KeyRelease, - Qt::Key_Escape, - Qt::NoModifier); - bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - QVERIFY(verify()); -} - -void UT_DialpadKeySequenceEventFilter::eventFilterNotValidKeySequence() -{ - const QString KInvalidKeySequence1("*##"); - const QString KInvalidKeySequence2("#1234#"); - const QString KInvalidKeySequence3("**1234#"); - const QString KInvalidKeySequence4("*#1234*"); - - EXPECT(XQAiwRequest, send).times(0); - - EXPECT(HbLineEdit, text).returns(KInvalidKeySequence1); - QKeyEvent keyEvent( - QEvent::KeyRelease, - Qt::Key_NumberSign, - Qt::NoModifier); - bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - - EXPECT(HbLineEdit, text).returns(KInvalidKeySequence2); - filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - - EXPECT(HbLineEdit, text).returns(KInvalidKeySequence3); - filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - - EXPECT(HbLineEdit, text).returns(KInvalidKeySequence4); - filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - - QVERIFY(verify()); -} - -void UT_DialpadKeySequenceEventFilter::eventFilterServiceRequestFails() -{ - // Qt Highway error while issuing service request - EXPECT(HbLineEdit, text).returns(KValidKeySequence); - EXPECT(XQAiwInterfaceDescriptor, isValid).returns(false); - EXPECT(XQAiwInterfaceDescriptor, isValid).returns(true); - XQAiwInterfaceDescriptor dummyDescriptor; - QString dummyOperation; - QPointer aiwRequest1(new XQAiwRequest( - dummyDescriptor, dummyOperation, false)); - EXPECT(XQApplicationManager, create).returns(aiwRequest1.data()); - EXPECT(XQAiwRequest, send).returns(false); - QKeyEvent keyEvent( - QEvent::KeyRelease, - Qt::Key_NumberSign, - Qt::NoModifier); - bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - QVERIFY(aiwRequest1.isNull()); - QVERIFY(verify()); - - // service provider fails to fulfill request - EXPECT(HbLineEdit, text).returns(KValidKeySequence); - EXPECT(XQAiwInterfaceDescriptor, isValid).returns(false); - EXPECT(XQAiwInterfaceDescriptor, isValid).returns(true); - QPointer aiwRequest2(new XQAiwRequest( - dummyDescriptor, dummyOperation, false)); - EXPECT(XQApplicationManager, create).returns(aiwRequest2.data()); - EXPECT(XQAiwRequest, send).returns(true); - filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent); - QVERIFY(!filtered); - QVERIFY(aiwRequest2.isNull()); - QVERIFY(verify()); -} - -#endif - -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - UT_DialpadKeySequenceEventFilter tc; - return QTest::qExec(&tc, argc, argv); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.h --- a/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_DIALPADKEYSEQUENCEEVENTFILTER_H -#define UT_DIALPADKEYSEQUENCEEVENTFILTER_H - -#include -#include - -class Dialpad; -class DialpadKeySequenceEventFilter; -class HbLineEdit; - -class UT_DialpadKeySequenceEventFilter : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_DialpadKeySequenceEventFilter(); - ~UT_DialpadKeySequenceEventFilter(); - -private slots: - - void init(); - void cleanup(); -#ifdef Q_OS_SYMBIAN - void eventFilterValidKeySequence(); - void eventFilterNotAKeyEvent(); - void eventFilterNotAHashKey(); - void eventFilterNotValidKeySequence(); - void eventFilterServiceRequestFails(); -#endif - -private: - Dialpad *m_dialPad; - DialpadKeySequenceEventFilter *m_eventFilter; - HbLineEdit *m_lineEditMock; -}; - -#endif // UT_DIALPADKEYSEQUENCEEVENTFILTER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../../../../../inc ../shared - -CONFIG += hb qtestlib - -QT -= gui - -DEFINES += BUILD_DIALPAD \ - BUILD_DIALPADKEYHANDLER \ - XQ_BUILD_XQSERVICE_LIB \ - BUILD_HB_WIDGETS - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc -} - -HEADERS += ../../../inc/dialpadkeysequenceeventfilter.h -SOURCES += ../../../src/dialpadkeysequenceeventfilter.cpp - -HEADERS += ut_dialpadkeysequenceeventfilter.h -SOURCES += ut_dialpadkeysequenceeventfilter.cpp - -HEADERS += ../../../../../phonesrv_plat/dialpad_api/inc/dialpad.h -HEADERS += /epoc32/include/mw/xqservicerequest.h \ - /epoc32/include/mw/xqappmgr.h \ - /epoc32/include/mw/xqaiwrequest.h \ - hblineedit.h - -SOURCES += ../shared/mock_dialpad.cpp \ - ../shared/mock_xqservicerequest.cpp \ - ../shared/mock_hblineedit.cpp \ - ../shared/mock_xqappmgr.cpp \ - ../shared/mock_xqaiwrequest.cpp \ - ../shared/mock_xqaiwinterfacedescriptor.cpp - -LIBS += -lmocklib -lsymbianmock -lxqserviceutil diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadmultitaphandler/ut_dialpadmultitaphandler.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadmultitaphandler/ut_dialpadmultitaphandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +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 "dialpadmultitaphandler.h" -#include "dialpadtest.h" - - -class ut_DialpadMultitapHandler : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void cleanupTestCase(); - void cleanup(); - - void testWatchedNotEditor(); - void testNumericKeyPress(); - void testNonNumericKeyPress(); - void testAsterisk(); - void testAsteriskMultitap(); - -private: - QObject* mHandler; - HbLineEdit* mEditor; -}; - -void ut_DialpadMultitapHandler::initTestCase() -{ - mEditor = new HbLineEdit; - mHandler = new DialpadMultitapHandler(*mEditor); -} - -void ut_DialpadMultitapHandler::cleanupTestCase() -{ - delete mHandler; - delete mEditor; -} - -void ut_DialpadMultitapHandler::cleanup() -{ - mEditor->setText(QString()); -} - -void ut_DialpadMultitapHandler::testWatchedNotEditor() -{ - QKeyEvent asteriskPress(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier); - QKeyEvent asteriskRelease(QEvent::KeyRelease, Qt::Key_Asterisk, Qt::NoModifier); - HbLineEdit edit2; - - QVERIFY(mHandler->eventFilter(&edit2,&asteriskPress)==false); - QVERIFY(mHandler->eventFilter(&edit2,&asteriskRelease)==false); -} - -void ut_DialpadMultitapHandler::testNumericKeyPress() -{ - QKeyEvent key1Press(QEvent::KeyPress, Qt::Key_1, Qt::NoModifier); - QKeyEvent key1Char(QEvent::KeyPress, Qt::Key_1, Qt::NoModifier, "1"); - QKeyEvent key1Release(QEvent::KeyRelease, Qt::Key_1, Qt::NoModifier); - - QVERIFY(mHandler->eventFilter(mEditor,&key1Press)==true); - QVERIFY(mHandler->eventFilter(mEditor,&key1Char)==false); - QVERIFY(mHandler->eventFilter(mEditor,&key1Release)==false); -} - -void ut_DialpadMultitapHandler::testNonNumericKeyPress() -{ - QKeyEvent keyYesPress(QEvent::KeyPress, Qt::Key_Yes, Qt::NoModifier); - QKeyEvent keyYesRelease(QEvent::KeyRelease, Qt::Key_Yes, Qt::NoModifier); - - QVERIFY(mHandler->eventFilter(mEditor,&keyYesPress)==false); - QVERIFY(mHandler->eventFilter(mEditor,&keyYesRelease)==false); - - QKeyEvent keyBackspacePress(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier); - QKeyEvent keyBackspaceRelease(QEvent::KeyRelease, Qt::Key_Backspace, Qt::NoModifier); - - QVERIFY(mHandler->eventFilter(mEditor,&keyBackspacePress)==false); - QVERIFY(mHandler->eventFilter(mEditor,&keyBackspaceRelease)==false); -} - -void ut_DialpadMultitapHandler::testAsterisk() -{ - QKeyEvent asteriskPress(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier); - QKeyEvent asteriskChar(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier, "*"); - QKeyEvent asteriskRelease(QEvent::KeyRelease, Qt::Key_Asterisk, Qt::NoModifier); - - QVERIFY(mHandler->eventFilter(mEditor,&asteriskPress)==true); - QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==false); - QTest::qWait( 1000 ); - QVERIFY(mHandler->eventFilter(mEditor,&asteriskRelease)==false); -} - -void ut_DialpadMultitapHandler::testAsteriskMultitap() -{ - QKeyEvent asteriskPress(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier); - QKeyEvent asteriskChar(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier, "*"); - QKeyEvent asteriskRelease(QEvent::KeyRelease, Qt::Key_Asterisk, Qt::NoModifier); - - QVERIFY(mHandler->eventFilter(mEditor,&asteriskPress)==true); - QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==false); - QTest::qWait( 100 ); - QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==true); // + - QTest::qWait( 100 ); - QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==true); // p - QTest::qWait( 100 ); - QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==true); // w - QTest::qWait( 100 ); - QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==true); // * - QVERIFY(mHandler->eventFilter(mEditor,&asteriskRelease)==false); -} - -DIALPAD_TEST_MAIN(ut_DialpadMultitapHandler) -#include "ut_dialpadmultitaphandler.moc" - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadmultitaphandler/ut_dialpadmultitaphandler.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadmultitaphandler/ut_dialpadmultitaphandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../shared - -CONFIG += hb qtestlib - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ -} - -# -SOURCES += ut_dialpadmultitaphandler.cpp \ - ../../../src/dialpadmultitaphandler.cpp diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadnumericbutton/ut_dialpadnumericbutton.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadnumericbutton/ut_dialpadnumericbutton.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/*! -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#include -#include - -#include - -#include "dialpadtest.h" -#include "dialpadnumericbutton.h" - -class ut_DialpadNumericButton : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void cleanupTestCase(); - - void testSetText(); - void testSetSecondaryText(); - void testSetIcon(); - -private: - DialpadNumericButton *mButton; -}; - -void ut_DialpadNumericButton::initTestCase() -{ - mButton = new DialpadNumericButton(0,QPoint(1,1),QSize(1,1)); -} - -void ut_DialpadNumericButton::cleanupTestCase() -{ - delete mButton; -} - -void ut_DialpadNumericButton::testSetText() -{ - QVERIFY(mButton->text().isNull()); - mButton->setText(QLatin1String("Primary text")); - QVERIFY(mButton->text() == QLatin1String("Primary text")); -} - -void ut_DialpadNumericButton::testSetSecondaryText() -{ - QVERIFY(mButton->secondaryText().isNull()); - mButton->setSecondaryText(QLatin1String("Secondary text")); - QVERIFY(mButton->secondaryText() == QLatin1String("Secondary text")); -} - -void ut_DialpadNumericButton::testSetIcon() -{ - HbIcon icon(QLatin1String("dummy.svg")); - - QVERIFY(mButton->icon().isNull()); - mButton->setIcon(icon); - mButton->icon().setColor(Qt::white); - QVERIFY(mButton->icon().iconName() == QLatin1String("dummy.svg")); - QVERIFY(mButton->icon().color() == Qt::white); -} - -DIALPAD_TEST_MAIN(ut_DialpadNumericButton) -#include "ut_dialpadnumericbutton.moc" diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadnumericbutton/ut_dialpadnumericbutton.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadnumericbutton/ut_dialpadnumericbutton.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = app -TARGET = -DEPENDPATH += . ../../../src -INCLUDEPATH += . ../../../inc ../shared -CONFIG += hb qtestlib -HB += hbinput - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ -} - -HEADERS += ../../../inc/dialpadnumericbutton.h - -SOURCES += ut_dialpadnumericbutton.cpp \ - ../../../src/dialpadnumericbutton.cpp - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/ut_dialpadvideomailboxeventfilter.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/ut_dialpadvideomailboxeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,202 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_OS_SYMBIAN -#include "xqservicerequest.h" -#endif - -#include "dialpadtest.h" -#include "dialpadtestutil.h" -#include "dialpadvideomailboxeventfilter.h" -#include "dialpad.h" -#include "dialpadsymbianwrapper.h" - -const int WAIT_TIME = 300; -QString mService; -QString mMessage; -bool mXQServiceConstructed; -bool mSendCalled; - -DialpadSymbianWrapper::DialpadSymbianWrapper(QObject */*parent*/) : d_ptr(NULL) {} -DialpadSymbianWrapper::~DialpadSymbianWrapper() {} -int DialpadSymbianWrapper::getVideoMailboxNumber(QString &vmbxNumber) { vmbxNumber=QString("12345678"); return 0; } -int DialpadSymbianWrapper::defineVideoMailboxNumber(QString &/*vmbxNumber*/) { return 0; } - -#ifdef Q_OS_SYMBIAN -XQServiceRequest::XQServiceRequest(const QString& service, const QString& message, const bool& /*synchronous*/) { mService=service; mMessage=message; mXQServiceConstructed=true; } -XQServiceRequest::~XQServiceRequest() {} -bool XQServiceRequest::send(QVariant& /*retValue*/) { mSendCalled=true; return true; } -void XQServiceRequest::addArg(const QVariant& /*v*/) {} -#endif - -// helper class -class KeyEventCatcher : public QObject -{ -public: - bool eventFilter(QObject* watched, QEvent * event) - { - Q_UNUSED(watched); - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - mKeyPresses.append(keyEvent->key()); - return false; - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - mKeyReleases.append(keyEvent->key()); - return false; - } - return false; - } - -public: - QList mKeyPresses; - QList mKeyReleases; -}; - -// test cases -class ut_DialpadVideoMailboxEventFilter : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void init(); - void cleanupTestCase(); - void cleanup(); - - // These are actual voice mailbox event filter unit tests - void testNumericKeyTwoLongPress(); - void testNumericKeyTwoShortPress(); - void testNumericKeyTwoShortThenLongPress(); - -private: - HbMainWindow* mMainWindow; - Dialpad* mDialpad; - DialpadVideoMailboxEventFilter *mEventFilter; - KeyEventCatcher* mKeyCatcher; - DialpadTestUtil* mUtil; -}; - -void ut_DialpadVideoMailboxEventFilter::initTestCase() -{ - mMainWindow = new HbMainWindow; - - mKeyCatcher = new KeyEventCatcher; - mMainWindow->installEventFilter(mKeyCatcher); - - mUtil = new DialpadTestUtil(*mMainWindow); - - mDialpad = new Dialpad(); - mEventFilter = new DialpadVideoMailboxEventFilter(mDialpad, this); - hbInstance->allMainWindows().at(0)->installEventFilter(mEventFilter); - - QRectF rect(mMainWindow->contentsRect()); - rect.setHeight(rect.height()*0.7); - rect.moveTop((mMainWindow->contentsRect().height()-rect.height())/2); - - mDialpad->setPreferredSize(360,400); - mDialpad->setPos(0,100); - - mMainWindow->show(); - mDialpad->show(); - mDialpad->hide(); -} - -void ut_DialpadVideoMailboxEventFilter::init() -{ - mService = QString(""); - mMessage = QString(""); - mXQServiceConstructed = false; - mSendCalled = false; -} - -void ut_DialpadVideoMailboxEventFilter::cleanupTestCase() -{ - delete mDialpad; - delete mMainWindow; - delete mKeyCatcher; - delete mUtil; -} - -void ut_DialpadVideoMailboxEventFilter::cleanup() -{ - mKeyCatcher->mKeyPresses.clear(); - mKeyCatcher->mKeyReleases.clear(); - mDialpad->editor().setText(QString()); - QTest::qWait( WAIT_TIME ); // delay between tests -} - -void ut_DialpadVideoMailboxEventFilter::testNumericKeyTwoLongPress() -{ - mDialpad->openDialpad(); - QTest::qWait(WAIT_TIME); - mUtil->mouseClickDialpad(Qt::Key_2, DialpadTestUtil::Press); - QTest::qWait(2000); - mUtil->mouseClickDialpad(Qt::Key_2, DialpadTestUtil::Release); - QTest::qWait(1000); - QCOMPARE(mDialpad->editor().text(), QString("")); - mDialpad->closeDialpad(); - -#ifdef Q_OS_SYMBIAN - QVERIFY(mXQServiceConstructed == true); - QVERIFY(mSendCalled == true); - QCOMPARE(mService, QString("com.nokia.symbian.ICallDial")); - QCOMPARE(mMessage, QString("dialVideo(QString)")); -#endif -} - -void ut_DialpadVideoMailboxEventFilter::testNumericKeyTwoShortPress() -{ - mDialpad->openDialpad(); - QTest::qWait(WAIT_TIME); - mUtil->mouseClickDialpad(Qt::Key_2, DialpadTestUtil::Press); - QTest::qWait(200); - mUtil->mouseClickDialpad(Qt::Key_2, DialpadTestUtil::Release); - QTest::qWait(1000); - // Check that character '1' is in editor. - QCOMPARE(mDialpad->editor().text(), QString("2")); -} - -void ut_DialpadVideoMailboxEventFilter::testNumericKeyTwoShortThenLongPress() -{ - // Then one short and one long press - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_2, DialpadTestUtil::Press); - mUtil->mouseClickDialpad(Qt::Key_2, DialpadTestUtil::Release); - mUtil->mouseClickDialpad(Qt::Key_2, DialpadTestUtil::Press); - QTest::qWait(2000); - mUtil->mouseClickDialpad(Qt::Key_2, DialpadTestUtil::Release); - QTest::qWait(1000); - QVERIFY(mDialpad->editor().text()=="22"); - mDialpad->closeDialpad(); -} - -DIALPAD_TEST_MAIN(ut_DialpadVideoMailboxEventFilter) -#include "ut_dialpadvideomailboxeventfilter.moc" diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/ut_dialpadvideomailboxeventfilter.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/ut_dialpadvideomailboxeventfilter.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../../../../../inc ../shared - -CONFIG += hb qtestlib -DEFINES += XQSETTINGSMANAGER_NO_LIBRARY - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - - # mocks - HEADERS += /epoc32/include/platform/mw/xqsettingskey.h \ - /epoc32/include/platform/mw/xqsettingsmanager.h - SOURCES += ../shared/mock_xqsettingsmanager.cpp \ - ../shared/mock_xqsettingskey.cpp - - LIBS += -lsymbianmock -lmocklib -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc - INCLUDEPATH += ../../../../xqtelephonyservice/inc -} - -# -HEADERS += ../../../inc/dialpadvideomailboxeventfilter.h \ - ../../../inc/dialpadmailboxeventfilterbase.h \ - ../../../inc/dialpadsymbianwrapper.h \ - xqservicerequest.h \ - dialpadtestutil.h -SOURCES += ut_dialpadvideomailboxeventfilter.cpp \ - ../../../src/dialpadvideomailboxeventfilter.cpp \ - ../../../src/dialpadmailboxeventfilterbase.cpp \ - ../shared/dialpadtestutil.cpp - -# -LIBS += -ldialpad diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/xqservicerequest.h --- a/telutils/dialpad/tsrc/unit/ut_dialpadvideomailboxeventfilter/xqservicerequest.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* 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: -* -*/ - -class XQServiceRequest : public QObject -{ -public: - XQServiceRequest(const QString& service, const QString& message, const bool& synchronous); - ~XQServiceRequest(); - bool send(QVariant& retValue); - void addArg(const QVariant& v); - template - inline XQServiceRequest &operator<< (const T &var) - { - QVariant v = qVariantFromValue(var); - addArg(v); - return *this; - } -}; diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/ut_dialpadvoicemailboxeventfilter.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/ut_dialpadvoicemailboxeventfilter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,203 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_OS_SYMBIAN -#include "xqservicerequest.h" -#endif - -#include "dialpadtest.h" -#include "dialpadtestutil.h" -#include "dialpadvoicemailboxeventfilter.h" -#include "dialpad.h" -#include "dialpadsymbianwrapper.h" - -const int WAIT_TIME = 300; -QString mService; -QString mMessage; -bool mXQServiceConstructed; -bool mSendCalled; - -DialpadSymbianWrapper::DialpadSymbianWrapper(QObject *parent) : d_ptr(NULL) {} -DialpadSymbianWrapper::~DialpadSymbianWrapper() {} -int DialpadSymbianWrapper::getMailboxNumber(QString &vmbxNumber) { vmbxNumber=QString("12345678"); return 0; } -int DialpadSymbianWrapper::defineMailboxNumber(QString &vmbxNumber) { return 0; } - -#ifdef Q_OS_SYMBIAN -XQServiceRequest::XQServiceRequest(const QString& service, const QString& message, const bool& synchronous) { mService=service; mMessage=message; mXQServiceConstructed=true; } -XQServiceRequest::~XQServiceRequest() {} -bool XQServiceRequest::send(QVariant& retValue) { mSendCalled=true; return true; } -void XQServiceRequest::addArg(const QVariant& v) {} -#endif - -// helper class -class KeyEventCatcher : public QObject -{ -public: - bool eventFilter(QObject* watched, QEvent * event) - { - Q_UNUSED(watched); - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - mKeyPresses.append(keyEvent->key()); - return false; - } else if (event->type() == QEvent::KeyRelease) { - QKeyEvent *keyEvent = static_cast(event); - mKeyReleases.append(keyEvent->key()); - return false; - } - return false; - } - -public: - QList mKeyPresses; - QList mKeyReleases; -}; - -// test cases -class ut_DialpadVoiceMailboxEventFilter : public QObject -{ - Q_OBJECT - -private slots: - void initTestCase(); - void init(); - void cleanupTestCase(); - void cleanup(); - - // These are actual voice mailbox event filter unit tests - void testNumericKeyOneLongPress(); - void testNumericKeyOneShortPress(); - void testNumericKeyOneShortThenLongPress(); - -private: - HbMainWindow* mMainWindow; - Dialpad* mDialpad; - DialpadVoiceMailboxEventFilter *mEventFilter; - KeyEventCatcher* mKeyCatcher; - DialpadTestUtil* mUtil; -}; - -void ut_DialpadVoiceMailboxEventFilter::initTestCase() -{ - mMainWindow = new HbMainWindow; - - mKeyCatcher = new KeyEventCatcher; - mMainWindow->installEventFilter(mKeyCatcher); - - mUtil = new DialpadTestUtil(*mMainWindow); - - mDialpad = new Dialpad(); - mEventFilter = new DialpadVoiceMailboxEventFilter(mDialpad, this); - hbInstance->allMainWindows().at(0)->installEventFilter(mEventFilter); - - QRectF rect(mMainWindow->contentsRect()); - rect.setHeight(rect.height()*0.7); - rect.moveTop((mMainWindow->contentsRect().height()-rect.height())/2); - - mDialpad->setPreferredSize(360,400); - mDialpad->setPos(0,100); - - mMainWindow->show(); - mDialpad->show(); - mDialpad->hide(); -} - -void ut_DialpadVoiceMailboxEventFilter::init() -{ - mService = QString(""); - mMessage = QString(""); - mXQServiceConstructed = false; - mSendCalled = false; -} - -void ut_DialpadVoiceMailboxEventFilter::cleanupTestCase() -{ - delete mDialpad; - delete mMainWindow; - delete mKeyCatcher; - delete mUtil; -} - -void ut_DialpadVoiceMailboxEventFilter::cleanup() -{ - mKeyCatcher->mKeyPresses.clear(); - mKeyCatcher->mKeyReleases.clear(); - mDialpad->editor().setText(QString()); - QTest::qWait( WAIT_TIME ); // delay between tests -} - -void ut_DialpadVoiceMailboxEventFilter::testNumericKeyOneLongPress() -{ - mDialpad->openDialpad(); - QTest::qWait(WAIT_TIME); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Press); - QTest::qWait(2000); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Release); - QTest::qWait(1000); - QCOMPARE(mDialpad->editor().text(), QString("")); - mDialpad->closeDialpad(); - -#ifdef Q_OS_SYMBIAN - QVERIFY(mXQServiceConstructed == true); - QVERIFY(mSendCalled == true); - QCOMPARE(mService, QString("com.nokia.symbian.ICallDial")); - QCOMPARE(mMessage, QString("dial(QString)")); -#endif -} - -void ut_DialpadVoiceMailboxEventFilter::testNumericKeyOneShortPress() -{ - mDialpad->openDialpad(); - QTest::qWait(WAIT_TIME); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Press); - QTest::qWait(200); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Release); - QTest::qWait(1000); - // Check that character '1' is in editor. - QCOMPARE(mDialpad->editor().text(), QString("1")); -} - -void ut_DialpadVoiceMailboxEventFilter::testNumericKeyOneShortThenLongPress() -{ - // Then one short and one long press - mDialpad->openDialpad(); - QTest::qWait( WAIT_TIME ); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Press); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Release); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Press); - QTest::qWait(2000); - mUtil->mouseClickDialpad(Qt::Key_1, DialpadTestUtil::Release); - QTest::qWait(1000); - QVERIFY(mDialpad->editor().text()=="11"); - mDialpad->closeDialpad(); -} - -DIALPAD_TEST_MAIN(ut_DialpadVoiceMailboxEventFilter) -#include "ut_dialpadvoicemailboxeventfilter.moc" - diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/ut_dialpadvoicemailboxeventfilter.pro --- a/telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/ut_dialpadvoicemailboxeventfilter.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += . ../../../inc ../../../../../inc ../shared - -CONFIG += hb qtestlib - -symbian { - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -} else:win32 { - DESTDIR = ./ - INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc - INCLUDEPATH += ../../../../xqtelephonyservice/inc -} - -# -HEADERS += ../../../inc/dialpadvoicemailboxeventfilter.h \ - ../../../inc/dialpadmailboxeventfilterbase.h \ - ../../../inc/dialpadsymbianwrapper.h \ - xqservicerequest.h \ - dialpadtestutil.h -SOURCES += ut_dialpadvoicemailboxeventfilter.cpp \ - ../../../src/dialpadvoicemailboxeventfilter.cpp \ - ../../../src/dialpadmailboxeventfilterbase.cpp \ - ../shared/dialpadtestutil.cpp - -# -LIBS += -ldialpad diff -r 7d48bed6ce0c -r 987c9837762f telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/xqservicerequest.h --- a/telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/xqservicerequest.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* 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: -* -*/ - -class XQServiceRequest : public QObject -{ -public: - XQServiceRequest(const QString& service, const QString& message, const bool& synchronous); - ~XQServiceRequest(); - bool send(QVariant& retValue); - void addArg(const QVariant& v); - template - inline XQServiceRequest &operator<< (const T &var) - { - QVariant v = qVariantFromValue(var); - addArg(v); - return *this; - } -}; diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/inc/imeikeysequencehandler.h --- a/telutils/keysequencerecognitionservice/inc/imeikeysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/*! -* 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: Implements IMEI key sequence handling. -* -*/ - -#ifndef IMEIKEYSEQUENCEHANDLER_H -#define IMEIKEYSEQUENCEHANDLER_H - -#include "keysequencehandler.h" - -class HbDeviceMessageBox; - -class ImeiKeySequenceHandler : public KeySequenceHandler -{ - Q_OBJECT - -public: - - ImeiKeySequenceHandler(QObject *parent = 0); - ~ImeiKeySequenceHandler(); - - bool executeKeySequence(const QString &keySequence); - -private: - void launchImeiDialog(); - -private slots: - void destroyMessageBox(); - -private: - HbDeviceMessageBox *m_messageBox; -}; - -#endif // IMEIKEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/inc/keysequencehandler.h --- a/telutils/keysequencerecognitionservice/inc/keysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/*! -* 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: Base class for key sequence handlers. -* -*/ - -#ifndef KEYSEQUENCEHANDLER_H -#define KEYSEQUENCEHANDLER_H - -#include -#include - -class KeySequenceHandler : public QObject -{ - Q_OBJECT - -public: - - KeySequenceHandler(QObject *parent = 0); - ~KeySequenceHandler(); - - QString keySequenceValidator() const; - virtual bool executeKeySequence(const QString &keySequence) = 0; - -protected: - void setKeySequenceValidator(const QString &validator); - -private: - QString m_keySequenceValidator; -}; - -#endif // KEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/inc/keysequencerecognitionprovider.h --- a/telutils/keysequencerecognitionservice/inc/keysequencerecognitionprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/*! -* 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: Implements Qt Highway provider for key sequence handling. -* -*/ - -#ifndef KEYSEQUENCERECOGNITIONPROVIDER_H -#define KEYSEQUENCERECOGNITIONPROVIDER_H - -#include - -class KeySequenceHandler; - -class KeySequenceRecognitionProvider : public XQServiceProvider -{ - Q_OBJECT - -public: - - KeySequenceRecognitionProvider(QObject *parent = 0); - ~KeySequenceRecognitionProvider(); - -public slots: - - /*! - \fn keySequenceValidator() - - Returns regular expression for key sequence validation. Client must - validate sequence before requesting provider to execute it. Regular - expression is in escaped format. - - \return Escaped regular expression. - - Usage example: - XQAiwRequest *request = mAiwMgr.create( - "com.nokia.symbian.IKeySequenceRecognition", - "keySequenceValidator()", - true); - - QVariant keySequenceValidator; - bool requestOk = request->send(keySequenceValidator); - if (requestOk && keySequenceValidator.toString().size()) { - QString expression = keySequenceValidator.toString(); - mValidator = new QRegExp(expression); - } - */ - QString keySequenceValidator(); - - /*! - \fn executeKeySequence(const QString& keySequence) - - Client can use this method to execute key sequence. - Key sequence may contain for example product codes etc. that - may cause lower layers to do any specific things. - - \param keySequence Key sequence to execute. - \return True if key sequence was processed, false otherwise. - - Usage example: - XQAiwRequest *request = mAiwMgr.create( - "com.nokia.symbian.IKeySequenceRecognition", - "executeKeySequence(QString)", - true); - - QList arguments; - arguments << "*#0000#"; - request->setArguments(arguments); - - QVariant keySequenceProcessed; - bool requestOk = request.send(keySequenceProcessed); - */ - bool executeKeySequence(const QString &keySequence); - -private: - void setupLocalization(); - void constructKeySequenceHandlers(); - void constructKeySequenceValidator(); - -private: - QString m_keySequenceValidator; - QList m_handlers; -}; - -#endif // KEYSEQUENCERECOGNITIONPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/inc/keysequencerecognitionservicedefs.h --- a/telutils/keysequencerecognitionservice/inc/keysequencerecognitionservicedefs.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/*! -* 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: Definitions for key sequence recognition component. -* -*/ - -#ifndef KEYSEQUENCERECOGNITIONSERVICEDEFS_H -#define KEYSEQUENCERECOGNITIONSERVICEDEFS_H - -#include - -/*! code for showing software version number */ -const QString KCodeSwVersion("*#0000#"); -/*! code for launching reset ui */ -const QString KCodeActivateRfsNormal("*#7780#"); -/*! code for launching reset ui */ -const QString KCodeActivateRfsDeep("*#7370#"); -/*! code for showing bluetooth device address */ -const QString KCodeBtAddress("*#2820#"); -/*! code for enabling bluetooth test mode */ -const QString KCodeRFLoopback("*#9990#"); -/*! code for showing serial number */ -const QString KCodeImei("*#06#"); -/*! code for showing life timer data */ -const QString KCodeLifeTimer("*#92702689#"); -/*! code for changing pin code 1 */ -const QString KCodeChangePin1("\\*\\*04\\*\\d{4,15}\\*\\d{4,15}\\*\\d{4,15}\\#"); -/*! code for changing pin code 2 */ -const QString KCodeChangePin2("\\*\\*042\\*\\d{4,15}\\*\\d{4,15}\\*\\d{4,15}#"); -/*! code for unblocking pin code 1 */ -const QString KCodeUnblockPin1("\\*\\*05\\**\\d{8,20}\\*\\d{4,15}\\*\\d{4,15}#"); -/*! code for unblocking pin code 2 */ -const QString KCodeUnblockPin2("\\*\\*052\\**\\d{8,20}\\*\\d{4,15}\\*\\d{4,15}#"); - - -#endif // KEYSEQUENCERECOGNITIONSERVICEDEFS_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/inc/keysequencerecognitionservicelog.h --- a/telutils/keysequencerecognitionservice/inc/keysequencerecognitionservicelog.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/*! -* 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: Definitions for key sequence recognition component. -* -*/ - -#ifndef KEYSEQUENCERECOGNITIONSERVICELOG_H -#define KEYSEQUENCERECOGNITIONSERVICELOG_H - -#include - -class MethodEntryExitDebugPrint -{ -public: - MethodEntryExitDebugPrint(const char* methodDescription) - : - m_methodDescription(0), - m_stackFrame(0) - { -#ifdef __WINS__ - // Workaround for exception detection as MSL runtime has a bug in - // std::uncaught_exception() implementation. - int stackFrame = 0; - _asm( mov stackFrame, ebp ); - m_stackFrame = stackFrame; -#endif - m_methodDescription = methodDescription; - qDebug() << m_methodDescription << "IN"; - }; - - ~MethodEntryExitDebugPrint() - { -#ifdef __WINS__ - // Workaround for exception detection as MSL runtime has a bug in - // std::uncaught_exception() implementation. - int stackFrame = 0; - int returnValue = -1; - _asm( mov stackFrame, ebp ); - _asm( mov returnValue, ebx ); - if ((stackFrame + sizeof(int) != m_stackFrame) && (0 == returnValue)) { - qDebug() << m_methodDescription << "EXCEPTION!"; - } else { - qDebug() << m_methodDescription << "OUT"; - } -#else - if (std::uncaught_exception()) { - qDebug() << m_methodDescription << "EXCEPTION!"; - } else { - qDebug() << m_methodDescription << "OUT"; - } -#endif - }; - -private: - const char* m_methodDescription; - int m_stackFrame; -}; - -#define DPRINT_METHODENTRYEXIT \ - MethodEntryExitDebugPrint __entryExitDebugPrint(__PRETTY_FUNCTION__) - -#endif // KEYSEQUENCERECOGNITIONSERVICELOG_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/inc/lifetimerkeysequencehandler.h --- a/telutils/keysequencerecognitionservice/inc/lifetimerkeysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/*! -* 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: Implements Life Timer key sequence handling. -* -*/ - -#ifndef LIFETIMERKEYSEQUENCEHANDLER_H -#define LIFETIMERKEYSEQUENCEHANDLER_H - -#include -#include "keysequencehandler.h" - -class HbDeviceMessageBox; -class RTelServer; -class RMobilePhone; -class RMmCustomAPI; - -class LifeTimerKeySequenceHandler : public KeySequenceHandler -{ - Q_OBJECT - -public: - - LifeTimerKeySequenceHandler(QObject *parent = 0); - ~LifeTimerKeySequenceHandler(); - - bool executeKeySequence(const QString &keySequence); - -private: - void launchLifeTimerDialog(); - QString constructLifeTimerData(); - - void openEtelConnectionL( - RTelServer &telephonyServer, - RMobilePhone &mobilePhone, - RMmCustomAPI &mmCustomApi); - void closeEtelConnection( - RTelServer &telephonyServer, - RMobilePhone &mobilePhone, - RMmCustomAPI &mmCustomApi); - - bool lifeTimerFeatureEnabled(); - -private slots: - void destroyMessageBox(); - -private: - HbDeviceMessageBox *m_messageBox; - QScopedPointer m_repository; -}; - -#endif // LIFETIMERKEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/inc/manufacturerkeysequencehandler.h --- a/telutils/keysequencerecognitionservice/inc/manufacturerkeysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/*! -* 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: Implements manufacturer key sequence handling. -* -*/ - -#ifndef MANUFACTURERKEYSEQUENCEHANDLER_H -#define MANUFACTURERKEYSEQUENCEHANDLER_H - -#include -#include "keysequencehandler.h" - -class XQAiwRequest; - -class InterfaceDescription -{ -public: - InterfaceDescription() - : - m_service(""), - m_interface(""), - m_method("") {} - - InterfaceDescription( - const QString &service, - const QString &interface, - const QString &method) - : - m_service(service), - m_interface(interface), - m_method(method) {} - -public: - QString m_service; - QString m_interface; - QString m_method; -}; - -class ManufacturerKeySequenceHandler : public KeySequenceHandler -{ - Q_OBJECT - -public: - - ManufacturerKeySequenceHandler(QObject *parent = 0); - ~ManufacturerKeySequenceHandler(); - - bool executeKeySequence( - const QString &keySequence); - -private: - bool issueServiceRequest( - const InterfaceDescription &description); - -private slots: - void requestOk(const QVariant &returnValue); - void requestError(int error, const QString& errorMessage); - -private: - XQApplicationManager m_aiwManager; - QMap m_codeToInterfaceMappings; - QPointer m_currentRequest; -}; - -#endif // MANUFACTURERKEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/inc/simcontrolkeysequencehandler.h --- a/telutils/keysequencerecognitionservice/inc/simcontrolkeysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/*! -* 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: Implements simcontrol key sequence handling. -* -*/ - -#ifndef SIMCONTROLKEYSEQUENCEHANDLER_H -#define SIMCONTROLKEYSEQUENCEHANDLER_H - -#include "keysequencehandler.h" - -class CManualSecuritySettings; - -class SimControlKeySequenceHandler : public KeySequenceHandler -{ - Q_OBJECT - -public: - - SimControlKeySequenceHandler(QObject *parent = 0); - ~SimControlKeySequenceHandler(); - - bool executeKeySequence(const QString &keySequence); - - enum SimOperation - { - None, - Pin1, - Pin2, - Unblock1, - Unblock2 - }; - -private: - - bool parseString(const QString &keySequence); - void processChangePin( - SimOperation op, - const QString &oldPin, - const QString &newPin, - const QString &verifyNew); - - void processUnblockPin( - SimOperation op, - const QString &puk, - const QString &newPin, - const QString &verifyNew); - -private: - CManualSecuritySettings* m_securityModel; -}; - -#endif // SIMCONTROLKEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/keysequencerecognitionservice.pri --- a/telutils/keysequencerecognitionservice/keysequencerecognitionservice.pri Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -# 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: - -HEADERS = ./inc/keysequencerecognitionprovider.h \ - ./inc/keysequencehandler.h \ - ./inc/manufacturerkeysequencehandler.h \ - ./inc/imeikeysequencehandler.h \ - ./inc/simcontrolkeysequencehandler.h \ - ./inc/lifetimerkeysequencehandler.h - -SOURCES = ./src/main.cpp \ - ./src/keysequencerecognitionprovider.cpp \ - ./src/keysequencehandler.cpp \ - ./src/manufacturerkeysequencehandler.cpp \ - ./src/imeikeysequencehandler.cpp \ - ./src/simcontrolkeysequencehandler.cpp \ - ./src/lifetimerkeysequencehandler.cpp diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/keysequencerecognitionservice.pro --- a/telutils/keysequencerecognitionservice/keysequencerecognitionservice.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = keysequencerecognitionservice -CONFIG += hb service -TRANSLATIONS = telephone.ts -MOC_DIR = moc - -symbian { - TARGET.UID3 = 0x2002FF8A - TARGET.VID = VID_DEFAULT - TARGET.CAPABILITY = CAP_APPLICATION - TARGET.EPOCALLOWDLLDATA = 1 - - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += ../../inc - - BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include " - BLD_INF_RULES.prj_exports += "./rom/keysequencerecognitionservice.iby \ - CORE_MW_LAYER_IBY_EXPORT_PATH(keysequencerecognitionservice.iby)" - BLD_INF_RULES.prj_exports += \ - "./rom/keysequencerecognitionservice_resources.iby \ - LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(keysequencerecognitionservice_resources.iby)" - - RSS_RULES += "hidden = KAppIsHidden;" - RSS_RULES += "launch = KAppLaunchInBackground;" - - include(./keysequencerecognitionservice.pri) - - # Service provider specific configuration. - SERVICE.FILE = ./resources/keysequencerecognitionservice_conf.xml - SERVICE.OPTIONS += embeddable - SERVICE.OPTIONS += hidden - - LIBS += -lxqservice -lxqserviceutil -lxqutils \ - -letel -letelmm -lcustomapi \ - -lcentralrepository -lQtSystemInfo -lsecui \ - -ltstaskmonitorclient -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/resources/keysequencerecognitionservice_conf.xml --- a/telutils/keysequencerecognitionservice/resources/keysequencerecognitionservice_conf.xml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - keysequencerecognitionservice - No path - Key sequence recognition service - - com.nokia.symbian.IKeySequenceRecognition - 1.0 - Interface for key sequence recognition - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/rom/keysequencerecognitionservice.iby --- a/telutils/keysequencerecognitionservice/rom/keysequencerecognitionservice.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* 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: KeySequenceRecognitionService's IBY definitions. -* -*/ - -#ifndef __KEYSEQUENCERECOGNITIONSERVICE_IBY__ -#define __KEYSEQUENCERECOGNITIONSERVICE_IBY__ - -#include -#include - -file = ABI_DIR/BUILD_DIR/keysequencerecognitionservice.exe \ - PROGRAMS_DIR/keysequencerecognitionservice.exe -data = DATAZ_/private/10003a3f/import/apps/keysequencerecognitionservice_reg.rsc \ - private/10003a3f/import/apps/keysequencerecognitionservice_reg.rsc - -#endif // __KEYSEQUENCERECOGNITIONSERVICE_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/rom/keysequencerecognitionservice_resources.iby --- a/telutils/keysequencerecognitionservice/rom/keysequencerecognitionservice_resources.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* 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: KeySequenceRecognitionService's resource IBY definitions. -* -*/ - -#ifndef __KEYSEQUENCERECOGNITIONSERVICE_RESORCES_IBY__ -#define __KEYSEQUENCERECOGNITIONSERVICE_RESORCES_IBY__ - -#include - -data = DATAZ_/resource/apps/keysequencerecognitionservice.rsc \ - /resource/apps/keysequencerecognitionservice.rsc - -#endif // __KEYSEQUENCERECOGNITIONSERVICE_RESORCES_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/src/imeikeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/src/imeikeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/*! -* 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: Implements IMEI key sequence handling. -* -*/ - -#include -#include -#include -#include "imeikeysequencehandler.h" -#include "keysequencerecognitionservicedefs.h" -#include "keysequencerecognitionservicelog.h" - -QTM_USE_NAMESPACE - -/*! - ImeiKeySequenceHandler::ImeiKeySequenceHandler. - */ -ImeiKeySequenceHandler::ImeiKeySequenceHandler( - QObject* parent) - : - KeySequenceHandler(parent), - m_messageBox(0) -{ - DPRINT_METHODENTRYEXIT; - - setKeySequenceValidator(QRegExp::escape(KCodeImei)); -} - - -/*! - ImeiKeySequenceHandler::~ImeiKeySequenceHandler. - */ -ImeiKeySequenceHandler::~ImeiKeySequenceHandler() -{ - DPRINT_METHODENTRYEXIT; - - destroyMessageBox(); -} - - -/*! - ImeiKeySequenceHandler::executeKeySequence. - */ -bool ImeiKeySequenceHandler::executeKeySequence( - const QString &keySequence) -{ - DPRINT_METHODENTRYEXIT; - - bool handled = true; - - if (KCodeImei == keySequence) { - launchImeiDialog(); - } else { - handled = false; - } - - return handled; -} - - -/*! - ImeiKeySequenceHandler::launchImeiDialog(). - */ -void ImeiKeySequenceHandler::launchImeiDialog() -{ - DPRINT_METHODENTRYEXIT; - - destroyMessageBox(); - - QScopedPointer deviceInfo(new QSystemDeviceInfo()); - QString serialNumber = deviceInfo->imei(); - QString serialNumberNoteText = - hbTrId("txt_phone_info_serial_no").arg(serialNumber); - m_messageBox = new HbDeviceMessageBox( - serialNumberNoteText, - HbMessageBox::MessageTypeInformation); - m_messageBox->setTimeout(HbPopup::NoTimeout); - - QObject::connect( - m_messageBox, SIGNAL(aboutToClose()), - this, SLOT(destroyMessageBox())); - - m_messageBox->show(); -} - - -/*! - ImeiKeySequenceHandler::destroyMessageBox. - */ -void ImeiKeySequenceHandler::destroyMessageBox() -{ - DPRINT_METHODENTRYEXIT; - - if (m_messageBox) { - m_messageBox->deleteLater(); - m_messageBox = 0; - } -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/src/keysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/src/keysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/*! -* 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: Base class for key sequence handlers. -* -*/ - -#include -#include -#include -#include "keysequencehandler.h" -#include "keysequencerecognitionservicelog.h" - -/*! - KeySequenceHandler::KeySequenceHandler. - */ -KeySequenceHandler::KeySequenceHandler( - QObject* parent) - : - QObject(parent), - m_keySequenceValidator("") -{ - DPRINT_METHODENTRYEXIT; -} - - -/*! - KeySequenceHandler::~KeySequenceHandler. - */ -KeySequenceHandler::~KeySequenceHandler() -{ - DPRINT_METHODENTRYEXIT; -} - - -/*! - KeySequenceHandler::keySequenceValidator. - */ -QString KeySequenceHandler::keySequenceValidator() const -{ - DPRINT_METHODENTRYEXIT; - - return m_keySequenceValidator; -} - - -/*! - KeySequenceHandler::setKeySequenceValidator. - */ -void KeySequenceHandler::setKeySequenceValidator(const QString &validator) -{ - DPRINT_METHODENTRYEXIT; - - m_keySequenceValidator = validator; -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/src/keysequencerecognitionprovider.cpp --- a/telutils/keysequencerecognitionservice/src/keysequencerecognitionprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ -/*! -* 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: Implements Qt Highway provider for key sequence handling. -* -*/ - -#include -#include -#include -#include -#include -#include "keysequencerecognitionprovider.h" -#include "manufacturerkeysequencehandler.h" -#include "imeikeysequencehandler.h" -#include "lifetimerkeysequencehandler.h" -#include "simcontrolkeysequencehandler.h" -#include "keysequencerecognitionservicelog.h" - -/*! - KeySequenceRecognitionProvider::KeySequenceRecognitionProvider. - */ -KeySequenceRecognitionProvider::KeySequenceRecognitionProvider( - QObject* parent) - : - XQServiceProvider(QLatin1String( - "keysequencerecognitionservice.com.nokia.symbian.IKeySequenceRecognition"), - parent), - m_keySequenceValidator("") -{ - DPRINT_METHODENTRYEXIT; - - publishAll(); - - setupLocalization(); - - // One should not call anything exception generating after handlers are - // created because memory for handlers will be leaked on an exception - // while being in c++ constructor. - constructKeySequenceHandlers(); - - // Keysequencerecognitionprovider to be invisible in taskswitcher - TsTaskSettings taskSettings; - taskSettings.setVisibility(false); -} - - -/*! - KeySequenceRecognitionProvider::~KeySequenceRecognitionProvider. - */ -KeySequenceRecognitionProvider::~KeySequenceRecognitionProvider() -{ - DPRINT_METHODENTRYEXIT; -} - - -/*! - KeySequenceRecognitionProvider::keySequenceValidator. - */ -QString KeySequenceRecognitionProvider::keySequenceValidator() -{ - DPRINT_METHODENTRYEXIT; - - if (m_keySequenceValidator.isEmpty()) { - constructKeySequenceValidator(); - } - - return m_keySequenceValidator; -} - - -/*! - KeySequenceRecognitionProvider::executeKeySequence. - */ -bool KeySequenceRecognitionProvider::executeKeySequence( - const QString &keySequence) -{ - DPRINT_METHODENTRYEXIT; - - bool handled = false; - - QList::const_iterator it = m_handlers.constBegin(); - for (;(it != m_handlers.constEnd()) && (!handled); ++it) { - handled = (*it)->executeKeySequence(keySequence); - } - - return handled; -} - - -/*! - KeySequenceRecognitionProvider::setupLocalization. - */ -void KeySequenceRecognitionProvider::setupLocalization() -{ - DPRINT_METHODENTRYEXIT; - - QScopedPointer translator(new QTranslator(this)); - - QString locale = QLocale::system().name(); - QString path = QString("z:/resource/qt/translations/"); - bool translatorLoaded = - translator->load(QString(path + "telephone_" + locale)); - - if (translatorLoaded) { - qApp->installTranslator(translator.data()); - translator.take(); - } -} - - -/*! - KeySequenceRecognitionProvider::constructKeySequenceHandlers. - */ -void KeySequenceRecognitionProvider::constructKeySequenceHandlers() -{ - DPRINT_METHODENTRYEXIT; - - QScopedPointer manufacturerHandler( - new ManufacturerKeySequenceHandler(this)); - m_handlers.append(manufacturerHandler.data()); - manufacturerHandler.take(); - - QScopedPointer imeiHandler( - new ImeiKeySequenceHandler(this)); - m_handlers.append(imeiHandler.data()); - imeiHandler.take(); - - QScopedPointer lifeTimerHandler( - new LifeTimerKeySequenceHandler(this)); - m_handlers.append(lifeTimerHandler.data()); - lifeTimerHandler.take(); - - QScopedPointer simControlHandler( - new SimControlKeySequenceHandler(this)); - m_handlers.append(simControlHandler.data()); - simControlHandler.take(); -} - - -/*! - KeySequenceRecognitionProvider::constructKeySequenceValidator. - */ -void KeySequenceRecognitionProvider::constructKeySequenceValidator() -{ - DPRINT_METHODENTRYEXIT; - - QList::const_iterator it = m_handlers.constBegin(); - for (;it != m_handlers.constEnd(); ++it) { - if (!m_keySequenceValidator.isEmpty()) { - m_keySequenceValidator.append("|"); - } - - QString validator = (*it)->keySequenceValidator(); - m_keySequenceValidator.append(validator); - } -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/src/lifetimerkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/src/lifetimerkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,208 +0,0 @@ -/*! -* 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: Implements Life Timer key sequence handling. -* -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "lifetimerkeysequencehandler.h" -#include "keysequencerecognitionservicedefs.h" -#include "telservicesinternalcrkeys.h" -#include "telservicesvariant.hrh" -#include "keysequencerecognitionservicelog.h" - -/*! - LifeTimerKeySequenceHandler::LifeTimerKeySequenceHandler. - */ -LifeTimerKeySequenceHandler::LifeTimerKeySequenceHandler( - QObject* parent) - : - KeySequenceHandler(parent), - m_messageBox(0), - m_repository(0) -{ - DPRINT_METHODENTRYEXIT; - - CRepository *repository = 0; - QT_TRAP_THROWING(repository = CRepository::NewL(KCRUidTelSrvVariation)) - m_repository.reset(repository); - - if (lifeTimerFeatureEnabled()) { - setKeySequenceValidator(QRegExp::escape(KCodeLifeTimer)); - } -} - - -/*! - LifeTimerKeySequenceHandler::~LifeTimerKeySequenceHandler. - */ -LifeTimerKeySequenceHandler::~LifeTimerKeySequenceHandler() -{ - DPRINT_METHODENTRYEXIT; - - destroyMessageBox(); -} - - -/*! - LifeTimerKeySequenceHandler::executeKeySequence. - */ -bool LifeTimerKeySequenceHandler::executeKeySequence( - const QString &keySequence) -{ - DPRINT_METHODENTRYEXIT; - - bool handled = true; - - if (KCodeLifeTimer == keySequence && lifeTimerFeatureEnabled()) { - launchLifeTimerDialog(); - } else { - handled = false; - } - - return handled; -} - - -/*! - LifeTimerKeySequenceHandler::launchLifeTimerDialog(). - */ -void LifeTimerKeySequenceHandler::launchLifeTimerDialog() -{ - DPRINT_METHODENTRYEXIT; - - destroyMessageBox(); - - QString lifeTimerData = constructLifeTimerData(); - QString lifeTimerNoteText = - hbTrId("txt_phone_info_life_timer").arg(lifeTimerData); - m_messageBox = new HbDeviceMessageBox( - lifeTimerNoteText, - HbMessageBox::MessageTypeInformation); - m_messageBox->setTimeout(HbPopup::NoTimeout); - - QObject::connect( - m_messageBox, SIGNAL(aboutToClose()), - this, SLOT(destroyMessageBox())); - - m_messageBox->show(); -} - - -/*! - LifeTimerKeySequenceHandler::constructLifeTimerData. - */ -QString LifeTimerKeySequenceHandler::constructLifeTimerData() -{ - DPRINT_METHODENTRYEXIT; - - QString lifeTimerText; - - RTelServer telephonyServer; - RMobilePhone mobilePhone; - RMmCustomAPI mmCustomApi; - QT_TRAP_THROWING( - openEtelConnectionL(telephonyServer, mobilePhone, mmCustomApi); - ) - - RMmCustomAPI::TLifeTimeData lifeTimeData; - RMmCustomAPI::TLifeTimeDataPckg dataPckg(lifeTimeData); - int lifeTimeDataQueryResult = mmCustomApi.GetLifeTime(dataPckg); - closeEtelConnection(telephonyServer, mobilePhone, mmCustomApi); - - if (KErrNone == lifeTimeDataQueryResult) { - lifeTimeData = dataPckg(); - - HbExtendedLocale locale = HbExtendedLocale::system(); - lifeTimerText.append(QString::number(lifeTimeData.iHours)); - const int KMinuteSeparatorInd = 2; - lifeTimerText.append(locale.timeSeparator(KMinuteSeparatorInd)); - lifeTimerText.append( - QString::number(static_cast(lifeTimeData.iMinutes))); - // pad hour field to a length of 6 digits - const int KLifeTimerDataFieldLength = 9; - lifeTimerText = lifeTimerText.rightJustified( - KLifeTimerDataFieldLength, QChar('0')); - } - - return lifeTimerText; -} - - -/*! - LifeTimerKeySequenceHandler::openEtelConnectionL. - */ -void LifeTimerKeySequenceHandler::openEtelConnectionL( - RTelServer &telephonyServer, - RMobilePhone &mobilePhone, - RMmCustomAPI &mmCustomApi) -{ - DPRINT_METHODENTRYEXIT; - - User::LeaveIfError(telephonyServer.Connect()); - User::LeaveIfError(mobilePhone.Open(telephonyServer, KMmTsyPhoneName())); - User::LeaveIfError(mmCustomApi.Open(mobilePhone)); -} - - -/*! - LifeTimerKeySequenceHandler::closeEtelConnection. - */ -void LifeTimerKeySequenceHandler::closeEtelConnection( - RTelServer &telephonyServer, - RMobilePhone &mobilePhone, - RMmCustomAPI &mmCustomApi) -{ - DPRINT_METHODENTRYEXIT; - - mmCustomApi.Close(); - mobilePhone.Close(); - telephonyServer.Close(); -} - - -/*! - LifeTimerKeySequenceHandler::lifeTimerFeatureEnabled. - */ -bool LifeTimerKeySequenceHandler::lifeTimerFeatureEnabled() -{ - DPRINT_METHODENTRYEXIT; - - TInt telephoneVariant = 0; - TInt result = m_repository->Get(KTelSrvVariationFlags, telephoneVariant); - return (KErrNone == result) - ? static_cast(telephoneVariant & KTelSrvLVFlagLifeTimer) - : false; -} - - -/*! - LifeTimerKeySequenceHandler::destroyMessageBox. - */ -void LifeTimerKeySequenceHandler::destroyMessageBox() -{ - DPRINT_METHODENTRYEXIT; - - if (m_messageBox) { - m_messageBox->deleteLater(); - m_messageBox = 0; - } -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/src/main.cpp --- a/telutils/keysequencerecognitionservice/src/main.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* 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: -* -*/ - -#include -#include "keysequencerecognitionprovider.h" - -int main(int argc, char **argv) -{ - HbApplication app(argc, argv, Hb::NoSplash); - KeySequenceRecognitionProvider provider; - - int result = app.exec(); - return result; -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/src/manufacturerkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/src/manufacturerkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/*! -* 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: Implements manufacturer key sequence handling. -* -*/ - -#include -#include -#include -#include -#include "manufacturerkeysequencehandler.h" -#include "keysequencerecognitionservicedefs.h" -#include "keysequencerecognitionservicelog.h" - -/*! - ManufacturerKeySequenceHandler::ManufacturerKeySequenceHandler. - */ -ManufacturerKeySequenceHandler::ManufacturerKeySequenceHandler( - QObject* parent) - : - KeySequenceHandler(parent), - m_currentRequest(0) -{ - DPRINT_METHODENTRYEXIT; - - setKeySequenceValidator( - QRegExp::escape(KCodeSwVersion) + "|" + - QRegExp::escape(KCodeActivateRfsNormal) + "|" + - QRegExp::escape(KCodeActivateRfsDeep) + "|" + - QRegExp::escape(KCodeBtAddress) + "|" + - QRegExp::escape(KCodeRFLoopback)); - - m_codeToInterfaceMappings[KCodeSwVersion] = InterfaceDescription( - "com.nokia.services", "devicemanager", "showVersionNumber()"); - - m_codeToInterfaceMappings[KCodeActivateRfsNormal] = InterfaceDescription( - "com.nokia.symbian", "IFactoryReset", "showResetUi()"); - m_codeToInterfaceMappings[KCodeActivateRfsDeep] = InterfaceDescription( - "com.nokia.symbian", "IFactoryReset", "showResetUi()"); - - m_codeToInterfaceMappings[KCodeBtAddress] = InterfaceDescription( - "com.nokia.services", "bluetooth", "showBluetoothDeviceAddress()"); - m_codeToInterfaceMappings[KCodeRFLoopback] = InterfaceDescription( - "com.nokia.services", "bluetooth", "showBluetoothLoopback()"); -} - - -/*! - ManufacturerKeySequenceHandler::~ManufacturerKeySequenceHandler. - */ -ManufacturerKeySequenceHandler::~ManufacturerKeySequenceHandler() -{ - DPRINT_METHODENTRYEXIT; -} - - -/*! - ManufacturerKeySequenceHandler::executeKeySequence. - */ -bool ManufacturerKeySequenceHandler::executeKeySequence( - const QString &keySequence) -{ - DPRINT_METHODENTRYEXIT; - - bool handled = true; - - if (m_codeToInterfaceMappings.contains(keySequence)) { - handled = issueServiceRequest(m_codeToInterfaceMappings[keySequence]); - } else { - handled = false; - } - - return handled; -} - - -/*! - ManufacturerKeySequenceHandler::issueServiceRequest. - */ -bool ManufacturerKeySequenceHandler::issueServiceRequest( - const InterfaceDescription &description) -{ - DPRINT_METHODENTRYEXIT; - - bool serviceRequestOk = false; - if (m_currentRequest.isNull()) { - const bool isEmbedded = false; - QScopedPointer request(m_aiwManager.create( - description.m_service, - description.m_interface, - description.m_method, - isEmbedded)); - - if (!request.isNull()) { - m_currentRequest = request.data(); - - // Due to a Qt Highway bug in assignment operator implementation we - // need to set request as asynchronous with a setter function. - request->setSynchronous(false); - - connect( - request.data(), SIGNAL(requestOk(const QVariant &)), - this, SLOT(requestOk(const QVariant &))); - connect( - request.data(), SIGNAL(requestError(int, const QString&)), - this, SLOT(requestError(int, const QString&))); - - serviceRequestOk = request->send(); - if (serviceRequestOk) { - m_currentRequest = request.take(); - } else { - // On a controlled error Qt Highway should call requestError, - // so clean scoped pointer here. - request.take(); - } - } - } - - return serviceRequestOk; -} - - -/*! - ManufacturerKeySequenceHandler::requestOk. - */ -void ManufacturerKeySequenceHandler::requestOk( - const QVariant &returnValue) -{ - DPRINT_METHODENTRYEXIT; - - Q_UNUSED(returnValue) - - delete m_currentRequest; - m_currentRequest = 0; -} - - -/*! - ManufacturerKeySequenceHandler::requestError. - */ -void ManufacturerKeySequenceHandler::requestError( - int error, const QString& errorMessage) -{ - DPRINT_METHODENTRYEXIT; - - Q_UNUSED(error) - Q_UNUSED(errorMessage) - - delete m_currentRequest; - m_currentRequest = 0; -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/src/simcontrolkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/src/simcontrolkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,202 +0,0 @@ -/*! -* 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: Implements simcontrol key sequence handling. -* -*/ - -#include -#include -#include -#include -#include "keysequencerecognitionservicedefs.h" -#include "keysequencerecognitionservicelog.h" -#include "simcontrolkeysequencehandler.h" - - -//QTM_USE_NAMESPACE - -/*! - SimControlKeySequenceHandler::SimControlKeySequenceHandler. - */ -SimControlKeySequenceHandler::SimControlKeySequenceHandler( - QObject* parent) - : - KeySequenceHandler(parent), - m_securityModel(0) -{ - DPRINT_METHODENTRYEXIT; - - setKeySequenceValidator(KCodeChangePin1 + "|" + - KCodeChangePin2 + "|" + - KCodeUnblockPin1 + "|" + - KCodeUnblockPin2); - - QT_TRAP_THROWING(TSecUi::InitializeLibL()); - QT_TRAP_THROWING( m_securityModel = CManualSecuritySettings::NewL() ); -} - - -/*! - SimControlKeySequenceHandler::~SimControlKeySequenceHandler. - */ -SimControlKeySequenceHandler::~SimControlKeySequenceHandler() -{ - DPRINT_METHODENTRYEXIT; - - delete m_securityModel; - TSecUi::UnInitializeLib(); -} - - -/*! - SimControlKeySequenceHandler::executeKeySequence. - */ -bool SimControlKeySequenceHandler::executeKeySequence( - const QString &keySequence) -{ - DPRINT_METHODENTRYEXIT; - - bool handled = parseString( keySequence ); - - return handled; -} - - -/*! - SimControlKeySequenceHandler::parseString. - */ -bool SimControlKeySequenceHandler::parseString(const QString &keySequence) -{ - DPRINT_METHODENTRYEXIT; - - const QString KChangePin1("**04*"); - const QString KChangePin2("**042"); - const QString KUnblockPin1("**05*"); - const QString KUnblockPin2("**052"); - - QString oldPin; - QString newPin; - QString verifyNewPin; - QString puk; - - SimOperation operation = None; - bool handled = false; - - QString keySequencePrefix (keySequence); - - //Get first 5 chars from keysequence string - keySequencePrefix.chop(keySequencePrefix.length()-5); - QRegExp expression(QRegExp::escape(keySequencePrefix)); - - QString parsedKeySequence(keySequence); - - //remove '#' from end - parsedKeySequence.chop(1); - - QStringList pins; - - if (expression.exactMatch(KChangePin1) || expression.exactMatch(KChangePin2)) - { - if (expression.exactMatch(KChangePin1)) - { - parsedKeySequence.remove(0, 5); - operation = Pin1; - } - - if (expression.exactMatch(KChangePin2)) - { - parsedKeySequence.remove(0, 6); - operation = Pin2; - } - pins = parsedKeySequence.split("*"); - oldPin= pins.value(0); - newPin = pins.value(1); - verifyNewPin = pins.value(2); - handled = true; - processChangePin(operation, oldPin, newPin, verifyNewPin); - } - - if (expression.exactMatch(KUnblockPin1) || expression.exactMatch(KUnblockPin2)) - { - if ( expression.exactMatch(KUnblockPin1)) - { - parsedKeySequence.remove(0, 5); - operation = Pin1; - } - - if (expression.exactMatch(KUnblockPin2)) - { - parsedKeySequence.remove(0, 6); - operation = Pin2; - } - - pins = parsedKeySequence.split("*"); - puk = pins.value(0); - newPin = pins.value(1); - verifyNewPin = pins.value(2); - handled = true; - processUnblockPin(operation, puk, newPin, verifyNewPin); - } - - return handled; -} - -/*! - SimControlKeySequenceHandler::processChangePin. - */ -void SimControlKeySequenceHandler::processChangePin(SimOperation operation, const QString &oldPin, - const QString &newPin, const QString &verifyNew) - { - CManualSecuritySettings::TPin pin; - - if(operation == Pin1) - { - pin = CManualSecuritySettings::EPin1; - } - else - { - pin = CManualSecuritySettings::EPin2; - } - - TBuf<200> oldPinBuf(oldPin.utf16()); - TBuf<200> newPinBuf(newPin.utf16()); - TBuf<200> verifyNewBuf(verifyNew.utf16()); - - QT_TRAP_THROWING(m_securityModel->ChangePinL(pin, oldPinBuf, newPinBuf, verifyNewBuf)); - } - -/*! - SimControlKeySequenceHandler::processUnblockPin. - */ -void SimControlKeySequenceHandler::processUnblockPin(SimOperation operation, const QString &puk, - const QString &newPin, const QString &verifyNew) - { - CManualSecuritySettings::TPin pin; - - if(operation == Pin1) - { - pin = CManualSecuritySettings::EPin1; - } - else - { - pin= CManualSecuritySettings::EPin2; - } - - TBuf<200> pukBuf(puk.utf16()); - TBuf<200> newPinBuf(newPin.utf16()); - TBuf<200> verifyNewBuf(verifyNew.utf16()); - - - QT_TRAP_THROWING(m_securityModel->UnblockPinL(pin, pukBuf, newPinBuf, verifyNewBuf)); - } diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/run_auto_tests_qt.bat --- a/telutils/keysequencerecognitionservice/tsrc/run_auto_tests_qt.bat Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -@echo off -setlocal -goto :startup - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function DEFAULT -:: -:: Modify this function -:: - TESTED_SRC can be changed to match tested code. -:: Specifies path from testcode group directory to -:: tested code -:: - Add test directories to be runned -:: ie. "call :build ut_projectdirectory" or use -:: "for /f %%a in ('dir /b ut_*') do call :build %%a" -:: which compiles, instruments and runs all test directories -:: starting with "ut_". -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:DEFAULT -set TESTED_SRC=..\..\src\* - -for /f %%a in ('dir /b ut_*') do call :build %%a -if [%DOMODULESTESTS%] EQU [TRUE] ( -for /f %%a in ('dir /b mt_*') do call :build %%a -) - -call :finish -goto :END - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function STARTUP -:: -:: Initializing script -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:STARTUP - -set BUILDTESTS=TRUE -set RUNTESTS=TRUE -set INSTRUMENT=TRUE -set REMOVEINSTRUMENT=TRUE -set DOMODULESTESTS=TRUE -set SBS_CALL=sbs --config winscw_udeb --keepgoing -set PATH_TO_DLL=\epoc32\release\winscw\udeb -set PATH_TO_COVERAGE_DATA=\coverage_data -set PATH_TO_RESULT=\test_result - -if not exist %PATH_TO_COVERAGE_DATA% ( -mkdir %PATH_TO_COVERAGE_DATA% -) - -if not exist %PATH_TO_RESULT% ( -mkdir %PATH_TO_RESULT% -) - -if [%1] EQU [] ( goto default ) - -call :%1 -call :%2 -call :%3 -call :%4 -call :%5 -echo Running tests = %RUNTESTS% -echo Instrumenting tests = %INSTRUMENT% -goto default - -:/NOCLEANUP -set REMOVEINSTRUMENT=FALSE -goto end - -:/NORUN -set RUNTESTS=FALSE -set REMOVEINSTRUMENT=FALSE -goto end - -:/NOINSTRUMENT -set INSTRUMENT=FALSE -goto end - -:/NOBUILD -set BUILDTESTS=FALSE -goto end - -:/ONLYUNITTESTS -set DOMODULESTESTS=FALSE -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function FINISH -:: -:: Finishes run_auto_tests.bat -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:FINISH - -if [%RUNTESTS%] EQU [TRUE] ( -call :runtests -) - -if [%INSTRUMENT%] EQU [TRUE] ( -call :calculatecoverage -) - -if [%REMOVEINSTRUMENT%] EQU [TRUE] ( -call :removecoverage -) -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function BUILD -:: param directory -:: -:: builds test from given directory -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:BUILD -setlocal -if [%BUILDTESTS%] EQU [FALSE] ( goto end ) -echo Building %1 -if not exist %1 ( -echo %1 Not found! -goto end -) - -pushd . -call cd %1 -call qmake -call sbs --config winscw_udeb --keepgoing CLEAN -if [%INSTRUMENT%] EQU [TRUE] ( -call ctcwrap -2comp -n %PATH_TO_COVERAGE_DATA%\%1 -i d -C "EXCLUDE=*" -C "NO_EXCLUDE=%TESTED_SRC%" "%SBS_CALL%" -) else ( -call %SBS_CALL% -) - -popd -endlocal -goto end - - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function RUNTESTS -:: -:: NOTE! Function assumes that test binary is named according to test directory. -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:RUNTESTS -echo Running tests -for /f %%a in ('dir /b ut_*') do ( - call %PATH_TO_DLL%\%%a.exe -dtextshell -- - move \epoc32\winscw\c\data\%%a.log %PATH_TO_RESULT%\%%a.log -) -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function CALCULATECOVERAGE -:: -:: Calculates test coverage. Generates html -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:CALCULATECOVERAGE -echo Calculating coverage -ctcpost %PATH_TO_COVERAGE_DATA%\*.sym -p - | ctcmerge -i - -o profile.txt -call ctc2html -t 70 -i profile.txt -o \coverage_result -nsb -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function REMOVECOVERAGE -:: -:: Removes data from coverage directory -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:REMOVECOVERAGE -echo Removing deleting coverage data -call del %PATH_TO_COVERAGE_DATA%\*.sym -call del %PATH_TO_COVERAGE_DATA%\*.dat -call del profile.txt -goto end - -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: function END -:: -:: Prints done -:::::::::::::::::::::::::::::::::::::::::::::::::::::: -:END -echo Done! \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_centralrepository.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_centralrepository.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,628 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CRepository::NewL -// ----------------------------------------------------------------------------- -// -CRepository * CRepository::NewL( - TUid aRepositoryUid ) - { - SMC_MOCK_NEWL1( CRepository *, TUid, aRepositoryUid ) - - CRepository* self = new( ELeave ) CRepository; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CRepository::NewLC -// ----------------------------------------------------------------------------- -// -CRepository * CRepository::NewLC( - TUid aRepositoryUid ) - { - SMC_MOCK_NEWLC1( CRepository *, TUid, aRepositoryUid ) - - CRepository* self = new( ELeave ) CRepository; - CleanupStack::PushL( self ); - //self->ConstructL() - return self; - } - - -// ----------------------------------------------------------------------------- -// CRepository::~CRepository -// ----------------------------------------------------------------------------- -// -CRepository::~CRepository( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CRepository::Create -// ----------------------------------------------------------------------------- -// -TInt CRepository::Create( - TUint32 aKey, - TInt aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - TInt, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Create -// ----------------------------------------------------------------------------- -// -TInt CRepository::Create( - TUint32 aKey, - const TReal & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - const TReal &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Create -// ----------------------------------------------------------------------------- -// -TInt CRepository::Create( - TUint32 aKey, - const TDesC8 & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - const TDesC8 &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Create -// ----------------------------------------------------------------------------- -// -TInt CRepository::Create( - TUint32 aKey, - const TDesC16 & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - const TDesC16 &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Delete -// ----------------------------------------------------------------------------- -// -TInt CRepository::Delete( - TUint32 aKey ) - { - SMC_MOCK_METHOD1( TInt, TUint32, aKey ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Delete -// ----------------------------------------------------------------------------- -// -TInt CRepository::Delete( - TUint32 aPartialKey, - TUint32 aMask, - TUint32 & aErrorKey ) - { - SMC_MOCK_METHOD3( TInt, TUint32, aPartialKey, - TUint32, aMask, - TUint32 &, aErrorKey ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Get -// ----------------------------------------------------------------------------- -// -TInt CRepository::Get( - TUint32 aKey, - TInt & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - TInt &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Set -// ----------------------------------------------------------------------------- -// -TInt CRepository::Set( - TUint32 aKey, - TInt aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - TInt, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Get -// ----------------------------------------------------------------------------- -// -TInt CRepository::Get( - TUint32 aKey, - TReal & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - TReal &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Set -// ----------------------------------------------------------------------------- -// -TInt CRepository::Set( - TUint32 aKey, - const TReal & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - const TReal &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Get -// ----------------------------------------------------------------------------- -// -TInt CRepository::Get( - TUint32 aKey, - TDes8 & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - TDes8 &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Get -// ----------------------------------------------------------------------------- -// -TInt CRepository::Get( - TUint32 aId, - TDes8 & aValue, - TInt & aActualLength ) - { - SMC_MOCK_METHOD3( TInt, TUint32, aId, - TDes8 &, aValue, - TInt &, aActualLength ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Set -// ----------------------------------------------------------------------------- -// -TInt CRepository::Set( - TUint32 aKey, - const TDesC8 & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - const TDesC8 &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Get -// ----------------------------------------------------------------------------- -// -TInt CRepository::Get( - TUint32 aKey, - TDes16 & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - TDes16 &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Get -// ----------------------------------------------------------------------------- -// -TInt CRepository::Get( - TUint32 aId, - TDes16 & aValue, - TInt & aActualLength ) - { - SMC_MOCK_METHOD3( TInt, TUint32, aId, - TDes16 &, aValue, - TInt &, aActualLength ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Set -// ----------------------------------------------------------------------------- -// -TInt CRepository::Set( - TUint32 aKey, - const TDesC16 & aValue ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - const TDesC16 &, aValue ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::GetMeta -// ----------------------------------------------------------------------------- -// -TInt CRepository::GetMeta( - TUint32 aKey, - TUint32 & aMeta ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - TUint32 &, aMeta ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Move -// ----------------------------------------------------------------------------- -// -TInt CRepository::Move( - TUint32 aSourcePartialKey, - TUint32 aTargetPartialKey, - TUint32 aMask, - TUint32 & aErrorKey ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aSourcePartialKey, - TUint32, aTargetPartialKey, - TUint32, aMask, - TUint32 &, aErrorKey ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindL( - TUint32 aPartialKey, - TUint32 aMask, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD3( TInt, TUint32, aPartialKey, - TUint32, aMask, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindEqL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindEqL( - TUint32 aPartialKey, - TUint32 aMask, - TInt aValue, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, - TUint32, aMask, - TInt, aValue, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindEqL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindEqL( - TUint32 aPartialKey, - TUint32 aMask, - const TReal & aValue, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, - TUint32, aMask, - const TReal &, aValue, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindEqL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindEqL( - TUint32 aPartialKey, - TUint32 aMask, - const TDesC8 & aValue, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, - TUint32, aMask, - const TDesC8 &, aValue, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindEqL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindEqL( - TUint32 aPartialKey, - TUint32 aMask, - const TDesC16 & aValue, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, - TUint32, aMask, - const TDesC16 &, aValue, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindNeqL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindNeqL( - TUint32 aPartialKey, - TUint32 aMask, - TInt aValue, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, - TUint32, aMask, - TInt, aValue, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindNeqL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindNeqL( - TUint32 aPartialKey, - TUint32 aMask, - const TReal & aValue, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, - TUint32, aMask, - const TReal &, aValue, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindNeqL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindNeqL( - TUint32 aPartialKey, - TUint32 aMask, - const TDesC8 & aValue, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, - TUint32, aMask, - const TDesC8 &, aValue, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FindNeqL -// ----------------------------------------------------------------------------- -// -TInt CRepository::FindNeqL( - TUint32 aPartialKey, - TUint32 aMask, - const TDesC16 & aValue, - RArray & aFoundKeys ) - { - SMC_MOCK_METHOD4( TInt, TUint32, aPartialKey, - TUint32, aMask, - const TDesC16 &, aValue, - RArray &, aFoundKeys ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::NotifyRequest -// ----------------------------------------------------------------------------- -// -TInt CRepository::NotifyRequest( - TUint32 aKey, - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aKey, - TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::NotifyRequest -// ----------------------------------------------------------------------------- -// -TInt CRepository::NotifyRequest( - TUint32 aPartialKey, - TUint32 aMask, - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD3( TInt, TUint32, aPartialKey, - TUint32, aMask, - TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::NotifyCancel -// ----------------------------------------------------------------------------- -// -TInt CRepository::NotifyCancel( - TUint32 aKey ) - { - SMC_MOCK_METHOD1( TInt, TUint32, aKey ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::NotifyCancel -// ----------------------------------------------------------------------------- -// -TInt CRepository::NotifyCancel( - TUint32 aPartialKey, - TUint32 aMask ) - { - SMC_MOCK_METHOD2( TInt, TUint32, aPartialKey, - TUint32, aMask ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::NotifyCancelAll -// ----------------------------------------------------------------------------- -// -TInt CRepository::NotifyCancelAll( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Reset -// ----------------------------------------------------------------------------- -// -TInt CRepository::Reset( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::Reset -// ----------------------------------------------------------------------------- -// -TInt CRepository::Reset( - TUint32 aKey ) - { - SMC_MOCK_METHOD1( TInt, TUint32, aKey ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::StartTransaction -// ----------------------------------------------------------------------------- -// -TInt CRepository::StartTransaction( - TTransactionMode aMode ) - { - SMC_MOCK_METHOD1( TInt, TTransactionMode, aMode ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::StartTransaction -// ----------------------------------------------------------------------------- -// -void CRepository::StartTransaction( - TTransactionMode aMode, - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD2( void, TTransactionMode, aMode, - TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::CommitTransaction -// ----------------------------------------------------------------------------- -// -TInt CRepository::CommitTransaction( - TUint32 & aKeyInfo ) - { - SMC_MOCK_METHOD1( TInt, TUint32 &, aKeyInfo ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::CommitTransaction -// ----------------------------------------------------------------------------- -// -void CRepository::CommitTransaction( - TDes8 & aKeyInfo, - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD2( void, TDes8 &, aKeyInfo, - TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::CancelTransaction -// ----------------------------------------------------------------------------- -// -void CRepository::CancelTransaction( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::CleanupCancelTransactionPushL -// ----------------------------------------------------------------------------- -// -void CRepository::CleanupCancelTransactionPushL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::FailTransaction -// ----------------------------------------------------------------------------- -// -void CRepository::FailTransaction( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CRepository::CleanupFailTransactionPushL -// ----------------------------------------------------------------------------- -// -void CRepository::CleanupFailTransactionPushL( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_etel.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_etel.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1927 +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 "etel.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// RPhone::RPhone -// ----------------------------------------------------------------------------- -// -RPhone::RPhone( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RPhone::ConstructL -// ----------------------------------------------------------------------------- -// -void RPhone::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RPhone::Open -// ----------------------------------------------------------------------------- -// -TInt RPhone::Open( - RTelServer & aSession, - const TDesC & aName ) - { - SMC_MOCK_METHOD2( TInt, RTelServer &, aSession, - const TDesC &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::Close -// ----------------------------------------------------------------------------- -// -void RPhone::Close( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::Initialise -// ----------------------------------------------------------------------------- -// -TInt RPhone::Initialise( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::Initialise -// ----------------------------------------------------------------------------- -// -void RPhone::Initialise( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::InitialiseCancel -// ----------------------------------------------------------------------------- -// -void RPhone::InitialiseCancel( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::GetCaps -// ----------------------------------------------------------------------------- -// -TInt RPhone::GetCaps( - TCaps & aCaps ) const - { - SMC_MOCK_METHOD1( TInt, TCaps &, aCaps ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::NotifyCapsChange -// ----------------------------------------------------------------------------- -// -void RPhone::NotifyCapsChange( - TRequestStatus & aStatus, - TCaps & aCaps ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TCaps &, aCaps ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::NotifyCapsChangeCancel -// ----------------------------------------------------------------------------- -// -void RPhone::NotifyCapsChangeCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::GetStatus -// ----------------------------------------------------------------------------- -// -TInt RPhone::GetStatus( - TStatus & aStatus ) const - { - SMC_MOCK_METHOD1( TInt, TStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::EnumerateLines -// ----------------------------------------------------------------------------- -// -TInt RPhone::EnumerateLines( - TInt & aCount ) const - { - SMC_MOCK_METHOD1( TInt, TInt &, aCount ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::GetLineInfo -// ----------------------------------------------------------------------------- -// -TInt RPhone::GetLineInfo( - const TInt aIndex, - TLineInfo & aLineInfo ) const - { - SMC_MOCK_METHOD2( TInt, const TInt, aIndex, - TLineInfo &, aLineInfo ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::GetInfo -// ----------------------------------------------------------------------------- -// -TInt RPhone::GetInfo( - TPhoneInfo & aPhoneInfo ) const - { - SMC_MOCK_METHOD1( TInt, TPhoneInfo &, aPhoneInfo ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::NotifyModemDetected -// ----------------------------------------------------------------------------- -// -void RPhone::NotifyModemDetected( - TRequestStatus & aStatus, - TModemDetection & aDetection ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TModemDetection &, aDetection ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::NotifyModemDetectedCancel -// ----------------------------------------------------------------------------- -// -void RPhone::NotifyModemDetectedCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::SetEmergencyClient -// ----------------------------------------------------------------------------- -// -TInt RPhone::SetEmergencyClient( - const TUint32 aEmergencyRequest ) const - { - SMC_MOCK_METHOD1( TInt, const TUint32, aEmergencyRequest ) - } - - -// ----------------------------------------------------------------------------- -// RPhone::Destruct -// ----------------------------------------------------------------------------- -// -void RPhone::Destruct( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::RCall -// ----------------------------------------------------------------------------- -// -RCall::RCall( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RCall::ConstructL -// ----------------------------------------------------------------------------- -// -void RCall::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenNewCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenNewCall( - RTelServer & aServer, - const TDesC & aName, - TDes & aNewName ) - { - SMC_MOCK_METHOD3( TInt, RTelServer &, aServer, - const TDesC &, aName, - TDes &, aNewName ) - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenNewCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenNewCall( - RTelServer & aServer, - const TDesC & aName ) - { - SMC_MOCK_METHOD2( TInt, RTelServer &, aServer, - const TDesC &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenNewCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenNewCall( - RPhone & aPhone, - const TDesC & aName, - TDes & aNewName ) - { - SMC_MOCK_METHOD3( TInt, RPhone &, aPhone, - const TDesC &, aName, - TDes &, aNewName ) - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenNewCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenNewCall( - RPhone & aPhone, - const TDesC & aName ) - { - SMC_MOCK_METHOD2( TInt, RPhone &, aPhone, - const TDesC &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenNewCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenNewCall( - RLine & aLine, - TDes & aNewName ) - { - SMC_MOCK_METHOD2( TInt, RLine &, aLine, - TDes &, aNewName ) - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenNewCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenNewCall( - RLine & aLine ) - { - SMC_MOCK_METHOD1( TInt, RLine &, aLine ) - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenExistingCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenExistingCall( - RTelServer & aServer, - const TDesC & aName ) - { - SMC_MOCK_METHOD2( TInt, RTelServer &, aServer, - const TDesC &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenExistingCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenExistingCall( - RPhone & aPhone, - const TDesC & aName ) - { - SMC_MOCK_METHOD2( TInt, RPhone &, aPhone, - const TDesC &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RCall::OpenExistingCall -// ----------------------------------------------------------------------------- -// -TInt RCall::OpenExistingCall( - RLine & aLine, - const TDesC & aName ) - { - SMC_MOCK_METHOD2( TInt, RLine &, aLine, - const TDesC &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Close -// ----------------------------------------------------------------------------- -// -void RCall::Close( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::GetStatus -// ----------------------------------------------------------------------------- -// -TInt RCall::GetStatus( - TStatus & aStatus ) const - { - SMC_MOCK_METHOD1( TInt, TStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RCall::GetCaps -// ----------------------------------------------------------------------------- -// -TInt RCall::GetCaps( - TCaps & aCaps ) const - { - SMC_MOCK_METHOD1( TInt, TCaps &, aCaps ) - } - - -// ----------------------------------------------------------------------------- -// RCall::NotifyCapsChange -// ----------------------------------------------------------------------------- -// -void RCall::NotifyCapsChange( - TRequestStatus & aStatus, - TCaps & aCaps ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TCaps &, aCaps ) - } - - -// ----------------------------------------------------------------------------- -// RCall::NotifyCapsChangeCancel -// ----------------------------------------------------------------------------- -// -void RCall::NotifyCapsChangeCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::GetBearerServiceInfo -// ----------------------------------------------------------------------------- -// -TInt RCall::GetBearerServiceInfo( - TBearerService & aBearerService ) const - { - SMC_MOCK_METHOD1( TInt, TBearerService &, aBearerService ) - } - - -// ----------------------------------------------------------------------------- -// RCall::GetInfo -// ----------------------------------------------------------------------------- -// -TInt RCall::GetInfo( - TCallInfo & aCallInfo ) const - { - SMC_MOCK_METHOD1( TInt, TCallInfo &, aCallInfo ) - } - - -// ----------------------------------------------------------------------------- -// RCall::NotifyHookChange -// ----------------------------------------------------------------------------- -// -void RCall::NotifyHookChange( - TRequestStatus & aStatus, - THookStatus & aHookStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - THookStatus &, aHookStatus ) - } - - -// ----------------------------------------------------------------------------- -// RCall::NotifyHookChangeCancel -// ----------------------------------------------------------------------------- -// -void RCall::NotifyHookChangeCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::NotifyStatusChange -// ----------------------------------------------------------------------------- -// -void RCall::NotifyStatusChange( - TRequestStatus & aStatus, - TStatus & aCallStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TStatus &, aCallStatus ) - } - - -// ----------------------------------------------------------------------------- -// RCall::NotifyStatusChangeCancel -// ----------------------------------------------------------------------------- -// -void RCall::NotifyStatusChangeCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::NotifyCallDurationChange -// ----------------------------------------------------------------------------- -// -void RCall::NotifyCallDurationChange( - TRequestStatus & aStatus, - TTimeIntervalSeconds & aTime ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TTimeIntervalSeconds &, aTime ) - } - - -// ----------------------------------------------------------------------------- -// RCall::NotifyCallDurationChangeCancel -// ----------------------------------------------------------------------------- -// -void RCall::NotifyCallDurationChangeCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::GetCallDuration -// ----------------------------------------------------------------------------- -// -TInt RCall::GetCallDuration( - TTimeIntervalSeconds & aTime ) const - { - SMC_MOCK_METHOD1( TInt, TTimeIntervalSeconds &, aTime ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Dial -// ----------------------------------------------------------------------------- -// -TInt RCall::Dial( - const TTelNumberC & aTelNumber ) const - { - SMC_MOCK_METHOD1( TInt, const TTelNumberC &, aTelNumber ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Dial -// ----------------------------------------------------------------------------- -// -TInt RCall::Dial( - const TDesC8 & aCallParams, - const TTelNumberC & aTelNumber ) const - { - SMC_MOCK_METHOD2( TInt, const TDesC8 &, aCallParams, - const TTelNumberC &, aTelNumber ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Dial -// ----------------------------------------------------------------------------- -// -void RCall::Dial( - TRequestStatus & aStatus, - const TTelNumberC & aTelNumber ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TTelNumberC &, aTelNumber ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Dial -// ----------------------------------------------------------------------------- -// -void RCall::Dial( - TRequestStatus & aStatus, - const TDesC8 & aCallParams, - const TTelNumberC & aTelNumber ) - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - const TDesC8 &, aCallParams, - const TTelNumberC &, aTelNumber ) - } - - -// ----------------------------------------------------------------------------- -// RCall::DialCancel -// ----------------------------------------------------------------------------- -// -void RCall::DialCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Connect -// ----------------------------------------------------------------------------- -// -TInt RCall::Connect( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Connect -// ----------------------------------------------------------------------------- -// -TInt RCall::Connect( - const TDesC8 & aCallParams ) const - { - SMC_MOCK_METHOD1( TInt, const TDesC8 &, aCallParams ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Connect -// ----------------------------------------------------------------------------- -// -void RCall::Connect( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Connect -// ----------------------------------------------------------------------------- -// -void RCall::Connect( - TRequestStatus & aStatus, - const TDesC8 & aCallParams ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TDesC8 &, aCallParams ) - } - - -// ----------------------------------------------------------------------------- -// RCall::ConnectCancel -// ----------------------------------------------------------------------------- -// -void RCall::ConnectCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::AnswerIncomingCall -// ----------------------------------------------------------------------------- -// -TInt RCall::AnswerIncomingCall( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RCall::AnswerIncomingCall -// ----------------------------------------------------------------------------- -// -TInt RCall::AnswerIncomingCall( - const TDesC8 & aCallParams ) const - { - SMC_MOCK_METHOD1( TInt, const TDesC8 &, aCallParams ) - } - - -// ----------------------------------------------------------------------------- -// RCall::AnswerIncomingCall -// ----------------------------------------------------------------------------- -// -void RCall::AnswerIncomingCall( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RCall::AnswerIncomingCall -// ----------------------------------------------------------------------------- -// -void RCall::AnswerIncomingCall( - TRequestStatus & aStatus, - const TDesC8 & aCallParams ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TDesC8 &, aCallParams ) - } - - -// ----------------------------------------------------------------------------- -// RCall::AnswerIncomingCallCancel -// ----------------------------------------------------------------------------- -// -void RCall::AnswerIncomingCallCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::HangUp -// ----------------------------------------------------------------------------- -// -TInt RCall::HangUp( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RCall::HangUp -// ----------------------------------------------------------------------------- -// -void RCall::HangUp( - TRequestStatus & aStatus ) const - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RCall::HangUpCancel -// ----------------------------------------------------------------------------- -// -void RCall::HangUpCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::LoanDataPort -// ----------------------------------------------------------------------------- -// -TInt RCall::LoanDataPort( - TCommPort & aDataPort ) const - { - SMC_MOCK_METHOD1( TInt, TCommPort &, aDataPort ) - } - - -// ----------------------------------------------------------------------------- -// RCall::LoanDataPort -// ----------------------------------------------------------------------------- -// -void RCall::LoanDataPort( - TRequestStatus & aStatus, - TCommPort & aDataPort ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TCommPort &, aDataPort ) - } - - -// ----------------------------------------------------------------------------- -// RCall::LoanDataPortCancel -// ----------------------------------------------------------------------------- -// -void RCall::LoanDataPortCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::RecoverDataPort -// ----------------------------------------------------------------------------- -// -TInt RCall::RecoverDataPort( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RCall::TransferOwnership -// ----------------------------------------------------------------------------- -// -TInt RCall::TransferOwnership( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RCall::AcquireOwnership -// ----------------------------------------------------------------------------- -// -void RCall::AcquireOwnership( - TRequestStatus & aStatus ) const - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RCall::AcquireOwnershipCancel -// ----------------------------------------------------------------------------- -// -void RCall::AcquireOwnershipCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RCall::GetOwnershipStatus -// ----------------------------------------------------------------------------- -// -TInt RCall::GetOwnershipStatus( - TOwnershipStatus & aOwnershipStatus ) const - { - SMC_MOCK_METHOD1( TInt, TOwnershipStatus &, aOwnershipStatus ) - } - - -// ----------------------------------------------------------------------------- -// RCall::GetCallParams -// ----------------------------------------------------------------------------- -// -TInt RCall::GetCallParams( - TDes8 & aParams ) const - { - SMC_MOCK_METHOD1( TInt, TDes8 &, aParams ) - } - - -// ----------------------------------------------------------------------------- -// RCall::GetFaxSettings -// ----------------------------------------------------------------------------- -// -TInt RCall::GetFaxSettings( - TFaxSessionSettings & aSettings ) const - { - SMC_MOCK_METHOD1( TInt, TFaxSessionSettings &, aSettings ) - } - - -// ----------------------------------------------------------------------------- -// RCall::SetFaxSettings -// ----------------------------------------------------------------------------- -// -TInt RCall::SetFaxSettings( - const TFaxSessionSettings & aSettings ) const - { - SMC_MOCK_METHOD1( TInt, const TFaxSessionSettings &, aSettings ) - } - - -// ----------------------------------------------------------------------------- -// RCall::AdoptFaxSharedHeaderFile -// ----------------------------------------------------------------------------- -// -TInt RCall::AdoptFaxSharedHeaderFile( - const RFile & aSharedFile ) const - { - SMC_MOCK_METHOD1( TInt, const RFile &, aSharedFile ) - } - - -// ----------------------------------------------------------------------------- -// RCall::ReferenceCount -// ----------------------------------------------------------------------------- -// -TInt RCall::ReferenceCount( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RCall::Destruct -// ----------------------------------------------------------------------------- -// -void RCall::Destruct( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RFax::RFax -// ----------------------------------------------------------------------------- -// -RFax::RFax( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RFax::ConstructL -// ----------------------------------------------------------------------------- -// -void RFax::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RFax::Open -// ----------------------------------------------------------------------------- -// -TInt RFax::Open( - RCall & aCall ) - { - SMC_MOCK_METHOD1( TInt, RCall &, aCall ) - } - - -// ----------------------------------------------------------------------------- -// RFax::Close -// ----------------------------------------------------------------------------- -// -void RFax::Close( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RFax::Read -// ----------------------------------------------------------------------------- -// -void RFax::Read( - TRequestStatus & aStatus, - TDes8 & aDes ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDes8 &, aDes ) - } - - -// ----------------------------------------------------------------------------- -// RFax::Write -// ----------------------------------------------------------------------------- -// -void RFax::Write( - TRequestStatus & aStatus, - const TDesC8 & aDes ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TDesC8 &, aDes ) - } - - -// ----------------------------------------------------------------------------- -// RFax::WaitForEndOfPage -// ----------------------------------------------------------------------------- -// -void RFax::WaitForEndOfPage( - TRequestStatus & aStatus ) const - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RFax::TerminateFaxSession -// ----------------------------------------------------------------------------- -// -TInt RFax::TerminateFaxSession( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RFax::GetProgress -// ----------------------------------------------------------------------------- -// -TInt RFax::GetProgress( - TProgress & aProgress ) - { - SMC_MOCK_METHOD1( TInt, TProgress &, aProgress ) - } - - -// ----------------------------------------------------------------------------- -// RFax::Destruct -// ----------------------------------------------------------------------------- -// -void RFax::Destruct( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RLine::RLine -// ----------------------------------------------------------------------------- -// -RLine::RLine( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RLine::ConstructL -// ----------------------------------------------------------------------------- -// -void RLine::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RLine::Open -// ----------------------------------------------------------------------------- -// -TInt RLine::Open( - RPhone & aPhone, - const TDesC & aName ) - { - SMC_MOCK_METHOD2( TInt, RPhone &, aPhone, - const TDesC &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RLine::Open -// ----------------------------------------------------------------------------- -// -TInt RLine::Open( - RTelServer & aServer, - const TDesC & aName ) - { - SMC_MOCK_METHOD2( TInt, RTelServer &, aServer, - const TDesC &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RLine::Close -// ----------------------------------------------------------------------------- -// -void RLine::Close( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RLine::GetCaps -// ----------------------------------------------------------------------------- -// -TInt RLine::GetCaps( - TCaps & aCaps ) const - { - SMC_MOCK_METHOD1( TInt, TCaps &, aCaps ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyCapsChange -// ----------------------------------------------------------------------------- -// -void RLine::NotifyCapsChange( - TRequestStatus & aStatus, - TCaps & aCaps ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TCaps &, aCaps ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyCapsChangeCancel -// ----------------------------------------------------------------------------- -// -void RLine::NotifyCapsChangeCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RLine::GetStatus -// ----------------------------------------------------------------------------- -// -TInt RLine::GetStatus( - RCall::TStatus & aStatus ) const - { - SMC_MOCK_METHOD1( TInt, RCall::TStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RLine::GetHookStatus -// ----------------------------------------------------------------------------- -// -TInt RLine::GetHookStatus( - RCall::THookStatus & aHookStatus ) const - { - SMC_MOCK_METHOD1( TInt, RCall::THookStatus &, aHookStatus ) - } - - -// ----------------------------------------------------------------------------- -// RLine::EnumerateCall -// ----------------------------------------------------------------------------- -// -TInt RLine::EnumerateCall( - TInt & aCount ) const - { - SMC_MOCK_METHOD1( TInt, TInt &, aCount ) - } - - -// ----------------------------------------------------------------------------- -// RLine::GetCallInfo -// ----------------------------------------------------------------------------- -// -TInt RLine::GetCallInfo( - TInt aIndex, - TCallInfo & aCallInfo ) const - { - SMC_MOCK_METHOD2( TInt, TInt, aIndex, - TCallInfo &, aCallInfo ) - } - - -// ----------------------------------------------------------------------------- -// RLine::GetInfo -// ----------------------------------------------------------------------------- -// -TInt RLine::GetInfo( - TLineInfo & aLineInfo ) const - { - SMC_MOCK_METHOD1( TInt, TLineInfo &, aLineInfo ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyIncomingCall -// ----------------------------------------------------------------------------- -// -void RLine::NotifyIncomingCall( - TRequestStatus & aStatus, - TName & aName ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TName &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyIncomingCallCancel -// ----------------------------------------------------------------------------- -// -void RLine::NotifyIncomingCallCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyHookChange -// ----------------------------------------------------------------------------- -// -void RLine::NotifyHookChange( - TRequestStatus & aStatus, - RCall::THookStatus & aHookStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - RCall::THookStatus &, aHookStatus ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyHookChangeCancel -// ----------------------------------------------------------------------------- -// -void RLine::NotifyHookChangeCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyStatusChange -// ----------------------------------------------------------------------------- -// -void RLine::NotifyStatusChange( - TRequestStatus & aStatus, - RCall::TStatus & aLineStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - RCall::TStatus &, aLineStatus ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyStatusChangeCancel -// ----------------------------------------------------------------------------- -// -void RLine::NotifyStatusChangeCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyCallAdded -// ----------------------------------------------------------------------------- -// -void RLine::NotifyCallAdded( - TRequestStatus & aStatus, - TName & aName ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TName &, aName ) - } - - -// ----------------------------------------------------------------------------- -// RLine::NotifyCallAddedCancel -// ----------------------------------------------------------------------------- -// -void RLine::NotifyCallAddedCancel( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RLine::Destruct -// ----------------------------------------------------------------------------- -// -void RLine::Destruct( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::RTelSubSessionBase -// ----------------------------------------------------------------------------- -// -RTelSubSessionBase::RTelSubSessionBase( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::CancelAsyncRequest -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::CancelAsyncRequest( - TInt aReqToCancel ) const - { - SMC_MOCK_METHOD1( void, TInt, aReqToCancel ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Blank -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Blank( - const TInt aIpc, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD2( TInt, const TInt, aIpc, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Blank -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Blank( - const TInt aIpc, - TRequestStatus & aStatus, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD3( void, const TInt, aIpc, - TRequestStatus &, aStatus, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Set( - const TInt aIpc, - const TDesC8 & aDes, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD3( TInt, const TInt, aIpc, - const TDesC8 &, aDes, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Set( - const TInt aIpc, - TRequestStatus & aStatus, - const TDesC8 & aDes, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( void, const TInt, aIpc, - TRequestStatus &, aStatus, - const TDesC8 &, aDes, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Get( - const TInt aIpc, - TDes8 & aDes, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD3( TInt, const TInt, aIpc, - TDes8 &, aDes, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Get( - const TInt aIpc, - TRequestStatus & aStatus, - TDes8 & aDes, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( void, const TInt, aIpc, - TRequestStatus &, aStatus, - TDes8 &, aDes, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Set( - const TInt aIpc, - const TDesC8 & aDes1, - const TDesC8 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( TInt, const TInt, aIpc, - const TDesC8 &, aDes1, - const TDesC8 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Set( - const TInt aIpc, - TRequestStatus & aStatus, - const TDesC8 & aDes1, - const TDesC8 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - const TDesC8 &, aDes1, - const TDesC8 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Get( - const TInt aIpc, - TDes8 & aDes1, - TDes8 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( TInt, const TInt, aIpc, - TDes8 &, aDes1, - TDes8 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Get( - const TInt aIpc, - TRequestStatus & aStatus, - TDes8 & aDes1, - TDes8 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - TDes8 &, aDes1, - TDes8 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Set( - const TInt aIpc, - const TDesC16 & aDes, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD3( TInt, const TInt, aIpc, - const TDesC16 &, aDes, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Set( - const TInt aIpc, - TRequestStatus & aStatus, - const TDesC16 & aDes, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( void, const TInt, aIpc, - TRequestStatus &, aStatus, - const TDesC16 &, aDes, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Get( - const TInt aIpc, - TDes16 & aDes, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD3( TInt, const TInt, aIpc, - TDes16 &, aDes, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Get( - const TInt aIpc, - TRequestStatus & aStatus, - TDes16 & aDes, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( void, const TInt, aIpc, - TRequestStatus &, aStatus, - TDes16 &, aDes, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Set( - const TInt aIpc, - const TDesC16 & aDes1, - const TDesC16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( TInt, const TInt, aIpc, - const TDesC16 &, aDes1, - const TDesC16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Set( - const TInt aIpc, - TRequestStatus & aStatus, - const TDesC16 & aDes1, - const TDesC16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - const TDesC16 &, aDes1, - const TDesC16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Set( - const TInt aIpc, - const TDesC8 & aDes1, - const TDesC16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( TInt, const TInt, aIpc, - const TDesC8 &, aDes1, - const TDesC16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Set( - const TInt aIpc, - TRequestStatus & aStatus, - const TDesC8 & aDes1, - const TDesC16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - const TDesC8 &, aDes1, - const TDesC16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Get( - const TInt aIpc, - TDes16 & aDes1, - TDes16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( TInt, const TInt, aIpc, - TDes16 &, aDes1, - TDes16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Get( - const TInt aIpc, - TRequestStatus & aStatus, - TDes16 & aDes1, - TDes16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - TDes16 &, aDes1, - TDes16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Get( - const TInt aIpc, - TDes8 & aDes1, - TDes16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD4( TInt, const TInt, aIpc, - TDes8 &, aDes1, - TDes16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Get -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::Get( - const TInt aIpc, - TRequestStatus & aStatus, - TDes8 & aDes1, - TDes16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - TDes8 &, aDes1, - TDes16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::SetAndGet -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::SetAndGet( - const TInt aIpc, - TRequestStatus & aStatus, - const TDesC8 & aDes1, - TDes8 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - const TDesC8 &, aDes1, - TDes8 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::SetAndGet -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::SetAndGet( - const TInt aIpc, - TRequestStatus & aStatus, - TDes8 & aDes1, - const TDesC16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - TDes8 &, aDes1, - const TDesC16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::SetAndGet -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::SetAndGet( - const TInt aIpc, - TRequestStatus & aStatus, - const TDesC8 & aDummyValue, - TDes16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - const TDesC8&, aDummyValue, - TDes16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::SetAndGet -// ----------------------------------------------------------------------------- -// -void RTelSubSessionBase::SetAndGet( - const TInt aIpc, - TRequestStatus & aStatus, - const TDesC16 & aDes1, - TDes16 & aDes2, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD5( void, const TInt, aIpc, - TRequestStatus &, aStatus, - const TDesC16 &, aDes1, - TDes16 &, aDes2, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::Set -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::Set( - const TInt aIpc, - const RFile & aFile, - TReqPriorityType aType ) const - { - SMC_MOCK_METHOD3( TInt, const TInt, aIpc, - const RFile &, aFile, - TReqPriorityType, aType ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::CancelReq -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::CancelReq( - const TInt aIpc, - const TInt aIpcToCancel ) const - { - SMC_MOCK_METHOD2( TInt, const TInt, aIpc, - const TInt, aIpcToCancel ) - } - - -// ----------------------------------------------------------------------------- -// RTelSubSessionBase::CancelSubSession -// ----------------------------------------------------------------------------- -// -TInt RTelSubSessionBase::CancelSubSession( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::RTelServer -// ----------------------------------------------------------------------------- -// -RTelServer::RTelServer( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RTelServer::Connect -// ----------------------------------------------------------------------------- -// -TInt RTelServer::Connect( - TInt aMessageSlots ) - { - SMC_MOCK_METHOD1( TInt, TInt, aMessageSlots ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::EnumeratePhones -// ----------------------------------------------------------------------------- -// -TInt RTelServer::EnumeratePhones( - TInt & aNoOfPhones ) const - { - SMC_MOCK_METHOD1( TInt, TInt &, aNoOfPhones ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::GetPhoneInfo -// ----------------------------------------------------------------------------- -// -TInt RTelServer::GetPhoneInfo( - const TInt aIndex, - TPhoneInfo & aInfo ) const - { - SMC_MOCK_METHOD2( TInt, const TInt, aIndex, - TPhoneInfo &, aInfo ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::GetTsyName -// ----------------------------------------------------------------------------- -// -TInt RTelServer::GetTsyName( - const TInt aIndexOfPhone, - TDes & aTsyName ) const - { - SMC_MOCK_METHOD2( TInt, const TInt, aIndexOfPhone, - TDes &, aTsyName ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::LoadPhoneModule -// ----------------------------------------------------------------------------- -// -TInt RTelServer::LoadPhoneModule( - const TDesC & aFileName ) const - { - SMC_MOCK_METHOD1( TInt, const TDesC &, aFileName ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::UnloadPhoneModule -// ----------------------------------------------------------------------------- -// -TInt RTelServer::UnloadPhoneModule( - const TDesC & aFileName ) const - { - SMC_MOCK_METHOD1( TInt, const TDesC &, aFileName ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::IsSupportedByModule -// ----------------------------------------------------------------------------- -// -TInt RTelServer::IsSupportedByModule( - const TDesC & aTsyName, - const TInt aMixin, - TBool & aResult ) const - { - SMC_MOCK_METHOD3( TInt, const TDesC &, aTsyName, - const TInt, aMixin, - TBool &, aResult ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::GetTsyVersionNumber -// ----------------------------------------------------------------------------- -// -TInt RTelServer::GetTsyVersionNumber( - const TDesC & aTsyName, - TVersion & aVersion ) const - { - SMC_MOCK_METHOD2( TInt, const TDesC &, aTsyName, - TVersion &, aVersion ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::SetPriorityClient -// ----------------------------------------------------------------------------- -// -TInt RTelServer::SetPriorityClient( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::SetExtendedErrorGranularity -// ----------------------------------------------------------------------------- -// -TInt RTelServer::SetExtendedErrorGranularity( - const TErrorGranularity aGranularity ) const - { - SMC_MOCK_METHOD1( TInt, const TErrorGranularity, aGranularity ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::__DbgMarkHeap -// ----------------------------------------------------------------------------- -// -TInt RTelServer::__DbgMarkHeap( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::__DbgCheckHeap -// ----------------------------------------------------------------------------- -// -TInt RTelServer::__DbgCheckHeap( - TInt aCount ) - { - SMC_MOCK_METHOD1( TInt, TInt, aCount ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::__DbgMarkEnd -// ----------------------------------------------------------------------------- -// -TInt RTelServer::__DbgMarkEnd( - TInt aCount ) - { - SMC_MOCK_METHOD1( TInt, TInt, aCount ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::__DbgFailNext -// ----------------------------------------------------------------------------- -// -TInt RTelServer::__DbgFailNext( - TInt aCount ) - { - SMC_MOCK_METHOD1( TInt, TInt, aCount ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::__DbgFailNextAvailable -// ----------------------------------------------------------------------------- -// -TInt RTelServer::__DbgFailNextAvailable( - TBool & aResult ) - { - SMC_MOCK_METHOD1( TInt, TBool &, aResult ) - } - - -// ----------------------------------------------------------------------------- -// RTelServer::SetPriorityClientV2 -// ----------------------------------------------------------------------------- -// -TInt RTelServer::SetPriorityClientV2( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_etelmm.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_etelmm.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +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 "etelmm.h" - -// ============================ MEMBER FUNCTIONS =============================== - - - -// ----------------------------------------------------------------------------- -// RMobilePhone::GetMultimodeCaps -// ----------------------------------------------------------------------------- -// -TInt RMobilePhone::GetMultimodeCaps( - TUint32 & aCaps ) const - { - SMC_MOCK_METHOD1( TInt, TUint32 &, aCaps ) - } - - -// ----------------------------------------------------------------------------- -// RMobilePhone::GetCurrentMode -// ----------------------------------------------------------------------------- -// -TInt RMobilePhone::GetCurrentMode( - TMobilePhoneNetworkMode & aNetworkMode ) const - { - SMC_MOCK_METHOD1( TInt, TMobilePhoneNetworkMode &, aNetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// RMobilePhone::GetSignalStrength -// ----------------------------------------------------------------------------- -// -void RMobilePhone::GetSignalStrength( - TRequestStatus & aReqStatus, - TInt32 & aSignalStrength, - TInt8 & aBar ) const - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aReqStatus, - TInt32 &, aSignalStrength, - TInt8 &, aBar ) - } - - -// ----------------------------------------------------------------------------- -// RMobilePhone::NotifySignalStrengthChange -// ----------------------------------------------------------------------------- -// -void RMobilePhone::NotifySignalStrengthChange( - TRequestStatus & aReqStatus, - TInt32 & aSignalStrength, - TInt8 & aBar ) const - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aReqStatus, - TInt32 &, aSignalStrength, - TInt8 &, aBar ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_hbdevicemessagebox.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_hbdevicemessagebox.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,252 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::HbDeviceMessageBox -// ----------------------------------------------------------------------------- -// -HbDeviceMessageBox::HbDeviceMessageBox( - const QString & text, - HbMessageBox::MessageBoxType type, - QObject * parent ) - : - QObject(parent) - { - Q_UNUSED(text) - Q_UNUSED(type) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::~HbDeviceMessageBox -// ----------------------------------------------------------------------------- -// -HbDeviceMessageBox::~HbDeviceMessageBox( ) - { - - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::question -// ----------------------------------------------------------------------------- -// -bool HbDeviceMessageBox::question( - const QString & text, - const QString & primaryButtonText, - const QString & secondaryButtonText ) - { - SMC_MOCK_METHOD3( bool, const QString &, text, - const QString &, primaryButtonText, - const QString &, secondaryButtonText ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::information -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::information( - const QString & text ) - { - SMC_MOCK_METHOD1( void, const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::warning -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::warning( - const QString & text ) - { - SMC_MOCK_METHOD1( void, const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::show -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::show( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::close -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::close( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::exec -// ----------------------------------------------------------------------------- -// -const QAction * HbDeviceMessageBox::exec( ) - { - SMC_MOCK_METHOD0( QAction * ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::setText -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::setText( - const QString & text ) - { - SMC_MOCK_METHOD1( void, const QString &, text ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::text -// ----------------------------------------------------------------------------- -// -QString HbDeviceMessageBox::text( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::setIconName -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::setIconName( - const QString & iconName ) - { - SMC_MOCK_METHOD1( void, const QString &, iconName ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::setIconVisible -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::setIconVisible( bool visible ) - { - SMC_MOCK_METHOD1( void, bool, visible ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::iconVisible -// ----------------------------------------------------------------------------- -// -bool HbDeviceMessageBox::iconVisible( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::setAnimationDefinition -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::setAnimationDefinition( - QString & animationDefinition ) - { - SMC_MOCK_METHOD1( void, QString &, animationDefinition ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::animationDefinition -// ----------------------------------------------------------------------------- -// -QString HbDeviceMessageBox::animationDefinition( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::setTimeout -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::setTimeout( - int timeout ) - { - SMC_MOCK_METHOD1( void, int, timeout ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::setTimeout -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::setTimeout( - HbPopup::DefaultTimeout timeout ) - { - SMC_MOCK_METHOD1( void, HbPopup::DefaultTimeout, timeout ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::timeout -// ----------------------------------------------------------------------------- -// -int HbDeviceMessageBox::timeout( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::setDismissPolicy -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::setDismissPolicy( - HbPopup::DismissPolicy dismissPolicy ) - { - SMC_MOCK_METHOD1( void, HbPopup::DismissPolicy, dismissPolicy ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::dismissPolicy -// ----------------------------------------------------------------------------- -// -HbPopup::DismissPolicy HbDeviceMessageBox::dismissPolicy( ) const - { - SMC_MOCK_METHOD0( HbPopup::DismissPolicy ) - } - - -// ----------------------------------------------------------------------------- -// HbDeviceMessageBox::aboutToClose -// ----------------------------------------------------------------------------- -// -void HbDeviceMessageBox::aboutToClose( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_imeikeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_imeikeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +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 "imeikeysequencehandler.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// ImeiKeySequenceHandler::ImeiKeySequenceHandler -// ----------------------------------------------------------------------------- -// -ImeiKeySequenceHandler::ImeiKeySequenceHandler( - QObject * parent ) - : - KeySequenceHandler(parent), - m_messageBox(0) - { - - } - - -// ----------------------------------------------------------------------------- -// ImeiKeySequenceHandler::~ImeiKeySequenceHandler -// ----------------------------------------------------------------------------- -// -ImeiKeySequenceHandler::~ImeiKeySequenceHandler( ) - { - - } - - -// ----------------------------------------------------------------------------- -// ImeiKeySequenceHandler::executeKeySequence -// ----------------------------------------------------------------------------- -// -bool ImeiKeySequenceHandler::executeKeySequence( - const QString & keySequence ) - { - SMC_MOCK_METHOD1( bool, const QString &, keySequence ) - } - - -// ----------------------------------------------------------------------------- -// ImeiKeySequenceHandler::destroyMessageBox -// ----------------------------------------------------------------------------- -// -void ImeiKeySequenceHandler::destroyMessageBox() -{ - -} - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_keysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_keysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +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 "keysequencehandler.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// KeySequenceHandler::KeySequenceHandler -// ----------------------------------------------------------------------------- -// -KeySequenceHandler::KeySequenceHandler( - QObject * parent ) - : - QObject(parent), - m_keySequenceValidator("") - { - - } - - -// ----------------------------------------------------------------------------- -// KeySequenceHandler::~KeySequenceHandler -// ----------------------------------------------------------------------------- -// -KeySequenceHandler::~KeySequenceHandler( ) - { - - } - - -// ----------------------------------------------------------------------------- -// KeySequenceHandler::keySequenceValidator -// ----------------------------------------------------------------------------- -// -QString KeySequenceHandler::keySequenceValidator( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// KeySequenceHandler::setKeySequenceValidator -// ----------------------------------------------------------------------------- -// -void KeySequenceHandler::setKeySequenceValidator( - const QString & validator ) - { - SMC_MOCK_METHOD1( void, const QString &, validator ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_lifetimerkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_lifetimerkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +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 "lifetimerkeysequencehandler.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// LifeTimerKeySequenceHandler::LifeTimerKeySequenceHandler -// ----------------------------------------------------------------------------- -// -LifeTimerKeySequenceHandler::LifeTimerKeySequenceHandler( - QObject * parent ) - : - KeySequenceHandler(parent), - m_messageBox(0), - m_repository(0) - { - - } - - -// ----------------------------------------------------------------------------- -// LifeTimerKeySequenceHandler::~LifeTimerKeySequenceHandler -// ----------------------------------------------------------------------------- -// -LifeTimerKeySequenceHandler::~LifeTimerKeySequenceHandler( ) - { - - } - - -// ----------------------------------------------------------------------------- -// LifeTimerKeySequenceHandler::executeKeySequence -// ----------------------------------------------------------------------------- -// -bool LifeTimerKeySequenceHandler::executeKeySequence( - const QString & keySequence ) - { - SMC_MOCK_METHOD1( bool, const QString &, keySequence ) - } - - -// ----------------------------------------------------------------------------- -// LifeTimerKeySequenceHandler::destroyMessageBox -// ----------------------------------------------------------------------------- -// -void LifeTimerKeySequenceHandler::destroyMessageBox() -{ - -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_manufacturerkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_manufacturerkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -#include -#include -#include "manufacturerkeysequencehandler.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// ManufacturerKeySequenceHandler::ManufacturerKeySequenceHandler -// ----------------------------------------------------------------------------- -// -ManufacturerKeySequenceHandler::ManufacturerKeySequenceHandler( - QObject * parent ) - : - KeySequenceHandler(parent), - m_currentRequest(0) - { - - } - - -// ----------------------------------------------------------------------------- -// ManufacturerKeySequenceHandler::~ManufacturerKeySequenceHandler -// ----------------------------------------------------------------------------- -// -ManufacturerKeySequenceHandler::~ManufacturerKeySequenceHandler( ) - { - - } - - -// ----------------------------------------------------------------------------- -// ManufacturerKeySequenceHandler::executeKeySequence -// ----------------------------------------------------------------------------- -// -bool ManufacturerKeySequenceHandler::executeKeySequence( - const QString & keySequence ) - { - SMC_MOCK_METHOD1( bool, const QString &, keySequence ) - } - - -// ----------------------------------------------------------------------------- -// ManufacturerKeySequenceHandler::requestOk -// ----------------------------------------------------------------------------- -// -void ManufacturerKeySequenceHandler::requestOk( - const QVariant &/*returnValue*/) - { - - } - - -// ----------------------------------------------------------------------------- -// ManufacturerKeySequenceHandler::requestError -// ----------------------------------------------------------------------------- -// -void ManufacturerKeySequenceHandler::requestError( - int /*error*/, const QString& /*errorMessage*/) - { - - } - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_qsysteminfo.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_qsysteminfo.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,614 +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 -#include -#include - -QTM_BEGIN_NAMESPACE - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// QSystemStorageInfo::QSystemStorageInfo -// ----------------------------------------------------------------------------- -// -QSystemStorageInfo::QSystemStorageInfo( QObject * parent ) - : - QObject(parent) - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemStorageInfo::~QSystemStorageInfo -// ----------------------------------------------------------------------------- -// -QSystemStorageInfo::~QSystemStorageInfo( ) - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemStorageInfo::totalDiskSpace -// ----------------------------------------------------------------------------- -// -Q_INVOKABLE qlonglong QSystemStorageInfo::totalDiskSpace( - const QString & driveVolume ) - { - SMC_MOCK_METHOD1( Q_INVOKABLE qlonglong, const QString &, driveVolume ) - } - - -// ----------------------------------------------------------------------------- -// QSystemStorageInfo::availableDiskSpace -// ----------------------------------------------------------------------------- -// -Q_INVOKABLE qlonglong QSystemStorageInfo::availableDiskSpace( - const QString & driveVolume ) - { - SMC_MOCK_METHOD1( Q_INVOKABLE qlonglong, const QString &, driveVolume ) - } - - -// ----------------------------------------------------------------------------- -// QSystemStorageInfo::logicalDrives -// ----------------------------------------------------------------------------- -// -QStringList QSystemStorageInfo::logicalDrives( ) - { - SMC_MOCK_METHOD0( QStringList ) - } - - -// ----------------------------------------------------------------------------- -// QSystemStorageInfo::typeForDrive -// ----------------------------------------------------------------------------- -// -Q_INVOKABLE QSystemStorageInfo::DriveType QSystemStorageInfo::typeForDrive( - const QString & driveVolume ) - { - SMC_MOCK_METHOD1( Q_INVOKABLE QSystemStorageInfo::DriveType, const QString &, driveVolume ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::QSystemDeviceInfo -// ----------------------------------------------------------------------------- -// -QSystemDeviceInfo::QSystemDeviceInfo ( QObject * parent ) - : - QObject(parent) - { - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::~QSystemDeviceInfo -// ----------------------------------------------------------------------------- -// -QSystemDeviceInfo::~QSystemDeviceInfo( ) - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::inputMethodType -// ----------------------------------------------------------------------------- -// -QSystemDeviceInfo::InputMethodFlags QSystemDeviceInfo::inputMethodType( ) - { - SMC_MOCK_METHOD0( QSystemDeviceInfo::InputMethodFlags ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::imei -// ----------------------------------------------------------------------------- -// -QString QSystemDeviceInfo::imei( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::imsi -// ----------------------------------------------------------------------------- -// -QString QSystemDeviceInfo::imsi( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::manufacturer -// ----------------------------------------------------------------------------- -// -QString QSystemDeviceInfo::manufacturer( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::model -// ----------------------------------------------------------------------------- -// -QString QSystemDeviceInfo::model( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::productName -// ----------------------------------------------------------------------------- -// -QString QSystemDeviceInfo::productName( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::batteryLevel -// ----------------------------------------------------------------------------- -// -int QSystemDeviceInfo::batteryLevel( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::batteryStatus -// ----------------------------------------------------------------------------- -// -QSystemDeviceInfo::BatteryStatus QSystemDeviceInfo::batteryStatus( ) - { - SMC_MOCK_METHOD0( QSystemDeviceInfo::BatteryStatus ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::isDeviceLocked -// ----------------------------------------------------------------------------- -// -bool QSystemDeviceInfo::isDeviceLocked( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::simStatus -// ----------------------------------------------------------------------------- -// -QSystemDeviceInfo::SimStatus QSystemDeviceInfo::simStatus( ) - { - SMC_MOCK_METHOD0( QSystemDeviceInfo::SimStatus ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::currentProfile -// ----------------------------------------------------------------------------- -// -QSystemDeviceInfo::Profile QSystemDeviceInfo::currentProfile( ) - { - SMC_MOCK_METHOD0( QSystemDeviceInfo::Profile ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::currentPowerState -// ----------------------------------------------------------------------------- -// -QSystemDeviceInfo::PowerState QSystemDeviceInfo::currentPowerState( ) - { - SMC_MOCK_METHOD0( QSystemDeviceInfo::PowerState ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::connectNotify -// ----------------------------------------------------------------------------- -// -void QSystemDeviceInfo::connectNotify(const char *signal) -{ - SMC_MOCK_METHOD1( void, const char *, signal ) -} - - -// ----------------------------------------------------------------------------- -// QSystemDeviceInfo::disconnectNotify -// ----------------------------------------------------------------------------- -// -void QSystemDeviceInfo::disconnectNotify(const char *signal) -{ - SMC_MOCK_METHOD1( void, const char *, signal ) -} - - -// ----------------------------------------------------------------------------- -// QSystemInfo::QSystemInfo -// ----------------------------------------------------------------------------- -// -QSystemInfo::QSystemInfo( QObject * parent ) - : - QObject(parent) - { - } - - -// ----------------------------------------------------------------------------- -// QSystemInfo::~QSystemInfo -// ----------------------------------------------------------------------------- -// -QSystemInfo::~QSystemInfo() - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemInfo::currentLanguage -// ----------------------------------------------------------------------------- -// -QString QSystemInfo::currentLanguage() - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemInfo::availableLanguages -// ----------------------------------------------------------------------------- -// -QStringList QSystemInfo::availableLanguages( ) - { - SMC_MOCK_METHOD0( QStringList ) - } - - -// ----------------------------------------------------------------------------- -// QSystemInfo::currentCountryCode -// ----------------------------------------------------------------------------- -// -QString QSystemInfo::currentCountryCode( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemInfo::version -// ----------------------------------------------------------------------------- -// -QString QSystemInfo::version( - QSystemInfo::Version type, - const QString & parameter ) - { - SMC_MOCK_METHOD2( QString, QSystemInfo::Version, type, - const QString &, parameter ) - } - - -// ----------------------------------------------------------------------------- -// QSystemInfo::hasFeatureSupported -// ----------------------------------------------------------------------------- -// -bool QSystemInfo::hasFeatureSupported( - QSystemInfo::Feature feature ) - { - SMC_MOCK_METHOD1( bool, QSystemInfo::Feature, feature ) - } - - -// ----------------------------------------------------------------------------- -// QSystemInfo::connectNotify -// ----------------------------------------------------------------------------- -// -void QSystemInfo::connectNotify(const char *signal) -{ - SMC_MOCK_METHOD1( void, const char *, signal ) -} - - -// ----------------------------------------------------------------------------- -// QSystemInfo::disconnectNotify -// ----------------------------------------------------------------------------- -// -void QSystemInfo::disconnectNotify(const char *signal) -{ - SMC_MOCK_METHOD1( void, const char *, signal ) -} - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::QSystemNetworkInfo -// ----------------------------------------------------------------------------- -// -QSystemNetworkInfo::QSystemNetworkInfo( QObject * parent ) - : - QObject(parent) - { - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::~QSystemNetworkInfo -// ----------------------------------------------------------------------------- -// -QSystemNetworkInfo::~QSystemNetworkInfo( ) - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::networkStatus -// ----------------------------------------------------------------------------- -// -Q_INVOKABLE QSystemNetworkInfo::NetworkStatus QSystemNetworkInfo::networkStatus( - QSystemNetworkInfo::NetworkMode mode ) - { - SMC_MOCK_METHOD1( Q_INVOKABLE QSystemNetworkInfo::NetworkStatus, - QSystemNetworkInfo::NetworkMode, mode ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::networkSignalStrength -// ----------------------------------------------------------------------------- -// -Q_INVOKABLE int QSystemNetworkInfo::networkSignalStrength( - QSystemNetworkInfo::NetworkMode mode ) - { - SMC_MOCK_METHOD1( Q_INVOKABLE int, - QSystemNetworkInfo::NetworkMode, mode ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::macAddress -// ----------------------------------------------------------------------------- -// -QString QSystemNetworkInfo::macAddress( - QSystemNetworkInfo::NetworkMode mode ) - { - SMC_MOCK_METHOD1( QString, QSystemNetworkInfo::NetworkMode, mode ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::currentMode -// ----------------------------------------------------------------------------- -// -QSystemNetworkInfo::NetworkMode QSystemNetworkInfo::currentMode( ) - { - SMC_MOCK_METHOD0( QSystemNetworkInfo::NetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::cellId -// ----------------------------------------------------------------------------- -// -int QSystemNetworkInfo::cellId( ) - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::locationAreaCode -// ----------------------------------------------------------------------------- -// -int QSystemNetworkInfo::locationAreaCode( ) - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::currentMobileCountryCode -// ----------------------------------------------------------------------------- -// -QString QSystemNetworkInfo::currentMobileCountryCode( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::currentMobileNetworkCode -// ----------------------------------------------------------------------------- -// -QString QSystemNetworkInfo::currentMobileNetworkCode( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::homeMobileCountryCode -// ----------------------------------------------------------------------------- -// -QString QSystemNetworkInfo::homeMobileCountryCode( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::homeMobileNetworkCode -// ----------------------------------------------------------------------------- -// -QString QSystemNetworkInfo::homeMobileNetworkCode( ) - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::networkName -// ----------------------------------------------------------------------------- -// -Q_INVOKABLE QString QSystemNetworkInfo::networkName( - QSystemNetworkInfo::NetworkMode mode ) - { - SMC_MOCK_METHOD1( Q_INVOKABLE QString, QSystemNetworkInfo::NetworkMode, mode ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::interfaceForMode -// ----------------------------------------------------------------------------- -// -QNetworkInterface QSystemNetworkInfo::interfaceForMode( - QSystemNetworkInfo::NetworkMode mode ) - { - SMC_MOCK_METHOD1( QNetworkInterface, QSystemNetworkInfo::NetworkMode, mode ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::connectNotify -// ----------------------------------------------------------------------------- -// -void QSystemNetworkInfo::connectNotify( - const char * signal ) - { - SMC_MOCK_METHOD1( void, const char *, signal ) - } - - -// ----------------------------------------------------------------------------- -// QSystemNetworkInfo::disconnectNotify -// ----------------------------------------------------------------------------- -// -void QSystemNetworkInfo::disconnectNotify( - const char * signal ) - { - SMC_MOCK_METHOD1( void, const char *, signal ) - } - - -// ----------------------------------------------------------------------------- -// QSystemScreenSaver::QSystemScreenSaver -// ----------------------------------------------------------------------------- -// -QSystemScreenSaver::QSystemScreenSaver ( QObject * parent ) - : - QObject(parent) - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemScreenSaver::~QSystemScreenSaver -// ----------------------------------------------------------------------------- -// -QSystemScreenSaver::~QSystemScreenSaver( ) - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemScreenSaver::screenSaverInhibited -// ----------------------------------------------------------------------------- -// -bool QSystemScreenSaver::screenSaverInhibited( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// QSystemScreenSaver::setScreenSaverInhibit -// ----------------------------------------------------------------------------- -// -Q_INVOKABLE bool QSystemScreenSaver::setScreenSaverInhibit( ) - { - SMC_MOCK_METHOD0( Q_INVOKABLE bool ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDisplayInfo::QSystemDisplayInfo -// ----------------------------------------------------------------------------- -// -QSystemDisplayInfo::QSystemDisplayInfo( - QObject * parent ) - : - QObject( parent ) - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemDisplayInfo::~QSystemDisplayInfo -// ----------------------------------------------------------------------------- -// -QSystemDisplayInfo::~QSystemDisplayInfo( ) - { - - } - - -// ----------------------------------------------------------------------------- -// QSystemDisplayInfo::displayBrightness -// ----------------------------------------------------------------------------- -// -int QSystemDisplayInfo::displayBrightness( - int screen ) - { - SMC_MOCK_METHOD1( int, int, screen ) - } - - -// ----------------------------------------------------------------------------- -// QSystemDisplayInfo::colorDepth -// ----------------------------------------------------------------------------- -// -int QSystemDisplayInfo::colorDepth( - int screen ) - { - SMC_MOCK_METHOD1( int, int, screen ) - } - -#include "moc_qsysteminfo.cpp" - -QTM_END_NAMESPACE diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_qtranslator.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_qtranslator.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +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 "qtranslator.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// QTranslator::QTranslator -// ----------------------------------------------------------------------------- -// -QTranslator::QTranslator( - QObject * parent ) - : - QObject( parent ) - { - - } - - -// ----------------------------------------------------------------------------- -// QTranslator::~QTranslator -// ----------------------------------------------------------------------------- -// -QTranslator::~QTranslator( ) - { - if (QCoreApplication::instance()) - { - QCoreApplication::removeTranslator(this); - } - } - - -// ----------------------------------------------------------------------------- -// QTranslator::translate -// ----------------------------------------------------------------------------- -// -QString QTranslator::translate( - const char * aContext, - const char * sourceText, - const char * disambiguation ) const - { - SMC_MOCK_METHOD3( QString, const char *, aContext, - const char *, sourceText, - const char *, disambiguation ) - } - - -// ----------------------------------------------------------------------------- -// QTranslator::translate -// ----------------------------------------------------------------------------- -// -QString QTranslator::translate( - const char * aContext, - const char * sourceText, - const char * disambiguation, - int n ) const - { - SMC_MOCK_METHOD4( QString, const char *, aContext, - const char *, sourceText, - const char *, disambiguation, - int, n ) - } - - -// ----------------------------------------------------------------------------- -// QTranslator::isEmpty -// ----------------------------------------------------------------------------- -// -bool QTranslator::isEmpty( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// QTranslator::load -// ----------------------------------------------------------------------------- -// -bool QTranslator::load( - const QString & filename, - const QString & directory, - const QString & search_delimiters, - const QString & suffix ) - { - SMC_MOCK_METHOD4( bool, const QString &, filename, - const QString &, directory, - const QString &, search_delimiters, - const QString &, suffix ) - } - - -// ----------------------------------------------------------------------------- -// QTranslator::load -// ----------------------------------------------------------------------------- -// -bool QTranslator::load( - const uchar * data, - int len ) - { - SMC_MOCK_METHOD2( bool, const uchar *, data, - int, len ) - } diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_rmmcustomapi.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_rmmcustomapi.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1432 +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 "rmmcustomapi.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CMmCustomPtrHolder::CMmCustomPtrHolder -// ----------------------------------------------------------------------------- -// -CMmCustomPtrHolder::CMmCustomPtrHolder( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CMmCustomPtrHolder::ConstructL -// ----------------------------------------------------------------------------- -// -void CMmCustomPtrHolder::ConstructL( - const TInt /*aSizeOfPtrArray*/, - const TInt /*aSizeOfPtrCArray*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CMmCustomPtrHolder::NewL -// ----------------------------------------------------------------------------- -// -CMmCustomPtrHolder * CMmCustomPtrHolder::NewL( - const TInt aSizeOfPtrArray, - const TInt aSizeOfPtrCArray ) - { - SMC_MOCK_NEWL2( CMmCustomPtrHolder *, const TInt, aSizeOfPtrArray, - const TInt, aSizeOfPtrCArray ) - - CMmCustomPtrHolder* self = new( ELeave ) CMmCustomPtrHolder; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CMmCustomPtrHolder::~CMmCustomPtrHolder -// ----------------------------------------------------------------------------- -// -CMmCustomPtrHolder::~CMmCustomPtrHolder( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::RMmCustomAPI -// ----------------------------------------------------------------------------- -// -RMmCustomAPI::RMmCustomAPI( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ConstructL -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::Open -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::Open( - RMobilePhone & aPhone ) - { - SMC_MOCK_METHOD1( TInt, RMobilePhone &, aPhone ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::Close -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::Close( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetDriveMode -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SetDriveMode( - TRequestStatus & aStatus, - const TSetDriveMode aModeStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TSetDriveMode, aModeStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ActivateSimLock -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::ActivateSimLock( - const TSimLockPassword & aPassWord, - const TLockNumber aNumber ) const - { - SMC_MOCK_METHOD2( TInt, const TSimLockPassword &, aPassWord, - const TLockNumber, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ActivateSimLock -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ActivateSimLock( - TRequestStatus & aStatus, - const TSimLockPassword & aPassWord, - const TLockNumber aNumber ) const - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - const TSimLockPassword &, aPassWord, - const TLockNumber, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::DeActivateSimLock -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::DeActivateSimLock( - const TSimLockPassword & aPassWord, - const TLockNumber aNumber ) const - { - SMC_MOCK_METHOD2( TInt, const TSimLockPassword &, aPassWord, - const TLockNumber, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::DeActivateSimLock -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::DeActivateSimLock( - TRequestStatus & aStatus, - const TSimLockPassword & aPassWord, - const TLockNumber aNumber ) const - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - const TSimLockPassword &, aPassWord, - const TLockNumber, aNumber ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ReadViagHomeZoneParams -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::ReadViagHomeZoneParams( - TViagParams & aParam, - TViagElements & aElems ) const - { - SMC_MOCK_METHOD2( TInt, TViagParams &, aParam, - TViagElements &, aElems ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ReadViagHomeZoneParams -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ReadViagHomeZoneParams( - TRequestStatus & aStatus, - TViagParams & aParam, - TViagElements & aElems ) - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - TViagParams &, aParam, - TViagElements &, aElems ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ReadViagHomeZoneCache -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::ReadViagHomeZoneCache( - TViagCacheRecordId & aId, - TViagCacheRecordContent & aRecord ) const - { - SMC_MOCK_METHOD2( TInt, TViagCacheRecordId &, aId, - TViagCacheRecordContent &, aRecord ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ReadViagHomeZoneCache -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ReadViagHomeZoneCache( - TRequestStatus & aStatus, - TViagCacheRecordId & aId, - TViagCacheRecordContent & aRecord ) - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - TViagCacheRecordId &, aId, - TViagCacheRecordContent &, aRecord ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::WriteViagHomeZoneCache -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::WriteViagHomeZoneCache( - const TViagCacheRecordId & aId, - const TViagCacheRecordContent & aRecord ) const - { - SMC_MOCK_METHOD2( TInt, const TViagCacheRecordId &, aId, - const TViagCacheRecordContent &, aRecord ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetAlwaysOn -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SetAlwaysOn( - TRequestStatus & aStatus, - TSetAlwaysOnMode & aMode ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TSetAlwaysOnMode &, aMode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyRauEvent -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyRauEvent( - TRequestStatus & aStatus, - TRauEventStatus & aEventStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TRauEventStatus &, aEventStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::WriteViagHomeZoneCache -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::WriteViagHomeZoneCache( - TRequestStatus & aStatus, - const TViagCacheRecordId & aId, - const TViagCacheRecordContent & aRecord ) - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - const TViagCacheRecordId &, aId, - const TViagCacheRecordContent &, aRecord ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyDtmfEvent -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyDtmfEvent( - TRequestStatus & aStatus, - TDtmfInfo & aInfo ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDtmfInfo &, aInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetDiagnosticInfo -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetDiagnosticInfo( - TName & aCallName ) const - { - SMC_MOCK_METHOD1( TInt, TName &, aCallName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetAlsBlocked -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::SetAlsBlocked( - const TSetAlsBlock aBlockStatus ) const - { - SMC_MOCK_METHOD1( TInt, const TSetAlsBlock, aBlockStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetAlsBlocked -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SetAlsBlocked( - TRequestStatus & aStatus, - const TSetAlsBlock aBlockStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TSetAlsBlock, aBlockStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetAlsBlocked -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetAlsBlocked( - TGetAlsBlockStatus & aBlockStatus ) const - { - SMC_MOCK_METHOD1( TInt, TGetAlsBlockStatus &, aBlockStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetAlsBlocked -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetAlsBlocked( - TRequestStatus & aStatus, - TGetAlsBlockStatus & aBlockStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TGetAlsBlockStatus &, aBlockStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetRemoteAlertingToneStatus -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetRemoteAlertingToneStatus( - TRemoteAlertingToneStatus & aToneStatus ) const - { - SMC_MOCK_METHOD1( TInt, TRemoteAlertingToneStatus &, aToneStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CallOrigin -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::CallOrigin( - TName & aCallName, - TCallOrigin & aOrigin ) const - { - SMC_MOCK_METHOD2( TInt, TName &, aCallName, - TCallOrigin &, aOrigin ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::TerminateCall -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::TerminateCall( - TName & aCallName ) const - { - SMC_MOCK_METHOD1( TInt, TName &, aCallName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::TerminateCall -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::TerminateCall( - TRequestStatus & aStatus, - TName & aCallName ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TName &, aCallName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyAlsBlockedChanged -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyAlsBlockedChanged( - TRequestStatus & aStatus, - TGetAlsBlockStatus & aBlockStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TGetAlsBlockStatus &, aBlockStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetCipheringInfo -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetCipheringInfo( - TCipheringInfo & aInfo ) - { - SMC_MOCK_METHOD1( TInt, TCipheringInfo &, aInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetCipheringInfo -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetCipheringInfo( - TRequestStatus & aStatus, - TCipheringInfo & aInfo ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TCipheringInfo &, aInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyCipheringInfoChange -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyCipheringInfoChange( - TRequestStatus & aStatus, - TCipheringInfo & aInfo ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TCipheringInfo &, aInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyNSPSStatus -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyNSPSStatus( - TRequestStatus & aStatus, - TNspsStatus & aNspsStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TNspsStatus &, aNspsStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NetWakeup -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NetWakeup( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CheckAlsPpSupport -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::CheckAlsPpSupport( - TAlsSupport & aSupport ) const - { - SMC_MOCK_METHOD1( TInt, TAlsSupport &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CheckAlsPpSupport -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::CheckAlsPpSupport( - TRequestStatus & aStatus, - TAlsSupport & aSupport ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TAlsSupport &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetNetworkProviderName -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetNetworkProviderName( - TDes & aNetworkProviderName ) const - { - SMC_MOCK_METHOD1( TInt, TDes &, aNetworkProviderName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetNetworkProviderName -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetNetworkProviderName( - TRequestStatus & aStatus, - TDes & aNetworkProviderName ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDes &, aNetworkProviderName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::IsBlocked -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::IsBlocked( - TSecurityCodeType & aType, - TBool & aIsBlocked ) - { - SMC_MOCK_METHOD2( TInt, TSecurityCodeType &, aType, - TBool &, aIsBlocked ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CheckSecurityCode -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::CheckSecurityCode( - const TSecurityCodeType aCode ) - { - SMC_MOCK_METHOD1( TInt, const TSecurityCodeType, aCode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CheckSecurityCode -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::CheckSecurityCode( - TRequestStatus & aStatus, - const TSecurityCodeType aCode ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TSecurityCodeType, aCode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetActivePin -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetActivePin( - RMobilePhone::TMobilePhoneSecurityCode & aActivePin ) - { - SMC_MOCK_METHOD1( void, RMobilePhone::TMobilePhoneSecurityCode &, aActivePin ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetAirTimeDuration -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetAirTimeDuration( - TTimeIntervalSeconds & aTime ) const - { - SMC_MOCK_METHOD1( TInt, TTimeIntervalSeconds &, aTime ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CheckEmergencyNumber -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::CheckEmergencyNumber( - TEmerNumberCheckMode & aNumMode, - TBool & aResult ) const - { - SMC_MOCK_METHOD2( TInt, TEmerNumberCheckMode &, aNumMode, - TBool &, aResult ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CheckEmergencyNumber -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::CheckEmergencyNumber( - TRequestStatus & aStatus, - TEmerNumberCheckMode & aNumMode, - TBool & aResult ) - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - TEmerNumberCheckMode &, aNumMode, - TBool &, aResult ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ClearCallBlackList -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ClearCallBlackList( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ClearCallBlackList -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::ClearCallBlackList( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SsAdditionalInfoNotification -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SsAdditionalInfoNotification( - TRequestStatus & aStatus, - TSsAdditionalInfo & aSsAdditionalInfo ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TSsAdditionalInfo &, aSsAdditionalInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SsRequestCompleteNotification -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SsRequestCompleteNotification( - TRequestStatus & aStatus, - TInt & aSsStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TInt &, aSsStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyPndCacheReady -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyPndCacheReady( - TRequestStatus & aStatus, - TName & aPndName ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TName &, aPndName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetPndCacheStatus -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetPndCacheStatus( - TRequestStatus & aStatus, - RMmCustomAPI::TPndCacheStatus & aPndStatus, - const TName & aPndName ) const - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - RMmCustomAPI::TPndCacheStatus &, aPndStatus, - const TName &, aPndName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetOperatorName -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetOperatorName( - TRequestStatus & aStatus, - TOperatorNameInfo & aOperatorNameInfo ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TOperatorNameInfo &, aOperatorNameInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetProgrammableOperatorLogo -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetProgrammableOperatorLogo( - TRequestStatus & aStatus, - TOperatorId & aOperatorId, - TOperatorLogo & aLogo ) - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - TOperatorId &, aOperatorId, - TOperatorLogo &, aLogo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyProgrammableOperatorLogoChange -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyProgrammableOperatorLogoChange( - TRequestStatus & aStatus, - TOperatorId & aOperatorId ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TOperatorId &, aOperatorId ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SatRefreshCompleteNotification -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SatRefreshCompleteNotification( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifySsNetworkEvent -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifySsNetworkEvent( - TRequestStatus & aStatus, - TSsTypeAndMode & aSsTypeAndMode, - TSsInfo & aSsInfo ) - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - TSsTypeAndMode &, aSsTypeAndMode, - TSsInfo &, aSsInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CancelUssdSession -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::CancelUssdSession( ) const - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CancelUssdSession -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::CancelUssdSession( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CheckTwoDigitDialSupport -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::CheckTwoDigitDialSupport( - TTwoDigitDialSupport & aSupport ) const - { - SMC_MOCK_METHOD1( TInt, TTwoDigitDialSupport &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::CheckTwoDigitDialSupport -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::CheckTwoDigitDialSupport( - TRequestStatus & aStatus, - TTwoDigitDialSupport & aSupport ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TTwoDigitDialSupport &, aSupport ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ResetNetServer -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ResetNetServer( ) const - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ResetNetServer -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ResetNetServer( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ReleaseFile -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ReleaseFile( - TRequestStatus & aStatus, - const TDesC & aFileName ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TDesC &, aFileName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::RestartFile -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::RestartFile( - TRequestStatus & aStatus, - const TDesC & aFileName ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TDesC &, aFileName ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::StartSimCbTopicBrowsing -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::StartSimCbTopicBrowsing( ) - { - SMC_MOCK_METHOD0( TInt ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetNextSimCbTopic -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetNextSimCbTopic( - TSimCbTopic & aSimCbTopic ) - { - SMC_MOCK_METHOD1( TInt, TSimCbTopic &, aSimCbTopic ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetNextSimCbTopic -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetNextSimCbTopic( - TRequestStatus & aStatus, - TSimCbTopic & aSimCbTopic ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TSimCbTopic &, aSimCbTopic ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::DeleteSimCbTopic -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::DeleteSimCbTopic( - const TUint & aSimCbTopicNumber ) - { - SMC_MOCK_METHOD1( TInt, const TUint &, aSimCbTopicNumber ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::DeleteSimCbTopic -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::DeleteSimCbTopic( - TRequestStatus & aStatus, - const TUint & aSimCbTopicNumber ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TUint &, aSimCbTopicNumber ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyNetworkConnectionFailure -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyNetworkConnectionFailure( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SendAPDUReq -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::SendAPDUReq( - TApdu & anAPDUReq ) - { - SMC_MOCK_METHOD1( TInt, TApdu &, anAPDUReq ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SendAPDUReq -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SendAPDUReq( - TRequestStatus & aStatus, - TApdu & anAPDUReq ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TApdu &, anAPDUReq ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::DisablePhoneLock -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::DisablePhoneLock( - TRequestStatus & aStatus, - RMobilePhone::TMobilePassword & aVerifyCode ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - RMobilePhone::TMobilePassword &, aVerifyCode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyEGprsInfoChange -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyEGprsInfoChange( - TRequestStatus & aStatus, - TDes8 & aGprsInfo ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDes8 &, aGprsInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetEGprsInfo -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetEGprsInfo( - TRequestStatus & aStatus, - TDes8 & aGprsInfo ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDes8 &, aGprsInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ReadSimFile -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ReadSimFile( - TRequestStatus & aStatus, - TDes8 & aSimFileInfo, - TDes8 & aResponseBytes ) const - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - TDes8 &, aSimFileInfo, - TDes8 &, aResponseBytes ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetLifeTime -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetLifeTime( - TDes8 & aLifeTimeInfo ) const - { - SMC_MOCK_METHOD1( TInt, TDes8 &, aLifeTimeInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetLifeTime -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetLifeTime( - TRequestStatus & aStatus, - TDes8 & aLifeTimeInfo ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDes8 &, aLifeTimeInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::Get3GPBInfo -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::Get3GPBInfo( - TRequestStatus & aStatus, - T3GPBInfo & aInfo ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - T3GPBInfo &, aInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetSystemNetworkModes -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetSystemNetworkModes( - TUint32 & aSupportedNetworkModes ) const - { - SMC_MOCK_METHOD1( TInt, TUint32 &, aSupportedNetworkModes ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetSystemNetworkModes -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetSystemNetworkModes( - TRequestStatus & aStatus, - TUint32 & aSupportedNetworkModes ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TUint32 &, aSupportedNetworkModes ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetSystemNetworkMode -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::SetSystemNetworkMode( - const TNetworkModeCaps aNetworkMode ) - { - SMC_MOCK_METHOD1( TInt, const TNetworkModeCaps, aNetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetSystemNetworkMode -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SetSystemNetworkMode( - TRequestStatus & aStatus, - const TNetworkModeCaps aNetworkMode ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - const TNetworkModeCaps, aNetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetCurrentSystemNetworkModes -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetCurrentSystemNetworkModes( - TUint32 & aCurrentNetworkModes ) const - { - SMC_MOCK_METHOD1( TInt, TUint32 &, aCurrentNetworkModes ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetCurrentSystemNetworkModes -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetCurrentSystemNetworkModes( - TRequestStatus & aStatus, - TUint32 & aCurrentNetworkModes ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TUint32 &, aCurrentNetworkModes ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetSystemNetworkBand -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::GetSystemNetworkBand( - TBandSelection & aSupportedNetworkBand, - TNetworkModeCaps & aNetworkMode ) const - { - SMC_MOCK_METHOD2( TInt, TBandSelection &, aSupportedNetworkBand, - TNetworkModeCaps &, aNetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetSystemNetworkBand -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetSystemNetworkBand( - TRequestStatus & aStatus, - TBandSelection & aSupportedNetworkBand, - TNetworkModeCaps & aNetworkMode ) const - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - TBandSelection &, aSupportedNetworkBand, - TNetworkModeCaps &, aNetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetSystemNetworkBand -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::SetSystemNetworkBand( - const TBandSelection aNetworkBand, - const TNetworkModeCaps aNetworkMode ) - { - SMC_MOCK_METHOD2( TInt, const TBandSelection, aNetworkBand, - const TNetworkModeCaps, aNetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetSystemNetworkBand -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SetSystemNetworkBand( - TRequestStatus & aStatus, - const TBandSelection aNetworkBand, - const TNetworkModeCaps aNetworkMode ) - { - SMC_MOCK_METHOD3( void, TRequestStatus &, aStatus, - const TBandSelection, aNetworkBand, - const TNetworkModeCaps, aNetworkMode ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::PowerSimOn -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::PowerSimOn( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::PowerSimOff -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::PowerSimOff( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SimWarmReset -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SimWarmReset( - TRequestStatus & aStatus ) - { - SMC_MOCK_METHOD1( void, TRequestStatus &, aStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SendAPDUReq -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SendAPDUReq( - TRequestStatus & aStatus, - TApduParameters & aParams ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TApduParameters &, aParams ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetATR -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetATR( - TRequestStatus & aStatus, - TDes8 & aATR ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDes8 &, aATR ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetSimCardReaderStatus -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetSimCardReaderStatus( - TRequestStatus & aStatus, - TSimCardReaderStatus & aCardReaderStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TSimCardReaderStatus &, aCardReaderStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifySimCardStatus -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifySimCardStatus( - TRequestStatus & aStatus, - TSIMCardStatus & aCardStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TSIMCardStatus &, aCardStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetWlanSimAuthenticationData -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetWlanSimAuthenticationData( - TRequestStatus & aReqStatus, - TDes8 & aAuthenticationData ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aReqStatus, - TDes8 &, aAuthenticationData ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::SetSimMessageStatusRead -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::SetSimMessageStatusRead( - TTime & aTime, - TInt & aTimezoneDiff ) const - { - SMC_MOCK_METHOD2( void, TTime &, aTime, - TInt &, aTimezoneDiff ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::WriteViagHomeZoneUHZIUESettings -// ----------------------------------------------------------------------------- -// -TInt RMmCustomAPI::WriteViagHomeZoneUHZIUESettings( - TViagUHZIUESettings & aSettings ) const - { - SMC_MOCK_METHOD1( TInt, TViagUHZIUESettings &, aSettings ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::WriteViagHomeZoneUHZIUESettings -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::WriteViagHomeZoneUHZIUESettings( - TRequestStatus & aStatus, - TViagUHZIUESettings & aSettings ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TViagUHZIUESettings &, aSettings ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::ReadHSxPAStatus -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::ReadHSxPAStatus( - TRequestStatus & aStatus, - THSxPAStatus & aHSxPAStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - THSxPAStatus &, aHSxPAStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::WriteHSxPAStatus -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::WriteHSxPAStatus( - TRequestStatus & aStatus, - THSxPAStatus & aHSxPAStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - THSxPAStatus &, aHSxPAStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyHSxPAStatus -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyHSxPAStatus( - TRequestStatus & aStatus, - THSxPAStatus & aHSxPAStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - THSxPAStatus &, aHSxPAStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetIccCallForwardingIndicatorStatus -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetIccCallForwardingIndicatorStatus( - TRequestStatus & aReqStatus, - TDes8 & aCFIndicators ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aReqStatus, - TDes8 &, aCFIndicators ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyIccCallForwardingStatusChange -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyIccCallForwardingStatusChange( - TRequestStatus & aReqStatus, - TDes8 & aCFIndicators ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aReqStatus, - TDes8 &, aCFIndicators ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetCellInfo -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetCellInfo( - TRequestStatus & aStatus, - TDes8 & aCellInfo ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDes8 &, aCellInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyCellInfoChange -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyCellInfoChange( - TRequestStatus & aStatus, - TDes8 & aCellInfo ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TDes8 &, aCellInfo ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::GetUSIMServiceSupport -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::GetUSIMServiceSupport( - TRequestStatus & aStatus, - TAppSupport & aParams ) const - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TAppSupport &, aParams ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::NotifyRemoteAlertingToneStatusChange -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::NotifyRemoteAlertingToneStatusChange( - TRequestStatus & aStatus, - TRemoteAlertingToneStatus & aToneStatus ) - { - SMC_MOCK_METHOD2( void, TRequestStatus &, aStatus, - TRemoteAlertingToneStatus &, aToneStatus ) - } - - -// ----------------------------------------------------------------------------- -// RMmCustomAPI::Destruct -// ----------------------------------------------------------------------------- -// -void RMmCustomAPI::Destruct( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_secui.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_secui.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// TSecUi::TSecUi -// ----------------------------------------------------------------------------- -// -TSecUi::TSecUi( ) - { - - } - - -// ----------------------------------------------------------------------------- -// TSecUi::ConstructL -// ----------------------------------------------------------------------------- -// -void TSecUi::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// TSecUi::InitializeLibL -// ----------------------------------------------------------------------------- -// -void TSecUi::InitializeLibL( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// TSecUi::UnInitializeLib -// ----------------------------------------------------------------------------- -// -void TSecUi::UnInitializeLib( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// TSecUi::CanBeFreed -// ----------------------------------------------------------------------------- -// -TBool TSecUi::CanBeFreed( ) - { - SMC_MOCK_METHOD0( TBool ) - } - - -// ----------------------------------------------------------------------------- -// TSecUi::IncreaseClientCount -// ----------------------------------------------------------------------------- -// -void TSecUi::IncreaseClientCount( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// TSecUi::DecreaseClientCount -// ----------------------------------------------------------------------------- -// -void TSecUi::DecreaseClientCount( ) - { - SMC_MOCK_METHOD0( void ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_secuimanualsecuritysettings.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_secuimanualsecuritysettings.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +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 "secuimanualsecuritysettings.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::CManualSecuritySettings -// ----------------------------------------------------------------------------- -// -CManualSecuritySettings::CManualSecuritySettings( ) - //: - //CBase( /**/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::ConstructL -// ----------------------------------------------------------------------------- -// -void CManualSecuritySettings::ConstructL( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::NewL -// ----------------------------------------------------------------------------- -// -CManualSecuritySettings * CManualSecuritySettings::NewL( ) - { - SMC_MOCK_NEWL0( CManualSecuritySettings * ) - - CManualSecuritySettings* self = new( ELeave ) CManualSecuritySettings; - CleanupStack::PushL( self ); - //self->ConstructL() - CleanupStack::Pop( self ); - return self; - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::~CManualSecuritySettings -// ----------------------------------------------------------------------------- -// -CManualSecuritySettings::~CManualSecuritySettings( ) - { - - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::ChangePinL -// ----------------------------------------------------------------------------- -// -TBool CManualSecuritySettings::ChangePinL( - TPin aPin, - const TDesC & aOld, - const TDesC & aNew, - const TDesC & aVerifyNew ) - { - SMC_MOCK_METHOD4( TBool, TPin, aPin, - const TDesC &, aOld, - const TDesC &, aNew, - const TDesC &, aVerifyNew ) - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::CancelChangePin -// ----------------------------------------------------------------------------- -// -void CManualSecuritySettings::CancelChangePin( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::UnblockPinL -// ----------------------------------------------------------------------------- -// -TBool CManualSecuritySettings::UnblockPinL( - TPin aPin, - const TDesC & aPuk, - const TDesC & aNew, - const TDesC & aVerifyNew ) - { - SMC_MOCK_METHOD4( TBool, TPin, aPin, - const TDesC &, aPuk, - const TDesC &, aNew, - const TDesC &, aVerifyNew ) - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::CancelUnblockPin -// ----------------------------------------------------------------------------- -// -void CManualSecuritySettings::CancelUnblockPin( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::LockSimL -// ----------------------------------------------------------------------------- -// -TBool CManualSecuritySettings::LockSimL( - const TDesC & aLockCode, - const TDesC & aType ) - { - SMC_MOCK_METHOD2( TBool, const TDesC &, aLockCode, - const TDesC &, aType ) - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::CancelLockSim -// ----------------------------------------------------------------------------- -// -void CManualSecuritySettings::CancelLockSim( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::UnlockSimL -// ----------------------------------------------------------------------------- -// -TBool CManualSecuritySettings::UnlockSimL( - const TDesC & aUnlockCode, - const TDesC & aType ) - { - SMC_MOCK_METHOD2( TBool, const TDesC &, aUnlockCode, - const TDesC &, aType ) - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::CancelUnlockSim -// ----------------------------------------------------------------------------- -// -void CManualSecuritySettings::CancelUnlockSim( ) - { - SMC_MOCK_METHOD0( void ) - } - - -// ----------------------------------------------------------------------------- -// CManualSecuritySettings::ShowResultNoteL -// ----------------------------------------------------------------------------- -// -void CManualSecuritySettings::ShowResultNoteL( - CAknNoteDialog::TTone aTone, - TInt aResourceID ) - { - SMC_MOCK_METHOD2( void, CAknNoteDialog::TTone, aTone, - TInt, aResourceID ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_simcontrolkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_simcontrolkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +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 "simcontrolkeysequencehandler.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// SimControlKeySequenceHandler::SimControlKeySequenceHandler -// ----------------------------------------------------------------------------- -// -SimControlKeySequenceHandler::SimControlKeySequenceHandler( - QObject * parent ) - : - KeySequenceHandler( parent ) - { - - } - - -// ----------------------------------------------------------------------------- -// SimControlKeySequenceHandler::~SimControlKeySequenceHandler -// ----------------------------------------------------------------------------- -// -SimControlKeySequenceHandler::~SimControlKeySequenceHandler( ) - { - - } - - -// ----------------------------------------------------------------------------- -// SimControlKeySequenceHandler::executeKeySequence -// ----------------------------------------------------------------------------- -// -bool SimControlKeySequenceHandler::executeKeySequence( - const QString & keySequence ) - { - SMC_MOCK_METHOD1( bool, const QString &, keySequence ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_tstasksettings.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_tstasksettings.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +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 the License "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 - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// TsTaskSettings::TsTaskSettings -// ----------------------------------------------------------------------------- -// -TsTaskSettings::TsTaskSettings( ) - { - - } - - -// ----------------------------------------------------------------------------- -// TsTaskSettings::~TsTaskSettings -// ----------------------------------------------------------------------------- -// -TsTaskSettings::~TsTaskSettings( ) - { - - } - - -// ----------------------------------------------------------------------------- -// TsTaskSettings::registerScreenshot -// ----------------------------------------------------------------------------- -// -bool TsTaskSettings::registerScreenshot( - const QPixmap & screenshot ) - { - SMC_MOCK_METHOD1( bool, const QPixmap &, screenshot ) - } - - -// ----------------------------------------------------------------------------- -// TsTaskSettings::unregisterScreenshot -// ----------------------------------------------------------------------------- -// -bool TsTaskSettings::unregisterScreenshot( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// TsTaskSettings::setVisibility -// ----------------------------------------------------------------------------- -// -bool TsTaskSettings::setVisibility( bool Visibility ) - { - SMC_MOCK_METHOD0( bool ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_xqaiwrequest.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_xqaiwrequest.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,326 +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 "xqaiwrequest.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQAiwRequest::XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::XQAiwRequest( - const XQAiwInterfaceDescriptor & descriptor, - const QString & operation, - bool embedded ) - : - QObject() - { - Q_UNUSED(descriptor) - Q_UNUSED(operation) - Q_UNUSED(embedded) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::XQAiwRequest( - const QUrl & uri, - const XQAiwInterfaceDescriptor & descriptor, - const QString & operation ) - : - QObject( ) - { - Q_UNUSED(uri) - Q_UNUSED(descriptor) - Q_UNUSED(operation) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::XQAiwRequest( - const QFile & file, - const XQAiwInterfaceDescriptor & descriptor, - const QString & operation ) - : - QObject() - { - Q_UNUSED(file) - Q_UNUSED(descriptor) - Q_UNUSED(operation) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::XQAiwRequest( - const XQSharableFile & file, - const XQAiwInterfaceDescriptor & descriptor, - const QString & operation ) - : - QObject() - { - Q_UNUSED(file) - Q_UNUSED(descriptor) - Q_UNUSED(operation) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::~XQAiwRequest -// ----------------------------------------------------------------------------- -// -XQAiwRequest::~XQAiwRequest( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::createAction -// ----------------------------------------------------------------------------- -// -QAction * XQAiwRequest::createAction( ) - { - SMC_MOCK_METHOD0( QAction * ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setArguments -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setArguments( - const QList & arguments ) - { - SMC_MOCK_METHOD1( void, const QList &, arguments ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::lastError -// ----------------------------------------------------------------------------- -// -int XQAiwRequest::lastError( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::lastErrorMessage -// ----------------------------------------------------------------------------- -// -const QString & XQAiwRequest::lastErrorMessage( ) const - { - SMC_MOCK_METHOD0( const QString & ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::descriptor -// ----------------------------------------------------------------------------- -// -const XQAiwInterfaceDescriptor & XQAiwRequest::descriptor( ) const - { - SMC_MOCK_METHOD0( const XQAiwInterfaceDescriptor & ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::send -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::send( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::send -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::send( - QVariant & returnValue ) - { - SMC_MOCK_METHOD1( bool, QVariant &, returnValue ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setEmbedded -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setEmbedded( - bool embedded ) - { - SMC_MOCK_METHOD1( void, bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::isEmbedded -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::isEmbedded( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setOperation -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setOperation( - const QString & operation ) - { - SMC_MOCK_METHOD1( void, const QString &, operation ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::operation -// ----------------------------------------------------------------------------- -// -const QString & XQAiwRequest::operation( ) const - { - SMC_MOCK_METHOD0( const QString & ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setSynchronous -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setSynchronous( - bool synchronous ) - { - SMC_MOCK_METHOD1( void, bool, synchronous ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::isSynchronous -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::isSynchronous( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setBackground -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setBackground( - bool background ) - { - SMC_MOCK_METHOD1( void, bool, background ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::isBackground -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::isBackground( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::setInfo -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::setInfo( - const XQRequestInfo & requestInfo ) - { - SMC_MOCK_METHOD1( void, const XQRequestInfo &, requestInfo ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::info -// ----------------------------------------------------------------------------- -// -XQRequestInfo XQAiwRequest::info( ) const - { - SMC_MOCK_METHOD0( XQRequestInfo ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::results -// ----------------------------------------------------------------------------- -// -const QVariant & XQAiwRequest::results( ) const - { - SMC_MOCK_METHOD0( const QVariant & ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::sendExecute -// ----------------------------------------------------------------------------- -// -bool XQAiwRequest::sendExecute( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::handleAsyncResponse -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::handleAsyncResponse(const QVariant& value) -{ - Q_UNUSED(value); -} - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::sendFromAction -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::sendFromAction(bool checked) -{ - Q_UNUSED(checked); -} - - -// ----------------------------------------------------------------------------- -// XQAiwRequest::handleAsyncError -// ----------------------------------------------------------------------------- -// -void XQAiwRequest::handleAsyncError(int err) -{ - Q_UNUSED(err); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_xqappmgr.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_xqappmgr.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,299 +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 "xqappmgr.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQApplicationManager::XQApplicationManager -// ----------------------------------------------------------------------------- -// -XQApplicationManager::XQApplicationManager( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::~XQApplicationManager -// ----------------------------------------------------------------------------- -// -XQApplicationManager::~XQApplicationManager( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QString & interface, - const QString & operation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const QString &, interface, - const QString &, operation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const XQAiwInterfaceDescriptor & implementation, - const QString & operation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const XQAiwInterfaceDescriptor &, implementation, - const QString &, operation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QString & service, - const QString & interface, - const QString & operation, - bool embedded ) - { - SMC_MOCK_METHOD4( XQAiwRequest *, const QString &, service, - const QString &, interface, - const QString &, operation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const QString & interface, - const QString & operation ) - { - SMC_MOCK_METHOD2( QList , const QString &, interface, - const QString &, operation ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const QString & service, - const QString & interface, - const QString & operation ) - { - SMC_MOCK_METHOD3( QList , const QString &, service, - const QString &, interface, - const QString &, operation ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QUrl & url, - bool embedded ) - { - SMC_MOCK_METHOD2( XQAiwRequest *, const QUrl &, url, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QUrl & url, - const XQAiwInterfaceDescriptor & implementation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const QUrl &, url, - const XQAiwInterfaceDescriptor &, implementation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QFile & file, - bool embedded ) - { - SMC_MOCK_METHOD2( XQAiwRequest *, const QFile &, file, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const QFile & file, - const XQAiwInterfaceDescriptor & implementation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const QFile &, file, - const XQAiwInterfaceDescriptor &, implementation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const QUrl & uri ) - { - SMC_MOCK_METHOD1( QList , const QUrl &, uri ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const QFile & file ) - { - SMC_MOCK_METHOD1( QList , const QFile &, file ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::list -// ----------------------------------------------------------------------------- -// -QList XQApplicationManager::list( - const XQSharableFile & file ) - { - SMC_MOCK_METHOD1( QList , const XQSharableFile &, file ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const XQSharableFile & file, - bool embedded ) - { - SMC_MOCK_METHOD2( XQAiwRequest *, const XQSharableFile &, file, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::create -// ----------------------------------------------------------------------------- -// -XQAiwRequest * XQApplicationManager::create( - const XQSharableFile & file, - const XQAiwInterfaceDescriptor & implementation, - bool embedded ) - { - SMC_MOCK_METHOD3( XQAiwRequest *, const XQSharableFile &, file, - const XQAiwInterfaceDescriptor &, implementation, - bool, embedded ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::lastError -// ----------------------------------------------------------------------------- -// -int XQApplicationManager::lastError( ) const - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::isRunning -// ----------------------------------------------------------------------------- -// -bool XQApplicationManager::isRunning( - const XQAiwInterfaceDescriptor & implementation ) const - { - SMC_MOCK_METHOD1( bool, const XQAiwInterfaceDescriptor &, implementation ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::getDrmAttributes -// ----------------------------------------------------------------------------- -// -bool XQApplicationManager::getDrmAttributes( - const QFile & file, - const QList & attributeNames, - QVariantList & attributeValues ) - { - SMC_MOCK_METHOD3( bool, const QFile &, file, - const QList &, attributeNames, - QVariantList &, attributeValues ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::getDrmAttributes -// ----------------------------------------------------------------------------- -// -bool XQApplicationManager::getDrmAttributes( - const XQSharableFile & file, - const QList & attributeNames, - QVariantList & attributeValues ) - { - SMC_MOCK_METHOD3( bool, const XQSharableFile &, file, - const QList &, attributeNames, - QVariantList &, attributeValues ) - } - - -// ----------------------------------------------------------------------------- -// XQApplicationManager::status -// ----------------------------------------------------------------------------- -// -XQApplicationManager::ServiceStatus XQApplicationManager::status( - const XQAiwInterfaceDescriptor & implementation ) - { - SMC_MOCK_METHOD1( ServiceStatus, const XQAiwInterfaceDescriptor &, implementation ) - } - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/mock_xqservicerequest.cpp --- a/telutils/keysequencerecognitionservice/tsrc/shared/mock_xqservicerequest.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,284 +0,0 @@ -/* -* 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: -* -*/ -#include -#include -#include -#include -#include - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// XQServiceRequest::XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::XQServiceRequest( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::XQServiceRequest( - const QString & service, - const QString & message, - const bool & synchronous ) - { - Q_UNUSED(service) - Q_UNUSED(message) - Q_UNUSED(synchronous) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::XQServiceRequest( - const XQServiceRequest & orig ) - { - Q_UNUSED(orig) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::XQServiceRequest( - const XQAiwInterfaceDescriptor & descriptor, - const QString & message, - const bool & synchronous ) - { - Q_UNUSED(descriptor) - Q_UNUSED(message) - Q_UNUSED(synchronous) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::~XQServiceRequest -// ----------------------------------------------------------------------------- -// -XQServiceRequest::~XQServiceRequest( ) - { - - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::send -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::send( ) - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::send -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::send( - QVariant & retValue ) - { - SMC_MOCK_METHOD1( bool, QVariant &, retValue ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::isNull -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::isNull( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setSynchronous -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setSynchronous( - const bool & synchronous ) - { - SMC_MOCK_METHOD1( void, const bool &, synchronous ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::isSynchronous -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::isSynchronous( ) const - { - SMC_MOCK_METHOD0( bool ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setService -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setService( - const QString & service ) - { - SMC_MOCK_METHOD1( void, const QString &, service ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::service -// ----------------------------------------------------------------------------- -// -QString XQServiceRequest::service( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setMessage -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setMessage( - const QString & message ) - { - SMC_MOCK_METHOD1( void, const QString &, message ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::message -// ----------------------------------------------------------------------------- -// -QString XQServiceRequest::message( ) const - { - SMC_MOCK_METHOD0( QString ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::arguments -// ----------------------------------------------------------------------------- -// -const QList & XQServiceRequest::arguments( ) const - { - SMC_MOCK_METHOD0( const QList & ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setArguments -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setArguments( - const QList & arguments ) - { - SMC_MOCK_METHOD1( void, const QList &, arguments ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::latestError -// ----------------------------------------------------------------------------- -// -int XQServiceRequest::latestError( ) - { - SMC_MOCK_METHOD0( int ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::setInfo -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::setInfo( - const XQRequestInfo & requestInfo ) - { - SMC_MOCK_METHOD1( void, const XQRequestInfo &, requestInfo ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::info -// ----------------------------------------------------------------------------- -// -XQRequestInfo XQServiceRequest::info( ) const - { - SMC_MOCK_METHOD0( XQRequestInfo ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::= -// ----------------------------------------------------------------------------- -// -XQServiceRequest & XQServiceRequest::operator=( - const XQServiceRequest & orig ) - { - SMC_MOCK_METHOD1( XQServiceRequest &, const XQServiceRequest &, orig ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::serializeArguments -// ----------------------------------------------------------------------------- -// -QByteArray XQServiceRequest::serializeArguments( - const XQServiceRequest & request ) - { - SMC_MOCK_METHOD1( QByteArray, const XQServiceRequest &, request ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::deserializeArguments -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::deserializeArguments( - XQServiceRequest & request, - const QByteArray & data ) - { - SMC_MOCK_METHOD2( void, XQServiceRequest &, request, - const QByteArray &, data ) - } - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::addArg -// ----------------------------------------------------------------------------- -// -void XQServiceRequest::addArg(const QVariant& v) -{ - Q_UNUSED(v) -} - - -// ----------------------------------------------------------------------------- -// XQServiceRequest::handleSharableFileArgs -// ----------------------------------------------------------------------------- -// -bool XQServiceRequest::handleSharableFileArgs() -{ - SMC_MOCK_METHOD0( bool ) -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/shared/qtestmains60.h --- a/telutils/keysequencerecognitionservice/tsrc/shared/qtestmains60.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +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 QTESTMAINS60 -#define QTESTMAINS60 - -#define QTEST_MAIN_S60(TestObject) \ -int main(int argc, char *argv[]) \ -{ \ -char *new_argv[3]; \ -QCoreApplication app(argc, argv); \ -\ -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(); \ -\ -TestObject tc; \ -return QTest::qExec(&tc, 3, new_argv); \ -} - -#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_imeikeysequencehandler/ut_imeikeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/ut_imeikeysequencehandler/ut_imeikeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include -#include -#include "ut_imeikeysequencehandler.h" -#include "imeikeysequencehandler.h" -#include "keysequencerecognitionservicedefs.h" -#include "qtestmains60.h" - -QTM_USE_NAMESPACE - -UT_ImeiKeySequenceHandler::UT_ImeiKeySequenceHandler() - : - m_handler(0) -{ - -} - - -UT_ImeiKeySequenceHandler::~UT_ImeiKeySequenceHandler() -{ - delete m_handler; -} - - -void UT_ImeiKeySequenceHandler::init() -{ - initialize(); - - m_handler = new ImeiKeySequenceHandler(); -} - - -void UT_ImeiKeySequenceHandler::cleanup() -{ - reset(); - - delete m_handler; - m_handler = 0; -} - - -void UT_ImeiKeySequenceHandler::t_keySequenceValidator() -{ - expect("KeySequenceHandler::setKeySequenceValidator") - .with(QRegExp::escape(KCodeImei)); - - QScopedPointer handler( - new ImeiKeySequenceHandler()); - - QVERIFY(verify()); -} - - -void UT_ImeiKeySequenceHandler::t_executeValidKeySequence() -{ - const QString KSerialNumber = "1234567890"; - EXPECT(QtMobility::QSystemDeviceInfo, imei).returns(KSerialNumber); - EXPECT(HbDeviceMessageBox, setTimeout).with(HbPopup::NoTimeout); - EXPECT(HbDeviceMessageBox, show); - bool handled = m_handler->executeKeySequence(KCodeImei); - QCOMPARE(handled, true); - QVERIFY(verify()); -} - - -void UT_ImeiKeySequenceHandler::t_executeInvalidKeySequence() -{ - const QString KUnknownSequence("123"); - bool handled = m_handler->executeKeySequence(KUnknownSequence); - QCOMPARE(handled, false); -} - -QTEST_MAIN_S60(UT_ImeiKeySequenceHandler) diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_imeikeysequencehandler/ut_imeikeysequencehandler.h --- a/telutils/keysequencerecognitionservice/tsrc/ut_imeikeysequencehandler/ut_imeikeysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_IMEIKEYSEQUENCEHANDLER_H -#define UT_IMEIKEYSEQUENCEHANDLER_H - -#include -#include - -class ImeiKeySequenceHandler; - -class UT_ImeiKeySequenceHandler : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_ImeiKeySequenceHandler(); - ~UT_ImeiKeySequenceHandler(); - -private slots: - - void init(); - void cleanup(); - - void t_keySequenceValidator(); - void t_executeValidKeySequence(); - void t_executeInvalidKeySequence(); - -private: - ImeiKeySequenceHandler *m_handler; -}; - -#endif // UT_IMEIKEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_imeikeysequencehandler/ut_imeikeysequencehandler.pro --- a/telutils/keysequencerecognitionservice/tsrc/ut_imeikeysequencehandler/ut_imeikeysequencehandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -MOC_DIR = moc -CONFIG += hb qtestlib -DEFINES += QT_NO_DEBUG_STREAM -DEFINES += QT_BUILD_SYSINFO_LIB QT_MAKEDLL - -QT -= gui - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += . ../shared ../../inc - - HEADERS += ../../inc/imeikeysequencehandler.h - SOURCES += ../../src/imeikeysequencehandler.cpp - - HEADERS += ut_imeikeysequencehandler.h - SOURCES += ut_imeikeysequencehandler.cpp - - #MOCKED DEPENDENCIES - HEADERS += \ - ../../inc/keysequencehandler.h \ - /epoc32/include/mw/qsysteminfo.h - SOURCES += \ - ../shared/mock_keysequencehandler.cpp \ - ../shared/mock_qsysteminfo.cpp \ - ../shared/mock_hbdevicemessagebox.cpp - - LIBS += -lmocklib -lsymbianmock -lxqserviceutil -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_keysequencehandler/ut_keysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/ut_keysequencehandler/ut_keysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include "ut_keysequencehandler.h" -#include "keysequencehandler.h" -#include "qtestmains60.h" - -bool TestClassDriver::executeKeySequence(const QString &keySequence) -{ - Q_UNUSED(keySequence) - return true; -} - -void TestClassDriver::setKeySequenceValidator(const QString &validator) -{ - KeySequenceHandler::setKeySequenceValidator(validator); -} - -UT_KeySequenceHandler::UT_KeySequenceHandler() - : - m_handler(0) -{ - -} - -UT_KeySequenceHandler::~UT_KeySequenceHandler() -{ - -} - -void UT_KeySequenceHandler::init() -{ - initialize(); - - m_handler = new TestClassDriver(); -} - -void UT_KeySequenceHandler::cleanup() -{ - reset(); - - delete m_handler; - m_handler = 0; -} - - -void UT_KeySequenceHandler::t_keySequenceValidator() -{ - QString validator = m_handler->keySequenceValidator(); - QCOMPARE(validator, QString("")); -} - - -void UT_KeySequenceHandler::t_setKeySequenceValidator() -{ - const QString KValidatorString = "123"; - m_handler->setKeySequenceValidator(KValidatorString); - QCOMPARE(m_handler->keySequenceValidator(), KValidatorString); -} - -QTEST_MAIN_S60(UT_KeySequenceHandler) diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_keysequencehandler/ut_keysequencehandler.h --- a/telutils/keysequencerecognitionservice/tsrc/ut_keysequencehandler/ut_keysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_KEYSEQUENCEHANDLER_H -#define UT_KEYSEQUENCEHANDLER_H - -#include -#include -#include "keysequencehandler.h" - -class TestClassDriver; - -class TestClassDriver : public KeySequenceHandler -{ -public: - bool executeKeySequence(const QString &keySequence); - void setKeySequenceValidator(const QString &validator); -}; - -class UT_KeySequenceHandler : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_KeySequenceHandler(); - ~UT_KeySequenceHandler(); - -private slots: - - void init(); - void cleanup(); - - void t_keySequenceValidator(); - void t_setKeySequenceValidator(); - -private: - TestClassDriver *m_handler; -}; - -#endif // UT_KEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_keysequencehandler/ut_keysequencehandler.pro --- a/telutils/keysequencerecognitionservice/tsrc/ut_keysequencehandler/ut_keysequencehandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -MOC_DIR = moc -CONFIG += hb qtestlib -DEFINES += QT_NO_DEBUG_STREAM - -QT -= gui - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += . ../shared ../../inc - - HEADERS += ../../inc/keysequencehandler.h - SOURCES += ../../src/keysequencehandler.cpp - - HEADERS += ut_keysequencehandler.h - SOURCES += ut_keysequencehandler.cpp - - LIBS += -lmocklib -lsymbianmock -lxqserviceutil -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprov.pro --- a/telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprov.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = ut_keysequencerecognitionprovider -CONFIG += hb qtestlib -MOC_DIR = moc -DEFINES += QT_NO_DEBUG_STREAM - -QT -= gui - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += . ../shared ../../inc - - HEADERS += ../../inc/keysequencerecognitionprovider.h - SOURCES += ../../src/keysequencerecognitionprovider.cpp - - HEADERS += ut_keysequencerecognitionprovider.h - SOURCES += ut_keysequencerecognitionprovider.cpp - - #MOCKED DEPENDENCIES - HEADERS += \ - ../../inc/keysequencehandler.h \ - ../../inc/imeikeysequencehandler.h \ - ../../inc/lifetimerkeysequencehandler.h \ - ../../inc/manufacturerkeysequencehandler.h \ - ../../inc/simcontrolkeysequencehandler.h - - SOURCES += \ - ../shared/mock_qtranslator.cpp \ - ../shared/mock_keysequencehandler.cpp \ - ../shared/mock_imeikeysequencehandler.cpp \ - ../shared/mock_lifetimerkeysequencehandler.cpp \ - ../shared/mock_manufacturerkeysequencehandler.cpp \ - ../shared/mock_simcontrolkeysequencehandler.cpp \ - ../shared/mock_centralrepository.cpp \ - ../shared/mock_tstasksettings.cpp - - LIBS += -lmocklib -lsymbianmock -lxqservice -lxqserviceutil -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprovider.cpp --- a/telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include -#include -#include "ut_keysequencerecognitionprovider.h" -#include "keysequencerecognitionprovider.h" -#include "keysequencehandler.h" -#include "qtestmains60.h" - -void QCoreApplication::installTranslator(QTranslator * messageFile) -{ - SMC_MOCK_METHOD1( void, QTranslator *, messageFile) -} - - -UT_KeySequenceRecognitionProvider::UT_KeySequenceRecognitionProvider() - : - m_provider(0) -{ - -} - - -UT_KeySequenceRecognitionProvider::~UT_KeySequenceRecognitionProvider() -{ - delete m_provider; -} - - -void UT_KeySequenceRecognitionProvider::init() -{ - initialize(); - QT_TRAP_THROWING(SmcDefaultValue::SetL(QString(""))) - - m_provider = new KeySequenceRecognitionProvider(); -} - - -void UT_KeySequenceRecognitionProvider::cleanup() -{ - reset(); - SmcDefaultValue::Reset(); - - delete m_provider; - m_provider = 0; -} - - -void UT_KeySequenceRecognitionProvider::t_setupLocalization() -{ - // localization setup ok - EXPECT(QTranslator, load).returns(true); - EXPECT(QCoreApplication, installTranslator).times(1); - - QScopedPointer provider1( - new KeySequenceRecognitionProvider()); - - QVERIFY(verify()); - - // localization setup fails - EXPECT(QTranslator, load).returns(false); - EXPECT(QCoreApplication, installTranslator).times(0); - - QScopedPointer provider2( - new KeySequenceRecognitionProvider()); - - QVERIFY(verify()); -} - - -void UT_KeySequenceRecognitionProvider::t_keySequenceValidator() -{ - QString KExpectedValidator = "1|2|3"; - EXPECT(KeySequenceHandler, keySequenceValidator) - .returns(QString("1")); - EXPECT(KeySequenceHandler, keySequenceValidator) - .returns(QString("2")); - EXPECT(KeySequenceHandler, keySequenceValidator) - .returns(QString("3")); - - QString actualValidator = m_provider->keySequenceValidator(); - - QCOMPARE(actualValidator, KExpectedValidator); - QVERIFY(verify()); - - // second query should not require validator string construction again - EXPECT(KeySequenceHandler, keySequenceValidator).times(0); - actualValidator = m_provider->keySequenceValidator(); - QCOMPARE(actualValidator, KExpectedValidator); - QVERIFY(verify()); -} - - -void UT_KeySequenceRecognitionProvider::t_keySequenceValidatorEmptyString() -{ - QString KExpectedValidator = ""; - EXPECT(KeySequenceHandler, keySequenceValidator) - .returns(QString("")); - EXPECT(KeySequenceHandler, keySequenceValidator) - .returns(QString("")); - EXPECT(KeySequenceHandler, keySequenceValidator) - .returns(QString("")); - - QString actualValidator = m_provider->keySequenceValidator(); - - QCOMPARE(actualValidator, KExpectedValidator); - QVERIFY(verify()); -} - - -void UT_KeySequenceRecognitionProvider::t_executeValidKeySequence() -{ - QT_TRAP_THROWING(SmcDefaultValue::SetL(true)) - - bool handled = m_provider->executeKeySequence("123"); - - SmcDefaultValue::Reset(); - QCOMPARE(handled, true); - QVERIFY(verify()); -} - - -void UT_KeySequenceRecognitionProvider::t_executeInvalidKeySequence() -{ - bool handled = m_provider->executeKeySequence("123"); - - QCOMPARE(handled, false); -} - -QTEST_MAIN_S60(UT_KeySequenceRecognitionProvider) diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprovider.h --- a/telutils/keysequencerecognitionservice/tsrc/ut_keysequencerecognitionprovider/ut_keysequencerecognitionprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_KEYSEQUENCERECOGNITIONPROVIDER_H -#define UT_KEYSEQUENCERECOGNITIONPROVIDER_H - -#include -#include - -class KeySequenceRecognitionProvider; - -class UT_KeySequenceRecognitionProvider : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_KeySequenceRecognitionProvider(); - ~UT_KeySequenceRecognitionProvider(); - -private slots: - - void init(); - void cleanup(); - - void t_setupLocalization(); - void t_keySequenceValidator(); - void t_keySequenceValidatorEmptyString(); - void t_executeValidKeySequence(); - void t_executeInvalidKeySequence(); - -private: - KeySequenceRecognitionProvider *m_provider; -}; - -#endif // UT_KEYSEQUENCERECOGNITIONPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "ut_lifetimerkeysequencehandler.h" -#include "lifetimerkeysequencehandler.h" -#include "keysequencerecognitionservicedefs.h" -#include "telservicesinternalcrkeys.h" -#include "telservicesvariant.hrh" -#include "qtestmains60.h" - -void generateLeaveL() -{ - User::Leave(KErrUnknown); -} - -UT_LifeTimerKeySequenceHandler::UT_LifeTimerKeySequenceHandler() - : - m_handler(0) -{ - -} - - -UT_LifeTimerKeySequenceHandler::~UT_LifeTimerKeySequenceHandler() -{ - delete m_handler; -} - - -void UT_LifeTimerKeySequenceHandler::setLifeTimerData( - TUint32 aKey, - TInt & aValue ) -{ - if (KTelSrvVariationFlags == aKey) { - aValue = KTelSrvLVFlagLifeTimer; - } -} - - -void UT_LifeTimerKeySequenceHandler::setLifeTimeData( - TDes8& aLifeTimeInfo) -{ - RMmCustomAPI::TLifeTimeDataPckg &pckg = - reinterpret_cast(aLifeTimeInfo); - pckg.Copy(aLifeTimeInfo); - pckg().iHours = 999; - pckg().iMinutes = 59; -} - - -void UT_LifeTimerKeySequenceHandler::init() -{ - initialize(); - - m_handler = new LifeTimerKeySequenceHandler(); -} - - -void UT_LifeTimerKeySequenceHandler::cleanup() -{ - reset(); - - delete m_handler; - m_handler = 0; -} - - -void UT_LifeTimerKeySequenceHandler::t_constructionFails() -{ - EXPECT(CRepository, NewL).willOnce(invoke(generateLeaveL)); - - int result = 0; - QT_TRYCATCH_ERROR(result, - QScopedPointer handler( - new LifeTimerKeySequenceHandler()) - ) - QVERIFY(0 != result); -} - - -void UT_LifeTimerKeySequenceHandler::t_keySequenceValidator() -{ - // life timer feature enabled scenario - EXPECT(CRepository, Get) - .willOnce(invoke(this, setLifeTimerData)) - .returns(KErrNone); - expect("KeySequenceHandler::setKeySequenceValidator") - .with(QRegExp::escape(KCodeLifeTimer)); - - QScopedPointer handler1( - new LifeTimerKeySequenceHandler()); - - QVERIFY(verify()); - - // life timer feature not enabled scenario - EXPECT(CRepository, Get).returns(KErrNotFound); - expect("KeySequenceHandler::setKeySequenceValidator").times(0); - - QScopedPointer handler2( - new LifeTimerKeySequenceHandler()); - - QVERIFY(verify()); -} - - -void UT_LifeTimerKeySequenceHandler::t_executeValidKeySequence() -{ - EXPECT(CRepository, Get) - .willOnce(invoke(this, setLifeTimerData)) - .returns(KErrNone); - EXPECT(RMmCustomAPI, GetLifeTime) - .willOnce(invoke(this, setLifeTimeData)); - - EXPECT(HbDeviceMessageBox, setTimeout).with(HbPopup::NoTimeout); - EXPECT(HbDeviceMessageBox, show); - bool handled = m_handler->executeKeySequence(KCodeLifeTimer); - QCOMPARE(handled, true); - - QVERIFY(verify()); -} - - -void UT_LifeTimerKeySequenceHandler::t_executeInvalidKeySequence() -{ - const QString KUnknownSequence("123"); - bool handled = m_handler->executeKeySequence(KUnknownSequence); - QCOMPARE(handled, false); -} - - -void UT_LifeTimerKeySequenceHandler::t_executeKeySequenceEtelConnectionCreationFails() -{ - EXPECT(CRepository, Get) - .willOnce(invoke(this, setLifeTimerData)) - .returns(KErrNone); - EXPECT(RTelServer, Connect).willOnce(invoke(generateLeaveL)); - - int result = 0; - QT_TRYCATCH_ERROR(result, m_handler->executeKeySequence(KCodeLifeTimer)); - - QVERIFY(0 != result); - QVERIFY(verify()); -} - - -void UT_LifeTimerKeySequenceHandler::t_executeKeySequenceLifeTimeDataQueryFails() -{ - EXPECT(CRepository, Get) - .willOnce(invoke(this, setLifeTimerData)) - .returns(KErrNone); - EXPECT(RMmCustomAPI, GetLifeTime).returns(KErrArgument); - - bool handled = m_handler->executeKeySequence(KCodeLifeTimer); - - QCOMPARE(handled, true); - QVERIFY(verify()); -} - -QTEST_MAIN_S60(UT_LifeTimerKeySequenceHandler) diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.h --- a/telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_LIFETIMERKEYSEQUENCEHANDLER_H -#define UT_LIFETIMERKEYSEQUENCEHANDLER_H - -#include -#include -#include - -class LifeTimerKeySequenceHandler; - -class UT_LifeTimerKeySequenceHandler : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_LifeTimerKeySequenceHandler(); - ~UT_LifeTimerKeySequenceHandler(); - -private: - void setLifeTimerData( - TUint32 aKey, - TInt & aValue ); - void setMobilePhoneCount( - TInt & aNoOfPhones); - void setMobilePhoneInfo( - const TInt aIndex, - RTelServer::TPhoneInfo & aInfo ); - void setLifeTimeData( - TDes8& aLifeTimeInfo); - -private slots: - - void init(); - void cleanup(); - - void t_constructionFails(); - void t_keySequenceValidator(); - void t_executeValidKeySequence(); - void t_executeInvalidKeySequence(); - void t_executeKeySequenceEtelConnectionCreationFails(); - void t_executeKeySequenceLifeTimeDataQueryFails(); - -private: - LifeTimerKeySequenceHandler *m_handler; -}; - -#endif // UT_LIFETIMERKEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.pro --- a/telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = -INCLUDEPATH += ../../../../inc - -MOC_DIR = moc -CONFIG += hb qtestlib -DEFINES += QT_NO_DEBUG_STREAM - -QT -= gui - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += . ../shared ../../inc - - HEADERS += ../../inc/lifetimerkeysequencehandler.h - SOURCES += ../../src/lifetimerkeysequencehandler.cpp - - HEADERS += ut_lifetimerkeysequencehandler.h - SOURCES += ut_lifetimerkeysequencehandler.cpp - - #MOCKED DEPENDENCIES - HEADERS += ../../inc/keysequencehandler.h - SOURCES += \ - ../shared/mock_keysequencehandler.cpp \ - ../shared/mock_centralrepository.cpp \ - ../shared/mock_hbdevicemessagebox.cpp \ - ../shared/mock_etel.cpp \ - ../shared/mock_rmmcustomapi.cpp - - LIBS += -lmocklib -lsymbianmock -lxqserviceutil - LIBS += -letel -letelmm -lcustomapi -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_manufacturerkeysequencehandler/ut_manufacturerkeysequencehandle.pro --- a/telutils/keysequencerecognitionservice/tsrc/ut_manufacturerkeysequencehandler/ut_manufacturerkeysequencehandle.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -# -# 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: -# -# - -TEMPLATE = app -TARGET = ut_manufacturerkeysequencehandler -MOC_DIR = moc -CONFIG += hb qtestlib -DEFINES += QT_NO_DEBUG_STREAM -DEFINES += XQ_BUILD_XQSERVICE_LIB - -QT -= gui - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += . ../shared ../../inc - HEADERS += ../../inc/manufacturerkeysequencehandler.h - SOURCES += ../../src/manufacturerkeysequencehandler.cpp - - HEADERS += ut_manufacturerkeysequencehandler.h - SOURCES += ut_manufacturerkeysequencehandler.cpp - - #MOCKED DEPENDENCIES - HEADERS += \ - ../../inc/keysequencehandler.h \ - /epoc32/include/mw/xqappmgr.h \ - /epoc32/include/mw/xqservicerequest.h \ - /epoc32/include/mw/xqaiwrequest.h - SOURCES += \ - ../shared/mock_keysequencehandler.cpp \ - ../shared/mock_xqappmgr.cpp \ - ../shared/mock_xqservicerequest.cpp \ - ../shared/mock_xqaiwrequest.cpp - - LIBS += -lmocklib -lsymbianmock -lxqserviceutil -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_manufacturerkeysequencehandler/ut_manufacturerkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/ut_manufacturerkeysequencehandler/ut_manufacturerkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include "ut_manufacturerkeysequencehandler.h" -#define private friend class UT_ManufacturerKeySequenceHandler;private -#include "manufacturerkeysequencehandler.h" -#include "keysequencerecognitionservicedefs.h" -#include "qtestmains60.h" - -const bool KIsEmbedded = false; - -void generateException() -{ - qBadAlloc(); -} - -UT_ManufacturerKeySequenceHandler::UT_ManufacturerKeySequenceHandler() - : - m_handler(0) -{ - -} - - -UT_ManufacturerKeySequenceHandler::~UT_ManufacturerKeySequenceHandler() -{ - delete m_handler; -} - - -void UT_ManufacturerKeySequenceHandler::init() -{ - initialize(); - - m_handler = new ManufacturerKeySequenceHandler(); -} - - -void UT_ManufacturerKeySequenceHandler::cleanup() -{ - reset(); - - delete m_handler; - m_handler = 0; -} - - -void UT_ManufacturerKeySequenceHandler::t_keySequenceValidator() -{ - QString expectedValidator = - QRegExp::escape(KCodeSwVersion) + "|" + - QRegExp::escape(KCodeActivateRfsNormal) + "|" + - QRegExp::escape(KCodeActivateRfsDeep) + "|" + - QRegExp::escape(KCodeBtAddress) + "|" + - QRegExp::escape(KCodeRFLoopback); - - expect("KeySequenceHandler::setKeySequenceValidator") - .with(expectedValidator); - - QScopedPointer handler( - new ManufacturerKeySequenceHandler()); - - QVERIFY(verify()); -} - - -void UT_ManufacturerKeySequenceHandler::t_executeKeySequenceDeviceManagerCodes() -{ - XQAiwInterfaceDescriptor dummyDescriptor; - QPointer request = - new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.services"), QString("devicemanager"), - QString("showVersionNumber()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send).returns(true); - - bool handled = m_handler->executeKeySequence(KCodeSwVersion); - - QVERIFY(verify()); - emit request->requestOk(QVariant(true)); - QVERIFY(request.isNull()); - QCOMPARE(handled, true); -} - - -void UT_ManufacturerKeySequenceHandler::t_executeKeySequenceFactoryResetCodes() -{ - XQAiwInterfaceDescriptor dummyDescriptor; - QPointer request = - new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.symbian"), QString("IFactoryReset"), - QString("showResetUi()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send).returns(true); - - bool handled = m_handler->executeKeySequence(KCodeActivateRfsNormal); - - QVERIFY(verify()); - emit request->requestOk(QVariant(true)); - QVERIFY(request.isNull()); - QCOMPARE(handled, true); - - request = new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.symbian"), QString("IFactoryReset"), - QString("showResetUi()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send).returns(true); - - handled = m_handler->executeKeySequence(KCodeActivateRfsDeep); - - QVERIFY(verify()); - emit request->requestOk(QVariant(true)); - QVERIFY(request.isNull()); - QCOMPARE(handled, true); -} - - -void UT_ManufacturerKeySequenceHandler::t_executeKeySequenceBluetoothCodes() -{ - XQAiwInterfaceDescriptor dummyDescriptor; - QPointer request = - new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.services"), QString("bluetooth"), - QString("showBluetoothDeviceAddress()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send).returns(true); - - bool handled = m_handler->executeKeySequence(KCodeBtAddress); - - QVERIFY(verify()); - emit request->requestOk(QVariant(true)); - QVERIFY(request.isNull()); - QCOMPARE(handled, true); - - request = new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.services"), QString("bluetooth"), - QString("showBluetoothLoopback()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send).returns(true); - - handled = m_handler->executeKeySequence(KCodeRFLoopback); - - QVERIFY(verify()); - emit request->requestOk(QVariant(true)); - QVERIFY(request.isNull()); - QCOMPARE(handled, true); -} - - -void UT_ManufacturerKeySequenceHandler::t_executeInvalidKeySequence() -{ - const QString KUnknownSequence = "123"; - bool handled = m_handler->executeKeySequence(KUnknownSequence); - QCOMPARE(handled, false); -} - - -void UT_ManufacturerKeySequenceHandler::t_executeKeySequenceRequestDispatchingFails() -{ - // controlled synchronous Qt Highway error during request processing - XQAiwInterfaceDescriptor dummyDescriptor; - QPointer request = - new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.services"), QString("devicemanager"), - QString("showVersionNumber()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send).returns(false); - - bool handled = m_handler->executeKeySequence(KCodeSwVersion); - m_handler->requestError(0, QString("")); - - QVERIFY(verify()); - QVERIFY(request.isNull()); - QCOMPARE(handled, false); - - // controlled asynchronous Qt Highway error during request processing - request = new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.services"), QString("devicemanager"), - QString("showVersionNumber()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send).returns(true); - - handled = m_handler->executeKeySequence(KCodeSwVersion); - - QVERIFY(verify()); - emit request->requestError(0, QString("")); - QVERIFY(request.isNull()); - // asynchronous errors have to be silently discarded - QCOMPARE(handled, true); - - // exception during service request dispatching/send - request = new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.services"), QString("devicemanager"), - QString("showVersionNumber()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send) - .willOnce(invokeWithoutArguments(generateException)); - - int result = 0; - QT_TRYCATCH_ERROR( - result, handled = m_handler->executeKeySequence(KCodeSwVersion)); - - QVERIFY(verify()); - QVERIFY(request.isNull()); - QVERIFY(0 != result); - - // request object creation fails - handled = m_handler->executeKeySequence(KCodeSwVersion); - QCOMPARE(handled, false); -} - - -void UT_ManufacturerKeySequenceHandler::t_executeKeySequenceSimultaneousRequest() -{ - XQAiwInterfaceDescriptor dummyDescriptor; - QPointer request = - new XQAiwRequest(dummyDescriptor, QString(""), KIsEmbedded); - EXPECT(XQApplicationManager, create) - .with( - QString("com.nokia.services"), QString("devicemanager"), - QString("showVersionNumber()"), KIsEmbedded) - .returns(request.data()); - EXPECT(XQAiwRequest, send).returns(true); - - bool handled = m_handler->executeKeySequence(KCodeSwVersion); - - QVERIFY(verify()); - QVERIFY(!request.isNull()); - QCOMPARE(handled, true); - - // simultaneous request attempt - EXPECT(XQApplicationManager, create).times(0); - EXPECT(XQAiwRequest, send).times(0); - handled = m_handler->executeKeySequence(KCodeSwVersion); - QCOMPARE(handled, false); -} - -QTEST_MAIN_S60(UT_ManufacturerKeySequenceHandler) diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_manufacturerkeysequencehandler/ut_manufacturerkeysequencehandler.h --- a/telutils/keysequencerecognitionservice/tsrc/ut_manufacturerkeysequencehandler/ut_manufacturerkeysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_MANUFACTURERKEYSEQUENCEHANDLER_H -#define UT_MANUFACTURERKEYSEQUENCEHANDLER_H - -#include -#include - -class ManufacturerKeySequenceHandler; - -class UT_ManufacturerKeySequenceHandler : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_ManufacturerKeySequenceHandler(); - ~UT_ManufacturerKeySequenceHandler(); - -private slots: - - void init(); - void cleanup(); - - void t_keySequenceValidator(); - void t_executeKeySequenceDeviceManagerCodes(); - void t_executeKeySequenceFactoryResetCodes(); - void t_executeKeySequenceBluetoothCodes(); - void t_executeInvalidKeySequence(); - void t_executeKeySequenceRequestDispatchingFails(); - void t_executeKeySequenceSimultaneousRequest(); - -private: - ManufacturerKeySequenceHandler *m_handler; -}; - -#endif // UT_MANUFACTURERKEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_simcontrolkeysecuencehandler/ut_simcontrolkeysecuencehandler.pro --- a/telutils/keysequencerecognitionservice/tsrc/ut_simcontrolkeysecuencehandler/ut_simcontrolkeysecuencehandler.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -# -# 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: -# -# - -MOC_DIR = moc -CONFIG += hb qtestlib - - -TEMPLATE = app -TARGET = ut_simcontrolkeysecuencehandler - -QT += core -QT -= gui - - -SOURCES += ut_simcontrolkeysecuencehandler_reg.rss - - - - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += . ../shared ../../inc - HEADERS += ../../inc/simcontrolkeysequencehandler.h - SOURCES += ../../src/simcontrolkeysequencehandler.cpp - - HEADERS += ut_simcontrolkeysequencehandler.h - SOURCES += ut_simcontrolkeysequencehandler.cpp - - #MOCKED DEPENDENCIES - HEADERS += \ - ../../inc/keysequencehandler.h - - SOURCES += \ - ../shared/mock_keysequencehandler.cpp \ - ../shared/mock_secuimanualsecuritysettings.cpp \ - ../shared/mock_secui.cpp \ - ../shared/mock_etel.cpp \ - ../shared/mock_rmmcustomapi.cpp \ - ../shared/mock_etelmm.cpp - - - LIBS += -lmocklib -lsymbianmock - LIBS += -letel -letelmm -lcustomapi - TARGET.UID3 = 0xED019EF7 -} \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_simcontrolkeysecuencehandler/ut_simcontrolkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/tsrc/ut_simcontrolkeysecuencehandler/ut_simcontrolkeysequencehandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +0,0 @@ -/*! -* 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: -* -*/ - -#include -#include -#include -#include "ut_simcontrolkeysequencehandler.h" -#include "simcontrolkeysequencehandler.h" -#include "keysequencerecognitionservicedefs.h" -#include "qtestmains60.h" - -_LIT(KOldPinCode, "1234"); -_LIT(KPukCode, "11111111"); -_LIT(KNewPinCode, "4321"); -_LIT(KVerifyNewPinCode, "4321"); - - -void generateLeaveL() -{ - User::Leave(KErrUnknown); -} - - -UT_SimControlKeySequenceHandler::UT_SimControlKeySequenceHandler() - : - m_handler(0) -{ - -} - - -UT_SimControlKeySequenceHandler::~UT_SimControlKeySequenceHandler() -{ - delete m_handler; -} - - -void UT_SimControlKeySequenceHandler::init() -{ - initialize(); - - m_handler = new SimControlKeySequenceHandler(); -} - - -void UT_SimControlKeySequenceHandler::cleanup() -{ - reset(); - - delete m_handler; - m_handler = 0; -} - -void UT_SimControlKeySequenceHandler::t_constructionFails() -{ - EXPECT( CManualSecuritySettings, NewL ).willOnce(invokeWithoutArguments(generateLeaveL)); - - int result = 0; - QT_TRYCATCH_ERROR(result, - QScopedPointer handler( - new SimControlKeySequenceHandler()) - ) - QVERIFY(0 != result); -} - - -void UT_SimControlKeySequenceHandler::t_changePin1() - { - const QString KChangePin1KeySequence( "**04*1234*4321*4321*" ); - - EXPECT(CManualSecuritySettings, ChangePinL) - .with(CManualSecuritySettings::EPin1, KOldPinCode(), KNewPinCode(), KVerifyNewPinCode()); - - m_handler->executeKeySequence( KChangePin1KeySequence ); - - QVERIFY(verify()); - - - // leave handling - EXPECT( CManualSecuritySettings, ChangePinL ).willOnce(invokeWithoutArguments(generateLeaveL)) - .with(CManualSecuritySettings::EPin1, KOldPinCode(), KNewPinCode(), KVerifyNewPinCode()); - int result = 0; - QT_TRYCATCH_ERROR(result, - m_handler->executeKeySequence(KChangePin1KeySequence) ) - - QVERIFY(0 != result); - } - -void UT_SimControlKeySequenceHandler::t_changePin2() - { - const QString KChangePin2KeySequence( "**042*1234*4321*4321*" ); - - EXPECT(CManualSecuritySettings, ChangePinL) - .with(CManualSecuritySettings::EPin2, KOldPinCode(), KNewPinCode(), KVerifyNewPinCode()); - - m_handler->executeKeySequence(KChangePin2KeySequence); - - QVERIFY(verify()); - - - //leave handling - EXPECT( CManualSecuritySettings, ChangePinL ).willOnce(invokeWithoutArguments(generateLeaveL)) - .with(CManualSecuritySettings::EPin2, KOldPinCode(), KNewPinCode(), KVerifyNewPinCode()); - - int result = 0; - QT_TRYCATCH_ERROR(result, - m_handler->executeKeySequence(KChangePin2KeySequence) ) - - QVERIFY(0 != result); - } - -void UT_SimControlKeySequenceHandler::t_unblockPin1() - { - const QString KUnblockPin1KeySequence( "**05*11111111*4321*4321*" ); - - EXPECT(CManualSecuritySettings, UnblockPinL) - .with(CManualSecuritySettings::EPin1, KPukCode(), KNewPinCode(), KVerifyNewPinCode()); - - m_handler->executeKeySequence(KUnblockPin1KeySequence); - - QVERIFY(verify()); - - - //leave handling - EXPECT( CManualSecuritySettings, UnblockPinL ).willOnce(invokeWithoutArguments(generateLeaveL)) - .with(CManualSecuritySettings::EPin1, KPukCode(), KNewPinCode(), KVerifyNewPinCode()); - - int result = 0; - QT_TRYCATCH_ERROR(result, - m_handler->executeKeySequence(KUnblockPin1KeySequence) ) - - QVERIFY(0 != result); - } - - -void UT_SimControlKeySequenceHandler::t_unblockPin2() - { - const QString KUnblockPin2KeySequence( "**052*11111111*4321*4321*" ); - - EXPECT(CManualSecuritySettings, UnblockPinL) - .with(CManualSecuritySettings::EPin2, KPukCode(), KNewPinCode(), KVerifyNewPinCode()); - - m_handler->executeKeySequence(KUnblockPin2KeySequence); - - QVERIFY(verify()); - - - //leave handling - EXPECT( CManualSecuritySettings, UnblockPinL ).willOnce(invokeWithoutArguments(generateLeaveL)) - .with(CManualSecuritySettings::EPin2, KPukCode(), KNewPinCode(), KVerifyNewPinCode()); - - int result = 0; - QT_TRYCATCH_ERROR(result, - m_handler->executeKeySequence(KUnblockPin2KeySequence) ) - - QVERIFY(0 != result); - } - - -void UT_SimControlKeySequenceHandler::t_keySequenceValidator() - { - QString expectedValidator = - KCodeChangePin1 + "|" + - KCodeChangePin2 + "|" + - KCodeUnblockPin1 + "|" + - KCodeUnblockPin2; - - expect("KeySequenceHandler::setKeySequenceValidator") - .with(expectedValidator); - - QScopedPointer handler( - new SimControlKeySequenceHandler()); - - QVERIFY(verify()); - } - -QTEST_MAIN_S60(UT_SimControlKeySequenceHandler) diff -r 7d48bed6ce0c -r 987c9837762f telutils/keysequencerecognitionservice/tsrc/ut_simcontrolkeysecuencehandler/ut_simcontrolkeysequencehandler.h --- a/telutils/keysequencerecognitionservice/tsrc/ut_simcontrolkeysecuencehandler/ut_simcontrolkeysequencehandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef UT_SIMCONTROLKEYSEQUENCEHANDLER_H -#define UT_SIMCONTROLKEYSEQUENCEHANDLER_H - -#include -#include - -class SimControlKeySequenceHandler; - -class UT_SimControlKeySequenceHandler : public QObject, public MockService -{ - Q_OBJECT - -public: - - UT_SimControlKeySequenceHandler(); - ~UT_SimControlKeySequenceHandler(); - -private slots: - - void init(); - void cleanup(); - void t_constructionFails(); - void t_changePin1(); - void t_changePin2(); - void t_unblockPin1(); - void t_unblockPin2(); - void t_keySequenceValidator(); - - -private: - SimControlKeySequenceHandler *m_handler; -}; - -#endif // UT_SIMCONTROLKEYSEQUENCEHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/group/bld.inf --- a/telutils/phoneparser/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -23,11 +23,11 @@ PRJ_EXPORTS -../group/phoneparser_stub.sis\ - /epoc32/data/z/system/install/phoneparser_stub.sis +../group/phoneparser_stub.SIS\ + /epoc32/data/z/system/install/phoneparser_stub.SIS // IBY file exports -../rom/phoneparser.iby CORE_MW_LAYER_IBY_EXPORT_PATH(phoneparser.iby) +../rom/Phoneparser.iby CORE_MW_LAYER_IBY_EXPORT_PATH(Phoneparser.iby) PRJ_MMPFILES ../group/phoneparser.mmp diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/group/phoneparser.mmp --- a/telutils/phoneparser/group/phoneparser.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/group/phoneparser.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -25,40 +25,39 @@ CAPABILITY CAP_GENERAL_DLL SOURCEPATH ../src -SOURCE phonegsmparser.cpp -SOURCE cphonegsmparser.cpp -SOURCE cphonegsmparserbase.cpp -SOURCE cphonegsmparserresult.cpp -SOURCE cphonegsmssparser.cpp -SOURCE cphonegsmsshandler.cpp -SOURCE cphonegsmsimcontrolparser.cpp -SOURCE cphonegsmsimcontrolhandler.cpp -SOURCE cphonegsmphonenumberparser.cpp -SOURCE cphonegsmphonenumberhandler.cpp -SOURCE cphonegsmoptioncontainer.cpp -SOURCE cphonegsmhandlercontainer.cpp -SOURCE cphonegsmdummyparser.cpp -SOURCE cphonegsmmischandler.cpp -SOURCE cphonegsmparsercontainer.cpp -SOURCE cphonegsmsscallparser.cpp -SOURCE cphonegsmsscallhandler.cpp -SOURCE cphonegsmmanufacturerparser.cpp -SOURCE cphonegsmmanufacturerhandler.cpp -SOURCE cphonegsmpcnprocedureparser.cpp -SOURCE cphonegsmpcnprocedurehandler.cpp -SOURCE cphonegsmemergencynumberparser.cpp -SOURCE cphonegsmemergencynumberhandler.cpp -SOURCE cphoneparserfeatures.cpp -SOURCE cphonevoipnumberparser.cpp -SOURCE cphonevoipnumberhandler.cpp +SOURCE PhoneGsmParser.cpp +SOURCE CPhoneGsmParser.cpp +SOURCE CPhoneGsmParserBase.cpp +SOURCE CPhoneGsmParserResult.cpp +SOURCE CPhoneGsmSsParser.cpp +SOURCE CPhoneGsmSsHandler.cpp +SOURCE CPhoneGsmSimControlParser.cpp +SOURCE CPhoneGsmSimControlHandler.cpp +SOURCE CPhoneGsmPhoneNumberParser.cpp +SOURCE CPhoneGsmPhoneNumberHandler.cpp +SOURCE CPhoneGsmOptionContainer.cpp +SOURCE CPhoneGsmHandlerContainer.cpp +SOURCE CPhoneGsmDummyParser.cpp +SOURCE CPhoneGsmMiscHandler.cpp +SOURCE CPhoneGsmParserContainer.cpp +SOURCE CPhoneGsmSsCallParser.cpp +SOURCE CPhoneGsmSsCallHandler.cpp +SOURCE CPhoneGsmManufacturerParser.cpp +SOURCE CPhoneGsmManufacturerHandler.cpp +SOURCE CPhoneGsmPcnProcedureParser.cpp +SOURCE CPhoneGsmPcnProcedureHandler.cpp +SOURCE CPhoneGsmEmergencyNumberParser.cpp +SOURCE CPhoneGsmEmergencyNumberHandler.cpp +SOURCE CPhoneParserFeatures.cpp +SOURCE CPhoneVoipNumberParser.cpp +SOURCE CPhoneVoipNumberHandler.cpp +SOURCE CPhoneGsmImeiParser.cpp USERINCLUDE ../inc -// <-- QT PHONE START--> // Default system include paths for MW layer modules. -MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END--> -SYSTEMINCLUDE ../../../inc // telephonyservices internal headers +APP_LAYER_SYSTEMINCLUDE //for Phone Settings domain API headers +SYSTEMINCLUDE ../../../inc // Telephonyservices internal headers LIBRARY euser.lib diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmDummyParser.h --- a/telutils/phoneparser/inc/CPhoneGsmDummyParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmDummyParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMDUMMYPARSER_H // INCLUDES -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmEmergencyNumberParser.h --- a/telutils/phoneparser/inc/CPhoneGsmEmergencyNumberParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmEmergencyNumberParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPHONEGSMEMERGENCYNUMBERPARSER_H // INCLUDES -#include "cphonegsmparserbase.h" -#include +#include "CPhoneGsmParserBase.h" +#include // FORWARD DECLARATIONS class CPhoneGsmOptionContainer; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmImeiParser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/telutils/phoneparser/inc/CPhoneGsmImeiParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,72 @@ +/* +* Copyright (c) 2008-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: It is parser for Imei string. +* +*/ + + +#ifndef CPHONEGSMIMEIPARSER_H_ +#define CPHONEGSMIMEIPARSER_H_ + +// INCLUDES +#include "CPhoneGsmParserBase.h" + +// CONSTANTS + + +// CLASS DECLARATION + +/** +* It is parser for IMEI string. +* +* @since 1.0 +* @lib phoneparser.lib +*/ +NONSHARABLE_CLASS( CPhoneGsmImeiParser ) + : public CPhoneGsmParserBase + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CPhoneGsmImeiParser* NewLC(); + + public: // Functions from base classes + + /** + * From CPhoneGsmParserBase, parses string. + * + * @param aString string to be parsed. + * @param aResult It will contain result. + * @param aOptions It contains all options related to parsing. + * @return It returns boolean value indicating success of parsing. + */ + TBool ParseL( + const TDesC& aString, + CPhoneGsmParserResult& aResult, + CPhoneGsmOptionContainerBase& aOptions ); + + private: + + /** + * C++ default constructor. + */ + CPhoneGsmImeiParser(); + + }; + +#endif /*CPHONEGSMIMEIPARSER_H_*/ + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmManufacturerParser.h --- a/telutils/phoneparser/inc/CPhoneGsmManufacturerParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmManufacturerParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMMANUFACTURERPARSER_H // INCLUDES -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // FORWARD DECLARATIONS class CPhoneGsmOptionContainer; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmOptionContainer.h --- a/telutils/phoneparser/inc/CPhoneGsmOptionContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmOptionContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ #define CPHONEGSMOPTIONCONTAINER_H // INCLUDES -#include "cphonegsmoptioncontainerbase.h" +#include "CPhoneGsmOptionContainerBase.h" // FORWARD DECLARATIONS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmParser.h --- a/telutils/phoneparser/inc/CPhoneGsmParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -21,7 +21,7 @@ // INCLUDES #include -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // FORWARD DECLARATIONS class CPhoneGsmParserResult; @@ -52,7 +52,8 @@ CPhoneGsmParserBase* aPhoneNumber, CPhoneGsmParserBase* aManufacturerSpecific, CPhoneGsmParserBase* aEmergencyNumberParser, - CPhoneGsmParserBase* iVoipNumber); + CPhoneGsmParserBase* iVoipNumber, + CPhoneGsmParserBase* iImeiParser ); /** * Destructor. @@ -85,7 +86,8 @@ CPhoneGsmParserBase* aPhoneNumber, CPhoneGsmParserBase* aManufacturerSpecific, CPhoneGsmParserBase* aEmergencyNumberParser, - CPhoneGsmParserBase* iVoipNumber); + CPhoneGsmParserBase* iVoipNumber, + CPhoneGsmParserBase* iImeiParser ); /** * By default Symbian OS constructor is private. @@ -127,6 +129,10 @@ // Owned voip number parser. CPhoneGsmParserBase* iVoipNumber; + + // Owned IMEI parser. + CPhoneGsmParserBase* iImeiParser; + }; #endif // CPHONEGSMPARSER_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmParserContainer.h --- a/telutils/phoneparser/inc/CPhoneGsmParserContainer.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmParserContainer.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // CLASS DECLARATION diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmPcnProcedureParser.h --- a/telutils/phoneparser/inc/CPhoneGsmPcnProcedureParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmPcnProcedureParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMPCNPROCEDUREPARSER_H // INCLUDES -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmPhoneNumberParser.h --- a/telutils/phoneparser/inc/CPhoneGsmPhoneNumberParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmPhoneNumberParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMPHONENUMBERPARSER_H // INCLUDES -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // FORWARD DECLARATIONS class CPhoneGsmOptionContainer; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmSimControlParser.h --- a/telutils/phoneparser/inc/CPhoneGsmSimControlParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmSimControlParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,7 +20,7 @@ #define CPHONEGSMSIMCONTROLPARSER_H // INCLUDES -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmSsCallParser.h --- a/telutils/phoneparser/inc/CPhoneGsmSsCallParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmSsCallParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneGsmSsParser.h --- a/telutils/phoneparser/inc/CPhoneGsmSsParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneGsmSsParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -22,7 +22,7 @@ // INCLUDES #include -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneParserFeatures.h --- a/telutils/phoneparser/inc/CPhoneParserFeatures.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneParserFeatures.h Wed Sep 01 12:15:03 2010 +0100 @@ -25,7 +25,7 @@ class CRepository; // INCLUDES -#include +#include // FORWARD DECLARATIONS @@ -64,6 +64,13 @@ public: // New functions /** + * Checks if life timer is enabled. + * + * @return ETrue if supported. + */ + static TBool LifeTimerEnabled(); + + /** * Checks if two digit calling is enabled. * * @return ETrue if supported. diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/inc/CPhoneVoipNumberParser.h --- a/telutils/phoneparser/inc/CPhoneVoipNumberParser.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/inc/CPhoneVoipNumberParser.h Wed Sep 01 12:15:03 2010 +0100 @@ -20,8 +20,8 @@ #define CPHONEVOIPNUMBERPARSER_H // INCLUDES -#include "cphonegsmparserbase.h" -#include +#include "CPhoneGsmParserBase.h" +#include // FORWARD DECLARATIONS class CPhoneGsmOptionContainer; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/rom/Phoneparser.iby --- a/telutils/phoneparser/rom/Phoneparser.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/rom/Phoneparser.iby Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ #ifndef __PhoneParser_IBY__ #define __PhoneParser_IBY__ -file=ABI_DIR\BUILD_DIR\phoneparser.dll System\libs\phoneparser.dll -data=ZSYSTEM\install\phoneparser_stub.sis System\Install\phoneparser_stub.sis +file=ABI_DIR\BUILD_DIR\PhoneParser.dll System\libs\PhoneParser.dll +data=ZSYSTEM\install\phoneparser_stub.SIS System\Install\phoneparser_stub.SIS #endif diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmDummyParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmDummyParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmDummyParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,8 +17,8 @@ // INCLUDE FILES -#include "cphonegsmdummyparser.h" -#include "cphonegsmparserresult.h" +#include "CPhoneGsmDummyParser.h" +#include "CPhoneGsmParserResult.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmEmergencyNumberHandler.cpp --- a/telutils/phoneparser/src/CPhoneGsmEmergencyNumberHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmEmergencyNumberHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmemergencynumberhandler.h" -#include "cphonegsmemergencynumberparser.h" -#include "cphonegsmparserresult.h" +#include "CPhoneGsmEmergencyNumberHandler.h" +#include "CPhoneGsmEmergencyNumberParser.h" +#include "CPhoneGsmParserResult.h" // CONSTANTS const TInt KPhoneEmergencyNumberDialParam = 0; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmEmergencyNumberParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmEmergencyNumberParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmEmergencyNumberParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,10 +17,10 @@ // INCLUDE FILES -#include "cphonegsmemergencynumberparser.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmoptioncontainer.h" -#include "cphoneparserfeatures.h" +#include "CPhoneGsmEmergencyNumberParser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" +#include "CPhoneParserFeatures.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmHandlerContainer.cpp --- a/telutils/phoneparser/src/CPhoneGsmHandlerContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmHandlerContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,8 +17,8 @@ // INCLUDE FILES -#include "cphonegsmhandlercontainer.h" -#include "phonegsmparser.h" +#include "CPhoneGsmHandlerContainer.h" +#include "PhoneGsmParser.h" // CONSTANTS const TInt KPhoneHandlerArrayGranularity = 10; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmImeiParser.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/telutils/phoneparser/src/CPhoneGsmImeiParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -0,0 +1,77 @@ +/* +* 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: Parser for IMEI. +* +*/ + + +// INCLUDE FILES +#include "CPhoneGsmImeiParser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" + +// CONSTANTS + +// IMEI code +_LIT( KPhoneImeiCode, "*#06#" ); + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// CPhoneGsmImeiParser::CPhoneGsmImeiParser +// ----------------------------------------------------------------------------- +// +CPhoneGsmImeiParser::CPhoneGsmImeiParser() + { + } + +// ----------------------------------------------------------------------------- +// CPhoneGsmImeiParser::NewLC +// ----------------------------------------------------------------------------- +// +CPhoneGsmImeiParser* CPhoneGsmImeiParser::NewLC() + { + CPhoneGsmImeiParser* self = + new ( ELeave ) CPhoneGsmImeiParser; + + CleanupStack::PushL( self ); + + return self; + } + +// ----------------------------------------------------------------------------- +// CPhoneGsmImeiParser::ParseL +// +// Parse IMEI string. +// ----------------------------------------------------------------------------- +// +TBool CPhoneGsmImeiParser::ParseL( + const TDesC& aString, + CPhoneGsmParserResult& aResult, + CPhoneGsmOptionContainerBase& aOptions ) + { + aResult.ClearL(); + + if ( !aOptions.FindOptionStatus( KPhoneOptionSend )) + { + if ( aString == KPhoneImeiCode ) + { + aResult.SetUid( KPhoneUidIMEI ); + } + } + + return ( aResult.Uid() == KPhoneUidIMEI ); + } + +// End of File diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmManufacturerHandler.cpp --- a/telutils/phoneparser/src/CPhoneGsmManufacturerHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmManufacturerHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmmanufacturerhandler.h" -#include "cphonegsmmanufacturerparser.h" -#include "cphonegsmparserresult.h" +#include "CPhoneGsmManufacturerHandler.h" +#include "CPhoneGsmManufacturerParser.h" +#include "CPhoneGsmParserResult.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmManufacturerParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmManufacturerParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmManufacturerParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,10 +17,10 @@ // INCLUDE FILES -#include "cphonegsmmanufacturerparser.h" -#include "cphonegsmoptioncontainer.h" -#include "cphonegsmparserresult.h" -#include "cphoneparserfeatures.h" +#include "CPhoneGsmManufacturerParser.h" +#include "CPhoneGsmOptionContainer.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneParserFeatures.h" // CONSTANTS const TInt KPhoneManufacturerCodeArrayGanularity = 5; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmMiscHandler.cpp --- a/telutils/phoneparser/src/CPhoneGsmMiscHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmMiscHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -11,15 +11,15 @@ * * Contributors: * -* Description: Implementation of handler for USSD. +* Description: Implementation of handlers for USSD and IMEI. * */ // INCLUDE FILES -#include "cphonegsmmischandler.h" -#include "cphonegsmparserbase.h" -#include "cphonegsmparserresult.h" +#include "CPhoneGsmMiscHandler.h" +#include "CPhoneGsmParserBase.h" +#include "CPhoneGsmParserResult.h" // ============================ MEMBER FUNCTIONS =============================== @@ -42,6 +42,10 @@ } break; + case KPhoneUidIMEI: + ProcessShowIMEIL(); + break; + default: break; } diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmOptionContainer.cpp --- a/telutils/phoneparser/src/CPhoneGsmOptionContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmOptionContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmoptioncontainer.h" -#include "phonegsmparser.h" -#include "cphoneparserfeatures.h" +#include "CPhoneGsmOptionContainer.h" +#include "PhoneGsmParser.h" +#include "CPhoneParserFeatures.h" // CONSTANTS const TInt KPhoneGsmOptionGranularity = 5; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -20,13 +20,13 @@ // INCLUDE FILES #include -#include "cphonegsmparser.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmparserbase.h" -#include "cphonegsmdummyparser.h" -#include "cphonegsmoptioncontainer.h" -#include "cphoneparserfeatures.h" -#include "cphonegsmoptioncontainerbase.h" +#include "CPhoneGsmParser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmParserBase.h" +#include "CPhoneGsmDummyParser.h" +#include "CPhoneGsmOptionContainer.h" +#include "CPhoneParserFeatures.h" +#include "CPhoneGsmOptionContainerBase.h" // CONSTANTS @@ -43,7 +43,8 @@ CPhoneGsmParserBase* aPhoneNumber, CPhoneGsmParserBase* aManufacturerSpecific, CPhoneGsmParserBase* aEmergencyNumberParser, - CPhoneGsmParserBase* aVoipNumber) + CPhoneGsmParserBase* aVoipNumber, + CPhoneGsmParserBase* aImeiParser ) { // Ownership of these instances is transferred, thus // creation of the instance must not leave. @@ -55,7 +56,8 @@ aPhoneNumber, aManufacturerSpecific, aEmergencyNumberParser, - aVoipNumber); + aVoipNumber, + aImeiParser ); if ( !self ) { @@ -65,6 +67,7 @@ delete aManufacturerSpecific; delete aEmergencyNumberParser; delete aVoipNumber; + delete aImeiParser; User::Leave( KErrNoMemory ); } @@ -88,6 +91,7 @@ delete iGsmManufacturerProcedure; delete iGsmEmergencyNumber; delete iVoipNumber; + delete iImeiParser; CPhoneParserFeatures::Free(); } @@ -101,13 +105,15 @@ CPhoneGsmParserBase* aPhoneNumber, CPhoneGsmParserBase* aManufacturerSpecific, CPhoneGsmParserBase* aEmergencyNumberParser, - CPhoneGsmParserBase* aVoipNumber) + CPhoneGsmParserBase* aVoipNumber, + CPhoneGsmParserBase* aImeiParser ) : iGsmSsProcedure( aSsProcedure ), iGsmSimControlProcedure( aSimControlProcedure ), iGsmPhoneNumber( aPhoneNumber ), iGsmManufacturerProcedure( aManufacturerSpecific ), iGsmEmergencyNumber( aEmergencyNumberParser ), - iVoipNumber( aVoipNumber ) + iVoipNumber( aVoipNumber ), + iImeiParser( aImeiParser ) { } @@ -143,6 +149,10 @@ { iVoipNumber = CPhoneGsmDummyParser::NewL(); } + if ( !iImeiParser ) + { + iImeiParser = CPhoneGsmDummyParser::NewL(); + } } // ----------------------------------------------------------------------------- @@ -188,9 +198,15 @@ } TBool sendOperation = aOptions.FindOptionStatus( KPhoneOptionSend ); + + // Check if it is the only phone control string, show imei. + result = iImeiParser->ParseL( aString, aResult, aOptions ); // Check if emergency number. - result = iGsmEmergencyNumber->ParseL( aString, aResult, aOptions ); + if ( !result ) + { + result = iGsmEmergencyNumber->ParseL( aString, aResult, aOptions ); + } // First check if string is GSM ss procedure supported by MS. if ( !result ) diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmParserBase.cpp --- a/telutils/phoneparser/src/CPhoneGsmParserBase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmParserBase.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,7 +17,7 @@ // INCLUDE FILES -#include "cphonegsmparserbase.h" +#include "CPhoneGsmParserBase.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmParserContainer.cpp --- a/telutils/phoneparser/src/CPhoneGsmParserContainer.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmParserContainer.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,10 +19,10 @@ // INCLUDE FILES #include -#include "cphonegsmparsercontainer.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmoptioncontainer.h" -#include "phonegsmparser.h" +#include "CPhoneGsmParserContainer.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" +#include "PhoneGsmParser.h" // CONSTANTS const TInt KPhoneParserArrayGranularity = 5; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmParserResult.cpp --- a/telutils/phoneparser/src/CPhoneGsmParserResult.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmParserResult.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,9 +19,9 @@ // INCLUDE FILES #include -#include "cphonegsmparserresult.h" -#include "cphonegsmparserbase.h" -#include "phonegsmparser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmParserBase.h" +#include "PhoneGsmParser.h" // CONSTANTS const TInt KPhoneParserResultParameterGranularity = 10; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmPcnProcedureHandler.cpp --- a/telutils/phoneparser/src/CPhoneGsmPcnProcedureHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmPcnProcedureHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmpcnprocedurehandler.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmpcnprocedureparser.h" +#include "CPhoneGsmPcnProcedureHandler.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmPcnProcedureParser.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmPcnProcedureParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmPcnProcedureParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmPcnProcedureParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmpcnprocedureparser.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmoptioncontainer.h" +#include "CPhoneGsmPcnProcedureParser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmPhoneNumberHandler.cpp --- a/telutils/phoneparser/src/CPhoneGsmPhoneNumberHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmPhoneNumberHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmphonenumberhandler.h" -#include "cphonegsmphonenumberparser.h" -#include "cphonegsmparserresult.h" +#include "CPhoneGsmPhoneNumberHandler.h" +#include "CPhoneGsmPhoneNumberParser.h" +#include "CPhoneGsmParserResult.h" // CONSTANTS const TInt KPhonePhoneNumberDialParam = 0; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmPhoneNumberParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmPhoneNumberParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmPhoneNumberParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,12 +17,12 @@ // INCLUDE FILES -#include "cphonegsmphonenumberparser.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmoptioncontainer.h" -#include "cphonevoipnumberparser.h" -#include "cphoneparserfeatures.h" -#include "phoneparsercommon.h" +#include "CPhoneGsmPhoneNumberParser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" +#include "CPhoneVoipNumberParser.h" +#include "CPhoneParserFeatures.h" +#include "phoneParserCommon.h" // CONSTANTS _LIT( KPhoneClirSuppress, "*31#" ); _LIT( KPhoneClirInvoke, "#31#" ); diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmSimControlHandler.cpp --- a/telutils/phoneparser/src/CPhoneGsmSimControlHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmSimControlHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,10 +17,10 @@ // INCLUDE FILES -#include "cphonegsmsimcontrolhandler.h" -#include "cphonegsmsimcontrolparser.h" -#include "cphonegsmparserresult.h" -#include "phonegsmparser.h" +#include "CPhoneGsmSimControlHandler.h" +#include "CPhoneGsmSimControlParser.h" +#include "CPhoneGsmParserResult.h" +#include "PhoneGsmParser.h" // CONSTANTS const TInt KPhoneSimControlOldPinPukParam = 0; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmSimControlParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmSimControlParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmSimControlParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmsimcontrolparser.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmoptioncontainer.h" +#include "CPhoneGsmSimControlParser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" // CONSTANTS _LIT( KPhoneSimControlPinChangeCode, "04" ); diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmSsCallHandler.cpp --- a/telutils/phoneparser/src/CPhoneGsmSsCallHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmSsCallHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmsscallhandler.h" -#include "cphonegsmsscallparser.h" -#include "cphonegsmparserresult.h" +#include "CPhoneGsmSsCallHandler.h" +#include "CPhoneGsmSsCallParser.h" +#include "CPhoneGsmParserResult.h" // ============================ MEMBER FUNCTIONS =============================== diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmSsCallParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmSsCallParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmSsCallParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonegsmsscallparser.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmoptioncontainer.h" +#include "CPhoneGsmSsCallParser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmSsHandler.cpp --- a/telutils/phoneparser/src/CPhoneGsmSsHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmSsHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -19,9 +19,9 @@ // INCLUDE FILES #include -#include "cphonegsmsshandler.h" -#include "cphonegsmssparser.h" -#include "cphonegsmparserresult.h" +#include "CPhoneGsmSsHandler.h" +#include "CPhoneGsmSsParser.h" +#include "CPhoneGsmParserResult.h" // LOCAL FUNCTION PROTOTYPES diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneGsmSsParser.cpp --- a/telutils/phoneparser/src/CPhoneGsmSsParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneGsmSsParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -21,11 +21,11 @@ #include #include -#include "cphonegsmssparser.h" -#include "cphonegsmparserresult.h" -#include "phonegsmparser.h" -#include "cphonegsmoptioncontainer.h" -#include "cphoneparserfeatures.h" +#include "CPhoneGsmSsParser.h" +#include "CPhoneGsmParserResult.h" +#include "PhoneGsmParser.h" +#include "CPhoneGsmOptionContainer.h" +#include "CPhoneParserFeatures.h" // CONSTANTS diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneParserFeatures.cpp --- a/telutils/phoneparser/src/CPhoneParserFeatures.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneParserFeatures.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,12 +17,12 @@ // INCLUDE FILES -#include "cphoneparserfeatures.h" +#include "CPhoneParserFeatures.h" #include #include #include #include -#include +#include // FORWARD DECLARATION @@ -130,6 +130,16 @@ } // ----------------------------------------------------------------------------- +// CPhoneParserFeatures::LifeTimerEnabled +// ----------------------------------------------------------------------------- +// +TBool CPhoneParserFeatures::LifeTimerEnabled() + { + return Instance() ? + Instance()->GetTelephoneVariant() & KTelSrvLVFlagLifeTimer : EFalse; + } + +// ----------------------------------------------------------------------------- // CPhoneParserFeatures::TwoDigitCallingEnabled // ----------------------------------------------------------------------------- // diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneVoipNumberHandler.cpp --- a/telutils/phoneparser/src/CPhoneVoipNumberHandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneVoipNumberHandler.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,9 +17,9 @@ // INCLUDE FILES -#include "cphonevoipnumberhandler.h" -#include "cphonevoipnumberparser.h" -#include "cphonegsmparserresult.h" +#include "CPhoneVoipNumberHandler.h" +#include "CPhoneVoipNumberParser.h" +#include "CPhoneGsmParserResult.h" // CONSTANTS const TInt KPhoneVoipNumberDialParam = 0; diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/CPhoneVoipNumberParser.cpp --- a/telutils/phoneparser/src/CPhoneVoipNumberParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/CPhoneVoipNumberParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,10 +17,10 @@ // INCLUDE FILES -#include "cphonevoipnumberparser.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmoptioncontainer.h" -#include "phoneparsercommon.h" +#include "CPhoneVoipNumberParser.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" +#include "phoneParserCommon.h" // CONSTANTS @@ -141,7 +141,8 @@ if ( !dtmfFound ) { - if ( !nextChar.IsDigit() ) + if ( !nextChar.IsDigit() && + nextChar != KPhonePlus ) { allDigits = EFalse; } diff -r 7d48bed6ce0c -r 987c9837762f telutils/phoneparser/src/PhoneGsmParser.cpp --- a/telutils/phoneparser/src/PhoneGsmParser.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/phoneparser/src/PhoneGsmParser.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -17,29 +17,32 @@ // INCLUDE FILES -#include "phonegsmparser.h" -#include "cphonegsmparser.h" -#include "cphonegsmparserbase.h" -#include "cphonegsmparserresult.h" -#include "cphonegsmoptioncontainer.h" +#include "PhoneGsmParser.h" +#include "CPhoneGsmParser.h" +#include "CPhoneGsmParserBase.h" +#include "CPhoneGsmParserResult.h" +#include "CPhoneGsmOptionContainer.h" -#include "cphonegsmparsercontainer.h" -#include "cphonegsmssparser.h" -#include "cphonegsmsimcontrolparser.h" -#include "cphonegsmphonenumberparser.h" -#include "cphonegsmsscallparser.h" -#include "cphonegsmmanufacturerparser.h" -#include "cphonegsmpcnprocedureparser.h" -#include "cphonegsmmanufacturerhandler.h" -#include "cphonegsmemergencynumberparser.h" -#include "cphoneparserfeatures.h" -#include "cphonevoipnumberparser.h" +#include "CPhoneGsmParserContainer.h" +#include "CPhoneGsmSsParser.h" +#include "CPhoneGsmSimControlParser.h" +#include "CPhoneGsmPhoneNumberParser.h" +#include "CPhoneGsmSsCallParser.h" +#include "CPhoneGsmManufacturerParser.h" +#include "CPhoneGsmPcnProcedureParser.h" +#include "CPhoneGsmManufacturerHandler.h" +#include "CPhoneGsmEmergencyNumberParser.h" +#include "CPhoneParserFeatures.h" +#include "CPhoneVoipNumberParser.h" +#include "CPhoneGsmImeiParser.h" + // CONSTANTS const TInt KPhoneParserResultParameterReserver = 10; _LIT( KPhoneParserPanic, "PhoneParser" ); // Software version display code +_LIT( KPhoneCodeSwVersion, "*#0000#" ); _LIT( KPhoneCodeBadPinChange, "**04*" ); _LIT( KPhoneCodeBadPin2Change, "**042*" ); _LIT( KPhoneCodeBadPinUnblock, "**05*" ); @@ -47,6 +50,7 @@ _LIT( KPhoneCodeActivateRfsNormal, "*#7780#" ); _LIT( KPhoneCodeActivateRfsDeep, "*#7370#" ); _LIT( KPhoneCodeBtAddress, "*#2820#" ); +_LIT( KPhoneCodeLifeTimer, "*#92702689#" ); _LIT( KPhoneCodeRFLoopback, "*#9990#" ); _LIT( KPhoneCodeWLANMAC, "*#62209526#" ); _LIT( KPhoneCodeBtDebugMode, "*#2873#" ); @@ -95,6 +99,10 @@ CPhoneGsmParserBase* voipNumberParser = CPhoneVoipNumberParser::NewLC(); + // 7. IMEI PARSER TO STACK + CPhoneGsmParserBase* imeiParser = + CPhoneGsmImeiParser::NewLC(); + CPhoneGsmParser* parser = CPhoneGsmParser::NewL( ssContainer, @@ -102,9 +110,10 @@ phoneNumber, manufacturerSpecific, emergencyNumberParser, - voipNumberParser); + voipNumberParser, + imeiParser ); - CleanupStack::Pop( 6, ssContainer ); + CleanupStack::Pop( 7, ssContainer ); return parser; } @@ -224,11 +233,13 @@ // Allowed: // 0 SEND - // All manufacturer codes + // IMEI + // All manufacturer codes (incl. SW version) // All sim control procedures // All pcn procedures return ( uid == KPhoneUidCommand0 || + uid == KPhoneUidIMEI || uid == KPhoneUidManufacturerDebugCode || uid == KPhoneUidManufacturerCode || PHONE_EXTRACT_MAIN( uid ) == KPhoneGsmUidSimControlProcedure || @@ -247,14 +258,18 @@ // Allowed: // DialEmergency - // Some manufacturer codes + // IMEI + // Some manufacturer codes (incl. SW version) // All sim control procedures // All pcn procedures return ( uid == KPhoneUidEmergencyNumber || + uid == KPhoneUidIMEI || uid == KPhoneUidManufacturerDebugCode || ( uid == KPhoneUidManufacturerCode && - ( aux == CPhoneGsmManufacturerHandler::EBadPinChange || + ( aux == CPhoneGsmManufacturerHandler::EShowVersion || + aux == CPhoneGsmManufacturerHandler::ELifeTimer || + aux == CPhoneGsmManufacturerHandler::EBadPinChange || aux == CPhoneGsmManufacturerHandler::EBadPin2Change || aux == CPhoneGsmManufacturerHandler::EBadPinUnblock || aux == CPhoneGsmManufacturerHandler::EBadPin2Unblock ) ) || @@ -311,6 +326,11 @@ manufacturer->AddL( *manuCodes ); CleanupStack::Pop( manuCodes ); + manuCodes->AddStringL( + KPhoneCodeSwVersion, + CPhoneGsmManufacturerParser::EFlagCode, + CPhoneGsmManufacturerHandler::EShowVersion ); + manuCodes->AddStringL( KPhoneCodeBadPinChange, CPhoneGsmManufacturerParser::EFlagCode + @@ -355,7 +375,15 @@ KPhoneCodeWLANMAC, CPhoneGsmManufacturerParser::EFlagCode, CPhoneGsmManufacturerHandler::EShowWlanMac, - KFeatureIdProtocolWlan ); + KFeatureIdProtocolWlan ); + + if ( CPhoneParserFeatures::LifeTimerEnabled()) + { + manuCodes->AddStringL( + KPhoneCodeLifeTimer, + CPhoneGsmManufacturerParser::EFlagCode, + CPhoneGsmManufacturerHandler::ELifeTimer ); + } manuCodes->AddStringL( KPhoneCodeRFLoopback, diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/group/bld.inf --- a/telutils/telephonyservice/group/bld.inf Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/group/bld.inf Wed Sep 01 12:15:03 2010 +0100 @@ -23,7 +23,7 @@ PRJ_EXPORTS // IBY file exports -../rom/telephonyservice.iby CORE_MW_LAYER_IBY_EXPORT_PATH(telephonyservice.iby) +../rom/telephonyservice.iby CORE_MW_LAYER_IBY_EXPORT_PATH(TelephonyService.iby) // SIS stubs diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/group/telephonyservice.mmp --- a/telutils/telephonyservice/group/telephonyservice.mmp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/group/telephonyservice.mmp Wed Sep 01 12:15:03 2010 +0100 @@ -42,6 +42,6 @@ MW_LAYER_SYSTEMINCLUDE -LIBRARY euser.lib -LIBRARY mediatorclient.lib -LIBRARY estor.lib +LIBRARY euser.lib +LIBRARY mediatorclient.lib +LIBRARY estor.lib diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/inc/ccallremotepartyinformationimpl.h --- a/telutils/telephonyservice/inc/ccallremotepartyinformationimpl.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/inc/ccallremotepartyinformationimpl.h Wed Sep 01 12:15:03 2010 +0100 @@ -2,7 +2,7 @@ * 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" +* 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". * diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/inc/cmediatorservice.h --- a/telutils/telephonyservice/inc/cmediatorservice.h Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/inc/cmediatorservice.h Wed Sep 01 12:15:03 2010 +0100 @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include // forward declarations diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/rom/telephonyservice.iby --- a/telutils/telephonyservice/rom/telephonyservice.iby Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/rom/telephonyservice.iby Wed Sep 01 12:15:03 2010 +0100 @@ -18,8 +18,8 @@ #ifndef __TelephonyService_IBY__ #define __TelephonyService_IBY__ -file=ABI_DIR\BUILD_DIR\telephonyservice.dll System\libs\telephonyservice.dll -//data=ZSYSTEM\install\phoneparser_stub.sis System\Install\phoneparser_stub.sis +file=ABI_DIR\BUILD_DIR\telephonyservice.dll System\libs\telephonyservice.dll +//data=ZSYSTEM\install\phoneparser_stub.SIS System\Install\phoneparser_stub.SIS #endif diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/src/ccallinformation.cpp --- a/telutils/telephonyservice/src/ccallinformation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/src/ccallinformation.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -52,7 +52,7 @@ // EXPORT_C CCallInformation* CCallInformation::NewL() { - + CCallInformation* self = new (ELeave) CCallInformation( ); CleanupStack::PushL( self ); diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/src/ccallinformationimpl.cpp --- a/telutils/telephonyservice/src/ccallinformationimpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/src/ccallinformationimpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -58,11 +58,10 @@ CCallInformationImpl* self = new (ELeave) CCallInformationImpl( ); CleanupStack::PushL( self ); - CMediatorService* mediatorService = - CMediatorService::NewL( CMediatorService::ECallInfo ); - self->ConstructL(mediatorService); - - CleanupStack::Pop( self ); + CMediatorService* mediatorService = CMediatorService::NewLC( CMediatorService::ECallInfo ); + self->ConstructL(mediatorService); + + CleanupStack::Pop( 2,self ); TSLOGSTRING("CCallInformationImpl::NewL >>"); return self; } diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/src/ccallremotepartyinformationimpl.cpp --- a/telutils/telephonyservice/src/ccallremotepartyinformationimpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/src/ccallremotepartyinformationimpl.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -2,7 +2,7 @@ * 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" +* 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". * diff -r 7d48bed6ce0c -r 987c9837762f telutils/telephonyservice/src/cmediatorservice.cpp --- a/telutils/telephonyservice/src/cmediatorservice.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/telutils/telephonyservice/src/cmediatorservice.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -15,8 +15,8 @@ * */ -#include -#include +#include +#include #include //Call Information Mediator API #include //Call Remote Party Information Mediator API diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/bwins/xqtelephonyserviceu.def --- a/telutils/xqtelephonyservice/bwins/xqtelephonyserviceu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - ?staticMetaObject@XQCallInfo@@2UQMetaObject@@B @ 1 NONAME ; struct QMetaObject const XQCallInfo::staticMetaObject - ?callInformationChanged@XQCallInfo@@IAEXXZ @ 2 NONAME ; void XQCallInfo::callInformationChanged(void) - ??_EXQCallInfo@@UAE@I@Z @ 3 NONAME ; XQCallInfo::~XQCallInfo(unsigned int) - ?metaObject@XQCallInfo@@UBEPBUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const * XQCallInfo::metaObject(void) const - ??0XQCallInfo@@IAE@XZ @ 5 NONAME ; XQCallInfo::XQCallInfo(void) - ?tr@XQCallInfo@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString XQCallInfo::tr(char const *, char const *, int) - ?trUtf8@XQCallInfo@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString XQCallInfo::trUtf8(char const *, char const *, int) - ?trUtf8@XQCallInfo@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString XQCallInfo::trUtf8(char const *, char const *) - ?sendCallInfoChangedSignal@XQCallInfo@@IAEXXZ @ 9 NONAME ; void XQCallInfo::sendCallInfoChangedSignal(void) - ?tr@XQCallInfo@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString XQCallInfo::tr(char const *, char const *) - ?qt_metacall@XQCallInfo@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 11 NONAME ; int XQCallInfo::qt_metacall(enum QMetaObject::Call, int, void * *) - ?getStaticMetaObject@XQCallInfo@@SAABUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const & XQCallInfo::getStaticMetaObject(void) - ??1XQCallInfo@@UAE@XZ @ 13 NONAME ; XQCallInfo::~XQCallInfo(void) - ?create@XQCallInfo@@SAPAV1@XZ @ 14 NONAME ; class XQCallInfo * XQCallInfo::create(void) - ?qt_metacast@XQCallInfo@@UAEPAXPBD@Z @ 15 NONAME ; void * XQCallInfo::qt_metacast(char const *) - diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/eabi/xqtelephonyserviceu.def --- a/telutils/xqtelephonyservice/eabi/xqtelephonyserviceu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -EXPORTS - _ZN10XQCallInfo11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME - _ZN10XQCallInfo11qt_metacastEPKc @ 2 NONAME - _ZN10XQCallInfo16staticMetaObjectE @ 3 NONAME DATA 16 - _ZN10XQCallInfo19getStaticMetaObjectEv @ 4 NONAME - _ZN10XQCallInfo22callInformationChangedEv @ 5 NONAME - _ZN10XQCallInfo25sendCallInfoChangedSignalEv @ 6 NONAME - _ZN10XQCallInfo6createEv @ 7 NONAME - _ZNK10XQCallInfo10metaObjectEv @ 8 NONAME - _ZTI10XQCallInfo @ 9 NONAME - _ZTV10XQCallInfo @ 10 NONAME - _ZN10XQCallInfoC2Ev @ 11 NONAME - diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/inc/qtphonesrvlog.h --- a/telutils/xqtelephonyservice/inc/qtphonesrvlog.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* 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: Provides macros for logging -* -*/ - - - -#ifndef __QTPHONESRVLOG_H__ -#define __QTPHONESRVLOG_H__ - -// INCLUDES -#include - -// Q_FUNC_INFO does not print function signature in Symbian.. - -#ifdef _DEBUG -#define PHONE_DEBUG(A) qDebug() < -#include -#include - -#include "xqcallinfo.h" - -// forward declarations -class CCallInformation; -class CCallInfoIter; - -/*! - XQCallInfoImpl - This class provides implementation for XQCallInfo -class. -*/ -class XQCallInfoImpl : - public XQCallInfo, - public MCallInformationObserver - { - Q_OBJECT -public: - - /*! - Constructor - */ - explicit XQCallInfoImpl(); - - /*! - Destructor - */ - virtual ~XQCallInfoImpl(); - - /*! - \fn void getCalls( QList &calls ) - - Gets the snapshot of ongoing calls. - */ - void getCalls(QList &calls); - - /*! - \fn bool isCallInState( CCPCall::TCallState state ) const - - Returns information whether call in given state exist. - */ - bool isCallInState(CCPCall::TCallState state) const; - -public: // from MCallInformationObserver. - - /*! - \fn void CallInformationChanged() - - Informs XQCallinfo that there are changes in ongoing calls. - */ - void CallInformationChanged(); - -private: - - /*! - \fn void setCallInformationObserver() - - Sets the observer for changes in current calls - */ - void setCallInformationObserver(); - -private: - - CCallInformation *m_CallInformation; - - CCallInfoIter *m_Iter; - }; - - -#endif // XQCALLINFOIMPL_H - diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/rom/xqtelephonyservice.iby --- a/telutils/xqtelephonyservice/rom/xqtelephonyservice.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +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:s -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: XQTelephonyService's iby definitions. - * -*/ - -#ifndef __XQTELEPHONYSERVICE_IBY__ -#define __XQTELEPHONYSERVICE_IBY__ - -file=ABI_DIR\BUILD_DIR\xqtelephonyservice.dll System\libs\xqtelephonyservice.dll - -#endif // __XQTELEPHONYSERVICE_IBY__ - diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/src/xqcallinfo.cpp --- a/telutils/xqtelephonyservice/src/xqcallinfo.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +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: Provides information about ongoing calls. -* -*/ - -#include "xqcallinfoimpl.h" -#include -#include "qtphonesrvlog.h" - - -XQCallInfo *XQCallInfo::create() -{ - PHONE_TRACE; - return new XQCallInfoImpl(); -} - -void XQCallInfo::sendCallInfoChangedSignal() -{ - PHONE_TRACE; - emit callInformationChanged (); -} - -XQCallInfo::XQCallInfo() -{ -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/src/xqcallinfoimpl.cpp --- a/telutils/xqtelephonyservice/src/xqcallinfoimpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +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: Provides implementation for XQCallInfo -class. -* -*/ - -#include "xqcallinfoimpl.h" -#include -#include -#include - -XQCallInfoImpl::XQCallInfoImpl(): XQCallInfo(), m_CallInformation(0) -{ - TRAPD( error, m_CallInformation = CCallInformation::NewL()); - qt_symbian_throwIfError(error); - setCallInformationObserver(); -} - -XQCallInfoImpl::~XQCallInfoImpl() -{ - delete m_CallInformation; -} - -void XQCallInfoImpl::setCallInformationObserver() -{ - m_CallInformation->NotifyCallInformationChanges(*this); -} - -void XQCallInfoImpl::getCalls(QList &calls) -{ - TRAPD( error, m_Iter = &m_CallInformation->GetCallsL() ); - qt_symbian_throwIfError(error); - - for (m_Iter->First(); !m_Iter->IsDone(); m_Iter->Next()) { - const MCall& call = m_Iter->Current(); - CallInfo callInfo; - callInfo.m_Direction = call.CallDirection(); - callInfo.m_Index = call.CallIndex(); - callInfo.m_ServiceId = call.ServiceId(); - callInfo.m_Type = call.CallType(); - callInfo.m_State = call.CallState(); - calls.append(callInfo); - } -} - -bool XQCallInfoImpl::isCallInState(CCPCall::TCallState state) const -{ - return m_CallInformation->IsCallInState(state); -} - -void XQCallInfoImpl::CallInformationChanged() -{ - XQCallInfo::sendCallInfoChangedSignal(); -} diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/runall.cmd --- a/telutils/xqtelephonyservice/tsrc/unit/runall.cmd Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem -@echo off - -if "%1"=="winscw" ( -call runtest.cmd ut_xqcallinfo -) - -@echo off -if "%1"=="win32" ( -call runtest_w32.cmd ut_xqcallinfo -) - -@echo off -if "%2"=="ctc" ( -call ctcpost^ - ut_xqcallinfo\mon.sym ut_xqcallinfo\mon.dat^ - -p profile.txt -call ctc2html -i profile.txt -) - -@echo off -if "%1"=="" echo Usage: 'runall winscw' or 'runall win32' - diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/runtest.cmd --- a/telutils/xqtelephonyservice/tsrc/unit/runtest.cmd Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -call del %1.log -@echo on -:FINAL -call \epoc32\release\winscw\udeb\%1.exe -o c:\%1.log -call type \epoc32\winscw\c\%1.log diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/runtest_w32.cmd --- a/telutils/xqtelephonyservice/tsrc/unit/runtest_w32.cmd Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -@echo off -rem -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -rem All rights reserved. -rem This component and the accompanying materials are made available -rem under the terms of "Eclipse Public License v1.0" -rem which accompanies this distribution, and is available -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". -rem -rem Initial Contributors: -rem Nokia Corporation - initial contribution. -rem -rem Contributors: -rem -rem Description: -rem - -@echo on -:FINAL -call %1\%1.exe diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformation.cpp --- a/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformation.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides information about ongoing calls. -* -*/ - - -#include - -#include "ccallinformation.h" -#include "MCallInformationObserver.h" -#include "ccallinformationimpl.h" - - -// ======== MEMBER FUNCTIONS ======== - - -// --------------------------------------------------------------------------- -// C++ constructor. -// --------------------------------------------------------------------------- -// -CCallInformation::CCallInformation() - { - - } - - -// --------------------------------------------------------------------------- -// Symbian second-phase constructor. -// --------------------------------------------------------------------------- -// -void CCallInformation::ConstructL() - { - - iImpl = CCallInformationImpl::NewL(); - } - - -// --------------------------------------------------------------------------- -// Two-phased constructor. -// --------------------------------------------------------------------------- -// - CCallInformation* CCallInformation::NewL() - { - CCallInformation* self = new (ELeave) CCallInformation( ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - return self; - } - - - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CCallInformation::~CCallInformation() - { - delete iImpl; - } - -// --------------------------------------------------------------------------- -// Sets observer for call information changes. -// --------------------------------------------------------------------------- -// - void CCallInformation::NotifyCallInformationChanges( - MCallInformationObserver& aObserver ) - { - iImpl->NotifyCallInformationChanges( aObserver ); - } - -// --------------------------------------------------------------------------- -// Cancels previously placed NotifyCallInformationChangesL call. -// --------------------------------------------------------------------------- -// - void CCallInformation::CancelNotification( ) - { - } - -// --------------------------------------------------------------------------- -// Gets the snapshot of ongoing calls. -// --------------------------------------------------------------------------- -// - CCallInfoIter& CCallInformation::GetCallsL( ) - { - return iImpl->GetCallsL( ); - } - -// --------------------------------------------------------------------------- -// Returns information whether call in given state exist. -// --------------------------------------------------------------------------- -// -TBool CCallInformation::IsCallInState( CCPCall::TCallState aState ) const - { - return iImpl->IsCallInState( aState ); - } - - - diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformation.h --- a/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformation.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides information about ongoing calls. -* -*/ - - -#ifndef MOCK_C_CALLINFORMATION_H -#define MOCK_C_CALLINFORMATION_H - -#include - -#include "mcall.h" - - -// forward declarations -class MCallInformationObserver; -class CCallInformationImpl; -class CCallInfoIter; - - -/** - * Class to be used for receiving information about ongoing calls. - * - * @code - * // create the CCallInformation instance e.g. when the client component is created - * iCallInfo = CCallInformation::NewL(); - * iCallInfo->NotifyCallInformationChanges(*iObserver); - * - * // and use it when needed - * CCallInfoIter& iter = iCallInfo->GetCallsL(); - * @endcode - * - * @lib telephonyservice.lib - * @since S60 v5.1 - */ -NONSHARABLE_CLASS( CCallInformation ) : public CBase - { - -public: - - /** - * Two-phased constructor. - */ - static CCallInformation* NewL(); - - - /** - * Destructor. - */ - virtual ~CCallInformation(); - - /** - * Allows a client to be notified when there are changes in current calls. - * There can be only one observer per CCallInformation instance. - * - * @since S60 v5.1 - * @param aObserver Observer for notifications. - */ - void NotifyCallInformationChanges( MCallInformationObserver& aObserver ); - - /** - * Used to cancel previously placed NotifyCallInformationChanges call. - * - * @since S60 v5.1 - */ - void CancelNotification(); - - /** - * Gets the snapshot of ongoing calls. - * - * @since S60 v5.1 - * @return Ongoing calls. - */ - CCallInfoIter& GetCallsL( ); - - /** - * Returns information whether call in given state exist. - * - * @since S60 v5.2 - * @param aState Specifies a call state that is used as a search key. - * @return ETrue if call in given state exist. - */ - TBool IsCallInState( CCPCall::TCallState aState ) const; - - -private: - - CCallInformation(); - - void ConstructL(); - - -private: // data - - CCallInformationImpl* iImpl; - }; - - -#endif // MOCK_C_CALLINFORMATION_H diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformationimpl.cpp --- a/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformationimpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides implementation for CCallInformation -class. -* -*/ - - -#include -#include //Call Information Mediator API - -#include "CCallInformationImpl.h" -#include "ccallinfoiter.h" -#include "mcallinformationobserver.h" - -bool GlobalEmptyCallList; -bool GlobalTriggerSignal; - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// C++ constructor. -// --------------------------------------------------------------------------- -// -CCallInformationImpl::CCallInformationImpl() - { - - } - - -// --------------------------------------------------------------------------- -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CCallInformationImpl* CCallInformationImpl::NewL() - { - CCallInformationImpl* self = new (ELeave) CCallInformationImpl( ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CCallInformationImpl::~CCallInformationImpl() - { - delete iInfos; - delete iCallIter; - - delete iInfosInState; - delete iCallStateIter; - } - - -// --------------------------------------------------------------------------- -// Saves the observer call information changes. -// --------------------------------------------------------------------------- -// -void CCallInformationImpl::NotifyCallInformationChanges( - MCallInformationObserver& aObserver ) - { - iObserver = &aObserver; - return; - } - -// --------------------------------------------------------------------------- -// Removes the observer. -// --------------------------------------------------------------------------- -// -void CCallInformationImpl::CancelNotification( ) - { - iObserver = NULL; - return; - } - - -// --------------------------------------------------------------------------- -// Returns info about all calls. -// --------------------------------------------------------------------------- -// -CCallInfoIter& CCallInformationImpl::GetCallsL( ) - { - iInfos = CCallInfos::NewL(); - - if (!GlobalEmptyCallList) - { - TCallInfo callInfo; - int index = 0; - unsigned int serviceId = 1; - callInfo.iIndex = index; - callInfo.iServiceId = serviceId; - callInfo.iDirection= CCPCall::EMobileOriginated; - callInfo.iType = CCPCall::ECallTypeCSVoice; - callInfo.iState = CCPCall::EStateDialling; - iInfos->AddL(callInfo); - - index++; - serviceId++; - callInfo.iIndex = index; - callInfo.iServiceId = serviceId; - callInfo.iDirection= CCPCall::EMobileTerminated; - callInfo.iType = CCPCall::ECallTypeCSVoice; - callInfo.iState = CCPCall::EStateConnected; - iInfos->AddL(callInfo); - } - - iCallIter = CCallInfoIter::NewL( *iInfos ); - - return *iCallIter; - } - -// --------------------------------------------------------------------------- -// Returns information whether call in given state exist. -// --------------------------------------------------------------------------- -// -TBool CCallInformationImpl::IsCallInState( CCPCall::TCallState aState ) const - { - bool value(false); - if (aState == CCPCall::EStateConnected) - { - value = true; - } - - if( GlobalTriggerSignal ) - { - iObserver->CallInformationChanged(); - GlobalTriggerSignal=false; - } - - return value; - } - diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformationimpl.h --- a/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformationimpl.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides implementation class for CCallInformation -class. -* -*/ - - -#ifndef CCALLINFORMATIONIMPL_H_ -#define CCALLINFORMATIONIMPL_H_ - -#include -#include "mcall.h" - -// forward declarations -class MCallInformationObserver; -class CCallInfoIter; -class CCallInfos; - - -/** - * This class provides implementation for CCallInformation -class. - * - * @lib telephonyservice.lib - * @since S60 v5.1 - */ -NONSHARABLE_CLASS( CCallInformationImpl ) : public CBase - { -public: - - /** - * Two-phased constructor. - */ - static CCallInformationImpl* NewL(); - - - /** - * Destructor. - */ - virtual ~CCallInformationImpl(); - - /** - * Sets the observer for changes in current calls. - * - * @since S60 v5.1 - * @param aObserver Observer for notifications. - */ - void NotifyCallInformationChanges( MCallInformationObserver& aObserver ); - - /** - * Used to cancel previously placed NotifyCallInformationChanges call. - * - * @since S60 v5.1 - */ - void CancelNotification(); - - /** - * Gets the snapshot of ongoing calls. - * - * @since S60 v5.1 - * @return Ongoing calls. - */ - CCallInfoIter& GetCallsL(); - - - /** - * Returns information whether call in given state exist. - * - * @since S60 v5.2 - * @param aState Specifies a call state that is used as a search key. - * @return ETrue if call in given state exist. - */ - TBool IsCallInState( CCPCall::TCallState aState ) const; - -protected: - - CCallInformationImpl(); - -protected: //data - /** - * Observer to be notified when call information changes - * Not own. - */ - MCallInformationObserver* iObserver; - -private: // data - - CCallInfos* iInfos; - CCallInfos* iInfosInState; - CCallInfoIter* iCallIter; - CCallInfoIter* iCallStateIter; - }; - - -#endif /*CCALLINFORMATIONIMPL_H_*/ - diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/unit_tests.cpp --- a/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/unit_tests.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /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: Unit tests for DialService. -* -*/ - -#include - -#include "xqcallinfo.h" -#include - -extern bool GlobalEmptyCallList; -extern bool GlobalTriggerSignal; - -class TestXQCallInfo : public QObject -{ - Q_OBJECT -public: - TestXQCallInfo(); - virtual ~TestXQCallInfo(); - -public slots: - void initTestCase (); - void cleanupTestCase (); - -private slots: - void testGetCallInfo (); - void testGetCallInfoEmptyCallInfo(); - void testIsCallInState(); - -private: - - XQCallInfo *m_XQCallInfo; -}; - -TestXQCallInfo::TestXQCallInfo(): - m_XQCallInfo(0) - { - } - -TestXQCallInfo::~TestXQCallInfo () - { - } - -void TestXQCallInfo::initTestCase () - { - GlobalEmptyCallList=false; - m_XQCallInfo = XQCallInfo::create(); - } - -void TestXQCallInfo::cleanupTestCase () - { - delete m_XQCallInfo; - } - - -void TestXQCallInfo::testGetCallInfo() - { - QList calls; - CallInfo callInfo; - m_XQCallInfo->getCalls(calls); - callInfo = calls.first(); - CallInfo callInfo2; - callInfo2 = calls.last(); - - QCOMPARE(callInfo.callType(), CCPCall::ECallTypeCSVoice ); - QCOMPARE(callInfo.callDirection(), CCPCall::EMobileOriginated); - QCOMPARE(callInfo.callState(), CCPCall::EStateDialling); - - QCOMPARE(callInfo2.callType(), CCPCall::ECallTypeCSVoice ); - QCOMPARE(callInfo2.callDirection(), CCPCall::EMobileTerminated); - QCOMPARE(callInfo2.callState(), CCPCall::EStateConnected); - } - -void TestXQCallInfo::testGetCallInfoEmptyCallInfo() - { - GlobalEmptyCallList=true; - QList calls; - m_XQCallInfo->getCalls(calls); - - QCOMPARE(calls.count(), 0 ); - } - -void TestXQCallInfo::testIsCallInState() - { - GlobalTriggerSignal=true; - QSignalSpy spy( m_XQCallInfo, SIGNAL( callInformationChanged() ) ); - - GlobalEmptyCallList=false; - bool value(false); - const CCPCall::TCallState state(CCPCall::EStateConnected ); - value = m_XQCallInfo->isCallInState(CCPCall::EStateConnected); - - QCOMPARE(value, true ); - QCOMPARE( spy.count(), 1 ); - } - - -QTEST_MAIN(TestXQCallInfo) -#include "unit_tests.moc" diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/ut_xqcallinfo.pro --- a/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/ut_xqcallinfo.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = app -TARGET = -TARGET.UID3 = 0xE31F4ECE -DEPENDPATH += . -INCLUDEPATH += . -CONFIG += hb -CONFIG += qtestlib - -symbian { - - INCLUDEPATH += \epoc32\include\platform \ - \epoc32\include\platform\mw \ - \epoc32\include\mw \ - ../../../../../inc - - LIBS += -lxqservice \ - -lxqserviceutil \ - -lxqtelephonyservice - - TARGET.CAPABILITY = ALL -TCB - DEFINES += BUILD_XQCALLINFO -} - -# Input -HEADERS += ../../../../../phonesrv_plat/call_information_api/inc/xqcallinfo.h \ - ../../../inc/xqcallinfoimpl.h \ - stubs/ccallinformation.h \ - stubs/ccallinformationimpl.h -SOURCES += unit_tests.cpp -SOURCES += ../../../src/xqcallinfo.cpp \ - ../../../src/xqcallinfoimpl.cpp\ - stubs/ccallinformation.cpp \ - stubs/ccallinformationimpl.cpp \ - ../../../..\telephonyservice\src\ccallinfoiter.cpp diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/xqtelephonyservice.pri --- a/telutils/xqtelephonyservice/xqtelephonyservice.pri Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +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: -# - -SOURCES += ./src/xqcallinfo.cpp \ - ./src/xqcallinfoimpl.cpp -HEADERS += ../../phonesrv_plat/call_information_api/inc/xqcallinfo.h \ - ./inc/xqcallinfoimpl.h diff -r 7d48bed6ce0c -r 987c9837762f telutils/xqtelephonyservice/xqtelephonyservice.pro --- a/telutils/xqtelephonyservice/xqtelephonyservice.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# - -TEMPLATE = lib -TARGET = xqtelephonyservice - -symbian { - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.EPOCALLOWDLLDATA = 1 - TARGET.UID3 = 0x20029F04 - DEFINES += BUILD_XQCALLINFO - - INCLUDEPATH += ../../inc - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - - defFiles = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE bwins/xqtelephonyservice.def" \ - "$${LITERAL_HASH}else" \ - "DEFFILE eabi/xqtelephonyservice.def" \ - "$${LITERAL_HASH}endif" - - MMP_RULES += defFiles - - LIBS += -ltelephonyservice - - BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include " \ - "./rom/xqtelephonyservice.iby CORE_MW_LAYER_IBY_EXPORT_PATH(xqtelephonyservice.iby)" - - # tracing macros - headers.sources = inc/qtphonesrvlog.h - headers.path = |../../inc - for(header, headers.sources):BLD_INF_RULES.prj_exports += "$$header $$headers.path/$$basename(header)" -} - -# Input -include(xqtelephonyservice.pri) diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/inc/actioncustomitem.h --- a/vmbx/vmbxcpplugin/inc/actioncustomitem.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* - * 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: - * - */ - -#ifndef ACTIONCUSTOMITEM_H -#define ACTIONCUSTOMITEM_H - - -// System includes -#include -#include -#include - -// Forward declarations -class CpItemDataHelper; - -// Class declaration -class ActionCustomItem : public HbDataFormViewItem -{ - Q_OBJECT -public: - /*! - Constructor - */ - ActionCustomItem(QGraphicsItem *parent = 0); - - /*! - Destructor - */ - - ~ActionCustomItem(); - /*! - From base class CpPluginInterface - Form more information please check the base class. - */ - virtual HbAbstractViewItem* createItem(); - - virtual bool canSetModelIndex(const QModelIndex &index) const; - - enum { VmbxEditItem = HbDataFormModelItem::CustomItemBase + 1 }; - -protected: - - virtual HbWidget* createCustomWidget(); - -}; - -#endif // ACTIONCUSTOMITEM_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/inc/customedit.h --- a/vmbx/vmbxcpplugin/inc/customedit.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* 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: -* -*/ - -#ifndef CUSTOMEDIT_H -#define CUSTOMEDIT_H - -#include -#include - - -class CustomEdit : public HbLineEdit -{ - Q_OBJECT -public: - - /*! - Constructor - */ - explicit CustomEdit(QGraphicsItem *parent = 0); - - /*! - Distructor - */ - virtual ~CustomEdit(); - - /*! - Rewriten,from base class HbLineEdit - */ - void focusInEvent ( QFocusEvent * event ); - -signals: - - /*! - Click line edit - */ - void editItemClicked(); - -private slots: - - // emits the editItemClicked signal - void emitEditItemClicked(); - -private: - - // timer for item clicked emission - QTimer mItemClickedTimer; - -}; - -#endif //CUSTOMEDIT_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/inc/loggerutil.h --- a/vmbx/vmbxcpplugin/inc/loggerutil.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2009 -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: -* -*/ - -#ifndef __LOGGERUTIL_H -#define __LOGGERUTIL_H - -// INCLUDES -#include -#include -#include - -/*************************** - * LOGGER SETTINGS - ***************************/ - -#ifndef _DEBUG - -/** - * Logging method setting: - * 0 = No logging - * 1 = File logging, see additional comments later in this file! - * 2 = Debug output - */ -#define _LOGGERUTIL_LOGGING_METHOD 0 // UREL BUILD - -#else - #ifdef __WINS__ - #define _LOGGERUTIL_LOGGING_METHOD 1 // UDEB BUILD, WINS - #else - #define _LOGGERUTIL_LOGGING_METHOD 2 // HW UDEB - #endif // __WINS__ -#endif // _DEBUG - -// Update this prefix for your component-specific string -#define KDBGLOGPRE "VMBXUI: " - -#if _LOGGERUTIL_LOGGING_METHOD == 1 - #define KLOGGERUTILNEWLINE "\n" - // Log file location, file created if path exists - const QString KLOGGERUTILLOGFILE("c:\\logs\\vmbx\\vmbxui.txt"); -#elif _LOGGERUTIL_LOGGING_METHOD == 2 -#endif //_LOGGERUTIL_LOGGING_METHOD - -/*************************** - * FILE LOGGING IMPLEMENTATION - ***************************/ -#if _LOGGERUTIL_LOGGING_METHOD == 1 - class DbgLoggerUtil - { - public: - - // Constructor opens a file and prints newline+timestamp - // - // NOTICE the file is not closed if only constructor is run, - // other method(s) close the file later explicitly. - // - // NOTICE that file logging mode uses "append" so the file will grow - // indefinitely unless manually deleted. Reason for this is that each - // trace line opens&closes the file separately, so overwriting "truncate" - // mode would result in the file containing only the latest trace line - // and nothing more. - DbgLoggerUtil() : mFile( KLOGGERUTILLOGFILE ), mDbg( &mFile ) - { - if ( mFile.open(QFile::WriteOnly | QFile::Append/*Truncate*/) ) - { - mDbg << KLOGGERUTILNEWLINE << KDBGLOGPRE - << QTime::currentTime().toString(); - } - } - /* Debugging method, remove from production code. - ~DbgLoggerUtil() - { - qDebug() << "~DbgLoggerUtil()"; - } - */ - // This operator writes the argument to file. - template - DbgLoggerUtil &operator << (const T &aParam1) - { - // File may be already open so check first - if ( QIODevice::NotOpen == mFile.openMode() ) - { - /* result = */ mFile.open( - QFile::WriteOnly | QFile::Append/*Truncate*/); - } - if ( QIODevice::NotOpen != mFile.openMode() ) - { - mDbg << aParam1; - } - // In order to optimize the file is left open. - // Close it after logging args is finished. - return *this; - } - - // This closes the file, dummy parameter not used. - template - DbgLoggerUtil& operator ^ (const T &/*aParam1*/) - { - mFile.close(); // Also flushes the write buffer - return *this; - } - - private: - Q_DISABLE_COPY(DbgLoggerUtil) - QFile mFile; - QDebug mDbg; - }; - -// ^ operator used just for closing the file, 0 is a dummy parameter -#define _DBGLOG(AAA) DbgLoggerUtil() << AAA ^ 0; -#define _DBGLOG2(AAA,BBB) DbgLoggerUtil() << AAA << BBB ^ 0; -#define _DBGLOG3(AAA,BBB,CCC) DbgLoggerUtil() << AAA << BBB << CCC ^ 0; - -/*************************** - * DEBUG PORT LOGGING IMPLEMENTATION - ***************************/ -#elif _LOGGERUTIL_LOGGING_METHOD == 2 - -#define _DBGLOG(AAA) qDebug() << KDBGLOGPRE << AAA; -#define _DBGLOG2(AAA,BBB) qDebug() << KDBGLOGPRE << AAA << BBB; -#define _DBGLOG3(AAA,BBB,CCC) qDebug() << KDBGLOGPRE << AAA << BBB << CCC; - -#else // _LOGGERUTIL_LOGGING_METHOD == 0 or invalid - -/*************************** - * EMPTY MACROS LOGGING IS DISABLED - ***************************/ -#define _DBGLOG(AAA) -#define _DBGLOG2(AAA,BBB) -#define _DBGLOG3(AAA,BBB,CCC) - -#endif // _LOGGERUTIL_LOGGING_METHOD - -#endif // __LOGGERUTIL_H -// End of File diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/inc/vmbxcpgroup.h --- a/vmbx/vmbxcpplugin/inc/vmbxcpgroup.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2009 - 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: - * - */ - -#ifndef VMBXCPGROUP_H -#define VMBXCPGROUP_H - -// System includes -#include -#include -#include - - -// Forward declarations -class VmbxUiEngine; -class CpItemDataHelper; -class HbDataFormModelItem; - - -// Class declaration -class VmbxCpGroup : public CpSettingFormItemData -{ - Q_OBJECT - -public: - - /*! - Constructor - */ - VmbxCpGroup( - CpItemDataHelper &itemDataHelper); - - /*! - Destructor - */ - ~VmbxCpGroup(); - -private slots: - - /*! - Query cs voice number when user click line edit - */ - void queryCsVoiceNumber(); - - /*! - Query cs video number when user click line edit - */ - void queryCsVideoNumber(); - - /*! - Update number when vmbx number changed by OTA,OMA etc. - */ - void updateVmbxNumber(const TVmbxType vmbxType); - - /*! - Slot which handles item updating when it is needed. - */ - void itemShown(const QModelIndex &item); - -private: - - /*! - Preparation before loading - */ - void loadingPreparation(); - - /*! - Create the data form item by type - */ - HbDataFormModelItem* createDataFormModelItem(const TVmbxType vmbxType); - - /*! - Update the vmbx number to the UI - */ - void UpdateWidgetContent(const QModelIndex &item, const QString &string); - - -private: - - // Own. - VmbxUiEngine *mUiEngine; - - // Not own. - CpSettingFormItemData *mDefaultMailboxEditor; - - // Not own. - HbDataFormModelItem *mCsVoice1Editor; - - // Not own. - HbDataFormModelItem *mCsVideo1Editor; - - // Index - QModelIndex mCsVoice1Index; - - // Index - QModelIndex mCsVideo1Index; - - // Not own - CpItemDataHelper &mItemHelper; -}; - -#endif // VMBXCPGROUP_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/inc/vmbxcpplugin.h --- a/vmbx/vmbxcpplugin/inc/vmbxcpplugin.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2009 - 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: - * - */ - -#ifndef VMBXCPPLUGIN_H -#define VMBXCPPLUGIN_H - -// System includes -#include -#include - -// Forward declarations -class CpItemDataHelper; - -// Class declaration -class VmbxCpPlugin : public QObject, public CpPluginInterface -{ - Q_OBJECT - Q_INTERFACES(CpPluginInterface) - -public: - /*! - Constructor - */ - VmbxCpPlugin(); - - /*! - Destructor - */ - ~VmbxCpPlugin(); - - /*! - From base class CpPluginInterface - Form more information please check the base class. - */ - virtual QList createSettingFormItemData( - CpItemDataHelper &itemDataHelper) const; -}; - -#endif // VMBXCPPLUGIN_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/inc/vmbxuiengine.h --- a/vmbx/vmbxcpplugin/inc/vmbxuiengine.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2009 - 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: - * - */ -#ifndef VMBXUIENGINE_H -#define VMBXUIENGINE_H - -// System includes -#include -#include -#include - -// Forward declarations -class CVoiceMailbox; -class TVoiceMailboxParams; - -// Class declaration -class VmbxUiEngine : public QObject, public MVoiceMailboxObserver -{ - Q_OBJECT - -public: - - /*! - Constructor. - */ - VmbxUiEngine(); - - /*! - Destructor - */ - ~VmbxUiEngine(); - -public: - - /*! - Getter method for primary voice number of Voice Mailbox. - @param aValue Retrieved number. - */ - void getCsVoiceNumber(QString &aValue); - - /*! - Getter method for primary video number of Voice Mailbox. - @param aValue Retrieved number. - */ - void getCsVideoNumber(QString &aValue); - - /*! - Set number when cs voice number has been edited on UI. - @param aValue New value. - */ - void setCsVoiceNumber( const QString &aValue ); - - /*! - Set number when cs voice number has been edited on UI. - @param aValue New value. - */ - void setCsVideoNumber( const QString &aValue ); - - /*! - If video mailbox supported. - */ - bool isVideoSupport(); - - /*! - If voice mailbox is writable. - */ - bool isVoiceWritable(); - - /*! - If video mailbox is writable. - */ - bool isVideoWritable(); - - - // Add new Getter methods for other voice mailbox types - - /*! - From MVoiceMailboxObserver - Observer callback for number/address change notification - from voice mailbox engine. - The UI should be notified to update the number. - @param aVmbxEntry New voicemailbox entry. - */ - void HandleNotifyL(const CVoiceMailboxEntry &aVmbxEntry); - - /*! - Query number when cs voice number has been edited on UI. - @param aValue New value. - */ - int queryVoiceNumber(QString &aValue); - - /*! - Query number when cs video number has been edited on UI. - @param aValue New value. - */ - int queryVideoNumber(QString &aValue); - - /*! - Request notify when VMBX number changed - @param aNotifyOnActiveLineOnly Only active line or NOT - */ - void notifyVmbxNumberChange(bool aNotifyOnActiveLineOnly); - -signals: - - /*! - Signal emitted when voice mailbox data has been updated. - */ - void voiceMailboxEngineEntriesUpdated(const TVmbxType vmbxType); - - -private: // New Method - - /*! - Initialize vmbx ui engine. - */ - void init(); - - /*! - Getter method for primary voice number of Voice Mailbox. - @param aValue Retrieved number. - */ - void getCsVoicePrimaryNumber(QString &aValue); - - /*! - Getter method for primary video number of Voice Mailbox. - @param aValue Retrieved number. - */ - void getCsVideoPrimaryNumber(QString &aValue); - - /*! - Getter method for voice mailbox number. - @param aParam Identify voice mailbox type - @param aValue Retrieved number. - */ - void getNumber(const TVoiceMailboxParams &aParam, - QString &aValue); - - /*! - Setter method for voice mailbox number. - @param aParam Identify voice mailbox type - @param aValue Retrieved number. - */ - void setNumber(const TVoiceMailboxParams &aParam, - const QString &aValue); - - /*! - Query method for voice mailbox number. - @param aParam Identify voice mailbox type - @param aValue Retrieved number. - */ - int queryNumber(const TVoiceMailboxParams &aParam, QString &aValue); - - -private: - - /*! - Symbian voice mailbox engine which offers basic entry retrieval, - saving, querying etc. services. - Own. - */ - CVoiceMailbox *mVmbxEngine; - /*! - Cs voice number - */ - QString mCsVoiceNumber; - - /*! - Cs video number - */ - QString mCsVideoNumber; - -}; - -#endif // VMBXUIENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/rom/rom.pri --- a/vmbx/vmbxcpplugin/rom/rom.pri Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +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: -# - -symbian: { - BLD_INF_RULES.prj_exports += \ - "$${LITERAL_HASH}include" \ - "rom/vmbxcpplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxcpplugin.iby)" \ - "rom/vmbxcpplugin_stub.sis /epoc32/data/z/system/install/vmbxcpplugin_stub.sis" -} \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/rom/vmbxcpplugin.iby --- a/vmbx/vmbxcpplugin/rom/vmbxcpplugin.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - -/* -* Copyright (c) 2009 - 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: -* -*/ - -file=ABI_DIR\BUILD_DIR\vmbxcpplugin.dll SHARED_LIB_DIR\vmbxcpplugin.dll - - -data=\epoc32\data\c\resource\qt\plugins\controlpanel\vmbxcpplugin.qtplugin resource\qt\plugins\controlpanel\vmbxcpplugin.qtplugin - -// sis stub file -data=ZSYSTEM\install\vmbxcpplugin_stub.sis System\Install\vmbxcpplugin_stub.sis diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/rom/vmbxcpplugin.pkg --- a/vmbx/vmbxcpplugin/rom/vmbxcpplugin.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -; -; 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". -; - -; Language -&EN - -; SIS header: name, uid, version -#{"vmbxcpplugin"},(0x20029F5D),10, 1, 0, TYPE=PU - -; Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -; DEPLOYMENT -"\epoc32\release\armv5\urel\vmbxcpplugin.dll" - "!:\sys\bin\vmbxcpplugin.dll" -"\sf\mw\phonesrv\vmbx\vmbxcpplugin\qmakepluginstubs\vmbxcpplugin.qtplugin" - "!:\resource\qt\plugins\controlpanel\vmbxcpplugin.qtplugin" - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.pkg --- a/vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -; -; Copyright (c) 2009-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: For packing vmbxcpplugin stub. -; -; Languages -&EN - -; Header -#{"vmbxcpplugin"},(0x20029F5D),1,0,0,TYPE=SA - -;Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -;Files -""-"!:\sys\bin\vmbxcpplugin.dll" -""-"!:\resource\qt\plugins\controlpanel\vmbxcpplugin.qtplugin" diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.sis Binary file vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.sis has changed diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/src/actioncustomitem.cpp --- a/vmbx/vmbxcpplugin/src/actioncustomitem.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* - * 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: - * - */ - -// System includes -#include -#include - -#include -#include -#include "customedit.h" - -// User includes -#include "actioncustomitem.h" -#include "loggerutil.h" - -/*! - Constructor -*/ -ActionCustomItem::ActionCustomItem(QGraphicsItem *parent) - : HbDataFormViewItem(parent) -{ - _DBGLOG("ActionCustomItem::ActionCustomItem()") -} - -/*! - Destructor -*/ -ActionCustomItem::~ActionCustomItem() -{ - _DBGLOG("VmbxCpPlugin::~ActionCustomItem()") -} - -/*! - From base class HbDataFormViewItem -*/ -HbAbstractViewItem* ActionCustomItem::createItem() -{ - _DBGLOG("ActionCustomItem::createItem <>") - return new ActionCustomItem(*this); -} - -/*! - From base class HbDataFormViewItem -*/ -HbWidget* ActionCustomItem::createCustomWidget() -{ - _DBGLOG("ActionCustomItem::createCustomWidget >") - int type = modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt(); - - CustomEdit *edit = 0; - if (type == VmbxEditItem) { - edit = new CustomEdit(this); - edit->setEchoMode(HbLineEdit::Normal ); - edit->setReadOnly(true); - _DBGLOG("ActionCustomItem::createCustomWidget customItem editor") - } - _DBGLOG("ActionCustomItem::createCustomWidget default<") - return edit; -} - -bool ActionCustomItem::canSetModelIndex(const QModelIndex &index) const -{ - _DBGLOG("ActionCustomItem::canSetModelIndex >") - int type = index.data(HbDataFormModelItem::ItemTypeRole).toInt(); - return type == VmbxEditItem; -} - - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/src/customedit.cpp --- a/vmbx/vmbxcpplugin/src/customedit.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* 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: -* -*/ - -#include "customedit.h" -#include "loggerutil.h" - -/*! - Constructor -*/ -CustomEdit::CustomEdit(QGraphicsItem *parent) - : HbLineEdit(parent) -{ - _DBGLOG("CustomEdit::CustomEdit() >") - const bool ret = connect(&mItemClickedTimer, SIGNAL(timeout()), - this, SLOT(emitEditItemClicked())); - _DBGLOG2("CustomEdit::CustomEdit() <", ret) -} - -/*! - Distructor -*/ -CustomEdit::~CustomEdit() -{ - _DBGLOG("CustomEdit::CustomEdit()") - disconnect(&mItemClickedTimer, SIGNAL(timeout()), - this, SLOT(emitEditItemClicked())); -} - -/*! - focusInEvent -*/ -void CustomEdit::focusInEvent(QFocusEvent *event) -{ - _DBGLOG("CustomEdit::focusInEvent() >") - if (!event->gotFocus()) { - _DBGLOG("CustomEdit::focusInEvent() ignore") - event->ignore(); - } else { - _DBGLOG("CustomEdit::focusInEvent() emit clicked") - // When focus comes to the controller, a 100 ms timer is started. - // a signal is emitted after this 100 ms, and focus transfer to other controller, - // after the other controller finished,to avoid focus gained again. - mItemClickedTimer.start(100); - event->accept(); - } - _DBGLOG("CustomEdit::focusInEvent() <") -} - -/*! - emitEditItemClicked -*/ -void CustomEdit::emitEditItemClicked() -{ - _DBGLOG("CustomEdit::emitEditItemClicked() >") - emit editItemClicked(); - mItemClickedTimer.stop(); - _DBGLOG("CustomEdit::emitEditItemClicked() <") -} - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp --- a/vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,260 +0,0 @@ -/* - * Copyright (c) 2009 - 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: - * - */ - -// System includes -#include -#include -#include -#include -#include -#include -#include -#include "actioncustomitem.h" - -// User includes -#include "vmbxuiengine.h" -#include "vmbxcpgroup.h" -#include "loggerutil.h" - -/*! - Constructor -*/ -VmbxCpGroup::VmbxCpGroup( - CpItemDataHelper &itemDataHelper) : - CpSettingFormItemData(HbDataFormModelItem::GroupItem, - hbTrId("txt_phone_subhead_call_mbx"), NULL), - mUiEngine(NULL), - mDefaultMailboxEditor(NULL), - mCsVoice1Editor(NULL), - mCsVideo1Editor(NULL), - mItemHelper(itemDataHelper) -{ - _DBGLOG("VmbxCpGroup::VmbxCpGroup >") - // Localization file loading - QTranslator translator; - QString lang = QLocale::system().name(); - QString path = "z:/resource/qt/translations/"; - - bool translatorLoaded = translator.load(path + "telephone_cp_" + lang); - _DBGLOG("VmbxCpGroup::VmbxCpGroup translator loaded") - if (translatorLoaded && qApp) { - qApp->installTranslator(&translator); - _DBGLOG("VmbxCpGroup::VmbxCpGroup translator installed") - } - - mUiEngine = new VmbxUiEngine(); - - loadingPreparation(); - - // Request notify when VMBX number changed - mUiEngine->notifyVmbxNumberChange(true); - bool ret = connect(mUiEngine, - SIGNAL(voiceMailboxEngineEntriesUpdated(const TVmbxType)), - this, SLOT(updateVmbxNumber(const TVmbxType))); - _DBGLOG2("VmbxCpGroup::VmbxCpGroup connect ret=", ret) - _DBGLOG("VmbxCpGroup::VmbxCpGroup <") -} - -/*! - Destructor -*/ -VmbxCpGroup::~VmbxCpGroup() -{ - _DBGLOG("VmbxCpGroup::~VmbxCpGroup") - if (mUiEngine) { - delete mUiEngine; - mUiEngine = NULL; - } -} - -/*! - Preparation before loading -*/ -void VmbxCpGroup::loadingPreparation() -{ - _DBGLOG("VmbxCpGroup::loadingPreparation >") - - ActionCustomItem *viewItem = new ActionCustomItem(); - mItemHelper.addItemPrototype(viewItem); - mItemHelper.connectToForm( - SIGNAL(itemShown(QModelIndex)), this, SLOT(itemShown(QModelIndex))); - - // Create cs voice primary editor - mCsVoice1Editor= createDataFormModelItem(EVmbxVoice); - if (mUiEngine->isVideoSupport()){ - _DBGLOG("VmbxCpGroup::loadingPreparation create video1 mailbox") - mCsVideo1Editor= createDataFormModelItem(EVmbxVideo); - } - _DBGLOG("VmbxCpGroup::loadingPreparation <") -} - -HbDataFormModelItem* VmbxCpGroup::createDataFormModelItem( - const TVmbxType vmbxType) -{ - _DBGLOG("VmbxCpGroup::createDataFormModelItem >") - QString number(""); - HbDataFormModelItem *item = 0; - QString name(""); - bool create(false); - if (EVmbxVoice == vmbxType) { - _DBGLOG("VmbxCpGroup::createDataFormModelItem voice") - name = hbTrId("txt_phone_setlabel_default_mbx_val_voice"); - create = true; - } else if (EVmbxVideo == vmbxType) { - _DBGLOG("VmbxCpGroup::createDataFormModelItem video") - name = hbTrId("txt_phone_setlabel_default_mbx_val_video"); - create = true; - } - if (create) { - item = new HbDataFormModelItem( - static_cast( - ActionCustomItem::VmbxEditItem),name); - - appendChild(item); - - if (EVmbxVoice == vmbxType) { - if (mUiEngine->isVoiceWritable()) { - _DBGLOG("VmbxCpGroup::createDataFormModelItem add voice") - mItemHelper.addConnection(item, SIGNAL(editItemClicked()), - this, SLOT(queryCsVoiceNumber())); - }else { - _DBGLOG("VmbxCpGroup::createDataFormModelItem voice no read") - item->setEnabled(false); - } - } else if (EVmbxVideo == vmbxType) { - if (mUiEngine->isVideoWritable()) { - _DBGLOG("VmbxCpGroup::createDataFormModelItem add video") - mItemHelper.addConnection(item, SIGNAL(editItemClicked()), - this, SLOT(queryCsVideoNumber())); - }else { - _DBGLOG("VmbxCpGroup::createDataFormModelItem video no read") - item->setEnabled(false); - } - } - } - _DBGLOG("VmbxCpGroup::createDataFormModelItem <") - return item; -} - -/*! - Query voice number -*/ -void VmbxCpGroup::queryCsVoiceNumber() -{ - _DBGLOG("VmbxCpGroup::queryCsVoiceNumber >") - mCsVoice1Editor->setEnabled(false); - QString number; - int result = mUiEngine->queryVoiceNumber(number); - _DBGLOG2("VmbxCpGroup::queryCsVoiceNumber result=", result) - if (KErrNone == result) { - _DBGLOG2("VmbxCpGroup::queryCsVoiceNumber >, number=", number) - mUiEngine->setCsVoiceNumber(number); - UpdateWidgetContent(mCsVoice1Index, number); - } - mCsVoice1Editor->setEnabled(true); - _DBGLOG("VmbxCpGroup::queryCsVoiceNumber <") -} - -/*! - Query video number -*/ -void VmbxCpGroup::queryCsVideoNumber() -{ - _DBGLOG("VmbxCpGroup::queryCsVideoNumber >") - mCsVideo1Editor->setEnabled(false); - QString number; - int result = mUiEngine->queryVideoNumber(number); - _DBGLOG2("VmbxCpGroup::queryCsVideoNumber result=", result) - if (KErrNone == result) { - _DBGLOG2("VmbxCpGroup::queryCsVideoNumber >, number=", number) - mUiEngine->setCsVideoNumber(number); - UpdateWidgetContent(mCsVideo1Index, number); - } - mCsVideo1Editor->setEnabled(true); - _DBGLOG("VmbxCpGroup::queryCsVideoNumber <") -} - -/*! - Update number when vmbx number changed by OTA,OMA etc. -*/ -void VmbxCpGroup::updateVmbxNumber(const TVmbxType vmbxType) -{ - _DBGLOG("VmbxCpGroup::updateVmbxNumber >") - - QString number(""); - if (EVmbxVoice == vmbxType) { - if (mCsVoice1Editor && mUiEngine){ - mUiEngine->getCsVoiceNumber(number); - _DBGLOG2("VmbxCpGroup::updateVmbxNumber\ - number=", number) - UpdateWidgetContent(mCsVoice1Index, number); - } - } else if (EVmbxVideo == vmbxType) { - if (mCsVideo1Editor && mUiEngine){ - mUiEngine->getCsVideoNumber(number); - _DBGLOG2("VmbxCpGroup::updateVmbxNumber\ - newUiValue=", number) - UpdateWidgetContent(mCsVideo1Index, number); - } - } - _DBGLOG("VmbxCpGroup::updateVmbxNumber <") -} - -/*! - slot for item has been shown on the UI - */ -void VmbxCpGroup::itemShown(const QModelIndex &item) -{ - _DBGLOG("VmbxCpGroup::itemShown >") - - HbDataFormModelItem* modelItem = mItemHelper.modelItemFromModelIndex(item); - - if (modelItem == mCsVoice1Editor ) { - _DBGLOG("VmbxCpGroup::itemShown voice") - mCsVoice1Index = item; - updateVmbxNumber(EVmbxVoice); - }else if (modelItem == mCsVideo1Editor ) { - _DBGLOG("VmbxCpGroup::itemShown video") - mCsVideo1Index = item; - updateVmbxNumber(EVmbxVideo); - } - _DBGLOG("VmbxCpGroup::itemShown <") -} - -/*! - Update the vmbx number to the UI - */ -void VmbxCpGroup::UpdateWidgetContent(const QModelIndex &item, - const QString &string) -{ - _DBGLOG("VmbxCpGroup::UpdateWidgetContent >") - HbLineEdit* widget = static_cast( - mItemHelper.widgetFromModelIndex(item)); - if (widget) { - _DBGLOG("VmbxCpGroup::UpdateWidgetContent widegt found") - widget->setText(string); - } - if (item == mCsVoice1Index) { - mCsVoice1Editor->setContentWidgetData("setText", string); - } else if (item == mCsVideo1Index) { - mCsVideo1Editor->setContentWidgetData("setText", string); - } - _DBGLOG("VmbxCpGroup::UpdateWidgetContent <") - -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/src/vmbxcpplugin.cpp --- a/vmbx/vmbxcpplugin/src/vmbxcpplugin.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2009 - 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: - * - */ - -// System includes -#include -#include - -// User includes -#include "vmbxcpplugin.h" -#include "vmbxcpgroup.h" -#include "loggerutil.h" - -/*! - Constructor -*/ -VmbxCpPlugin::VmbxCpPlugin() -{ - _DBGLOG("VmbxCpPlugin::VmbxCpPlugin()") -} - -/*! - Destructor -*/ -VmbxCpPlugin::~VmbxCpPlugin() -{ - _DBGLOG("VmbxCpPlugin::~VmbxCpPlugin()") -} - -/*! - From base class CpPluginInterface -*/ -QList VmbxCpPlugin::createSettingFormItemData( - CpItemDataHelper &itemDataHelper) const -{ - _DBGLOG("VmbxCpPlugin::createSettingFormItemData") - QList ret; - ret.append(new VmbxCpGroup(itemDataHelper)); - _DBGLOG("VmbxCpPlugin::createSettingFormItemData created") - return ret; -} -Q_EXPORT_PLUGIN2(VmbxCpPlugin, VmbxCpPlugin); - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/src/vmbxuiengine.cpp --- a/vmbx/vmbxcpplugin/src/vmbxuiengine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,337 +0,0 @@ -/* - * Copyright (c) 2009 - 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: - * - */ - -// System includes -#include -#include - -// User includes -#include "vmbxuiengine.h" -#include "loggerutil.h" - -/*! - Constructor -*/ -VmbxUiEngine::VmbxUiEngine() : mVmbxEngine(NULL), - mCsVoiceNumber(""),mCsVideoNumber("") -{ - _DBGLOG("VmbxUiEngine::VmbxUiEngine >") - QT_TRAP_THROWING(mVmbxEngine = CVoiceMailbox::NewL()); - init(); - _DBGLOG("VmbxUiEngine::VmbxUiEngine <") -} - -/*! - Destructor -*/ -VmbxUiEngine::~VmbxUiEngine() -{ - _DBGLOG( "VmbxUiEngine::~VmbxUiEngine >") - mVmbxEngine->NotifyVmbxNumberChangeCancel(); - delete mVmbxEngine; - mVmbxEngine = NULL; - _DBGLOG( "VmbxUiEngine::~VmbxUiEngine <") -} - -/*! - Initialize vmbx ui engine. -*/ -void VmbxUiEngine::init() -{ - _DBGLOG("VmbxUiEngine::init >") - // Init voice primary line number - getCsVoicePrimaryNumber(mCsVoiceNumber); - // Init video primary line nubmer - if (isVideoSupport()) { - getCsVideoPrimaryNumber(mCsVideoNumber); - } - _DBGLOG("VmbxUiEngine::init <") -} - -/*! - Getter method for primary voice number of Voice Mailbox. -*/ -void VmbxUiEngine::getCsVoiceNumber(QString &aValue) -{ - _DBGLOG("VmbxUiEngine::getCsVoiceNumber >") - aValue = mCsVoiceNumber; - _DBGLOG2("VmbxUiEngine::getCsVoiceNumber < , string=", aValue) -} - -/*! - Getter method for primary video number of Voice Mailbox. -*/ -void VmbxUiEngine::getCsVideoNumber(QString &aValue) -{ - _DBGLOG("VmbxUiEngine::getCsVideoNumber >") - aValue = mCsVideoNumber; - _DBGLOG2("VmbxUiEngine::getCsVideoNumber < , string=", aValue) -} - -/*! - Set number when cs voice number has been edited on UI. - @param aValue New value. -*/ -void VmbxUiEngine::setCsVoiceNumber(const QString &aValue) -{ - _DBGLOG2("VmbxUiEngine::setCsVoiceNumber >, value=",aValue) - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVoice; - vmbxParams.iLineType = EVmbxAlsLine1; - vmbxParams.iServiceId = KVmbxServiceVoice; - setNumber(vmbxParams, aValue); - mCsVoiceNumber = aValue; - _DBGLOG("VmbxUiEngine::setCsVoiceNumber <"); -} - -/*! - Set number when cs video number has been edited on UI. - @param aValue New value. -*/ -void VmbxUiEngine::setCsVideoNumber(const QString &aValue) -{ - _DBGLOG2("VmbxUiEngine::setCsVideoNumber >, value=",aValue) - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVideo; - vmbxParams.iLineType = EVmbxAlsLine1; - vmbxParams.iServiceId = KVmbxServiceVideo; - setNumber(vmbxParams, aValue); - mCsVideoNumber = aValue; - _DBGLOG("VmbxUiEngine::setCsVideoNumber <"); -} - -/*! - If video mailbox supported. -*/ -bool VmbxUiEngine::isVideoSupport() -{ - _DBGLOG("VmbxUiEngine::isVideoSupport >") - // video support - bool isVideoSupport(false); - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVideo; - vmbxParams.iLineType = EVmbxAlsLine1; - vmbxParams.iServiceId = KVmbxServiceVideo; - isVideoSupport = mVmbxEngine->CheckConfiguration(vmbxParams, - EVmbxVideoMailboxSupported); - _DBGLOG2("VmbxUiEngine::isVideoSupport ", isVideoSupport); - return isVideoSupport; -} - -/*! - If voice mailbox allow to write. -*/ -bool VmbxUiEngine::isVoiceWritable() -{ - _DBGLOG("VmbxUiEngine::isVoiceWritable >") - bool isVoiceWritable(false); - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVoice; - vmbxParams.iLineType = EVmbxAlsLine1; - vmbxParams.iServiceId = KVmbxServiceVoice; - isVoiceWritable = mVmbxEngine->CheckConfiguration(vmbxParams, - EVmbxChangeNbrAllowedOnUi); - _DBGLOG2("VmbxUiEngine::isVoiceWritable <", isVoiceWritable); - return isVoiceWritable; -} - -/*! - If video mailbox allow to write. -*/ -bool VmbxUiEngine::isVideoWritable() -{ - _DBGLOG( "VmbxUiEngine::isVideoWritable >") - bool isVideoWritable(false); - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVideo; - vmbxParams.iLineType = EVmbxAlsLine1; - vmbxParams.iServiceId = KVmbxServiceVideo; - isVideoWritable = mVmbxEngine->CheckConfiguration(vmbxParams, - EVmbxChangeNbrAllowedOnUi); - _DBGLOG2("VmbxUiEngine::isVoiceWritable >", isVideoWritable); - return isVideoWritable; -} - -/*! - queryVoiceNumber -*/ -int VmbxUiEngine::queryVoiceNumber(QString &aValue) -{ - _DBGLOG2("VmbxUiEngine::queryVoiceNumber >, value=",aValue) - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVoice; - vmbxParams.iServiceId = KVmbxServiceVoice; - int result = queryNumber(vmbxParams, aValue); - _DBGLOG2("VmbxUiEngine::queryVoiceNumber <, value=", aValue) - return result; -} - -/*! - queryVideoNumber -*/ -int VmbxUiEngine::queryVideoNumber(QString &aValue) -{ - _DBGLOG2("VmbxUiEngine::queryVideoNumber >, value=", aValue) - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVideo; - vmbxParams.iServiceId = KVmbxServiceVideo; - int result = queryNumber(vmbxParams, aValue); - _DBGLOG2("VmbxUiEngine::queryVideoNumber <, value=", aValue) - return result; -} - -/*! - Request notify when VMBX number changed - */ -void VmbxUiEngine::notifyVmbxNumberChange(bool aNotifyOnActiveLineOnly) -{ - _DBGLOG2("VmbxUiEngine::notifyVmbxNumberChange >, OnActiveLineOnly=", - aNotifyOnActiveLineOnly) - QT_TRAP_THROWING(mVmbxEngine->NotifyVmbxNumberChangeL - (*this, aNotifyOnActiveLineOnly)); - _DBGLOG2("VmbxUiEngine::notifyVmbxNumberChange <, OnActiveLineOnly=", - aNotifyOnActiveLineOnly) -} - -/*! - Callback from voice mailbox engine when number has been updated - This method notifies the UI to refresh its data. -*/ -void VmbxUiEngine::HandleNotifyL(const CVoiceMailboxEntry &aVmbxEntry) -{ - _DBGLOG( "VmbxUiEngine::HandleNotifyL >") - TVmbxType type = aVmbxEntry.VoiceMailboxType(); - TPtrC number(KNullDesC); - aVmbxEntry.GetVmbxNumber(number); - if (EVmbxVoice == type) { - mCsVoiceNumber = QString::fromUtf16(number.Ptr(), number.Length()); - } else if (EVmbxVideo == type) { - mCsVideoNumber = QString::fromUtf16(number.Ptr(), number.Length()); - } - emit voiceMailboxEngineEntriesUpdated(type); - _DBGLOG( "VmbxUiEngine::HandleNotifyL <") -} - -/*! - Getter method for primary voice number of Voice Mailbox. -*/ -void VmbxUiEngine::getCsVoicePrimaryNumber(QString &aValue) -{ - _DBGLOG("VmbxUiEngine::getCsVoicePrimaryNumber >") - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVoice; - vmbxParams.iLineType = EVmbxAlsLine1; - vmbxParams.iServiceId = KVmbxServiceVoice; - getNumber(vmbxParams, aValue); - _DBGLOG2("VmbxUiEngine::getCsVoicePrimaryNumber < , string=", aValue) -} - -/*! - Getter method for primary video number of Voice Mailbox. -*/ -void VmbxUiEngine::getCsVideoPrimaryNumber(QString &aValue) -{ - _DBGLOG("VmbxUiEngine::getCsVideoPrimaryNumber >") - TVoiceMailboxParams vmbxParams; - vmbxParams.iType = EVmbxVideo; - vmbxParams.iLineType = EVmbxAlsLine1; - vmbxParams.iServiceId = KVmbxServiceVideo; - getNumber(vmbxParams, aValue); - _DBGLOG2("VmbxUiEngine::getCsVideoPrimaryNumber < , string=", aValue) -} - -/*! - Private getter method for voice mailbox number. -*/ -void VmbxUiEngine::getNumber(const TVoiceMailboxParams &aParam, - QString &aValue) -{ - _DBGLOG("VmbxUiEngine::getNumber >") - CVoiceMailboxEntry* vmbxEntry = NULL; - TInt result = mVmbxEngine->GetStoredEntry( aParam, vmbxEntry ); - _DBGLOG2("VmbxUiEngine::getNumber, GetStoredEntry result=", result); - if ( KErrNone == result && vmbxEntry ){ - TPtrC entryNumber( KNullDesC ); - result = vmbxEntry->GetVmbxNumber( entryNumber ); - _DBGLOG3("VmbxUiEngine::getNumber, GetVmbxNumber result=", - result, - " but ignore code and allow returning of an empty string to UI"); - aValue = QString::fromUtf16(entryNumber.Ptr(), entryNumber.Length()); - } - delete vmbxEntry; - vmbxEntry = NULL; - _DBGLOG2("VmbxUiEngine::getNumber < , string=", aValue) -} - -/*! - Setter method for voice mailbox number. -*/ -void VmbxUiEngine::setNumber(const TVoiceMailboxParams &aParam, - const QString &aValue) -{ - _DBGLOG("VmbxUiEngine::setNumber >") - - CVoiceMailboxEntry* vmbxEntry = NULL; - QT_TRAP_THROWING(vmbxEntry = CVoiceMailboxEntry::NewL()); - vmbxEntry->SetServiceId(aParam.iServiceId); - vmbxEntry->SetVoiceMailboxType(aParam.iType); - vmbxEntry->SetVmbxAlsLineType(aParam.iLineType); - _DBGLOG2("VmbxUiEngine::setNumber, SetVmbxNumber aValue=", aValue); - _DBGLOG( "VmbxUiEngine::setNumber: cast to TPtrC") - TPtrC newNumber( - reinterpret_cast( aValue.utf16() ), - aValue.length() ); - int result = vmbxEntry->SetVmbxNumber( newNumber ); - if ( KErrNone == result ) { - result = mVmbxEngine->SaveEntry( *vmbxEntry ); - _DBGLOG2("VmbxUiEngine::setNumber, SaveEntry result=", result); - } - delete vmbxEntry; - vmbxEntry = 0; - _DBGLOG("VmbxUiEngine::setNumber <"); -} - -/*! - Query method for voice mailbox number. -*/ -int VmbxUiEngine::queryNumber(const TVoiceMailboxParams &aParam, - QString &aValue) -{ - _DBGLOG2("VmbxUiEngine::queryNumber >, value=", aValue) - getNumber(aParam, aValue); - CVoiceMailboxEntry *vmbxEntry = NULL; - int result(0); - if (aValue.length() > 0) { - result = mVmbxEngine->QueryChangeEntry(aParam, vmbxEntry); - } else { - result = mVmbxEngine->QueryNewEntry(aParam, vmbxEntry); - } - if (KErrNone == result && vmbxEntry) { - TPtrC entryNumber(KNullDesC); - result = vmbxEntry->GetVmbxNumber(entryNumber); - _DBGLOG3("VmbxUiEngine::queryNumber, GetVmbxNumber result=", - result, - " but ignore code and allow returing of an empty string to UI"); - aValue = QString::fromUtf16(entryNumber.Ptr(), entryNumber.Length()); - } - delete vmbxEntry; - vmbxEntry = NULL; - _DBGLOG2("VmbxUiEngine::queryNumber <, value=", aValue) - return result; -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/inc/ut_actioncustomitem.h --- a/vmbx/vmbxcpplugin/tsrc/inc/ut_actioncustomitem.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* 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: Implementation of the Ut_vmbxCpPlugin class -* -*/ - - -#ifndef UT_ACTIONCUSTOMIEM_H -#define UT_CUSTOMCONTROLS_H - -#include -#include - -class Ut_ActionCustomItem : public QObject -{ - Q_OBJECT - -private slots: - void testNewAndDelete(); - void testCreateItem(); - void testCanSetModelIndex(); -}; - -#endif // UT_CUSTOMCONTROLS_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/inc/ut_customedit.h --- a/vmbx/vmbxcpplugin/tsrc/inc/ut_customedit.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* 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: Implementation of the Ut_vmbxCpPlugin class -* -*/ - - -#ifndef UT_CUSTOMEDIT_H -#define UT_CUSTOMEDIT_H - -#include -#include - -class Ut_CustomEdit : public QObject -{ - Q_OBJECT - -private slots: - void testFocusInEvent(); - -}; - -#endif // UT_CUSTOMEDIT_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxcpplugin.h --- a/vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxcpplugin.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2009 - 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: Implementation of the Ut_vmbxCpPlugin class -* -*/ - - -#ifndef UT_VMBXCPPLUGIN_H -#define UT_VMBXCPPLUGIN_H - -// System includes -#include -#include - -/*! - Ut_vmbxCpPlugin module test class. - - Tests Ut_vmbxCpPlugin interface. - See cpp file for more information. - - @lib Ut_vmbxCpPlugin.lib -*/ - -// Class declaration -class Ut_vmbxCpPlugin : public QObject -{ - Q_OBJECT - -private slots: - - /*! - Test method in VmbxCpPlugin - */ - void testCreateSettingFormItemData(); - - /*! - Test method in VmbxCpGroup - */ - void testCreateVmbxCpGroup(); -}; - -#endif // _UT_VMBXCPPLUGIN_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxuiengine.h --- a/vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxuiengine.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2009 - 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: Implementation of the Ut_VmbxUiEngine class -* -*/ - - -#ifndef UT_VMBXUIENGINE_H -#define UT_VMBXUIENGINE_H - -#include - -// Class forwards -class VmbxUiEngine; - -static TInt globalExpRet; -static QString globalNumber; - -/*! - Ut_VmbxUiEngine module test class. - - Tests Ut_VmbxUiEngine interface. - See cpp file for more information. - - @lib Ut_VmbxUiEngine.lib -*/ -class Ut_VmbxUiEngine : public QObject -{ - Q_OBJECT - -private slots: - - void initTestCase(); - void cleanupTestCase(); - - void testCsVoice1Number(); - void testCsVideo1Number(); - void testIsVideoSupport(); - void testHandleNotifyL(); - -private: //data - - /*! - Own. - */ - VmbxUiEngine *mUiEngine; -}; - -#endif // _UT_VMBXUIENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/src/main.cpp --- a/vmbx/vmbxcpplugin/tsrc/src/main.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -#include -#include "ut_vmbxcpplugin.h" -#include "ut_vmbxuiengine.h" -#include "ut_actioncustomitem.h" -#include "ut_customedit.h" - -// ----------------------------------------------------------------------------- -// main() -// Main method implemented for directing test output to a file. -// ----------------------------------------------------------------------------- -int main(int argc, char *argv[]) - { - qDebug("main() >"); - - QApplication app(argc, argv); - - qDebug("ut_vmbxuiengine"); - Ut_VmbxUiEngine tcUiEngine; - char *pass[3]; - pass[0] = argv[0]; - pass[1] = "-o"; - pass[2] = "c:\\logs\\vmbx\\ut_vmbxuiengine.txt"; - int result = -1; - result = QTest::qExec(&tcUiEngine, 3, pass); - qDebug("ut_vmbxuiengine result %d", result); - - qDebug("ut_vmbxcpplugin"); - Ut_vmbxCpPlugin tcCpPlugin; - pass[2] = "c:\\logs\\vmbx\\ut_vmbxcpplugin.txt"; - result = QTest::qExec(&tcCpPlugin, 3, pass); - qDebug("ut_vmbxcpplugin result=%d", result); - - qDebug("ut_actioncustomitem"); - Ut_ActionCustomItem tcCustom; - pass[2] = "c:\\logs\\vmbx\\ut_acttioncustomitem.txt"; - result = QTest::qExec(&tcCustom, 3, pass); - qDebug("ut_actioncustomitem result=%d", result); - - qDebug("ut_customedit"); - Ut_CustomEdit tcEdit; - pass[2] = "c:\\logs\\vmbx\\ut_customedit.txt"; - result = QTest::qExec(&tcEdit, 3, pass); - qDebug("Ut_CustomEdit result=%d", result); - - - qDebug("main() <"); - return result; - } -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/src/ut_actioncustomitem.cpp --- a/vmbx/vmbxcpplugin/tsrc/src/ut_actioncustomitem.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* 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: Implementation of the Ut_vmbxCpPlugin class -* -*/ - -#include -#include -#include -#include -#include "ut_actioncustomitem.h" -#include "actioncustomitem.h" -#include "customedit.h" - -void Ut_ActionCustomItem::testNewAndDelete() -{ - QGraphicsWidget *qGraphicsWidget = new QGraphicsWidget(); - QVERIFY(qGraphicsWidget != 0); - - ActionCustomItem *item = new ActionCustomItem(qGraphicsWidget); - - qDebug("item=0x%x", item); - QVERIFY(item); - delete item; - item = NULL; - qDebug("delete item=0x%x", item); - - QVERIFY(!item); - - delete qGraphicsWidget; - qGraphicsWidget = NULL; -} - -void Ut_ActionCustomItem::testCreateItem() -{ - QGraphicsWidget *qGraphicsWidget = new QGraphicsWidget(); - QVERIFY(qGraphicsWidget != 0); - - ActionCustomItem *item = new ActionCustomItem(qGraphicsWidget); - qDebug("item=0x%x", item); - QVERIFY(item); - - HbAbstractViewItem *viewItem = item->createItem(); - - qDebug("viewItem=0x%x", viewItem); - QVERIFY(viewItem); - - delete viewItem; - viewItem = NULL; - - delete item; - item = NULL; - qDebug("delete item=0x%x", item); - - QVERIFY(!item); - - delete qGraphicsWidget; - qGraphicsWidget = NULL; -} - -void Ut_ActionCustomItem::testCanSetModelIndex() -{ - QGraphicsWidget *qGraphicsWidget = new QGraphicsWidget(); - QVERIFY(qGraphicsWidget != 0); - - ActionCustomItem *item = new ActionCustomItem(qGraphicsWidget); - qDebug("item=0x%x", item); - QVERIFY(item); - - QModelIndex index; - item->canSetModelIndex(index); - - delete item; - item = NULL; - qDebug("delete item=0x%x", item); - - QVERIFY(!item); - - delete qGraphicsWidget; - qGraphicsWidget = NULL; -} - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/src/ut_customedit.cpp --- a/vmbx/vmbxcpplugin/tsrc/src/ut_customedit.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* 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: -* -*/ - -#include -#include -#include -#include -#include "ut_customedit.h" -#include "customedit.h" - - - -void Ut_CustomEdit::testFocusInEvent() -{ - HbMainWindow *window = new HbMainWindow; - QVERIFY(window); - - QGraphicsWidget *qGraphicsWidget = new QGraphicsWidget(); - QVERIFY(qGraphicsWidget != 0); - CustomEdit *edit = new CustomEdit(qGraphicsWidget); - QVERIFY(edit); - - QFocusEvent *event = new QFocusEvent(QEvent::FocusIn, - Qt::MouseFocusReason); - QVERIFY(event); - edit->focusInEvent(event); - delete event; - event = NULL; - - event = new QFocusEvent(QEvent::FocusOut, - Qt::MouseFocusReason); - QVERIFY(event); - edit->focusInEvent(event); - // test for emitEditItemClicked - QEventLoop loop; - QTimer timer; - timer.start(150); - connect( &timer,SIGNAL(timeout()), - &loop,SLOT(quit())); - loop.exec(); - delete event; - event = NULL; - delete edit; - edit = NULL; - QVERIFY(!edit); - - delete qGraphicsWidget; - qGraphicsWidget = NULL; -} diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailbox.cpp --- a/vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailbox.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,247 +0,0 @@ -/* -* Copyright (c) 2009 - 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: Implementation of the CVoiceMailbox class -* -*/ - -// System includes -#include -#include -#include -// For global export return value -#include "ut_vmbxuiengine.h" - -// ============================ MEMBER FUNCTIONS ============================= - - TInt TVoiceMailboxParams::Version() - { - qDebug("TVoiceMailboxParams::Version <>"); - return iVersion; - } - - - TVoiceMailboxParams::TVoiceMailboxParams(): - iType( EVmbxNone ), - iServiceId( KVmbxServiceIdNone ), - iLineType( EVmbxAlsLineDefault ) - { - qDebug("TVoiceMailboxParams default constructor <>"); - } - - TVoiceMailboxParams::TVoiceMailboxParams( - const CVoiceMailboxEntry& aEntry ) - { - qDebug("TVoiceMailboxParams Entry cnstructor >"); - iType = aEntry.VoiceMailboxType(); - iServiceId = aEntry.ServiceId(); - iLineType = aEntry.VmbxAlsLineType(); - qDebug("TVoiceMailboxParams Entry cnstructor <"); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::CVoiceMailboxImpl -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVoiceMailbox::CVoiceMailbox() - { - qDebug("DummyVoiceMailbox::CVoiceMailbox <>"); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVoiceMailbox::ConstructL() - { - qDebug("DummyVoiceMailbox::ConstructL <>"); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVoiceMailbox* CVoiceMailbox::NewL() -{ - qDebug("DummyVoiceMailbox::NewL" ); - - CVoiceMailbox * self = NULL; - self = CVoiceMailbox::NewLC(); - CleanupStack::Pop( self ); - qDebug("DummyVoiceMailbox::NewL <"); - return self; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::NewLC -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVoiceMailbox* CVoiceMailbox::NewLC() - { - qDebug("DummyVoiceMailbox::NewLC >"); - CVoiceMailbox* self = new( ELeave ) CVoiceMailbox; - CleanupStack::PushL( self ); - self->ConstructL(); - qDebug("DummyVoiceMailbox::NewLC <"); - return self; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::~CVoiceMailbox -// Destructor -// --------------------------------------------------------------------------- -// -CVoiceMailbox::~CVoiceMailbox() - { - qDebug("DummyVoiceMailbox::~CVoiceMailbox > <"); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::GetStoredEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailbox::GetStoredEntry( - const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry) const - { - qDebug("DummyVoiceMailbox::GetStoredEntry >"); - Q_UNUSED(aParams); - TRAPD (err, aEntry = CVoiceMailboxEntry::NewL()); - qDebug("DummyVoiceMailbox::GetStoredEntry err %d<", err); - return globalExpRet; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::SaveEntry -// Destructor -// --------------------------------------------------------------------------- -// -TInt CVoiceMailbox::SaveEntry(const CVoiceMailboxEntry& aEntry) - { - qDebug("DummyVoiceMailbox::SaveEntry <>"); - Q_UNUSED(aEntry); - return globalExpRet; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::QueryNewEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryNewEntry( - const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry) - { - qDebug("DummyVoiceMailbox::QueryNewEntry <>"); - Q_UNUSED(aParams); - TRAPD (err, aEntry = CVoiceMailboxEntry::NewL()); - return globalExpRet; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::QueryChangeEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryChangeEntry( - const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry) - { - qDebug("DummyVoiceMailbox::QueryChangeEntry <>"); - Q_UNUSED(aParams); - TRAPD (err, aEntry = CVoiceMailboxEntry::NewL()); - return globalExpRet; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::QueryVmbxType -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailbox::QueryVmbxType( - TVoiceMailboxParams& aParams ) - { - qDebug("DummyVoiceMailbox::QueryVmbxType <>"); - aParams.iType = EVmbxVoice; - aParams.iServiceId = KVmbxServiceVoice; - aParams.iLineType = EVmbxAlsLine1; - return globalExpRet; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::NotifyVmbxNumberChangeL -// -// --------------------------------------------------------------------------- -// -void CVoiceMailbox::NotifyVmbxNumberChangeL( - MVoiceMailboxObserver& aObserver, const TBool aNotifyOnActiveLineOnly ) - { - qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeL <>"); - Q_UNUSED(aObserver); - Q_UNUSED(aNotifyOnActiveLineOnly); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::NotifyVmbxNumberChangeCancel -// -// --------------------------------------------------------------------------- -// -void CVoiceMailbox::NotifyVmbxNumberChangeCancel() - { - qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeCancel <>"); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::CheckConfiguration -// -// --------------------------------------------------------------------------- -// -TBool CVoiceMailbox::CheckConfiguration( - const TVoiceMailboxParams& aParams, const TInt aFlags ) - { - qDebug("DummyVoiceMailbox::CheckConfiguration <>"); - Q_UNUSED(aParams); - Q_UNUSED(aFlags); - return globalExpRet; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::GetServiceIds -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailbox::GetServiceIds( RIdArray& aProfileIds ) const - { - qDebug("DummyVoiceMailbox::GetServiceIds <>"); - Q_UNUSED(aProfileIds); - return 0; - } - - -// --------------------------------------------------------------------------- -// CVoiceMailbox::SaveProvisionedEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailbox::SaveProvisionedEntry( - const CVoiceMailboxEntry& aEntry) - { - qDebug("DummyVoiceMailbox::SaveProvisionedEntry <>"); - Q_UNUSED(aEntry); - return globalExpRet; - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailboxentry.cpp --- a/vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailboxentry.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,331 +0,0 @@ -/* -* Copyright (c) 2009 - 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: Implementation of the CVoiceMailboxEntry class -* -*/ - -// System includes -#include -#include -// For global value -#include "ut_vmbxuiengine.h" - -// CONSTANTS - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::NewL -// -// --------------------------------------------------------------------------- -// - -EXPORT_C CVoiceMailboxEntry* CVoiceMailboxEntry::NewL() - { - qDebug( "DummyVoiceMailboxEntry::NewL >" ); - CVoiceMailboxEntry* self = CVoiceMailboxEntry::NewLC(); - CleanupStack::Pop( self ); - qDebug( "DummyVoiceMailboxEntry::NewL <" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::NewLC -// -// --------------------------------------------------------------------------- -// -EXPORT_C CVoiceMailboxEntry* CVoiceMailboxEntry::NewLC() - { - qDebug( "DummyVoiceMailboxEntry::NewLC >" ); - CVoiceMailboxEntry* self = new( ELeave ) CVoiceMailboxEntry; - CleanupStack::PushL( self ); - self->ConstructL(); - qDebug( "DummyVoiceMailboxEntry::NewLC <" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::~CVoiceMailboxEntry -// Destructor -// --------------------------------------------------------------------------- -// -CVoiceMailboxEntry::~CVoiceMailboxEntry() - { - qDebug( "DummyVoiceMailboxEntry::~CVoiceMailboxEntry >" ); - delete ivmbxNumber; - delete iVmbxBrandId; - delete ivmbxName; - qDebug( "DummyVoiceMailboxEntry::~CVoiceMailboxEntry <" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::ServiceId -// Get ServiceId -// --------------------------------------------------------------------------- -// -EXPORT_C TServiceId CVoiceMailboxEntry::ServiceId() const - { - qDebug( "DummyVoiceMailboxEntry::ServiceId %d", iVmbxServiceId ); - return iVmbxServiceId; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetServiceId -// Set entry's service id -// --------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetServiceId( - const TServiceId& aVmbxServiceId ) - { - qDebug( "DummyVoiceMailboxEntry::SetServiceId %d", aVmbxServiceId); - iVmbxServiceId = aVmbxServiceId; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::VoiceMailboxType -// Returns type of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TVmbxType CVoiceMailboxEntry::VoiceMailboxType( ) const - { - qDebug( "DummyVoiceMailboxEntry::VoiceMailboxType %d", iVmbxType ); - return iVmbxType; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVoiceMailboxType -// Set Type of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C void CVoiceMailboxEntry::SetVoiceMailboxType( const TVmbxType& aType ) - { - qDebug( "DummyVoiceMailboxEntry::SetVoiceMailboxType %d", aType ); - iVmbxType = aType; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::VmbxAlsLineType -// Get ALS line Type of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TVmbxAlsLineType CVoiceMailboxEntry::VmbxAlsLineType() const - { - qDebug( "DummyVoiceMailboxEntry::VmbxAlsLineType >" ); - return iVmbxLineType; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxAlsLineType -// Set ALS line Type of the entry instance -// --------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetVmbxAlsLineType( - const TVmbxAlsLineType& aLine ) - { - qDebug( "DummyVoiceMailboxEntry::SetVmbxAlsLineType %d >", aLine ); - if ( EVmbxAlsLineDefault == aLine ) - { - iVmbxLineType = EVmbxAlsLine1; - } - else - { - iVmbxLineType = aLine; - } - qDebug( "DummyVoiceMailboxEntry::SetVmbxAlsLineType %d <", iVmbxLineType ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetVmbxNumber -// Get number or address of the entry instance -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::GetVmbxNumber( TPtrC& aVmbxNumber ) const - { - qDebug("DummyVoiceMailboxEntry::GetVmbxNumber >"); - aVmbxNumber.Set(globalNumber.utf16()); - qDebug("DummyVoiceMailboxEntry::GetVmbxNumber %d", globalExpRet); - return globalExpRet; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxNumber -// Set number or address of the entry instance -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::SetVmbxNumber( const TDesC& aVmbxNumber ) - { - qDebug("DummyVoiceMailboxEntry::SetVmbxNumber >"); - globalNumber = QString::fromUtf16(aVmbxNumber.Ptr(), aVmbxNumber.Length()); - qDebug("DummyVoiceMailboxEntry::SetVmbxNumber %d", globalExpRet); - return globalExpRet; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetVmbxAlsLineType -// Get Brand Id of the entry instance -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::GetBrandId( TPtrC8& aBrandId ) const - { - qDebug("DummyVoiceMailboxEntry::GetBrandId >"); - TInt result( KErrNotFound ); - if ( iVmbxBrandId ) - { - aBrandId.Set( iVmbxBrandId->Des() ); - result = KErrNone; - } - else - { - aBrandId.Set( KNullDesC8 ); - } - qDebug("DummyVoiceMailboxEntry::GetBrandId <"); - return result; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetBrandId -// Set Brand Id of the entry instance -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::SetBrandId( const TDesC8& aBrandId ) -{ - qDebug("DummyVoiceMailboxEntry::SetBrandId >"); - TInt result( KErrNoMemory ); - if ( KVmbxMaxNumberLength < aBrandId.Length() ){ - result = KErrArgument; - }else{ - delete iVmbxBrandId; - iVmbxBrandId = aBrandId.Alloc(); - if ( iVmbxBrandId ){ - result = KErrNone; - } - } - qDebug("DummyVoiceMailboxEntry::SetBrandId <"); - return result; -} - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetVmbxName -// Get Name of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailboxEntry::GetVmbxName( TPtrC& aVmbxName ) const -{ - qDebug("DummyVoiceMailboxEntry::GetVmbxName >"); - TInt result( KErrNotFound ); - if ( ivmbxName ){ - aVmbxName.Set( ivmbxName->Des() ); - result = KErrNone; - }else{ - qDebug( "DummyVoiceMailboxEntry::GetVmbxName:KNullDesC" ); - aVmbxName.Set( KNullDesC ); - } - qDebug("DummyVoiceMailboxEntry::GetVmbxName <"); - return result; -} - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxName -// Set Name of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailboxEntry::SetVmbxName( const TDesC& aVmbxName ) -{ - qDebug("DummyVoiceMailboxEntry::SetVmbxName >"); - TInt result( KErrNoMemory ); - if (KVmbxMaxNumberLength < aVmbxName.Length()){ - result = KErrArgument; - }else{ - delete ivmbxName; - ivmbxName = aVmbxName.Alloc(); // Returns NULL if fails. - if ( ivmbxName ){ - result = KErrNone; - } - } - qDebug("DummyVoiceMailboxEntry::SetVmbxName <"); - return result; -} - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::UsingMemoryLocation -// Returns memory location of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TVmbxMemoryLocation CVoiceMailboxEntry::UsingMemoryLocation( ) const - { - qDebug("DummyVoiceMailboxEntry::UsingMemoryLocation <>"); - return iUsingMemory; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::Reset -// Reset the data members of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C void CVoiceMailboxEntry::Reset() -{ - qDebug("DummyVoiceMailboxEntry::Reset >"); - iVmbxServiceId = KVmbxServiceIdNone; - iVmbxType = EVmbxNone; - iVmbxLineType = EVmbxAlsLineDefault; - if (ivmbxNumber){ - ivmbxNumber->Des().Zero(); - qDebug("DummyVoiceMailboxEntry::Reset vmbx number"); - } - if (ivmbxName){ - ivmbxName->Des().Zero(); - qDebug("DummyVoiceMailboxEntry::Reset vmbx name"); - } - if (iVmbxBrandId){ - iVmbxBrandId->Des().Zero(); - qDebug("DummyVoiceMailboxEntry::Reset vmbx brandId"); - } - iUsingMemory = EVmbxSimMemory; - qDebug("DummyVoiceMailboxEntry::Reset <"); -} - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetUsingMemoryLocation -// Set using memory of the entry instance -// --------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetUsingMemoryLocation( - const TVmbxMemoryLocation& aType ) - { - qDebug("DummyVoiceMailboxEntry::SetUsingMemoryLocation %d", aType); - iUsingMemory = aType; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::CVoiceMailboxEntry -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVoiceMailboxEntry::CVoiceMailboxEntry() - { - qDebug("DummyVoiceMailboxEntry::CVoiceMailboxEntry <>"); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::ConstructL() - { - qDebug("DummyVoiceMailboxEntry::ConstructL <>"); - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/src/ut_vmbxcpplugin.cpp --- a/vmbx/vmbxcpplugin/tsrc/src/ut_vmbxcpplugin.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2009 - 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: Implementation of the Ut_vmbxCpPlugin class -* -*/ - -// System includes -#include -#include - -// User includes -#include "vmbxcpplugin.h" -#include "vmbxcpgroup.h" -#include "ut_vmbxcpplugin.h" - -/*! - Ut_vmbxCpPlugin::createSettingFormItemData -*/ -void Ut_vmbxCpPlugin::testCreateSettingFormItemData() -{ - CpItemDataHelper itemDataHelper; - VmbxCpPlugin *plugin = new VmbxCpPlugin(); - QVERIFY(plugin); - QList list; - list = plugin->createSettingFormItemData(itemDataHelper); - QVERIFY2(0 != list[0], "createSettingFormItemData failed"); - delete plugin; - plugin = NULL; -} - -/*! - VmbxCpGroup construtor and destroctor -*/ -void Ut_vmbxCpPlugin::testCreateVmbxCpGroup() -{ - CpItemDataHelper itemDataHelper; - VmbxCpGroup *group = new VmbxCpGroup(itemDataHelper); - QVERIFY(group); - delete group; - group = NULL; -} -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/src/ut_vmbxuiengine.cpp --- a/vmbx/vmbxcpplugin/tsrc/src/ut_vmbxuiengine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 2009 - 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: Implementation of the Ut_VmbxUiEngine class -* -*/ - -// System includes -#include -#include - -// User includes -#include "vmbxuiengine.h" -#include "ut_vmbxuiengine.h" - -void setTestEnv(TInt aExpRet) -{ - globalExpRet = aExpRet; - qDebug("setTestEnv %d", globalExpRet); -} - - -/*! - Ut_VmbxUiEngine::initTestCase - QTestLib initialization method, called for each test case. -*/ -void Ut_VmbxUiEngine::initTestCase() -{ - mUiEngine = new VmbxUiEngine(); - QVERIFY(mUiEngine); -} - -/*! - Ut_VmbxUiEngine::cleanupTestCase - QTestLib cleanup method, called for each test case. -*/ -void Ut_VmbxUiEngine::cleanupTestCase() -{ - if ( mUiEngine ) { - delete mUiEngine; - mUiEngine = NULL; - } -} - -/*! - Ut_VmbxUiEngine::testGetCsVoice1Number - testCreateVmbxEntry test case - Connects to test object signal and verifies received data. -*/ -void Ut_VmbxUiEngine::testCsVoice1Number() -{ - QVERIFY(mUiEngine); - QString in("123456"); - QString out(""); - setTestEnv(KErrNone); - mUiEngine->setCsVoiceNumber(in); - mUiEngine->getCsVoiceNumber(out); - QCOMPARE(in, out); - - setTestEnv(KErrNotFound); - mUiEngine->setCsVoiceNumber(in); - mUiEngine->getCsVoiceNumber(out); - QCOMPARE(in, out); -} - -/*! - Ut_VmbxUiEngine::testGetCsVideo1Number - testVmbxType test case - Connects to test object signal and verifies received data. -*/ -void Ut_VmbxUiEngine::testCsVideo1Number() -{ - QVERIFY(mUiEngine); - - QString in("123456"); - QString out(""); - - setTestEnv(KErrNone); - mUiEngine->setCsVideoNumber(in); - mUiEngine->getCsVideoNumber(out); - QCOMPARE(in, out); - - setTestEnv(KErrNotFound); - mUiEngine->setCsVideoNumber(in); - mUiEngine->getCsVideoNumber(out); - QCOMPARE(in, out); -} - -void Ut_VmbxUiEngine::testIsVideoSupport() -{ - QVERIFY(mUiEngine); - mUiEngine->isVideoSupport(); -} - -void Ut_VmbxUiEngine::testHandleNotifyL() -{ - QVERIFY(mUiEngine); - CVoiceMailboxEntry *entry = CVoiceMailboxEntry::NewL(); - QVERIFY(entry); - mUiEngine->HandleNotifyL(*entry); -} - - -//End file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/tsrc/ut_vmbxcpplugin.pro --- a/vmbx/vmbxcpplugin/tsrc/ut_vmbxcpplugin.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -# -# Copyright (c) 2009 - 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: ut_vmbxcpplugin.exe -# - -TEMPLATE = app -TARGET = ut_vmbxcpplugin -DEPENDPATH += . -INCLUDEPATH += . -CONFIG += hb -CONFIG += qtestlib -MOC_DIR = moc - -symbian: { - TARGET.CAPABILITY = CAP_GENERAL_DLL -} - -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \ - $$MOC_DIR \ - /epoc32/include/mw/QtTest \ - ../../inc\ - ./inc - TARGET.EPOCALLOWDLLDATA = 1 -LIBS += -lcpframework -} - -# Input -HEADERS += inc\ut_vmbxuiengine.h\ - inc\ut_vmbxcpplugin.h \ - inc\ut_actioncustomitem.h\ - inc\ut_customedit.h \ - ..\inc\vmbxuiengine.h \ - ..\inc\vmbxcpplugin.h \ - ..\inc\vmbxcpgroup.h \ - ..\inc\actioncustomitem.h \ - ..\inc\customedit.h - - -SOURCES += src\main.cpp\ - src\ut_vmbxuiengine.cpp\ - src\ut_vmbxcpplugin.cpp \ - src\ut_actioncustomitem.cpp \ - src\ut_customedit.cpp \ - src\ut_dummyvoicemailbox.cpp\ - src\ut_dummyvoicemailboxentry.cpp\ - ..\src\vmbxuiengine.cpp \ - ..\src\vmbxcpplugin.cpp \ - ..\src\vmbxcpgroup.cpp \ - ..\src\actioncustomitem.cpp \ - ..\src\customedit.cpp - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/vmbxcpplugin.pri --- a/vmbx/vmbxcpplugin/vmbxcpplugin.pri Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -# -# Copyright (c) 2009 - 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: vmbxcpplugin source files -# - - -CONFIG += debug_and_release - - -CONFIG(debug, debug|release) { - SUBDIRPART = debug -} else { - SUBDIRPART = release -} - - -# Add the output dirs to the link path too -LIBS += -L$$DESTDIR - -MOC_DIR = moc -OBJECT_DIR = obj -RCC_DIR = rcc - -#For some reason the default include path doesn't include MOC_DIR on symbian -symbian { - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - INCLUDEPATH += $$MOC_DIR - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.EPOCALLOWDLLDATA = 1 -} - - -CONFIG += hb plugin -LIBS += -lcpframework\ - -lvmbxengine - -symbian: plugin { # copy qtstub and manifest - PLUGIN_STUB_PATH = /resource/qt/plugins/controlpanel - - deploy.path = C: - pluginstub.sources = $${TARGET}.dll - pluginstub.path = $$PLUGIN_STUB_PATH - DEPLOYMENT += pluginstub - - qtplugins.path = $$PLUGIN_STUB_PATH - qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin - - for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)" \ - "rom/vmbxcpplugin_stub.sis ZSYSTEM/install/vmbxcpplugin_stub.sis" -} - -HEADERS += inc/vmbxcpplugin.h \ - inc/vmbxcpgroup.h \ - inc/vmbxuiengine.h \ - inc/loggerutil.h \ - inc/actioncustomitem.h \ - inc/customedit.h - -SOURCES += src/vmbxcpplugin.cpp \ - src/vmbxcpgroup.cpp \ - src/vmbxuiengine.cpp \ - src/actioncustomitem.cpp \ - src/customedit.cpp \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin/vmbxcpplugin.pro --- a/vmbx/vmbxcpplugin/vmbxcpplugin.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -# -# Copyright (c) 2009 - 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: -# - -TEMPLATE = lib -TARGET = vmbxcpplugin - - -include (vmbxcpplugin.pri) - -# Input -symbian: { - TARGET.UID3 = 0x20029F5D -} - -include (rom/rom.pri) diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxcpplugin_version_history.txt --- a/vmbx/vmbxcpplugin_version_history.txt Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ - -22-Oct-2009 Tommi Kenakkala - -HOW TO INTEGRATE: -- This version uses MCLwk32+QtOrbitDeltawk37+QtControlPanelwk38 -- To get this working you have use the refactored vmbxengine. -Copy cvoicemailbox.h, cvoicemailboxentry.h, voicemailboxdefs.h to the phonesrv_plat api folder (Same as old) -(I'll also remove vmbxengine app layer api dependencies from mercurial) -- Copy Qt control panel to root -- Edit \qtcontrolpanel\qtcontrolpanel\controlpanelplugins\communicationplugin\data\cpcommunicationplugin.cpcfg -by adding: - - I'm a description - -(remember to check that uid matches to implementation) -- To get signals from ui control in QtControlPanelwk38 package you have to fix the mistyped connect -in qtcontrolpanel\qtcontrolpanel\cpframework\src\cpsettingformitemdata.cpp: -"lineEditTextChanged" is mistyped as "lineEditTextChangge" -Signal is emitted on every character change so we or control panel have to fix that. -- After above is done compile qtcontrolpanel: - qmake -spec symbian-abld - bldmake bldfiles - abld build winscw udeb -- Copy vmbxcpplugin to root and compile similarly - -- If you want to avoid carbide: - - Install DebugView (debug traces are printed there) - - launch epoc.exe from shell, launch DebugView PC app - - In emulator open eshell and launch the application there by typing the exe name - -- If vmbxcpplugin is not loaded enable QtControlPanel tracing and check the control -panel fw traces, there should be a trace for every plugin load attemp. -After "desc" tag there's a "loading failed" string if e.g. vmbxcpplugin.dll -loading failed because linking to vmbxengine.dll had problems. -Here is an ok trace from qtcontrolpanel: - "[1876] diplayname = "displayname" - [1876] dll = "vmbxcpplugin.dll" - [1876] desc = "I'm a description" " - -HOW TO USE QT CONTROL PANEL ON UI: -- launch by selecting applications > qtcontrolpanel -or applications > eshell and type qtcontrolpanel -- Click the "+" to open communications group -- Click the "+" to open vmbx group -- when you start editing the number, it will be save every time you change even a single character - -ABOUT DESIGN & FEATURES: - -- TODO: update VmbxCpGroup to class VmbxCpGroup : public CpSettingFormItemData -when DataForm bug is fixed (QTControlPanel wk39-41?), now append/addchild() panics. -After the base class switch API will change but it should be just a few minutes of work to do that. - -- Ps Services to be implemented later when we know if they will be in vmbx control panel group or in service settings group. -- UI editing permit checking must be implemented -- Video ALS support not to be implemented on UI, do it later if there really is someone using it. -- Default mailbox setting to be implemented later to CVoiceMailbox API and to UI, if future UI concepts still specify it. -- Use QT_TRAP_THROWING when qt 4.6 available, but do test then that qt throws and symbian leaves work ok together. -- Triple-check cleanup everywhere -- .pro file include paths are hard-coded, fix those for phonesrv_plat api folders. - -test - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/bwins/vmbxengineu.def --- a/vmbx/vmbxengine/bwins/vmbxengineu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -EXPORTS - ?NewL@CVoiceMailbox@@SAPAV1@XZ @ 1 NONAME ; class CVoiceMailbox * CVoiceMailbox::NewL(void) - ?QueryChangeEntry@CVoiceMailbox@@UAEHABVTVoiceMailboxParams@@AAPAVCVoiceMailboxEntry@@@Z @ 2 NONAME ; int CVoiceMailbox::QueryChangeEntry(class TVoiceMailboxParams const &, class CVoiceMailboxEntry * &) - ?GetBrandId@CVoiceMailboxEntry@@UBEHAAVTPtrC8@@@Z @ 3 NONAME ; int CVoiceMailboxEntry::GetBrandId(class TPtrC8 &) const - ?Reset@CVoiceMailboxEntry@@UAEXXZ @ 4 NONAME ; void CVoiceMailboxEntry::Reset(void) - ?NewL@CVoiceMailboxEntry@@SAPAV1@XZ @ 5 NONAME ; class CVoiceMailboxEntry * CVoiceMailboxEntry::NewL(void) - ?GetStoredEntry@CVoiceMailbox@@UBEHABVTVoiceMailboxParams@@AAPAVCVoiceMailboxEntry@@@Z @ 6 NONAME ; int CVoiceMailbox::GetStoredEntry(class TVoiceMailboxParams const &, class CVoiceMailboxEntry * &) const - ??0TVoiceMailboxParams@@QAE@ABVCVoiceMailboxEntry@@@Z @ 7 NONAME ; TVoiceMailboxParams::TVoiceMailboxParams(class CVoiceMailboxEntry const &) - ?NewLC@CVoiceMailbox@@SAPAV1@XZ @ 8 NONAME ; class CVoiceMailbox * CVoiceMailbox::NewLC(void) - ?SaveProvisionedEntry@CVoiceMailbox@@QAEHABVCVoiceMailboxEntry@@@Z @ 9 NONAME ; int CVoiceMailbox::SaveProvisionedEntry(class CVoiceMailboxEntry const &) - ?SetVmbxName@CVoiceMailboxEntry@@UAEHABVTDesC16@@@Z @ 10 NONAME ; int CVoiceMailboxEntry::SetVmbxName(class TDesC16 const &) - ?ServiceId@CVoiceMailboxEntry@@UBEIXZ @ 11 NONAME ; unsigned int CVoiceMailboxEntry::ServiceId(void) const - ?SaveEntry@CVoiceMailbox@@UAEHABVCVoiceMailboxEntry@@@Z @ 12 NONAME ; int CVoiceMailbox::SaveEntry(class CVoiceMailboxEntry const &) - ?GetVmbxName@CVoiceMailboxEntry@@UBEHAAVTPtrC16@@@Z @ 13 NONAME ; int CVoiceMailboxEntry::GetVmbxName(class TPtrC16 &) const - ?Version@TVoiceMailboxParams@@QAEHXZ @ 14 NONAME ; int TVoiceMailboxParams::Version(void) - ?CheckConfiguration@CVoiceMailbox@@UAEHABVTVoiceMailboxParams@@H@Z @ 15 NONAME ; int CVoiceMailbox::CheckConfiguration(class TVoiceMailboxParams const &, int) - ?UsingMemoryLocation@CVoiceMailboxEntry@@UBE?AW4TVmbxMemoryLocation@@XZ @ 16 NONAME ; enum TVmbxMemoryLocation CVoiceMailboxEntry::UsingMemoryLocation(void) const - ?SetVmbxNumber@CVoiceMailboxEntry@@UAEHABVTDesC16@@@Z @ 17 NONAME ; int CVoiceMailboxEntry::SetVmbxNumber(class TDesC16 const &) - ?VoiceMailboxType@CVoiceMailboxEntry@@UBE?AW4TVmbxType@@XZ @ 18 NONAME ; enum TVmbxType CVoiceMailboxEntry::VoiceMailboxType(void) const - ?VmbxAlsLineType@CVoiceMailboxEntry@@UBE?AW4TVmbxAlsLineType@@XZ @ 19 NONAME ; enum TVmbxAlsLineType CVoiceMailboxEntry::VmbxAlsLineType(void) const - ?NewLC@CVoiceMailboxEntry@@SAPAV1@XZ @ 20 NONAME ; class CVoiceMailboxEntry * CVoiceMailboxEntry::NewLC(void) - ?NotifyVmbxNumberChangeCancel@CVoiceMailbox@@UAEXXZ @ 21 NONAME ; void CVoiceMailbox::NotifyVmbxNumberChangeCancel(void) - ?QueryNewEntry@CVoiceMailbox@@UAEHABVTVoiceMailboxParams@@AAPAVCVoiceMailboxEntry@@@Z @ 22 NONAME ; int CVoiceMailbox::QueryNewEntry(class TVoiceMailboxParams const &, class CVoiceMailboxEntry * &) - ?GetServiceIds@CVoiceMailbox@@UBEHAAV?$RArray@I@@@Z @ 23 NONAME ; int CVoiceMailbox::GetServiceIds(class RArray &) const - ??0TVoiceMailboxParams@@QAE@XZ @ 24 NONAME ; TVoiceMailboxParams::TVoiceMailboxParams(void) - ?GetVmbxNumber@CVoiceMailboxEntry@@UBEHAAVTPtrC16@@@Z @ 25 NONAME ; int CVoiceMailboxEntry::GetVmbxNumber(class TPtrC16 &) const - ?QueryVmbxType@CVoiceMailbox@@UAEHAAVTVoiceMailboxParams@@@Z @ 26 NONAME ; int CVoiceMailbox::QueryVmbxType(class TVoiceMailboxParams &) - ?SetVoiceMailboxType@CVoiceMailboxEntry@@UAEXABW4TVmbxType@@@Z @ 27 NONAME ; void CVoiceMailboxEntry::SetVoiceMailboxType(enum TVmbxType const &) - ?NotifyVmbxNumberChangeL@CVoiceMailbox@@UAEXAAVMVoiceMailboxObserver@@H@Z @ 28 NONAME ; void CVoiceMailbox::NotifyVmbxNumberChangeL(class MVoiceMailboxObserver &, int) - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/cenrep/101f874f.txt Binary file vmbx/vmbxengine/cenrep/101f874f.txt has changed diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/cenrep/backup_registration.xml --- a/vmbx/vmbxengine/cenrep/backup_registration.xml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/conf/CI_voicemailbox.confml Binary file vmbx/vmbxengine/conf/CI_voicemailbox.confml has changed diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/conf/voicemailbox.confml Binary file vmbx/vmbxengine/conf/voicemailbox.confml has changed diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/conf/voicemailbox_101F874F.crml Binary file vmbx/vmbxengine/conf/voicemailbox_101F874F.crml has changed diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/eabi/vmbxengineu.def --- a/vmbx/vmbxengine/eabi/vmbxengineu.def Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -EXPORTS - _ZN13CVoiceMailbox13QueryNewEntryERK19TVoiceMailboxParamsRP18CVoiceMailboxEntry @ 1 NONAME - _ZN13CVoiceMailbox13QueryVmbxTypeER19TVoiceMailboxParams @ 2 NONAME - _ZN13CVoiceMailbox16QueryChangeEntryERK19TVoiceMailboxParamsRP18CVoiceMailboxEntry @ 3 NONAME - _ZN13CVoiceMailbox18CheckConfigurationERK19TVoiceMailboxParamsi @ 4 NONAME - _ZN13CVoiceMailbox20SaveProvisionedEntryERK18CVoiceMailboxEntry @ 5 NONAME - _ZN13CVoiceMailbox23NotifyVmbxNumberChangeLER21MVoiceMailboxObserveri @ 6 NONAME - _ZN13CVoiceMailbox28NotifyVmbxNumberChangeCancelEv @ 7 NONAME - _ZN13CVoiceMailbox4NewLEv @ 8 NONAME - _ZN13CVoiceMailbox5NewLCEv @ 9 NONAME - _ZN13CVoiceMailbox9SaveEntryERK18CVoiceMailboxEntry @ 10 NONAME - _ZN18CVoiceMailboxEntry11SetVmbxNameERK7TDesC16 @ 11 NONAME - _ZN18CVoiceMailboxEntry13SetVmbxNumberERK7TDesC16 @ 12 NONAME - _ZN18CVoiceMailboxEntry19SetVoiceMailboxTypeERK9TVmbxType @ 13 NONAME - _ZN18CVoiceMailboxEntry4NewLEv @ 14 NONAME - _ZN18CVoiceMailboxEntry5NewLCEv @ 15 NONAME - _ZN18CVoiceMailboxEntry5ResetEv @ 16 NONAME - _ZN19TVoiceMailboxParams7VersionEv @ 17 NONAME - _ZN19TVoiceMailboxParamsC1ERK18CVoiceMailboxEntry @ 18 NONAME - _ZN19TVoiceMailboxParamsC1Ev @ 19 NONAME - _ZN19TVoiceMailboxParamsC2ERK18CVoiceMailboxEntry @ 20 NONAME - _ZN19TVoiceMailboxParamsC2Ev @ 21 NONAME - _ZNK13CVoiceMailbox13GetServiceIdsER6RArrayIjE @ 22 NONAME - _ZNK13CVoiceMailbox14GetStoredEntryERK19TVoiceMailboxParamsRP18CVoiceMailboxEntry @ 23 NONAME - _ZNK18CVoiceMailboxEntry10GetBrandIdER6TPtrC8 @ 24 NONAME - _ZNK18CVoiceMailboxEntry11GetVmbxNameER7TPtrC16 @ 25 NONAME - _ZNK18CVoiceMailboxEntry13GetVmbxNumberER7TPtrC16 @ 26 NONAME - _ZNK18CVoiceMailboxEntry15VmbxAlsLineTypeEv @ 27 NONAME - _ZNK18CVoiceMailboxEntry16VoiceMailboxTypeEv @ 28 NONAME - _ZNK18CVoiceMailboxEntry19UsingMemoryLocationEv @ 29 NONAME - _ZNK18CVoiceMailboxEntry9ServiceIdEv @ 30 NONAME - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/dialogwaiter.h --- a/vmbx/vmbxengine/inc/dialogwaiter.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* 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: dialog waiter -* -* -*/ - -#ifndef DIALOGWAITER_H -#define DIALOGWAITER_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATION -class HbAction; - -/** - * This utility synchronises access to dialogs, popups, menus and - * other ORBIT resources. How to use: - * - * HbDialog* dialog = new HbDialog(); - * DialogWaiter waiter(); - * dialog->open(&waiter, SLOT(done(HbAction*))); - * HbAction* result = waiter.wait(); - * delete dialog; - * if (result==...) ... - * - */ -class DialogWaiter : public QObject -{ - Q_OBJECT - - public: - - /** - * waits until dialog exits - * returns dialog exit action - */ - HbAction* wait(); - - private slots: - void done(HbAction* result); - - private: - QEventLoop mLoop; - HbAction* mResult; - -}; - -#endif // DIALOGWAITER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxcenrephandler.h --- a/vmbx/vmbxengine/inc/mvmbxcenrephandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2009-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: public VmbxCenrepHandler APIs for internal class -* Interface : Internal, MVmbxCenrepHandler -* -*/ - - -#ifndef M_VMBXCENREPHANDLER_H -#define M_VMBXCENREPHANDLER_H - -// INCLUDES - -// FORWARD DECLARATION -class CVoiceMailboxEntry; - -// CLASS DECLARATION - -/** - * MVmbxCenrepHandler - * - * @since S60 v5.2 - * @lib vmbxengine.lib - * - */ -NONSHARABLE_CLASS ( MVmbxCenrepHandler ) - { - -public: - - /** - * Get mailbox number from CenRep - * - * @param in&out aEntry the voice mailbox information data type - * @return Symbian OS error code (KErrNone if successful) - */ - virtual TInt GetVmbxNumber( CVoiceMailboxEntry& aEntry ) = 0; - - /** - * Saves the mailbox number - * - * @param in aEntry vmbx number data to save - * @return Symbian OS error code (KErrNone if successful) - */ - virtual TInt Save( const CVoiceMailboxEntry& aEntry ) = 0; - - /** - * Fetches active store type - * - * @return aStoreType Active store in use - */ - virtual TVmbxMemoryLocation StoreType() = 0; - - /** - * Returns state of the video support - * - * @return ETrue if supported - */ - virtual TBool VideoSupported() = 0; - - /** - * Returns ETrue if CenRep setting Sim read only - * - * @return ETrue if Sim read only - */ - virtual TBool IsSimReadOnly() = 0; - - /** - * Returns ETrue if number allowed to user change - * - * @return ETrue if from Sim - */ - virtual TBool IsAllowedUserEdit() = 0; - - }; - -#endif // M_VMBXCENREPHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxcenrepobserver.h --- a/vmbx/vmbxengine/inc/mvmbxcenrepobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2009-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: Notifies when CenRep is changed -* Interface : Internal, MVmbxCenRepObserver -* -*/ - - -#ifndef M_VMBXCENREPOBSERVER_H -#define M_VMBXCENREPOBSERVER_H - -// INCLUDES -#include "voicemailboxdefsinternal.h" - -// CLASS DECLARATION - -/** - * MVmbxCenRepObserver - * - * @lib vmbxengine.lib - * - */ -NONSHARABLE_CLASS ( MVmbxCenRepObserver ) - { -public: - - /** - * Does the action user wants when the CenRep value has been changed. - * - * @param aId id related with the key of CenRep - **/ - virtual void HandleCenRepChange( TVmbxCenRepKey aId ) = 0; - - }; - -#endif // M_VMBXCENREPOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxchangeobserver.h --- a/vmbx/vmbxengine/inc/mvmbxchangeobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2009-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: Notifies when vmbx interrelated modules are changed -* Interface : Internal, MVmbxChangeObserver -* -*/ - - -#ifndef M_VMBXCHANGEOBSERVER_H -#define M_VMBXCHANGEOBSERVER_H - -// INCLUDE -#include "voicemailboxdefsinternal.h" - -// FORWORD - -// CLASS DECLARATION - -/** -* Notifier for vmbx number/address changes -* -* @lib vmbxengine.lib -* -* -**/ -NONSHARABLE_CLASS ( MVmbxChangeObserver ) - { - -public: - - /** - * Observer callback function which is called when - *sat refresh - * - **/ - virtual void SatRefreshL() = 0; - - /** - * Observer callback function which is called when - *CenRep Key value changed - * - * @param aId id related with the key of CenRep - **/ - virtual void CenRepChangedL( TVmbxCenRepKey aId ) = 0; - - /** - * Observer callback function which is called when - *sim store changed - * - **/ - virtual void SimStoreChangedL() = 0; - }; - -#endif // M_VMBXCHANGEOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxresourceprovider.h --- a/vmbx/vmbxengine/inc/mvmbxresourceprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2009-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: Notifies when ALS line is changed -* Interface : Internal, MResourceProvider -* -*/ - - -#ifndef M_VMBXRESOURCEPROVIDER_H -#define M_VMBXRESOURCEPROVIDER_H - -// INCLUDES -#include "mvmbxuiutilities.h" -#include "mvmbxcenrephandler.h" - -// CLASS DECLARATION - -/** - * Resource provider - * - * @lib vmbxengine.lib - * - */ -NONSHARABLE_CLASS ( MVmbxResourceProvider ) - { -public: - - /** - * Gets handler of MVmbxUiUtilities - * - * @return handler of MVmbxUiUtilities - **/ - virtual MVmbxUiUtilities& VmbxUiUtilities() = 0; - - /** - * Gets handler of MVmbxCenrepHandler - * - * @return handler of MVmbxCenrepHandler - **/ - virtual MVmbxCenrepHandler& VmbxCenRepHandler() = 0; - - }; - -#endif // M_VMBXRESOURCEPROVIDER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxsatrefreshobserver.h --- a/vmbx/vmbxengine/inc/mvmbxsatrefreshobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2009-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: Notifies when MBDN file is refreshed -* Interface : Internal, MVmbxSatRefreshObserver -* -*/ - - -#ifndef M_VMBXSATREFRESHOBSERVER_H -#define M_VMBXSATREFRESHOBSERVER_H - -// INCLUDES - -// CLASS DECLARATION - -/** - * Notifier for sim file refreshed - * - * @since S60 v5.2 - * @lib vmbxengine.lib - * - */ -NONSHARABLE_CLASS ( MVmbxSatRefreshObserver ) - { -public: - - /** - * Does the action user wants when the sim file is refreshed. - * - * @param - **/ - virtual void HandleSatRefresh() = 0; - - }; - -#endif // M_VMBXSATREFRESHOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxservicenotify.h --- a/vmbx/vmbxengine/inc/mvmbxservicenotify.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2009-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: public Service profile changed -* Interface : Internal, MServiceNotifyHandler -* -*/ - - -#ifndef M_VMBXSERVICENOTIFY_H -#define M_VMBXSERVICENOTIFY_H - -// INCLUDES - -// FORWARD DECLARATION - - -// CLASS DECLARATION - -/** - * MServiceNotifyHandler - * - * @lib vmbxengine.lib - * - */ -NONSHARABLE_CLASS ( MServiceNotifyHandler ) - { -public: - /** - * Called when a Service profile has been changed. - */ - virtual void HandleServiceNotifyL() = 0; - }; - -#endif // M_VMBXSERVICENOTIFY_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxsimstoreobserver.h --- a/vmbx/vmbxengine/inc/mvmbxsimstoreobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2009-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: Notifies when Sim store is changed -* Interface : Internal, MVmbxSimStoreObserver -* -*/ - - -#ifndef M_VMBXSIMSTOREOBSERVER_H -#define M_VMBXSIMSTOREOBSERVER_H - -// INCLUDES - -// CLASS DECLARATION - -/** - * Notifier for sim store file entry changes - * - * @lib vmbxengine.lib - * - */ -NONSHARABLE_CLASS ( MVmbxSimStoreObserver ) - { -public: - - /** - * Does the user wants when the sim store file entry has been changed. - * - **/ - virtual void HandleSimStoreChanged() = 0; - - }; - -#endif // M_VMBXSIMSTOREOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxuihandler.h --- a/vmbx/vmbxengine/inc/mvmbxuihandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2009-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: -* Interface : Internal, MVmbxUiHandler -* -*/ - - -#ifndef M_MVMBXUIHANDLER_H -#define M_MVMBXUIHANDLER_H - -// INCLUDES - -// FORWARD DECLARATION - - -// CLASS DECLARATION - -/** - * MVmbxUiHandler - * - * @lib vmbxengine.lib - * - */ -NONSHARABLE_CLASS ( MVmbxUiHandler ) - { - -public: - - /** - * Show mailbox query dialog - * - * @param aType in TVmbxType type - * @param aNumber the voice mailbox number - * @param aResult out the result of dialog - */ - virtual void ShowVmbxQueryDialogL( const TVmbxType& aType, - TDes& aNumber, TInt& aResult )= 0; - - - /** - * Show define number in selection dialog - * - * @param in aType vmbx type - * @param out aResult the result of dialog - */ - virtual void ShowDefineSelectionDialogL( - TVmbxType& aType, TInt& aResult ) = 0; - - /** - * Show call number in selection dialog - * Leave if aArray < 1 - * - * @param in aArray array of the defined voice mailbox entry - * @param out aParams the type TVoiceMailboxParams which should include - * the service id and the type of seclected TVmbxType - * @param out aResult the result user seclected - */ - virtual void ShowCallSelectionDialogL( - const RPointerArray& aArray, - TVoiceMailboxParams& aParams, TInt& aResult ) = 0; - - /** - * show an error dialog for invalid number - * - */ - virtual void ShowInvalidWarningNoteL() = 0; - - }; - -#endif // M_MVMBXUIHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/mvmbxuiutilities.h --- a/vmbx/vmbxengine/inc/mvmbxuiutilities.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2009-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: Public APIs of VmbxUiUtilities to internal class -* Interface : Internal, MVmbxUiutilities -* -*/ - - -#ifndef M_VMBXUIUTILITIES_H -#define M_VMBXUIUTILITIES_H - -// INCLUDES -#include -#include "voicemailboxdefsinternal.h" - -// CLASS DECLARATION - -/** - * MVmbxUiUtilities - * - * @lib vmbxengine.lib - * - */ -NONSHARABLE_CLASS ( MVmbxUiUtilities ) - { - -public: - /** - * Show mailbox query - * - * @param in aType TVmbxType type - * @param in aMode TVmbxQueryMode mode - * @param out aNumber the voice mailbox number - */ - virtual void ShowQueryL( const TVmbxType& aType, - const TVmbxQueryMode& aMode, - TDes& aNumber ) = 0; - - /** - * Show mailbox query dialog - * Leaves if user cancel selected. - * - * @param aType in TVmbxType type - * @param aMode Tin VmbxQueryMode mode - * @param aNumber the voice mailbox number - * @param aResult out the result of dialog - */ - virtual void ShowQueryDialogL( const TVmbxType& aType, - const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult ) = 0; - - /** - * Show informationd note - * - * @param aType in TVmbxNoteType type - */ - virtual void ShowInformationdNoteL(const TVmbxNoteType aType) = 0; - - - /** - * Show define number in selection dialog - * - * @param in aType vmbx type - * @param out aResult the result of dialog - */ - virtual void ShowDefineSelectionDialogL( TVmbxType& aType, TInt& aResult ) = 0; - - /** - * Show call number in selection dialog - * Leaves if user cancel selected. - * - * @param in aArray array of the defined voice mailbox entry - * @param in aIcons icons of the defined voice mailbox - * @param out aParams the type TVoiceMailboxParams which should include - * the service id and the type of seclected TVmbxType - * @param out aResult the result user seclected - */ - virtual void ShowCallSelectionDialogL( - const RPointerArray& aArray, - TVoiceMailboxParams& aParams, TInt& aResult ) = 0; - - /** - * Tries to close all open dialogs - * - */ - virtual void DismissDialogL() = 0; - - - /** - * Get Mailbox type default image. - * If get unseccessful, Leaves with Symbian OS error code - * - * @param aParams Mailbox type for which image is needed. - * @return aImage New image. Ownership is transferred. - */ - //virtual CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams ) = 0; - - /** - * Show not allowed editing dialog - * - */ - virtual void ShowNotAllowedEditingDialogL() = 0; - - /** - * Show Invalid Warning dialog. - * - */ - virtual void ShowInvalidWarningDialogL() = 0; - }; - -#endif // M_VMBXUIUTILITIES_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbshandler.h --- a/vmbx/vmbxengine/inc/vmbshandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2007-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: Branding for voice mailbox - * -*/ - -#ifndef C_VMBSHANDLER_H -#define C_VMBSHANDLER_H - -// INCLUDES -#include -#include - - -// FORWARD DECLARATIONS - - -// CLASS DECLARATION - -/** - * CVmBSHandler declaration. - * - */ -NONSHARABLE_CLASS( CVmBSHandler ) : public CBase - { - -public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CVmBSHandler* NewL(); - - /** - * Two-phased constructor. - */ - static CVmBSHandler* NewLC(); - - /** - * Destructor. - */ - virtual ~CVmBSHandler(); - -public: // New functions - - /** - * Get branded icon - * @param aBrandingId Brandind Id - * @param aBrandedBitmap Bitmap for branded icon - * @param aBrandedBitmapMask Mask to branded icon - */ -// void GetBrandedIconL( const TDesC8& aBrandingId, -// CFbsBitmap*& aBrandedBitmap, -// CFbsBitmap*& aBrandedBitmapMask ) const; - -private: - - /** - * C++ default constructor. - */ - CVmBSHandler(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - }; - -#endif // C_VMBSHANDLER_H - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxcenrephandler.h --- a/vmbx/vmbxengine/inc/vmbxcenrephandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* -* Copyright (c) 2009-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: Access class to central repository -* Interface : Private, CVmbxCenRepHandler -* -*/ - - -#ifndef C_VMBXCENREPHANDLER_H -#define C_VMBXCENREPHANDLER_H - -// INCLUDES -#include - -#include -#include "mvmbxcenrephandler.h" - - -// FORWARD DECLARATIONS -class CRepository; -class CVoiceMailboxEntry; - -// CLASS DECLARATION -/** -* Creates connection to central repository and handles data flow from/to it -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxCenRepHandler ) : public CBase, - public MVmbxCenrepHandler - { -public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CVmbxCenRepHandler* NewL( ); - - /** - * Destructor. - */ - virtual ~CVmbxCenRepHandler(); - -public: // New functions - - /** - * Get saved mailbox number - * - * @param aEntry saved vmbx number data - * @return Symbian OS error code (KErrNone if successful) - */ - TInt GetVmbxNumber( CVoiceMailboxEntry& aEntry ); - - /** - * Saves the mailbox number - * - * @param aEntry vmbx number data to save - * @return Symbian OS error code (KErrNone if successful) - */ - TInt Save( const CVoiceMailboxEntry& aEntry ); - - /** - * Fetches active store type - * - * @return aStoreType Active store in use - */ - TVmbxMemoryLocation StoreType(); - - /** - * Returns state of the video support - * - * @return ETrue if supported - */ - TBool VideoSupported(); - - /** - * Returns ETrue if CenRep setting Sim read only - * - * @return ETrue if CenRep setting Sim read only - */ - TBool IsSimReadOnly(); - - /** - * Returns ETrue if number allowed to user change - * - * @return ETrue if from Sim - */ - TBool IsAllowedUserEdit(); - -private: // New functions - - /** - * C++ default constructor. - * @param aStoreHandler Reference to StoreHandler - */ - CVmbxCenRepHandler(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Resolves Voice CenRep key to be used - * - * @param in aLine current ALS lne - * @return CenRep key - */ - TUint32 VoiceCenRepKey( const TVmbxAlsLineType& aLine ); - - /** - * Resolves Video CenRep key to be used - * - * @param in aLine current ALS lne - * @return CenRep key - */ - TUint32 VideoCenRepKey( const TVmbxAlsLineType& aLine ); - - /** - * Resolves CenRep key to be used - * - * @param aEntry entry type - * @return CenRep key - */ - TUint32 ResolveKeyByEntry( const CVoiceMailboxEntry& aEntry ); - -private: //data - - /** - * Central repository session - * Own. - */ - CRepository* iCRSession; - }; - -#endif // C_VMBXCENREPHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxcenrepobserver.h --- a/vmbx/vmbxengine/inc/vmbxcenrepobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2009-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: Access class to Notify CenRep changed. -* Interface : Private, CVmbxCenRepObserver - * -*/ - -#ifndef C_VMBXCENREPOBSERVER_H -#define C_VMBXCENREPOBSERVER_H - -// INCLUDES -#include - -// for remote number change -#include -#include "mvmbxcenrepobserver.h" - - -// FORWARD DECLARATIONS -class CRepository; - -// CLASS DECLARATION - -/** - * CVmbxCenRepObserver declaration. - * - */ -NONSHARABLE_CLASS( CVmbxCenRepObserver ) : public CBase, - public MCenRepNotifyHandlerCallback - { - -public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param in aObserver observer notify the CenRep changed. - * @return New instance of the object. Ownership transferred. - */ - static CVmbxCenRepObserver* NewL( MVmbxCenRepObserver& aObserver ); - - /** - * Two-phased constructor. - * @param in aObserver observer notify the CenRep changed. - * @return New instance of the object. Ownership transferred. - */ - static CVmbxCenRepObserver* NewLC( MVmbxCenRepObserver& aObserver ); - - /** - * Destructor. - */ - virtual ~CVmbxCenRepObserver(); - - -private: // from base class MCenRepNotifyHandlerCallback - - /** - * @see MCenRepNotifyHandlerCallback::HandleNotifyGeneric - */ - void HandleNotifyGeneric( TUint32 aId ); - -private: - - /** - * C++ default constructor. - * @param in aObserver observer notify the CenRep changed. - */ - CVmbxCenRepObserver( MVmbxCenRepObserver& aObserver ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // data - /** - * Central repository session - * Own. - */ - CRepository* iCRSession; - - /** - * Central repository observer - * Own. - */ - CCenRepNotifyHandler* iNotifyHandler; - - /** - * Reference to MVmbxCenRepObserver - * - */ - MVmbxCenRepObserver& iObserver; - - }; - -#endif // C_VMBXCENREPOBSERVER_H - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxcsvideoengine.h --- a/vmbx/vmbxengine/inc/vmbxcsvideoengine.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* -* Copyright (c) 2009-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: Video mailbox engine implementation -* Interface : Private, CVmbxCsVideoEngine -* -*/ - -#ifndef C_VMBXCSVIDEOENGINE_H -#define C_VMBXCSVIDEOENGINE_H - -// INCLUDES -#include "mvmbxresourceprovider.h" - -// FORWARD DECLARATIONS -class CVmbxEngineBase; - - -// CLASS DECLARATION - -/** -* Implements functionality specifig to video mailbox implementation -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxCsVideoEngine ) : public CVmbxEngineBase - { - -public: // Constructors and destructor - - /** - * Two-phased constructor - * @param in aProvider Reference to Ui Utilities - * @return New instance of the object. Ownership transferred. - */ - static CVmbxCsVideoEngine* NewL( MVmbxResourceProvider& aProvider ); - - /** - * Destructor. - */ - virtual ~CVmbxCsVideoEngine(); - -// from base class CVmbxEntryBase - - /** - * @see CVmbxEntryBase::GetL - * - * @param in aEntry a pointer reference of CVoiceMailboxEntry - */ - void GetL( CVoiceMailboxEntry*& aEntry ); - - /** - * @see CVmbxEntryBase::SaveL - * - * @param aEntry Reference to CVoiceMailboxEntry - * @param aShowNotesAllowed Provision mode is used to decide whether show - * saved notification UI dialog. If aShowNotesAllowed is EFalse, - * saved notification UI dialog will not show. - */ - void SaveL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ); - - /** - * To save mailbox Provisioned entry value - * - * @param in aEntry Reference to CVoiceMailboxEntry - */ - void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry ); - - /** - * @see CVoiceMailbox::CheckConfiguration - * - * @param aParams Specifies which mailbox capabilities, - * the caller wants to check. - * @param aFlags Use TVmbxFeatureCapabilityFlag values for this parameter. - * Specifies what features client wants to check. - - * @return True if feature(s) enabled. - */ - TBool CheckConfiguration( const TVoiceMailboxParams& aParams, - const TInt aFlags ); - -private: - - /** - * C++ default constructor. - * - * @param in aProvider Reference to Ui Utilities - */ - CVmbxCsVideoEngine( MVmbxResourceProvider& aProvider ); - - /** - * By default Symbian 2nd phase constructor is private. - * - */ - void ConstructL(); - - }; - -#endif // C_VMBXCSVIDEOENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxcsvoiceengine.h --- a/vmbx/vmbxengine/inc/vmbxcsvoiceengine.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2009-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: Voice mailbox engine implementation -* Interface : Private, CVmbxCsVoiceEngine -* -*/ - -#ifndef C_VMBXCSVOICEENGINE_H -#define C_VMBXCSVOICEENGINE_H - -// INCLUDES -#include "mvmbxresourceprovider.h" - -// FORWARD DECLARATIONS -class CVmbxEngineBase; -class CVmbxSimHandler; - - -// CLASS DECLARATION -/** -* Implements functionality specifig to voice mailbox entry -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxCsVoiceEngine ) : public CVmbxEngineBase - { - -public: // Constructors and destructor - - /** - * Two-phased constructor - * @param aProvider Reference to MVmbxResourceProvider. - * @return New instance of the object. Ownership transferred. - */ - static CVmbxCsVoiceEngine* NewL( MVmbxResourceProvider& aProvider ); - - /** - * Destructor. - */ - virtual ~CVmbxCsVoiceEngine(); - -// from base class CVmbxEntryBase - - /** - * @see CVmbxEntryBase::GetL - * - * @param aEntry Reference to CVoiceMailboxEntry - */ - void GetL( CVoiceMailboxEntry*& aEntry ); - - /** - * @see CVmbxEntryBase::SaveL - * - * @param aEntry - * @param aShowNotesAllowed Provision mode is used to decide whether show - * saved notification UI dialog. If aShowNotesAllowed is EFalse, - * saved notification UI dialog will not show. - */ - void SaveL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ); - - /** - * To save mailbox Provisioned entry value - * - * @param aEntry Provisioned Entry data - */ - void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry ); - - /** - * @see CVoiceMailbox::CheckConfiguration - * - * @param aParams Specifies which mailbox capabilities, - * the caller wants to check. - * @param aFlags Use TVmbxFeatureCapabilityFlag values for this parameter. - * Specifies what features client wants to check. - - * @return True if feature(s) enabled. - */ - TBool CheckConfiguration( const TVoiceMailboxParams& aParams, - const TInt aFlags ); - - /** - * Check Entry writable - * - * @param aParams params of Entry data - * @return ETrue if entry is writable - */ - TBool IsWritable( const TVoiceMailboxParams& aParams ); - -private: - - /** - * C++ default constructor. - * - * @param aProvider Reference to MVmbxResourceProvider - */ - CVmbxCsVoiceEngine( MVmbxResourceProvider& aProvider ); - - /** - * By default Symbian 2nd phase constructor is private. - * - */ - void ConstructL(); - - /** - * Queries where to save and then saves - * - * @param in aEntry Entry data - * @param aShowNotesAllowed Provision mode is used to decide whether show - * saved notification UI dialog. If aShowNotesAllowed is EFalse, - * saved notification UI dialog will not show. - */ - void SaveEntryToPhoneL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ); - - /** - * For saving to place that user selects - * - * @param in aEntry Entry data - * @param aShowNotesAllowed Provision mode is used to decide whether show - * saved notification UI dialog. If aShowNotesAllowed is EFalse, - * saved notification UI dialog will not show. - */ - void SaveEntryToSimL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ); - - /** - * Returns Sim writable or not - * - * @return ETrue if writable - */ - TBool IsSimWritable(); - -private: // data - - /** - * CVmbxSimHandler - * Own. - */ - CVmbxSimHandler* iSimHandler; - }; - -#endif // C_VMBXCSVOICEENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxemergencycall.h --- a/vmbx/vmbxengine/inc/vmbxemergencycall.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2009-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: Class for dealing with Emergency Call -* Interface : Private, CVmbxEmergencyCall -* -*/ - - -#ifndef C_VMBXEMERGENCYCALL_H -#define C_VMBXEMERGENCYCALL_H - -// INCLUDES -#include -#include // from PhoneClient -#include - -// CLASS DECLARATION - -/** -* CVmbxEmergencyCall declaration -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxEmergencyCall ) : public CBase, - public MPhCltEmergencyCallObserver - { - public: - - /** - * Two-phased constructor - */ - static CVmbxEmergencyCall* NewL(); - - /** - * Destructor. - */ - ~CVmbxEmergencyCall(); - - /** - * Verifies that the given number is not an emergency number. - * - * @param aNumber Mailbox number - * @return ETrue if emergency number - */ - TBool IsEmergencyNumber( const TDesC& aNumber ); - -private: // New Functions - - /** - * C++ default constructor. - * - */ - CVmbxEmergencyCall(); - - /** - * C++ Two-phased constructor. - */ - void ConstructL(); - -private: // Functions from base classes - - /** - * Handle dial request completion. - * - * @see MPhCltExtPhoneObserver::HandleDialL(). - * - * @param aEntry Reference to store handler - */ - void HandleDialL( const TInt aStatus ); - - /** - * Handling of emergency dial result. - * - * @param aEntry Reference to store handler - */ - void HandleEmergencyDialL( const TInt aStatus ); - - }; - -#endif // C_VMBXEMERGENCYCALL_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxenginebase.h --- a/vmbx/vmbxengine/inc/vmbxenginebase.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* -* Copyright (c) 2009-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: Base class for different mailbox entries -* Interface : Private, CVmbxEngineBase -* -*/ - - -#ifndef C_VMBXENGINEBASE_H -#define C_VMBXENGINEBASE_H - -// INCLUDES -#include -#include - -#include "mvmbxresourceprovider.h" - -//FORWARD DECLARATIONS - -// CLASS DECLARATION -/** -* Implemets mailbox entry base class functionality -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxEngineBase ) : public CBase - { - -public: // Constructors and destructor - - /** - * C++ default constructor. - * @param aProvider Reference to CVmbxUiUtilities - */ - CVmbxEngineBase( MVmbxResourceProvider& aProvider ); - - /** - * Destructor. - */ - virtual ~CVmbxEngineBase(); - -public: // New functions - /** - * To get mailbox entry value - * Leave if no number got or Symbian OS error code - * - * @param aEntry Entry data - */ - virtual void GetL( CVoiceMailboxEntry*& aEntry ) = 0; - - /** - * To save mailbox entry value - * Leave with Symbian OS error code - * - * @param aEntry Entry data - * @param aShowNotesAllowed Provision mode is used to decide whether show - * saved notification UI dialog. If aShowNotesAllowed is EFalse, - * saved notification UI dialog will not show. - */ - virtual void SaveL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ) = 0; - - /** - * To save mailbox Provisioned entry value - * Leave with Symbian OS error code - * - * @param aEntry Provisioned Entry data - */ - virtual void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry ) = 0; - - /** - * Checks the Voice Mailbox how many VoIP service Ids - * Leave with Symbian OS error code - * - * @param aProfileIds id of voip profile - */ - virtual void GetServiceIdsL( RIdArray& aProfileIds ); - - /** - * see CVoiceMailbox::GetVmbxImage - * - */ - //virtual CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams ); - - /** - * Sets the Voice Mailbox current service id. - * - * @param aVmbxServiceId Voice Mailbox service id. - */ - virtual void SetCurrentServiceId( const TServiceId& aVmbxServiceId ); - - /** - * Checks the Voice Mailbox configuration to find out if a features - * are disabled or enabled. - * - * @param aParams Specifies which mailbox capabilities, - * the caller wants to check. - * @param aFlags Use TVmbxFeatureCapability values for this parameter. - * Specifies what features client wants to check. - - * @return True if feature(s) enabled. - */ - virtual TBool CheckConfiguration( const TVoiceMailboxParams& - aParams, const TInt aFlags ); - - /** - * Displays number query dialog - * Leave if user don't select or Symbian OS error code - * - * @param aEntry CVoiceMailboxEntry - */ - virtual void QueryDefineNumberL( CVoiceMailboxEntry& aEntry ); - - /** - * Displays number query dialog - * Leave if user don't select or Symbian OS error code - * - * @param aEntry Entry data - */ - virtual void QueryChangeNumberL( CVoiceMailboxEntry& aEntry ); - - -protected: // data - - /** - * Reference to CVmbxUiUtilities - */ - MVmbxResourceProvider& iProvider; - - /** - * Mailbox service id. - */ - TServiceId iVmbxServiceId; - }; - -#endif // C_VMBXENGINEBASE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxenginefactory.h --- a/vmbx/vmbxengine/inc/vmbxenginefactory.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2009-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: Factory class for different mailbox engines -* Interface : Private, CVmbxEngineFactory -* -*/ - -#ifndef C_VMBXENGINEFACTORY_H -#define C_VMBXENGINEFACTORY_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CVmbxEngineBase; - - -// CLASS DECLARATION - -/** -* CVmbxEngineFactory declaration -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxEngineFactory ) : public CBase - { - -public: // Constructors and destructor - - /** - * Two-phased constructor - * @param aProvider Reference to MVmbxResourceProvider - */ - static CVmbxEngineFactory* NewL( MVmbxResourceProvider& aProvider ); - - /** - * Destructor. - */ - virtual ~CVmbxEngineFactory(); - -public: // New functions - - /** - * Creates instance of the mailbox entry - * - * @param aEngine ownership is transferred - * @param aType mailbox type - */ - void CreateEngineL( CVmbxEngineBase*& aEngine, TVmbxType aType ); - -private: - - /** - * C++ default constructor. - * @param aProvider Reference to MVmbxResourceProvider - */ - CVmbxEngineFactory( MVmbxResourceProvider& aProvider ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // data - - /** - * Reference to MVmbxResourceProvider - */ - MVmbxResourceProvider& iProvider; - }; - -#endif // C_VMBXENGINEFACTORY_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxetelconnection.h --- a/vmbx/vmbxengine/inc/vmbxetelconnection.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* -* Copyright (c) 2009-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: Encapsulates RTelServer and RMobilePhone sessions -* Interface : Private, CVmbxETelConnection -* -*/ - - -#ifndef C_VMBXETELCONNECTION_H -#define C_VMBXETELCONNECTION_H - -// INCLUDES -#include -#include -#include - -// FORWARD DECLARATION -class RTelServer; -class RMobilePhone; - -// CLASS DECLARATION - -/** -* Creates connection to RTelServer and opens RMobilePhone -* -*/ -NONSHARABLE_CLASS( CVmbxETelConnection ): public CBase - { - -public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CVmbxETelConnection* NewL(); - - /** - * Destructor. - */ - virtual ~CVmbxETelConnection(); - - -public: // New functions - - /** - * Returns a reference to the ETel RTelServer - * - * @return a reference to the ETel RTelServer - */ - RTelServer& TelServer(); - - /** - * Returns a reference to the ETel RMobilePhone - * - * @return a reference to the ETel RMobilePhone - */ - RMobilePhone& Phone(); - -private: - - /** - * C++ constructor. - */ - CVmbxETelConnection(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // data - - /** - * The ETel RTelServer - */ - RTelServer iTelServer; - - /** - * The ETel phone - */ - RMobilePhone iPhone; - }; - -#endif // C_VMBXETELCONNECTION_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxlogger.h --- a/vmbx/vmbxengine/inc/vmbxlogger.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -* Copyright (c) 2007 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: Provides macros for logging -* Interface : Private -* -*/ - -#ifndef __VMBXLOGGER_H__ -#define __VMBXLOGGER_H__ - -// INCLUDES -#include - -/* ------------------------------------------------------------------------------ - - USER LOG SELECTION - ------------------------------------------------------------------------------ -*/ - -#ifndef _DEBUG - -/*************************** -* Logging method variants: -* 0 = No logging -* 1 = Flogger -* 2 = RDebug -***************************/ - -#define VMB_LOGGING_METHOD 0 // UREL BUILD - -#else - -#ifdef __WINS__ -#define VMB_LOGGING_METHOD 1 // UDEB BUILD, WINS -#else -#define VMB_LOGGING_METHOD 2 // UDEB BUILD, HW -#endif // __WINS__ - -#endif // _DEBUG - - -// Next is for backward compatibility -#if VMB_LOGGING_METHOD > 0 - #define VMB_LOGGING_ENABLED -#endif //VMB_LOGGING_METHOD - - -/** -* -* FLOGGER SETTINGS -* -*/ -#if VMB_LOGGING_METHOD == 1 // Flogger - - #include - - _LIT(KVMBLogFolder, "VMBX"); - _LIT(KVMBLogFile, "VMBX.TXT"); - -#elif VMB_LOGGING_METHOD == 2 // RDebug - - #include - -#endif //VMB_LOGGING_METHOD - - -/** -* -* LOGGING MACROs -* -* USE THESE MACROS IN YOUR CODE ! -* -*/ - -#if VMB_LOGGING_METHOD == 1 // Flogger - -#define VMBLOGTEXT(AAA) /*lint -save -e960 */ { RFileLogger::Write(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,AAA); } /*lint -restore */ -#define VMBLOGSTRING(AAA) /*lint -save -e960 */ { _LIT(tempLogDes,AAA); RFileLogger::Write(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,tempLogDes()); } /*lint -restore */ -#define VMBLOGSTRING2(AAA,BBB) /*lint -save -e960 -e437 */ { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,TRefByValue(tempLogDes()),BBB); } /*lint -restore */ -#define VMBLOGSTRING3(AAA,BBB,CCC) /*lint -save -e960 */ { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,TRefByValue(tempLogDes()),BBB,CCC); } /*lint -restore */ - -#elif VMB_LOGGING_METHOD == 2 // RDebug - -#define VMBLOGTEXT(AAA) RDebug::Print(AAA); -#define VMBLOGSTRING(AAA) RDebug::Print(_L(AAA)); -#define VMBLOGSTRING2(AAA,BBB) RDebug::Print(_L(AAA),BBB); -#define VMBLOGSTRING3(AAA,BBB,CCC) RDebug::Print(_L(AAA),BBB,CCC); - -#else // VMB_LOGGING_METHOD == 0 or invalid - -// Example: VMBLOGTEXT(own_desc); -#define VMBLOGTEXT(AAA) -// Example: VMBLOGSTRING("Test"); -#define VMBLOGSTRING(AAA) -// Example: VMBLOGSTRING("Test %i", aValue); -#define VMBLOGSTRING2(AAA,BBB) -// Example: VMBLOGSTRING("Test %i %i", aValue1, aValue2); -#define VMBLOGSTRING3(AAA,BBB,CCC) - -#endif // VMB_LOGGING_METHOD - -#endif // VMBXLOGGER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxobserver.h --- a/vmbx/vmbxengine/inc/vmbxobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2009-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: Observer class to data refresh -* Interface : Private, CVmbxObserver -* -*/ - -#ifndef C_VMBXOBSERVER_H -#define C_VMBXOBSERVER_H - -// INCLUDES -#include - -#include "mvmbxchangeobserver.h" -#include "mvmbxsimstoreobserver.h" -#include "mvmbxsatrefreshobserver.h" -#include "mvmbxcenrepobserver.h" -#include "mvmbxresourceprovider.h" -#include "voicemailboxdefsinternal.h" - - -// FORWARD DECLARATIONS -class CVmbxSatRefreshObserver; -class CVmbxSimStoreObserver; -class CVmbxCenRepObserver; -class CVmbxSimHandler; - -// CLASS DECLARATION - -/** - * Mailbox observer - * - * @lib vmbxengine.lib - */ -NONSHARABLE_CLASS( CVmbxObserver ) : public CBase, - public MVmbxSimStoreObserver, - public MVmbxSatRefreshObserver, - public MVmbxCenRepObserver - { - -public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param in aProvider Reference to MVmbxResourceProvider - */ - static CVmbxObserver* NewL( MVmbxResourceProvider& aProvider ); - - /** - * Two-phased constructor. - * @param in aProvider Reference to MVmbxResourceProvider - */ - static CVmbxObserver* NewLC( MVmbxResourceProvider& aProvider ); - - /** - * Destructor. - */ - virtual ~CVmbxObserver(); - -public: // New functions - - /** - * Observe vmbx change. - * @param in aObserver Reference to MVmbxChangeObserver - */ - void SetVmbxObserver( MVmbxChangeObserver& aObserver ); - -public: // From base class - - /** - * From MVmbxSimStoreObserver::HandleSimStoreChanged - */ - void HandleSimStoreChanged(); - - /** - * From MVmbxSatRefreshObserver::HandleSatRefresh - */ - void HandleSatRefresh(); - - /** - * From MVmbxCenRepObserver::HandleCenRepChange - * @param in aId the changed key Id - */ - void HandleCenRepChange( TVmbxCenRepKey aId ); - -private: - - /** - * C++ default constructor. - * @param in aProvider Reference to MVmbxResourceProvider - */ - CVmbxObserver( MVmbxResourceProvider& aProvider ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // data - - /** - * Pointer to MVmbxChangeObserver - * Own. - */ - MVmbxChangeObserver* iObserver; - - /** - * Reference to MVmbxResourceProvider - * - */ - MVmbxResourceProvider& iProvider; - - /** - *Pointer to CVmbxCenRepHandler - * Own. - */ - CVmbxCenRepObserver* iCenRepObserver; - - /** - * Pointer to CVmbxSimHandler - * Own. - */ - CVmbxSimHandler* iSimHandler; - - /** - * CVmbxSatRefreshObserver - * Own. - */ - CVmbxSatRefreshObserver* iSatObserver; - - /** - * CVmbxSimStoreObserver - * Own. - */ - CVmbxSimStoreObserver* iSimObserver; - }; - -#endif // C_VMBXOBSERVER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxpbkstore.h --- a/vmbx/vmbxengine/inc/vmbxpbkstore.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,231 +0,0 @@ -/* -* Copyright (c) 2009-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: Access class to SIM -* Interface : Private, CVmbxPbkStore -* -*/ - - -#ifndef C_VMBXPHBSTORE_H -#define C_VMBXPHBSTORE_H - -// INCLUDES -#include -#include - -#include -#include "voicemailboxdefsinternal.h" - -// FORWARD DECLARATION -class CVmbxETelConnection; -class CPhoneBookBuffer; -class CVoiceMailboxEntry; - - -// CLASS DECLARATION -/** -* Creates connection to Sim phonebook and handles data flow from/to it -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxPbkStore ) : public CActive - { - -public: // Constructors and destructor - - /** - * C++ 2 constructor. - */ - static CVmbxPbkStore* NewL(); - - /** - * Destructor. - */ - virtual ~CVmbxPbkStore(); - -public: // New functions - - /** - * Sim write support - * - * @return ETrue if writable - */ - TBool IsWritable(); - - /** - * sim PhoneBook Type - * @return TVmbxSimPhonebookType - */ - TVmbxSimPhonebookType PhoneBookType(); - - /** - * Writes an entry into ICC-based phonebook. - * - * @param in aEntry Reference of CVoiceMailboxEntry - * @return KErrNone if succesful, - * Other system wide errors. - **/ - TInt Write( const CVoiceMailboxEntry& aEntry ); - - /** - * Retrieves hanlder of RMobilePhoneBookStore - * - * @retuns hanlder of RMobilePhoneBookStore - */ - RMobilePhoneBookStore& PhonebookStore(); - - /** - * Retrieves mailbox number from Sim - * @param out aEntry a data type CVoiceMailboxEntry - */ - void GetL( CVoiceMailboxEntry& aEntry ); - -private: // from base class CActive - - /** - * @see CActive::RunL - */ - void RunL(); - - /** - * @see CActive::DoCancel - */ - void DoCancel(); - - /** - * @see CActive::RunError - */ - TInt RunError(TInt aError); - -private: // New functions - - /** - * Reads an entry from the ICC-based phonebook. - * - * @param out aEntry Reference of CVoiceMailboxEntry - **/ - void SimReadL( CVoiceMailboxEntry& aEntry ); - - /** - * Opens VMBX phonebook - * @retuns KErrNone if succesful - **/ - TInt OpenVmbxPhonebook(); - - /** - * Opens MBDN phonebook - * @retuns KErrNone if succesful - **/ - TInt OpenMbdnPhonebook(); - - /** - * Get Phonebook Info - * @param out aInfo information from RPhonebookStore - * - **/ - TInt GetVmbxInfo( RMobilePhoneBookStore::TMobilePhoneBookInfoV1& aInfo ); - - /** - * Retrieves the Mailbox numbers identifier information - * @param out aInfo information from RPhonebookStore - * @retuns KErrNone if succesful - **/ - TInt GetMbdnInfo( RMobilePhone::TMobilePhoneVoicemailIdsV3& aInfo ); - - - /** - * Reads "ParseDataL" from phonebook data from Sim - * - * @param out aEntry entry of CVoiceMailboxEntry - * @param in aPbData - */ - void ParseDataL( CVoiceMailboxEntry& aEntry, TDes8& aPbData ); - - /** - * Reads "new-entry-tag" from phonebook data from Sim - * - * @param in aPbkBuffer Phonebook data buffer - * @retuns KErrNone if succesful - */ - TInt ReadNewEntryTag( CPhoneBookBuffer* aPbkBuffer ); - - /** - * Reads tags from buffer retrieved from sim - * - * @param in aPbkBuffer Phonebook data buffer - * @param out aEntry Reference of CVoiceMailboxEntry - */ - void ReadPbkDataL( CPhoneBookBuffer* aPbkBuffer, - CVoiceMailboxEntry& aEntry ); - - /** - * Checks sim file existing - * - * @retuns ETrue if file exists - **/ - TBool IsSimFileExisting( const TVmbxSimPhonebookType aType ); - - /** - * Sim write acces support - * - * @return ETrue if writable access - */ - TBool IsWriteAccess(); - -protected: - - /** - * C++ constructor. - * - */ - CVmbxPbkStore(); - - /** - * By default Symbian 2nd phase constructor is protected. - */ - void ConstructL(); - -protected: // data - - /** - *Pointer to Telephony server and phone connection - *Own - */ - CVmbxETelConnection* iETelConnection; - - /** - * Phonebook store client - */ - RMobilePhoneBookStore iPhoneBook; - - /** - * Sim Phonebook type - */ - TVmbxSimPhonebookType iPhoneBookType; - - /** - * CActiveSchedulerWait - * Own. - */ - CActiveSchedulerWait* iWait; - - - /** - * Asynchronous operation type of sim card - */ - TVmbxSimAsynType iAsynType; - - }; - -#endif // C_VMBXPHBSTORE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxqtuihandler.h --- a/vmbx/vmbxengine/inc/vmbxqtuihandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2009-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: Hanlder Ui which implement of qt. -* Interface : Private, VmbxQtUiHandler -* -*/ - - -#ifndef VMBXQTUIHANDLER_H -#define VMBXQTUIHANDLER_H - -// INCLUDES -#include -#include -#include - -#include "voicemailboxdefsinternal.h" - -// FORWARD DECLARATION -class CVoiceMailboxEntry; -class TVoiceMailboxParams; -class HbInputDialog; - -// CLASS DECLARATION - -/** -* Dialog manager -* -* @lib vmbxengine.lib -*/ -class VmbxQtUiHandler : public QObject - { - Q_OBJECT - -public: // Constructors and destructor - - /** - * C++ default constructor. - * - */ - VmbxQtUiHandler(QObject* parent = 0 ); - - /** - * Destructor. - */ - virtual ~VmbxQtUiHandler(); - - /** - * Initialize, load qt translator. - */ - void init(); - - /** - * Show mailbox query dialog - * - * @param aType in TVmbxType type - * @param aNumber the voice mailbox number - * @param aResult out the result of dialog - */ - void showVmbxQueryDialog(const TVmbxType& aType, - QString& aNumber, int& aResult); - - /** - * Show define number in selection dialog - * Leaves if user cancel selected. - * - * @param in aType vmbx type - * @param out aResult the result of dialog - */ - void showDefineSelectionDialog(TVmbxType& aType, int& aResult); - - /** - * Show call number in selection dialog - * - * @param in entryList array of the defined voice mailbox entry - * @param out params the type TVoiceMailboxParams which should include - * the service id and the type of seclected TVmbxType - * @param out result the result user seclected - */ - void showCallSelectionDialog( - const QList entryList, - TVoiceMailboxParams ¶ms, int &result ); - - /** - * Show voice mailbox information number - * - * @param aNoteType in TVmbxType type - */ - void showInformationNote(const TVmbxNoteType aType); - - /** - * Check qt environment supported or not. - * - * @return qt environment supported or not. - */ - bool isQtEnvSupported(); - -private slots: - /** - * update Ok button status according to user input string - * - * @param aInput User input string - */ - void updatePrimaryAction(const QString &aInput); - -private: - - /** - * Translator vmbx localization - */ - QTranslator iTranslator; - - /** - * Translator common localization - */ - QTranslator iCommonTranslator; - - /** - * Query and Define mailbox dialog. Own - */ - HbInputDialog *iQueryDialog; - }; - -#endif // VMBXQTUIHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxsatrefreshobserver.h --- a/vmbx/vmbxengine/inc/vmbxsatrefreshobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2009-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: Observer to Sat refresh -* Interface : Private, CVmbxSatRefreshObserver -* -*/ - - -#ifndef C_VMBXSATREFRESHOBSERVERR_H -#define C_VMBXSATREFRESHOBSERVERR_H - -// INCLUDES -#include -#include -#include -#include -#include "mvmbxsatrefreshobserver.h" - - -// FORWARD DECLARATIONS - - -// CLASS DECLARATION - -/** -* Implements functionality specifig to voice mailbox entry -* - -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxSatRefreshObserver ) : public CBase, - public MSatRefreshObserver - { - -public: // Constructors and destructor - - /** - * Two-phased constructor - * @param in aObserver observer which want to notify sat refresh - */ - static CVmbxSatRefreshObserver* NewL( MVmbxSatRefreshObserver& aObserver ); - - /** - * Destructor. - */ - virtual ~CVmbxSatRefreshObserver(); - -public: // from base class MSatRefreshObserver - - /** - * @See MSatRefreshObserver::AllowRefresh - */ - TBool AllowRefresh( TSatRefreshType aType, - const TSatRefreshFiles& aFiles ) ; - - /** - * @See MSatRefreshObserver::Refresh - */ - void Refresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ); - -private: - - /** - * C++ default constructor. - * @param aObserver Reference to MVmbxSatRefreshObserver - */ - CVmbxSatRefreshObserver( MVmbxSatRefreshObserver& aObserver); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // data - - /** - * Sat server session - * Own - */ - RSatSession iRSatSession; - - /** - * Sat refresh connection - * Own - */ - RSatRefresh iSatRefresh; - - /** - * A package for the TRefreshFileList. - * list of files, waiting for notification. - */ - RSat::TRefreshFileList iObservedFileList; - - /** - * Reference to MVmbxSatRefreshObserver - */ - MVmbxSatRefreshObserver& iObserver; - }; - -#endif // C_VMBXSATREFRESHOBSERVERR_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxsimhandler.h --- a/vmbx/vmbxengine/inc/vmbxsimhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2009-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: Access class to SIM -* Interface : Private, CVmbxSimHandler -* -*/ - - -#ifndef C_VMBXSIMHANDLER_H -#define C_VMBXSIMHANDLER_H - -// INCLUDES -#include -#include -#include "voicemailboxdefsinternal.h" - - -// FORWARD DECLARATION -class CVmbxPbkStore; -class CVoiceMailboxEntry; - - -// CLASS DECLARATION -/** -* Creates connection to Sim phonebook and handles data flow from/to it -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxSimHandler ) : public CBase - { - -public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CVmbxSimHandler* NewL(); - - /** - * Destructor. - */ - virtual ~CVmbxSimHandler(); - -public: // New functions - - /** - * Retrieves mailbox number from Sim - * @param in aEntry a data type of CVoiceMailboxEntry - */ - void GetL( CVoiceMailboxEntry& aEntry ); - - /** - * Saves vmbx number to Sim - * @param in aEntry a data type of CVoiceMailboxEntry - * @return Symbian OS error code (KErrNone if successful) - */ - TInt Save( const CVoiceMailboxEntry& aEntry ); - - /** - * Returns sim write access info - * @return ETrue if Sim is writable - **/ - TBool IsWritable(); - - /** - * @see RMobilePhoneStore::NotifyStoreEvent - * - */ - void NotifyStoreEvent( TRequestStatus& aStatus, - TUint32& aEvent, - TInt& aIndex ) const; - /** - * Retrieves Sim PhoneBook Type - * @return TVmbxSimPhonebookType - */ - TVmbxSimPhonebookType PhoneBookType(); - - /** - * CancelAsyncRequest - * @param aReqToCancel Entry data - */ - void CancelAsyncRequest( TInt aReqToCancel ) const; - -protected: - - /** - * C++ constructor. - */ - CVmbxSimHandler(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // data - - /** - * pbk store - * Own. - */ - CVmbxPbkStore* iPbkStore; - }; - -#endif // C_VMBXSIMHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxsimstoreobserver.h --- a/vmbx/vmbxengine/inc/vmbxsimstoreobserver.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2009-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: Observer to Sim Store changed -* Interface : Private, CVmbxSimStoreObserver -* -*/ - - -#ifndef C_VMBXSIMSTOREOBSERVERR_H -#define C_VMBXSIMSTOREOBSERVERR_H - -// INCLUDES -#include -#include "mvmbxsimstoreobserver.h" - -// FORWARD DECLARATIONS -class CVmbxSimHandler; - -// CLASS DECLARATION - -/** -* DECLARATION CVmbxSimStoreObserver -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxSimStoreObserver ) : public CActive - { - -public: // Constructors and destructor - - /** - * Two-phased constructor - * @param in aSimHandler Reference to Sim handler - * @param in aObserver observer of MVmbxSimStoreObserver - */ - static CVmbxSimStoreObserver* NewL( CVmbxSimHandler& aSimHandler, - MVmbxSimStoreObserver& aObserver ); - - /** - * Destructor. - */ - virtual ~CVmbxSimStoreObserver(); - -public: // New functions - - /** - * Activates this notification. Call ETel NotifyStoreEvent. - */ - void ActivateL(); - -private: - - /** - * C++ default constructor. - * @param in aSimHandler Reference to Sim handler - * @param in aObserver observer of MVmbxSimStoreObserver - */ - CVmbxSimStoreObserver( CVmbxSimHandler& aSimHandler, - MVmbxSimStoreObserver& aObserver ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Informs SimHandler about changed number - */ - void NotifySimHandler(); - -// from base class CActive -private: - /** - * @see CActive::RunL - */ - void RunL(); - - /** - * @see CActive::DoCancel - */ - void DoCancel(); - - -private: // data - - /** - * The index of the entry that has been changed - */ - TInt iIndex; - - /** - * The events that ETel sends - */ - TUint32 iEvents; - - /** - * CVmbxSimHandler reference - * - */ - CVmbxSimHandler& iSimHandler; - - /** - * MVmbxSimStoreObserver reference - * - */ - MVmbxSimStoreObserver& iObserver; - - }; - -#endif // C_VMBXSIMSTOREOBSERVERR_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxuihandler.h --- a/vmbx/vmbxengine/inc/vmbxuihandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handler ui related. -* Interface : Private, CVmbxUiHandler -* -*/ - -#ifndef VMBXENGINEQTUI_H -#define VMBXENGINEQTUI_H - - -#include -#include "mvmbxuihandler.h" - -// FORWARD DECLARATION -class VmbxQtUiHandler; - -// CLASS DECLARATION - -/** -* -* @lib qvmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxUiHandler ):public CBase, - public MVmbxUiHandler - { - -public: // Constructors and destructor - /** - * Two-phased constructor - */ - static CVmbxUiHandler* NewL(); - - /** - * Destructor. - */ - ~CVmbxUiHandler(); - -//From MVmbxUiHandler - - /** - * Show mailbox query dialog - * Leaves if user cancel selected. - * - * @param aType in TVmbxType type - * @param aNumber the voice mailbox number - * @param aResult out the result of dialog - */ - virtual void ShowVmbxQueryDialogL( const TVmbxType& aType, - TDes& aNumber, TInt& aResult ); - - /** - * Show define number in selection dialog - * - * @param in aType vmbx type - * @param out aResult the result of dialog - */ - virtual void ShowDefineSelectionDialogL( TVmbxType& aType, TInt& aResult ); - - /** - * Show call number in selection dialog - * Leave if aArray < 1 - * - * @param in aArray array of the defined voice mailbox entry - * @param in aIcons icons of the defined voice mailbox - * @param out aParams the type TVoiceMailboxParams which should include - * the service id and the type of seclected TVmbxType - * @param out aResult the result user seclected - */ - virtual void ShowCallSelectionDialogL( - const RPointerArray& aArray, - //CArrayPtr* aIcons, - TVoiceMailboxParams& aParams, TInt& aResult ); - - /** - * Show informationd note - * - * @param aType in TVmbxNoteType type - */ - virtual void ShowInformationdNoteL(const TVmbxNoteType aType); - - /** - * show an error dialog for invalid number - * - */ - virtual void ShowInvalidWarningNoteL(); - -private: - - /** C++ default constructor. - * - */ - CVmbxUiHandler(); - - /** - * C++ Two-phased constructor. - */ - void ConstructL(); - -private: // data - - /** - * Dialog manage - * Own - */ - VmbxQtUiHandler* iHandler; - }; - -#endif // VMBXENGINEQTUI_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxuiutilities.h --- a/vmbx/vmbxengine/inc/vmbxuiutilities.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2009-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: Utility methods for universal usage -* Interface : Private, CVmbxUiUtilities -* -*/ - -#ifndef C_VMBXUIUTILITIES_H -#define C_VMBXUIUTILITIES_H - -// INCLUDES -#include -#include - -#include "mvmbxuiutilities.h" -#include "vmbxuihandler.h" - -// FORWARD DECLARATIONS - - -// CLASS DECLARATION -/** -* Implementation of the auxiliary methods for the VMBX engine classes -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxUiUtilities ): public CBase, - public MVmbxUiUtilities - { - -public: - - /** - * Two-phased constructor - */ - static CVmbxUiUtilities* NewL(); - - /** - * Destructor. - */ - ~CVmbxUiUtilities(); - - /** - * Show mailbox query - * - * @param in aType TVmbxType type - * @param in aMode TVmbxQueryMode mode - * @param out aNumber the voice mailbox number - */ - void ShowQueryL( const TVmbxType& aType, - const TVmbxQueryMode& aMode, - TDes& aNumber ); - - /** - * Show informationd note - * - * @param aType in TVmbxNoteType type - */ - void ShowInformationdNoteL(const TVmbxNoteType aType); - - /** - * Show define number in selection dialog - * Leaves if user cancel selected. - * - * @param in aType vmbx type - * @param out aResult the result of dialog - */ - void ShowDefineSelectionDialogL( TVmbxType& aType, TInt& aResult ); - - /** - * Show call number in selection dialog - * Leaves if user cancel selected. - * - * @param in aArray array of the defined voice mailbox entry - * @param in aIcons icons of the defined voice mailbox - * @param out aParams the type TVoiceMailboxParams which should include - * the service id and the type of seclected TVmbxType - * @param out aResult the result user seclected - */ - void ShowCallSelectionDialogL( - const RPointerArray& aArray, - //CArrayPtr* aIcons, - TVoiceMailboxParams& aParams, TInt& aResult ); - - /** - * Get Mailbox type default image. - * If get unseccessful, Leaves with Symbian OS error code - * - * @param aParams Mailbox type for which image is needed. - * @return aImage New image. Ownership is transferred. - */ - //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams ); - - /** - * Show not allowed editing dialog - * - */ - void ShowNotAllowedEditingDialogL(); - - /** - * Show invalid or warning dialog - * - */ - void ShowInvalidWarningDialogL(); - - /** - * Tries to close all open dialogs - * - */ - void DismissDialogL(); - -private: // data - - /** - * C++ default constructor. - */ - CVmbxUiUtilities(); - - /** - * C++ Two-phased constructor. - */ - void ConstructL(); - - /** - * Show mailbox query dialog - * Leaves if user cancel selected. - * - * @param aType in TVmbxType type - * @param aMode Tin VmbxQueryMode mode - * @param aNumber the voice mailbox number - * @param aResult out the result of dialog - */ - void ShowQueryDialogL( const TVmbxType& aType, - const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult ); - - /** - * Open phonebook's Single Fetch Dialog - * @param aPhoneNumber Phone number - */ - void FetchNumberFromPhonebook2L( TDes& aPhoneNumber ); - -private: - - /** - * Ui handler - * Own. - */ - CVmbxUiHandler* iUiHandler; - }; - -#endif // C_VMBXUIUTILITIES_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxutilities.h --- a/vmbx/vmbxengine/inc/vmbxutilities.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2009-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: Utility methods for universal usage -* Interface : Private, VmbxUtilities -* -*/ - - -#ifndef VMBXUTILITIES_H -#define VMBXUTILITIES_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS - - -// CLASS DECLARATION - -/** -* Implementation of the auxiliary methods for the VMBX engine classes -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( VmbxUtilities ) - { - -public: // New functions - - /** - * Verifies that the given string is a valid phone number. - * Rules: - * - '+' is only allowed as the first character - * - The phone number part must be between 3-40 digits - * - * @param in aNumber Vmbx number - * @return ETrue if valid number - */ - static TBool IsValidPhoneNumber( const TDesC& aNumber ); - - /** - /** - * Returns active ALS - * - * @return Active ALS line - */ - static TVmbxAlsLineType AlsLine(); - - /** - * Returns state of the video support - * - * @return ETrue if Video supported - */ - static TBool VideoSupported(); - - /** - * Returns state of the VoIP Support - * - * @return ETrue if VoIP Supported - */ - static TBool VoIPSupported(); - - /** - * Verifies that the given number is not an emergency number. - * - * @param in aNumber Mailbox number - * @return ETrue if emergency number - */ - static TBool IsEmergencyNumber( const TDesC& aNumber ); - -private: - - /** - * Verifies that the given string is a valid Tel number. - * - * @param in aLexer string to be validate - * @return ETrue if tel number validate - */ - static TBool ValidateTelNum( TLex& aLexer ); - - /** - * Verifies that the given string is a valid DTMF number. - * - * @param in aLexer string to be validate - * @return ETrue if DTMf validate - */ - static TBool ValdateDtmfPart( TLex& aLexer ); - - }; - -#endif // VMBXUTILITIES_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmbxvoipengine.h --- a/vmbx/vmbxengine/inc/vmbxvoipengine.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -/* -* Copyright (c) 2009-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: Access class to VoIp engine implementation -* Interface : Private, CVmbxVoIpEngine -* -*/ - - -#ifndef C_VMBXVOIPENGINE_H -#define C_VMBXVOIPENGINE_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATIONS -class CVmbxEngineBase; -//class CGulIcon; -class CVmSPSHandler; -class CVmBSHandler; -class TVmbxServiceInfo; -//class CFbsBitmap; - -// CLASS DECLARATION - -/** -* Implements functionality specifig to voip mailbox entry -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVmbxVoIpEngine ) : public CVmbxEngineBase - { - -public: // Constructors and destructor - - /** - * Two-phased constructor - * @param aProvider Reference to Ui Utilities - */ - static CVmbxVoIpEngine* NewL( MVmbxResourceProvider& aProvider ); - - - /** - * Destructor. - */ - virtual ~CVmbxVoIpEngine(); - -public: // from base class CVmbxEntryBase - - /** - * - * @see CVmbxEntryBase::GetL - * @param aEntry Reference to store handler - */ - void GetL( CVoiceMailboxEntry*& aEntry ); - - /** - * - * @see CVmbxEntryBase::SaveL - * @param aEntry Reference to CVoiceMailboxEntry - * @param aShowNotesAllowed Provision mode is used to decide whether show - * saved notification UI dialog. If aShowNotesAllowed is EFalse, - * saved notification UI dialog will not show. - */ - void SaveL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ); - - /** - * To save mailbox Provisioned entry value - * - * @param aEntry Provisioned Entry data - */ - void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry ); - - /** - * see CVmbxEntryBase::CheckConfiguration - * - */ - TBool CheckConfiguration( const TVoiceMailboxParams& aParams, - const TInt aFlags ); - - /** - * Displays number query dialog - * - * @param aEntry CVoiceMailboxEntry - */ - void QueryDefineNumberL( CVoiceMailboxEntry& aEntry ); - - /** - * Displays number query dialog - * - * @param aEntry Entry data - */ - void QueryChangeNumberL( CVoiceMailboxEntry& aEntry ); - -private: // New function - - /** - * C++ default constructor. - * - * @param aProvider Reference to Ui Utilities - */ - CVmbxVoIpEngine( MVmbxResourceProvider& aProvider ); - - /** - * By default Symbian 2nd phase constructor is private. - * - */ - void ConstructL(); - - /** - * Check from SPSettings if there are VoIP profiles - * @param None - * @return ETrue if VoIP profiles were found, otherwise EFalse - */ - TBool IsVoIPProfilesFound(); - - /** - * Checks the Voice Mailbox how many VoIP service Ids - * - * @param aProfileIds - * @return KErrNone if get service Ids successfully. - */ - void GetServiceIdsL( RIdArray& aProfileIds ); - - /** - * Get branded icon - * @param in aBrandingId Brandind Id - * @param out aBrandedBitmap Bitmap for branded icon - * @param out aBrandedBitmapMask Mask to branded icon - */ - //void GetBrandedIconL( const TDesC8& aBrandingId, - // CFbsBitmap*& aBrandedBitmap, CFbsBitmap*& aBrandedBitmapMask ); - - /** - * see CVoiceMailbox::GetVmbxImage - * - */ - //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams ); - - /** - * Get brand id - * @param in aServiceId Used Service - * @param out aBrandId On completion, contains Brand Id - */ - void BrandIdL( TInt aServiceId, TDes8& aBrandId ); - - /** - * Get service ids - * @param in&out aServiceInfo On completion contains service ids - */ - TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo ); - -private: // data - - /** - * Handles Service proviver Settings, Own. - */ - CVmSPSHandler* iVmSpsHandler; - - /** - * Handles Branding Server, Own. - */ - CVmBSHandler* iVmBsHandler; - }; - -#endif // C_VMBXVOIPENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmsettingsuiiconfileprovider.h --- a/vmbx/vmbxengine/inc/vmsettingsuiiconfileprovider.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2006-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 C_VMSETTINGSUIICONFILEPROVIDER -#define C_VMSETTINGSUIICONFILEPROVIDER - -#include -#include - -/** - * CVmSettingsUiIconFileProvider class - * Declarition of CVmSettingsUiIconFileProvider. - * - * @since S60 v3.2 - */ -NONSHARABLE_CLASS( CVmSettingsUiIconFileProvider ) : public CBase, - public MAknIconFileProvider - { -public: - - /** - * Two-phased constructor. - * @param in aFile for handle to file - */ - static CVmSettingsUiIconFileProvider* NewL( RFile& aFile ); - - /** - * Destructor. - */ - virtual ~CVmSettingsUiIconFileProvider(); - -public: // from base class MAknIconFileProvider - - /** - * from MAknIconFileProvider. - */ - void RetrieveIconFileHandleL( RFile& aFile, const TIconFileType aType ); - - /** - * from MAknIconFileProvider. - */ - void Finished(); - -private: - - /** - * C++ default constructor. - */ - CVmSettingsUiIconFileProvider(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( RFile& aFile ); - -private: // data - - // File handle. Own. - RFile iFile; - }; - -#endif // C_VMSETTINGSUIICONFILEPROVIDER diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/vmspshandler.h --- a/vmbx/vmbxengine/inc/vmspshandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,208 +0,0 @@ -/* -* Copyright (c) 2009-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: Service provider settings handler - * -*/ - -#ifndef C_VMSPSHANDLER_H -#define C_VMSPSHANDLER_H - -// INCLUDES -#include -#include -#include -#include -#include "mvmbxservicenotify.h" - - -// FORWARD DECLARATIONS -class CSPSettings; -class CSPNotifyChange; -class TVmbxServiceInfo; - -// CLASS DECLARATION - -/** - * CVmSPSHandler declaration. - * Service provider settings handler is used to access service and - * sub-service configuration data. - * - * @since S60 3.2 - */ -NONSHARABLE_CLASS( CVmSPSHandler ) : public CBase, - private MSPNotifyChangeObserver - { - -public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CVmSPSHandler* NewL(); - - /** - * Two-phased constructor. - */ - static CVmSPSHandler* NewLC(); - - /** - * Destructor. - */ - virtual ~CVmSPSHandler(); - -public: // New functions - - /** - * Get service ids which support Voice Mailbox - * @since S60 3.2 - * @param aServiceIds On completion contains service ids - */ - void GetServiceIdsL( RArray& aServiceIds ) const; - - /** - * Get service's info - * @since S60 3.2 - * @param aServiceInfo On completion contains service info - */ - TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const; - - /** - * Get service's VMBX address - * @since S60 3.2 - * @param aServiceId Used Service - * @param aService On completion, contains service's address - */ - void GetVmAddressL( const TUint32 aServiceId, TDes& aAddress ) const; - - /** - * Get service's name - * @since S60 3.2 - * @param aServiceId Used Service - * @param aName On completion, contains service's name - */ - void GetServiceNameL( const TUint32 aServiceId, TDes& aName ) const; - - /** - * Get SNAP id - * @since S60 3.2 - * @param aServiceId Used Service - * @param aSNAPId On completion, contains SNAP Id - */ - void GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const; - - /** - * Get brand id - * @since S60 3.2 - * @param aServiceId Used Service - * @param aBrandId On completion, contains Brand Id - */ - void BrandIdL( TInt aServiceId, TDes8& aBrandId ); - - /** - * Check is given service already activated - * @since S60 3.2 - * @param aServiceId Used Service - * @return ETrue if Service is already activated - */ - TBool IsActivatedL( TInt aServiceId ); - - /** - * Issues a notify request on a Service profile change. - * @param aHandler user's notify handler - */ - void NotifyServiceChange( MServiceNotifyHandler* aHandler ); - - /** - * Cancels a notify request on a VoIP profile change. - */ - void NotifyServiceChangeCancel(); - - /** - * Check from SPSettings if there are VoIP profiles - * @since S60 3.2.3 - * @param None - * @return ETrue if VoIP profiles were found, otherwise EFalse - */ - TBool IsVoIPProfilesFound(); - -protected: - - /** - * Handle notify change event. - * From MSPNotifyChangeObserver; - * - * @since S60 3.2 - * @param aServiceId The service ID of changed service - */ - void HandleNotifyChange( TServiceId aServiceId ); - - /** - * Handle error - * - * @since S60 3.2 - */ - void HandleError( TInt aError ); - -private: - - /** - * Is VMBX supported - * @since S60 3.2 - * @param aServiceId Used Service - * @return ETrue if VMBX is supported - */ - TBool IsVbmxSupportedL( TUint32 aServiceId ) const; - - /** - * C++ default constructor. - */ - CVmSPSHandler(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - -private: // data - - /** - * CSPSettings. Own - */ - CSPSettings* iSettings; - - /** - * CSPSettingsVoIPUtils. Own - */ - CSPSettingsVoIPUtils* iSpsSettingsVoipUtils; - - /** - * Observer. Not own - */ - MServiceNotifyHandler* iObserver; - - /** - * Pointer to CSPNotifyChange - */ - CSPNotifyChange* iNotifier; - - /** - * Service id array - */ - RIdArray iServiceIds; - - }; - -#endif // C_VMSPSHANDLER_H - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/voicemailboxdefsinternal.h --- a/vmbx/vmbxengine/inc/voicemailboxdefsinternal.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/* -* Copyright (c) 2009-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: Constant used for vmbx engine -* -*/ - -#ifndef C_VOICEMAILBOXDEFSINTERNAL_H -#define C_VOICEMAILBOXDEFSINTERNAL_H - -// INCLUDES -#include - -// CONSTANTS -const TInt KVmLbxItemsArraySize = 3; -const TInt KVmbxPhoneCharMaxLength = 48; - -/**Sim card voice mailbox file type*/ -enum TVmbxSimPhonebookType - { - /** - * Sim file using 6f17 file. - */ - EVMBXPhoneBook = 0, - /** - * Sim file using 6fc7 file. - */ - EMBDNPhoneBook - }; - -/**CenRep Key which storaged value would be changed*/ -enum TVmbxCenRepKey - { - /** - * Storage Voice number of Line Primary. - */ - EVmbxVoiceLinePrimaryKey = 0, - /** - * Storage Voice number of Line Alternate. - */ - EVmbxVoiceLineAlternateKey, - /** - * Storage Video number of Line Primary. - */ - EVmbxVideoLinePrimaryKey, - /** - * Storage Video number of Line Alternate. - */ - EVmbxVideoLineAlternateKey, - /** - * the max value. - */ - EVmbxCenRepMax - }; - -/** - * TVmbxServiceInfo, contains Service information. - * - * @since S60 5.2 - **/ -class TVmbxServiceInfo - { - public: // Constructors and destructor - - TVmbxServiceInfo() - { - iServiceId = 0; - iSnapId = 0; - } - - public: // Data - - // Service's Id - TUint iServiceId; - - // Service's SNAP Id - TUint32 iSnapId; - - // Service's name. - TBuf<64> iName; - - // Service's address. - TBuf<100> iAddress; - }; - -/**Asynchronous operation type of sim card*/ -enum TVmbxSimAsynType - { - /** - * the default value. - */ - EVmbxSimDefault, - /** - * Retrieves Phonebook stroe information. - */ - EVmbxSimGetInfo, - /** - * Retrieves Phonebook entry for "voicemail" mailbox number. - */ - EVmbxSimMbdnInfo, - /** - * Read "voicemail" mailbox number from phonebook store. - */ - EVmbxSimEntryRead, - /** - * Write "voicemail" mailbox number to phonebook store. - */ - EVmbxSimEntryWrite - }; - -/**Note for vmbx ui utilities*/ -enum TVmbxNoteType - { - EInvalidNumber, - ESavedToPhoneMemory, - ESavedToSimMemory, - EVideoNumberSaved, - EDefineVoiceNumber, - EDefineVideoNumber, - ENotAllowUserEditing - }; - -#endif // C_VOICEMAILBOXDEFSINTERNAL_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/voicemailboxdomaincrkeys.h --- a/vmbx/vmbxengine/inc/voicemailboxdomaincrkeys.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +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: -* Interface : Domain -* -*/ - - -#ifndef VOICEMAILBOXDOMAINCRKEYS_H -#define VOICEMAILBOXDOMAINCRKEYS_H -#include - -/** VoiceMailbox Settings API */ -/** Provides access to the VoiceMailbox video mailbox support key -determination */ - -const TUid KCRUidVideoMailbox = {0x101F874F}; - -/** -* -* Integer type -* -* Default value: 1 -*/ -const TUint32 KVideoMbxSupport = 0x00000015; - - -#endif // VOICEMAILBOXDOMAINCRKEYS_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/voicemailboximpl.h --- a/vmbx/vmbxengine/inc/voicemailboximpl.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,436 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation class for voice mailbox -* Interface : Private, CVoiceMailboxImpl -* -*/ - -#ifndef C_VOICEMAILBOXIMPL_H -#define C_VOICEMAILBOXIMPL_H - - -// INCLUDES -#include -#include -#include "mvmbxchangeobserver.h" -#include "mvoicemailboxobserver.h" -#include "mvmbxresourceprovider.h" -#include "mvmbxuiutilities.h" -#include "mvmbxcenrephandler.h" - -// FORWARD DECLARATIONS -class CVmbxUiUtilities; -class CVmbxEngineFactory; -class CVmbxObserver; -class CVmbxCenRepHandler; - -// CLASS DECLARATION - -/** -* Implemets mailbox entry base class functionality -* -* @lib vmbxengine.lib -*/ -NONSHARABLE_CLASS( CVoiceMailboxImpl ) : public CBase, - public MVmbxChangeObserver, - public MVmbxResourceProvider - { - -public: // Constructors and destructor - - /** - * Two-phased constructor - */ - static CVoiceMailboxImpl* NewL(); - - /** - * Two-phased constructor - */ - static CVoiceMailboxImpl* NewLC(); - - /** - * Destructor. - */ - virtual ~CVoiceMailboxImpl(); - -public: // New functions - - /** - * see CVoiceMailbox::GetStoredEntry - * - */ - TInt GetStoredEntry( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) const; - - /** - * see CVoiceMailbox::SaveEntry - * - */ - TInt SaveEntry( const CVoiceMailboxEntry& aEntry ); - - /** - * see CVoiceMailbox::QueryNewEntry - * - */ - TInt QueryNewEntry( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ); - - /** - * see CVoiceMailbox::QueryChangeEntry - * - */ - TInt QueryChangeEntry( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry); - - /** - * see CVoiceMailbox::QueryVmbxType - * - */ - TInt QueryVmbxType( TVoiceMailboxParams& aParams ); - - /** - * see CVoiceMailbox::NotifyVmbxNumberChangeL - * - */ - void NotifyVmbxNumberChangeL( MVoiceMailboxObserver& aObserver, - const TBool aNotifyOnActiveLineOnly ); - - /** - * see CVoiceMailbox::NotifyVmbxNumberChangeCancel - * - */ - void NotifyVmbxNumberChangeCancel(); - - /** - * see CVoiceMailbox::CheckConfiguration - * - * @since S60 v5.2 - */ - TBool CheckConfiguration( const TVoiceMailboxParams& aParams, - const TInt aFlags ); - - /** - * see CVoiceMailbox::GetServiceIds - * - */ - TInt GetServiceIds( RIdArray& aProfileIds ); - - /** - * see CVoiceMailbox::GetVmbxImage - * - */ - //CGulIcon* GetVmbxImage( const TVoiceMailboxParams& aParams ); - - /** - * see CVoiceMailbox::GetVmbxImages - * - */ - //CArrayPtr* GetVmbxImages( - // RArray& aParams ); - - /** - * see CVoiceMailbox::SaveProvisionedEntry - * - */ - TInt SaveProvisionedEntry( const CVoiceMailboxEntry& aEntry ); - - -public: // From MVmbxChangeObserver - - /** - * see MVmbxChangeObserver::SatRefreshL - * - */ - void SatRefreshL(); - - /** - * see MVmbxChangeObserver::CenRepChangedL - * - */ - void CenRepChangedL( TVmbxCenRepKey aId ); - - /** - * see MVmbxChangeObserver::SimStoreChangedL - * - */ - void SimStoreChangedL(); - -public: // From MVmbxChangeObserver - - /** - * Get Handler of VmbxUiUtilities - * - * @return Refereance of MVmbxUiUtilities - */ - MVmbxUiUtilities& VmbxUiUtilities(); - - /** - * Get Handler of VmbxCenrepHandler - * - * @return Refereance of MVmbxCenrepHandler - */ - MVmbxCenrepHandler& VmbxCenRepHandler(); - - -private: //New method - - /** - * C++ default constructor. - * - */ - CVoiceMailboxImpl(); - - /** - * ConstructL - * - */ - void ConstructL(); - - /** - * Retrieves voice mailbox entry for the specified service. - * Leave - KErrNotFound if no entry available - * - KErrArgument when illegal argument - * - Other system wide errors. - * - * @param in Params Service id and type of the mailbox for which - * a number/address should be defined. - * @param out aEntry If successful, a new result container is - * created and ownership passed to the caller. - */ - void GetStoredEntryL( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) const; - - /** - * Displays a query asking the user to define a mailbox number/address. - * Returns the input which the user entered, but does not save it. - * For that caller has to use SaveEntry(). - * This method may display related UI notes or queries. - * - * If editing for the specified mailbox service is not allowed, - * this method displays an error note and returns an error. - * If client is interested, CheckConfiguration() - * can be used to check permissions. - * - * Leave - KErrNotFound if the number is not defined - * (user entered no number or selected Cancel) - * - KErrArgument When illegal argument. - * - KErrNotSupported if not capable or allowed to execute this - * for the specified mailbox. - * - Other system wide errors. - * - * @param in aParams Service id and type of the mailbox for which - * a number/address should be defined. - * @param out aEntry If successful, a new result container is - * created and ownership passed to the caller. - */ - void QueryNewEntryL( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ); - - /** - * Saves the vmbx entry to its storage. - * Leave - KErrNotSupported if not capable or allowed to execute this - * for the specified mailbox service. - * - KErrArgument When illegal argument was passed. - * - Other system wide errors. - * - * Some mailbox types may not support saving all arguments. - * In that case unsupported arguments are ignored. - * This method may display related UI notes or queries. - * - * @param in aEntry The vmbx entry to save. - */ - void SaveEntryL( const CVoiceMailboxEntry& aEntry ); - - /** - * Displays a query asking the user to change a mailbox number/address. - * Returns the input from user, but does not save it. - * For that caller has to use SaveEntry(). - * - * If editing for the specified mailbox service is not allowed, - * this method displays an error note and returns an error. - * If client is interested, CheckConfiguration() - * can be used to check permissions. - * - * created and ownership passed to the caller. - * aNumber will contain the vmbx number. - * Leave - KErrCancel If the user selected Cancel. - * - KErrArgument When illegal argument. - * - KErrNotSupported if not capable or allowed to execute this - * for the specified mailbox. - * - Other system wide errors. - * - * @param in aParams Service id and type of the mailbox. - * @param out aEntry If successful, a new result container is - */ - void QueryChangeEntryL( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry); - - /** - * Displays a query on the screen asking the user to select a - * Voice Mailbox service. - * - * Leave - KErrCancel if user selected Cancel - * - KErrNotFound if there is no defined voice number and - * user have selected the type to define or the default - * type given. - * - Other system wide errors. - * - * @param out aParams If successful, - * contains selected mailbox info. - */ - void QueryVmbxTypeL( TVoiceMailboxParams& aParams ); - - /** - * Get defined entries via an array - * Leave with symbian OS error code except KErrNotFound and KErrSupported. - * - * @param out aArray array contains the defined entries - */ - void GetDefinedEntriesL( RPointerArray& aArray ); - - /** - * Get defined voice entry via an array - * Leave with symbian OS error code except KErrSupported. - * - * @param out aArray array contains the defined entries - */ - void GetDefinedVoiceEntryL( - RPointerArray& aArray ); - - /** - * Get defined video entry via an array - * Leave with symbian OS error code except KErrNotFound and KErrSupported. - * - * @param out ay array contains the defined entries - */ - void GetDefinedVideoEntryL( - RPointerArray& aArray ); - - /** - * Get defined voip entries via an array - * Leave with symbian OS error code except KErrNotFound and KErrSupported. - * - * @param out aArray array contains the defined entries - */ - void GetDefinedVoipEntriesL( - RPointerArray& aArray ); - - /** - * Checks the Voice Mailbox how many VoIP service Ids - * Leave with symbian OS error code - * - * @param out aProfileIds - * @return KErrNone if get service Ids successfully. - */ - void GetServiceIdsL( RIdArray& aProfileIds ); - - /** - * Retrieves an image associated with the specified mailbox, - * if an image is available. - * Image can be displayed e.g. in a selection list. - * Leave with symbian OS error code. - * - * @param in aParams Mailbox service id and type for which image is needed. - * @return aImage New image. Ownership is transferred. - */ - //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams ); - - /** - * Retrieves images for the specified mailboxes. - * Image can be displayed e.g. in a selection list. - * Leave with symbian OS error code. - * - * If an image for a service is not available, - * then a NULL pointer is appended to the returned array, to an index - * corresponding to the index of the service id in the input - * array aMailboxServices. - * NULL array pointer is returned if not a signle icon was retrieved - * successfully. - * - * @param in aParams Mailboxes (id and type) for which an image is needed. - * @return aImage Icons for the specified mailboxes. - * Index of an image in the returned array corresponds to the - * index of the service id in the input array. - * Array and icon ownerships are transferred to caller. - * A NULL array pointer is returned if not a single icon was - * retrieved successfully. - */ - //CArrayPtr* GetVmbxImagesL( - // RArray& aParams ); - - /** - * Notify entry changed - * Leave with symbian OS error code. - * - * @param in aType Type of TVmbxType - */ - void NotifyChangedL( TVmbxType aType); - - /** - * Saves provisioned entry to corresponding storage. - * - * Leave - KErrNotSupported if not capable or allowed to execute this - * for the specified mailbox service. - * - KErrArgument When illegal argument was passed. - * - Other system wide errors. - * - * Some mailbox types may not support saving all arguments. - * In that case unsupported arguments are ignored. - * - * @param in aEntry The provisioned vmbx entry to save. - */ - void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry ); - - /** - * Check number provisioned or not - * Leave if systrm wide errors - * - * @param in aParams params of TVoiceMailboxParams - */ - void CheckNumberProvisionedL( const TVoiceMailboxParams& aParams ); - -protected: // data - - /** - * Pointer to CVmbxUiUtilities - * Own. - */ - CVmbxUiUtilities* iUiUtilities; - - /** - * Pointer to CVmbxEngineFactory - * Own. - */ - CVmbxEngineFactory* iVmbxFactory; - - /** - * Observer for user action for saved vmbx number - * Own. - */ - MVoiceMailboxObserver* iNotifyCallBack; - - /** - * Observer for user action for saved vmbx number - * Own. - */ - CVmbxObserver* iVmbxObserver; - - /** - * CVmbxCenRepHandler - * Own. - */ - CVmbxCenRepHandler* iCenRepHandler; - }; - -#endif // C_VOICEMAILBOXIMPL_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/inc/voicemailboxprivatecrkeys.h --- a/vmbx/vmbxengine/inc/voicemailboxprivatecrkeys.h Tue Aug 31 15:45:17 2010 +0300 +++ /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: -* Interface : Private -* -*/ - - -#ifndef VOICEMAILBOXPRIVATECRKEYS_H -#define VOICEMAILBOXPRIVATECRKEYS_H -#include - -const TInt KVmbxUiUserEditNotAllowed = 0x01; - - -/** VoiceMailbox Settings API */ -/** Provides access to the VoiceMailbox numbers and settings */ - -const TUid KCRUidVoiceMailbox = {0x101F874F}; - - -/** Flag which decides where the vmbx number is to be stored. -* If this is On (equals 1) the voice mailbox number is stored in SIM memory, -* else it is stored in Phone memory. -* -* Integer type -* -* Default value: 1 -*/ -const TUint32 KVmbxUsesSimMemory = 0x00000000; - -/** Flag which decides if writing to sim allowed. -* If this is On (equals 1) writing to SIM is not allowed. -* Writing is allowed with value 0 -* Value -* Integer type -* -* Default value: 1 -*/ -const TUint32 KVmbxNoSimWriting = 0x00000001; - -/** Voice Mailbox number for primary line -* -** Text type -* -* Default value: "" -*/ -const TUint32 KVmbxNumberLinePrimary = 0x00000002; - -/** Voice Mailbox number for Alternate line -* -** Text type -* -* Default value: "" -*/ -const TUint32 KVmbxNumberLineAlternate = 0x00000003; - -/** Video Mailbox number for primary line -* -* Text type -* -* Default value: "" -*/ -const TUint32 KVmbxVideoNmbrLinePrimary = 0x00000004; - -/** Video Mailbox number for Alternate line -* -* Text type -* -* Default value: "" -*/ -const TUint32 KVmbxVideoNmbrLineAlternate = 0x00000005; - -/** Flag which User allowed or not allowed to change the VMBX number -* If set value 0x01 no allowed to be edited by user. -* -* Integer type0 -* 0 indicate allowed -* Default value: 0 -*/ -const TUint32 KVmbxUiCaps = 0x00000006; - -/** Flag which Video mailbox is supported or NOT -* -* Integer type -* -* Default value: 1 -*/ -const TUint32 KVmbxVideoMbxSupport = 0x00000015; - - -#endif // VOICEMAILBOXPRIVATECRKEYS_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/rom/backup_registration.xml --- a/vmbx/vmbxengine/rom/backup_registration.xml Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/rom/vmbxengine.iby --- a/vmbx/vmbxengine/rom/vmbxengine.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: IBY file for Voice mailbox Engine - * -*/ - - - -#ifndef __VMBXENGINE_IBY__ -#define __VMBXENGINE_IBY__ - -//vmbxengine.dll -file=ABI_DIR\BUILD_DIR\vmbxengine.dll SHARED_LIB_DIR\vmbxengine.dll - - -// sis stub file -data=ZSYSTEM\install\vmbxengine_stub.sis System\Install\vmbxengine_stub.sis - -#endif // __VMBXENGINE_IBY__ diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/rom/vmbxengine.pkg --- a/vmbx/vmbxengine/rom/vmbxengine.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -; -; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -; All rights reserved. -; This component and the accompanying materials are made available -; under the terms of "Eclipse Public License v1.0" -; which accompanies this distribution, and is available -; at the URL "http://www.eclipse.org/legal/epl-v10.html". -; -; Initial Contributors: -; Nokia Corporation - initial contribution. -; -; Contributors: -; -; Description: For packing vmbxengine. -; -&EN - -; Header -#{"vmbxengine"},(0x1000590f),1,1,0 - -;Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -;Files -"\epoc32\RELEASE\armv5\UREL\vmbxengine.dll"-"!:\sys\bin\vmbxengine.dll" - - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/rom/vmbxengine_stub.pkg --- a/vmbx/vmbxengine/rom/vmbxengine_stub.pkg Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +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: For packing vmbxengine stub. -; Languages -&EN - -; Header -#{"vmbxengine"},(0x1000590F), 1, 0, 0, TYPE=SA - -;Localised Vendor name -%{"Nokia"} - -; Unique Vendor name -:"Nokia" - -;Files -""-"z:\sys\bin\vmbxengine.dll" diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/rom/vmbxengine_stub.sis Binary file vmbx/vmbxengine/rom/vmbxengine_stub.sis has changed diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/rom/vmbxresources.iby --- a/vmbx/vmbxengine/rom/vmbxresources.iby Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +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 __VMBXRESOURCES_IBY__ -#define __VMBXRESOURCES_IBY__ - -#include - -data=DATAZ_\QT_TRANSLATIONS_DIR\vmbx.qm QT_TRANSLATIONS_DIR\vmbx.qm - -#endif \ No newline at end of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/cvoicemailbox.cpp --- a/vmbx/vmbxengine/src/cvoicemailbox.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,269 +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: Implementation of the CVoiceMailbox class -* -*/ - -// INCLUDE FILES -#include - -#include -#include -#include "voicemailboximpl.h" -#include "vmbxlogger.h" - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// -EXPORT_C TInt TVoiceMailboxParams::Version() - { - return iVersion; - } - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// -EXPORT_C TVoiceMailboxParams::TVoiceMailboxParams(): - iType( EVmbxNone ), - iServiceId( KVmbxServiceIdNone ), - iLineType( EVmbxAlsLineDefault ) - { - VMBLOGSTRING( "VMBX: TVoiceMailboxParams: default cnstructor =>" ); - VMBLOGSTRING( "VMBX: TVoiceMailboxParams: default cnstructor<=" ); - } - -// --------------------------------------------------------------------------- -// --------------------------------------------------------------------------- -// -EXPORT_C TVoiceMailboxParams::TVoiceMailboxParams( - const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: TVoiceMailboxParams: Entry cnstructor =>" ); - iType = aEntry.VoiceMailboxType(); - iServiceId = aEntry.ServiceId(); - iLineType = aEntry.VmbxAlsLineType(); - VMBLOGSTRING( "VMBX: TVoiceMailboxParams: Entry cnstructor <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::CVoiceMailboxImpl -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVoiceMailbox::CVoiceMailbox() - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::CVoiceMailbox <=>" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVoiceMailbox::ConstructL() - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::ConstructL =>" ); - iBody =CVoiceMailboxImpl::NewL(); - VMBLOGSTRING( "VMBX: CVoiceMailbox::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -EXPORT_C CVoiceMailbox* CVoiceMailbox::NewL() - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::NewL =>" ); - CVoiceMailbox* self = CVoiceMailbox::NewLC(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVoiceMailbox::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::NewLC -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -EXPORT_C CVoiceMailbox* CVoiceMailbox::NewLC() - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::NewLC =>" ); - CVoiceMailbox* self = new( ELeave ) CVoiceMailbox; - CleanupStack::PushL( self ); - self->ConstructL(); - VMBLOGSTRING( "VMBX: CVoiceMailbox::NewLC <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::~CVoiceMailbox -// Destructor -// --------------------------------------------------------------------------- -// -CVoiceMailbox::~CVoiceMailbox() - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::~CVoiceMailbox =>" ); - delete iBody; - VMBLOGSTRING( "VMBX: CVoiceMailbox::~CVoiceMailbox <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::GetStoredEntry -// -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailbox::GetStoredEntry( - const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::GetStoredEntry <=>" ); - return iBody->GetStoredEntry( aParams, aEntry ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::SaveEntry -// Destructor -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailbox::SaveEntry( const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::SaveEntry <=>" ); - return iBody->SaveEntry( aEntry ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::QueryNewEntry -// -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailbox::QueryNewEntry( - const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::QueryNewEntry <=>" ); - return iBody->QueryNewEntry( aParams, aEntry ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::QueryChangeEntry -// -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailbox::QueryChangeEntry( - const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::QueryChangeEntry <=>" ); - return iBody->QueryChangeEntry( aParams, aEntry ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::QueryVmbxType -// -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailbox::QueryVmbxType( - TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::QueryVmbxType <=>" ); - return iBody->QueryVmbxType( aParams ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::NotifyVmbxNumberChangeL -// -// --------------------------------------------------------------------------- -// -EXPORT_C void CVoiceMailbox::NotifyVmbxNumberChangeL( - MVoiceMailboxObserver& aObserver, const TBool aNotifyOnActiveLineOnly ) - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::NotifyVmbxNumberChangeL =>" ); - iBody->NotifyVmbxNumberChangeL( aObserver, - aNotifyOnActiveLineOnly); - VMBLOGSTRING( "VMBX: CVoiceMailbox::NotifyVmbxNumberChangeL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::NotifyVmbxNumberChangeCancel -// -// --------------------------------------------------------------------------- -// -EXPORT_C void CVoiceMailbox::NotifyVmbxNumberChangeCancel() - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::NotifyVmbxNumberChangeCancel =>" ); - iBody->NotifyVmbxNumberChangeCancel(); - VMBLOGSTRING( "VMBX: CVoiceMailbox::NotifyVmbxNumberChangeCancel <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::CheckConfiguration -// -// --------------------------------------------------------------------------- -// -EXPORT_C TBool CVoiceMailbox::CheckConfiguration( - const TVoiceMailboxParams& aParams, const TInt aFlags ) - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::CheckConfiguration <=>" ); - return iBody->CheckConfiguration( aParams, aFlags ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailbox::GetServiceIds -// -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailbox::GetServiceIds( RIdArray& aProfileIds ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::GetServiceIds <=>" ); - return iBody->GetServiceIds( aProfileIds ); - } - -// Commented out because branding not yet supported. -// --------------------------------------------------------------------------- -// CVoiceMailbox::GetVmbxImage -// -// --------------------------------------------------------------------------- -/* EXPORT_C CGulIcon* CVoiceMailbox::GetVmbxImage( - const TVoiceMailboxParams& aParams ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::GetVmbxImageL <=>" ); - return iBody->GetVmbxImage( aParams ); - } - */ -// --------------------------------------------------------------------------- -// CVoiceMailbox::GetVmbxImages -// -// --------------------------------------------------------------------------- -// -/* EXPORT_C CArrayPtr* CVoiceMailbox::GetVmbxImages( - RArray& aParams ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::GetVmbxImages <=>" ); - return iBody->GetVmbxImages( aParams ); - } - */ -// --------------------------------------------------------------------------- -// CVoiceMailbox::SaveProvisionedEntry -// -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailbox::SaveProvisionedEntry( - const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailbox::SaveProvisionedEntry <=>" ); - return iBody->SaveProvisionedEntry( aEntry ); - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/cvoicemailboxentry.cpp --- a/vmbx/vmbxengine/src/cvoicemailboxentry.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,388 +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: Implementation of the CVoiceMailboxEntry class -* -*/ - -// INCLUDE FILES -#include -#include "vmbxlogger.h" - -// CONSTANTS - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::NewL -// -// --------------------------------------------------------------------------- -// -EXPORT_C CVoiceMailboxEntry* CVoiceMailboxEntry::NewL() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::NewL =>" ); - CVoiceMailboxEntry* self = CVoiceMailboxEntry::NewLC(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::NewLC -// -// --------------------------------------------------------------------------- -// -EXPORT_C CVoiceMailboxEntry* CVoiceMailboxEntry::NewLC() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::NewLC =>" ); - CVoiceMailboxEntry* self = new( ELeave ) CVoiceMailboxEntry; - CleanupStack::PushL( self ); - self->ConstructL(); - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::NewLC <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::~CVoiceMailboxEntry -// Destructor -// --------------------------------------------------------------------------- -// -CVoiceMailboxEntry::~CVoiceMailboxEntry() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::~CVoiceMailboxEntry =>" ); - delete ivmbxNumber; - delete iVmbxBrandId; - delete ivmbxName; - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::~CVoiceMailboxEntry <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::ServiceId -// Get ServiceId -// --------------------------------------------------------------------------- -// -EXPORT_C TServiceId CVoiceMailboxEntry::ServiceId() const - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::ServiceId =>" ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::ServiceId:\ - ServiceId=%d <=", iVmbxServiceId ); - return iVmbxServiceId; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetServiceId -// Set entry's service id -// --------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetServiceId( - const TServiceId& aVmbxServiceId ) - { - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetServiceId: ServiceId=%d =>", - aVmbxServiceId ); - iVmbxServiceId = aVmbxServiceId; - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SetServiceId <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::VoiceMailboxType -// Returns type of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TVmbxType CVoiceMailboxEntry::VoiceMailboxType( ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::VoiceMailboxType <=>" ); - return iVmbxType; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVoiceMailboxType -// Set Type of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C void CVoiceMailboxEntry::SetVoiceMailboxType( const TVmbxType& aType ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetVoiceMailboxType =>" ); - iVmbxType = aType; - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVoiceMailboxType:\ - iVmbxType=%d <=", iVmbxType ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::VmbxAlsLineType -// Get ALS line Type of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TVmbxAlsLineType CVoiceMailboxEntry::VmbxAlsLineType() const - { - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::VmbxAlsLineType:\ - iVmbxLineType=%d <=>", iVmbxLineType ); - return iVmbxLineType; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxAlsLineType -// Set ALS line Type of the entry instance -// --------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetVmbxAlsLineType( - const TVmbxAlsLineType& aLine ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetVmbxAlsLineType =>" ); - if ( EVmbxAlsLineDefault == aLine ) - { - iVmbxLineType = EVmbxAlsLine1; - } - else - { - iVmbxLineType = aLine; - } - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxAlsLineType:\ - iVmbxLineType=%d <=", iVmbxLineType ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetVmbxNumber -// Get number or address of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailboxEntry::GetVmbxNumber( TPtrC& aVmbxNumber ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxNumber =>" ); - TInt result( KErrNotFound ); - if ( ivmbxNumber ) - { - aVmbxNumber.Set( ivmbxNumber->Des() ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::GetVmbxNumber:\ - ivmbxNumber = %S", &aVmbxNumber ); - result = KErrNone; - } - else - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxNumber:KNullDesC" ); - aVmbxNumber.Set( KNullDesC ); - } - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxNumber <=" ); - return result; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxNumber -// Set number or address of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailboxEntry::SetVmbxNumber( const TDesC& aVmbxNumber ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetVmbxNumber =>" ); - TInt result( KErrNoMemory ); - if ( aVmbxNumber.Length() > KVmbxMaxNumberLength ) - { - result = KErrOverflow; - } - else - { - delete ivmbxNumber; - ivmbxNumber = aVmbxNumber.Alloc(); // Returns NULL if fails. - if ( ivmbxNumber ) - { - result = KErrNone; - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxNumber:\ - ivmbxNumber = %S", ivmbxNumber ); - } - } - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxNumber:\ - result = %I<=", result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetVmbxAlsLineType -// Get Brand Id of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailboxEntry::GetBrandId( TPtrC8& aBrandId ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetBrandId =>" ); - TInt result( KErrNotFound ); - if ( iVmbxBrandId ) - { - aBrandId.Set( iVmbxBrandId->Des() ); - result = KErrNone; - } - else - { - aBrandId.Set( KNullDesC8 ); - } - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetBrandId <=" ); - return result; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetBrandId -// Set Brand Id of the entry instance -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxEntry::SetBrandId( const TDesC8& aBrandId ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetBrandId =>" ); - TInt result( KErrNoMemory ); - if ( KVmbxMaxNumberLength < aBrandId.Length() ) - { - result = KErrArgument; - } - else - { - delete iVmbxBrandId; - iVmbxBrandId = aBrandId.Alloc(); - if ( iVmbxBrandId ) - { - result = KErrNone; - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetBrandId:\ - iVmbxBrandId = %S", iVmbxBrandId ); - } - } - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetBrandId:result = %d <=", - result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::GetVmbxName -// Get Name of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailboxEntry::GetVmbxName( TPtrC& aVmbxName ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxName =>" ); - TInt result( KErrNotFound ); - if ( ivmbxName ) - { - aVmbxName.Set( ivmbxName->Des() ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::GetVmbxName:\ - ivmbxName = %S", &aVmbxName ); - result = KErrNone; - } - else - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxName:KNullDesC" ); - aVmbxName.Set( KNullDesC ); - } - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxName <=" ); - return result; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetVmbxName -// Set Name of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TInt CVoiceMailboxEntry::SetVmbxName( const TDesC& aVmbxName ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetVmbxName =>" ); - TInt result( KErrNoMemory ); - if ( KVmbxMaxNumberLength < aVmbxName.Length() ) - { - result = KErrOverflow; - } - else - { - delete ivmbxName; - ivmbxName = aVmbxName.Alloc(); // Returns NULL if fails. - if ( ivmbxName ) - { - result = KErrNone; - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxName:\ - ivmbxName = %S", ivmbxName ); - } - } - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxName: result %d <=", - result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::UsingMemoryLocation -// Returns memory location of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C TVmbxMemoryLocation CVoiceMailboxEntry::UsingMemoryLocation( ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::UsingMemoryLocation <=>" ); - return iUsingMemory; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::Reset -// Reset the data members of the entry instance -// --------------------------------------------------------------------------- -// -EXPORT_C void CVoiceMailboxEntry::Reset() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset =>" ); - iVmbxServiceId = KVmbxServiceIdNone; - iVmbxType = EVmbxNone; - iVmbxLineType = EVmbxAlsLineDefault; - if ( ivmbxNumber ) - { - ivmbxNumber->Des().Zero(); - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset vmbx number" ); - } - if ( ivmbxName ) - { - ivmbxName->Des().Zero(); - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset vmbx name" ); - } - if ( iVmbxBrandId ) - { - iVmbxBrandId->Des().Zero(); - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset vmbx brandId" ); - } - iUsingMemory = EVmbxSimMemory; - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::SetUsingMemoryLocation -// Set using memory of the entry instance -// --------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::SetUsingMemoryLocation( - const TVmbxMemoryLocation& aType ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetUsingMemoryLocation =>" ); - iUsingMemory = aType; - VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetUsingMemoryLocation:\ - iUsingMemory=%I <=", iUsingMemory ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::CVoiceMailboxEntry -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVoiceMailboxEntry::CVoiceMailboxEntry() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::CVoiceMailboxEntry <=>" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxEntry::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVoiceMailboxEntry::ConstructL() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::ConstructL <=>" ); - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/dialogwaiter.cpp --- a/vmbx/vmbxengine/src/dialogwaiter.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* -* 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: dialog waiter -* -* -*/ - -#include "dialogwaiter.h" -#include "vmbxlogger.h" - -// ======== MEMBER FUNCTIONS ================================================== - -// ---------------------------------------------------------------------------- -// DialogWaiter::wait -// -// ---------------------------------------------------------------------------- -// -HbAction* DialogWaiter::wait() -{ - VMBLOGSTRING("DialogWaiter::wait=>") - mLoop.exec(); - HbAction* a=mResult; - mResult=0; - VMBLOGSTRING2("VMBX: DialogWaiter::wait action a %d <=",a) - return a; -} - -// ---------------------------------------------------------------------------- -// DialogWaiter::done -// -// ---------------------------------------------------------------------------- -// -void DialogWaiter::done(HbAction* result) -{ - VMBLOGSTRING("DialogWaiter::done=>") - mResult=result; - mLoop.quit(); - VMBLOGSTRING("DialogWaiter::done<=") -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbshandler.cpp --- a/vmbx/vmbxengine/src/vmbshandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +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: Implementation of CVmBSHandler class. - * -*/ - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include -#include - -#include "vmsettingsuiiconfileprovider.h" -#include "vmbshandler.h" -#include "vmbxlogger.h" - - -// CONSTANTS used in VoIP branding, remove/update when branding is handled -// Branding server & data constants. -//const TInt KVmSettingsUiBrandingIconSize = 21; // icon size - -//_LIT8( KVmSettingsUiBSApplicationId, "xsp" ); // application id -//_LIT8( KVmSettingsUiBSIconId, "service_active_image_small" ); // icon id - - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmBSHandler::CVmBSHandler -// C++ default constructor can NOT contain any code, that might leave. -// --------------------------------------------------------------------------- -// -CVmBSHandler::CVmBSHandler() - { - VMBLOGSTRING( "VMBX: CVmBSHandler::CVmBSHandler <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmBSHandler::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmBSHandler::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmBSHandler::ConstructL <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmBSHandler::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmBSHandler* CVmBSHandler::NewL( ) - { - VMBLOGSTRING( "VMBX: CVmBSHandler::NewL =>" ); - CVmBSHandler* self = CVmBSHandler::NewLC(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmBSHandler::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmBSHandler::NewLC -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmBSHandler* CVmBSHandler::NewLC() - { - VMBLOGSTRING( "VMBX: CVmBSHandler::NewLC =>" ); - CVmBSHandler* self = new (ELeave) CVmBSHandler(); - CleanupStack::PushL( self ); - self->ConstructL(); - VMBLOGSTRING( "VMBX: CVmBSHandler::NewLC =>" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmBSHandler::NewLC -// Destructor -// --------------------------------------------------------------------------- -// -CVmBSHandler::~CVmBSHandler() - { - VMBLOGSTRING( "VMBX: CVmBSHandler::~CVmBSHandler <=>" ); - } - -// Commented out because branding is not supported yet. -// --------------------------------------------------------------------------- -// CVmBSHandler::GetBrandedIconL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -// void CVmBSHandler::GetBrandedIconL( -// const TDesC8& aBrandingId, -// CFbsBitmap*& aBrandedBitmap, -// CFbsBitmap*& aBrandedBitmapMask ) const -// { -// VMBLOGSTRING( "VMBX: CVmBSHandler::GetBrandedIconL =>" ); -// // Create branding server factory and access to branding data. -// CBSFactory* factory = CBSFactory::NewL( -// aBrandingId, KVmSettingsUiBSApplicationId ); -// CleanupStack::PushL( factory ); -// -// MBSAccess* access = factory->CreateAccessL( -// aBrandingId, ELangInternationalEnglish ); -// CleanupClosePushL( *access ); -// -// // Get structure which contains bitmap information. -// MBSElement* element = access->GetStructureL( KVmSettingsUiBSIconId ); -// CleanupClosePushL( *element ); -// const CBSBitmap& bitmap = element->BitmapDataL(); -// -// // Open file which contains branded bitmaps. -// RFile file; -// CleanupClosePushL( file ); -// access->GetFileL( bitmap.BitmapFileId(), file ); -// -// // Try to load a skinned bitmap. -// if ( CCoeEnv::Static() ) -// { -// TAknsItemID itemId; -// itemId.Set( bitmap.SkinIdMajor(), bitmap.SkinIdMinor() ); -// MAknsSkinInstance* skin = AknsUtils::SkinInstance(); -// TRAP_IGNORE( ( aBrandedBitmap = -// AknsUtils::CreateBitmapL( skin, itemId ) ) ); -// } -// -// // If skinned bitmaps was not found, try to load bitmaps manually. -// if ( !aBrandedBitmap ) -// { -// CVmSettingsUiIconFileProvider* ifp = -// CVmSettingsUiIconFileProvider::NewL( file ); -// -// AknIconUtils::CreateIconL( -// aBrandedBitmap, -// aBrandedBitmapMask, -// *ifp, -// bitmap.BitmapId(), -// bitmap.BitmapMaskId() ); -// } -// -// // Set sizes. -// const TInt iconSize( KVmSettingsUiBrandingIconSize ); -// AknIconUtils::SetSize( aBrandedBitmap, TSize( iconSize, iconSize ) ); -// AknIconUtils::SetSize( aBrandedBitmapMask, TSize( iconSize, iconSize ) ); -// -// // Destroy some items. -// CleanupStack::PopAndDestroy( &file ); -// CleanupStack::PopAndDestroy( element ); -// CleanupStack::PopAndDestroy( access ); -// CleanupStack::PopAndDestroy( factory ); -// VMBLOGSTRING( "VMBX: CVmBSHandler::GetBrandedIconL <=" ); -// } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxcenrephandler.cpp --- a/vmbx/vmbxengine/src/vmbxcenrephandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,327 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the CVmbxCenRepHandler class -* -*/ - - -// INCLUDE FILES -#include -#include - -#include "voicemailboxdomaincrkeys.h" -#include "voicemailboxprivatecrkeys.h" -#include "vmbxlogger.h" -#include "vmbxcenrephandler.h" - -// CONSTANTS -const TUint32 KUnknownCenRepKey( 0xffffffff ); - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::CVmbxCenRepHandler -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxCenRepHandler::CVmbxCenRepHandler() - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::CVmbxCenRepHandler <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmbxCenRepHandler::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::ConstructL =>" ); - iCRSession = CRepository::NewL( KCRUidVoiceMailbox ); - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxCenRepHandler* CVmbxCenRepHandler::NewL() - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::NewL =>" ); - CVmbxCenRepHandler* self = new( ELeave ) CVmbxCenRepHandler(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::~CVmbxCenRepHandler -// Destructor -// --------------------------------------------------------------------------- -// -CVmbxCenRepHandler::~CVmbxCenRepHandler() - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::~CVmbxCenRepHandler =>" ); - delete iCRSession; - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::~CVmbxCenRepHandler <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::GetVmbxNumber -// Get saved entry number -// --------------------------------------------------------------------------- -// -TInt CVmbxCenRepHandler::GetVmbxNumber( CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::GetVmbxNumber =>" ); - TInt result( KErrNotFound ); - // get right cenrep key - TUint32 cenRepKey = ResolveKeyByEntry( aEntry ); - if ( KUnknownCenRepKey != cenRepKey ) - { - HBufC* cenRepEntry = HBufC::New( KVmbxMaxNumberLength ); - TPtr ptr( cenRepEntry->Des() ); - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::GetVmbxNumber: CenRep Get" ); - result = iCRSession->Get( cenRepKey, ptr ); - // get cenrep value - if ( KErrNone == result ) - { - if ( ptr.Length() ) - { - result = aEntry.SetVmbxNumber( ptr ); - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::GetVmbxNumber:\ - Set Entry" ); - } - else - { - result = KErrNotFound; - } - } - delete cenRepEntry; - cenRepEntry = NULL; - } - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::GetVmbxNumber: result%d <=", - result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::Save -// Saves the mailbox number -// --------------------------------------------------------------------------- -// -TInt CVmbxCenRepHandler::Save( const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::Save =>" ); - TInt result( KErrNone ); - // get right cenrep key - TUint32 cenRepKey = ResolveKeyByEntry( aEntry ); - - if ( KUnknownCenRepKey != cenRepKey ) - { - // set cenrep value - TPtrC vmbxNumber( KNullDesC ); - aEntry.GetVmbxNumber( vmbxNumber ); - result = iCRSession->Set( cenRepKey, vmbxNumber ); - } - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::Save result=%d <=", result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::ResolveKeyByEntry -// Resolve CenRep key by entry -// --------------------------------------------------------------------------- -// -TUint32 CVmbxCenRepHandler::ResolveKeyByEntry( - const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::ResolveKeyByEntry =>" ); - TVmbxAlsLineType alsLine = aEntry.VmbxAlsLineType(); - TVmbxType entryType = aEntry.VoiceMailboxType(); - - TUint32 cenRepKey( KUnknownCenRepKey ); - switch ( entryType ) - { - // Voice mailbox - case EVmbxVoice: - { - cenRepKey = VoiceCenRepKey( alsLine ); - break; - } - // Video mailbox - case EVmbxVideo: - { - cenRepKey = VideoCenRepKey( alsLine ); - break; - } - default: - break; - } - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::ResolveKeyByEntry <=" ); - return cenRepKey; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::VoiceCenRepKey -// Voice mailbox cenntral repository key value -// --------------------------------------------------------------------------- -// -TUint32 CVmbxCenRepHandler::VoiceCenRepKey( - const TVmbxAlsLineType& aLine ) - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VoiceCenRepKey =>" ); - TUint32 cenRepKey( KUnknownCenRepKey ); - if ( EVmbxAlsLine2 == aLine ) - { - cenRepKey = KVmbxNumberLineAlternate; - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VoiceCenRepKey:Line2" ); - } - else - { - cenRepKey = KVmbxNumberLinePrimary; - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VoiceCenRepKey:Line1" ); - } - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VoiceCenRepKey <=" ); - return cenRepKey; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::VideoCenRepKey -// Video mailbox cenntral repository key value -// --------------------------------------------------------------------------- -// -TUint32 CVmbxCenRepHandler::VideoCenRepKey( - const TVmbxAlsLineType& aLine ) - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoCenRepKey =>" ); - TUint32 cenRepKey( KUnknownCenRepKey ); - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::VideoCenRepKey: aLine = %d", - aLine ); - if ( EVmbxAlsLine2 == aLine ) - { - cenRepKey = KVmbxVideoNmbrLineAlternate; - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoCenRepKey:Line2" ); - } - else - { - cenRepKey = KVmbxVideoNmbrLinePrimary; - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoCenRepKey:Line1" ); - } - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoCenRepKey <=" ); - return cenRepKey; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::StoreType -// Fetches active store type -// --------------------------------------------------------------------------- -// -TVmbxMemoryLocation CVmbxCenRepHandler::StoreType() - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::StoreType =>" ); - TVmbxMemoryLocation memoryLocation( EVmbxPhoneMemory ); - TInt location; - TInt result = iCRSession->Get( KVmbxUsesSimMemory, location ); - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::StoreType: result = %d", - result ); - - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::StoreType: location = %d<=", - location ); - - if ( KErrNone == result && EVmbxSimMemory == location ) - { - memoryLocation = EVmbxSimMemory; - } -#ifdef __WINS__ - memoryLocation = EVmbxPhoneMemory; -#endif - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::StoreType: memory = %d<=", - memoryLocation ); - return memoryLocation; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::VideoSupported -// Returns ETrue if supported -// --------------------------------------------------------------------------- -// -TBool CVmbxCenRepHandler::VideoSupported() - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoSupported =>" ); - TBool supported( EFalse); - - TInt res = iCRSession->Get( KVmbxVideoMbxSupport, supported ); - - if ( KErrNone != res ) - { - supported = EFalse; - } - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::VideoSupported: result %d", - supported ); - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoSupported <=" ); - return supported; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::IsSimReadOnly -// ETrue if CenRep setting Sim read only -// --------------------------------------------------------------------------- -// -TBool CVmbxCenRepHandler::IsSimReadOnly() - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::IsSimReadOnly =>" ); - TBool result( EFalse ); - TInt res = iCRSession->Get( KVmbxNoSimWriting, result ); - - if ( KErrNone != res ) - { - result = EFalse; - } - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::IsSimReadOnly: result %I <=", - result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepHandler::IsAllowedUserEdit -// ETrue if number Allowed to edit -// --------------------------------------------------------------------------- -// -TBool CVmbxCenRepHandler::IsAllowedUserEdit() - { - VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::IsAllowedUserEdit =>" ); - TBool result( EFalse ); - TInt temp( 0 ); - TInt res = iCRSession->Get( KVmbxUiCaps, temp ); - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::IsAllowedUserEdit: res %d", - res ); - - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::IsAllowedUserEdit: temp %d", - temp ); - - if ( ( KErrNone == res ) && !( KVmbxUiUserEditNotAllowed & temp ) ) - { - result = ETrue; - } - VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::IsAllowedUserEdit: result %d <=", - result ); - return result; - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxcenrepobserver.cpp --- a/vmbx/vmbxengine/src/vmbxcenrepobserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +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: Implementation of CVmbxCenRepObserver class. - * -*/ - -// INCLUDE FILES -#include - -#include "vmbxlogger.h" -#include "voicemailboxdomaincrkeys.h" -#include "voicemailboxprivatecrkeys.h" -#include "voicemailboxdefsinternal.h" -#include "vmbxcenrepobserver.h" - -// CONSTANTS - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxCenRepObserver::CVmbxCenRepObserver -// C++ default constructor can NOT contain any code, that might leave. -// --------------------------------------------------------------------------- -// -CVmbxCenRepObserver::CVmbxCenRepObserver( MVmbxCenRepObserver& aObserver ): - iObserver( aObserver ) - { - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::CVmbxCenRepObserver =>" ); - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::CVmbxCenRepObserver <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepObserver::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmbxCenRepObserver::ConstructL() - { - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::ConstructL =>" ); - iCRSession = CRepository::NewL( KCRUidVoiceMailbox ); - iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iCRSession ); - iNotifyHandler->StartListeningL(); - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepObserver::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxCenRepObserver* CVmbxCenRepObserver::NewL( MVmbxCenRepObserver& aObserver ) - { - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::NewL =>" ); - CVmbxCenRepObserver* self = CVmbxCenRepObserver::NewLC( aObserver ); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepObserver::NewLC -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxCenRepObserver* CVmbxCenRepObserver::NewLC( MVmbxCenRepObserver& aObserver ) - { - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::NewLC =>" ); - CVmbxCenRepObserver* self = new (ELeave) CVmbxCenRepObserver( aObserver ); - CleanupStack::PushL( self ); - self->ConstructL(); - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::NewLC <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepObserver::~CVmbxCenRepObserver -// Destructor -// --------------------------------------------------------------------------- -// -CVmbxCenRepObserver::~CVmbxCenRepObserver() - { - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::~CVmbxCenRepObserver =>" ); - if ( iNotifyHandler ) - { - iNotifyHandler->StopListening(); - delete iNotifyHandler; - iNotifyHandler = NULL; - } - delete iCRSession; - VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::~CVmbxCenRepObserver <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCenRepObserver::HandleNotifyGeneric -// To notify the client about changes for string value keys -// --------------------------------------------------------------------------- -// -void CVmbxCenRepObserver::HandleNotifyGeneric( TUint32 aId ) - { - VMBLOGSTRING( "VMBX: CVmbxCenRepObserver::HandleNotifyGeneric =>" ); - if ( KVmbxNumberLinePrimary == aId - || KVmbxVideoNmbrLinePrimary == aId - || KVmbxNumberLineAlternate == aId - || KVmbxVideoNmbrLineAlternate == aId - ) - { - VMBLOGSTRING2( "VMBX: CVmbxCenRepObserver::HandleNotifyGeneric: aId %X", - aId ); - - TVmbxCenRepKey cenRepKey( EVmbxCenRepMax ); - if ( KVmbxNumberLinePrimary == aId ) - { - cenRepKey = EVmbxVoiceLinePrimaryKey; - } - else if ( KVmbxVideoNmbrLinePrimary == aId ) - { - cenRepKey = EVmbxVideoLinePrimaryKey; - } - else if ( KVmbxNumberLineAlternate == aId ) - { - cenRepKey = EVmbxVoiceLineAlternateKey; - } - else if ( KVmbxVideoNmbrLineAlternate == aId ) - { - cenRepKey = EVmbxVideoLineAlternateKey; - } - - // Notify the primary/alternate support keys are changed - iObserver.HandleCenRepChange( cenRepKey ); - } - VMBLOGSTRING( "VMBX: CVmbxCenRepObserver::HandleNotifyGeneric<="); - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxcsvideoengine.cpp --- a/vmbx/vmbxengine/src/vmbxcsvideoengine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the CVmbxCsVideoEngine class -* -*/ - - -// INCLUDE FILES -#include - -#include "vmbxuiutilities.h" -#include "vmbxutilities.h" -#include "vmbxenginebase.h" -#include "vmbxlogger.h" -#include "vmbxcenrephandler.h" -#include "vmbxcsvideoengine.h" - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxCsVideoEngine::CVmbxCsVideoEngine -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxCsVideoEngine::CVmbxCsVideoEngine( MVmbxResourceProvider& aProvider ) - : CVmbxEngineBase( aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::CVmbxCsVideoEngine <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCsVideoEngine::~CVmbxCsVideoEngine -// Destructor. -// --------------------------------------------------------------------------- -// -CVmbxCsVideoEngine::~CVmbxCsVideoEngine() - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::~CVmbxCsVideoEngine <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCsVideoEngine::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxCsVideoEngine* CVmbxCsVideoEngine::NewL( MVmbxResourceProvider& aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::NewL =>" ); - if ( !VmbxUtilities::VideoSupported() ) - { - User::Leave( KErrNotSupported ); - } - - CVmbxCsVideoEngine* self = new( ELeave ) CVmbxCsVideoEngine( aProvider ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxCsVideoEngine::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmbxCsVideoEngine::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::ConstructL =>" ); - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCsVideoEngine::GetL -// Gets voice mailbox number -// --------------------------------------------------------------------------- -// -void CVmbxCsVideoEngine::GetL( CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::GetL =>" ); - CVoiceMailboxEntry* vmbxEntry = CVoiceMailboxEntry::NewLC(); - // get number from store - vmbxEntry->SetVoiceMailboxType( EVmbxVideo ); - vmbxEntry->SetUsingMemoryLocation( EVmbxPhoneMemory ); - vmbxEntry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() ); - vmbxEntry->SetServiceId( KVmbxServiceVideo ); - TInt result = iProvider.VmbxCenRepHandler().GetVmbxNumber( *vmbxEntry ); - - VMBLOGSTRING2( "VMBX: CVmbxCsVideoEngine::GetL: result=%I ", result ); - User::LeaveIfError( result ); - CleanupStack::Pop( vmbxEntry ); - aEntry = vmbxEntry; - vmbxEntry = NULL; - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::GetL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCsVideoEngine::SaveL -// Saves voice mailbox number -// --------------------------------------------------------------------------- -// -void CVmbxCsVideoEngine::SaveL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveL =>" ); - - TPtrC vmbxNumber( KNullDesC ); - aEntry.GetVmbxNumber( vmbxNumber ); - - if ( vmbxNumber.Length() - && ( !VmbxUtilities::IsValidPhoneNumber( vmbxNumber ) - || VmbxUtilities::IsEmergencyNumber( vmbxNumber ) ) ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveL: number invalid <=" ); - User::Leave( KErrArgument ); - } - - // Save to cenrep - TInt result = iProvider.VmbxCenRepHandler().Save( aEntry ); - VMBLOGSTRING2( "VMBX: CVmbxCsVideoEngine::SaveL: result%I ", result ); - User::LeaveIfError( result ); - - // show note - if ( KErrNone == result && aShowNotesAllowed ) - { - iProvider.VmbxUiUtilities().ShowInformationdNoteL( EVideoNumberSaved ); - } - - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCsVideoEngine::SaveL -// Saves Provisioned video mailbox number -// --------------------------------------------------------------------------- -// -void CVmbxCsVideoEngine::SaveProvisionedEntryL( - const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveProvisionedEntryL =>" ); - SaveL( aEntry, EFalse ); - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveProvisionedEntryL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVideoEngine::CheckConfiguration() -// ---------------------------------------------------------------------------- -// -TBool CVmbxCsVideoEngine::CheckConfiguration( - const TVoiceMailboxParams& aParams, const TInt aFlags ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::CheckConfiguration =>" ); - TBool conf( EFalse ); - if ( EVmbxChangeNbrAllowedOnUi & aFlags ) - { - conf = iProvider.VmbxCenRepHandler().IsAllowedUserEdit(); - } - else if ( EVmbxVideoMailboxSupported & aFlags ) - { - conf = ETrue; - } - else - { - conf = CVmbxEngineBase::CheckConfiguration(aParams, aFlags); - } - VMBLOGSTRING2( "VMBX: CVmbxCsVideoEngine::CheckConfiguration: conf%I <=", - conf ); - return conf; - } -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxcsvoiceengine.cpp --- a/vmbx/vmbxengine/src/vmbxcsvoiceengine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,374 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the CVmbxCsVoiceEngine class -* -*/ - - -// INCLUDE FILES -#include - -#include "vmbxenginebase.h" -#include "vmbxutilities.h" - -#include "vmbxlogger.h" -#include "vmbxcenrephandler.h" -#include "vmbxsimhandler.h" -#include "vmbxuiutilities.h" - -#include "vmbxcsvoiceengine.h" - -// CONSTANTS -_LIT (KVmbxIllegalSimCharacter, "w"); - -// ============================ MEMBER FUNCTIONS ============================== - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::CVmbxCsVoiceEngine -// C++ default constructor can NOT contain any code, that -// might leave. -// ---------------------------------------------------------------------------- -// -CVmbxCsVoiceEngine::CVmbxCsVoiceEngine( MVmbxResourceProvider& aProvider ) - : CVmbxEngineBase( aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CVmbxCsVoiceEngine =>" ); - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CVmbxCsVoiceEngine <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::~CVmbxCsVoiceEngine -// Destructor. -// ---------------------------------------------------------------------------- -// -CVmbxCsVoiceEngine::~CVmbxCsVoiceEngine() - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::~CVmbxCsVoiceEngine =>" ); - delete iSimHandler; - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::~CVmbxCsVoiceEngine <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::NewL -// Two-phased constructor. -// ---------------------------------------------------------------------------- -// -CVmbxCsVoiceEngine* CVmbxCsVoiceEngine::NewL( MVmbxResourceProvider& aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::NewL =>" ); - CVmbxCsVoiceEngine* self = - new( ELeave ) CVmbxCsVoiceEngine( aProvider ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::NewL <=" ); - return self; - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::ConstructL -// Symbian 2nd phase constructor can leave. -// ---------------------------------------------------------------------------- -// -void CVmbxCsVoiceEngine::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::ConstructL =>" ); - TVmbxMemoryLocation storeType( EVmbxPhoneMemory ); - storeType = iProvider.VmbxCenRepHandler().StoreType(); - if ( EVmbxSimMemory == storeType ) - { - // create SimHandler - TRAPD( err, iSimHandler = CVmbxSimHandler::NewL() ); - // for avoid warning for compiling - err = err; - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::ConstructL:\ - Create SimHandler %I" , err); - } - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::ConstructL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::GetL -// Gets voice mailbox number -// ---------------------------------------------------------------------------- -// -void CVmbxCsVoiceEngine::GetL( CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL =>" ); - TInt result( KErrNotFound ); - - CVoiceMailboxEntry* vmbxEntry = CVoiceMailboxEntry::NewLC(); - // get als line info - vmbxEntry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() ); - - vmbxEntry->SetVoiceMailboxType( EVmbxVoice ); - vmbxEntry->SetServiceId( KVmbxServiceVoice ); - // get store type from CenRep - TVmbxMemoryLocation storeType = iProvider.VmbxCenRepHandler().StoreType(); - - if ( EVmbxSimMemory == storeType && iSimHandler ) - { - // read from sim if it is available and active - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL:\ - SIM available and active"); - TRAP( result, iSimHandler->GetL( *vmbxEntry ) ); - - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::GetL :Sim res=%d", result ); - TPtrC vmbxNumber( KNullDesC ); - vmbxEntry->GetVmbxNumber( vmbxNumber ); - - // if no number from sim(both MBDN file and VMBX file) - if ( KErrNone != result || !vmbxNumber.Length() ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL:\ - no number from sim, both MBDN file and VMBX file"); - // Get CS number from phone memory - result = iProvider.VmbxCenRepHandler().GetVmbxNumber( *vmbxEntry ); - vmbxEntry->SetUsingMemoryLocation( EVmbxPhoneMemory ); - } - else - { - vmbxEntry->SetUsingMemoryLocation( EVmbxSimMemory ); - } - } - // EVmbxPhoneMemory or sim not available - else - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL:\ - EVmbxPhoneMemory or sim not available " ); - // Get CS number from phone memory - result = iProvider.VmbxCenRepHandler().GetVmbxNumber( *vmbxEntry ); - vmbxEntry->SetUsingMemoryLocation( EVmbxPhoneMemory ); - } - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::GetL: res=%d", result ); - - User::LeaveIfError( result ); - CleanupStack::Pop( vmbxEntry ); - aEntry = vmbxEntry; - vmbxEntry = NULL; - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::SaveL -// Saves voice mailbox number -// ---------------------------------------------------------------------------- -// -void CVmbxCsVoiceEngine::SaveL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL =>" ); - - TPtrC vmbxNumber( KNullDesC ); - aEntry.GetVmbxNumber( vmbxNumber ); - - if ( vmbxNumber.Length() - && ( !VmbxUtilities::IsValidPhoneNumber( vmbxNumber ) - || VmbxUtilities::IsEmergencyNumber( vmbxNumber ) ) ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL: number invalid <=" ); - User::Leave( KErrArgument ); - } - - TVoiceMailboxParams params; - if ( IsWritable( params ) ) - { - TVmbxMemoryLocation storeType = - iProvider.VmbxCenRepHandler().StoreType(); - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::SaveL: storeType=%I", - storeType ); - if ( EVmbxSimMemory == storeType && iSimHandler ) - { - // Save to sim - SaveEntryToSimL( aEntry, aShowNotesAllowed ); - } - else - { - // Save to cenrep - SaveEntryToPhoneL( aEntry, aShowNotesAllowed ); - } - } - else - { - // sim files not exist, its may need by forcing save, eg, OMA. - if ( !iSimHandler ) - { - SaveEntryToPhoneL( aEntry, aShowNotesAllowed ); - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL: \ - sim files not exist then save to phone" ); - } - else - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL: \ - sim files unwritable<=" ); - User::Leave( KErrNotSupported ); - } - } - - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::SaveProvisionedEntryL -// Saves Provisioned voice mailbox number -// ---------------------------------------------------------------------------- -// -void CVmbxCsVoiceEngine::SaveProvisionedEntryL( - const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveProvisionedEntryL =>" ); - SaveL( aEntry, EFalse ); - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveProvisionedEntryL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::CheckConfiguration -// -// --------------------------------------------------------------------------- -// -TBool CVmbxCsVoiceEngine::CheckConfiguration( const TVoiceMailboxParams& aParams, - const TInt aFlags ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration =>" ); - TBool configuration( EFalse ); - // check thr property whether allow user to edit number - if ( EVmbxChangeNbrAllowedOnUi & aFlags ) - { - configuration = iProvider.VmbxCenRepHandler().IsAllowedUserEdit(); - if ( configuration ) - { - configuration = IsWritable( aParams ); - } - } - else - { - configuration = CVmbxEngineBase::CheckConfiguration(aParams, aFlags); - } - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration: conf%I <=", - configuration ); - return configuration; - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::SaveEntryToPhone -// Saves number to storage that user selects from the offered list -// ---------------------------------------------------------------------------- -// -void CVmbxCsVoiceEngine::SaveEntryToPhoneL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveEntryToPhoneL: =>" ); - TInt result( KErrArgument ); - - result = iProvider.VmbxCenRepHandler().Save( aEntry ); - - if ( KErrNone == result && aShowNotesAllowed ) - { - iProvider.VmbxUiUtilities().ShowInformationdNoteL( ESavedToPhoneMemory ); - } - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::SaveEntryToPhoneL: result=%I <=", - result ); - User::LeaveIfError( result ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::SaveEntryToSim -// For saving to place that user selects -// ---------------------------------------------------------------------------- -// -void CVmbxCsVoiceEngine::SaveEntryToSimL( const CVoiceMailboxEntry& aEntry, - TBool aShowNotesAllowed ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveEntryToSimL: =>" ); - TInt result( KErrGeneral ); - - // number containing "w"-character is not allowed to save to sim - TPtrC ptrNumber( KNullDesC ); - TInt numError = aEntry.GetVmbxNumber( ptrNumber ); - if ( KErrNotFound != ptrNumber.Find( KVmbxIllegalSimCharacter ) ) - { - result = KErrArgument; - } - - if ( iSimHandler ) - { - result = iSimHandler->Save( aEntry ); - if ( KErrNone == result && aShowNotesAllowed ) - { - iProvider.VmbxUiUtilities().ShowInformationdNoteL( ESavedToSimMemory ); - } - } - - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::\ - SaveEntryToSimL: result=%I <=", result ); - - User::LeaveIfError( result ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::IsSimWritable -// ETrue if Sim is allowed to be writable -// ---------------------------------------------------------------------------- -TBool CVmbxCsVoiceEngine::IsSimWritable() - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsSimWritable: =>" ); - TBool result( EFalse ); - if ( !( iProvider.VmbxCenRepHandler().IsSimReadOnly() ) - && iSimHandler && iSimHandler->IsWritable() ) - { - result = ETrue; - } - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::IsSimWritable:\ - result=%I <=", result ); - return result; - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVoiceEngine::IsWritable -// ETrue if Sim is allowed to be writable -// ---------------------------------------------------------------------------- -TBool CVmbxCsVoiceEngine::IsWritable( const TVoiceMailboxParams& /*aParams*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsWritable =>" ); - TBool result( EFalse ); - TVmbxMemoryLocation storeType = - iProvider.VmbxCenRepHandler().StoreType(); - - if ( EVmbxPhoneMemory == storeType ) - { - result = ETrue; - } - else - { - if ( iSimHandler ) - { - #ifdef __WINS__ - result = ETrue; - #else - result = IsSimWritable(); - #endif - } - else - { - VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsWritable: \ - sim files not exist then use phone memory" ); - result = ETrue; - } - } - VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::IsWritable:\ - result=%I <=", result ); - return result; - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxemergencycall.cpp --- a/vmbx/vmbxengine/src/vmbxemergencycall.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +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: Implementation of the CVmbxEmergencyCall class -* -*/ - -// INCLUDE FILES -#include -#include -#include "vmbxlogger.h" -#include "vmbxemergencycall.h" - -// CONSTANTS - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxEngineBase::CVmbxEngineBase -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxEmergencyCall::CVmbxEmergencyCall() - { - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::CVmbxEmergencyCall =>" ); - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::CVmbxEmergencyCall <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxEmergencyCall::~CVmbxEngineBase -// Destructor -// --------------------------------------------------------------------------- -// -CVmbxEmergencyCall::~CVmbxEmergencyCall() - { - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::~CVmbxEmergencyCall =>" ); - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::~CVmbxEmergencyCall <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxEmergencyCall::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxEmergencyCall* CVmbxEmergencyCall::NewL() - { - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::NewL =>" ); - CVmbxEmergencyCall* vmbx = new( ELeave )CVmbxEmergencyCall(); - CleanupStack::PushL( vmbx ); - vmbx->ConstructL(); - CleanupStack::Pop( vmbx ); - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::NewL <=" ); - return vmbx; - } - -// --------------------------------------------------------------------------- -// CVmbxEmergencyCall::ConstructL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -void CVmbxEmergencyCall::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::ConstructL =>" ); - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::ConstructL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxEmergencyCall::HandleDialL -// -// ---------------------------------------------------------------------------- -// -void CVmbxEmergencyCall::HandleDialL( const TInt /*aStatus*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::HandleDialL =>" ); - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::HandleDialL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxEmergencyCall::HandleEmergencyDialL() -// ---------------------------------------------------------------------------- -// -void CVmbxEmergencyCall::HandleEmergencyDialL( const TInt /*aStatus*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::HandleEmergencyDialL =>" ); - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::HandleEmergencyDialL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxEmergencyCall::IsEmergencyNumber -// Verifies if the given number is an emergency number -// --------------------------------------------------------------------------- -// -TBool CVmbxEmergencyCall::IsEmergencyNumber( const TDesC& aNumber ) - { - VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::IsEmergencyNumber: =>" ); - TBool isEmergency( EFalse ); - // Emergency Call API does not strip invalid characters like Call UI does, - // so it is done manually here. - - TPhCltTelephoneNumber number( aNumber.Left( KPhCltTelephoneNumberLength ) ); - PhCltUtils::RemoveInvalidChars( number ); - // Return value is KErrArgument, when number is more than 6 digits and - // then number cannot be emergency number. - // So no need to check the return value here. - CPhCltEmergencyCall* emCall( NULL ); - TRAPD( err, emCall = CPhCltEmergencyCall::NewL( this ) ); - if ( KErrNone == err ) - { - TInt result = emCall->IsEmergencyPhoneNumber( aNumber, isEmergency ); - if ( result != KErrNone ) - { - isEmergency = EFalse; - } - } - delete emCall; - - VMBLOGSTRING2( "VMBX: CVmbxEmergencyCall::IsEmergencyNumber%I <=", - isEmergency); - - return isEmergency; - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxenginebase.cpp --- a/vmbx/vmbxengine/src/vmbxenginebase.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the CVmbxEngineBase class -* -*/ - - -// INCLUDE FILES -#include - -#include "vmbxlogger.h" -#include "vmbxuiutilities.h" -#include "vmbxenginebase.h" - -// CONSTANTS - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxEngineBase::CVmbxEngineBase -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxEngineBase::CVmbxEngineBase( MVmbxResourceProvider& aProvider ) - : iProvider( aProvider ), - iVmbxServiceId( KVmbxServiceIdNone ) - { - VMBLOGSTRING( "VMBX: CVmbxEngineBase::CVmbxEngineBase =>" ); - VMBLOGSTRING( "VMBX: CVmbxEngineBase::CVmbxEngineBase <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxEngineBase::~CVmbxEngineBase -// Destructor -// --------------------------------------------------------------------------- -// -CVmbxEngineBase::~CVmbxEngineBase() - { - VMBLOGSTRING( "VMBX: CVmbxEngineBase::~CVmbxEngineBase =>" ); - VMBLOGSTRING( "VMBX: CVmbxEngineBase::~CVmbxEngineBase <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxEngineBase::GetServiceIds() -// ---------------------------------------------------------------------------- -// -void CVmbxEngineBase::GetServiceIdsL( RIdArray& /*aProfileIds*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxEngineBase::GetServiceIdsL <=>" ); - User::Leave( KErrNotFound ); - } - -// Commented out because branding is not supported yet. -// ---------------------------------------------------------------------------- -// CVmbxEngineBase::GetVmbxImageL() -// ---------------------------------------------------------------------------- -// -/* CGulIcon* CVmbxEngineBase::GetVmbxImageL( const TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVmbxEngineBase::GetVmbxImageL =>" ); - VMBLOGSTRING( "VMBX: CVmbxEngineBase::GetVmbxImageL <=" ); - return iProvider.VmbxUiUtilities().GetVmbxImageL( aParams ); - } */ - -// ---------------------------------------------------------------------------- -// CVmbxEngineBase::SetCurrentServiceId() -// ---------------------------------------------------------------------------- -// -void CVmbxEngineBase::SetCurrentServiceId( const TServiceId& aVmbxServiceId ) - { - VMBLOGSTRING( "VMBX: CVmbxEngineBase::SetCurrentServiceId =>" ); - iVmbxServiceId = aVmbxServiceId; - VMBLOGSTRING( "VMBX: CVmbxEngineBase::SetCurrentServiceId <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmbxCsVideoEngine::CheckConfiguration() -// ---------------------------------------------------------------------------- -// -TBool CVmbxEngineBase::CheckConfiguration( - const TVoiceMailboxParams& /*aParams*/, const TInt aFlags ) - { - VMBLOGSTRING( "VMBX: CVmbxEngineBase::CheckConfiguration =>" ); - TBool conf( EFalse ); - if ( EVmbxChangeNbrAllowedOnUi & aFlags ) - { - // NOT suppported as default - } - else if ( EVmbxVideoMailboxSupported & aFlags ) - { - // NOT suppported as default - } - else - { - // default - } - VMBLOGSTRING2( "VMBX: CVmbxEngineBase::CheckConfiguration: conf%I <=", - conf ); - return conf; - } - -// --------------------------------------------------------------------------- -// CVmbxEngineBase::QueryDefineNumberL -// -// --------------------------------------------------------------------------- -// -void CVmbxEngineBase::QueryDefineNumberL( CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxEngineBase::QueryDefineNumberL =>" ); - HBufC* defineNumber = HBufC::NewLC( KVmbxMaxNumberLength ); - TPtr ptrNumber( defineNumber->Des() ); - - iProvider.VmbxUiUtilities().ShowQueryL( aEntry.VoiceMailboxType(), - EVmbxDefineMode, ptrNumber ); - TInt err = aEntry.SetVmbxNumber( ptrNumber ); - CleanupStack::PopAndDestroy( defineNumber ); - VMBLOGSTRING2( "VMBX: CVmbxEngineBase::QueryDefineNumberL, err%I", err ); - User::LeaveIfError( err ); - VMBLOGSTRING( "VMBX: CVmbxEngineBase::QueryDefineNumberL <= "); - } - -// ---------------------------------------------------------------------------- -// CVmbxEngineBase::QueryChangeNumberL -// -// ---------------------------------------------------------------------------- -// -void CVmbxEngineBase::QueryChangeNumberL( CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxEngineBase::QueryChangeNumberL =>" ); - TInt err( KErrNone ); - TPtrC vmbxNumber( KNullDesC ); - err = aEntry.GetVmbxNumber( vmbxNumber ); - - if ( KErrNone == err ) - { - HBufC* changeNumber = HBufC::NewLC( KVmbxMaxNumberLength ); - TPtr tempNumber( changeNumber->Des() ); - tempNumber.Copy( vmbxNumber ); - iProvider.VmbxUiUtilities().ShowQueryL( aEntry.VoiceMailboxType(), - EVmbxChangeMode, tempNumber ); - err = aEntry.SetVmbxNumber( tempNumber ); - CleanupStack::PopAndDestroy( changeNumber ); - } - VMBLOGSTRING2( "VMBX: CVmbxEngineBase::QueryChangeNumberL, err%I", err ); - User::LeaveIfError( err ); - VMBLOGSTRING( "VMBX: CVmbxEngineBase::QueryChangeNumberL <=" ); - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxenginefactory.cpp --- a/vmbx/vmbxengine/src/vmbxenginefactory.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +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: Implementation of the CVmbxEngineFactory class -* -*/ - -// INCLUDE FILES -#include "vmbxenginebase.h" -#include "vmbxcsvoiceengine.h" -#include "vmbxcsvideoengine.h" -#include "vmbxvoipengine.h" -#include "vmbxutilities.h" - -#include "vmbxlogger.h" - -#include "vmbxenginefactory.h" - - -// CONSTANTS - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxEntryFactory::CVmbxEntryFactory -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxEngineFactory::CVmbxEngineFactory( MVmbxResourceProvider& aProvider ) - : iProvider( aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxEntryFactory::CVmbxEntryFactory <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmbxEntryFactory::~CVmbxEntryFactory -// Destructor. -// --------------------------------------------------------------------------- -// -CVmbxEngineFactory::~CVmbxEngineFactory() - { - VMBLOGSTRING( "VMBX: CVmbxEntryFactory::~CVmbxEntryFactory <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmbxEntryFactory::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxEngineFactory* CVmbxEngineFactory::NewL( - MVmbxResourceProvider& aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxEntryFactory::NewL =>" ); - CVmbxEngineFactory* self = - new( ELeave ) CVmbxEngineFactory( aProvider ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxEntryFactory::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxEntryFactory::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmbxEngineFactory::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxEntryFactory::ConstructL =>" ); - VMBLOGSTRING( "VMBX: CVmbxEntryFactory::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxEntryFactory::CreateEngineL -// Loads instance of the mailbox entry -// --------------------------------------------------------------------------- -// -void CVmbxEngineFactory::CreateEngineL( CVmbxEngineBase*& aEngine, - TVmbxType aType ) - { - VMBLOGSTRING( "VMBX: CVmbxEntryFactory::CreateEngineL =>" ); - aEngine = NULL; - - TInt result( KErrNone ); - switch( aType ) - { - case EVmbxVoice: - { - // Create voice mailbox - CVmbxEngineBase* voice = CVmbxCsVoiceEngine::NewL( iProvider ); - aEngine = voice; - } - break; - case EVmbxVideo: - { - if ( VmbxUtilities::VideoSupported() ) - { - // Create video mailbox - CVmbxEngineBase* video = CVmbxCsVideoEngine::NewL( iProvider ); - aEngine = video; - } - else - { - result = KErrNotSupported; - } - } - break; - case EVmbxVoip: - { - if ( VmbxUtilities::VoIPSupported() ) - { - // Create Voip mailbox - CVmbxEngineBase* voip = CVmbxVoIpEngine::NewL( iProvider); - aEngine = voip; - } - else - { - result = KErrNotSupported; - } - } - break; - default: - result = KErrArgument; - break; - } - - VMBLOGSTRING2( "VMBX: CVmbxEntryFactory::CreateEngineL: result%I", - result ); - if ( KErrNone != result ) - { - User::Leave( result ); - } - VMBLOGSTRING( "VMBX: CVmbxEntryFactory::CreateEngineL <=" ); - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxetelconnection.cpp --- a/vmbx/vmbxengine/src/vmbxetelconnection.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +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: Implementation of the CVmbxETelConnection class -* -*/ - - -// INCLUDE FILES -#include - -#include "vmbxlogger.h" -#include "vmbxetelconnection.h" - -// CONSTANTS -// ETel connections attemps -const TInt KTriesToConnectServer( 7 ); -// time between ETel connections attemps -const TInt KTimeBeforeRetryingServerConnection( 100000 ); -// Index to the first phone info -const TInt KFirstPhoneIndex = 0; - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxETelConnection::CVmbxETelConnection -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxETelConnection::CVmbxETelConnection() - { - VMBLOGSTRING( "VMBX: CVmbxETelConnection::CVmbxETelConnection <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmbxETelConnection::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmbxETelConnection::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxETelConnection::ConstructL =>" ); - TInt errorCode( KErrNone ); - TInt thisTry( 0 ); - RTelServer::TPhoneInfo info; - // connect to ETel server - while ( ( errorCode = iTelServer.Connect() ) != KErrNone && - ( thisTry++ ) <= KTriesToConnectServer ) - { - User::After( KTimeBeforeRetryingServerConnection ); - } - VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: errorCode %I", - errorCode ); - User::LeaveIfError( errorCode ); - - // load TSY - errorCode = iTelServer.LoadPhoneModule( KMmTsyModuleName ); - VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: err%I", errorCode ); - if ( KErrNone != errorCode && KErrAlreadyExists != errorCode ) - { - User::Leave( errorCode ); - } - - // This enables extended errors from low level which are needed - // to get detailed information when saving contacts - TInt errExtrnded = iTelServer.SetExtendedErrorGranularity( - RTelServer::EErrorExtended ); - VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: errExtrnded %I", - errExtrnded ); - User::LeaveIfError( errExtrnded ); - // get info about default phone - TInt errGetInfo = iTelServer.GetPhoneInfo( KFirstPhoneIndex, info ); - VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: errGetInfo %I", - errGetInfo ); - User::LeaveIfError( errGetInfo ); - - TInt errInfoName = iPhone.Open( iTelServer, info.iName ); - VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: errInfoName %I", - errInfoName ); - User::LeaveIfError( errInfoName ); - - VMBLOGSTRING( "VMBX: CVmbxETelConnection::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxETelConnection::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxETelConnection* CVmbxETelConnection::NewL() - { - VMBLOGSTRING( "VMBX: CVmbxETelConnection::NewL =>" ); - CVmbxETelConnection* self = new( ELeave ) CVmbxETelConnection(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - VMBLOGSTRING( "VMBX: CVmbxETelConnection::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxETelConnection::~CVmbxETelConnection() -// Destructor -// --------------------------------------------------------------------------- -// -CVmbxETelConnection::~CVmbxETelConnection() - { - VMBLOGSTRING( "VMBX: CVmbxETelConnection::~CVmbxETelConnection =>" ); - // close ETel connection - iPhone.Close(); - iTelServer.Close(); - VMBLOGSTRING( "VMBX: CVmbxETelConnection::~CVmbxETelConnection <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxETelConnection::TelServer -// Returns a reference to the ETel RTelServer -// --------------------------------------------------------------------------- -// -RTelServer& CVmbxETelConnection::TelServer() - { - VMBLOGSTRING( "VMBX: CVmbxETelConnection::TelServer <=>" ); - return iTelServer; - } - -// --------------------------------------------------------------------------- -// CVmbxETelConnection::Phone -// Returns a reference to the ETel RMobilePhone -// --------------------------------------------------------------------------- -// -RMobilePhone& CVmbxETelConnection::Phone() - { - VMBLOGSTRING( "VMBX: CVmbxETelConnection::Phone <=>" ); - return iPhone; - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxobserver.cpp --- a/vmbx/vmbxengine/src/vmbxobserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +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: Implementation of CVmbxObserver class. - * -*/ - -// INCLUDE FILES -#include "vmbxlogger.h" -#include "vmbxcenrepobserver.h" -#include "vmbxsimstoreobserver.h" -#include "vmbxsatrefreshobserver.h" -#include "vmbxsimhandler.h" - -#include "vmbxobserver.h" - -// CONSTANTS - - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxObserver::CVmbxObserver -// C++ default constructor can NOT contain any code, that might leave. -// --------------------------------------------------------------------------- -// -CVmbxObserver::CVmbxObserver( MVmbxResourceProvider& aProvider ) - : iProvider( aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxObserver::CVmbxObserver <=>" ); - } - -// --------------------------------------------------------------------------- -// CVmbxObserver::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmbxObserver::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxObserver::ConstructL =>" ); - - iCenRepObserver = CVmbxCenRepObserver::NewL( *this ); - - TVmbxMemoryLocation storeType = - iProvider.VmbxCenRepHandler().StoreType(); - if ( EVmbxSimMemory == storeType ) - { - TRAPD( err, iSimHandler = CVmbxSimHandler::NewL() ); - if ( KErrNone == err ) - { - iSatObserver = CVmbxSatRefreshObserver::NewL( *this ); - iSimObserver = CVmbxSimStoreObserver::NewL( *iSimHandler, *this ); - } - VMBLOGSTRING2( "VMBX: CVmbxObserver::ConstructL: err=%I", err ); - } - VMBLOGSTRING( "VMBX: CVmbxObserver::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxObserver::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxObserver* CVmbxObserver::NewL( MVmbxResourceProvider& aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxObserver::NewL =>" ); - CVmbxObserver* self = CVmbxObserver::NewLC( aProvider ); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxObserver::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxObserver::NewLC -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxObserver* CVmbxObserver::NewLC( MVmbxResourceProvider& aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxObserver::NewLC =>" ); - CVmbxObserver* self = new (ELeave) CVmbxObserver( aProvider ); - CleanupStack::PushL( self ); - VMBLOGSTRING( "VMBX: CVmbxObserver::NewLC <=" ); - self->ConstructL(); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxObserver::SetVmbxObserver -// Set observer -// --------------------------------------------------------------------------- -// -void CVmbxObserver::SetVmbxObserver( MVmbxChangeObserver& aObserver ) - { - VMBLOGSTRING( "VMBX: CVmbxObserver::SetVmbxObserver =>" ); - iObserver = &aObserver; - VMBLOGSTRING( "VMBX: CVmbxObserver::SetVmbxObserver <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxObserver::HandleSimStoreChanged -// observe Sim store changed. -// --------------------------------------------------------------------------- -// -void CVmbxObserver::HandleSimStoreChanged( ) - { - VMBLOGSTRING( "VMBX: CVmbxObserver::HandleSimStoreChanged =>" ); - if ( iObserver ) - { - TRAPD( err, iObserver->SimStoreChangedL() ); - // avoid warning - err = err; - VMBLOGSTRING2( "VMBX: CVmbxObserver::HandleSimStoreChanged, err=%I", - err ); - } - - VMBLOGSTRING( "VMBX: CVmbxObserver::HandleSimStoreChanged <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxObserver::HandleSatRefresh -// observe sat refresh. -// --------------------------------------------------------------------------- -// -void CVmbxObserver::HandleSatRefresh( ) - { - VMBLOGSTRING( "VMBX: CVmbxObserver::HandleSatRefreshL =>" ); - if ( iObserver ) - { - TRAPD( err, iObserver->SatRefreshL() ); - // avoid warning - err = err; - VMBLOGSTRING2( "VMBX: CVmbxObserver::HandleSatRefresh, err=%I", - err ); - } - VMBLOGSTRING( "VMBX: CVmbxObserver::HandleSatRefreshL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxObserver::HandleCenRepChange -// observe central Repository changed. -// --------------------------------------------------------------------------- -// -void CVmbxObserver::HandleCenRepChange( TVmbxCenRepKey aId ) - { - VMBLOGSTRING( "VMBX: CVmbxObserver::HandleCenRepChange =>" ); - if ( iObserver ) - { - TRAPD( err, iObserver->CenRepChangedL( aId ) ); - // avoid warning - err = err; - VMBLOGSTRING2( "VMBX: CVmbxObserver::HandleCenRepChange, err=%I", - err ); - } - VMBLOGSTRING( "VMBX: CVmbxObserver::HandleCenRepChange <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxObserver::~CVmbxObserve -// Destructor. -// --------------------------------------------------------------------------- -// -CVmbxObserver::~CVmbxObserver() - { - VMBLOGSTRING( "VMBX: CVmbxObserver::~CVmbxObserver =>" ); - delete iSatObserver; - delete iSimObserver; - delete iCenRepObserver; - delete iSimHandler; - VMBLOGSTRING( "VMBX: CVmbxObserver::~CVmbxObserver <=" ); - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxpbkstore.cpp --- a/vmbx/vmbxengine/src/vmbxpbkstore.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,846 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the CVmbxPbkStore class -* -*/ - - -// INCLUDE FILES -#include -#include -#include - -#include "vmbxutilities.h" -#include "vmbxetelconnection.h" -#include "vmbxlogger.h" -#include "vmbxpbkstore.h" - -#include -#include -#include -//CONSTANTS -// Amount of retries to be performed. -const TInt KVmbxPhonebookBufferSize( 150 ); - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::CVmbxPbkStore -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxPbkStore::CVmbxPbkStore(): CActive(EPriorityStandard ), - iAsynType( EVmbxSimDefault ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::CVmbxPbkStore =>" ); - CActiveScheduler::Add( this ); - VMBLOGSTRING( "VMBX: CVmbxPbkStore::CVmbxPbkStore <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::~CVmbxPbkStore -// destructor -// --------------------------------------------------------------------------- -// -CVmbxPbkStore:: ~CVmbxPbkStore() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::~CVmbxPbkStore =>" ); - Cancel(); - iPhoneBook.Close(); - delete iWait; - delete iETelConnection; - VMBLOGSTRING( "VMBX: CVmbxPbkStore::~CVmbxPbkStore <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::NewL -// two phase constructor -// --------------------------------------------------------------------------- -// -CVmbxPbkStore* CVmbxPbkStore::NewL() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::NewL =>" ); - CVmbxPbkStore* self = new( ELeave ) CVmbxPbkStore(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxPbkStore::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::ConstructL -// two phase constructor -// --------------------------------------------------------------------------- -// -void CVmbxPbkStore::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ConstructL =>" ); - TInt value( 0 ); - TInt res = RProperty::Get( KPSUidStartup, KPSSimStatus, value ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ConstructL res = %d", res ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ConstructL value = %d", value ); - if ( (ESimUsable != value && ESimReadable != value ) || KErrNone != res ) - { - // Sim card not ready to use - User::Leave( KErrNotReady ); - } - // Open tel server and phone - iETelConnection = CVmbxETelConnection::NewL(); - - iWait = new( ELeave ) CActiveSchedulerWait; - TVmbxAlsLineType alsLine = VmbxUtilities::AlsLine(); - - // Supported ALS line,ALS line on - if ( EVmbxAlsLineDefault != alsLine ) - { - // open 6f17 file ,if not found the file, leave - User::LeaveIfError( OpenVmbxPhonebook() ); - } - // Not supported ALS line,ALS line off - else - { - // Open 6fc7 file, if not found, open 6f17 file - TInt result = OpenMbdnPhonebook(); - if ( KErrPathNotFound == result ) - { - //close 6fc7 and open 6f17 file - iPhoneBook.Close(); - // open 6f17 file ,if not found the file, leave - User::LeaveIfError( OpenVmbxPhonebook() ); - } - else - { - User::LeaveIfError( result ); - } - } - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::GetVmbxInfo -// Activates phonebook info query -// --------------------------------------------------------------------------- -TInt CVmbxPbkStore::GetVmbxInfo( - RMobilePhoneBookStore::TMobilePhoneBookInfoV1& aInfo ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetVmbxInfo =>" ); - TInt result( KErrInUse ); - RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg - InfoPckg( aInfo ); - // get Info from phonebook - if( !IsActive() && !iWait->IsStarted() ) - { - iPhoneBook.GetInfo( iStatus, InfoPckg ); - iAsynType = EVmbxSimGetInfo; - SetActive(); - iWait->Start(); - - result = iStatus.Int(); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::PhonebookInfo: \ - SIM Phonebook info read, status: %I", result ); - } - VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetVmbxInfo <=" ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::IsWritable -// Sim write support -// --------------------------------------------------------------------------- -// -TBool CVmbxPbkStore::IsWritable() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::IsWritable =>" ); - TBool result( EFalse ); - if ( IsWriteAccess() ) - { - // Get current sim entry, then write the same entry - // to sim if read successufully - CVoiceMailboxEntry* simEntry(NULL); - TRAPD( newErr, simEntry = CVoiceMailboxEntry::NewL() ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::IsWritable newErr = %d ", - newErr ); - if ( KErrNone == newErr ) - { - // get als line info - TVmbxAlsLineType alsLine = VmbxUtilities::AlsLine(); - simEntry->SetVmbxAlsLineType( alsLine ); - // ALS line off - if ( IsSimFileExisting(EMBDNPhoneBook) && (EVmbxAlsLineDefault == alsLine) ) - { - // ALS line on and 6f17 exist - // just check 6f17 file write access - iPhoneBookType = EMBDNPhoneBook; - } - else - { - // ALS line on, only should write to 6fc7; ALS off, 6f17 file inexist - // check 6fc7 file write access - iPhoneBookType = EVMBXPhoneBook; - } - simEntry->SetVoiceMailboxType( EVmbxVoice ); - simEntry->SetServiceId( KVmbxServiceVoice ); - TRAPD( err, SimReadL( *simEntry ) ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable read %I <=", err ); - if ( KErrNotFound == err ) - { - simEntry->SetVmbxNumber( KNullDesC ); - } - if ( KErrNone == err || KErrNotFound == err ) - { - err = Write( *simEntry ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable write %I <=", - err ); - // If write successfully, means writable - if ( KErrNone == err ) - { - result = ETrue; - } - } - } - delete simEntry; - simEntry = NULL; - } - VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable result %I <=", result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::PhoneBookType -// PhoneBookType -// --------------------------------------------------------------------------- -// -TVmbxSimPhonebookType CVmbxPbkStore::PhoneBookType() - { - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::PhoneBookType type %I", - iPhoneBookType ); - return iPhoneBookType; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::Write -// Write to SIM -// --------------------------------------------------------------------------- -// -TInt CVmbxPbkStore::Write( const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::Write =>" ); - TInt result( KErrInUse ); - TBuf8 pbData; - - CPhoneBookBuffer* pbkBuffer = new CPhoneBookBuffer(); - - if ( !pbkBuffer ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::Write: \ - Phonebook creation error" ); - result = KErrNoMemory; - } - else - { - pbkBuffer->Set( &pbData ); - TInt activeAlsLine = aEntry.VmbxAlsLineType(); - // Add index, const value for vmbx write. - int entryIndex = 1; - // New entry - result = pbkBuffer->AddNewEntryTag(); - if ( KErrNone == result ) - { - // Type of index is TUint16 in Multimode ETel and TInt in old ETel. - result = pbkBuffer->PutTagAndValue( - RMobilePhoneBookStore::ETagPBAdnIndex, (TUint16)entryIndex ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::Write: ETagPBAdnIndex \ - result=%I", result ); - // Add name, Type of ETagPBText is TDes16 - TPtrC vmbxName( KNullDesC ); - aEntry.GetVmbxName( vmbxName ); - result = pbkBuffer->PutTagAndValue( - RMobilePhoneBookStore::ETagPBText, vmbxName ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::Write: ETagPBText\ - result=%I", result ); - // Add number, Type of ETagPBNumber is TDes16 - TPtrC vmbxNumber( KNullDesC ); - aEntry.GetVmbxNumber( vmbxNumber ); - result = pbkBuffer->PutTagAndValue( - RMobilePhoneBookStore::ETagPBNumber, vmbxNumber ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::Write: ETagPBNumber\ - result=%I", result ); - } - - if ( KErrNone == result ) - { - if ( iPhoneBookType == EMBDNPhoneBook ) - { - RMobilePhone::TMobilePhoneVoicemailIdsV3 mbdnInfo; - result = GetMbdnInfo( mbdnInfo ); - - if ( KErrNone == result ) - { - TInt index = mbdnInfo.iVoice; - if( !IsActive() && !iWait->IsStarted() ) - { - // write vmbx number to 6fc7 file - iPhoneBook.Write( iStatus, pbData, index ); - // Wait for asynchronous call to finish - iAsynType = EVmbxSimEntryWrite; - SetActive(); - iWait->Start(); - result = iStatus.Int(); - } - } - VMBLOGSTRING( "Mbdn writing" ); - } - else - { - if( !IsActive() && !iWait->IsStarted() ) - { - // write vmbx number to 6f17 file - iPhoneBook.Write( iStatus, pbData, entryIndex ); - iAsynType = EVmbxSimEntryWrite; - // Wait for asynchronous call to finish - SetActive(); - iWait->Start(); - result = iStatus.Int(); - } - VMBLOGSTRING( "CVmbxPbkStore::Write 6f17 writing" ); - } - } - } - delete pbkBuffer; - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::Write: result=%I<=", result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::PhonebookStore -// Return RMobilePhoneBookStore -// --------------------------------------------------------------------------- -RMobilePhoneBookStore& CVmbxPbkStore::PhonebookStore() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::PhonebookStore <=>" ); - return iPhoneBook; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::GetMbdnInfo -// --------------------------------------------------------------------------- -// -TInt CVmbxPbkStore::GetMbdnInfo( RMobilePhone::TMobilePhoneVoicemailIdsV3& aInfo ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetMbdnInfo =>" ); - TInt result( KErrInUse ); - // Get identifiers - if ( !IsActive() && !iWait->IsStarted() ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetMbdnInfo: GetMailboxNumbers" ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: iStatus %I", - iStatus.Int() ); - RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg infoPckg( aInfo ); - iETelConnection->Phone().GetMailboxNumbers( iStatus, infoPckg ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo :iStatus %I", - iStatus.Int() ); - iAsynType = EVmbxSimMbdnInfo; - // Wait for asynchronous call to finish - SetActive(); - iWait->Start(); - - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: iVoice original value %I", - aInfo.iVoice ); - if ( iStatus.Int() == KErrNotFound ) - { - result = KErrNone; - VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetMbdnInfo: KErrNotFound,\ - but igorned and change to KErrNone" ); - } - else - { - result = iStatus.Int(); - } - TVmbxAlsLineType alsLine = VmbxUtilities::AlsLine(); - if ( EVmbxAlsLineDefault == alsLine ) - { - aInfo.iVoice = EVmbxAlsLine1; - } - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: iVoice last value %I", - aInfo.iVoice ); - } - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: result %I<=", - result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::OpenMbdnPhonebook -// opening mbdn-type phonebook -// --------------------------------------------------------------------------- -// -TInt CVmbxPbkStore::OpenMbdnPhonebook() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook =>" ); - //Open mbdn-type phonebook , Currently the file not exist, thr return - // value also KErrNone - TInt result = iPhoneBook.Open( iETelConnection->Phone(), - KETelIccMbdnPhoneBook ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook :\ - MBDN opening result = %d", result ); - - TBool res = IsSimFileExisting( EMBDNPhoneBook ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook :\ - MBDN reading res = %d", res ); - if ( !res ) - { - result = KErrPathNotFound; - } - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook res = %d<=", result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::OpenVmbxPhonebook -// opening vmbx-type phonebook -// --------------------------------------------------------------------------- -// -TInt CVmbxPbkStore::OpenVmbxPhonebook() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook =>" ); - //Open vmbx-type phonebook , Currently the file not exist, thr return - // value also KErrNone - TInt result = iPhoneBook.Open( iETelConnection->Phone(), - KETelIccVoiceMailBox ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook :\ - Vmbx opening result = %d", result ); - TBool res = IsSimFileExisting( EVMBXPhoneBook ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook :\ - Vmbx reading res = %d", res ); - if ( !res ) - { - result = KErrPathNotFound; - } - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook result=%d <=", result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::GetL -// Fetches mailbox number from Sim -// --------------------------------------------------------------------------- -// -void CVmbxPbkStore::GetL( CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetL: iPhoneBookType %d=>", - iPhoneBookType ); - - if ( EMBDNPhoneBook == iPhoneBookType ) - { - TRAPD( err, SimReadL( aEntry ) ); - - TPtrC vmbxNumber( KNullDesC ); - if ( KErrNone == err ) - { - err = aEntry.GetVmbxNumber( vmbxNumber ); - } - - // 6fc7 file empty - if ( ( KErrNone != err ) || ( !vmbxNumber.Length() ) ) - { - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetL: \ - no vmbx number in 6fc7 file then read from 6f17 file err%I", err ); - // close 6fc7 and open 6f17 file - iPhoneBook.Close(); - User::LeaveIfError( OpenVmbxPhonebook() ); - // read vmbx number from 6f17 file - SimReadL( aEntry ); - } - } - else - { - SimReadL( aEntry ); - } - - VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::SimReadL -// read vmbx number from sim -// --------------------------------------------------------------------------- -// -void CVmbxPbkStore::SimReadL( CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::SimReadL =>" ); - - TInt numEntries( 1 ); - TBuf8 pbData; - - TInt result( KErrInUse ); - if ( iPhoneBookType == EMBDNPhoneBook ) - { - RMobilePhone::TMobilePhoneVoicemailIdsV3 mbdnInfo; - result = GetMbdnInfo( mbdnInfo ); - if ( KErrNone == result ) - { - VMBLOGSTRING( "start MBDN PhoneBook read" ); - if( !IsActive() && !iWait->IsStarted() ) - { - // read vmbx number from 6fc7 file - iPhoneBook.Read( - iStatus, mbdnInfo.iVoice, numEntries, pbData ); - iAsynType = EVmbxSimEntryRead; - // Wait for asynchronous call to finish - SetActive(); - iWait->Start(); - } - } - } - else - { - // Record#1 in sim is for line1 number and Record#2 in sim is for - // line2 number so line is used to fetch - VMBLOGSTRING( "start VMBX PhoneBook read" ); - TInt activeAlsLine = aEntry.VmbxAlsLineType(); - if ( EVmbxAlsLineDefault == activeAlsLine ) - { - activeAlsLine = EVmbxAlsLine1; - } - if( !IsActive() && !iWait->IsStarted() ) - { - result = KErrNone; - // read vmbx number from 6f17 file - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::SimReadLactiveAlsLine = %I", - activeAlsLine ); - iPhoneBook.Read( iStatus, activeAlsLine, numEntries, pbData ); - iAsynType = EVmbxSimEntryRead; - // Wait for asynchronous call to finish - SetActive(); - iWait->Start(); - } - } - - User::LeaveIfError( result ); - // asynchronous call finished - VMBLOGSTRING2( "PhoneBook read iStatus = %I", iStatus.Int() ); - - if( iStatus.Int() == KErrNone ) - { - ParseDataL( aEntry, pbData ); - } - else - { - User::Leave( iStatus.Int() ); - } - - VMBLOGSTRING( "VMBX: CVmbxPbkStore::SimReadL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::ParseDataL -// -// --------------------------------------------------------------------------- -// -void CVmbxPbkStore::ParseDataL( CVoiceMailboxEntry& aEntry, TDes8& aPbData ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ParseDataL =>" ); - TInt result( KErrNotFound ); - - VMBLOGSTRING2( "CVmbxPbkStore::ParseDataL Lengh = %d", aPbData.Length() ); - - if ( aPbData.Length() ) - { - // -> Search Tags "ETagPBNumber" and "ETagPBText" - // and read (decode) them - // create buffer - CPhoneBookBuffer* pbkBuffer = new( ELeave ) CPhoneBookBuffer(); - CleanupStack::PushL( pbkBuffer ); - - // start read - pbkBuffer->Set( &aPbData ); - pbkBuffer->StartRead(); - - result = ReadNewEntryTag( pbkBuffer ); - // Read first "new-entry-tag" - if ( KErrNone == result ) - { - ReadPbkDataL( pbkBuffer, aEntry ); - } - CleanupStack::PopAndDestroy( pbkBuffer ); - } - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ParseDataL: result %I", result ); - User::LeaveIfError( result ); - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ParseDataL <=" ); - } - - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::ReadNewEntryTag -// Reads "new-entry-tag" from phonebook data from Sim -// --------------------------------------------------------------------------- -// -TInt CVmbxPbkStore::ReadNewEntryTag( CPhoneBookBuffer* aPbkBuffer ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadNewEntryTag =>" ); - TInt result( KErrNone ); - TUint8 tagValue( 0 ); - CPhoneBookBuffer::TPhBkTagType dataType( - CPhoneBookBuffer::EPhBkTypeNoData ); - - result = aPbkBuffer->GetTagAndType( tagValue, dataType ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ReadNewEntryTag result = %d", - result ); - - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ReadNewEntryTag tagValue = %X", - tagValue ); - if ( tagValue != RMobilePhoneBookStore::ETagPBNewEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ParseDataL: Unknown result" ); - result = KErrArgument; // Something wrong in TLV - } - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadNewEntryTag <=" ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::ReadPbkData -// Reads tags from buffer retrieved from sim -// --------------------------------------------------------------------------- -// -void CVmbxPbkStore::ReadPbkDataL( CPhoneBookBuffer* aPbkBuffer, - CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadPbkDataL =>" ); - - TInt result( KErrNone ); - TInt next( KErrNone ); - TBool found( EFalse ); - TUint8 tagValue( 0 ); - CPhoneBookBuffer::TPhBkTagType dataType( - CPhoneBookBuffer::EPhBkTypeNoData ); - - result = aPbkBuffer->GetTagAndType( tagValue, dataType ); - - // loop through data to find a number and an possible alpha string - while ( next == KErrNone && result == KErrNone ) - { - VMBLOGSTRING2("VMBX: CVmbxPbkStore::ReadPbkDataL: tagValue: %d", - tagValue ); - VMBLOGSTRING2("VMBX: CVmbxPbkStore::ReadPbkDataL: dataType: %d", - dataType ); - - // Check for text field - if ( tagValue == RMobilePhoneBookStore::ETagPBText ) - { - VMBLOGSTRING("VMBX: CVmbxPbkStore::ReadPbkDataL: \ - ETagPBText found Alpha ID" ); - found = ETrue; - // Alpha string field found from TLV entry, - // assuming 16bit data - TPtrC16 alphaPtrC; - result = aPbkBuffer->GetValue( alphaPtrC ); - - if ( KErrNone == result ) - { - // set name to vmbx entry - result = aEntry.SetVmbxName( alphaPtrC ); - } - } - - // Check for number field - else if ( tagValue == RMobilePhoneBookStore::ETagPBNumber ) - { - VMBLOGSTRING("VMBX: CVmbxPbkStore::ReadPbkDataL: \ - ETagPBNumber found Number" ); - found = ETrue; - // Number field found from TLV entry, assuming 16bit data - TPtrC16 numberPtrC; - result = aPbkBuffer->GetValue( numberPtrC ); - - if ( KErrNone == result ) - { - // set number to vmbx entry - result = aEntry.SetVmbxNumber( numberPtrC ); - } - } - else - { - // skip field - aPbkBuffer->SkipValue( dataType ); - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadPbkDataL: SkipValue" ); - } - // read next if no errors - if ( KErrNone == result ) - { - // Read next field type - next = aPbkBuffer->GetTagAndType( tagValue, dataType ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ReadPbkDataL: \ - next GetTagAndType = %I", result ); - } - } - - // Neither alpha string Nor number is found - if( KErrNone == result && !found ) - { - result = KErrNotFound; - } - - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ReadPbkDataL result=%I", result ); - User::LeaveIfError( result ); - VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadPbkDataL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::RunL -// -// --------------------------------------------------------------------------- -// -void CVmbxPbkStore::RunL() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::RunL =>" ); - if ( iWait->IsStarted() ) - { - // stop blocking - iWait->AsyncStop(); - VMBLOGSTRING( "VMBX: CVmbxSimHandler::RunL: AsyncStop" ); - } - iAsynType = EVmbxSimDefault; - VMBLOGSTRING( "VMBX: CVmbxPbkStore::RunL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::DoCancel -// -// --------------------------------------------------------------------------- -// -void CVmbxPbkStore::DoCancel() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel =>" ); - if ( iWait->IsStarted() ) - { - // stop blocking - iWait->AsyncStop(); - VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel: AsyncStop" ); - } - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::DoCancel: iAsynType %I",iAsynType ); - switch ( iAsynType ) - { - // only for USIM - case EVmbxSimMbdnInfo: - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : \ - EVmbxSimMbdnInfo" ); - iETelConnection->Phone().CancelAsyncRequest( - EMobilePhoneGetMailboxNumbers ); - break; - } - case EVmbxSimGetInfo: - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : \ - EVmbxSimGetInfo" ); - iETelConnection->Phone().CancelAsyncRequest( - EMobilePhoneStoreGetInfo ); - break; - } - case EVmbxSimEntryRead: - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : EVmbxSimEntryRead" ); - iETelConnection->Phone().CancelAsyncRequest( - EMobilePhoneStoreRead ); - break; - } - case EVmbxSimEntryWrite: - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : EVmbxSimEntryWrite" ); - iETelConnection->Phone().CancelAsyncRequest( - EMobilePhoneStoreWrite ); - break; - } - default: - break; - } - - VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::RunError -// -// --------------------------------------------------------------------------- -// -TInt CVmbxPbkStore::RunError(TInt aError) - { - // Avoid warning - aError = aError; - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::RunError: %I", aError ); - return KErrNone; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::IsSimFileExisting -// check sim file existing or not -// --------------------------------------------------------------------------- -// -TBool CVmbxPbkStore::IsSimFileExisting( const TVmbxSimPhonebookType aType ) - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::IsSimFileExisting =>" ); - iPhoneBookType = aType; - TBool result( ETrue ); - CVoiceMailboxEntry* entry(NULL); - TRAPD( err, entry = CVoiceMailboxEntry::NewL() ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::IsSimFileExisting err = %d ", - err ); - if ( KErrNone != err ) - { - result = EFalse; - } - else - { - entry->SetVoiceMailboxType( EVmbxVoice ); - TRAPD( err, SimReadL( *entry ) ); - // KErrPathNotFound means when current file path not found. - if ( KErrPathNotFound == err ) - { - result = EFalse; - } - } - delete entry; - entry = NULL; - VMBLOGSTRING2( "VMBX: CVmbxPbkStore::IsSimFileExisting result = %d <= ", - result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxPbkStore::IsWriteAccess -// Sim write access support -// --------------------------------------------------------------------------- -// -TBool CVmbxPbkStore::IsWriteAccess() - { - VMBLOGSTRING( "VMBX: CVmbxPbkStore::IsWriteAccess =>" ); - TBool result( EFalse ); - RMobilePhoneBookStore::TMobilePhoneBookInfoV1 info; - TInt temp = GetVmbxInfo( info ); - if( KErrNone == temp ) - { - result = ( info.iCaps & - RMobilePhoneBookStore::KCapsWriteAccess ? ETrue : EFalse ); - - } - VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWriteAccess: info.iCaps %X", - info.iCaps ); - VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWriteAccess result %I <=", result ); - return result; - } - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxqtuihandler.cpp --- a/vmbx/vmbxengine/src/vmbxqtuihandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,419 +0,0 @@ -/* -* Copyright (c) 2009-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: -* -* -*/ - -// qt -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "vmbxqtuihandler.h" -#include "voicemailboxdefsinternal.h" -#include "vmbxlogger.h" - -// ======== MEMBER FUNCTIONS ================================================== - -// ---------------------------------------------------------------------------- -// VmbxQtUiHandler::VmbxQtUiHandler -// (Constructor). -// ---------------------------------------------------------------------------- -// -VmbxQtUiHandler::VmbxQtUiHandler(QObject* parent): QObject(parent), - iTranslator(0), iCommonTranslator(0), iQueryDialog(NULL) -{ - VMBLOGSTRING("VmbxQtUiHandler::VmbxQtUiHandler") - init(); - VMBLOGSTRING("VmbxQtUiHandler::VmbxQtUiHandler Exit") -} - -// ---------------------------------------------------------------------------- -// VmbxQtUiHandler::~VmbxQtUiHandler -// (Destructor). -// ---------------------------------------------------------------------------- -// -VmbxQtUiHandler::~VmbxQtUiHandler() -{ - VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler") - if ( iQueryDialog ) { - delete iQueryDialog; - iQueryDialog = NULL; - VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler delete iQueryDialog") - } - VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler Exit") -} - -// ---------------------------------------------------------------------------- -// VmbxQtUiHandler::Init -// -// ---------------------------------------------------------------------------- -// -void VmbxQtUiHandler::init() -{ - VMBLOGSTRING("VmbxQtUiHandler::init") - QString lang = QLocale::system().name(); - VMBLOGSTRING2("VmbxQtUiHandler::init lang type %S", - lang.utf16()) - QString path = "Z:/resource/qt/translations/"; - bool translatorLoaded = iTranslator.load("vmbx_"+lang, path); - VMBLOGSTRING2("VmbxQtUiHandler::init load vmbx result %d", - translatorLoaded) - // Install vmbx localization - if (translatorLoaded) { - VMBLOGSTRING("VmbxQtUiHandler::init qApp !") - qApp->installTranslator(&iTranslator); - } - // Install common localization, for select type "cancel". - bool loaded = iCommonTranslator.load( "common_"+lang, path); - VMBLOGSTRING2("VmbxQtUiHandler::init load common result %d", - loaded) - if (loaded) { - VMBLOGSTRING("VmbxQtUiHandler::init qApp !!") - qApp->installTranslator(&iCommonTranslator); - } - VMBLOGSTRING("VmbxQtUiHandler::init Exit") -} - -// ---------------------------------------------------------------------------- -// VmbxQtUiHandler::ShowVmbxQueryDialog -// (show query dialog). -// ---------------------------------------------------------------------------- -// -void VmbxQtUiHandler::showVmbxQueryDialog(const TVmbxType& aType, - QString& aNumber, int& aResult) -{ - VMBLOGSTRING("VmbxQtUiHandler::showVmbxQueryDialog") - QString header; - if (EVmbxVoice == aType) { - header = hbTrId("txt_vmbx_title_voice_mailbox_number"); - } else if (EVmbxVideo == aType) { - // type of EVmbxVideo - header = hbTrId("txt_vmbx_title_video_mailbox_number"); - } else { - aResult = KErrCancel; - VMBLOGSTRING( "VmbxQtUiHandler::showVmbxQueryDialog type error" ) - return; - } - if (iQueryDialog) { - delete iQueryDialog; - iQueryDialog = 0; - } - - - iQueryDialog = new HbInputDialog(); - iQueryDialog->setDismissPolicy(HbDialog::NoDismiss); - iQueryDialog->setTimeout(HbDialog::NoTimeout); - - iQueryDialog->setModal(true); - // Set heading content - iQueryDialog->setPromptText(header); - - // Set HbLineEdit Content - iQueryDialog->lineEdit()->setText(aNumber); // default text - iQueryDialog->lineEdit()->setMaxLength(KVmbxPhoneCharMaxLength); - HbEditorInterface inputMode(iQueryDialog->lineEdit()); - inputMode.setFilter(HbPhoneNumberFilter::instance()); - bool ret = connect(iQueryDialog->lineEdit(), SIGNAL(textChanged(QString)), - this, SLOT(updatePrimaryAction(QString))); - VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog connect textChanged %d", ret) - - DialogWaiter waiter; - HbAction *primary = 0; - if (iQueryDialog->actions().count()>= 1) { - primary = qobject_cast(iQueryDialog->actions().at(0)); - } - - iQueryDialog->open(&waiter, SLOT(done(HbAction *))); - iQueryDialog->lineEdit()->setFocus(); // Enable the VKB - - HbAction *result = waiter.wait(); - if (result == primary) { - VMBLOGSTRING( "VmbxQtUiHandler::showVmbxQueryDialog select OK" ) - // asign OK KEY value - aResult = KErrNone; - aNumber = iQueryDialog->lineEdit()->text(); - } else { - aResult = KErrCancel; - } - - disconnect(iQueryDialog->lineEdit(), SIGNAL(textChanged(QString)), - this, SLOT(updatePrimaryAction(QString))); - - - // TODO Delete Operation will case panic on EM - -#ifdef __WINS__ - iQueryDialog->close(); -#else - delete iQueryDialog; - iQueryDialog = 0; -#endif // __WINS__ - - VMBLOGSTRING2("VmbxQtUiHandler::showVmbxQueryDialog aResult = %d", aResult) - VMBLOGSTRING("VmbxQtUiHandler::showVmbxQueryDialog Exit") -} - -// ---------------------------------------------------------------------------- -// VmbxQtUiHandler::showDefineSelectionDialog -// (Shoe define list dialog). -// ---------------------------------------------------------------------------- -// -void VmbxQtUiHandler::showDefineSelectionDialog( - TVmbxType &aType, int &aResult) -{ - VMBLOGSTRING("VmbxQtUiHandler::showDefineSelectionDialog") - HbDialog* defineListDialog = new HbDialog(); - defineListDialog->setDismissPolicy(HbDialog::NoDismiss); - defineListDialog->setTimeout(HbDialog::NoTimeout); - - defineListDialog->setModal(true); - // Set heading widget,"Define number:" - defineListDialog->setHeadingWidget(new HbLabel( - hbTrId("txt_vmbx_title_select_mailbox"))); - // Create a define list - HbListWidget *list = new HbListWidget(); - //Voice Mailbox - list->addItem(hbTrId("txt_vmbx_list_voice_mailbox")); - //Video Mailbox - list->addItem(hbTrId("txt_vmbx_list_video_mailbox")); - // Set content widget - defineListDialog->setContentWidget(list); - - // Sets the "Cancel"-action/button - HbAction *cancelAction = - new HbAction(hbTrId("txt_common_button_cancel"),defineListDialog); - defineListDialog->addAction(cancelAction); - - connect(list, SIGNAL(activated(HbListWidgetItem *)), - defineListDialog, SLOT(close())); - DialogWaiter waiter; - defineListDialog->open(&waiter, SLOT(done(HbAction *))); - HbAction *result = waiter.wait(); - if (cancelAction == result){ - aType = EVmbxNone; - aResult = KErrCancel; - } else { - // Select one item - aResult = KErrNone; - int currentItem = list->row(list->currentItem()); - VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog:\ - currentItem %d", currentItem) - if (0 == currentItem) { - aType = EVmbxVoice; - } else { - aType = EVmbxVideo; - } - } - VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog: aType%d", aType) - VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog: aResult%d", \ - aResult) - -#ifdef __WINS__ - defineListDialog->close(); -#else - delete defineListDialog; - defineListDialog = 0; -#endif // __WINS__ - - VMBLOGSTRING("VmbxQtUiHandler::showDefineSelectionDialog Exit") -} - -// ---------------------------------------------------------------------------- -// VmbxQtUiHandler::showCallSelectionDialog -// (show call selection dialog). -// ---------------------------------------------------------------------------- -// -void VmbxQtUiHandler::showCallSelectionDialog( - const QList entryList, - TVoiceMailboxParams ¶ms, int &result ) -{ - VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog") - int count = entryList.count(); - VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog new before") - HbDialog* callListDialog = new HbDialog(); - VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog new after") - callListDialog->setDismissPolicy(HbDialog::NoDismiss); - callListDialog->setTimeout(HbDialog::NoTimeout); - callListDialog->setModal(true); - // Set heading widget,"select mailbox" - callListDialog->setHeadingWidget(new HbLabel( - hbTrId("txt_vmbx_title_select_mailbox"))); - // Create a call list - HbListWidget *list = new HbListWidget(); - // Set content widget - callListDialog->setContentWidget(list); - - QList paramsList; - TVoiceMailboxParams entryParams; - for (int i = 0; i < count; i++) { - TVmbxType vmbxType = entryList[i]->VoiceMailboxType(); - entryParams.iType = vmbxType; - entryParams.iServiceId = entryList[i]->ServiceId(); - paramsList.append(entryParams); - switch (vmbxType) { - case EVmbxVoice: - { - list->addItem(hbTrId("txt_vmbx_list_voice_mailbox")); - break; - } - case EVmbxVideo: - { - list->addItem(hbTrId("txt_vmbx_list_video_mailbox")); - break; - } - case EVmbxVoip: - { - // Get name - TPtrC vmbxName( KNullDesC ); - int voipRes = entryList[i]->GetVmbxName(vmbxName); - VMBLOGSTRING2( "VmbxQtUiHandler::showCallSelectionDialogL\ - : voipRes=%I", voipRes ); - if (KErrNone == voipRes) { - QString voipName; - if (vmbxName.Length() > 0) { - voipName=QString::fromUtf16( - vmbxName.Ptr(), vmbxName.Length()); - // add voip item - list->addItem(voipName); - } - } - break; - } - default: - break; - } - } - // Sets the "Cancel"-action/button - HbAction *cancelAction = - new HbAction(hbTrId("txt_common_button_cancel"),callListDialog); - callListDialog->addAction(cancelAction); - - connect(list, SIGNAL(activated(HbListWidgetItem *)), - callListDialog, SLOT(close())); - DialogWaiter waiter; - callListDialog->open(&waiter, SLOT(done(HbAction *))); - HbAction *action = waiter.wait(); - if (cancelAction == action){ - params.iType = EVmbxNone; - params.iServiceId = KVmbxServiceIdNone; - result = KErrCancel; - } else { - // Select one item - result = KErrNone; - int currentItem = list->row(list->currentItem()); - VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog:\ - currentItem %d", currentItem) - params.iType = paramsList[currentItem].iType; - params.iServiceId = paramsList[currentItem].iServiceId; - } - VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog: params.iType %d", - params.iType) - VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog: result%d", - result) - -#ifdef __WINS__ - callListDialog->close(); -#else - delete callListDialog; - callListDialog = 0; -#endif // __WINS__ - VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog Exit") -} - -// ---------------------------------------------------------------------------- -// VmbxQtUiHandler::showInformationNote -// (show information note). -// ---------------------------------------------------------------------------- -// -void VmbxQtUiHandler::showInformationNote(const TVmbxNoteType aType) -{ - VMBLOGSTRING("VmbxQtUiHandler::showInformationNote") - QString noteText; - VMBLOGSTRING2("VmbxQtUiHandler::showInformationNote type =%d", aType) - switch (aType) { - case EInvalidNumber: - // Need to comfirm with ui designer - noteText = hbTrId("Invalid phone number."); - break; - case ENotAllowUserEditing: - //User not allow to edit. - noteText = hbTrId("Number not provisioned"); - break; - case ESavedToPhoneMemory: - case ESavedToSimMemory: - //Voice mailbox number saved to Phone memory. - noteText = hbTrId("txt_vmbx_dpopinfo_voice_mailbox_number_saved"); - break; - case EVideoNumberSaved: - //Video call mailbox saved. - noteText = hbTrId("txt_vmbx_dpopinfo_video_mailbox_number_saved"); - break; - case EDefineVoiceNumber: - //Define voice mailbox. - noteText = hbTrId("txt_vmbx_dpopinfo_define_voice_mailbox_number"); - break; - case EDefineVideoNumber: - //Define video mailbox. - noteText = hbTrId("txt_vmbx_dpopinfo_define_video_mailbox_number"); - break; - default: - VMBLOGSTRING("VmbxQtUiHandler::ShowInformationNote default") - break; - } - HbNotificationDialog::launchDialog(noteText); - VMBLOGSTRING("VmbxQtUiHandler::showInformationNote Exit") -} - -// ---------------------------------------------------------------------------- -// VmbxQtUiHandler::updatePrimaryAction -// (show information note). -// ---------------------------------------------------------------------------- -// -void VmbxQtUiHandler::updatePrimaryAction(const QString &aInput) -{ - if (iQueryDialog) { - QAction *ok = iQueryDialog->actions().at(0); - if (ok) { - if ( aInput.isEmpty() || aInput.contains(QRegExp("\\d\\d\\d"))){ - if (!ok->isEnabled()){ - ok->setEnabled(true); - VMBLOGSTRING("VmbxQtUiHandler::updatePrimaryAction enable OK") - } - } else { - if (ok->isEnabled()){ - ok->setEnabled(false); - VMBLOGSTRING("VmbxQtUiHandler::updatePrimaryAction disable OK") - } - } - } - } -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxsatrefreshobserver.cpp --- a/vmbx/vmbxengine/src/vmbxsatrefreshobserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +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: Implementation of CVmbxSatRefreshObserver class. -* -*/ - - -// INCLUDE FILES -#include "vmbxlogger.h" -#include "vmbxsatrefreshobserver.h" - -// CONSTANTS -const TInt KVmbxFile = 0x6f17; - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CVmbxSatRefreshObserver::CVmbxSatRefreshObserver -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CVmbxSatRefreshObserver::CVmbxSatRefreshObserver( - MVmbxSatRefreshObserver& aObserver ) - : iRSatSession(), - iSatRefresh( *this ), - iObserver( aObserver ) - { - VMBLOGSTRING( "VMBX:CVmbxSatRefreshObserver::CVmbxSatRefreshObserver <=>" ); - } - -// ----------------------------------------------------------------------------- -// CVmbxSatRefreshObserver::NewL -// two phase constructor -// ----------------------------------------------------------------------------- -// -CVmbxSatRefreshObserver* CVmbxSatRefreshObserver::NewL( - MVmbxSatRefreshObserver& aObserver ) - { - VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::NewL =>" ); - CVmbxSatRefreshObserver* self = new( ELeave ) CVmbxSatRefreshObserver( - aObserver ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::NewL <=" ); - return self; - } -// --------------------------------------------------------------------------- -// CVmbxSatRefreshObserver::ConstructL -// two phase constructor -// --------------------------------------------------------------------------- -// -void CVmbxSatRefreshObserver::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::ConstructL =>" ); - iRSatSession.ConnectL(); - iSatRefresh.OpenL( iRSatSession ); - iObservedFileList.Append( KMbdnEf ); - iObservedFileList.Append( KMbiEf ); - iObservedFileList.Append( KVmbxFile ); - iSatRefresh.NotifyFileChangeL( iObservedFileList ); - VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxSatRefreshObserver::~CVmbxSatRefreshObserver -// Destructor -// --------------------------------------------------------------------------- -// -CVmbxSatRefreshObserver::~CVmbxSatRefreshObserver() - { - VMBLOGSTRING( "VMBX:CVmbxSatRefreshObserver::~CVmbxSatRefreshObserver =>" ); - iSatRefresh.Cancel(); - iSatRefresh.Close(); - iRSatSession.Close(); - VMBLOGSTRING( "VMBX:CVmbxSatRefreshObserver::~CVmbxSatRefreshObserver <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxSatRefreshObserver::AllowRefresh -// Refresh query callback for USim -// --------------------------------------------------------------------------- - TBool CVmbxSatRefreshObserver::AllowRefresh( TSatRefreshType /*aType*/, - const TSatRefreshFiles& /*aFiles*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::AllowRefresh =>" ); - VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::AllowRefresh <=" ); - return ETrue; - } - -// --------------------------------------------------------------------------- -// CVmbxSatRefreshObserver::Refresh -// Refresh notification callback for USim -// --------------------------------------------------------------------------- -void CVmbxSatRefreshObserver::Refresh( TSatRefreshType aType, - const TSatRefreshFiles& aFiles ) - { - VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::Refresh =>" ); - if ( EFileChangeNotification == aType ) - { - const TInt elFile1( aFiles.Locate( KMbdnEf ) );// 6fc7 file - VMBLOGSTRING2( "VMBX: CVmbxSatRefreshObserver::Refresh: elFile1%I", - elFile1 ); - // 6fc9 file, indecator for 6fc7 file - const TInt elFile2( aFiles.Locate( KMbiEf ) ); - VMBLOGSTRING2( "VMBX: CVmbxSatRefreshObserver::Refresh: elFile2%I", - elFile2 ); - // 6f17 file - const TInt elFile3( aFiles.Locate( KVmbxFile ) ); - VMBLOGSTRING2( "VMBX: CVmbxSatRefreshObserver::Refresh: elFile3%I", - elFile3 ); - - if ( KErrNotFound != elFile1 || KErrNotFound != elFile2 - || KErrNotFound != KVmbxFile ) - { - iObserver.HandleSatRefresh(); - } - iSatRefresh.RefreshEFRead( EFalse ); - } - VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::Refresh <=" ); - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxsimhandler.cpp --- a/vmbx/vmbxengine/src/vmbxsimhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +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: Implementation of the CVmbxSimHandler class -* -*/ - - -// INCLUDE FILES -#include -#include - -#include "vmbxpbkstore.h" -#include "vmbxlogger.h" -#include "vmbxsimhandler.h" - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::CVmbxSimHandler -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxSimHandler::CVmbxSimHandler( ) - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::CVmbxSimHandler =>" ); - VMBLOGSTRING( "VMBX: CVmbxSimHandler::CVmbxSimHandler <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmbxSimHandler::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::ConstructL =>" ); -#ifndef __WINS__ - // open created phonebook - iPbkStore = CVmbxPbkStore::NewL(); -#endif - VMBLOGSTRING( "VMBX: CVmbxSimHandler::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxSimHandler* CVmbxSimHandler::NewL() - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::NewL =>" ); - CVmbxSimHandler* self = new( ELeave ) CVmbxSimHandler(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxSimHandler::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::~CVmbxSimHandler -// Destructor -// --------------------------------------------------------------------------- -// -CVmbxSimHandler::~CVmbxSimHandler() - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::~CVmbxSimHandler =>" ); -#ifndef __WINS__ - delete iPbkStore; -#endif - VMBLOGSTRING( "VMBX: CVmbxSimHandler::~CVmbxSimHandler <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::GetL -// Fetches mailbox number from Sim -// --------------------------------------------------------------------------- -// -void CVmbxSimHandler::GetL( CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::GetL =>" ); - iPbkStore->GetL( aEntry ); - VMBLOGSTRING( "VMBX: CVmbxSimHandler::GetL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::Save -// Saves vmbx number to Sim -// --------------------------------------------------------------------------- -// -TInt CVmbxSimHandler::Save( const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::Save =>" ); - TInt result = iPbkStore->Write( aEntry ); - VMBLOGSTRING2( "VMBX: CVmbxSimHandler::Save: result=%I <=", result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::IsWritable -// Current file is writable -// --------------------------------------------------------------------------- -// -TBool CVmbxSimHandler::IsWritable() - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::IsWritable: =>" ); - VMBLOGSTRING( "VMBX: CVmbxSimHandler::IsWritable: <=" ); - return iPbkStore->IsWritable(); - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::PhoneBookType -// Returns Sim file type -// --------------------------------------------------------------------------- -// -TVmbxSimPhonebookType CVmbxSimHandler::PhoneBookType() - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::PhoneBookType =>" ); - VMBLOGSTRING( "VMBX: CVmbxSimHandler::PhoneBookType <=" ); - return iPbkStore->PhoneBookType(); - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::NotifyStoreEvent -// Notify phonebook store evnet -// --------------------------------------------------------------------------- -// -void CVmbxSimHandler::NotifyStoreEvent( TRequestStatus& aStatus, - TUint32& aEvent, - TInt& aIndex ) const - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::NotifyStoreEvent: =>" ); - iPbkStore->PhonebookStore().NotifyStoreEvent( aStatus, aEvent, aIndex ); - VMBLOGSTRING( "VMBX: CVmbxSimHandler::NotifyStoreEvent: <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxSimHandler::CancelAsyncRequest -// Cancel phonebook store oberseved -// --------------------------------------------------------------------------- -// -void CVmbxSimHandler::CancelAsyncRequest( TInt aReqToCancel ) const - { - VMBLOGSTRING( "VMBX: CVmbxSimHandler::CancelAsyncRequest: =>" ); - iPbkStore->PhonebookStore().CancelAsyncRequest( aReqToCancel ); - VMBLOGSTRING( "VMBX: CVmbxSimHandler::CancelAsyncRequest: <=" ); - } - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxsimstoreobserver.cpp --- a/vmbx/vmbxengine/src/vmbxsimstoreobserver.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +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: Implementation of CVmbxSimStoreObserver class. -* -*/ - -// INCLUDE FILES -#include -#include "vmbxsimstoreobserver.h" -#include "vmbxsimhandler.h" -#include "vmbxlogger.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CVmbxSimStoreObserver::CVmbxSimStoreObserver -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CVmbxSimStoreObserver::CVmbxSimStoreObserver( CVmbxSimHandler& aSimHandler, - MVmbxSimStoreObserver& aObserver ) - : CActive( EPriorityStandard ), - iSimHandler( aSimHandler ), - iObserver( aObserver ) - { - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::CVmbxSimStoreObserver =>" ); - CActiveScheduler::Add( this ); - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::CVmbxSimStoreObserver <=" ); - } - -// ----------------------------------------------------------------------------- -// CVmbxSimStoreObserver::~CVmbxSimStoreObserver -// Destructor -// ----------------------------------------------------------------------------- -// -CVmbxSimStoreObserver::~CVmbxSimStoreObserver() - { - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::~CVmbxSimStoreObserver =>" ); - Cancel(); - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::~CVmbxSimStoreObserver <=" ); - } - -// ----------------------------------------------------------------------------- -// CVmbxSimStoreObserver::NewL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -CVmbxSimStoreObserver* CVmbxSimStoreObserver::NewL( - CVmbxSimHandler& aSimHandler, MVmbxSimStoreObserver& aObserver ) - { - VMBLOGSTRING( "VMBX: CVmbxSimStoreObserver::NewL =>" ); - CVmbxSimStoreObserver* self = - new( ELeave ) CVmbxSimStoreObserver( aSimHandler, aObserver ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxSimStoreObserver::NewL <=" ); - return self; - } - -// ----------------------------------------------------------------------------- -// CVmbxSimStoreObserver::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CVmbxSimStoreObserver::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxSimStoreObserver::ConstructL =>" ); - ActivateL(); - VMBLOGSTRING( "VMBX: CVmbxSimStoreObserver::ConstructL <=" ); - } - -// ----------------------------------------------------------------------------- -// CVmbxSimStoreObserver::Activate -// -// ----------------------------------------------------------------------------- -// -void CVmbxSimStoreObserver::ActivateL() - { - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::ActivateL =>" ); - if ( !IsActive() ) - { - iSimHandler.NotifyStoreEvent( iStatus, iEvents, iIndex ); - SetActive(); - } - else - { - User::Leave( KErrInUse ); - } - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::ActivateL <=" ); - } - -// ----------------------------------------------------------------------------- -// CVmbxSimStoreObserver::RunL -// ----------------------------------------------------------------------------- -// -void CVmbxSimStoreObserver::RunL() - { - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::RunL =>" ); - // Activate the notication again - ActivateL(); - iObserver.HandleSimStoreChanged(); - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::RunL <=" ); - } - -// ----------------------------------------------------------------------------- -// CVmbxSimStoreObserver::DoCancel -// ----------------------------------------------------------------------------- -// -void CVmbxSimStoreObserver::DoCancel() - { - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::DoCancel =>" ); - if ( IsActive() ) - { - iSimHandler.CancelAsyncRequest( EMobilePhoneStoreNotifyStoreEvent ); - } - VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::DoCancel <=" ); - } - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxuihandler.cpp --- a/vmbx/vmbxengine/src/vmbxuihandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,197 +0,0 @@ -/* -* Copyright (c) 2009-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: -* -* -*/ - -// qt -#include -#include -#include -#include - -#include "vmbxqtuihandler.h" -#include "voicemailboxdefsinternal.h" -#include "vmbxuihandler.h" -#include "vmbxlogger.h" - -// ======== MEMBER FUNCTIONS ================================================== - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::NewL -// (Constructor). -// ---------------------------------------------------------------------------- -// -CVmbxUiHandler* CVmbxUiHandler::NewL() -{ - VMBLOGSTRING( "CVmbxUiHandler::CVmbxUiHandler" ) - CVmbxUiHandler* handler = new( ELeave ) CVmbxUiHandler(); - CleanupStack::PushL( handler ); - handler->ConstructL(); - CleanupStack::Pop( handler ); - VMBLOGSTRING( "CVmbxUiHandler::CVmbxUiHandler Exit" ) - return handler; -} - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::ConstructL -// (Constructor). -// ---------------------------------------------------------------------------- -// -void CVmbxUiHandler::ConstructL() -{ - VMBLOGSTRING( "CVmbxUiHandler::ConstructL" ) - if ( qApp ) - { - iHandler = new VmbxQtUiHandler; - } - else - { - User::Leave(KErrNotSupported); - } - VMBLOGSTRING( "CVmbxUiHandler::ConstructL Exit" ) -} - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::CVmbxUiHandler -// (Constructor). -// ---------------------------------------------------------------------------- -// -CVmbxUiHandler::CVmbxUiHandler() -{ - VMBLOGSTRING( "CVmbxUiHandler::CVmbxUiHandler" ) - VMBLOGSTRING( "CVmbxUiHandler::CVmbxUiHandler Exit" ) -} - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::~CVmbxUiHandler -// (Destructor). -// ---------------------------------------------------------------------------- -// -CVmbxUiHandler::~CVmbxUiHandler() -{ - VMBLOGSTRING( "CVmbxUiHandler::~CVmbxUiHandler" ) - delete iHandler; - VMBLOGSTRING( "CVmbxUiHandler::~CVmbxUiHandler Exit" ) -} - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::ShowVmbxQueryDialogL -// (Show query dialog). -// ---------------------------------------------------------------------------- -// -void CVmbxUiHandler::ShowVmbxQueryDialogL(const TVmbxType& aType, - TDes& aNumber, TInt& aResult) -{ - VMBLOGSTRING( "CVmbxUiHandler::ShowVmbxQueryDialog" ) - if ( iHandler ) - { - QString vmbxNumber; - if ( aNumber.Length() > 0 ) - { - vmbxNumber=QString::fromUtf16(aNumber.Ptr(), aNumber.Length()); - } - QT_TRYCATCH_LEAVING( - iHandler->showVmbxQueryDialog( aType, vmbxNumber, aResult )); - aNumber = vmbxNumber.utf16(); - VMBLOGSTRING2( "CVmbxUiHandler::ShowVmbxQueryDialogL:\ - aNumber = %S", &aNumber ); - } - VMBLOGSTRING( "CVmbxUiHandler::ShowVmbxQueryDialogL Exit" ) -} - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::ShowDefineSelectionDialogL -// (Show define slection dialog). -// ---------------------------------------------------------------------------- -// -void CVmbxUiHandler::ShowDefineSelectionDialogL( TVmbxType& aType, - TInt& aResult ) -{ - VMBLOGSTRING( "CVmbxUiHandler::ShowDefineSelectionDialog" ) - if ( iHandler ) - { - QT_TRYCATCH_LEAVING(iHandler->showDefineSelectionDialog( aType, aResult )); - VMBLOGSTRING2( "CVmbxUiHandler::ShowDefineSelectionDialogL:\ - aType = %d", aType ); - VMBLOGSTRING2( "CVmbxUiHandler::ShowDefineSelectionDialogL:\ - aResult = %d", aResult ); - } - VMBLOGSTRING( "CVmbxUiHandler::ShowDefineSelectionDialogL Exit" ) - -} - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::ShowCallSelectionDialogL -// (Show call selection dialog). -// ---------------------------------------------------------------------------- -// -void CVmbxUiHandler::ShowCallSelectionDialogL( - const RPointerArray& aArray, - TVoiceMailboxParams& aParams, TInt& aResult ) -{ - VMBLOGSTRING( "CVmbxUiHandler::ShowCallSelectionDialogL" ) - if ( iHandler ) - { - TInt count = aArray.Count(); - VMBLOGSTRING2("CVmbxUiHandler::showCallSelectionDialogL count = %d", - count) - if (count < 1) - { - VMBLOGSTRING("CVmbxUiHandler::showCallSelectionDialogL leave<=") - User::Leave(KErrArgument); - } - QList entryList; - for ( int i = 0; i < aArray.Count(); i++ ) - { - entryList.append(aArray[i]); - } - QT_TRYCATCH_LEAVING( - iHandler->showCallSelectionDialog( entryList, aParams, aResult )); - VMBLOGSTRING2( "CVmbxUiHandler::ShowCallSelectionDialogL:\ - aResult = %d", aResult ); - } - VMBLOGSTRING( "CVmbxUiHandler::ShowCallSelectionDialogL" ) -} - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::ShowInformationdNoteL -// ---------------------------------------------------------------------------- -// -void CVmbxUiHandler::ShowInformationdNoteL(const TVmbxNoteType aType) -{ - VMBLOGSTRING( "CVmbxUiHandler::ShowInformationdNoteL" ) - if ( iHandler ) - { - QT_TRYCATCH_LEAVING(iHandler->showInformationNote(aType)); - } - VMBLOGSTRING( "CVmbxUiHandler::ShowInformationdNoteL Exit" ) -} - -// ---------------------------------------------------------------------------- -// CVmbxUiHandler::ShowInvalidWarningNoteL -// ---------------------------------------------------------------------------- -// -void CVmbxUiHandler::ShowInvalidWarningNoteL() -{ - VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidWarningNoteL" ) - if ( iHandler ) - { - QT_TRYCATCH_LEAVING(iHandler->showInformationNote( EInvalidNumber )); - } - VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidWarningNoteL Exit" ) -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxuiutilities.cpp --- a/vmbx/vmbxengine/src/vmbxuiutilities.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,309 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the VmbxUtilities class -* -*/ - - -// INCLUDE FILES -#include - -#include "voicemailboxdefsinternal.h" -#include "vmbxutilities.h" -#include "vmbxlogger.h" -#include "vmbxuiutilities.h" -#include "vmbxuihandler.h" - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// VmbxUtilities::CVmbxUiUtilities -// C++ default constructor can NOT contain any code -// --------------------------------------------------------------------------- -CVmbxUiUtilities::CVmbxUiUtilities() - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::CVmbxUiUtilities <=>" ); - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::~CVmbxUiUtilities -// Destructor -// --------------------------------------------------------------------------- -CVmbxUiUtilities::~CVmbxUiUtilities() - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::~CVmbxUiUtilities =>" ); - delete iUiHandler; - //If there are still dialog is running, The dialogs should be dismissed. - //The leave will be ignored as the CVmbxUiUtilities is distructing - TRAP_IGNORE( DismissDialogL() ); - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::~CVmbxUiUtilities <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxUiUtilities* CVmbxUiUtilities::NewL() - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::NewL =>" ); - CVmbxUiUtilities* vmbx = new( ELeave )CVmbxUiUtilities(); - CleanupStack::PushL( vmbx ); - vmbx->ConstructL(); - CleanupStack::Pop( vmbx ); - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::NewL <=" ); - return vmbx; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::ConstructL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -void CVmbxUiUtilities::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ConstructL =>" ); - // create resource handler - TRAP_IGNORE(iUiHandler = CVmbxUiHandler::NewL()); - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::ShowQuery -// Show query -// --------------------------------------------------------------------------- -// -void CVmbxUiUtilities::ShowQueryL( const TVmbxType& aType, - const TVmbxQueryMode & aMode, TDes& aNumber ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryL =>" ); - VMBLOGSTRING3( "VMBX: CVmbxUiUtilities::ShowQueryL: aMode=%d aNumber=%S ", - aMode, &aNumber ); - if ( !iUiHandler ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryL no qt env Exit" ) - User::Leave(KErrNotSupported); - } - - // Show "define mailbox number" notification at define mode - if (EVmbxDefineMode == aMode) { - switch( aType ) { - case EVmbxVoice: - ShowInformationdNoteL(EDefineVoiceNumber); - break; - case EVmbxVideo: - ShowInformationdNoteL(EDefineVideoNumber); - break; - default: - break; - } - } - - TInt result( KErrNone ); - FOREVER - { - ShowQueryDialogL( aType, aMode, aNumber, result ); - if ( KErrCancel == result ) - { - break; - } - - if ( KErrNone == result ) - { - if ( aNumber.Length() ) - { - // Convert back to western digits - // check the given number here (emergency numbers not allowed) - if ( VmbxUtilities::IsValidPhoneNumber( aNumber ) - && !VmbxUtilities::IsEmergencyNumber( aNumber ) ) - { - break; - }// valid number - else - { - //invalid dialog - ShowInvalidWarningDialogL(); - continue; - }// invalid number - } - else - { - result = KErrNone; - break; - }// number NULL - } - }// End FOREVER - VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryL: result=%I ", result ); - User::LeaveIfError( result ); - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryL <=" ); - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::ShowInformationdNote -// -// --------------------------------------------------------------------------- -// -void CVmbxUiUtilities::ShowInformationdNoteL(const TVmbxNoteType aType ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInformationdNoteL =>" ); - if ( iUiHandler ) - { - iUiHandler->ShowInformationdNoteL( aType ); - } - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInformationdNoteL <=" ); - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::ShowDefineSelectionDialogL -// Show define number in selection list -// --------------------------------------------------------------------------- -// -void CVmbxUiUtilities::ShowDefineSelectionDialogL( TVmbxType& aType, - TInt& aResult ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowDefineSelectionDialogL =>" ); - if (!iUiHandler ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowDefineSelectionDialogL\ - no qt env Exit" ) - User::Leave(KErrNotSupported); - } - iUiHandler->ShowDefineSelectionDialogL( aType, aResult ); - VMBLOGSTRING3( "VMBX: CVmbxUiUtilities::ShowDefineSelectionDialogL: \ - aType=%I, aResult=%I <=", aType, aResult ); - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowDefineSelectionDialogL <=" ); - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::ShowCallSelectionDialogL -// Show call number in selection list -// --------------------------------------------------------------------------- -// -void CVmbxUiUtilities::ShowCallSelectionDialogL( - const RPointerArray& aArray, - TVoiceMailboxParams& aParams, - TInt& aResult ) - { - VMBLOGSTRING("VMBX: CVmbxUiUtilities::ShowCallSelectionDialogL =>"); - if (!iUiHandler) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowCallSelectionDialogL\ - no qt env Exit" ) - User::Leave(KErrNotSupported); - } - if ( aArray.Count() < 1 ) - { - User::Leave( KErrArgument ); - } - iUiHandler->ShowCallSelectionDialogL( aArray, aParams, aResult ); - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowCallSelectionDialogL <=" ); - } - -// -------------------------------------------------------------------------- -// CVmbxUiUtilities::ShowNotAllowedEditingDialogL -// -------------------------------------------------------------------------- -// -void CVmbxUiUtilities::ShowNotAllowedEditingDialogL() - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowNotAllowedEditingDialogL =>" ); - // Information user can't edit. - if ( iUiHandler) - { - iUiHandler->ShowInformationdNoteL( ENotAllowUserEditing ); - } - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowNotAllowedEditingDialogL <=" ); - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::ShowInvalidWarningDialogL -// -// --------------------------------------------------------------------------- -// -void CVmbxUiUtilities::ShowInvalidWarningDialogL() - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInvalidWarningDialogL =>" ); - if ( iUiHandler) - { - iUiHandler->ShowInformationdNoteL( EInvalidNumber ); - } - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInvalidWarningDialogL <=" ); - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::DismissDialogL -// Tries to close all open dialogs -// --------------------------------------------------------------------------- -// -void CVmbxUiUtilities::DismissDialogL() - { - VMBLOGSTRING( - "VMBX: CVmbxUiUtilities::DismissDialogL EMPTY IMPLEMENTATION!=>" ); - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::DismissDialogL <=" ); - } - -// Commented out because branding is not supported yet. -// --------------------------------------------------------------------------- -// CVmbxUiUtilities::GetVmbxImageL -// -// --------------------------------------------------------------------------- -/* -CGulIcon* CVmbxUiUtilities::GetVmbxImageL( - const TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::GetVmbxImageL" ); -*/ - -// --------------------------------------------------------------------------- -// VmbxUtilities::ShowQueryDialogL -// Show query dialog -// --------------------------------------------------------------------------- -// -void CVmbxUiUtilities::ShowQueryDialogL( const TVmbxType& aType, - const TVmbxQueryMode& /*aMode*/, - TDes& aNumber, TInt& aResult ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryDialogL =>" ); - - if( EVmbxVideo != aType && EVmbxVoice != aType ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: \ - User::Leave( KErrNotSupported )" ); - User::Leave( KErrArgument ); - } - VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: in\ - aNumber = %S", &aNumber ); - // to show dialog via qt part - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryDialogL to show qt" ); - iUiHandler->ShowVmbxQueryDialogL( aType, aNumber, aResult ); - VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: out\ - aNumber = %S", &aNumber ); - VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: aResult=%I <=", - aResult ); - } - -// ----------------------------------------------------------------------------- -// CVmbxUiUtilities::FetchNumberFromPhonebook2L -// Create and show Phonebook's Single Fetch Dialog -// ----------------------------------------------------------------------------- -// -void CVmbxUiUtilities::FetchNumberFromPhonebook2L( - TDes& /*aPhoneNumber*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::FetchNumberFromPhonebook2L =>" ); - /* TODO: Later remove this or replace with some Qt Phonebook API - */ - VMBLOGSTRING( "VMBX: CVmbxUiUtilities::FetchNumberFromPhonebook2L <=" ); - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxutilities.cpp --- a/vmbx/vmbxengine/src/vmbxutilities.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the VmbxUtilities class -* -*/ - - -// INCLUDE FILES -#include -#include // ALS changes - -#include "vmbxlogger.h" -#include "vmbxcenrephandler.h" -#include "vmbxemergencycall.h" -#include "vmbxutilities.h" -#include "voicemailboxdefsinternal.h" - -// CONSTANTS -const TInt KVmbxPhoneNumMinLength = 2; -const TInt KVmbxPhoneNumMaxLength = 40; - -_LIT( KAllowedTelNumChars, "0123456789" ); - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// VmbxUtilities::IsValidPhoneNumber -// Validates phone number -// --------------------------------------------------------------------------- -// -TBool VmbxUtilities::IsValidPhoneNumber( const TDesC& aNumber ) - { - VMBLOGSTRING( "VMBX: VmbxUtilities::IsValidPhoneNumber: =>" ); - TBool result( EFalse ); - if ( KVmbxPhoneNumMinLength < aNumber.Length() - && KVmbxPhoneCharMaxLength >= aNumber.Length() ) - { - VMBLOGSTRING2( "VMBX: VmbxUtilities::IsValidPhoneNumber: aNumber %S", - &aNumber ); - TLex lexer( aNumber ); - lexer.SkipSpace(); - TChar current = lexer.Peek(); - // If no SS code then consider this is valid and return true. - if ( '*' == current ) - { - // check whether accord ss regulation, - lexer.Inc(); // Skip first * - } - result = ValidateTelNum( lexer ); - // If zero length then consider as valid and return value of - // result, If not the end of the string, check if it's DTMF numbers - if ( !lexer.Eos() && result ) - { - result = ValdateDtmfPart( lexer ); - } - } - VMBLOGSTRING2( "VMBX: VmbxUtilities::IsValidPhoneNumber: result = %d<=", - result ); - return result; - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::AlsLine -// -// --------------------------------------------------------------------------- -// -TVmbxAlsLineType VmbxUtilities::AlsLine() - { - VMBLOGSTRING( "VMBX: VmbxUtilities::AlsLine: =>" ); - TInt ssLine( ESSSettingsAlsNotSupported ); - TVmbxAlsLineType alsLine( EVmbxAlsLineDefault ); - RSSSettings ssSettings; - TInt res = ssSettings.Open(); - if( KErrNone == res ) - { - res = ssSettings.Get( ESSSettingsAls, ssLine ); - if( KErrNone == res ) - { - if ( ESSSettingsAlsAlternate == ssLine ) - { - alsLine = EVmbxAlsLine2; - } - else if ( ESSSettingsAlsPrimary == ssLine ) - { - alsLine = EVmbxAlsLine1; - } - } - } - ssSettings.Close(); - VMBLOGSTRING2( "VMBX: VmbxUtilities::AlsLine: alsLine=%I <=", - alsLine ); - return alsLine; - } - -// --------------------------------------------------------------------------- -// CVmbxUiUtilities::VideoSupported -// -// --------------------------------------------------------------------------- -// -TBool VmbxUtilities::VideoSupported() - { - VMBLOGSTRING( "VMBX: VmbxUtilities::VideoSupported: =>" ); - TBool result( EFalse ); - - if ( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) ) - { - CVmbxCenRepHandler* cenRepHandler( NULL ); - // TRAP_IGNORE for no leave function - TRAP_IGNORE( cenRepHandler = CVmbxCenRepHandler::NewL() ); - if ( cenRepHandler ) - { - result = cenRepHandler->VideoSupported(); - } - delete cenRepHandler; - cenRepHandler = NULL; - } - VMBLOGSTRING2( "VMBX: VmbxUtilities::VideoSupported: %d <=", result ); - return result; - } - -// --------------------------------------------------------------------------- -// VmbxUtilities::IsEmergencyNumber -// Verifies if the given number is an emergency number -// --------------------------------------------------------------------------- -// -TBool VmbxUtilities::IsEmergencyNumber( const TDesC& aNumber ) - { - VMBLOGSTRING( "VMBX: VmbxUtilities::IsEmergencyNumber: =>" ); - TBool result( EFalse ); - CVmbxEmergencyCall* emergencyCall( NULL ); - // TRAP_IGNORE for no leave function - TRAP_IGNORE( emergencyCall = CVmbxEmergencyCall::NewL() ); - if ( emergencyCall ) - { - result = emergencyCall->IsEmergencyNumber( aNumber ); - } - delete emergencyCall; - emergencyCall = NULL; - VMBLOGSTRING2( "VMBX: VmbxUtilities::IsEmergencyNumber: result%d <=", - result); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxUiUtilities::VoIPSupported -// -// --------------------------------------------------------------------------- -// -TBool VmbxUtilities::VoIPSupported() - { - VMBLOGSTRING( "VMBX: VmbxUtilities::VoIPSupported: <=>" ); - return FeatureManager::FeatureSupported( KFeatureIdCommonVoip ); - } - -// ----------------------------------------------------------------------------- -// VmbxUtilities::ValidateTelNum -// Parses string until end or invalid tel number character is found. -// Check number length. -// ----------------------------------------------------------------------------- -// -TBool VmbxUtilities::ValidateTelNum( TLex& aLexer ) - { - VMBLOGSTRING( "VMBX: VmbxUtilities::ValidateTelNum: =>" ); - TBool result( ETrue ); - - // Skip country code prefix '+' - if ( '+' == aLexer.Peek() ) - { - aLexer.Inc(); // Skip country code separator - } - - TInt telNumDigits( 0 ); - TBool invalidCharFound( EFalse ); - // Parse until invalid telnumber char found - while ( !aLexer.Eos() && !invalidCharFound ) - { - const TChar nextChar = aLexer.Peek(); - // Check validSS chars - if ( KErrNotFound == KAllowedTelNumChars().Locate( nextChar ) ) - { - // Invalid char found so string before it is the tel number part - invalidCharFound = ETrue; - } - else - { - aLexer.Inc(); - telNumDigits++; - } - } - - VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateTelNum:\ - telNumDigits %d", telNumDigits ); - // digitlength <3 or digit length>40, invalid telnumber - if ( KVmbxPhoneNumMinLength >= telNumDigits - || KVmbxPhoneNumMaxLength < telNumDigits - ) - { - result = EFalse; - } - VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateTelNum:\ - result %d<=", result ); - return result; - } - -// ----------------------------------------------------------------------------- -// VmbxUtilities::ValdateDtmfPart -// Parse string until end and validate for allowed characters. -// ----------------------------------------------------------------------------- -// -TBool VmbxUtilities::ValdateDtmfPart( TLex& aLexer ) - { - VMBLOGSTRING( "VMBX: VmbxUtilities::ValdateDtmfPart: =>" ); - // DTMF string consists of following three parts: - // the first part of the string is a phone number, - // the second part of the string a DTMF special character (p, w or +), - // the last third part is an actual DTMF tone string, which is sent to the - // remote end. - TBool result( EFalse ); - // check the second part of the string - const TChar nextChar = aLexer.Peek(); - // Check DTMF number discover or not - if ( 'p' == nextChar || 'P' == nextChar - || 'w'== nextChar || 'W' == nextChar || '+' == nextChar ) - { - // After DTMF char, is tone string, there is no specfic rule about tone string, - // so just do a simple check. - result = ETrue; - VMBLOGSTRING( "VMBX: VmbxUtilities::ValdateDtmfPart DtmfNumberDiscover" ); - } - VMBLOGSTRING2( "VMBX: VmbxUtilities::ValdateDtmfPart: result = %d<=", - result ); - return result; - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmbxvoipengine.cpp --- a/vmbx/vmbxengine/src/vmbxvoipengine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,325 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the CVmbxVoIpEngine class -* -*/ - -// INCLUDE FILES -#include -#include - -#include "vmbxenginebase.h" -#include "vmbxlogger.h" -#include "vmbxuiutilities.h" -#include "vmbxutilities.h" -#include "vmspshandler.h" -#include "vmbshandler.h" -#include "voicemailboxdefsinternal.h" -#include "vmbxvoipengine.h" - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::CVmbxVoIpEngine -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVmbxVoIpEngine::CVmbxVoIpEngine( MVmbxResourceProvider& aProvider ) - : CVmbxEngineBase( aProvider ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::CVmbxVoIpEngine =>" ); - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::CVmbxVoIpEngine <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::~CVmbxVoIpEngine -// Destructor. -// --------------------------------------------------------------------------- -// -CVmbxVoIpEngine::~CVmbxVoIpEngine() - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::~CVmbxVoIpEngine =>" ); - delete iVmSpsHandler; - delete iVmBsHandler; - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::~CVmbxVoIpEngine <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmbxVoIpEngine* CVmbxVoIpEngine::NewL( MVmbxResourceProvider& aProvider) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::NewL =>" ); - if ( !VmbxUtilities::VoIPSupported() ) - { - User::Leave( KErrNotSupported ); - } - - CVmbxVoIpEngine* self = new( ELeave ) CVmbxVoIpEngine( aProvider ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmbxVoIpEngine::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::ConstructL =>" ); - if ( VmbxUtilities::VoIPSupported() ) - { - iVmSpsHandler = CVmSPSHandler::NewL(); - } - - iVmBsHandler = CVmBSHandler::NewL(); - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::GetL -// Gets voice mailbox number -// --------------------------------------------------------------------------- -// -void CVmbxVoIpEngine::GetL( CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetL =>" ); - TInt result( KErrNone ); - CVoiceMailboxEntry* vmbxEntry = CVoiceMailboxEntry::NewLC(); - - vmbxEntry->SetVoiceMailboxType( EVmbxVoip ); - vmbxEntry->SetServiceId( iVmbxServiceId ); - - HBufC8* brandId = HBufC8::NewLC( KSPMaxDesLength ); - TPtr8 ptr( brandId->Des() ); - BrandIdL( iVmbxServiceId, ptr ); - // set brand id - result = vmbxEntry->SetBrandId( ptr ); - CleanupStack::PopAndDestroy( brandId ); - if ( KErrNone == result ) - { - TVmbxServiceInfo serviceInfo; - serviceInfo.iServiceId = iVmbxServiceId; - result = GetServiceInfo( serviceInfo ); - if ( KErrNone == result ) - { - // set voip name - result = vmbxEntry->SetVmbxName( serviceInfo.iName ); - if ( KErrNone == result ) - { - // set voip address - result = vmbxEntry->SetVmbxNumber( serviceInfo.iAddress ); - } - } - } - VMBLOGSTRING2( "VMBX: CVmbxVoIpEngine::GetL: result=%I", result ); - User::LeaveIfError( result ); - CleanupStack::Pop( vmbxEntry ); - aEntry = vmbxEntry; - vmbxEntry = NULL; - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::SaveL -// Saves voice mailbox number -// --------------------------------------------------------------------------- -// -void CVmbxVoIpEngine::SaveL( const CVoiceMailboxEntry& /*aEntry*/, - TBool /*aShowNotesAllowed*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::SaveL <=>" ); - User::Leave( KErrNotSupported ); - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::SaveProvisionedEntryL -// Saves Provisioned voice mailbox number -// --------------------------------------------------------------------------- -// -void CVmbxVoIpEngine::SaveProvisionedEntryL( - const CVoiceMailboxEntry& /*aEntry*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::SaveProvisionedEntryL <=>" ); - User::Leave( KErrNotSupported ); - } - -// ---------------------------------------------------------------------------- -// CVmbxVoIpEngine::CheckConfiguration() -// ---------------------------------------------------------------------------- -// -TBool CVmbxVoIpEngine::CheckConfiguration( - const TVoiceMailboxParams& aParams, const TInt aFlags ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::CheckConfiguration: =>" ); - TBool result( EFalse ); - result = CVmbxEngineBase::CheckConfiguration(aParams, aFlags); - VMBLOGSTRING2( "VMBX: CVmbxVoIpEngine::CheckConfiguration: result%I <=", - result ); - return result; - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::QueryDefineNumberL -// -// --------------------------------------------------------------------------- -// -void CVmbxVoIpEngine::QueryDefineNumberL( CVoiceMailboxEntry& /*aEntry*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::QueryDefineNumberL <=>" ); - User::Leave( KErrNotSupported ); - } - -// ---------------------------------------------------------------------------- -// CVmbxEngineBase::QueryChangeNumberL -// -// ---------------------------------------------------------------------------- -// -void CVmbxVoIpEngine::QueryChangeNumberL( CVoiceMailboxEntry& /*aEntry*/ ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::QueryChangeNumberL <=>" ); - User::Leave( KErrNotSupported ); - } - -// Commented out because branding is not supported yet. -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::GetVmbxImageL -// -// --------------------------------------------------------------------------- -// -/* CGulIcon* CVmbxVoIpEngine::GetVmbxImageL( const TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL =>" ); - CGulIcon* guiIcon( NULL ); - if ( IsVoIPProfilesFound() ) - { - TBuf8 brandId( KNullDesC8 ); - BrandIdL(aParams.iServiceId, brandId ); - - CFbsBitmap* brandedBitmap( NULL ); - CFbsBitmap* brandedBitmapMask( NULL ); - TRAPD( err, GetBrandedIconL( - brandId, brandedBitmap, brandedBitmapMask ) ); - - if ( KErrNotFound == err ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL: \ - no found profiles<= " ); - guiIcon = iProvider.VmbxUiUtilities().GetVmbxImageL( aParams ); - } - else if ( KErrNone == err ) - { - guiIcon = - CGulIcon::NewL( brandedBitmap, brandedBitmapMask ); - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL: \ - found profiles" ); - } - } - else - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL: use default " ); - guiIcon = iProvider.VmbxUiUtilities().GetVmbxImageL( aParams ); - } - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL <=" ); - return guiIcon; - } */ - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::IsVoIPProfilesFound -// -// --------------------------------------------------------------------------- -// -TBool CVmbxVoIpEngine::IsVoIPProfilesFound() - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::IsVoIPProfilesFound <=>" ); - return iVmSpsHandler->IsVoIPProfilesFound(); - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::GetServiceIds -// -// --------------------------------------------------------------------------- -// -void CVmbxVoIpEngine::GetServiceIdsL( RIdArray& aProfileIds ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetServiceIds: =>" ); - if ( VmbxUtilities::VoIPSupported() && IsVoIPProfilesFound() ) - { - iVmSpsHandler->GetServiceIdsL( aProfileIds ); - } - else - { - User::Leave( KErrNotFound ); - } - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetServiceIds: <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::GetBrandedIconL -// -// --------------------------------------------------------------------------- -// -/* void CVmbxVoIpEngine::GetBrandedIconL( const TDesC8& aBrandingId, - CFbsBitmap*& aBrandedBitmap, CFbsBitmap*& aBrandedBitmapMask ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetBrandedIconL: =>" ); - - iVmBsHandler->GetBrandedIconL( - aBrandingId, aBrandedBitmap, aBrandedBitmapMask ); - - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetBrandedIconL: <=" ); - } - */ -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::BrandIdL -// -// --------------------------------------------------------------------------- -// -void CVmbxVoIpEngine::BrandIdL( TInt aServiceId, TDes8& aBrandId ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::BrandIdL: =>" ); - - if ( VmbxUtilities::VoIPSupported() ) - { - iVmSpsHandler->BrandIdL( aServiceId, aBrandId ); - } - - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::BrandIdL: <=" ); - } - -// --------------------------------------------------------------------------- -// CVmbxVoIpEngine::GetServiceInfo -// -// --------------------------------------------------------------------------- -// -TInt CVmbxVoIpEngine::GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) - { - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetServiceInfo: =>" ); - TInt ret( KErrNotFound ); - if ( VmbxUtilities::VoIPSupported() ) - { - ret = iVmSpsHandler->GetServiceInfo( aServiceInfo ); - } - VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetServiceInfo: <=" ); - return ret; - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmsettingsuiiconfileprovider.cpp --- a/vmbx/vmbxengine/src/vmsettingsuiiconfileprovider.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2007-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: Implementation of CVmSettingsUiIconFileProvider class. -* -*/ - -#include "vmbxlogger.h" -#include "vmsettingsuiiconfileprovider.h" - -// ================= MEMBER FUNCTIONS ========================================== - -// ----------------------------------------------------------------------------- -// CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider -// -// ----------------------------------------------------------------------------- -// -CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider() - { - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider <=>" ); - } - -// ----------------------------------------------------------------------------- -// CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider -// -// ----------------------------------------------------------------------------- -// -CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider() - { - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider <=" ); - iFile.Close(); - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider =>" ); - } - -// ----------------------------------------------------------------------------- -// CVmSettingsUiIconFileProvider::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CVmSettingsUiIconFileProvider::ConstructL( RFile& aFile ) - { - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::ConstructL <=" ); - User::LeaveIfError( iFile.Duplicate( aFile ) ); - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::ConstructL =>" ); - } - -// ---------------------------------------------------------------------------- -// CVmSettingsUiIconFileProvider::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CVmSettingsUiIconFileProvider* CVmSettingsUiIconFileProvider::NewL( - RFile& aFile ) - { - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::NewL <=" ); - CVmSettingsUiIconFileProvider* self = - new ( ELeave ) CVmSettingsUiIconFileProvider(); - CleanupStack::PushL( self ); - self->ConstructL( aFile ); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::NewL =>" ); - return self; - } - -// --------------------------------------------------------------------------- -// From MAknIconFileProvider -// -// --------------------------------------------------------------------------- -// -void CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL( - RFile& aFile, const TIconFileType /*aType*/ ) - { - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL <=" ); - // duplicate the file's handle - User::LeaveIfError( aFile.Duplicate( iFile ) ); - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL =>" ); - } - -// --------------------------------------------------------------------------- -// From MAknIconFileProvider -// -// --------------------------------------------------------------------------- -// -void CVmSettingsUiIconFileProvider::Finished() - { - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::Finished <=" ); - delete this; - VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::Finished =>" ); - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/vmspshandler.cpp --- a/vmbx/vmbxengine/src/vmspshandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,432 +0,0 @@ -/* -* Copyright (c) 2007-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: Implementation of CVmSPSHandler class. -* -*/ - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include "vmspshandler.h" -#include "voicemailboxdefsinternal.h" - -#include "vmbxlogger.h" - - -// CONSTANTS -/** Maximum length of descriptor data */ -const TInt KVmbxMaxDesLength = 512; - - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVmSPSHandler::CVmSPSHandler -// C++ default constructor can NOT contain any code, that might leave. -// --------------------------------------------------------------------------- -// -CVmSPSHandler::CVmSPSHandler() - { - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::ConstructL -// Symbian 2nd phase constructor can leave. -// --------------------------------------------------------------------------- -// -void CVmSPSHandler::ConstructL() - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::ConstructL =>" ); - iSettings = CSPSettings::NewL(); - iSpsSettingsVoipUtils = CSPSettingsVoIPUtils::NewL(); - - iNotifier = CSPNotifyChange::NewL( *this ); - - // Subscribe to service change notifies - // Empty array so that new services will be notified also - RIdArray array; - CleanupClosePushL( array ); - // Commented out because voip is not supported yet. - //iNotifier->NotifyChangeL( iServiceIds ); - iNotifier->NotifyChangeL( array ); - CleanupStack::PopAndDestroy( &array ); - VMBLOGSTRING( "VMBX: CVmSPSHandler::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmSPSHandler* CVmSPSHandler::NewL( ) - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::NewL =>" ); - CVmSPSHandler* self = CVmSPSHandler::NewLC(); - CleanupStack::Pop( self ); - VMBLOGSTRING( "VMBX: CVmSPSHandler::NewL <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::NewLC -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVmSPSHandler* CVmSPSHandler::NewLC() - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::NewLC =>" ); - CVmSPSHandler* self = new (ELeave) CVmSPSHandler(); - CleanupStack::PushL( self ); - self->ConstructL(); - VMBLOGSTRING( "VMBX: CVmSPSHandler::NewLC <=" ); - return self; - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::~CVmSPSHandler -// Destructor -// --------------------------------------------------------------------------- -// -CVmSPSHandler::~CVmSPSHandler() - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::~CVmSPSHandler =>" ); - iObserver = NULL; - - if ( iNotifier ) - { - iNotifier->Cancel(); - delete iNotifier; - } - - delete iSettings; - - delete iSpsSettingsVoipUtils; - VMBLOGSTRING( "VMBX: CVmSPSHandler::~CVmSPSHandler <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::GetServiceIdsL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CVmSPSHandler::GetServiceIdsL( RArray& aServiceIds ) const - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceIdsL =>" ); - RArray serviceIds; - CleanupClosePushL( serviceIds ); - // Get all service Ids and.. - iSettings->FindServiceIdsL( serviceIds ); - // ..remove service if VMBX is not defined or if VMBX address is empty - for ( TInt i( 0 ); i < serviceIds.Count(); i++ ) - { - if ( IsVbmxSupportedL( serviceIds[ i ] ) ) - { - aServiceIds.Append( serviceIds[ i ] ); - } - } - - VMBLOGSTRING2( "VMBX: CVmSPSHandler::GetServiceIdsL: found %d \ - Voip mailbox services", serviceIds.Count() ); - - CleanupStack::PopAndDestroy( &serviceIds ); - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceIdsL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::IsVbmxSupportedL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -TBool CVmSPSHandler::IsVbmxSupportedL( TUint32 aServiceId ) const - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::IsVbmxSupportedL =>" ); - TBool supported( EFalse ); - // Get entry - CSPEntry* entry = CSPEntry::NewLC(); - iSettings->FindEntryL( aServiceId, *entry ); - - // Get all service properties a.k.a subservices - RPropertyArray properties; - properties = entry->GetAllProperties(); - - TServicePropertyName propertyName; - - for ( TInt i( 0 ); i < properties.Count() && !supported; i++ ) - { - propertyName = properties[ i ]->GetName(); - - supported = propertyName == EPropertyVMBXSubServicePluginId; - - if ( supported ) - { - TVmbxServiceInfo serviceInfo; - TRAPD( found, GetVmAddressL( aServiceId, serviceInfo.iAddress ) ); - - supported = KErrNotFound != found; - } - } - - CleanupStack::PopAndDestroy( entry ); - VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsVbmxSupportedL: %d<=", supported ); - return supported; - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::GetServiceInfo -// (other items were commented in a header). -// --------------------------------------------------------------------------- -TInt CVmSPSHandler::GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceInfo =>" ); - TInt ret( KErrNone ); - TRAP( ret, - { - GetServiceNameL( aServiceInfo.iServiceId, aServiceInfo.iName ); - - GetVmAddressL( aServiceInfo.iServiceId, aServiceInfo.iAddress ); - - TInt snap( 0 ); - GetSNAPIdL( aServiceInfo.iServiceId, snap ); - aServiceInfo.iSnapId = static_cast ( snap ); - } ); - - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceInfo <=" ); - return ret; - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::GetVmAddressL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CVmSPSHandler::GetVmAddressL( const TUint32 aServiceId, - TDes& aAddress ) const - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetVmAddressL =>" ); - RBuf buffer; - CleanupClosePushL( buffer ); - buffer.ReAllocL( KVmbxMaxDesLength ); - - CSPEntry* entry = CSPEntry::NewLC(); - const CSPProperty* property = NULL; - - iSettings->FindEntryL( aServiceId, *entry ); - - // Find correct subservice - TInt err = entry->GetProperty( property, ESubPropertyVMBXListenAddress ); - VMBLOGSTRING2( "VMBX: CVmSPSHandler::GetVmAddressL: err%d", err ); - User::LeaveIfError( err ); - - property->GetValue( buffer ); - buffer.Length() > aAddress.MaxLength() ? - User::Leave( KErrOverflow ) : aAddress.Copy( buffer ); - - CleanupStack::PopAndDestroy( entry ); - CleanupStack::PopAndDestroy( &buffer ); - - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetVmAddressL <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::GetServiceNameL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CVmSPSHandler::GetServiceNameL( const TUint32 aServiceId, - TDes& aName ) const - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: =>" ); - RBuf buffer; - CleanupClosePushL( buffer ); - buffer.ReAllocL( KVmbxMaxDesLength ); - - // Get entry - CSPEntry* entry = CSPEntry::NewLC(); - - iSettings->FindEntryL( aServiceId, *entry ); - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: 1" ); - // Read service id and service name - buffer.Copy( entry->GetServiceName() ); - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: 2" ); - buffer.Length() > aName.MaxLength() ? - User::Leave( KErrOverflow ) : aName.Copy( buffer ); - - CleanupStack::PopAndDestroy( entry ); - CleanupStack::PopAndDestroy( &buffer ); - - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::GetSNAPIdL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CVmSPSHandler::GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetSNAPIdL: =>" ); - CSPEntry* entry = CSPEntry::NewLC(); - const CSPProperty* property = NULL; - iSettings->FindEntryL( aServiceId, *entry ); - // Find correct subservice - TInt error( - entry->GetProperty( property, ESubPropertyVMBXPreferredSNAPId ) ); - VMBLOGSTRING2( "VMBX: CVmSPSHandler::GetSNAPIdL: error%d", error ); - - if ( KErrNotFound != error ) - { - property->GetValue( aSNAPId ); - } - - CleanupStack::PopAndDestroy( entry ); - VMBLOGSTRING( "VMBX: CVmSPSHandler::GetSNAPIdL: <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::BrandIdL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CVmSPSHandler::BrandIdL( TInt aServiceId, TDes8& aBrandId ) - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::BrandIdL: =>" ); - CSPEntry* entry = CSPEntry::NewLC(); - const CSPProperty* property = NULL;; - TBuf brandId( KNullDesC ); - - TInt err = iSettings->FindEntryL( aServiceId, *entry ); - VMBLOGSTRING2( "VMBX: CVmSPSHandler::BrandIdL: err%d", err ); - User::LeaveIfError( err ); - - err = entry->GetProperty( property, EPropertyBrandId ); - VMBLOGSTRING2( "VMBX: CVmSPSHandler::BrandIdL: err%d", err ); - User::LeaveIfError( err ); - - if ( property ) - { - property->GetValue( brandId ); - } - - if ( brandId.Length() ) - { - aBrandId.Copy( brandId ); - } - CleanupStack::PopAndDestroy( entry ); - VMBLOGSTRING( "VMBX: CVmSPSHandler::BrandIdL: <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::IsActivatedL -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -TBool CVmSPSHandler::IsActivatedL( TInt aServiceId ) - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::IsActivatedL: =>" ); - TBool enabled( EFalse ); - CSPEntry* entry = CSPEntry::NewLC(); - const CSPProperty* property = NULL; - - iSettings->FindEntryL( aServiceId, *entry ); - - // Find correct subservice - TInt error( - entry->GetProperty( property, ESubPropertyVMBXEnabled ) ); - - if ( KErrNotFound != error ) - { - TOnOff onOff( EOONotSet ); - property->GetValue( onOff ); - enabled = onOff == EOn; - } - - CleanupStack::PopAndDestroy( entry ); - - VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsActivatedL: %d", enabled ); - VMBLOGSTRING( "VMBX: CVmSPSHandler::IsActivatedL: <=" ); - return enabled; - } - -// ---------------------------------------------------------------------------- -// CVmSPSHandler::NotifyServiceChange -// (other items were commented in a header). -// ---------------------------------------------------------------------------- -// -void CVmSPSHandler::NotifyServiceChange( MServiceNotifyHandler* aHandler ) - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChange: =>" ); - iObserver = aHandler; - VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChange: <=" ); - } - -// ---------------------------------------------------------------------------- -// CVmSPSHandler::NotifyServiceChangeCancel -// (other items were commented in a header). -// ---------------------------------------------------------------------------- -// -void CVmSPSHandler::NotifyServiceChangeCancel() - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChangeCancel: =>" ); - iObserver = NULL; - VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChangeCancel: <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::HandleNotifyChange -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CVmSPSHandler::HandleNotifyChange( TServiceId /*ServiceId*/ ) - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::HandleNotifyChange: =>" ); - if ( iObserver ) - { - TRAP_IGNORE( iObserver->HandleServiceNotifyL() ); - } - VMBLOGSTRING( "VMBX: CVmSPSHandler::HandleNotifyChange: <=" ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::HandleError -// (other items were commented in a header). -// --------------------------------------------------------------------------- -// -void CVmSPSHandler::HandleError( TInt aError ) - { - // Avoid warning - aError = aError; - VMBLOGSTRING2( "VMBX: CVmSPSHandler::HandleError: aError %d", aError ); - } - -// --------------------------------------------------------------------------- -// CVmSPSHandler::IsVoIPProfilesFound -// -// --------------------------------------------------------------------------- -// -TBool CVmSPSHandler::IsVoIPProfilesFound() - { - VMBLOGSTRING( "VMBX: CVmSPSHandler::IsVoIPProfilesFound" ); - TBool ret( EFalse ); - if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) - { - TRAP_IGNORE( ret = iSpsSettingsVoipUtils->VoIPProfilesExistL() ); - } - VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsVoIPProfilesFound: return %I", ret ); - return ret; - } - -// End of File diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/src/voicemailboximpl.cpp --- a/vmbx/vmbxengine/src/voicemailboximpl.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,902 +0,0 @@ -/* -* Copyright (c) 2009-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: Implementation of the CVoiceMailboxImpl class -* -*/ - - -// INCLUDE FILES -#include -#include -#include "voicemailboxdefsinternal.h" - -#include "vmbxenginebase.h" -#include "vmbxuiutilities.h" -#include "vmbxenginefactory.h" -#include "vmbxobserver.h" -#include "vmbxlogger.h" -#include "vmbxutilities.h" -#include "vmbxcenrephandler.h" -#include "voicemailboximpl.h" - -// phone application uid -const TInt KPhoneApplicationUid = 0x100058B3; - -// ============================ MEMBER FUNCTIONS ============================= - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::NewL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVoiceMailboxImpl* CVoiceMailboxImpl::NewL() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NewL =>" ); - CVoiceMailboxImpl* vmbx = CVoiceMailboxImpl::NewLC(); - CleanupStack::Pop( vmbx ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NewL <=" ); - return vmbx; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::NewLC -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -CVoiceMailboxImpl* CVoiceMailboxImpl::NewLC() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NewLC =>" ); - CVoiceMailboxImpl* vmbx = new( ELeave ) CVoiceMailboxImpl(); - CleanupStack::PushL( vmbx ); - vmbx->ConstructL(); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NewLC <=" ); - return vmbx; - } -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::~CVoiceMailboxImpl -// Destructor -// --------------------------------------------------------------------------- -// -CVoiceMailboxImpl::~CVoiceMailboxImpl() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::~CVoiceMailboxImpl =>" ); - FeatureManager::UnInitializeLib(); - delete iUiUtilities; - delete iVmbxFactory; - delete iVmbxObserver; - delete iCenRepHandler; - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::~CVoiceMailboxImpl <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetStoredEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxImpl::GetStoredEntry( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetStoredEntry =>" ); - TRAPD( err, GetStoredEntryL( aParams, aEntry ) ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetStoredEntry: err%I <=", err ); - return err; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::SaveEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxImpl::SaveEntry( const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveEntry =>" ); - TRAPD( err, SaveEntryL( aEntry ) ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::SaveEntry: err%I <=", err ); - return err; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::QueryNewEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxImpl::QueryNewEntry( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryNewEntry =>" ); - TRAPD( err, QueryNewEntryL( aParams, aEntry ) ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryNewEntry err%I <=", - err ); - return err; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::QueryChangeEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxImpl::QueryChangeEntry( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryChangeEntry =>" ); - TRAPD( err, QueryChangeEntryL( aParams, aEntry ) ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryChangeEntry: err%I <=", - err ); - return err; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::QueryVmbxType -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxImpl::QueryVmbxType( TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxType =>" ); - TRAPD( err, QueryVmbxTypeL( aParams ) ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryVmbxType: err%I<=", err ); - return err; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::NotifyVmbxNumberChangeL -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::NotifyVmbxNumberChangeL( - MVoiceMailboxObserver& aObserver, - const TBool /*aNotifyOnActiveLineOnly*/ ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyVmbxNumberChangeL =>" ); - if ( !iNotifyCallBack ) - { - iNotifyCallBack = &aObserver; - iVmbxObserver = CVmbxObserver::NewL( *this ); - iVmbxObserver->SetVmbxObserver( *this ); - } - else - { - User::Leave( KErrInUse ); - } - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyVmbxNumberChangeL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::NotifyVmbxNumberChangeCancel -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::NotifyVmbxNumberChangeCancel() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyVmbxNumberChangeCancel =>" ); - iNotifyCallBack = NULL; - delete iVmbxObserver; - iVmbxObserver = NULL; - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyVmbxNumberChangeCancel <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::CheckConfiguration -// -// --------------------------------------------------------------------------- -// -TBool CVoiceMailboxImpl::CheckConfiguration( const TVoiceMailboxParams& aParams, - const TInt aFlags ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CheckConfiguration =>" ); - TBool configuration( EFalse ); - CVmbxEngineBase* vmbx = NULL; - TRAPD( res, iVmbxFactory->CreateEngineL( vmbx, aParams.iType ) ); - if ( KErrNone == res && vmbx ) - { - configuration = vmbx->CheckConfiguration( aParams, aFlags ); - } - delete vmbx; - vmbx = NULL; - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CheckConfiguration <=" ); - return configuration; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetServiceIds -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxImpl::GetServiceIds( RIdArray& aProfileIds ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetServiceIds =>" ); - TRAPD( err, GetServiceIdsL( aProfileIds ) ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetServiceIds: err%I <=", err ); - return err; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetVmbxImage -// -// --------------------------------------------------------------------------- -/* CGulIcon* CVoiceMailboxImpl::GetVmbxImage( - const TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImage =>" ); - CGulIcon* guiIcon( NULL ); - TRAPD( err, guiIcon = GetVmbxImageL( aParams ) ); - if ( KErrNone != err ) - { - delete guiIcon; - guiIcon = NULL; - } - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetVmbxImage: err%I <=", err ); - return guiIcon; - } */ - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetVmbxImages -// -// --------------------------------------------------------------------------- -// -/* CArrayPtr* CVoiceMailboxImpl::GetVmbxImages( - RArray& aParams ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImages =>" ); - CArrayPtr* guiIcons( NULL ); - TRAPD( err, guiIcons = GetVmbxImagesL( aParams ) ); - if ( KErrNone != err ) - { - if ( guiIcons ) - { - guiIcons->ResetAndDestroy(); - } - } - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetVmbxImages: err%I <=", err ); - return guiIcons; - } */ - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::SaveProvisionedEntry -// -// --------------------------------------------------------------------------- -// -TInt CVoiceMailboxImpl::SaveProvisionedEntry( - const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveProvisionedEntry =>" ); - TRAPD( err, SaveProvisionedEntryL( aEntry ) ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::SaveProvisionedEntry: err%I <=", - err ); - return err; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::SatRefreshL -// -// notify Sat Refresh -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::SatRefreshL() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SatRefreshL =>" ); - // notify sim file's entry changed - NotifyChangedL( EVmbxVoice ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SatRefreshL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::CenRepChangedL -// -// notify CenRep Changed -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::CenRepChangedL( TVmbxCenRepKey aId ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CenRepChangedL =>" ); - TVmbxAlsLineType alsLine = VmbxUtilities::AlsLine(); - if ( ( ( EVmbxVoiceLinePrimaryKey == aId - || EVmbxVideoLinePrimaryKey == aId ) // primary value changed - && EVmbxAlsLine2 != alsLine )// line 1 active or using default line - || ( ( EVmbxVoiceLineAlternateKey == aId - || EVmbxVideoLineAlternateKey == aId )// alternate value changed - && EVmbxAlsLine2 == alsLine ) )// line 2 active - { - if ( VmbxUtilities::VideoSupported() - && ( ( EVmbxVideoLinePrimaryKey == aId - || EVmbxVideoLineAlternateKey == aId ) ) ) - { - NotifyChangedL( EVmbxVideo ); - } - else - { - NotifyChangedL( EVmbxVoice ); - } - } - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CenRepChangedL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::SimStoreChangedL -// notify sim store changed -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::SimStoreChangedL() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SimStoreChangedL =>" ); - // notify sim file changed - NotifyChangedL( EVmbxVoice ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SimStoreChangedL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::CVoiceMailboxImpl -// C++ default constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------------------------- -// -CVoiceMailboxImpl::CVoiceMailboxImpl() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CVoiceMailboxImpl <=>" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::ConstructL -// Two-phased constructor. -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::ConstructL() - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::ConstructL =>" ); - FeatureManager::InitializeLibL(); - - // Create Ui utilities for dialog and images - iUiUtilities = CVmbxUiUtilities::NewL(); - // create CenRep - iCenRepHandler = CVmbxCenRepHandler::NewL(); - - // Create factory for voice/video/voip engine - iVmbxFactory = CVmbxEngineFactory::NewL( *this ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::ConstructL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetStoredEntryL -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::GetStoredEntryL( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) const - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetStoredEntryL =>" ); - CVoiceMailboxEntry* entry( NULL ); - CVmbxEngineBase* vmbxBox( NULL ); - iVmbxFactory->CreateEngineL( vmbxBox, aParams.iType ); - CleanupStack::PushL( vmbxBox ); - vmbxBox->GetL( entry ); - CleanupStack::PopAndDestroy( vmbxBox ); - aEntry = entry; - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetStoredEntryL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::SaveEntryL -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::SaveEntryL( const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveEntryL =>" ); - TVoiceMailboxParams params( aEntry ); - CVmbxEngineBase* vmbxBox( NULL ); - iVmbxFactory->CreateEngineL( vmbxBox, aEntry.VoiceMailboxType() ); - CleanupStack::PushL( vmbxBox ); - if ( vmbxBox->CheckConfiguration( params, EVmbxChangeNbrAllowedOnUi ) ) - { - vmbxBox->SaveL( aEntry, ETrue ); - } - else - { - User::Leave( KErrNotSupported ); - } - CleanupStack::PopAndDestroy( vmbxBox ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveEntryL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::QueryNewEntryL -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::QueryNewEntryL( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryNewEntryL =>" ); - CVmbxEngineBase* vmbxBox( NULL ); - iVmbxFactory->CreateEngineL( vmbxBox, aParams.iType ); - CleanupStack::PushL( vmbxBox ); - if ( vmbxBox->CheckConfiguration( aParams, EVmbxChangeNbrAllowedOnUi ) ) - { - CVoiceMailboxEntry* entry = CVoiceMailboxEntry::NewLC(); - entry->SetVoiceMailboxType( aParams.iType ); - entry->SetServiceId( aParams.iServiceId ); - vmbxBox->QueryDefineNumberL( *entry ); - CleanupStack::Pop( entry ); - aEntry = entry; - } - else - { - CheckNumberProvisionedL( aParams ); - } - CleanupStack::PopAndDestroy( vmbxBox ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryNewEntryL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::QueryChangeEntryL -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::QueryChangeEntryL( const TVoiceMailboxParams& aParams, - CVoiceMailboxEntry*& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryChangeEntryL =>" ); - CVmbxEngineBase* vmbxBox( NULL ); - iVmbxFactory->CreateEngineL( vmbxBox, aParams.iType ); - CleanupStack::PushL( vmbxBox ); - if ( vmbxBox->CheckConfiguration( aParams, EVmbxChangeNbrAllowedOnUi ) ) - { - CVoiceMailboxEntry* entry( NULL ); - GetStoredEntryL( aParams, entry ); - CleanupStack::PushL( entry ); - vmbxBox->QueryChangeNumberL( *entry ); - CleanupStack::Pop( entry ); - aEntry = entry; - } - else - { - CheckNumberProvisionedL( aParams ); - } - CleanupStack::PopAndDestroy( vmbxBox ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryChangeEntryL <=" ); - } - -// --------------------------------------------------------------------------- -// CleanupRPointerArray -// avoid memory leak when using RPointerArray -// --------------------------------------------------------------------------- -// -LOCAL_C void CleanupRPointerArray( TAny* aParam ) - { - if ( aParam ) - { - static_cast< RPointerArray* >( aParam ) - ->ResetAndDestroy(); - } - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::QueryVmbxTypeL -// Query vmbx type -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::QueryVmbxTypeL( TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL =>" ); - aParams.iType = EVmbxNone; - aParams.iServiceId = KVmbxServiceIdNone; - - TInt result ( KErrNotFound ); - RPointerArray array; - TCleanupItem item( CleanupRPointerArray, &array ); - CleanupStack::PushL( item ); - GetDefinedEntriesL( array ); - - TInt definedCount = array.Count(); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL:\ - definedCount%I", definedCount ); - // more than one number defined - if ( definedCount > 1 ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL:\ - more than one number Denfined" ); - // query call type - RArray paramsArray; - CleanupClosePushL( paramsArray ); - TVoiceMailboxParams entryParams; - for ( TInt i = 0; i < array.Count(); i++ ) - { - entryParams.iType = array[i]->VoiceMailboxType(); - entryParams.iServiceId = array[i]->ServiceId(); - paramsArray.AppendL( entryParams ); - } - //CArrayPtr* dialogIcons = GetVmbxImagesL( paramsArray ); - //CleanupStack::PushL( dialogIcons ); - iUiUtilities->ShowCallSelectionDialogL( - array, /* dialogIcons, */ aParams, result ); - //CleanupStack::Pop( dialogIcons ); - CleanupStack::PopAndDestroy( ¶msArray ); - } - // only one number defined - else if ( 1 == definedCount ) - { - // return the onle defined number - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL:\ - One number Denfined" ); - aParams.iType = array[0]->VoiceMailboxType(); - result = KErrNone; - } - // there is no number defined - else - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL:\ - no number Denfined" ); - // define number - if ( VmbxUtilities::VideoSupported() ) - { - // query to be defined type - iUiUtilities->ShowDefineSelectionDialogL( aParams.iType, result ); - // if result is KErrNone(but result should be also KErrNotFound ), - // it means user have seclected the defined type; - // else user cancel to select the type, so should return result value - if ( KErrNone == result ) - { - result = KErrNotFound; - } - } - else - { - aParams.iType = EVmbxVoice; - } - } - - CleanupStack::PopAndDestroy( &array ); //item - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL: result%I", - result ); - User::LeaveIfError( result ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetDefinedEntriesL -// -// ---------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::GetDefinedEntriesL( - RPointerArray& aArray ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL =>" ); - TRAPD( voiceErr,GetDefinedVoiceEntryL( aArray )); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL: voiceErr%I", - voiceErr ); - // It should be ignored when video/voip unsupported or no number defined - if ( KErrNotFound != voiceErr ) - { - User::LeaveIfError( voiceErr ); - } - - TRAPD( videoErr, GetDefinedVideoEntryL( aArray ) ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL: videoErr%I", - videoErr ); - if ( KErrNotSupported != videoErr && KErrNotFound != videoErr ) - { - User::LeaveIfError( videoErr ); - } - - TRAPD( voIperr, GetDefinedVoipEntriesL( aArray )); - - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL: voIperr%I", - voIperr ); - // It should be ignored when video/voip unsupported or no number defined - if ( KErrNotSupported != voIperr && KErrNotFound != voIperr ) - { - User::LeaveIfError( voIperr ); - } - - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetDefinedVoiceEntryL -// -// ---------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::GetDefinedVoiceEntryL( - RPointerArray& aArray ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVoiceEntryL =>" ); - // check voice mailbox - CVmbxEngineBase* voiceBox( NULL ); - iVmbxFactory->CreateEngineL( voiceBox, EVmbxVoice ); - CleanupStack::PushL( voiceBox ); - // get voice entry - CVoiceMailboxEntry* voiceEntry( NULL); - voiceBox->GetL( voiceEntry ); - CleanupStack::PushL( voiceEntry ); - // get voice number - TPtrC vmbxVoiceNumber( KNullDesC ); - TInt resVoice = voiceEntry->GetVmbxNumber( vmbxVoiceNumber ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedVoiceEntryL:\ - VoiceNumber = %S ", &vmbxVoiceNumber ); - if ( KErrNone == resVoice && vmbxVoiceNumber.Length() ) - { - aArray.AppendL( voiceEntry ); - } - CleanupStack::Pop( voiceEntry ); - CleanupStack::PopAndDestroy( voiceBox ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVoiceEntryL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetDefinedVideoEntryL -// -// ---------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::GetDefinedVideoEntryL( - RPointerArray& aArray ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVideoEntryL =>" ); - // check video mailbox - CVmbxEngineBase* videoBox = NULL; - iVmbxFactory->CreateEngineL( videoBox, EVmbxVideo ); - CleanupStack::PushL( videoBox ); - - CVoiceMailboxEntry* videoEntry( NULL ); - // get video entry - videoBox->GetL( videoEntry ); - CleanupStack::PushL( videoEntry ); - TPtrC vmbxVideoNumber( KNullDesC ); - - TInt resVideo = videoEntry->GetVmbxNumber( vmbxVideoNumber ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedVideoEntryL:\ - VideoNumber = %S ", &vmbxVideoNumber ); - - if ( KErrNone == resVideo && vmbxVideoNumber.Length() ) - { - aArray.AppendL( videoEntry ); - } - CleanupStack::Pop( videoEntry ); - CleanupStack::PopAndDestroy( videoBox ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVideoEntryL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetDefinedVoipEntriesL -// -// ---------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::GetDefinedVoipEntriesL( - RPointerArray& aArray ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL =>" ); - // check VoIP mailbox - CVmbxEngineBase* voIPBox = NULL; - iVmbxFactory->CreateEngineL( voIPBox, EVmbxVoip ); - CleanupStack::PushL( voIPBox ); - - RIdArray profileIds; - CleanupClosePushL( profileIds ); - - voIPBox->GetServiceIdsL( profileIds ); - TInt profileCounts = profileIds.Count(); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL:\ - VoIP profileCounts%I ", profileCounts); - if ( 0 < profileCounts ) - { - for ( TInt i( 0 ); i < profileCounts; i++ ) - { - voIPBox->SetCurrentServiceId( profileIds[i] ); - CVoiceMailboxEntry* voIPEntry( NULL ); - // get voip entry - voIPBox->GetL( voIPEntry ); - CleanupStack::PushL( voIPEntry ); - TPtrC vmbxVoIPName( KNullDesC ); - TInt resVoIP = voIPEntry->GetVmbxName( vmbxVoIPName ); - - TPtrC vmbxVoIPAddress( KNullDesC ); - if ( KErrNone == resVoIP ) - { - VMBLOGSTRING2( - "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL:\ - vmbxVoIPName = %S ", &vmbxVoIPName ); - resVoIP = voIPEntry->GetVmbxNumber( vmbxVoIPAddress ); - } - if ( KErrNone == resVoIP && vmbxVoIPAddress.Length() - && vmbxVoIPName.Length() ) - { - VMBLOGSTRING2( - "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL:\ - vmbxVoIPAddress = %S ", &vmbxVoIPAddress ); - aArray.AppendL( voIPEntry ); - } - CleanupStack::Pop( voIPEntry ); - } - } - CleanupStack::PopAndDestroy( &profileIds ); - CleanupStack::PopAndDestroy( voIPBox ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL <=" ); - } - -// ---------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetServiceIdsL -// -// ---------------------------------------------------------------------------- -void CVoiceMailboxImpl::GetServiceIdsL( RIdArray& aProfileIds ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetServiceIdsL =>" ); - // Get all Service Ids - RIdArray profileIds; - CleanupClosePushL( profileIds ); - CVmbxEngineBase* vmbx = NULL; - iVmbxFactory->CreateEngineL( vmbx, EVmbxVoip ); - CleanupStack::PushL( vmbx ); - vmbx->GetServiceIdsL( profileIds ); - for ( TInt i( 0 ); i < profileIds.Count(); i++ ) - { - aProfileIds.AppendL( profileIds[i]); - } - CleanupStack::PopAndDestroy( vmbx ); - CleanupStack::Pop( &profileIds ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetServiceIdsL <="); - } - -// ---------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetVmbxImageL -// -// ---------------------------------------------------------------------------- -/* CGulIcon* CVoiceMailboxImpl::GetVmbxImageL( - const TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImageL =>" ); - CGulIcon* guiIcon( NULL ); - CVmbxEngineBase* vmbxEngine = NULL; - iVmbxFactory->CreateEngineL( vmbxEngine, aParams.iType ); - CleanupStack::PushL( vmbxEngine ); - if ( vmbxEngine ) - { - guiIcon = vmbxEngine->GetVmbxImageL( aParams ); - } - CleanupStack::PopAndDestroy( vmbxEngine ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImageL <=" ); - return guiIcon; - } */ - -// ---------------------------------------------------------------------------- -// CVoiceMailboxImpl::GetVmbxImagesL -// -// ---------------------------------------------------------------------------- -// -/* CArrayPtr* CVoiceMailboxImpl::GetVmbxImagesL( - RArray& aParams ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImagesL =>" ); - CAknIconArray* icons = - new( ELeave ) CAknIconArray( KVmLbxItemsArraySize ); - CleanupStack::PushL( icons ); - - const TInt count = aParams.Count(); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetVmbxImagesL count %I", - count); - for( TInt i = 0; i < count; i++ ) - { - CGulIcon *icon = GetVmbxImageL( aParams[i] ); - icons->AppendL( icon ); - } - CleanupStack::Pop( icons ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImagesL <=" ); - return icons; - } */ - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::SaveProvisionedEntryL -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::SaveProvisionedEntryL( - const CVoiceMailboxEntry& aEntry ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveProvisionedEntryL =>" ); - CVmbxEngineBase* vmbxEngine = NULL; - iVmbxFactory->CreateEngineL( vmbxEngine, aEntry.VoiceMailboxType() ); - CleanupStack::PushL( vmbxEngine ); - TVoiceMailboxParams params( aEntry ); - vmbxEngine->SaveProvisionedEntryL( aEntry ); - CleanupStack::PopAndDestroy( vmbxEngine ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveProvisionedEntryL <="); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::NotifyChangedL -// notify changed and tell the change to observer -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::NotifyChangedL( TVmbxType aType ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyChangedL =>" ); - iUiUtilities->DismissDialogL(); - if ( iNotifyCallBack ) - { - CVmbxEngineBase* vmbxEngine = NULL; - iVmbxFactory->CreateEngineL( vmbxEngine, aType ); - CleanupStack::PushL( vmbxEngine ); - CVoiceMailboxEntry* entry( NULL ); - vmbxEngine->GetL( entry ); - CleanupStack::PushL( entry ); - iNotifyCallBack->HandleNotifyL( *entry ); - CleanupStack::PopAndDestroy( entry ); - CleanupStack::PopAndDestroy( vmbxEngine ); - } - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyChangedL <=" ); - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::VmbxUiUtilities -// notify changed and tell the change to observer -// -// --------------------------------------------------------------------------- -// -MVmbxUiUtilities& CVoiceMailboxImpl::VmbxUiUtilities() - { - return *iUiUtilities; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::VmbxCenRepHandler -// notify changed and tell the change to observer -// -// --------------------------------------------------------------------------- -// -MVmbxCenrepHandler& CVoiceMailboxImpl::VmbxCenRepHandler() - { - return *iCenRepHandler; - } - -// --------------------------------------------------------------------------- -// CVoiceMailboxImpl::CheckNumberProvisionedL -// -// --------------------------------------------------------------------------- -// -void CVoiceMailboxImpl::CheckNumberProvisionedL( - const TVoiceMailboxParams& aParams ) - { - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CheckNumberProvisionedL =>" ); - if ( ( EVmbxVoice == aParams.iType - && EVmbxSimMemory == iCenRepHandler->StoreType() ) - || ( EVmbxVideo == aParams.iType ) ) - { - // get current active process - RProcess curProcess; - TInt curProcessId( curProcess.SecureId().iId ); - VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::CheckNumberProvisionedL \ - Get cur process id: curProcessId = %I", curProcessId ); - // User press 1+send key or long press 1 - if ( KPhoneApplicationUid == curProcessId ) - { - RPointerArray array; - TCleanupItem item( CleanupRPointerArray, &array ); - CleanupStack::PushL( item ); - GetDefinedEntriesL( array ); - // Only operator has the possibility to configure device, - // user is not allowed to edit the voice mail numbers - if ( array.Count() < 1 ) - { - // show not allowed user editing dialog - iUiUtilities->ShowNotAllowedEditingDialogL(); - } - CleanupStack::PopAndDestroy( &array ); //item - } - } - // User don't have access to edit cs voice or video number - User::Leave( KErrAccessDenied ); - VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CheckNumberProvisionedL <=" ); - } - -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_pbkstore.h --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_pbkstore.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -#ifndef UT_PBKSTORE_H -#define UT_PBKSTORE_H - -#include - -class CVmbxPbkStore; - -class Ut_PbkStore : public QObject -{ - Q_OBJECT - -public: - Ut_PbkStore(); - virtual ~Ut_PbkStore(); - -private slots: - void testCreateAndDelete(); - void testIsWritable(); - void testPhoneBookType(); - // Can not handle AO in Current UT desing - void testWrite(); - void testPhonebookStore(); - void testGetL(); - -private: - void createPbk(); - void deletePbk(); - -private: - CVmbxPbkStore *mPbk; -}; - -#endif // UT_PBKSTORE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_simhandler.h --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_simhandler.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -#ifndef UT_SIMHANDLER_H -#define UT_SIMHANDLER_H - -#include - -class CVmbxSimHandler; - -class Ut_SimHandler : public QObject -{ - Q_OBJECT - -public: - Ut_SimHandler(); - virtual ~Ut_SimHandler(); - -private slots: - void testCreateAndDelete(); - //void testGetL(); - //void testSave(); - void testIsWritable(); - void testNotifyStoreEvent(); - void testPhoneBookType(); - void testCancelAsyncRequest(); - -private: - void createSim(); - void deleteSim(); - -private: - CVmbxSimHandler *mSim; -}; - -#endif // UT_SIMHANDLER_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_vmbxengine.h --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_vmbxengine.h Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 20 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: Unit test class for CVmbxPbkStore -* -*/ - -#ifndef UT_VMBXENGINE_H -#define UT_VMBXENGINE_H - -#include - -class CVoiceMailbox; -class CVoiceMailboxEntry; - -class Ut_VmbxEngine : public QObject -{ - Q_OBJECT - -public: - Ut_VmbxEngine(); - virtual ~Ut_VmbxEngine(); - -private slots: - - // Test New and Delete Api - void testVmbxApi(); - void testEntryApi(); - - // CVoiceMailbox test code - void testGetStoredEntry(); - void testSaveEntry(); - void testQueryNewEntry(); - void testQueryChangeEntry(); - void testQueryVmbxType(); - //void testNotifyVmbxNumberChangeL(); - //void NotifyVmbxNumberChangeCancel(); - void testCheckConfiguration(); - void testGetServiceIds(); - void testSaveProvisionedEntry(); - - // CVoiceMailboxEntry test code - void testType(); - void testName(); - void testServiceId(); - void testLineType(); - void testNumber(); - void testBrandId(); - void testUsingMemoryLocation(); - void testReset(); - -private: - // create and delete Api - void createVmbxApi(); - void createEntryApi(); - void deleteVmbxApi(); - void deleteEntryApi(); -private: - CVoiceMailbox *mVmbx; - CVoiceMailboxEntry *mEntry; -}; - -#endif // UT_VMBXENGINE_H diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/src/cenrep_mock.cpp --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/cenrep_mock.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -#include -#include -#include "voicemailboxdomaincrkeys.h" -#include "voicemailboxprivatecrkeys.h" - -_LIT(KStringValue, "123"); - -// TODO: Add a new class named Ut_Utility to config all CR key -// to simulate 3 different images -CRepository* CRepository::NewL(TUid /*aRepositoryUid*/) -{ - CRepository *self = new (ELeave) CRepository(); - return self; -} - -CRepository::~CRepository() -{ - -} - -TInt CRepository::Get(TUint32 aKey, TInt& aValue) -{ - if (KVideoMbxSupport == aKey){ - aValue = 1; - qDebug("KVideoMbxSupport 1"); - } else if (KVmbxNoSimWriting == aKey){ - aValue = 0; - qDebug("KVmbxNoSimWriting 0"); - } else if (KVmbxUiCaps == aKey){ - aValue = 0; - qDebug("KVmbxUiCaps 1"); - } else { - aValue = 0; - qDebug("default 0"); - } - - return KErrNone; -} -TInt CRepository::Set(TUint32 /*aKey*/, TInt /*aValue*/) -{ - return KErrNone; -} - -TInt CRepository::Get(TUint32 /*aKey*/, TDes16& aValue) -{ - aValue.Append(KStringValue); - return KErrNone; -} - -TInt CRepository::Set(TUint32 /*aKey*/, const TDesC16& /*aValue*/) -{ - return KErrNone; -} diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/src/etel_mock.cpp --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/etel_mock.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -#include -#include -#include -#include -#include - -RPhone::RPhone() -{ -} - -void RPhone::ConstructL() -{ -} - -TInt RPhone::Open(RTelServer& /*aSession*/,const TDesC& /*aName*/) -{ - return KErrNone; -} - -void RPhone::Close() -{ -} - -void RPhone::Destruct() -{ -} - -RMobilePhone::RMobilePhone() -{ -} - -void RMobilePhone::ConstructL() -{ -} - -RMobilePhone::TMultimodeType::TMultimodeType() -{ -} - -TInt RMobilePhone::TMultimodeType::ExtensionId() const -{ - return 0; -} - -void RMobilePhone::GetMailboxNumbers( - TRequestStatus& aReqStatus, - TDes8& aMailBox) const -{ - RMobilePhone::TMobilePhoneVoicemailIdsV3 info; - RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg infoPckg(info); - info.iVoice = 1; - aMailBox.Copy(infoPckg); - TRequestStatus* tmp = &aReqStatus; - User::RequestComplete(tmp, KErrNone); - qDebug("RMobilePhoneStore::GetMailboxNumbers mock"); -} - -RMobilePhone::TMobilePhoneVoicemailIdsV3::TMobilePhoneVoicemailIdsV3() - : iVoice(0), - iData(0), - iFax(0), - iOther(0) -{ -} - -void RMobilePhone::Destruct() -{ -} - -TInt RMobilePhone::GetIccAccessCaps(TUint32& /*aCaps*/) const -{ - return KErrNone; -} - -RTelServer::RTelServer() -{ -} - -TInt RTelServer::Connect(TInt /*aMessageSlots*/) -{ - return KErrNone; -} - -TInt RTelServer::LoadPhoneModule(const TDesC& /*aFileName*/) const -{ - return KErrNone; -} - -TInt RTelServer::SetExtendedErrorGranularity( - const TErrorGranularity /*aGranularity*/) const -{ - return KErrNone; -} - -TInt RTelServer::GetPhoneInfo( - const TInt /*aIndex*/, TPhoneInfo& /*aInfo*/) const -{ - return KErrNone; -} - -RMobilePhoneStore::RMobilePhoneStore() -{ -} - -void RMobilePhoneStore::GetInfo( - TRequestStatus& aReqStatus, TDes8& aInfo) const -{ - RMobilePhoneBookStore::TMobilePhoneBookInfoV1 info; - info.iCaps = 0x10000000; - RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg pckgInfo( info ); - aInfo.Copy( pckgInfo ); - TRequestStatus* tmp = &aReqStatus; - User::RequestComplete(tmp, KErrNone); - qDebug("RMobilePhoneStore::GetInfo mock"); -} - -RMobilePhoneBookStore::RMobilePhoneBookStore() -{ -} - -TInt RMobilePhoneBookStore::Open( - RMobilePhone& /*aPhone*/, const TDesC& /*aStore*/) -{ - return KErrNone; -} - -RMobilePhoneStore::TMobilePhoneStoreInfoV1::TMobilePhoneStoreInfoV1() - :iType(RMobilePhoneStore::EPhoneStoreTypeUnknown), - iTotalEntries(0), - iUsedEntries(0), - iCaps(0), - iName(0) -{ -} - -RMobilePhoneBookStore::TMobilePhoneBookInfoV1::TMobilePhoneBookInfoV1() - :iMaxNumLength(0), - iMaxTextLength(0), - iLocation(RMobilePhoneBookStore::ELocationUnknown), - iChangeCounter(0), - iIdentity(0) -{ -} - -void RMobilePhoneBookStore::Close() -{ -} - -void RMobilePhoneBookStore::Read( - TRequestStatus& aReqStatus, TInt /*aIndex*/, - TInt /*aNumSlots*/, TDes8& aPBData) const -{ - TRequestStatus* tmp = &aReqStatus; -// data ? - TBuf<5> pbdata(_L("data5")); - aPBData.Copy(pbdata); - - User::RequestComplete(tmp, KErrNone); -} - -void RMobilePhoneBookStore::Write( - TRequestStatus& aReqStatus, - const TDesC8& /*aPBData*/, TInt& /*aIndex*/) const -{ - TRequestStatus* tmp = &aReqStatus; - User::RequestComplete(tmp, KErrNone); -} - -void RMobilePhoneStore::NotifyStoreEvent( - TRequestStatus& aReqStatus, - TUint32& /*aEvent*/, TInt& /*aIndex*/) const -{ - TRequestStatus* tmp = &aReqStatus; - User::RequestComplete(tmp, KErrNone); -} - -RTelSubSessionBase::RTelSubSessionBase() -{ -} - -void RTelSubSessionBase::CancelAsyncRequest(TInt /*aReqToCancel*/) const -{ -// refers to ut_ussd -} - -TInt RSSSettings::Get( - TSSSettingsSetting /*aSetting*/, - TInt& aValue ) -{ - aValue = ESSSettingsAlsPrimary; - return KErrNone; -} - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/src/main.cpp --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/main.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -#include -#include -#include -#include "ut_vmbxengine.h" -#include "ut_pbkstore.h" -#include "ut_simhandler.h" - -int main(int argc, char *argv[]) -{ - qDebug("main() IN"); -// CTrapCleanup* cleanup = CTrapCleanup::New(); - QCoreApplication app(argc, argv); - - qDebug("testing start..."); - - // API tester - int result = -1; - char *pass[3]; - pass[0] = argv[0]; - pass[1] = "-o"; - - Ut_VmbxEngine tc1; - pass[2] = "c:\\logs\\vmbx\\ut_vmbxengine.txt"; - result = QTest::qExec(&tc1, 3, pass); - qDebug("ut_vmbxengine result=%d", result); - - Ut_PbkStore tc2; - pass[2] = "c:\\logs\\vmbx\\ut_pbkstore.txt"; - result = QTest::qExec(&tc2, 3, pass); - qDebug("Ut_PbkStore result=%d", result); - - // SIM can not be handled in Emulator. - // Root cause: CVmbxSimHandler::ConstructL() -// Ut_SimHandler tc3; -// pass[2] = "c:\\logs\\vmbx\\ut_simhandler.txt"; -// result = QTest::qExec(&tc3, 3, pass); -// qDebug("Ut_SimHandler result=%d", result); - - qDebug("testing end..."); - qDebug("main() OUT"); -// delete cleanup; -// cleanup = NULL; - return result; -} - diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/src/mpbutil_mock.cpp --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/mpbutil_mock.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -#include -#include -#include - -TInt time = 0; - -CPhoneBookBuffer::CPhoneBookBuffer():iMonitor(NULL,0,0) -{ -} - -void CPhoneBookBuffer::Set(TDes8* /*aData*/){} - -TInt CPhoneBookBuffer::AddNewEntryTag() -{ return 0; } - -TInt CPhoneBookBuffer::AddNewNumberTag() -{ return 0; } - -TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, TUint8 /*aInteger*/) -{ return 0; } - -TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, TUint16 /*aInteger*/) -{ return 0; } - -TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, TUint32 /*aInteger*/) -{ return 0; } - -TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, const TDesC8 &/*aData*/) -{ return 0; } - -TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, const TDesC16 &/*aData*/) -{ return 0; } - -TInt CPhoneBookBuffer::RemovePartialEntry() -{ return 0; } - -void CPhoneBookBuffer::StartRead(){} - -TInt CPhoneBookBuffer::GetTagAndType(TUint8 &aTagValue, TPhBkTagType &aDataType) -{ - switch(aDataType) - { - case CPhoneBookBuffer::EPhBkTypeNoData: - { - if(time == 0) - { - aTagValue = RMobilePhoneBookStore::ETagPBNewEntry; - time ++; - } - else if (time == 1) - { - aTagValue = RMobilePhoneBookStore::ETagPBNumber; - time ++; - } - else if (time == 2) - { - aTagValue = RMobilePhoneBookStore::ETagPBText; - time ++; - } - else if (time == 3) - { - aTagValue = RMobilePhoneBookStore::ETagPBTonNpi; - time ++; - } - else - { - time = 0; - return KErrNotFound; - } - break; - } - default: - aTagValue = 0; - } - - return KErrNone; -} - -TInt CPhoneBookBuffer::GetValue(TUint8 &/*aInteger*/) -{ return 0; } - -TInt CPhoneBookBuffer::GetValue(TUint16 &/*aInteger*/) -{ return 0; } - -TInt CPhoneBookBuffer::GetValue(TUint32 &/*aInteger*/) -{ return 0; } - -TInt CPhoneBookBuffer::GetValue(TPtrC8 &/*aData*/) -{ return 0; } - -TInt CPhoneBookBuffer::GetValue(TPtrC16 &/*aData*/) -{ return 0; } - -void CPhoneBookBuffer::SkipValue(TPhBkTagType /*aDataType*/){} - -TInt CPhoneBookBuffer::BufferLength() -{ return 0; } - -TInt CPhoneBookBuffer::RemainingReadLength() -{ return 0; } diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/src/qtuihandler_mock.cpp --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/qtuihandler_mock.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -#include -#include "vmbxqtuihandler.h" - -VmbxQtUiHandler::VmbxQtUiHandler(QObject* parent): QObject(parent) -{ - qDebug("mock VmbxQtUiHandler"); -} - -VmbxQtUiHandler::~VmbxQtUiHandler() -{ - qDebug("mock ~VmbxQtUiHandler"); -} - - -void VmbxQtUiHandler::showVmbxQueryDialog(const TVmbxType& /*aType*/, - QString& /*aNumber*/, int& aResult) -{ - qDebug("mock showVmbxQueryDialog"); - aResult = KErrNone; -} - - -void VmbxQtUiHandler::showDefineSelectionDialog( - TVmbxType& /*aType*/, int& aResult) -{ - qDebug("mock showDefineSelectionDialog"); - // Make sure no leave in CVoiceMailboxImpl::QueryVmbxTypeL( - aResult = KErrNotFound; -} - -void VmbxQtUiHandler::showInformationNote(const TVmbxNoteType /*aType*/) -{ - qDebug("mock showInformationNote"); -} - -void VmbxQtUiHandler::showCallSelectionDialog( - const QList /*entryList*/, - TVoiceMailboxParams &/*params*/, int &/*result*/ ) -{ - qDebug("mock showCallSelectionDialogL"); -} - -void VmbxQtUiHandler::updatePrimaryAction(const QString &/*aInput*/) -{ - qDebug("mock updatePrimaryAction"); -} - -bool VmbxQtUiHandler::isQtEnvSupported() -{ - qDebug("mock isQtEnvSupported"); - return true; -} - -void VmbxQtUiHandler::init() -{ - qDebug("mock init"); -} - -//End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_pbkstore.cpp --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_pbkstore.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -#include -#include -#include "vmbxpbkstore.h" -#include "ut_pbkstore.h" - -Ut_PbkStore::Ut_PbkStore():mPbk(NULL) -{ - createPbk(); -} - -Ut_PbkStore::~Ut_PbkStore() -{ - deletePbk(); -} - -void Ut_PbkStore::testCreateAndDelete() -{ - createPbk(); - deletePbk(); -} - -void Ut_PbkStore::testIsWritable() -{ - createPbk(); - QCOMPARE(mPbk->IsWritable(), 1); - deletePbk(); -} -void Ut_PbkStore::testPhoneBookType() -{ - createPbk(); - QCOMPARE(mPbk->PhoneBookType(), EMBDNPhoneBook); - deletePbk(); -} - - -void Ut_PbkStore::testWrite() -{ - createPbk(); - CVoiceMailboxEntry *entry = NULL; - TInt err = KErrNotFound; - - TRAP(err, entry = CVoiceMailboxEntry::NewL()); - qDebug("CVoiceMailboxEntry::NewL %d", err); - err = mPbk->Write(*entry); - qDebug("Write err %d", err); - QCOMPARE(err, KErrNone); - - delete entry; - entry = NULL; - deletePbk(); -} - -void Ut_PbkStore::testPhonebookStore() -{ - createPbk(); - mPbk->PhonebookStore(); - deletePbk(); -} - -void Ut_PbkStore::testGetL() -{ - createPbk(); - TInt err = KErrNotFound; - CVoiceMailboxEntry *entry = NULL; - - TRAP(err, entry = CVoiceMailboxEntry::NewL()); - qDebug("CVoiceMailboxEntry::NewL %d", err); - mPbk->GetL(*entry); - - delete entry; - entry = NULL; - deletePbk(); -} - -void Ut_PbkStore::createPbk() -{ - if (!mPbk){ - TRAPD(err, mPbk = CVmbxPbkStore::NewL()); - QVERIFY(mPbk); - qDebug("Create CVmbxPbkStore", err); - } -} - -void Ut_PbkStore::deletePbk() -{ - delete mPbk; - mPbk = NULL; - qDebug("Delete CVmbxPbkStore"); -} diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_simhandler.cpp --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_simhandler.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -#include -#include -#include "vmbxsimhandler.h" -#include "ut_simhandler.h" - -Ut_SimHandler::Ut_SimHandler():mSim(NULL) -{ - createSim(); -} - -Ut_SimHandler::~Ut_SimHandler() -{ - deleteSim(); -} - -void Ut_SimHandler::testCreateAndDelete() -{ - createSim(); - deleteSim(); -} - -//void Ut_SimHandler::testGetL() -//{ -// createSim(); -// TInt err = KErrNotFound; -// CVoiceMailboxEntry *entry = NULL; -// -// TRAP(err, entry = CVoiceMailboxEntry::NewL()); -// qDebug("CVoiceMailboxEntry::NewL %d", err); -// mSim->GetL(*entry); -// -// delete entry; -// entry = NULL; -// deleteSim(); -//} -// -//void Ut_SimHandler::testSave() -//{ -// createSim(); -// -// TInt err = KErrNotFound; -// CVoiceMailboxEntry *entry = NULL; -// -// TRAP(err, entry = CVoiceMailboxEntry::NewL()); -// qDebug("CVoiceMailboxEntry::NewL %d", err); -// QCOMPARE(mSim->Save(*entry), KErrNone); -// -// deleteSim(); -//} - -void Ut_SimHandler::testIsWritable() -{ - createSim(); - QCOMPARE(mSim->IsWritable(), 1); - deleteSim(); -} - -void Ut_SimHandler::testNotifyStoreEvent() -{ - createSim(); - TRequestStatus status; - TUint32 event; - TInt index; - mSim->NotifyStoreEvent(status, event, index); - deleteSim(); -} - - -void Ut_SimHandler::testPhoneBookType() -{ - createSim(); - QCOMPARE(mSim->PhoneBookType(), EMBDNPhoneBook); - deleteSim(); -} - -void Ut_SimHandler::testCancelAsyncRequest() -{ - createSim(); - TInt req = -1; - mSim->CancelAsyncRequest(req); - deleteSim(); -} - -void Ut_SimHandler::createSim() -{ - if (!mSim){ - TRAPD(err, mSim = CVmbxSimHandler::NewL()); - QVERIFY(mSim); - qDebug("Create CVmbxSimHandler", err); - } -} - -void Ut_SimHandler::deleteSim() -{ - delete mSim; - mSim = NULL; - qDebug("Delete CVmbxSimHandler"); -} diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_vmbxengine.cpp --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_vmbxengine.cpp Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,455 +0,0 @@ -/* -* 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: Implementation of the Ut_VmbxEngine class -* -*/ - -#include -#include -#include -#include - -#include "ut_vmbxengine.h" - -_LIT(KNumber, "987654321"); -_LIT(KName, "Name"); -_LIT8(KBrandId, "Brand Id"); - -Ut_VmbxEngine::Ut_VmbxEngine(): mVmbx(NULL),mEntry(NULL) -{ - qDebug("Ut_VmbxEngine"); -} - -// ----------------------------------------------------------------------------- -// Ut_VmbxEngine::~Ut_VmbxEngine -// ----------------------------------------------------------------------------- -Ut_VmbxEngine::~Ut_VmbxEngine() -{ - delete mVmbx; - mVmbx = NULL; - delete mEntry; - mEntry = NULL; - qDebug("~Ut_VmbxEngine"); -} - -// Test API -void Ut_VmbxEngine::testVmbxApi() -{ - createVmbxApi(); - deleteVmbxApi(); -} - -void Ut_VmbxEngine::testEntryApi() -{ - createEntryApi(); - deleteEntryApi(); -} - -// Test Vmbx start -void Ut_VmbxEngine::testGetStoredEntry() -{ - createVmbxApi(); - - TVoiceMailboxParams params; - params.iType = EVmbxVoice; - CVoiceMailboxEntry *tmpEntry = NULL; - - QCOMPARE(mVmbx->GetStoredEntry(params, tmpEntry), KErrNone); - qDebug("Get entry"); - if (tmpEntry){ - delete tmpEntry; - tmpEntry = NULL; - qDebug("delete tmp entry pointer"); - } - - // Save a entry first, get and compare after that - createEntryApi(); - mEntry->SetVoiceMailboxType(EVmbxVoice); - mEntry->SetVmbxNumber(KNumber); - qDebug("Set type"); - QCOMPARE(mVmbx->SaveEntry(*mEntry), KErrNone); - qDebug("Save entry"); - deleteEntryApi(); - - params.iType = EVmbxVoice; - mVmbx->GetStoredEntry(params, tmpEntry); - qDebug("Get entry"); - if (tmpEntry){ - QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVoice); - delete tmpEntry; - tmpEntry = NULL; - qDebug("delete tmp entry pointer"); - } - - deleteVmbxApi(); -} - -void Ut_VmbxEngine::testSaveEntry() -{ - createVmbxApi(); - - // Set some attributes to the new empty entry and save it - createEntryApi(); - mEntry->SetVoiceMailboxType(EVmbxVoice); - mEntry->SetUsingMemoryLocation(EVmbxPhoneMemory); - mEntry->SetVmbxNumber(KNumber); - qDebug("Set type & location"); - QCOMPARE(mVmbx->SaveEntry(*mEntry), KErrNone); - qDebug("Save entry"); - deleteEntryApi(); - - TVoiceMailboxParams params; - params.iType = EVmbxVoice; - CVoiceMailboxEntry *tmpEntry = NULL;; - mVmbx->GetStoredEntry(params, tmpEntry); - qDebug("Get entry"); - if (tmpEntry){ - QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVoice); - qDebug("Verify type"); - QCOMPARE(tmpEntry->UsingMemoryLocation(), EVmbxPhoneMemory); - qDebug("Verify location"); - delete tmpEntry; - tmpEntry = NULL; - } - deleteVmbxApi(); -} - -void Ut_VmbxEngine::testQueryNewEntry() -{ - createVmbxApi(); - CVoiceMailboxEntry *tmpEntry = NULL; - TVoiceMailboxParams params; - - // Query a new voice entry - // Mock the CRepository - params.iType = EVmbxVoice; - QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone); - QVERIFY(tmpEntry); - QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVoice); - delete tmpEntry; - tmpEntry = NULL; - - /* - // Query a new Video entry - params.iType = EVmbxVideo; - QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone); - QVERIFY(tmpEntry); - QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVideo); - delete tmpEntry; - tmpEntry = NULL; - - // Query a new voice entry - params.iType = EVmbxVoip; - QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone); - QVERIFY(tmpEntry); - QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVoip); - delete tmpEntry; - tmpEntry = NULL; - - // Query a unknown entry - params.iType = EVmbxNone; - QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone); - QVERIFY(tmpEntry); - QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxNone); - delete tmpEntry; - tmpEntry = NULL; - */ - deleteVmbxApi(); - -} - -void Ut_VmbxEngine::testQueryChangeEntry() -{ - createVmbxApi(); - - CVoiceMailboxEntry *tmpEntry = NULL;; - TVoiceMailboxParams params; - params.iType = EVmbxVoice; - // Always get KErrNotFound, Check why. - //QCOMPARE(mVmbx->QueryChangeEntry(params, tmpEntry), KErrNone); - mVmbx->QueryChangeEntry(params, tmpEntry); - //QVERIFY(tmpEntry); - delete tmpEntry; - tmpEntry = NULL; - - deleteVmbxApi(); -} - -void Ut_VmbxEngine::testQueryVmbxType() -{ - createVmbxApi(); - - // Save a entry first - CVoiceMailboxEntry *tmpEntry = NULL; - TVoiceMailboxParams params; - params.iType = EVmbxVoice; - QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone); - tmpEntry->SetVoiceMailboxType(EVmbxVoice); - tmpEntry->SetVmbxNumber(KNumber); - QCOMPARE(mVmbx->SaveEntry(*tmpEntry), KErrNone); - delete tmpEntry; - tmpEntry = NULL; - - // Query and compare vmbx type after saving - mVmbx->QueryVmbxType(params); - - deleteVmbxApi(); -} - -// TODO: Add 2 public test cases for notification, mock observer frist. -//void testNotifyVmbxNumberChangeL(); -//void NotifyVmbxNumberChangeCancel(); - -void Ut_VmbxEngine::testGetServiceIds() -{ - createVmbxApi(); - /* - // Save a entry first - createEntryApi(); - TServiceId idExp(10); - mEntry->SetServiceId(idExp); - mEntry->SetVoiceMailboxType(EVmbxVoip); - QCOMPARE(mVmbx->SaveEntry(*mEntry), KErrNone); - deleteEntryApi(); - - // Query and compare vmbx type after saving - RIdArray ids; - QCOMPARE(mVmbx->GetServiceIds(ids), KErrNone); - TServiceId idAct = ids[0]; - QCOMPARE(idAct, idExp); - */ - deleteVmbxApi(); -} - -void Ut_VmbxEngine::testCheckConfiguration() -{ - createVmbxApi(); - TVoiceMailboxParams params; - params.iType = EVmbxVoice; - TBool result = mVmbx->CheckConfiguration( - params, EVmbxChangeNbrAllowedOnUi); - if (!result) { - QEXPECT_FAIL("","voice not allowed changed", Continue); - } - params.iType = EVmbxVideo; - result = mVmbx->CheckConfiguration( - params,EVmbxChangeNbrAllowedOnUi); - if (!result) { - QEXPECT_FAIL("","video not allowed changed", Continue); - } - params.iType = EVmbxVoip; - result = mVmbx->CheckConfiguration( - params,EVmbxChangeNbrAllowedOnUi); - if (result) { - QFAIL ("voip failed"); - } - deleteVmbxApi(); -} - -void Ut_VmbxEngine::testSaveProvisionedEntry() -{ - createVmbxApi(); - // Voice - createEntryApi(); - mEntry->SetVoiceMailboxType(EVmbxVoice); - mEntry->SetVmbxNumber(KNumber); - QCOMPARE(mVmbx->SaveProvisionedEntry(*mEntry), KErrNone); - deleteEntryApi(); - - // Video - createEntryApi(); - mEntry->SetVoiceMailboxType(EVmbxVideo); - mEntry->SetVmbxNumber(KNumber); - QCOMPARE(mVmbx->SaveProvisionedEntry(*mEntry), KErrNone); - deleteEntryApi(); - - deleteVmbxApi(); -} -// Test Vmbx end - - -// Test Entry start -void Ut_VmbxEngine::testType() -{ - createEntryApi(); - mEntry->SetVoiceMailboxType(EVmbxNone); - QCOMPARE(mEntry->VoiceMailboxType(), EVmbxNone); - - mEntry->SetVoiceMailboxType(EVmbxVoice); - QCOMPARE(mEntry->VoiceMailboxType(), EVmbxVoice); - - mEntry->SetVoiceMailboxType(EVmbxVideo); - QCOMPARE(mEntry->VoiceMailboxType(), EVmbxVideo); - - deleteEntryApi(); -} - -void Ut_VmbxEngine::testName() -{ - createEntryApi(); - - // Valid string - TPtrC nameIn(KName); - mEntry->SetVmbxName(nameIn); - TPtrC nameOut(KNullDesC); - mEntry->GetVmbxName(nameOut); - QCOMPARE(nameOut, nameIn); - - // Invalid string -// HBufC *name = HBufC::NewLC(KVmbxMaxNumberLength+1); -// QCOMPARE(mEntry->SetVmbxName(name->Des()), KErrArgument); -// CleanupStack::PopAndDestroy(name); - - deleteEntryApi(); -} - -void Ut_VmbxEngine::testServiceId() -{ - createEntryApi(); - - TServiceId idIn(10); - mEntry->SetServiceId(idIn); - QCOMPARE(mEntry->ServiceId(), idIn); - - deleteEntryApi(); -} - -void Ut_VmbxEngine::testLineType() -{ - createEntryApi(); - - // Als is disable in TB10.1 - /* - mEntry->SetVmbxAlsLineType(EVmbxAlsLineDefault); - QCOMPARE(mEntry->VmbxAlsLineType(), EVmbxAlsLineDefault); - - mEntry->SetVmbxAlsLineType(EVmbxAlsLine1); - QCOMPARE(mEntry->VmbxAlsLineType(), EVmbxAlsLine1); - - mEntry->SetVmbxAlsLineType(EVmbxAlsLine2); - QCOMPARE(mEntry->VmbxAlsLineType(), EVmbxAlsLine2); - */ - deleteEntryApi(); -} - -void Ut_VmbxEngine::testNumber() -{ - createEntryApi(); - - // Valid number - TPtrC numberIn(KNumber); - mEntry->SetVmbxNumber(numberIn); - TPtrC numberOut(KNullDesC); - mEntry->GetVmbxNumber(numberOut); - QCOMPARE(numberOut, numberIn); - - // Invalid number -// HBufC *number = HBufC::NewLC(KVmbxMaxNumberLength+1); -// QCOMPARE(mEntry->SetVmbxNumber(number->Des()), KErrArgument); -// CleanupStack::PopAndDestroy(number); - - deleteEntryApi(); -} - -void Ut_VmbxEngine::testBrandId() -{ - createEntryApi(); - - // Valid braind id - TPtrC8 brandIn(KBrandId); - QCOMPARE(mEntry->SetBrandId(brandIn), KErrNone); - - TPtrC8 brandOut(KNullDesC8); - QCOMPARE(mEntry->GetBrandId(brandOut), KErrNone); - - if (brandOut.Compare(brandIn)){ - QFAIL("Fail to Set/Get BrandId"); - } - - // Invalid Brand Id -// HBufC8 *invalid = HBufC8::NewLC(KVmbxMaxNumberLength+1); -// QCOMPARE(mEntry->SetBrandId(invalid->Des()), KErrArgument); -// CleanupStack::PopAndDestroy(invalid); - - deleteEntryApi(); -} - -void Ut_VmbxEngine::testUsingMemoryLocation() -{ - createEntryApi(); - - mEntry->SetUsingMemoryLocation(EVmbxPhoneMemory); - QCOMPARE(mEntry->UsingMemoryLocation(), EVmbxPhoneMemory); - - mEntry->SetUsingMemoryLocation(EVmbxSimMemory); - QCOMPARE(mEntry->UsingMemoryLocation(), EVmbxSimMemory); - - deleteEntryApi(); -} - -void Ut_VmbxEngine::testReset() -{ - createEntryApi(); - - mEntry->Reset(); - QCOMPARE(mEntry->ServiceId(), KVmbxServiceIdNone); - QCOMPARE(mEntry->VoiceMailboxType(), EVmbxNone); - QCOMPARE(mEntry->VmbxAlsLineType(), EVmbxAlsLineDefault); - - TPtrC8 brand(KNullDesC8); - QCOMPARE(mEntry->GetBrandId(brand), KErrNotFound); - - TPtrC name; - QCOMPARE(mEntry->GetVmbxName(name), KErrNotFound); - - TPtrC number; - QCOMPARE(mEntry->GetVmbxNumber(number), KErrNotFound); - - QCOMPARE(mEntry->UsingMemoryLocation(), EVmbxSimMemory); - - deleteEntryApi(); -} -// Test Entry end - -// Private function: create 2 data member -void Ut_VmbxEngine::createVmbxApi() -{ - if (!mVmbx){ - TRAPD( err, mVmbx = CVoiceMailbox::NewL()); - QVERIFY(mVmbx); - qDebug("Create vmbx api TRAP: %d", err); - } -} -void Ut_VmbxEngine::deleteVmbxApi() -{ - delete mVmbx; - mVmbx = NULL; - qDebug("Delete vmbx api"); -} -void Ut_VmbxEngine::createEntryApi() -{ - if (!mEntry){ - TRAPD( err, mEntry = CVoiceMailboxEntry::NewL()); - QVERIFY(mEntry); - qDebug("Create entry Api TRAP: %d", err); - } -} - -void Ut_VmbxEngine::deleteEntryApi() -{ - delete mEntry; - mEntry = NULL; - qDebug("Delete entry api"); -} -// End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/tsrc/ut_vmbxengine/ut_vmbxengine.pro --- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/ut_vmbxengine.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -# -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -TEMPLATE = app -TARGET = ut_vmbxengine -TARGET.EPOCALLOWDLLDATA = 1 - -CONFIG += hb -CONFIG += qtestlib - -DEPENDPATH += . - -INCLUDEPATH += . -INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE -HEADERS += \epoc32\include\platform\mw\cvoicemailbox.h -HEADERS += \epoc32\include\platform\mw\cvoicemailboxentry.h - -INCLUDEPATH += ..\..\inc - -HEADERS += $$PUBLIC_HEADERS - -symbian: { - TARGET.CAPABILITY = CAP_GENERAL_DLL -} - -# Code subject to test -SOURCES += ..\..\src\vmbxuihandler.cpp -# It is mocked by qtuihandler_mock.cpp, remove the real one -#SOURCES += ..\..\src\vmbxqtuihandler.cpp -SOURCES += ..\..\src\voicemailboximpl.cpp -SOURCES += ..\..\src\vmbxpbkstore.cpp -SOURCES += ..\..\src\vmbxetelconnection.cpp -SOURCES += ..\..\src\vmbxsimhandler.cpp -SOURCES += ..\..\src\vmbxcenrephandler.cpp -SOURCES += ..\..\src\vmbxutilities.cpp -SOURCES += ..\..\src\vmbxenginefactory.cpp -SOURCES += ..\..\src\vmbxenginebase.cpp -SOURCES += ..\..\src\vmbxcsvoiceengine.cpp -SOURCES += ..\..\src\vmbxcsvideoengine.cpp -SOURCES += ..\..\src\vmbxvoipengine.cpp -SOURCES += ..\..\src\vmbxemergencycall.cpp -SOURCES += ..\..\src\vmbxuiutilities.cpp -SOURCES += ..\..\src\vmbxcenrepobserver.cpp -SOURCES += ..\..\src\vmbxsimstoreobserver.cpp -SOURCES += ..\..\src\vmbxsatrefreshobserver.cpp -SOURCES += ..\..\src\vmbxobserver.cpp -SOURCES += ..\..\src\vmbshandler.cpp -SOURCES += ..\..\src\vmspshandler.cpp -SOURCES += ..\..\src\vmsettingsuiiconfileprovider.cpp -SOURCES += ..\..\src\cvoicemailbox.cpp -SOURCES += ..\..\src\cvoicemailboxentry.cpp - -HEADERS += ..\..\inc\vmbxuihandler.h -HEADERS += ..\..\inc\vmbxqtuihandler.h -HEADERS += ..\..\inc\voicemailboximpl.h -HEADERS += ..\..\inc\vmbxpbkstore.h -HEADERS += ..\..\inc\vmbxetelconnection.h -HEADERS += ..\..\inc\vmbxsimhandler.h -HEADERS += ..\..\inc\vmbxcenrephandler.h -HEADERS += ..\..\inc\vmbxutilities.h -HEADERS += ..\..\inc\vmbxenginefactory.h -HEADERS += ..\..\inc\vmbxenginebase.h -HEADERS += ..\..\inc\vmbxcsvoiceengine.h -HEADERS += ..\..\inc\vmbxcsvideoengine.h -HEADERS += ..\..\inc\vmbxvoipengine.h -HEADERS += ..\..\inc\vmbxemergencycall.h -HEADERS += ..\..\inc\vmbxuiutilities.h -HEADERS += ..\..\inc\vmbxcenrepobserver.h -HEADERS += ..\..\inc\vmbxsimstoreobserver.h -HEADERS += ..\..\inc\vmbxsatrefreshobserver.h -HEADERS += ..\..\inc\vmbxobserver.h -HEADERS += ..\..\inc\vmbshandler.h -HEADERS += ..\..\inc\vmspshandler.h -HEADERS += ..\..\inc\vmsettingsuiiconfileprovider.h - -HEADERS += ..\..\inc\mvmbxcenrephandler.h -HEADERS += ..\..\inc\mvmbxcenrepobserver.h -HEADERS += ..\..\inc\mvmbxchangeobserver.h -HEADERS += ..\..\inc\mvmbxresourceprovider.h -HEADERS += ..\..\inc\mvmbxsatrefreshobserver.h -HEADERS += ..\..\inc\mvmbxservicenotify.h -HEADERS += ..\..\inc\mvmbxsimstoreobserver.h -HEADERS += ..\..\inc\mvmbxuihandler.h -HEADERS += ..\..\inc\mvmbxuiutilities.h - -# Test code -HEADERS += inc\ut_vmbxengine.h -HEADERS += inc\ut_pbkstore.h -HEADERS += inc\ut_simhandler.h - -SOURCES += src\ut_vmbxengine.cpp -SOURCES += src\ut_pbkstore.cpp -SOURCES += src\ut_simhandler.cpp -SOURCES += src\main.cpp - -# Mock class -SOURCES += src\etel_mock.cpp -SOURCES += src\mpbutil_mock.cpp -SOURCES += src\qtuihandler_mock.cpp -SOURCES += src\cenrep_mock.cpp - -LIBS += -lflogger -LIBS += -lfeatmgr -LIBS += -lcenrepnotifhandler -LIBS += -lphoneclient -LIBS += -lsssettings -LIBS += -lsatclient -LIBS += -lserviceprovidersettings -LIBS += -lefsrv - -#End of file diff -r 7d48bed6ce0c -r 987c9837762f vmbx/vmbxengine/vmbxengine.pro --- a/vmbx/vmbxengine/vmbxengine.pro Tue Aug 31 15:45:17 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -# -# 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: -# -# -# - -TEMPLATE = lib -TARGET = vmbxengine -DEPENDPATH += . -HEADERS += $$PUBLIC_HEADERS - -CONFIG += hb -MOC_DIR = moc - -symbian: { - TARGET.CAPABILITY = CAP_GENERAL_DLL - TARGET.EPOCALLOWDLLDATA = 1 - TARGET.UID3=0x1000590F - INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \ - $$MOC_DIR \ - ../../inc \ - ./inc - - LIBS += -lcentralrepository \ - -lcenrepnotifhandler \ - -lfeatmgr \ - -lphoneclient \ - -lsssettings \ - -letelmm \ - -letel \ - -lsatclient \ - -lserviceprovidersettings \ - -lefsrv \ - -lFlogger - - HEADERS += inc/mvmbxcenrephandler.h \ - inc/mvmbxcenrepobserver.h \ - inc/mvmbxchangeobserver.h \ - inc/mvmbxresourceprovider.h \ - inc/mvmbxsatrefreshobserver.h \ - inc/mvmbxservicenotify.h \ - inc/mvmbxsimstoreobserver.h \ - inc/mvmbxuihandler.h \ - inc/mvmbxuiutilities.h \ - inc/vmbshandler.h \ - inc/vmbxcenrephandler.h \ - inc/vmbxcenrepobserver.h \ - inc/vmbxcsvideoengine.h \ - inc/vmbxcsvoiceengine.h \ - inc/vmbxemergencycall.h \ - inc/vmbxenginebase.h \ - inc/vmbxenginefactory.h \ - inc/vmbxetelconnection.h \ - inc/vmbxlogger.h \ - inc/vmbxobserver.h \ - inc/vmbxpbkstore.h \ - inc/vmbxqtuihandler.h \ - inc/vmbxsatrefreshobserver.h \ - inc/vmbxsimhandler.h \ - inc/vmbxsimstoreobserver.h \ - inc/vmbxuihandler.h \ - inc/vmbxuiutilities.h \ - inc/vmbxutilities.h \ - inc/vmbxvoipengine.h \ - inc/vmsettingsuiiconfileprovider.h \ - inc/vmspshandler.h \ - inc/voicemailboxdefsinternal.h \ - inc/voicemailboximpl.h \ - inc/voicemailboxprivatecrkeys.h \ - inc/dialogwaiter.h - - SOURCES += src/vmbxcenrepobserver.cpp \ - src/vmbxcsvoiceengine.cpp \ - src/vmbxcsvideoengine.cpp \ - src/vmbxcenrephandler.cpp \ - src/vmbshandler.cpp \ - src/cvoicemailboxentry.cpp \ - src/cvoicemailbox.cpp \ - src/voicemailboximpl.cpp \ - src/vmspshandler.cpp \ - src/vmsettingsuiiconfileprovider.cpp \ - src/vmbxvoipengine.cpp \ - src/vmbxutilities.cpp \ - src/vmbxuiutilities.cpp \ - src/vmbxuihandler.cpp \ - src/vmbxsimstoreobserver.cpp \ - src/vmbxsimhandler.cpp \ - src/vmbxsatrefreshobserver.cpp \ - src/vmbxqtuihandler.cpp \ - src/vmbxpbkstore.cpp \ - src/vmbxobserver.cpp \ - src/vmbxetelconnection.cpp \ - src/vmbxenginefactory.cpp \ - src/vmbxenginebase.cpp \ - src/vmbxemergencycall.cpp \ - src/dialogwaiter.cpp - - defFiles = \ - "$${LITERAL_HASH}ifdef WINS" \ - "DEFFILE bwins/vmbxengine.def" \ - "$${LITERAL_HASH}else" \ - "DEFFILE eabi/vmbxengine.def" \ - "$${LITERAL_HASH}endif" - - MMP_RULES += defFiles - - BLD_INF_RULES.prj_exports += \ - "rom/backup_registration.xml /epoc32/data/z/private/100058F5/backup_registration.xml" \ - "conf/voicemailbox.confml MW_LAYER_CONFML(voicemailbox.confml)" \ - "conf/voicemailbox_101F874F.crml MW_LAYER_CRML(voicemailbox_101F874F.crml)" \ - "rom/backup_registration.xml /epoc32/release/winscw/udeb/z/private/100058F5/backup_registration.xml" \ - "rom/backup_registration.xml /epoc32/release/winscw/urel/z/private/100058F5/backup_registration.xml" \ - "rom/vmbxengine_stub.sis /epoc32/data/z/system/install/vmbxengine_stub.sis" \ - "rom/vmbxengine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxengine.iby)" \ - "rom/vmbxresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(vmbxresources.iby)" - - TRANSLATIONS = vmbx.ts - -}