Revision: 201003 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Feb 2010 22:50:26 +0200
branchRCL_3
changeset 9 8871b09be73b
parent 4 c84cf270c54f
child 10 485080d5cb63
child 14 24062c24fe38
Revision: 201003 Kit: 201007
phone_plat/phone_application_commands_api/inc/phoneappcommands.hrh
phone_plat/telephony_information_api/inc/telinformationpstypes.h
phoneapp/phoneui/group/commonphoneapp_icons_scalable.mk
phoneapp/phoneui/group/iconlist.txt
phoneapp/phoneui/help/data/xhtml.zip
phoneapp/phoneui/help/inc/incl.hlp.hrh
phoneapp/phoneui/loc/phone.loc
phoneapp/phoneui/src/cphoneappui.cpp
phoneapp/phoneui/srcdata/phoneui.rss
phoneapp/phoneuicontrol/bwins/phoneuicontrolu.def
phoneapp/phoneuicontrol/eabi/phoneuicontrolu.def
phoneapp/phoneuicontrol/inc/cphoneaccessorybthandler.h
phoneapp/phoneuicontrol/inc/cphonecbamanager.h
phoneapp/phoneuicontrol/inc/cphonestate.h
phoneapp/phoneuicontrol/inc/cphonestateidle.h
phoneapp/phoneuicontrol/src/cphonecbamanager.cpp
phoneapp/phoneuicontrol/src/cphonestate.cpp
phoneapp/phoneuicontrol/src/cphonestateidle.cpp
phoneapp/phoneuicontrol/src/cphonestateincall.cpp
phoneapp/phoneuicontrol/src/cphoneuicontroller.cpp
phoneapp/phoneuistates/bwins/phoneuistatesu.def
phoneapp/phoneuistates/eabi/phoneuistatesu.def
phoneapp/phoneuistates/inc/cphoneconference.h
phoneapp/phoneuistates/inc/cphoneconferenceandsingle.h
phoneapp/phoneuistates/inc/cphoneconferenceandsingleandwaiting.h
phoneapp/phoneuistates/inc/cphoneconferenceandwaiting.h
phoneapp/phoneuistates/src/cphonealerting.cpp
phoneapp/phoneuistates/src/cphoneconference.cpp
phoneapp/phoneuistates/src/cphoneconferenceandcallsetup.cpp
phoneapp/phoneuistates/src/cphoneconferenceandsingle.cpp
phoneapp/phoneuistates/src/cphoneconferenceandsingleandwaiting.cpp
phoneapp/phoneuistates/src/cphoneconferenceandwaiting.cpp
phoneapp/phoneuistates/src/cphoneconferenceandwaitingandcallsetup.cpp
phoneapp/phoneuistates/src/cphoneemergency.cpp
phoneapp/phoneuistates/src/cphonegsmincall.cpp
phoneapp/phoneuistates/src/cphoneincoming.cpp
phoneapp/phoneuistates/src/cphonesingleandalerting.cpp
phoneapp/phoneuistates/src/cphonesingleandcallsetupandwaiting.cpp
phoneapp/phoneuistates/src/cphonesinglecall.cpp
phoneapp/phoneuistates/src/cphonetwosingles.cpp
phoneapp/phoneuistates/src/cphonetwosinglesandwaiting.cpp
phoneapp/phoneuiutils/inc/phoneloggerviewcommands.h
phoneapp/phoneuiutils/inc/phonerssbase.h
phoneapp/phoneuiutils/src/cphonepubsubproxy.cpp
phoneapp/phoneuiutils/src/cphoneresourceresolverbase.cpp
phoneapp/phoneuiutils/src/phoneloggerviewcommands.cpp
phoneapp/phoneuiutils/src/phoneloggerviewcommands.st
phoneapp/phoneuiview/bwins/phoneuiviewu.def
phoneapp/phoneuiview/eabi/phoneuiviewu.def
phoneapp/phoneuiview/group/bld.inf
phoneapp/phoneuiview/group/phoneuiview.mmp
phoneapp/phoneuiview/inc/cphonedialercontroller.h
phoneapp/phoneuiview/inc/cphonedialercontroller.inl
phoneapp/phoneuiview/inc/cphonedialerview.h
phoneapp/phoneuiview/inc/cphonedtmfdialercontroller.h
phoneapp/phoneuiview/inc/cphoneeasydialingcontroller.h
phoneapp/phoneuiview/inc/cphonemenucontroller.h
phoneapp/phoneuiview/inc/cphoneviewcontroller.h
phoneapp/phoneuiview/inc/mphonedialercontroller.h
phoneapp/phoneuiview/inc/phoneviewcommanddefinitions.h
phoneapp/phoneuiview/src/cphoneaudioplayer.cpp
phoneapp/phoneuiview/src/cphonebubblewrapper.cpp
phoneapp/phoneuiview/src/cphonedialercontroller.cpp
phoneapp/phoneuiview/src/cphonedialerview.cpp
phoneapp/phoneuiview/src/cphonedtmfdialercontroller.cpp
phoneapp/phoneuiview/src/cphoneeasydialingcontroller.cpp
phoneapp/phoneuiview/src/cphonemenucontroller.cpp
phoneapp/phoneuiview/src/cphoneringingtoneplayerao.cpp
phoneapp/phoneuiview/src/cphonestatuspane.cpp
phoneapp/phoneuiview/src/cphonetoolbarcontroller.cpp
phoneapp/phoneuiview/src/cphoneview.cpp
phoneapp/phoneuiview/src/cphoneviewcontroller.cpp
phoneapp/phoneuivoipextension/group/phoneuivoipextension.mmp
phoneapp/phoneuivoipextension/inc/cphonecustomizationvoip.h
phoneapp/phoneuivoipextension/inc/cphonetransferdialercontroller.h
phoneapp/phoneuivoipextension/src/cphonecustomizationvoip.cpp
phoneapp/phoneuivoipextension/src/cphonestateidlevoip.cpp
phoneapp/phoneuivoipextension/src/cphonestatesinglevoip.cpp
phoneapp/phoneuivoipextension/src/cphonetransferdialercontroller.cpp
phoneengine/PhoneCntFinder/ContactService/inc/cphcntcontactdataselection.h
phoneengine/PhoneCntFinder/ContactService/src/CPhCntService.cpp
phoneengine/PhoneCntFinder/inc/Misc/MPhCntThumbnailLoaderObserver.h
phoneengine/PhoneCntFinder/src/CPhoneCntFactoryImpl.cpp
phoneengine/callhandling/bwins/callhandlingu.def
phoneengine/callhandling/eabi/callhandlingu.def
phoneengine/callhandling/inc/cpecallhandling.h
phoneengine/callhandling/inc/mpecallhandling.h
phoneengine/callhandling/src/cpecallhandling.cpp
phoneengine/loghandling/inc/cpelogevent.h
phoneengine/loghandling/inc/cpeloghandling.h
phoneengine/loghandling/src/cpelogevent.cpp
phoneengine/loghandling/src/cpeloghandling.cpp
phoneengine/phonemodel/inc/cpemessagehandler.h
phoneengine/phonemodel/src/cpeclientcommandhandlermonitor.cpp
phoneengine/phonemodel/src/cpeexternaldatahandler.cpp
phoneengine/phonemodel/src/cpemessagehandler.cpp
phoneengine/phonemodel/src/cpeparserphonenumberhandler.cpp
phoneengine/phonemodel/src/cpeparsersimcontrolhandler.cpp
phoneengine/phonemodel/src/cpeparservoipnumberhandler.cpp
phoneengine/phonemodel/src/cpepcnparserprocedurehandler.cpp
phoneengine/phonemodel/src/cpephonemodel.cpp
phonesettings/pslncallimageplugin/Data/PslnCallImagePluginRsc.rss
phonesettings/pslncallimageplugin/src/PslnCallImagePlugin.cpp
phonesettings/pslncallimageplugin/src/PslnCallImagePluginDRM.cpp
phoneuis/BubbleManager/Inc/BMTouchPaneButton.h
phoneuis/BubbleManager/Src/BMBubbleManager.cpp
phoneuis/BubbleManager/Src/BMBubbleOutlookFiveLined.cpp
phoneuis/BubbleManager/Src/BMBubbleOutlookNE.cpp
phoneuis/BubbleManager/Src/BMBubbleOutlookOneLined.cpp
phoneuis/BubbleManager/Src/BMBubbleOutlookThreeLined.cpp
phoneuis/BubbleManager/Src/BMBubbleOutlookTwoLined.cpp
phoneuis/BubbleManager/Src/BMTouchPaneButton.cpp
phoneuis/BubbleManager/laf/BMLayout6.cpp
phoneuis/BubbleManager/laf/BMLayout6.h
phoneuis/ConnectUtil/inc/CCoUtlActive.h
phoneuis/ConnectUtil/inc/CCoUtlImplementation.h
phoneuis/ConnectUtil/inc/CCoUtlInterface.h
phoneuis/ConnectUtil/inc/CCoUtlInterface.inl
phoneuis/ConnectUtil/src/CCoUtlActive.cpp
phoneuis/ConnectUtil/src/CoUtlMain.cpp
phoneuis/Ussd/src/UssdEditorLines.cpp
phoneuis/dialer/bwins/dialeru.def
phoneuis/dialer/data/dialer.pkg
phoneuis/dialer/data/dialer.rss
phoneuis/dialer/data/dialer_stub.pkg
phoneuis/dialer/data/dialer_stub.sis
phoneuis/dialer/data/dialerkeypad.rh
phoneuis/dialer/data/dialerkeypad.rss
phoneuis/dialer/data/dialerkeypad_arabic.rss
phoneuis/dialer/data/dialerkeypad_chn_pinyin.rss
phoneuis/dialer/data/dialerkeypad_chn_stroke.rss
phoneuis/dialer/data/dialerkeypad_chn_zhuyin.rss
phoneuis/dialer/data/dialerkeypad_cyrillic.rss
phoneuis/dialer/data/dialerkeypad_devanagari.rss
phoneuis/dialer/data/dialerkeypad_farsi.rss
phoneuis/dialer/data/dialerkeypad_greek.rss
phoneuis/dialer/data/dialerkeypad_hebrew.rss
phoneuis/dialer/data/dialerkeypad_thai.rss
phoneuis/dialer/data/dialerkeypad_urdu.rss
phoneuis/dialer/eabi/dialeru.def
phoneuis/dialer/group/bld.inf
phoneuis/dialer/group/dialer.mmp
phoneuis/dialer/group/dialerstub.mmp
phoneuis/dialer/group/iconlist.txt
phoneuis/dialer/inc/cdialer.h
phoneuis/dialer/inc/cdialercenrepwrapper.h
phoneuis/dialer/inc/cdialerkeypadbutton.h
phoneuis/dialer/inc/cdialerkeypadcontainer.h
phoneuis/dialer/inc/cdialerkeypadlabelmanager.h
phoneuis/dialer/inc/cdialernumberentry.h
phoneuis/dialer/inc/cdialertoolbarcontainer.h
phoneuis/dialer/inc/cdialingextensionobserver.h
phoneuis/dialer/inc/dialer.hrh
phoneuis/dialer/inc/dialercommon.h
phoneuis/dialer/inc/mnumberentry.h
phoneuis/dialer/rom/dialer_variant.iby
phoneuis/dialer/src/cdialer.cpp
phoneuis/dialer/src/cdialercenrepwrapper.cpp
phoneuis/dialer/src/cdialerkeypadbutton.cpp
phoneuis/dialer/src/cdialerkeypadcontainer.cpp
phoneuis/dialer/src/cdialerkeypadlabelmanager.cpp
phoneuis/dialer/src/cdialernumberentry.cpp
phoneuis/dialer/src/cdialerstub.cpp
phoneuis/dialer/src/cdialertoolbarcontainer.cpp
phoneuis/dialer/src/cdialingextensionobserver.cpp
phoneuis/easydialing/cenrep/200212A0.txt
phoneuis/easydialing/conf/easydialing.confml
phoneuis/easydialing/conf/easydialing_200212A0.crml
phoneuis/easydialing/data/200212A0.rss
phoneuis/easydialing/data/easydialing_stub.pkg
phoneuis/easydialing/data/easydialing_stub.sis
phoneuis/easydialing/data/easydialingpluginresources.rss
phoneuis/easydialing/edcontactor/bwins/edcontactoru.def
phoneuis/easydialing/edcontactor/data/edcontactor.rss
phoneuis/easydialing/edcontactor/eabi/edcontactoru.def
phoneuis/easydialing/edcontactor/group/bld.inf
phoneuis/easydialing/edcontactor/group/edcontactor.mmp
phoneuis/easydialing/edcontactor/inc/edcontactor.h
phoneuis/easydialing/edcontactor/inc/edcontactorcalloperation.h
phoneuis/easydialing/edcontactor/inc/edcontactoremailoperation.h
phoneuis/easydialing/edcontactor/inc/edcontactorheaders.h
phoneuis/easydialing/edcontactor/inc/edcontactorimoperation.h
phoneuis/easydialing/edcontactor/inc/edcontactoroperation.h
phoneuis/easydialing/edcontactor/inc/edcontactorpopuphandler.h
phoneuis/easydialing/edcontactor/inc/edcontactorservice.h
phoneuis/easydialing/edcontactor/inc/edcontactorserviceheaders.h
phoneuis/easydialing/edcontactor/inc/edcontactorserviceoperator.h
phoneuis/easydialing/edcontactor/inc/edcontactorunieditoroperation.h
phoneuis/easydialing/edcontactor/inc/edcontactorvideocalloperation.h
phoneuis/easydialing/edcontactor/inc/edcontactorvoipoperation.h
phoneuis/easydialing/edcontactor/inc/edmsgeditors.h
phoneuis/easydialing/edcontactor/inc/edphonecall.h
phoneuis/easydialing/edcontactor/inc/medcontactorobserver.h
phoneuis/easydialing/edcontactor/src/edcontactor.cpp
phoneuis/easydialing/edcontactor/src/edcontactorcalloperation.cpp
phoneuis/easydialing/edcontactor/src/edcontactoremailoperation.cpp
phoneuis/easydialing/edcontactor/src/edcontactorimoperation.cpp
phoneuis/easydialing/edcontactor/src/edcontactoroperation.cpp
phoneuis/easydialing/edcontactor/src/edcontactorpopuphandler.cpp
phoneuis/easydialing/edcontactor/src/edcontactorservice.cpp
phoneuis/easydialing/edcontactor/src/edcontactorserviceoperator.cpp
phoneuis/easydialing/edcontactor/src/edcontactorunieditoroperation.cpp
phoneuis/easydialing/edcontactor/src/edcontactorvideocalloperation.cpp
phoneuis/easydialing/edcontactor/src/edcontactorvoipoperation.cpp
phoneuis/easydialing/edcontactor/src/edmsgeditors.cpp
phoneuis/easydialing/edcontactor/src/edphonecall.cpp
phoneuis/easydialing/group/bld.inf
phoneuis/easydialing/group/easydialingplugin.mmp
phoneuis/easydialing/group/iconlist.txt
phoneuis/easydialing/inc/dialingextensioninterface.h
phoneuis/easydialing/inc/easydialingcenreplistener.h
phoneuis/easydialing/inc/easydialingcommands.hrh
phoneuis/easydialing/inc/easydialingconstants.hrh
phoneuis/easydialing/inc/easydialingcontactdata.h
phoneuis/easydialing/inc/easydialingcontactdatamanager.h
phoneuis/easydialing/inc/easydialingcrkeys.h
phoneuis/easydialing/inc/easydialinglistbox.h
phoneuis/easydialing/inc/easydialinglistboxdata.h
phoneuis/easydialing/inc/easydialinglistboxitemdrawer.h
phoneuis/easydialing/inc/easydialinglistboxview.h
phoneuis/easydialing/inc/easydialinglogger.h
phoneuis/easydialing/inc/easydialingpanics.h
phoneuis/easydialing/inc/easydialingplugin.h
phoneuis/easydialing/inc/easydialingutils.h
phoneuis/easydialing/inc/mcontactdatamanagerobserver.h
phoneuis/easydialing/inc/measydialingcenreplistenerobserver.h
phoneuis/easydialing/layers.sysdef.xml
phoneuis/easydialing/loc/easydialing.loc
phoneuis/easydialing/rom/easydialingplugin.iby
phoneuis/easydialing/rom/easydialingpluginresources.iby
phoneuis/easydialing/src/dllmain.cpp
phoneuis/easydialing/src/easydialingcenreplistener.cpp
phoneuis/easydialing/src/easydialingcontactdata.cpp
phoneuis/easydialing/src/easydialingcontactdatamanager.cpp
phoneuis/easydialing/src/easydialinglistbox.cpp
phoneuis/easydialing/src/easydialinglistboxdata.cpp
phoneuis/easydialing/src/easydialinglistboxitemdrawer.cpp
phoneuis/easydialing/src/easydialinglistboxview.cpp
phoneuis/easydialing/src/easydialingplugin.cpp
phoneuis/easydialing/src/easydialingutils.cpp
phoneuis/easydialing/traces/OstTraceDefinitions.h
phoneuis/easydialing/traces/easydialingpluginTraces.h
phoneuis/easydialing/tsrc/edta/data/edta.rls
phoneuis/easydialing/tsrc/edta/data/edta.rss
phoneuis/easydialing/tsrc/edta/data/edta_reg.rss
phoneuis/easydialing/tsrc/edta/gfx/qgn_menu_edta.svg
phoneuis/easydialing/tsrc/edta/group/Icons_scalable_dc.mk
phoneuis/easydialing/tsrc/edta/group/bld.inf
phoneuis/easydialing/tsrc/edta/group/edta.mmp
phoneuis/easydialing/tsrc/edta/inc/edta.hrh
phoneuis/easydialing/tsrc/edta/inc/edta.pan
phoneuis/easydialing/tsrc/edta/inc/edta_application.h
phoneuis/easydialing/tsrc/edta/inc/edta_appui.h
phoneuis/easydialing/tsrc/edta/inc/edta_appview.h
phoneuis/easydialing/tsrc/edta/inc/edta_debugprint.h
phoneuis/easydialing/tsrc/edta/inc/edta_document.h
phoneuis/easydialing/tsrc/edta/inc/edta_dummylistener.h
phoneuis/easydialing/tsrc/edta/inc/edta_querydialog.h
phoneuis/easydialing/tsrc/edta/inc/edta_screentextbuffer.h
phoneuis/easydialing/tsrc/edta/rom/edta.iby
phoneuis/easydialing/tsrc/edta/rom/edta_resources.iby
phoneuis/easydialing/tsrc/edta/sis/backup_registration.xml
phoneuis/easydialing/tsrc/edta/sis/edta_armv5.pkg
phoneuis/easydialing/tsrc/edta/sis/edta_armv5_udeb.pkg
phoneuis/easydialing/tsrc/edta/src/edta.cpp
phoneuis/easydialing/tsrc/edta/src/edta_application.cpp
phoneuis/easydialing/tsrc/edta/src/edta_appui.cpp
phoneuis/easydialing/tsrc/edta/src/edta_appview.cpp
phoneuis/easydialing/tsrc/edta/src/edta_createtestcontactbase.cpp
phoneuis/easydialing/tsrc/edta/src/edta_document.cpp
phoneuis/easydialing/tsrc/edta/src/edta_dummylistener.cpp
phoneuis/easydialing/tsrc/edta/src/edta_querydialog.cpp
phoneuis/easydialing/tsrc/edta/src/edta_screentextbuffer.cpp
phoneuis/easydialing/tsrc/t_easydialingplugin/group/UT_easydialingplugin.mmp
phoneuis/easydialing/tsrc/t_easydialingplugin/group/bld.inf
phoneuis/easydialing/tsrc/t_easydialingplugin/inc/CEasyDialingPlugin_Test.h
phoneuis/easydialing/tsrc/t_easydialingplugin/inc/dummyparentcontrol.h
phoneuis/easydialing/tsrc/t_easydialingplugin/src/CEasyDialingPlugin_Test.cpp
phoneuis/easydialing/tsrc/t_easydialingplugin/src/DllMain.cpp
phoneuis/easydialing/tsrc/t_easydialingplugin/src/createtestcontactbase.cpp
phoneuis/easydialing/tsrc/t_easydialingplugin/src/dummyparentcontrol.cpp
phoneuis/group/bld.inf
phoneuis/vmbx/help/data/xhtml.zip
phoneuis/vmbx/help/inc/smsvo.hlp.hrh
--- a/phone_plat/phone_application_commands_api/inc/phoneappcommands.hrh	Tue Feb 02 00:10:04 2010 +0200
+++ b/phone_plat/phone_application_commands_api/inc/phoneappcommands.hrh	Fri Feb 19 22:50:26 2010 +0200
@@ -219,7 +219,16 @@
     EPhoneIsCustomizedDialerVisible,
 
     EPhoneCmdVideoCallOutOfMemory,
-   
+
+    // dialer and easy dialing releated commands
+    EEasyDialingSettingsItemPlaceHolder,
+    EEasyDialingCmdSelect,
+    EPhoneDialerValidNumber,
+    EPhoneDialerInvalidNumber,
+    EPhoneCmdUpdateCba,
+    EPhoneCmdBlockingDialogLaunched,
+    EPhoneCmdBlockingDialogClosed,
+
     EPhoneCmdLast
     };
     
--- a/phone_plat/telephony_information_api/inc/telinformationpstypes.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phone_plat/telephony_information_api/inc/telinformationpstypes.h	Fri Feb 19 22:50:26 2010 +0200
@@ -21,7 +21,7 @@
 
 // INCLUDES
 #include <cntdef.h>
-#include <phclttypes.h>
+#include <PhCltTypes.h>
 
 // CONSTANTS
 
--- a/phoneapp/phoneui/group/commonphoneapp_icons_scalable.mk	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneui/group/commonphoneapp_icons_scalable.mk	Fri Feb 19 22:50:26 2010 +0200
@@ -83,7 +83,9 @@
 		/c8,8 qgn_indi_dialer_add_contacts.svg \
 		/c8,8 qgn_indi_dialer_logs.svg \
 		/c8,8 qgn_indi_button_send_dtmf.svg \
-		/c8,8 qgn_indi_button_silence.svg
+		/c8,8 qgn_indi_button_silence.svg \
+		/c8,8 qgn_indi_button_answer_white.svg \
+		/c8,8 qgn_indi_button_logdialer_white.svg \
 
 FREEZE : do_nothing
 
--- a/phoneapp/phoneui/group/iconlist.txt	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneui/group/iconlist.txt	Fri Feb 19 22:50:26 2010 +0200
@@ -29,4 +29,6 @@
 -c8,8 qgn_indi_tb_microphone_unmute
 -c8,8 qgn_indi_tb_ihf_on 
 -c8,8 qgn_indi_tb_handset
--c8,8 qgn_indi_tb_bthf
\ No newline at end of file
+-c8,8 qgn_indi_tb_bthf
+-c8,8 qgn_indi_button_answer_white
+-c8,8 qgn_indi_button_logdialer_white
\ No newline at end of file
Binary file phoneapp/phoneui/help/data/xhtml.zip has changed
--- a/phoneapp/phoneui/help/inc/incl.hlp.hrh	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneui/help/inc/incl.hlp.hrh	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
--- a/phoneapp/phoneui/loc/phone.loc	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneui/loc/phone.loc	Fri Feb 19 22:50:26 2010 +0200
@@ -451,4 +451,10 @@
 //
 #define qtn_called_number_has_barred_incoming_calls "Called number has barred incoming calls"
 
+//d: Permanent note Invalid Card. Shown when the Sim inserted is not same as 
+//d: the one provided by the operator.
+//l: popup_note_window
+//w:
+//r: 5.0
+#define text_invalid_card "Invalid card"
 // End of File
--- a/phoneapp/phoneui/src/cphoneappui.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneui/src/cphoneappui.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -109,6 +109,10 @@
     BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
     SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort | CAknAppUiBase::EDisableSendKeyLong );
     
+    // Item specific soft key IS DISABLED in order to make SK1 visible with easy dialing.
+    CEikCba* cba = static_cast<CEikCba*>( CEikButtonGroupContainer::Current()->ButtonGroup() );
+    cba->EnableItemSpecificSoftkey( EFalse );
+    
     SetAliasKeyCodeResolverL( this );
     
     // Set phone application to be system application so it can't be closed
--- a/phoneapp/phoneui/srcdata/phoneui.rss	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneui/srcdata/phoneui.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -6235,20 +6235,19 @@
     buf = qtn_bt_dev_address;
     }
 
-
-// ---------------------------------------------------------
-//
-//    r_phone_information_note_with_wait
+// ---------------------------------------------------------
+//
+//    r_phone_information_note_with_cba
 //    It defines note template for information notes. Text
 //    must be replaced to correct in code. Note has wait
 //    flag.
 //
 // ---------------------------------------------------------
 //
-RESOURCE DIALOG r_phone_information_note_with_wait
+RESOURCE DIALOG r_phone_information_note_with_cba
     {
     flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar |
-            EEikDialogFlagCbaButtons | EEikDialogFlagWait;
+            EEikDialogFlagCbaButtons;
     buttons = r_phoneui_wait_note_cba;
     items =
         {
@@ -6999,7 +6998,16 @@
     buf = text_sim_lock_active;
     }
 
-
+// -----------------------------------------------------------------------------
+//
+//    r_sim_invalid_uicc
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_sim_invalid_uicc
+    {
+    buf = text_invalid_card;
+    }      
 
 // -----------------------------------------------------------------------------
 //
@@ -7729,6 +7737,11 @@
             },
         MENU_ITEM
             {
+            command = EEasyDialingSettingsItemPlaceHolder;
+            flags = EEikMenuItemDimmed;
+            },
+        MENU_ITEM
+            {
             command = EAknCmdEditItemPlaceHolder;
             },
        MENU_ITEM
--- a/phoneapp/phoneuicontrol/bwins/phoneuicontrolu.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/bwins/phoneuicontrolu.def	Fri Feb 19 22:50:26 2010 +0200
@@ -6,230 +6,231 @@
 	?HandleKeyMessageL@CPhoneStateCallSetup@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 5 NONAME ; void CPhoneStateCallSetup::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
 	?SetContextMenuL@CPhoneState@@MAEXH@Z @ 6 NONAME ; void CPhoneState::SetContextMenuL(int)
 	?CallFetchedNumberL@CPhoneStateInCall@@MAEXABVTDesC16@@@Z @ 7 NONAME ; void CPhoneStateInCall::CallFetchedNumberL(class TDesC16 const &)
-	?SetCbaL@CPhoneCbaManager@@QAEXH@Z @ 8 NONAME ; void CPhoneCbaManager::SetCbaL(int)
-	?InstanceL@CPhoneReconnectQuery@@SAPAV1@XZ @ 9 NONAME ; class CPhoneReconnectQuery * CPhoneReconnectQuery::InstanceL(void)
-	?HandlePhoneStartupL@CPhoneState@@UAEXXZ @ 10 NONAME ; void CPhoneState::HandlePhoneStartupL(void)
-	?HandlePhoneFocusLostEventL@CPhoneStateIdle@@UAEXXZ @ 11 NONAME ; void CPhoneStateIdle::HandlePhoneFocusLostEventL(void)
-	?HandleIdleL@CPhoneStateInCall@@IAEXH@Z @ 12 NONAME ; void CPhoneStateInCall::HandleIdleL(int)
-	?ShowQueryL@CPhoneState@@IAEXH@Z @ 13 NONAME ; void CPhoneState::ShowQueryL(int)
-	?PhoneNumberAvailableInPhoneEngineL@CPhoneStateInCall@@IAEXH@Z @ 14 NONAME ; void CPhoneStateInCall::PhoneNumberAvailableInPhoneEngineL(int)
-	?DisplayCallTerminationNoteL@CPhoneState@@IAEXXZ @ 15 NONAME ; void CPhoneState::DisplayCallTerminationNoteL(void)
-	??0CPhoneStateInCall@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 16 NONAME ; CPhoneStateInCall::CPhoneStateInCall(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
-	?HandleNumberLongKeyPressL@CPhoneStateIdle@@IAEXXZ @ 17 NONAME ; void CPhoneStateIdle::HandleNumberLongKeyPressL(void)
-	?PhoneEngine@CPhoneStateMachine@@UAEPAVMPEPhoneModel@@XZ @ 18 NONAME ; class MPEPhoneModel * CPhoneStateMachine::PhoneEngine(void)
-	?OpenMenuBarL@CPhoneStateCallSetup@@MAEXXZ @ 19 NONAME ; void CPhoneStateCallSetup::OpenMenuBarL(void)
-	??1CPhoneStateCallSetup@@UAE@XZ @ 20 NONAME ; CPhoneStateCallSetup::~CPhoneStateCallSetup(void)
-	?HandleEnvironmentChangeL@CPhoneUIController@@UAEXH@Z @ 21 NONAME ; void CPhoneUIController::HandleEnvironmentChangeL(int)
-	?Instance@CPhoneStateHandle@@SAPAV1@XZ @ 22 NONAME ; class CPhoneStateHandle * CPhoneStateHandle::Instance(void)
-	?HandleNumberEntryClearedL@CPhoneStateIdle@@MAEXXZ @ 23 NONAME ; void CPhoneStateIdle::HandleNumberEntryClearedL(void)
-	?DynInitMenuPaneL@CPhoneStateIncoming@@MAEXHPAVCEikMenuPane@@@Z @ 24 NONAME ; void CPhoneStateIncoming::DynInitMenuPaneL(int, class CEikMenuPane *)
-	?HandleCommandL@CPhoneState@@UAEHH@Z @ 25 NONAME ; int CPhoneState::HandleCommandL(int)
-	?StartAlsLineChangeTimerL@CPhoneState@@IAEXXZ @ 26 NONAME ; void CPhoneState::StartAlsLineChangeTimerL(void)
-	?IsNumberEntryVisibleL@CPhoneState@@QAEHXZ @ 27 NONAME ; int CPhoneState::IsNumberEntryVisibleL(void)
-	?RetainPreviousKeylockStateL@CPhoneState@@QAEXXZ @ 28 NONAME ; void CPhoneState::RetainPreviousKeylockStateL(void)
-	?HandlePhoneEngineMessageL@CPhoneStateIdle@@UAEXHH@Z @ 29 NONAME ; void CPhoneStateIdle::HandlePhoneEngineMessageL(int, int)
-	?HandleDialingL@CPhoneStateIdle@@MAEXH@Z @ 30 NONAME ; void CPhoneStateIdle::HandleDialingL(int)
-	?CustomizedDialerCbaResourceIdL@CPhoneState@@IAEHXZ @ 31 NONAME ; int CPhoneState::CustomizedDialerCbaResourceIdL(void)
-	?CaptureKeysDuringCallNotificationL@CPhoneState@@IAEXH@Z @ 32 NONAME ; void CPhoneState::CaptureKeysDuringCallNotificationL(int)
-	?HandleKeyPressDurationL@CPhoneState@@UAEXW4TKeyCode@@VTTimeIntervalMicroSeconds@@@Z @ 33 NONAME ; void CPhoneState::HandleKeyPressDurationL(enum TKeyCode, class TTimeIntervalMicroSeconds)
-	?ChangeState@CPhoneStateMachine@@UAEXH@Z @ 34 NONAME ; void CPhoneStateMachine::ChangeState(int)
-	?IsSimStateNotPresentWithSecurityModeEnabled@CPhoneState@@IAEHXZ @ 35 NONAME ; int CPhoneState::IsSimStateNotPresentWithSecurityModeEnabled(void)
-	?HandlePhoneEngineMessageL@CPhoneState@@UAEXHH@Z @ 36 NONAME ; void CPhoneState::HandlePhoneEngineMessageL(int, int)
-	?HandleNumberEntryClearedL@CPhoneStateIncoming@@UAEXXZ @ 37 NONAME ; void CPhoneStateIncoming::HandleNumberEntryClearedL(void)
-	?HandleKeyEventL@CPhoneUIController@@UAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 38 NONAME ; enum TKeyResponse CPhoneUIController::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?HandleRemConCommandL@CPhoneStateIdle@@MAEHW4TRemConCoreApiOperationId@@W4TRemConCoreApiButtonAction@@@Z @ 39 NONAME ; int CPhoneStateIdle::HandleRemConCommandL(enum TRemConCoreApiOperationId, enum TRemConCoreApiButtonAction)
-	?HandleAudioPlayStoppedL@CPhoneStateIncoming@@MAEXXZ @ 40 NONAME ; void CPhoneStateIncoming::HandleAudioPlayStoppedL(void)
-	?HandleCenRepChangeL@CPhoneState@@UAEXABVTUid@@I@Z @ 41 NONAME ; void CPhoneState::HandleCenRepChangeL(class TUid const &, unsigned int)
-	?HandleLongHashL@CPhoneState@@UAEXXZ @ 42 NONAME ; void CPhoneState::HandleLongHashL(void)
-	?DialL@CPhoneStateIdle@@MAEXABVTDesC16@@W4TPhoneNumberType@@W4TDialInitiationMethod@1@@Z @ 43 NONAME ; void CPhoneStateIdle::DialL(class TDesC16 const &, enum TPhoneNumberType, enum CPhoneStateIdle::TDialInitiationMethod)
-	?ShowNumberBusyNoteL@CPhoneState@@IAEXXZ @ 44 NONAME ; void CPhoneState::ShowNumberBusyNoteL(void)
-	?DisconnectCallL@CPhoneState@@IAEHXZ @ 45 NONAME ; int CPhoneState::DisconnectCallL(void)
-	?HandleNumberEntryClearedL@CPhoneStateCallSetup@@MAEXXZ @ 46 NONAME ; void CPhoneStateCallSetup::HandleNumberEntryClearedL(void)
-	?HandleIdleForegroundEventL@CPhoneStateIdle@@UAEXXZ @ 47 NONAME ; void CPhoneStateIdle::HandleIdleForegroundEventL(void)
-	?HandleDisconnectingL@CPhoneState@@IAEXH@Z @ 48 NONAME ; void CPhoneState::HandleDisconnectingL(int)
-	?HandleAudioMuteChangedL@CPhoneState@@IAEXXZ @ 49 NONAME ; void CPhoneState::HandleAudioMuteChangedL(void)
-	?HandleKeyLockEnabled@CPhoneState@@UAEXH@Z @ 50 NONAME ; void CPhoneState::HandleKeyLockEnabled(int)
-	?HandleCommandL@CPhoneStateIncoming@@UAEHH@Z @ 51 NONAME ; int CPhoneStateIncoming::HandleCommandL(int)
-	?UpdateSingleActiveCallL@CPhoneState@@IAEXH@Z @ 52 NONAME ; void CPhoneState::UpdateSingleActiveCallL(int)
-	?IsOnScreenDialerSupported@CPhoneState@@IBEHXZ @ 53 NONAME ; int CPhoneState::IsOnScreenDialerSupported(void) const
-	?SimState@CPhoneState@@IBE?AW4TPESimState@@XZ @ 54 NONAME ; enum TPESimState CPhoneState::SimState(void) const
-	?HandleKeyEventL@CPhoneStateCallSetup@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 55 NONAME ; void CPhoneStateCallSetup::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?SetupIdleScreenInBackgroundL@CPhoneState@@IAEXXZ @ 56 NONAME ; void CPhoneState::SetupIdleScreenInBackgroundL(void)
-	?SendGlobalWarningNoteL@CPhoneState@@IAEXH@Z @ 57 NONAME ; void CPhoneState::SendGlobalWarningNoteL(int)
-	?CompleteSatRequestL@CPhoneState@@IAEXH@Z @ 58 NONAME ; void CPhoneState::CompleteSatRequestL(int)
-	?NewL@CPhoneStateStartup@@SAPAV1@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 59 NONAME ; class CPhoneStateStartup * CPhoneStateStartup::NewL(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
-	?LaunchNewCallQueryL@CPhoneStateInCall@@IAEXXZ @ 60 NONAME ; void CPhoneStateInCall::LaunchNewCallQueryL(void)
-	?NeedToSendToBackgroundL@CPhoneState@@IBEHXZ @ 61 NONAME ; int CPhoneState::NeedToSendToBackgroundL(void) const
-	?SetCallHeaderTextsForCallComingInL@CPhoneState@@IAEXHHPAVTPhoneCmdParamCallHeaderData@@@Z @ 62 NONAME ; void CPhoneState::SetCallHeaderTextsForCallComingInL(int, int, class TPhoneCmdParamCallHeaderData *)
-	?IsSimOk@CPhoneState@@QAEHXZ @ 63 NONAME ; int CPhoneState::IsSimOk(void)
-	?ClearNumberEntryContentCache@CPhoneState@@IAEXXZ @ 64 NONAME ; void CPhoneState::ClearNumberEntryContentCache(void)
-	?HandleCommandL@CPhoneStateIdle@@UAEHH@Z @ 65 NONAME ; int CPhoneStateIdle::HandleCommandL(int)
-	?ViewCommandHandle@CPhoneStateHandle@@QAEPAVMPhoneViewCommandHandle@@XZ @ 66 NONAME ; class MPhoneViewCommandHandle * CPhoneStateHandle::ViewCommandHandle(void)
-	?DialMultimediaCallL@CPhoneStateIdle@@IAEXXZ @ 67 NONAME ; void CPhoneStateIdle::DialMultimediaCallL(void)
-	?DisconnectOutgoingCallL@CPhoneStateInCall@@IAEXXZ @ 68 NONAME ; void CPhoneStateInCall::DisconnectOutgoingCallL(void)
-	?IsKeyLockOn@CPhoneState@@MBEHXZ @ 69 NONAME ; int CPhoneState::IsKeyLockOn(void) const
-	??1CPhoneStateInCall@@UAE@XZ @ 70 NONAME ; CPhoneStateInCall::~CPhoneStateInCall(void)
-	?CustomizedDialerMenuResourceIdL@CPhoneState@@IAEHXZ @ 71 NONAME ; int CPhoneState::CustomizedDialerMenuResourceIdL(void)
-	?ShowReconnectQueryL@CPhoneReconnectQuery@@QAEXH@Z @ 72 NONAME ; void CPhoneReconnectQuery::ShowReconnectQueryL(int)
-	?UpdateSilenceButtonDimming@CPhoneState@@IAEXXZ @ 73 NONAME ; void CPhoneState::UpdateSilenceButtonDimming(void)
-	?SetNumberEntryVisibilityL@CPhoneState@@IAEXH@Z @ 74 NONAME ; void CPhoneState::SetNumberEntryVisibilityL(int)
-	?HandleError@CPhoneUIController@@UAEXABUTPEErrorInfo@@@Z @ 75 NONAME ; void CPhoneUIController::HandleError(struct TPEErrorInfo const &)
-	?ConstructL@CPhoneStateInCall@@MAEXXZ @ 76 NONAME ; void CPhoneStateInCall::ConstructL(void)
-	?OnlyHashInNumberEntryL@CPhoneStateIdle@@MAEXXZ @ 77 NONAME ; void CPhoneStateIdle::OnlyHashInNumberEntryL(void)
-	?IsVideoCallRingingL@CPhoneStateInCall@@MAEHXZ @ 78 NONAME ; int CPhoneStateInCall::IsVideoCallRingingL(void)
-	?HandlePhoneForegroundEventL@CPhoneStateIdle@@UAEXXZ @ 79 NONAME ; void CPhoneStateIdle::HandlePhoneForegroundEventL(void)
-	?HandleHoldSwitchL@CPhoneState@@QAEXXZ @ 80 NONAME ; void CPhoneState::HandleHoldSwitchL(void)
-	?CloseDtmfQueryL@CPhoneStateInCall@@IAEXXZ @ 81 NONAME ; void CPhoneStateInCall::CloseDtmfQueryL(void)
-	?DynInitMenuBarL@CPhoneState@@UAEXHPAVCEikMenuBar@@@Z @ 82 NONAME ; void CPhoneState::DynInitMenuBarL(int, class CEikMenuBar *)
-	?HandleDtmfKeyToneL@CPhoneStateStartup@@EAEXABUTKeyEvent@@W4TEventCode@@@Z @ 83 NONAME ; void CPhoneStateStartup::HandleDtmfKeyToneL(struct TKeyEvent const &, enum TEventCode)
-	?HandleNumberEntryEdited@CPhoneState@@MAEXXZ @ 84 NONAME ; void CPhoneState::HandleNumberEntryEdited(void)
-	?ShowTextQueryL@CPhoneState@@IAEXHHHPAVTDes16@@H@Z @ 85 NONAME ; void CPhoneState::ShowTextQueryL(int, int, int, class TDes16 *, int)
-	?DialMultimediaCallL@CPhoneState@@IAEXXZ @ 86 NONAME ; void CPhoneState::DialMultimediaCallL(void)
-	?NewL@CPhoneUIController@@SAPAV1@PAVMPhoneViewCommandHandle@@@Z @ 87 NONAME ; class CPhoneUIController * CPhoneUIController::NewL(class MPhoneViewCommandHandle *)
-	?HandleCreateNumberEntryL@CPhoneStateStartup@@EAEXABUTKeyEvent@@W4TEventCode@@@Z @ 88 NONAME ; void CPhoneStateStartup::HandleCreateNumberEntryL(struct TKeyEvent const &, enum TEventCode)
-	?CheckDisableHWKeysAndCallUIL@CPhoneState@@QAEXXZ @ 89 NONAME ; void CPhoneState::CheckDisableHWKeysAndCallUIL(void)
-	?IsMenuBarVisibleL@CPhoneState@@UBEHXZ @ 90 NONAME ; int CPhoneState::IsMenuBarVisibleL(void) const
-	?HandleErrorL@CPhoneState@@UAEXABUTPEErrorInfo@@@Z @ 91 NONAME ; void CPhoneState::HandleErrorL(struct TPEErrorInfo const &)
-	?HandleCommandL@CPhoneStateCallSetup@@UAEHH@Z @ 92 NONAME ; int CPhoneStateCallSetup::HandleCommandL(int)
-	?HandleAudioOutputChangedL@CPhoneState@@IAEXXZ @ 93 NONAME ; void CPhoneState::HandleAudioOutputChangedL(void)
-	??1CPhoneUIController@@UAE@XZ @ 94 NONAME ; CPhoneUIController::~CPhoneUIController(void)
-	?HandleKeyEventL@CPhoneState@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 95 NONAME ; void CPhoneState::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?UpdateIncomingContextMenuL@CPhoneState@@MAEXH@Z @ 96 NONAME ; void CPhoneState::UpdateIncomingContextMenuL(int)
-	?OpenMenuBarL@CPhoneStateInCall@@MAEXXZ @ 97 NONAME ; void CPhoneStateInCall::OpenMenuBarL(void)
-	?UpdateIncomingCbaL@CPhoneCbaManager@@QAEXH@Z @ 98 NONAME ; void CPhoneCbaManager::UpdateIncomingCbaL(int)
-	?SetTouchPaneButtonDisabled@CPhoneState@@IAEXH@Z @ 99 NONAME ; void CPhoneState::SetTouchPaneButtonDisabled(int)
-	?ConstructL@CPhoneStateIncoming@@MAEXXZ @ 100 NONAME ; void CPhoneStateIncoming::ConstructL(void)
-	?CreatePhoneEngineL@CPhoneStateMachine@@UAEPAVMPEPhoneModel@@AAVMEngineMonitor@@@Z @ 101 NONAME ; class MPEPhoneModel * CPhoneStateMachine::CreatePhoneEngineL(class MEngineMonitor &)
-	?SetTouchPaneButtons@CPhoneState@@IAEXH@Z @ 102 NONAME ; void CPhoneState::SetTouchPaneButtons(int)
-	?HandleIdleForegroundEventL@CPhoneStateStartup@@UAEXXZ @ 103 NONAME ; void CPhoneStateStartup::HandleIdleForegroundEventL(void)
-	?CallFromNumberEntryL@CPhoneState@@IAEXXZ @ 104 NONAME ; void CPhoneState::CallFromNumberEntryL(void)
-	?UpdateCbaL@CPhoneCbaManager@@QAEXH@Z @ 105 NONAME ; void CPhoneCbaManager::UpdateCbaL(int)
-	?IsVideoCall@CPhoneState@@IAEHH@Z @ 106 NONAME ; int CPhoneState::IsVideoCall(int)
-	?IsSwivelClosed@CPhoneState@@QBEHXZ @ 107 NONAME ; int CPhoneState::IsSwivelClosed(void) const
-	?CloseCustomizedDialerL@CPhoneState@@QAEXXZ @ 108 NONAME ; void CPhoneState::CloseCustomizedDialerL(void)
-	?HandlePhoneForegroundEventL@CPhoneUIController@@UAEXXZ @ 109 NONAME ; void CPhoneUIController::HandlePhoneForegroundEventL(void)
-	?CheckIfRestoreNEContentAfterDtmfDialer@CPhoneState@@IAEXXZ @ 110 NONAME ; void CPhoneState::CheckIfRestoreNEContentAfterDtmfDialer(void)
-	?UpdateInCallContextMenuL@CPhoneState@@UAEXXZ @ 111 NONAME ; void CPhoneState::UpdateInCallContextMenuL(void)
-	?HandleNumericKeyEventL@CPhoneState@@MAEXABUTKeyEvent@@W4TEventCode@@@Z @ 112 NONAME ; void CPhoneState::HandleNumericKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?SendGlobalErrorNoteL@CPhoneState@@QAEXH@Z @ 113 NONAME ; void CPhoneState::SendGlobalErrorNoteL(int)
-	?IsAutoLockOn@CPhoneState@@UBEHXZ @ 114 NONAME ; int CPhoneState::IsAutoLockOn(void) const
-	?UpdateCbaL@CPhoneStateCallSetup@@MAEXH@Z @ 115 NONAME ; void CPhoneStateCallSetup::UpdateCbaL(int)
-	?RestoreNumberEntryContentL@CPhoneState@@IAEXXZ @ 116 NONAME ; void CPhoneState::RestoreNumberEntryContentL(void)
-	?HandleKeyEventL@CPhoneStateIdle@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 117 NONAME ; void CPhoneStateIdle::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?IsNumberEntryContentStored@CPhoneState@@IAEHXZ @ 118 NONAME ; int CPhoneState::IsNumberEntryContentStored(void)
-	?IsVideoCallActiveL@CPhoneStateInCall@@MAEHXZ @ 119 NONAME ; int CPhoneStateInCall::IsVideoCallActiveL(void)
-	?HandlePhoneStartupL@CPhoneStateStartup@@UAEXXZ @ 120 NONAME ; void CPhoneStateStartup::HandlePhoneStartupL(void)
-	?DialVoiceCallL@CPhoneState@@IAEXXZ @ 121 NONAME ; void CPhoneState::DialVoiceCallL(void)
-	?EndUiUpdate@CPhoneState@@IAEXXZ @ 122 NONAME ; void CPhoneState::EndUiUpdate(void)
-	?HandleKeyPressDurationL@CPhoneStateIncoming@@UAEXW4TKeyCode@@VTTimeIntervalMicroSeconds@@@Z @ 123 NONAME ; void CPhoneStateIncoming::HandleKeyPressDurationL(enum TKeyCode, class TTimeIntervalMicroSeconds)
-	?UpdateInCallCbaL@CPhoneStateInCall@@MAEXXZ @ 124 NONAME ; void CPhoneStateInCall::UpdateInCallCbaL(void)
-	?EndTransEffect@CPhoneState@@QAEXXZ @ 125 NONAME ; void CPhoneState::EndTransEffect(void)
-	?HandleEnvironmentChangeL@CPhoneState@@UAEXH@Z @ 126 NONAME ; void CPhoneState::HandleEnvironmentChangeL(int)
-	?HandleKeyMessageL@CPhoneStateInCall@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 127 NONAME ; void CPhoneStateInCall::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
-	?SetRingingTonePlaybackL@CPhoneState@@IAEXH@Z @ 128 NONAME ; void CPhoneState::SetRingingTonePlaybackL(int)
-	?ProcessCommandL@CPhoneState@@UAEHH@Z @ 129 NONAME ; int CPhoneState::ProcessCommandL(int)
-	?BeginUiUpdateLC@CPhoneState@@IAEXXZ @ 130 NONAME ; void CPhoneState::BeginUiUpdateLC(void)
-	?DecreaseAudioVolumeL@CPhoneState@@IAEXXZ @ 131 NONAME ; void CPhoneState::DecreaseAudioVolumeL(void)
-	?PhoneEngineInfo@CPhoneStateMachine@@UAEPAVMPEEngineInfo@@XZ @ 132 NONAME ; class MPEEngineInfo * CPhoneStateMachine::PhoneEngineInfo(void)
-	?CreateNumberEntryL@CPhoneStateInCall@@IAEXXZ @ 133 NONAME ; void CPhoneStateInCall::CreateNumberEntryL(void)
-	?HandleSystemEventL@CPhoneUIController@@UAEXABVTWsEvent@@@Z @ 134 NONAME ; void CPhoneUIController::HandleSystemEventL(class TWsEvent const &)
-	?DynInitMenuPaneL@CPhoneUIController@@UAEXHPAVCEikMenuPane@@@Z @ 135 NONAME ; void CPhoneUIController::DynInitMenuPaneL(int, class CEikMenuPane *)
-	??0CPhoneStateStartup@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 136 NONAME ; CPhoneStateStartup::CPhoneStateStartup(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
-	?GetRemoteInfoDataL@CPhoneState@@IAEXHAAVTDes16@@@Z @ 137 NONAME ; void CPhoneState::GetRemoteInfoDataL(int, class TDes16 &)
-	?SetDivertIndication@CPhoneState@@UAEXH@Z @ 138 NONAME ; void CPhoneState::SetDivertIndication(int)
-	?UpdateCbaL@CPhoneStateInCall@@MAEXH@Z @ 139 NONAME ; void CPhoneStateInCall::UpdateCbaL(int)
-	?SetCallId@CPhoneStateMachine@@UAEXH@Z @ 140 NONAME ; void CPhoneStateMachine::SetCallId(int)
-	?ProcessCommandL@CPhoneUIController@@UAEHH@Z @ 141 NONAME ; int CPhoneUIController::ProcessCommandL(int)
-	?DisplayHeaderForCallComingInL@CPhoneState@@IAEXHH@Z @ 142 NONAME ; void CPhoneState::DisplayHeaderForCallComingInL(int, int)
-	??0CPhoneStateIdle@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 143 NONAME ; CPhoneStateIdle::CPhoneStateIdle(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
-	?SendPhoneEngineMessage@CPhoneStateMachine@@UAEXH@Z @ 144 NONAME ; void CPhoneStateMachine::SendPhoneEngineMessage(int)
-	??0CPhoneStateCallSetup@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 145 NONAME ; CPhoneStateCallSetup::CPhoneStateCallSetup(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
-	??0CPhoneState@@QAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 146 NONAME ; CPhoneState::CPhoneState(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
-	?HandleDtmfKeyToneL@CPhoneState@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 147 NONAME ; void CPhoneState::HandleDtmfKeyToneL(struct TKeyEvent const &, enum TEventCode)
-	?HandleKeyMessageL@CPhoneStateIdle@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 148 NONAME ; void CPhoneStateIdle::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
-	?HandleForegroundEventL@CPhoneUIController@@UAEXH@Z @ 149 NONAME ; void CPhoneUIController::HandleForegroundEventL(int)
-	?HandleSendCommandL@CPhoneStateIdle@@MAEXXZ @ 150 NONAME ; void CPhoneStateIdle::HandleSendCommandL(void)
-	?HandleCommandL@CPhoneUIController@@UAEHH@Z @ 151 NONAME ; int CPhoneUIController::HandleCommandL(int)
-	?HandleCreateNumberEntryL@CPhoneState@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 152 NONAME ; void CPhoneState::HandleCreateNumberEntryL(struct TKeyEvent const &, enum TEventCode)
-	?DisableHWKeysL@CPhoneState@@QAEXXZ @ 153 NONAME ; void CPhoneState::DisableHWKeysL(void)
-	?DisplayHeaderForOutgoingCallL@CPhoneState@@IAEXH@Z @ 154 NONAME ; void CPhoneState::DisplayHeaderForOutgoingCallL(int)
-	?GetBlockedKeyList@CPhoneState@@UBEABV?$RArray@H@@XZ @ 155 NONAME ; class RArray<int> const & CPhoneState::GetBlockedKeyList(void) const
-	?HandlePhoneEngineMessageL@CPhoneStateInCall@@UAEXHH@Z @ 156 NONAME ; void CPhoneStateInCall::HandlePhoneEngineMessageL(int, int)
-	?IsSpeedDialNumber@CPhoneStateIdle@@IBEHABVTDesC16@@@Z @ 157 NONAME ; int CPhoneStateIdle::IsSpeedDialNumber(class TDesC16 const &) const
-	?IsNumberEntryUsedL@CPhoneState@@UAEHXZ @ 158 NONAME ; int CPhoneState::IsNumberEntryUsedL(void)
-	?PhoneStorage@CPhoneStateMachine@@UAEPAVMPhoneStorage@@XZ @ 159 NONAME ; class MPhoneStorage * CPhoneStateMachine::PhoneStorage(void)
-	??1CPhoneState@@UAE@XZ @ 160 NONAME ; CPhoneState::~CPhoneState(void)
-	?HandleCreateNumberEntryL@CPhoneStateCallSetup@@MAEXABUTKeyEvent@@W4TEventCode@@@Z @ 161 NONAME ; void CPhoneStateCallSetup::HandleCreateNumberEntryL(struct TKeyEvent const &, enum TEventCode)
-	?HandlePhoneEngineMessageL@CPhoneStateCallSetup@@UAEXHH@Z @ 162 NONAME ; void CPhoneStateCallSetup::HandlePhoneEngineMessageL(int, int)
-	?HandlePhoneFocusLostEventL@CPhoneState@@UAEXXZ @ 163 NONAME ; void CPhoneState::HandlePhoneFocusLostEventL(void)
-	??1CPhoneStateMachine@@UAE@XZ @ 164 NONAME ; CPhoneStateMachine::~CPhoneStateMachine(void)
-	?HandleIdleForegroundEventL@CPhoneState@@UAEXXZ @ 165 NONAME ; void CPhoneState::HandleIdleForegroundEventL(void)
-	?DynInitMenuPaneL@CPhoneState@@UAEXHPAVCEikMenuPane@@@Z @ 166 NONAME ; void CPhoneState::DynInitMenuPaneL(int, class CEikMenuPane *)
-	?IsDTMFEditorVisibleL@CPhoneState@@IBEHXZ @ 167 NONAME ; int CPhoneState::IsDTMFEditorVisibleL(void) const
-	?ConstructL@CPhoneStateCallSetup@@MAEXXZ @ 168 NONAME ; void CPhoneStateCallSetup::ConstructL(void)
-	?BeginTransEffectLC@CPhoneState@@QAEXW4TStateTransEffectType@@@Z @ 169 NONAME ; void CPhoneState::BeginTransEffectLC(enum TStateTransEffectType)
-	?HandleMessage@CPhoneUIController@@UAEXHH@Z @ 170 NONAME ; void CPhoneUIController::HandleMessage(int, int)
-	?HandleSystemEventL@CPhoneState@@UAEXABVTWsEvent@@@Z @ 171 NONAME ; void CPhoneState::HandleSystemEventL(class TWsEvent const &)
-	?DisplayCallSetupL@CPhoneStateIdle@@IAEXH@Z @ 172 NONAME ; void CPhoneStateIdle::DisplayCallSetupL(int)
-	?ConstructL@CPhoneStateStartup@@MAEXXZ @ 173 NONAME ; void CPhoneStateStartup::ConstructL(void)
-	?HandleKeyMessageL@CPhoneStateStartup@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 174 NONAME ; void CPhoneStateStartup::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
-	?ShowNoteL@CPhoneState@@IAEXH@Z @ 175 NONAME ; void CPhoneState::ShowNoteL(int)
-	?HandlePropertyChangedL@CPhoneState@@UAEXABVTUid@@IH@Z @ 176 NONAME ; void CPhoneState::HandlePropertyChangedL(class TUid const &, unsigned int, int)
-	?IsAnyQueryActiveL@CPhoneState@@QAEHXZ @ 177 NONAME ; int CPhoneState::IsAnyQueryActiveL(void)
-	?State@CPhoneStateMachine@@UAEPAVMPhoneState@@XZ @ 178 NONAME ; class MPhoneState * CPhoneStateMachine::State(void)
-	?SetHandsfreeModeL@CPhoneState@@IAEXH@Z @ 179 NONAME ; void CPhoneState::SetHandsfreeModeL(int)
-	?IsCustomizedDialerVisibleL@CPhoneState@@QBEHXZ @ 180 NONAME ; int CPhoneState::IsCustomizedDialerVisibleL(void) const
-	?UpdateInCallCbaL@CPhoneStateCallSetup@@MAEXXZ @ 181 NONAME ; void CPhoneStateCallSetup::UpdateInCallCbaL(void)
-	?HandleNumberEntryClearedL@CPhoneStateInCall@@MAEXXZ @ 182 NONAME ; void CPhoneStateInCall::HandleNumberEntryClearedL(void)
-	??0CPhoneStateIncoming@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 183 NONAME ; CPhoneStateIncoming::CPhoneStateIncoming(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
-	??1CPhoneStateIncoming@@UAE@XZ @ 184 NONAME ; CPhoneStateIncoming::~CPhoneStateIncoming(void)
-	?HandleKeyLockEnabled@CPhoneUIController@@UAEXH@Z @ 185 NONAME ; void CPhoneUIController::HandleKeyLockEnabled(int)
-	?DisableCallUIL@CPhoneState@@QAEXXZ @ 186 NONAME ; void CPhoneState::DisableCallUIL(void)
-	?DeleteTouchPaneButtons@CPhoneState@@IAEXXZ @ 187 NONAME ; void CPhoneState::DeleteTouchPaneButtons(void)
-	?ProcessCommandL@CPhoneStateIdle@@UAEHH@Z @ 188 NONAME ; int CPhoneStateIdle::ProcessCommandL(int)
-	?IsNoteVisibleL@CPhoneState@@MAEHXZ @ 189 NONAME ; int CPhoneState::IsNoteVisibleL(void)
-	?DynInitMenuBarL@CPhoneUIController@@UAEXHPAVCEikMenuBar@@@Z @ 190 NONAME ; void CPhoneUIController::DynInitMenuBarL(int, class CEikMenuBar *)
-	?IsAlphanumericSupportedAndCharInput@CPhoneState@@MAEHABUTKeyEvent@@@Z @ 191 NONAME ; int CPhoneState::IsAlphanumericSupportedAndCharInput(struct TKeyEvent const &)
-	?HandlePhoneEngineMessageL@CPhoneStateStartup@@UAEXHH@Z @ 192 NONAME ; void CPhoneStateStartup::HandlePhoneEngineMessageL(int, int)
-	?HandleKeyEventL@CPhoneStateIncoming@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 193 NONAME ; void CPhoneStateIncoming::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?HandleKeyEventL@CPhoneStateStartup@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 194 NONAME ; void CPhoneStateStartup::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?HandleNumberEntryClearedL@CPhoneState@@MAEXXZ @ 195 NONAME ; void CPhoneState::HandleNumberEntryClearedL(void)
-	?OnlyHashInNumberEntryL@CPhoneState@@MAEXXZ @ 196 NONAME ; void CPhoneState::OnlyHashInNumberEntryL(void)
-	?IncreaseAudioVolumeL@CPhoneState@@IAEXXZ @ 197 NONAME ; void CPhoneState::IncreaseAudioVolumeL(void)
-	?ConstructL@CPhoneStateIdle@@MAEXXZ @ 198 NONAME ; void CPhoneStateIdle::ConstructL(void)
-	?CheckIfShowCallTerminationNote@CPhoneState@@MAEHXZ @ 199 NONAME ; int CPhoneState::CheckIfShowCallTerminationNote(void)
-	?SetCallHeaderType@CPhoneState@@IAEXW4TPhoneCallTypeFlags@CBubbleManager@@@Z @ 200 NONAME ; void CPhoneState::SetCallHeaderType(enum CBubbleManager::TPhoneCallTypeFlags)
-	?SendGlobalInfoNoteL@CPhoneState@@QAEXH@Z @ 201 NONAME ; void CPhoneState::SendGlobalInfoNoteL(int)
-	?DisplayIdleScreenL@CPhoneState@@IAEXXZ @ 202 NONAME ; void CPhoneState::DisplayIdleScreenL(void)
-	?StartShowSecurityNoteL@CPhoneState@@IAEXXZ @ 203 NONAME ; void CPhoneState::StartShowSecurityNoteL(void)
-	?StoreNumberEntryContentL@CPhoneState@@IAEXXZ @ 204 NONAME ; void CPhoneState::StoreNumberEntryContentL(void)
-	?SetBTHandsfreeModeL@CPhoneState@@IAEXH@Z @ 205 NONAME ; void CPhoneState::SetBTHandsfreeModeL(int)
-	?HandlePhoneEngineMessageL@CPhoneStateIncoming@@UAEXHH@Z @ 206 NONAME ; void CPhoneStateIncoming::HandlePhoneEngineMessageL(int, int)
-	?SetDefaultFlagsL@CPhoneState@@IAEXXZ @ 207 NONAME ; void CPhoneState::SetDefaultFlagsL(void)
-	?HandleCommandL@CPhoneStateInCall@@UAEHH@Z @ 208 NONAME ; int CPhoneStateInCall::HandleCommandL(int)
-	?DialVoiceCallL@CPhoneStateIdle@@IAEXXZ @ 209 NONAME ; void CPhoneStateIdle::DialVoiceCallL(void)
-	?UpdateRemoteInfoDataL@CPhoneState@@IAEXH@Z @ 210 NONAME ; void CPhoneState::UpdateRemoteInfoDataL(int)
-	?GetRingingCallL@CPhoneStateInCall@@MAEHXZ @ 211 NONAME ; int CPhoneStateInCall::GetRingingCallL(void)
-	?HandleIdleForegroundEventL@CPhoneUIController@@UAEXXZ @ 212 NONAME ; void CPhoneUIController::HandleIdleForegroundEventL(void)
-	?HandlePhoneForegroundEventL@CPhoneState@@UAEXXZ @ 213 NONAME ; void CPhoneState::HandlePhoneForegroundEventL(void)
-	?HandleForegroundEventL@CPhoneState@@UAEXH@Z @ 214 NONAME ; void CPhoneState::HandleForegroundEventL(int)
-	?DisplayIncomingCallL@CPhoneStateIdle@@IAEXH@Z @ 215 NONAME ; void CPhoneStateIdle::DisplayIncomingCallL(int)
-	?HandleRemConCommandL@CPhoneState@@UAEHW4TRemConCoreApiOperationId@@W4TRemConCoreApiButtonAction@@@Z @ 216 NONAME ; int CPhoneState::HandleRemConCommandL(enum TRemConCoreApiOperationId, enum TRemConCoreApiButtonAction)
-	??1CPhoneStateIdle@@UAE@XZ @ 217 NONAME ; CPhoneStateIdle::~CPhoneStateIdle(void)
-	?PhoneNumberFromEntryLC@CPhoneState@@IAEPAVHBufC16@@XZ @ 218 NONAME ; class HBufC16 * CPhoneState::PhoneNumberFromEntryLC(void)
-	?BaseConstructL@CPhoneState@@QAEXXZ @ 219 NONAME ; void CPhoneState::BaseConstructL(void)
-	?HandlePhoneStartupL@CPhoneUIController@@UAEXXZ @ 220 NONAME ; void CPhoneUIController::HandlePhoneStartupL(void)
-	?SpeedDialL@CPhoneStateIdle@@IAEXABIW4TDialInitiationMethod@1@@Z @ 221 NONAME ; void CPhoneStateIdle::SpeedDialL(unsigned int const &, enum CPhoneStateIdle::TDialInitiationMethod)
-	?SetTouchPaneButtonEnabled@CPhoneState@@IAEXH@Z @ 222 NONAME ; void CPhoneState::SetTouchPaneButtonEnabled(int)
-	?SetPhoneEngine@CPhoneStateMachine@@UAEXPAVMPEPhoneModel@@@Z @ 223 NONAME ; void CPhoneStateMachine::SetPhoneEngine(class MPEPhoneModel *)
-	?SpeedDialCanceledL@CPhoneStateIdle@@IAEXABI@Z @ 224 NONAME ; void CPhoneStateIdle::SpeedDialCanceledL(unsigned int const &)
-	?CloseDTMFEditorL@CPhoneState@@IAEXXZ @ 225 NONAME ; void CPhoneState::CloseDTMFEditorL(void)
-	?SetTouchPaneVisible@CPhoneState@@IAEXH@Z @ 226 NONAME ; void CPhoneState::SetTouchPaneVisible(int)
-	?HandlePhoneFocusLostEventL@CPhoneUIController@@UAEXXZ @ 227 NONAME ; void CPhoneUIController::HandlePhoneFocusLostEventL(void)
-	?HandleKeyLockEnabled@CPhoneStateIncoming@@UAEXH@Z @ 228 NONAME ; void CPhoneStateIncoming::HandleKeyLockEnabled(int)
-	??0CPhoneStateMachine@@IAE@PAVMPhoneViewCommandHandle@@@Z @ 229 NONAME ; CPhoneStateMachine::CPhoneStateMachine(class MPhoneViewCommandHandle *)
-	??1CPhoneStateStartup@@UAE@XZ @ 230 NONAME ; CPhoneStateStartup::~CPhoneStateStartup(void)
-	?HandleKeyMessageL@CPhoneState@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 231 NONAME ; void CPhoneState::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
-	?SetToolbarButtonLoudspeakerEnabled@CPhoneState@@IAEXXZ @ 232 NONAME ; void CPhoneState::SetToolbarButtonLoudspeakerEnabled(void)
-	?SetToolbarDimming@CPhoneState@@IAEXH@Z @ 233 NONAME ; void CPhoneState::SetToolbarDimming(int)
+	?DisconnectCallL@CPhoneState@@MAEXXZ @ 8 NONAME ; void CPhoneState::DisconnectCallL(void)
+	?SetCbaL@CPhoneCbaManager@@QAEXH@Z @ 9 NONAME ; void CPhoneCbaManager::SetCbaL(int)
+	?InstanceL@CPhoneReconnectQuery@@SAPAV1@XZ @ 10 NONAME ; class CPhoneReconnectQuery * CPhoneReconnectQuery::InstanceL(void)
+	?HandlePhoneStartupL@CPhoneState@@UAEXXZ @ 11 NONAME ; void CPhoneState::HandlePhoneStartupL(void)
+	?HandlePhoneFocusLostEventL@CPhoneStateIdle@@UAEXXZ @ 12 NONAME ; void CPhoneStateIdle::HandlePhoneFocusLostEventL(void)
+	?HandleIdleL@CPhoneStateInCall@@IAEXH@Z @ 13 NONAME ; void CPhoneStateInCall::HandleIdleL(int)
+	?ShowQueryL@CPhoneState@@IAEXH@Z @ 14 NONAME ; void CPhoneState::ShowQueryL(int)
+	?PhoneNumberAvailableInPhoneEngineL@CPhoneStateInCall@@IAEXH@Z @ 15 NONAME ; void CPhoneStateInCall::PhoneNumberAvailableInPhoneEngineL(int)
+	?DisplayCallTerminationNoteL@CPhoneState@@IAEXXZ @ 16 NONAME ; void CPhoneState::DisplayCallTerminationNoteL(void)
+	??0CPhoneStateInCall@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 17 NONAME ; CPhoneStateInCall::CPhoneStateInCall(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
+	?HandleNumberLongKeyPressL@CPhoneStateIdle@@IAEXXZ @ 18 NONAME ; void CPhoneStateIdle::HandleNumberLongKeyPressL(void)
+	?PhoneEngine@CPhoneStateMachine@@UAEPAVMPEPhoneModel@@XZ @ 19 NONAME ; class MPEPhoneModel * CPhoneStateMachine::PhoneEngine(void)
+	?OpenMenuBarL@CPhoneStateCallSetup@@MAEXXZ @ 20 NONAME ; void CPhoneStateCallSetup::OpenMenuBarL(void)
+	??1CPhoneStateCallSetup@@UAE@XZ @ 21 NONAME ; CPhoneStateCallSetup::~CPhoneStateCallSetup(void)
+	?HandleEnvironmentChangeL@CPhoneUIController@@UAEXH@Z @ 22 NONAME ; void CPhoneUIController::HandleEnvironmentChangeL(int)
+	?SetToolbarButtonLoudspeakerEnabled@CPhoneState@@IAEXXZ @ 23 NONAME ; void CPhoneState::SetToolbarButtonLoudspeakerEnabled(void)
+	?Instance@CPhoneStateHandle@@SAPAV1@XZ @ 24 NONAME ; class CPhoneStateHandle * CPhoneStateHandle::Instance(void)
+	?HandleNumberEntryClearedL@CPhoneStateIdle@@MAEXXZ @ 25 NONAME ; void CPhoneStateIdle::HandleNumberEntryClearedL(void)
+	?DynInitMenuPaneL@CPhoneStateIncoming@@MAEXHPAVCEikMenuPane@@@Z @ 26 NONAME ; void CPhoneStateIncoming::DynInitMenuPaneL(int, class CEikMenuPane *)
+	?HandleCommandL@CPhoneState@@UAEHH@Z @ 27 NONAME ; int CPhoneState::HandleCommandL(int)
+	?StartAlsLineChangeTimerL@CPhoneState@@IAEXXZ @ 28 NONAME ; void CPhoneState::StartAlsLineChangeTimerL(void)
+	?IsNumberEntryVisibleL@CPhoneState@@QAEHXZ @ 29 NONAME ; int CPhoneState::IsNumberEntryVisibleL(void)
+	?RetainPreviousKeylockStateL@CPhoneState@@QAEXXZ @ 30 NONAME ; void CPhoneState::RetainPreviousKeylockStateL(void)
+	?HandlePhoneEngineMessageL@CPhoneStateIdle@@UAEXHH@Z @ 31 NONAME ; void CPhoneStateIdle::HandlePhoneEngineMessageL(int, int)
+	?HandleDialingL@CPhoneStateIdle@@MAEXH@Z @ 32 NONAME ; void CPhoneStateIdle::HandleDialingL(int)
+	?CustomizedDialerCbaResourceIdL@CPhoneState@@IAEHXZ @ 33 NONAME ; int CPhoneState::CustomizedDialerCbaResourceIdL(void)
+	?CaptureKeysDuringCallNotificationL@CPhoneState@@IAEXH@Z @ 34 NONAME ; void CPhoneState::CaptureKeysDuringCallNotificationL(int)
+	?HandleKeyPressDurationL@CPhoneState@@UAEXW4TKeyCode@@VTTimeIntervalMicroSeconds@@@Z @ 35 NONAME ; void CPhoneState::HandleKeyPressDurationL(enum TKeyCode, class TTimeIntervalMicroSeconds)
+	?ChangeState@CPhoneStateMachine@@UAEXH@Z @ 36 NONAME ; void CPhoneStateMachine::ChangeState(int)
+	?IsSimStateNotPresentWithSecurityModeEnabled@CPhoneState@@IAEHXZ @ 37 NONAME ; int CPhoneState::IsSimStateNotPresentWithSecurityModeEnabled(void)
+	?HandlePhoneEngineMessageL@CPhoneState@@UAEXHH@Z @ 38 NONAME ; void CPhoneState::HandlePhoneEngineMessageL(int, int)
+	?HandleNumberEntryClearedL@CPhoneStateIncoming@@UAEXXZ @ 39 NONAME ; void CPhoneStateIncoming::HandleNumberEntryClearedL(void)
+	?HandleKeyEventL@CPhoneUIController@@UAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 40 NONAME ; enum TKeyResponse CPhoneUIController::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?HandleRemConCommandL@CPhoneStateIdle@@MAEHW4TRemConCoreApiOperationId@@W4TRemConCoreApiButtonAction@@@Z @ 41 NONAME ; int CPhoneStateIdle::HandleRemConCommandL(enum TRemConCoreApiOperationId, enum TRemConCoreApiButtonAction)
+	?HandleAudioPlayStoppedL@CPhoneStateIncoming@@MAEXXZ @ 42 NONAME ; void CPhoneStateIncoming::HandleAudioPlayStoppedL(void)
+	?HandleCenRepChangeL@CPhoneState@@UAEXABVTUid@@I@Z @ 43 NONAME ; void CPhoneState::HandleCenRepChangeL(class TUid const &, unsigned int)
+	?HandleLongHashL@CPhoneState@@UAEXXZ @ 44 NONAME ; void CPhoneState::HandleLongHashL(void)
+	?DialL@CPhoneStateIdle@@MAEXABVTDesC16@@W4TPhoneNumberType@@W4TDialInitiationMethod@1@@Z @ 45 NONAME ; void CPhoneStateIdle::DialL(class TDesC16 const &, enum TPhoneNumberType, enum CPhoneStateIdle::TDialInitiationMethod)
+	?ShowNumberBusyNoteL@CPhoneState@@IAEXXZ @ 46 NONAME ; void CPhoneState::ShowNumberBusyNoteL(void)
+	?HandleNumberEntryClearedL@CPhoneStateCallSetup@@MAEXXZ @ 47 NONAME ; void CPhoneStateCallSetup::HandleNumberEntryClearedL(void)
+	?HandleIdleForegroundEventL@CPhoneStateIdle@@UAEXXZ @ 48 NONAME ; void CPhoneStateIdle::HandleIdleForegroundEventL(void)
+	?HandleDisconnectingL@CPhoneState@@IAEXH@Z @ 49 NONAME ; void CPhoneState::HandleDisconnectingL(int)
+	?HandleAudioMuteChangedL@CPhoneState@@IAEXXZ @ 50 NONAME ; void CPhoneState::HandleAudioMuteChangedL(void)
+	?HandleKeyLockEnabled@CPhoneState@@UAEXH@Z @ 51 NONAME ; void CPhoneState::HandleKeyLockEnabled(int)
+	?HandleCommandL@CPhoneStateIncoming@@UAEHH@Z @ 52 NONAME ; int CPhoneStateIncoming::HandleCommandL(int)
+	?UpdateSingleActiveCallL@CPhoneState@@IAEXH@Z @ 53 NONAME ; void CPhoneState::UpdateSingleActiveCallL(int)
+	?IsOnScreenDialerSupported@CPhoneState@@IBEHXZ @ 54 NONAME ; int CPhoneState::IsOnScreenDialerSupported(void) const
+	?SimState@CPhoneState@@IBE?AW4TPESimState@@XZ @ 55 NONAME ; enum TPESimState CPhoneState::SimState(void) const
+	?HandleKeyEventL@CPhoneStateCallSetup@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 56 NONAME ; void CPhoneStateCallSetup::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?SetupIdleScreenInBackgroundL@CPhoneState@@IAEXXZ @ 57 NONAME ; void CPhoneState::SetupIdleScreenInBackgroundL(void)
+	?SendGlobalWarningNoteL@CPhoneState@@IAEXH@Z @ 58 NONAME ; void CPhoneState::SendGlobalWarningNoteL(int)
+	?CompleteSatRequestL@CPhoneState@@IAEXH@Z @ 59 NONAME ; void CPhoneState::CompleteSatRequestL(int)
+	?NewL@CPhoneStateStartup@@SAPAV1@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 60 NONAME ; class CPhoneStateStartup * CPhoneStateStartup::NewL(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
+	?LaunchNewCallQueryL@CPhoneStateInCall@@IAEXXZ @ 61 NONAME ; void CPhoneStateInCall::LaunchNewCallQueryL(void)
+	?NeedToSendToBackgroundL@CPhoneState@@IBEHXZ @ 62 NONAME ; int CPhoneState::NeedToSendToBackgroundL(void) const
+	?SetCallHeaderTextsForCallComingInL@CPhoneState@@IAEXHHPAVTPhoneCmdParamCallHeaderData@@@Z @ 63 NONAME ; void CPhoneState::SetCallHeaderTextsForCallComingInL(int, int, class TPhoneCmdParamCallHeaderData *)
+	?IsSimOk@CPhoneState@@QAEHXZ @ 64 NONAME ; int CPhoneState::IsSimOk(void)
+	?ClearNumberEntryContentCache@CPhoneState@@IAEXXZ @ 65 NONAME ; void CPhoneState::ClearNumberEntryContentCache(void)
+	?HandleCommandL@CPhoneStateIdle@@UAEHH@Z @ 66 NONAME ; int CPhoneStateIdle::HandleCommandL(int)
+	?ViewCommandHandle@CPhoneStateHandle@@QAEPAVMPhoneViewCommandHandle@@XZ @ 67 NONAME ; class MPhoneViewCommandHandle * CPhoneStateHandle::ViewCommandHandle(void)
+	?DialMultimediaCallL@CPhoneStateIdle@@IAEXXZ @ 68 NONAME ; void CPhoneStateIdle::DialMultimediaCallL(void)
+	?DisconnectOutgoingCallL@CPhoneStateInCall@@IAEXXZ @ 69 NONAME ; void CPhoneStateInCall::DisconnectOutgoingCallL(void)
+	?IsKeyLockOn@CPhoneState@@MBEHXZ @ 70 NONAME ; int CPhoneState::IsKeyLockOn(void) const
+	??1CPhoneStateInCall@@UAE@XZ @ 71 NONAME ; CPhoneStateInCall::~CPhoneStateInCall(void)
+	?CustomizedDialerMenuResourceIdL@CPhoneState@@IAEHXZ @ 72 NONAME ; int CPhoneState::CustomizedDialerMenuResourceIdL(void)
+	?ShowReconnectQueryL@CPhoneReconnectQuery@@QAEXH@Z @ 73 NONAME ; void CPhoneReconnectQuery::ShowReconnectQueryL(int)
+	?UpdateSilenceButtonDimming@CPhoneState@@IAEXXZ @ 74 NONAME ; void CPhoneState::UpdateSilenceButtonDimming(void)
+	?SetNumberEntryVisibilityL@CPhoneState@@IAEXH@Z @ 75 NONAME ; void CPhoneState::SetNumberEntryVisibilityL(int)
+	?HandleError@CPhoneUIController@@UAEXABUTPEErrorInfo@@@Z @ 76 NONAME ; void CPhoneUIController::HandleError(struct TPEErrorInfo const &)
+	?ConstructL@CPhoneStateInCall@@MAEXXZ @ 77 NONAME ; void CPhoneStateInCall::ConstructL(void)
+	?OnlyHashInNumberEntryL@CPhoneStateIdle@@MAEXXZ @ 78 NONAME ; void CPhoneStateIdle::OnlyHashInNumberEntryL(void)
+	?IsVideoCallRingingL@CPhoneStateInCall@@MAEHXZ @ 79 NONAME ; int CPhoneStateInCall::IsVideoCallRingingL(void)
+	?HandlePhoneForegroundEventL@CPhoneStateIdle@@UAEXXZ @ 80 NONAME ; void CPhoneStateIdle::HandlePhoneForegroundEventL(void)
+	?HandleHoldSwitchL@CPhoneState@@QAEXXZ @ 81 NONAME ; void CPhoneState::HandleHoldSwitchL(void)
+	?CloseDtmfQueryL@CPhoneStateInCall@@IAEXXZ @ 82 NONAME ; void CPhoneStateInCall::CloseDtmfQueryL(void)
+	?DynInitMenuBarL@CPhoneState@@UAEXHPAVCEikMenuBar@@@Z @ 83 NONAME ; void CPhoneState::DynInitMenuBarL(int, class CEikMenuBar *)
+	?HandleDtmfKeyToneL@CPhoneStateStartup@@EAEXABUTKeyEvent@@W4TEventCode@@@Z @ 84 NONAME ; void CPhoneStateStartup::HandleDtmfKeyToneL(struct TKeyEvent const &, enum TEventCode)
+	?HandleNumberEntryEdited@CPhoneState@@MAEXXZ @ 85 NONAME ; void CPhoneState::HandleNumberEntryEdited(void)
+	?ShowTextQueryL@CPhoneState@@IAEXHHHPAVTDes16@@H@Z @ 86 NONAME ; void CPhoneState::ShowTextQueryL(int, int, int, class TDes16 *, int)
+	?DialMultimediaCallL@CPhoneState@@IAEXXZ @ 87 NONAME ; void CPhoneState::DialMultimediaCallL(void)
+	?NewL@CPhoneUIController@@SAPAV1@PAVMPhoneViewCommandHandle@@@Z @ 88 NONAME ; class CPhoneUIController * CPhoneUIController::NewL(class MPhoneViewCommandHandle *)
+	?HandleCreateNumberEntryL@CPhoneStateStartup@@EAEXABUTKeyEvent@@W4TEventCode@@@Z @ 89 NONAME ; void CPhoneStateStartup::HandleCreateNumberEntryL(struct TKeyEvent const &, enum TEventCode)
+	?CheckDisableHWKeysAndCallUIL@CPhoneState@@QAEXXZ @ 90 NONAME ; void CPhoneState::CheckDisableHWKeysAndCallUIL(void)
+	?IsMenuBarVisibleL@CPhoneState@@UBEHXZ @ 91 NONAME ; int CPhoneState::IsMenuBarVisibleL(void) const
+	?HandleErrorL@CPhoneState@@UAEXABUTPEErrorInfo@@@Z @ 92 NONAME ; void CPhoneState::HandleErrorL(struct TPEErrorInfo const &)
+	?HandleCommandL@CPhoneStateCallSetup@@UAEHH@Z @ 93 NONAME ; int CPhoneStateCallSetup::HandleCommandL(int)
+	?HandleAudioOutputChangedL@CPhoneState@@IAEXXZ @ 94 NONAME ; void CPhoneState::HandleAudioOutputChangedL(void)
+	??1CPhoneUIController@@UAE@XZ @ 95 NONAME ; CPhoneUIController::~CPhoneUIController(void)
+	?HandleKeyEventL@CPhoneState@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 96 NONAME ; void CPhoneState::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?UpdateIncomingContextMenuL@CPhoneState@@MAEXH@Z @ 97 NONAME ; void CPhoneState::UpdateIncomingContextMenuL(int)
+	?OpenMenuBarL@CPhoneStateInCall@@MAEXXZ @ 98 NONAME ; void CPhoneStateInCall::OpenMenuBarL(void)
+	?UpdateIncomingCbaL@CPhoneCbaManager@@QAEXH@Z @ 99 NONAME ; void CPhoneCbaManager::UpdateIncomingCbaL(int)
+	?SetTouchPaneButtonDisabled@CPhoneState@@IAEXH@Z @ 100 NONAME ; void CPhoneState::SetTouchPaneButtonDisabled(int)
+	?ConstructL@CPhoneStateIncoming@@MAEXXZ @ 101 NONAME ; void CPhoneStateIncoming::ConstructL(void)
+	?CreatePhoneEngineL@CPhoneStateMachine@@UAEPAVMPEPhoneModel@@AAVMEngineMonitor@@@Z @ 102 NONAME ; class MPEPhoneModel * CPhoneStateMachine::CreatePhoneEngineL(class MEngineMonitor &)
+	?SetTouchPaneButtons@CPhoneState@@IAEXH@Z @ 103 NONAME ; void CPhoneState::SetTouchPaneButtons(int)
+	?HandleIdleForegroundEventL@CPhoneStateStartup@@UAEXXZ @ 104 NONAME ; void CPhoneStateStartup::HandleIdleForegroundEventL(void)
+	?CallFromNumberEntryL@CPhoneState@@IAEXXZ @ 105 NONAME ; void CPhoneState::CallFromNumberEntryL(void)
+	?UpdateCbaL@CPhoneCbaManager@@QAEXH@Z @ 106 NONAME ; void CPhoneCbaManager::UpdateCbaL(int)
+	?IsVideoCall@CPhoneState@@IAEHH@Z @ 107 NONAME ; int CPhoneState::IsVideoCall(int)
+	?IsSwivelClosed@CPhoneState@@QBEHXZ @ 108 NONAME ; int CPhoneState::IsSwivelClosed(void) const
+	?CloseCustomizedDialerL@CPhoneState@@QAEXXZ @ 109 NONAME ; void CPhoneState::CloseCustomizedDialerL(void)
+	?HandlePhoneForegroundEventL@CPhoneUIController@@UAEXXZ @ 110 NONAME ; void CPhoneUIController::HandlePhoneForegroundEventL(void)
+	?CheckIfRestoreNEContentAfterDtmfDialer@CPhoneState@@IAEXXZ @ 111 NONAME ; void CPhoneState::CheckIfRestoreNEContentAfterDtmfDialer(void)
+	?UpdateInCallContextMenuL@CPhoneState@@UAEXXZ @ 112 NONAME ; void CPhoneState::UpdateInCallContextMenuL(void)
+	?HandleNumericKeyEventL@CPhoneState@@MAEXABUTKeyEvent@@W4TEventCode@@@Z @ 113 NONAME ; void CPhoneState::HandleNumericKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?SetToolbarDimming@CPhoneState@@IAEXH@Z @ 114 NONAME ; void CPhoneState::SetToolbarDimming(int)
+	?SendGlobalErrorNoteL@CPhoneState@@QAEXH@Z @ 115 NONAME ; void CPhoneState::SendGlobalErrorNoteL(int)
+	?IsAutoLockOn@CPhoneState@@UBEHXZ @ 116 NONAME ; int CPhoneState::IsAutoLockOn(void) const
+	?UpdateCbaL@CPhoneStateCallSetup@@MAEXH@Z @ 117 NONAME ; void CPhoneStateCallSetup::UpdateCbaL(int)
+	?RestoreNumberEntryContentL@CPhoneState@@IAEXXZ @ 118 NONAME ; void CPhoneState::RestoreNumberEntryContentL(void)
+	?HandleKeyEventL@CPhoneStateIdle@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 119 NONAME ; void CPhoneStateIdle::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?IsNumberEntryContentStored@CPhoneState@@IAEHXZ @ 120 NONAME ; int CPhoneState::IsNumberEntryContentStored(void)
+	?IsVideoCallActiveL@CPhoneStateInCall@@MAEHXZ @ 121 NONAME ; int CPhoneStateInCall::IsVideoCallActiveL(void)
+	?HandlePhoneStartupL@CPhoneStateStartup@@UAEXXZ @ 122 NONAME ; void CPhoneStateStartup::HandlePhoneStartupL(void)
+	?DialVoiceCallL@CPhoneState@@IAEXXZ @ 123 NONAME ; void CPhoneState::DialVoiceCallL(void)
+	?EndUiUpdate@CPhoneState@@IAEXXZ @ 124 NONAME ; void CPhoneState::EndUiUpdate(void)
+	?HandleKeyPressDurationL@CPhoneStateIncoming@@UAEXW4TKeyCode@@VTTimeIntervalMicroSeconds@@@Z @ 125 NONAME ; void CPhoneStateIncoming::HandleKeyPressDurationL(enum TKeyCode, class TTimeIntervalMicroSeconds)
+	?UpdateInCallCbaL@CPhoneStateInCall@@MAEXXZ @ 126 NONAME ; void CPhoneStateInCall::UpdateInCallCbaL(void)
+	?EndTransEffect@CPhoneState@@QAEXXZ @ 127 NONAME ; void CPhoneState::EndTransEffect(void)
+	?HandleEnvironmentChangeL@CPhoneState@@UAEXH@Z @ 128 NONAME ; void CPhoneState::HandleEnvironmentChangeL(int)
+	?HandleKeyMessageL@CPhoneStateInCall@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 129 NONAME ; void CPhoneStateInCall::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
+	?SetRingingTonePlaybackL@CPhoneState@@IAEXH@Z @ 130 NONAME ; void CPhoneState::SetRingingTonePlaybackL(int)
+	?ProcessCommandL@CPhoneState@@UAEHH@Z @ 131 NONAME ; int CPhoneState::ProcessCommandL(int)
+	?BeginUiUpdateLC@CPhoneState@@IAEXXZ @ 132 NONAME ; void CPhoneState::BeginUiUpdateLC(void)
+	?DecreaseAudioVolumeL@CPhoneState@@IAEXXZ @ 133 NONAME ; void CPhoneState::DecreaseAudioVolumeL(void)
+	?PhoneEngineInfo@CPhoneStateMachine@@UAEPAVMPEEngineInfo@@XZ @ 134 NONAME ; class MPEEngineInfo * CPhoneStateMachine::PhoneEngineInfo(void)
+	?CreateNumberEntryL@CPhoneStateInCall@@IAEXXZ @ 135 NONAME ; void CPhoneStateInCall::CreateNumberEntryL(void)
+	?HandleSystemEventL@CPhoneUIController@@UAEXABVTWsEvent@@@Z @ 136 NONAME ; void CPhoneUIController::HandleSystemEventL(class TWsEvent const &)
+	?DynInitMenuPaneL@CPhoneUIController@@UAEXHPAVCEikMenuPane@@@Z @ 137 NONAME ; void CPhoneUIController::DynInitMenuPaneL(int, class CEikMenuPane *)
+	??0CPhoneStateStartup@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 138 NONAME ; CPhoneStateStartup::CPhoneStateStartup(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
+	?GetRemoteInfoDataL@CPhoneState@@IAEXHAAVTDes16@@@Z @ 139 NONAME ; void CPhoneState::GetRemoteInfoDataL(int, class TDes16 &)
+	?SetDivertIndication@CPhoneState@@UAEXH@Z @ 140 NONAME ; void CPhoneState::SetDivertIndication(int)
+	?UpdateCbaL@CPhoneStateInCall@@MAEXH@Z @ 141 NONAME ; void CPhoneStateInCall::UpdateCbaL(int)
+	?SetCallId@CPhoneStateMachine@@UAEXH@Z @ 142 NONAME ; void CPhoneStateMachine::SetCallId(int)
+	?ProcessCommandL@CPhoneUIController@@UAEHH@Z @ 143 NONAME ; int CPhoneUIController::ProcessCommandL(int)
+	?DisplayHeaderForCallComingInL@CPhoneState@@IAEXHH@Z @ 144 NONAME ; void CPhoneState::DisplayHeaderForCallComingInL(int, int)
+	??0CPhoneStateIdle@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 145 NONAME ; CPhoneStateIdle::CPhoneStateIdle(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
+	?SendPhoneEngineMessage@CPhoneStateMachine@@UAEXH@Z @ 146 NONAME ; void CPhoneStateMachine::SendPhoneEngineMessage(int)
+	??0CPhoneStateCallSetup@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 147 NONAME ; CPhoneStateCallSetup::CPhoneStateCallSetup(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
+	??0CPhoneState@@QAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 148 NONAME ; CPhoneState::CPhoneState(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
+	?HandleDtmfKeyToneL@CPhoneState@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 149 NONAME ; void CPhoneState::HandleDtmfKeyToneL(struct TKeyEvent const &, enum TEventCode)
+	?HandleKeyMessageL@CPhoneStateIdle@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 150 NONAME ; void CPhoneStateIdle::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
+	?HandleForegroundEventL@CPhoneUIController@@UAEXH@Z @ 151 NONAME ; void CPhoneUIController::HandleForegroundEventL(int)
+	?HandleSendCommandL@CPhoneStateIdle@@MAEXXZ @ 152 NONAME ; void CPhoneStateIdle::HandleSendCommandL(void)
+	?HandleCommandL@CPhoneUIController@@UAEHH@Z @ 153 NONAME ; int CPhoneUIController::HandleCommandL(int)
+	?HandleCreateNumberEntryL@CPhoneState@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 154 NONAME ; void CPhoneState::HandleCreateNumberEntryL(struct TKeyEvent const &, enum TEventCode)
+	?DisableHWKeysL@CPhoneState@@QAEXXZ @ 155 NONAME ; void CPhoneState::DisableHWKeysL(void)
+	?DisplayHeaderForOutgoingCallL@CPhoneState@@IAEXH@Z @ 156 NONAME ; void CPhoneState::DisplayHeaderForOutgoingCallL(int)
+	?GetBlockedKeyList@CPhoneState@@UBEABV?$RArray@H@@XZ @ 157 NONAME ; class RArray<int> const & CPhoneState::GetBlockedKeyList(void) const
+	?HandlePhoneEngineMessageL@CPhoneStateInCall@@UAEXHH@Z @ 158 NONAME ; void CPhoneStateInCall::HandlePhoneEngineMessageL(int, int)
+	?IsSpeedDialNumber@CPhoneStateIdle@@IBEHABVTDesC16@@@Z @ 159 NONAME ; int CPhoneStateIdle::IsSpeedDialNumber(class TDesC16 const &) const
+	?IsNumberEntryUsedL@CPhoneState@@UAEHXZ @ 160 NONAME ; int CPhoneState::IsNumberEntryUsedL(void)
+	?PhoneStorage@CPhoneStateMachine@@UAEPAVMPhoneStorage@@XZ @ 161 NONAME ; class MPhoneStorage * CPhoneStateMachine::PhoneStorage(void)
+	??1CPhoneState@@UAE@XZ @ 162 NONAME ; CPhoneState::~CPhoneState(void)
+	?HandleCreateNumberEntryL@CPhoneStateCallSetup@@MAEXABUTKeyEvent@@W4TEventCode@@@Z @ 163 NONAME ; void CPhoneStateCallSetup::HandleCreateNumberEntryL(struct TKeyEvent const &, enum TEventCode)
+	?HandlePhoneEngineMessageL@CPhoneStateCallSetup@@UAEXHH@Z @ 164 NONAME ; void CPhoneStateCallSetup::HandlePhoneEngineMessageL(int, int)
+	?HandlePhoneFocusLostEventL@CPhoneState@@UAEXXZ @ 165 NONAME ; void CPhoneState::HandlePhoneFocusLostEventL(void)
+	??1CPhoneStateMachine@@UAE@XZ @ 166 NONAME ; CPhoneStateMachine::~CPhoneStateMachine(void)
+	?HandleIdleForegroundEventL@CPhoneState@@UAEXXZ @ 167 NONAME ; void CPhoneState::HandleIdleForegroundEventL(void)
+	?DynInitMenuPaneL@CPhoneState@@UAEXHPAVCEikMenuPane@@@Z @ 168 NONAME ; void CPhoneState::DynInitMenuPaneL(int, class CEikMenuPane *)
+	?IsDTMFEditorVisibleL@CPhoneState@@IBEHXZ @ 169 NONAME ; int CPhoneState::IsDTMFEditorVisibleL(void) const
+	?ConstructL@CPhoneStateCallSetup@@MAEXXZ @ 170 NONAME ; void CPhoneStateCallSetup::ConstructL(void)
+	?BeginTransEffectLC@CPhoneState@@QAEXW4TStateTransEffectType@@@Z @ 171 NONAME ; void CPhoneState::BeginTransEffectLC(enum TStateTransEffectType)
+	?HandleMessage@CPhoneUIController@@UAEXHH@Z @ 172 NONAME ; void CPhoneUIController::HandleMessage(int, int)
+	?HandleSystemEventL@CPhoneState@@UAEXABVTWsEvent@@@Z @ 173 NONAME ; void CPhoneState::HandleSystemEventL(class TWsEvent const &)
+	?DisplayCallSetupL@CPhoneStateIdle@@IAEXH@Z @ 174 NONAME ; void CPhoneStateIdle::DisplayCallSetupL(int)
+	?ConstructL@CPhoneStateStartup@@MAEXXZ @ 175 NONAME ; void CPhoneStateStartup::ConstructL(void)
+	?HandleKeyMessageL@CPhoneStateStartup@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 176 NONAME ; void CPhoneStateStartup::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
+	?ShowNoteL@CPhoneState@@IAEXH@Z @ 177 NONAME ; void CPhoneState::ShowNoteL(int)
+	?HandlePropertyChangedL@CPhoneState@@UAEXABVTUid@@IH@Z @ 178 NONAME ; void CPhoneState::HandlePropertyChangedL(class TUid const &, unsigned int, int)
+	?IsAnyQueryActiveL@CPhoneState@@QAEHXZ @ 179 NONAME ; int CPhoneState::IsAnyQueryActiveL(void)
+	?State@CPhoneStateMachine@@UAEPAVMPhoneState@@XZ @ 180 NONAME ; class MPhoneState * CPhoneStateMachine::State(void)
+	?SetHandsfreeModeL@CPhoneState@@IAEXH@Z @ 181 NONAME ; void CPhoneState::SetHandsfreeModeL(int)
+	?IsCustomizedDialerVisibleL@CPhoneState@@QBEHXZ @ 182 NONAME ; int CPhoneState::IsCustomizedDialerVisibleL(void) const
+	?UpdateInCallCbaL@CPhoneStateCallSetup@@MAEXXZ @ 183 NONAME ; void CPhoneStateCallSetup::UpdateInCallCbaL(void)
+	?HandleNumberEntryClearedL@CPhoneStateInCall@@MAEXXZ @ 184 NONAME ; void CPhoneStateInCall::HandleNumberEntryClearedL(void)
+	??0CPhoneStateIncoming@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 185 NONAME ; CPhoneStateIncoming::CPhoneStateIncoming(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
+	??1CPhoneStateIncoming@@UAE@XZ @ 186 NONAME ; CPhoneStateIncoming::~CPhoneStateIncoming(void)
+	?HandleKeyLockEnabled@CPhoneUIController@@UAEXH@Z @ 187 NONAME ; void CPhoneUIController::HandleKeyLockEnabled(int)
+	?DisableCallUIL@CPhoneState@@QAEXXZ @ 188 NONAME ; void CPhoneState::DisableCallUIL(void)
+	?DeleteTouchPaneButtons@CPhoneState@@IAEXXZ @ 189 NONAME ; void CPhoneState::DeleteTouchPaneButtons(void)
+	?ProcessCommandL@CPhoneStateIdle@@UAEHH@Z @ 190 NONAME ; int CPhoneStateIdle::ProcessCommandL(int)
+	?IsNoteVisibleL@CPhoneState@@MAEHXZ @ 191 NONAME ; int CPhoneState::IsNoteVisibleL(void)
+	?DynInitMenuBarL@CPhoneUIController@@UAEXHPAVCEikMenuBar@@@Z @ 192 NONAME ; void CPhoneUIController::DynInitMenuBarL(int, class CEikMenuBar *)
+	?IsAlphanumericSupportedAndCharInput@CPhoneState@@MAEHABUTKeyEvent@@@Z @ 193 NONAME ; int CPhoneState::IsAlphanumericSupportedAndCharInput(struct TKeyEvent const &)
+	?HandlePhoneEngineMessageL@CPhoneStateStartup@@UAEXHH@Z @ 194 NONAME ; void CPhoneStateStartup::HandlePhoneEngineMessageL(int, int)
+	?HandleKeyEventL@CPhoneStateIncoming@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 195 NONAME ; void CPhoneStateIncoming::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?HandleKeyEventL@CPhoneStateStartup@@UAEXABUTKeyEvent@@W4TEventCode@@@Z @ 196 NONAME ; void CPhoneStateStartup::HandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?HandleNumberEntryClearedL@CPhoneState@@MAEXXZ @ 197 NONAME ; void CPhoneState::HandleNumberEntryClearedL(void)
+	?OnlyHashInNumberEntryL@CPhoneState@@MAEXXZ @ 198 NONAME ; void CPhoneState::OnlyHashInNumberEntryL(void)
+	?IncreaseAudioVolumeL@CPhoneState@@IAEXXZ @ 199 NONAME ; void CPhoneState::IncreaseAudioVolumeL(void)
+	?ConstructL@CPhoneStateIdle@@MAEXXZ @ 200 NONAME ; void CPhoneStateIdle::ConstructL(void)
+	?CheckIfShowCallTerminationNote@CPhoneState@@MAEHXZ @ 201 NONAME ; int CPhoneState::CheckIfShowCallTerminationNote(void)
+	?SetCallHeaderType@CPhoneState@@IAEXW4TPhoneCallTypeFlags@CBubbleManager@@@Z @ 202 NONAME ; void CPhoneState::SetCallHeaderType(enum CBubbleManager::TPhoneCallTypeFlags)
+	?SendGlobalInfoNoteL@CPhoneState@@QAEXH@Z @ 203 NONAME ; void CPhoneState::SendGlobalInfoNoteL(int)
+	?DisplayIdleScreenL@CPhoneState@@IAEXXZ @ 204 NONAME ; void CPhoneState::DisplayIdleScreenL(void)
+	?StartShowSecurityNoteL@CPhoneState@@IAEXXZ @ 205 NONAME ; void CPhoneState::StartShowSecurityNoteL(void)
+	?StoreNumberEntryContentL@CPhoneState@@IAEXXZ @ 206 NONAME ; void CPhoneState::StoreNumberEntryContentL(void)
+	?SetBTHandsfreeModeL@CPhoneState@@IAEXH@Z @ 207 NONAME ; void CPhoneState::SetBTHandsfreeModeL(int)
+	?HandlePhoneEngineMessageL@CPhoneStateIncoming@@UAEXHH@Z @ 208 NONAME ; void CPhoneStateIncoming::HandlePhoneEngineMessageL(int, int)
+	?SetDefaultFlagsL@CPhoneState@@IAEXXZ @ 209 NONAME ; void CPhoneState::SetDefaultFlagsL(void)
+	?HandleCommandL@CPhoneStateInCall@@UAEHH@Z @ 210 NONAME ; int CPhoneStateInCall::HandleCommandL(int)
+	?DialVoiceCallL@CPhoneStateIdle@@IAEXXZ @ 211 NONAME ; void CPhoneStateIdle::DialVoiceCallL(void)
+	?UpdateRemoteInfoDataL@CPhoneState@@IAEXH@Z @ 212 NONAME ; void CPhoneState::UpdateRemoteInfoDataL(int)
+	?GetRingingCallL@CPhoneStateInCall@@MAEHXZ @ 213 NONAME ; int CPhoneStateInCall::GetRingingCallL(void)
+	?HandleIdleForegroundEventL@CPhoneUIController@@UAEXXZ @ 214 NONAME ; void CPhoneUIController::HandleIdleForegroundEventL(void)
+	?HandlePhoneForegroundEventL@CPhoneState@@UAEXXZ @ 215 NONAME ; void CPhoneState::HandlePhoneForegroundEventL(void)
+	?HandleForegroundEventL@CPhoneState@@UAEXH@Z @ 216 NONAME ; void CPhoneState::HandleForegroundEventL(int)
+	?DisplayIncomingCallL@CPhoneStateIdle@@IAEXH@Z @ 217 NONAME ; void CPhoneStateIdle::DisplayIncomingCallL(int)
+	?HandleRemConCommandL@CPhoneState@@UAEHW4TRemConCoreApiOperationId@@W4TRemConCoreApiButtonAction@@@Z @ 218 NONAME ; int CPhoneState::HandleRemConCommandL(enum TRemConCoreApiOperationId, enum TRemConCoreApiButtonAction)
+	??1CPhoneStateIdle@@UAE@XZ @ 219 NONAME ; CPhoneStateIdle::~CPhoneStateIdle(void)
+	?PhoneNumberFromEntryLC@CPhoneState@@IAEPAVHBufC16@@XZ @ 220 NONAME ; class HBufC16 * CPhoneState::PhoneNumberFromEntryLC(void)
+	?BaseConstructL@CPhoneState@@QAEXXZ @ 221 NONAME ; void CPhoneState::BaseConstructL(void)
+	?HandlePhoneStartupL@CPhoneUIController@@UAEXXZ @ 222 NONAME ; void CPhoneUIController::HandlePhoneStartupL(void)
+	?SpeedDialL@CPhoneStateIdle@@IAEXABIW4TDialInitiationMethod@1@@Z @ 223 NONAME ; void CPhoneStateIdle::SpeedDialL(unsigned int const &, enum CPhoneStateIdle::TDialInitiationMethod)
+	?SetTouchPaneButtonEnabled@CPhoneState@@IAEXH@Z @ 224 NONAME ; void CPhoneState::SetTouchPaneButtonEnabled(int)
+	?SetPhoneEngine@CPhoneStateMachine@@UAEXPAVMPEPhoneModel@@@Z @ 225 NONAME ; void CPhoneStateMachine::SetPhoneEngine(class MPEPhoneModel *)
+	?SpeedDialCanceledL@CPhoneStateIdle@@IAEXABI@Z @ 226 NONAME ; void CPhoneStateIdle::SpeedDialCanceledL(unsigned int const &)
+	?CloseDTMFEditorL@CPhoneState@@IAEXXZ @ 227 NONAME ; void CPhoneState::CloseDTMFEditorL(void)
+	?SetTouchPaneVisible@CPhoneState@@IAEXH@Z @ 228 NONAME ; void CPhoneState::SetTouchPaneVisible(int)
+	?HandlePhoneFocusLostEventL@CPhoneUIController@@UAEXXZ @ 229 NONAME ; void CPhoneUIController::HandlePhoneFocusLostEventL(void)
+	?HandleKeyLockEnabled@CPhoneStateIncoming@@UAEXH@Z @ 230 NONAME ; void CPhoneStateIncoming::HandleKeyLockEnabled(int)
+	??0CPhoneStateMachine@@IAE@PAVMPhoneViewCommandHandle@@@Z @ 231 NONAME ; CPhoneStateMachine::CPhoneStateMachine(class MPhoneViewCommandHandle *)
+	??1CPhoneStateStartup@@UAE@XZ @ 232 NONAME ; CPhoneStateStartup::~CPhoneStateStartup(void)
+	?HandleKeyMessageL@CPhoneState@@UAEXW4TPhoneKeyEventMessages@MPhoneKeyEvents@@W4TKeyCode@@@Z @ 233 NONAME ; void CPhoneState::HandleKeyMessageL(enum MPhoneKeyEvents::TPhoneKeyEventMessages, enum TKeyCode)
+	?IsDialingExtensionInFocusL@CPhoneState@@QBEHXZ @ 234 NONAME ; int CPhoneState::IsDialingExtensionInFocusL(void) const
 
--- a/phoneapp/phoneuicontrol/eabi/phoneuicontrolu.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/eabi/phoneuicontrolu.def	Fri Feb 19 22:50:26 2010 +0200
@@ -468,4 +468,5 @@
 	_ZThn8_NK11CPhoneState17IsMenuBarVisibleLEv @ 467 NONAME
 	_ZN11CPhoneState17SetToolbarDimmingEi @ 468 NONAME
 	_ZN11CPhoneState34SetToolbarButtonLoudspeakerEnabledEv @ 469 NONAME
+	_ZNK11CPhoneState26IsDialingExtensionInFocusLEv @ 470 NONAME
 
--- a/phoneapp/phoneuicontrol/inc/cphoneaccessorybthandler.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/inc/cphoneaccessorybthandler.h	Fri Feb 19 22:50:26 2010 +0200
@@ -22,9 +22,9 @@
 // INCLUDES
 #include <e32base.h>
 #include <pevirtualengine.h> 
-#include <mphoneneclearedhandler.h>
-#include <mphonestatemachine.h>
-#include <mphoneviewcommandhandle.h>
+#include "mphoneneclearedhandler.h"
+#include "mphonestatemachine.h"
+#include "mphoneviewcommandhandle.h"
 
 // CLASS DECLARATION
  
--- a/phoneapp/phoneuicontrol/inc/cphonecbamanager.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/inc/cphonecbamanager.h	Fri Feb 19 22:50:26 2010 +0200
@@ -61,6 +61,9 @@
 
         /**
         * Set CBA
+        * If the given CBA resource ID equals EPhoneEasyDialingCba, then get the actual resource
+        * ID from the Dialer Extension View by executing command EPhoneViewGetEasyDialingCbaId
+        * via the Phone View Command Handle.
         */
         IMPORT_C void SetCbaL( TInt aResource );
         
@@ -101,6 +104,12 @@
         */
         TInt GetIncomingCallSilenceCBA( const TBool aSoftRejectActivated ); 
         
+        /**
+        * Get cba resource when number entry is visible
+        * @return Resource id of CBA
+        */
+        TInt GetNumberEntryCbaIdL();
+        
     private:
     
         /**
--- a/phoneapp/phoneuicontrol/inc/cphonestate.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/inc/cphonestate.h	Fri Feb 19 22:50:26 2010 +0200
@@ -369,6 +369,12 @@
 
         IMPORT_C void RetainPreviousKeylockStateL();
         
+        /**
+        * Check if possible dialer extension is in focus
+        * @return boolean value indicating if dialer extension is in focus
+        */
+        IMPORT_C TBool IsDialingExtensionInFocusL() const;
+
     public: // NumberEntry functions.
 
         /**
@@ -424,7 +430,7 @@
         /**
         * Disconnect call
         */
-        IMPORT_C TBool DisconnectCallL();
+        IMPORT_C virtual void DisconnectCallL();
 
         /**
         * Display idle screen
@@ -1102,6 +1108,12 @@
         * Opens virtual keyboard.
         */
         void OpenVkbL();
+        
+        /**
+        * Handles commands sent by easydialing plugin.
+        * @param aCommandId - command id to be handled
+        */
+        void HandleEasyDialingCommandsL( TInt aCommandId );
 
     private: // NumberEntry functions.
 
--- a/phoneapp/phoneuicontrol/inc/cphonestateidle.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/inc/cphonestateidle.h	Fri Feb 19 22:50:26 2010 +0200
@@ -281,6 +281,13 @@
              TPhoneCmdParamSpeedDial& aSpeedDialParam ) const;
 
          void HandleVoiceCallCommandL( TBool aSendKey );
+
+         /**
+          * Returns options menu id when number entry is visible.
+		  * If easydialing is in focus, id is asked from it.
+          * @return Menu resource id.
+          */   
+         TInt GetNumberAcqMenuIdL();
          
     private:
     
--- a/phoneapp/phoneuicontrol/src/cphonecbamanager.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/src/cphonecbamanager.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -139,37 +139,7 @@
             }
         else
             {
-            TBool dtmfEditorVisible = iViewCommandHandle.HandleCommandL(
-                    EPhoneViewIsDTMFEditorVisible ) ==
-                    EPhoneViewResponseSuccess;
-            TPhoneCmdParamInteger activeCallCount;
-            iViewCommandHandle.ExecuteCommandL(
-                    EPhoneViewGetCountOfActiveCalls, &activeCallCount );
-            
-            TPhoneCmdParamCallStateData callStateData;
-		    callStateData.SetCallState( EPEStateRinging );
-            iViewCommandHandle.HandleCommandL(
-                    EPhoneViewGetCallIdByState, &callStateData );
-		    
-            TInt incomingCall = callStateData.CallId();
-
-            if( dtmfEditorVisible )
-            	{
-                resourceId = EPhoneDtmfDialerCBA;
-                }                    
-            else if( activeCallCount.Integer() == ENoActiveCalls )
-                {
-                resourceId = EPhoneNumberAcqCBA;
-                }
-            else if ( activeCallCount.Integer() > ENoActiveCalls &&  
-            		  incomingCall > KErrNotFound )
-				{
-				resourceId = EPhoneCallHandlingCallWaitingCBA;
-				}
-            else
-                {
-                resourceId = EPhoneInCallNumberAcqCBA;
-                }
+            resourceId = GetNumberEntryCbaIdL();
             }
         }
 
@@ -343,9 +313,18 @@
             "CPhoneCbaManager::SetCbaL : %d",aResource );
 
     TPhoneCmdParamInteger integerParam;
-    integerParam.SetInteger(
-        CPhoneMainResourceResolver::Instance()->ResolveResourceID(
-        aResource ) );
+    
+    if ( EPhoneEasyDialingCba == aResource )
+        {
+        iViewCommandHandle.ExecuteCommandL( EPhoneViewGetEasyDialingCbaId, &integerParam );
+        }
+    else
+        {
+        integerParam.SetInteger(
+            CPhoneMainResourceResolver::Instance()->ResolveResourceID(
+            aResource ) );
+        }
+
     iViewCommandHandle.ExecuteCommandL( EPhoneViewUpdateCba,
         &integerParam );
     }
@@ -487,6 +466,56 @@
     return ret;
     }
 
+// -----------------------------------------------------------
+// CPhoneCbaManager::GetNumberEntryCbaIdL
+// -----------------------------------------------------------
+//
+TInt CPhoneCbaManager::GetNumberEntryCbaIdL()
+    {
+    TInt ret( EPhoneNumberAcqCBA );
+    
+    if ( iState->IsDialingExtensionInFocusL() )
+        {
+        ret = EPhoneEasyDialingCba;
+        }
+    else
+        {
+        TBool dtmfEditorVisible = iViewCommandHandle.HandleCommandL(
+                EPhoneViewIsDTMFEditorVisible ) ==
+                EPhoneViewResponseSuccess;
+        TPhoneCmdParamInteger activeCallCount;
+        iViewCommandHandle.ExecuteCommandL(
+                EPhoneViewGetCountOfActiveCalls, &activeCallCount );
+
+        TPhoneCmdParamCallStateData callStateData;
+        callStateData.SetCallState( EPEStateRinging );
+        iViewCommandHandle.HandleCommandL(
+                EPhoneViewGetCallIdByState, &callStateData );
+
+        TInt incomingCall = callStateData.CallId();
+
+        if( dtmfEditorVisible )
+            {
+            ret = EPhoneDtmfDialerCBA;
+            }                    
+        else if( activeCallCount.Integer() == ENoActiveCalls )
+            {
+            ret = EPhoneNumberAcqCBA;
+            }
+        else if ( activeCallCount.Integer() > ENoActiveCalls &&  
+                incomingCall > KErrNotFound )
+            {
+            ret = EPhoneCallHandlingCallWaitingCBA;
+            }
+        else
+            {
+            ret = EPhoneInCallNumberAcqCBA;
+            }
+        }
+    
+    return ret;
+    }
+
 // ======== LOCAL FUNCTIONS ========
 
 
--- a/phoneapp/phoneuicontrol/src/cphonestate.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/src/cphonestate.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -36,7 +36,7 @@
 #include <wlaninternalpskeys.h>
 #include <btengdomainpskeys.h>
 #include <btengdomaincrkeys.h>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
 #include <starterclient.h>
 #include <RSSSettings.h>
 #include <UikonInternalPSKeys.h>
@@ -105,6 +105,8 @@
 #include "cphonecallheadermanager.h"
 #include "cphonenumberentrymanager.h"
 #include "mphonestorage.h"
+#include "easydialingcommands.hrh"
+
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -459,7 +461,8 @@
         CPhoneBtaaDisconnectHandler::InstanceL()->HandleConnectionLostL();
         }
     else if ( audioOutput == EPEBTAudioAccessory && 
-            previousOutput != EPEBTAudioAccessory &&
+    		previousOutput > EPENotActive && 
+    		previousOutput != EPEBTAudioAccessory &&
             btAvailable )
         {
         CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC(
@@ -1059,7 +1062,9 @@
 
     if ( numberEntryUsed && ( aKeyEvent.iRepeats == 0 ||
               aKeyEvent.iScanCode == EStdKeyBackspace ||
-              aKeyEvent.iScanCode ==EStdKeyLeftArrow  ||
+              aKeyEvent.iScanCode ==EStdKeyLeftArrow  ||              
+              aKeyEvent.iScanCode == EStdKeyUpArrow  ||
+              aKeyEvent.iScanCode == EStdKeyDownArrow  ||              
               aKeyEvent.iScanCode ==EStdKeyRightArrow ))
         {
         // Number entry exists but may be hidden
@@ -1128,6 +1133,18 @@
     }
 
 // -----------------------------------------------------------
+// CPhoneState::IsDialingExtensionInFocusL
+// -----------------------------------------------------------
+//
+EXPORT_C TBool CPhoneState::IsDialingExtensionInFocusL() const
+    {
+    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsDialingExtensionInFocusL( ) ");
+    return iViewCommandHandle->HandleCommandL(
+        EPhoneViewGetEasyDialingInFocusStatus ) ==
+        EPhoneViewResponseSuccess;
+    }
+
+// -----------------------------------------------------------
 // CPhoneState::SendKeyEventL
 // -----------------------------------------------------------
 //
@@ -1437,7 +1454,9 @@
     else if ( aCategory == KPSUidStartup && aKey == KStartupSimSecurityStatus )
         {
         // Show security note, SIM is not valid.
-        if ( aValue == ESimRejected ||  aValue == ESimUnaccepted )
+        if ( aValue == ESimRejected 
+                || aValue == ESimUnaccepted 
+                || aValue == ESimInvalid )
             {
             __PHONELOG( EBasic, EPhoneControl, "CPhoneStateStartup::HandlePropertyChangedL - SimSecurity status received" );
             StartShowSecurityNoteL();
@@ -1508,7 +1527,7 @@
             //cancel emergency mode.
             TPhoneCmdParamBoolean booleanParam;
             booleanParam.SetBoolean( EFalse );
-            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRetrictedDialer,&booleanParam );
+            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRestrictedDialer, &booleanParam );
             }
             // this should be bypasses?
         case EPhoneDialerCallHandling:
@@ -1645,7 +1664,7 @@
                 // Set dialer to restricted mode.
                 TPhoneCmdParamBoolean booleanParam;
                 booleanParam.SetBoolean( ETrue );
-                iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRetrictedDialer,&booleanParam );
+                iViewCommandHandle->ExecuteCommandL( EPhoneViewSetRestrictedDialer, &booleanParam );
 
                 NumberEntryManagerL()->CreateNumberEntryL();
                 }
@@ -1734,16 +1753,28 @@
             DisconnectCallL();
             break;
 
+        case EPhoneCmdUpdateCba:
+        case EPhoneDialerValidNumber:
+        case EPhoneDialerInvalidNumber:
+        case EPhoneCmdBlockingDialogLaunched:
+        case EPhoneCmdBlockingDialogClosed:
+            {
+            // these command ids are sent by easydialing to communicate to phone app
+            HandleEasyDialingCommandsL( aCommand );
+            }
+            break;
+                
         default:
             if ( IsOnScreenDialerSupported() )
                 {
                 // Offer command to view.
+                // Easydialing commands are handled in view, too.
                 TPhoneViewResponseId resId =
                             iViewCommandHandle->HandleCommandL( aCommand );
 
                 if( resId == EPhoneViewResponseFailed )
                     {
-                    commandStatus = EFalse;
+                     commandStatus = EFalse;
                     }
                 }
             else
@@ -1958,7 +1989,7 @@
 // CPhoneState::DisconnectCallL
 // -----------------------------------------------------------
 //
-EXPORT_C TBool CPhoneState::DisconnectCallL()
+EXPORT_C void CPhoneState::DisconnectCallL()
     {
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisconnectCallL( ) ");
     // Fetch active call's id from view
@@ -1999,7 +2030,6 @@
             }
         }
 
-    TBool ret = EFalse;
     if( callStateData.CallId() > KErrNotFound )
         {
         // Release the call
@@ -2022,16 +2052,13 @@
             iStateMachine->SendPhoneEngineMessage(
                 MPEPhoneModel::EPEMessageRelease );
             }
-        ret = ETrue;
         }
     else
         {
         __PHONELOG( EOnlyFatal, EPhoneControl,
             "CPhoneState::DisconnectCallL has negative call id!" );
-        }
-
-    return ret;
-    }
+        }   
+   }
 
 // -----------------------------------------------------------
 // CPhoneState::DisplayIdleScreenL
@@ -2122,33 +2149,41 @@
                 }
             }
         }
-
-    // Get the number entry contents
-    HBufC* phoneNumber = PhoneNumberFromEntryLC();
-
-    // Call the number
-    iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber );
-
-    if ( phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength )
+    
+    // If easydialing has focus, call should be initiated to focused contact.
+    if ( IsDialingExtensionInFocusL() )
         {
-        // Closing effect is shown when dialer exist.
-        BeginTransEffectLC( ENumberEntryClose );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
-        EndTransEffect();
-
-        HandleNumberEntryClearedL();
+        iViewCommandHandle->HandleCommandL( EEasyDialingVoiceCall );
         }
-
-    CleanupStack::PopAndDestroy( phoneNumber );
-
-    if ( !iCustomization ||
-         !iCustomization->HandleCallFromNumberEntryL() )
-        {
-        // Customization didn't handle call. Dial voice call
-        // as normally
-        DialVoiceCallL();
+    else
+        {  
+        // Get the number entry contents
+        HBufC* phoneNumber = PhoneNumberFromEntryLC();
+        
+        // Call the number
+        iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber );
+    
+        if ( phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength )
+            {
+            // Closing effect is shown when dialer exist.
+            BeginTransEffectLC( ENumberEntryClose );            
+            iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
+            EndTransEffect();
+            
+            HandleNumberEntryClearedL();
+            }
+    
+        CleanupStack::PopAndDestroy( phoneNumber );        
+    
+        if ( !iCustomization || 
+             !iCustomization->HandleCallFromNumberEntryL() )
+            {
+            // Customization didn't handle call. Dial voice call
+            // as normally
+            DialVoiceCallL();
+            }
         }
-
+    
     }
 
 // -----------------------------------------------------------
@@ -2732,7 +2767,7 @@
             KCTsyCallType ) );
 
     TInt activeCallId = GetActiveCallIdL();
-    if ( activeCallId > KErrNotFound )
+    if ( activeCallId > KErrNone )
         {
         if ( iStateMachine->PhoneEngineInfo()->CallALSLine( activeCallId )
              == CCCECallParameters::ECCELineTypeAux )
@@ -2780,6 +2815,11 @@
                 }
             }
         }
+    // TODO: Refactor -> this looks really dubious.
+    else
+        {
+        incallIndicatorParam.SetLittleBubbleVisible( ETrue );
+        }
 
     // Update the in-call indicator
     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateIncallIndicator,
@@ -3334,6 +3374,7 @@
             {
             case ESimRejected:
             case ESimUnaccepted:
+            case ESimInvalid:
                 retVal = EFalse;
                 break;
 
@@ -3435,21 +3476,38 @@
 
     TInt resourceId ( KErrNone );
 
-    if ( SimSecurityStatus() == ESimRejected )
-        {
-        resourceId = CPhoneMainResourceResolver::Instance()->
-            ResolveResourceID( EPhoneSimRejected );
-        }
-    else if ( SimState() == EPESimNotPresent )
+
+    switch( SimSecurityStatus() )
         {
-        // insert sim card -note
-        resourceId = CPhoneMainResourceResolver::Instance()->
-            ResolveResourceID( EPhoneSimRemoved );
-        }
-    else if ( SimSecurityStatus() == ESimUnaccepted )
-        {
-        resourceId = CPhoneMainResourceResolver::Instance()->
-            ResolveResourceID( EPhoneSimUnaccepted );
+			  case ESimRejected:
+			      {
+			      resourceId = CPhoneMainResourceResolver::Instance()->
+              ResolveResourceID( EPhoneSimRejected );
+            break;
+			      }
+			  case ESimUnaccepted:
+			      {
+			      // insert sim card -note
+            resourceId = CPhoneMainResourceResolver::Instance()->
+              ResolveResourceID( EPhoneSimUnaccepted );	
+			      break;
+			      }
+			  case ESimInvalid:
+			      {
+			      resourceId = CPhoneMainResourceResolver::Instance()->
+              ResolveResourceID( EPhoneSIMInvalidUICC );
+			      break;
+			      }
+        default:
+	          {
+	          if ( SimState() == EPESimNotPresent )
+                {
+                // insert sim card -note
+                resourceId = CPhoneMainResourceResolver::Instance()->
+                    ResolveResourceID( EPhoneSimRemoved );
+                }
+	          break;	
+	          }
         }
 
     if ( resourceId != KErrNone )
@@ -3821,33 +3879,14 @@
             &numberEntryCountParam );
     TInt neLength( numberEntryCountParam.Integer() );
 
-    if( iCustomization && iCustomization->AllowAlphaNumericMode() )
+    if( neLength == 1 )
         {
-        if ( NumberEntryManagerL()->NumberEntryInNumericModeL() )
+        TPhoneCmdParamBoolean isSecurityMode;
+        iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode );
+
+        if ( !isSecurityMode.Boolean() )
             {
-            if ( neLength == 0 )
-                {
-                OnlyHashInNumberEntryL();
-                }
-
-            if ( neLength == 1 )
-                {
-                NumberEntryClearL();
-                }
-            }
-        NumberEntryManagerL()->NumberEntryToggleAlphaNumericModeL();
-        }
-    else
-        {
-        if( neLength == 1 )
-            {
-            TPhoneCmdParamBoolean isSecurityMode;
-            iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode );
-
-            if ( !isSecurityMode.Boolean() )
-                {
-                OnlyHashInNumberEntryL();
-                }
+            OnlyHashInNumberEntryL();
             }
         }
     }
@@ -4132,6 +4171,8 @@
     ESimSecurityStatusUninitialized = KStartupEnumerationFirstValue,
     ESimRejected,   // The PUK code has been entered incorrectly, so the card is rejected.
     ESimUnaccepted  // The SIM lock is on, so the card is unaccepted.
+    ESimInvalid     // The Sim inserted is not same as the one provided by the
+                    // operator, so card is invalid.
     */
     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SimSecurityStatus()" );
     return CPhonePubSubProxy::Instance()->Value(
@@ -4941,6 +4982,54 @@
         }
     }
 
+// ---------------------------------------------------------
+// CPhoneState::HandleEasyDialingCommandsL
+// ---------------------------------------------------------
+//
+void CPhoneState::HandleEasyDialingCommandsL( TInt aCommandId )
+    {
+    switch ( aCommandId )
+        {
+        case EPhoneCmdUpdateCba:
+            iCbaManager->UpdateInCallCbaL();
+            break;
+                
+        case EPhoneDialerValidNumber:
+            {
+            TPhoneCmdParamBoolean command;
+            command.SetBoolean( EFalse );
+            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetInvalidCsPhoneNumberFlag, &command );           
+            }
+            break;
+                
+        case EPhoneDialerInvalidNumber:
+            {
+            TPhoneCmdParamBoolean command;
+            command.SetBoolean( ETrue );
+            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetInvalidCsPhoneNumberFlag, &command );
+            }
+            break;
+            
+        case EPhoneCmdBlockingDialogLaunched:
+            {
+            TPhoneCmdParamBoolean param;
+            param.SetBoolean( ETrue );
+            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetBlockingDialogStatus, &param );
+            }
+            break;
+            
+        case EPhoneCmdBlockingDialogClosed:
+            {
+            TPhoneCmdParamBoolean param;
+            param.SetBoolean( EFalse );
+            iViewCommandHandle->ExecuteCommandL( EPhoneViewSetBlockingDialogStatus, &param );
+            }
+            break;
+            
+        default:
+            break;
+        }
+    }
 
 //  End of File
 
--- a/phoneapp/phoneuicontrol/src/cphonestateidle.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/src/cphonestateidle.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -58,6 +58,7 @@
 #include "phoneui.pan"
 #include "phoneconstants.h"
 #include "mphonecustomization.h"
+#include <easydialingcommands.hrh>
 
 //CONSTANTS
 const TInt  KMaxParamLength = 1024;
@@ -307,7 +308,14 @@
         case EKeyEnter:
             if ( IsNumberEntryVisibleL() )
                 {
-                HandleCommandL( EPhoneCmdOptions );
+                if ( IsDialingExtensionInFocusL() )
+                    {
+                    HandleCommandL( EEasyDialingEnterKeyAction );
+                    }
+                else
+                    {
+                    HandleCommandL( EPhoneCmdOptions );
+                    }               
                 }
             break;
 #endif
@@ -541,9 +549,8 @@
             // Open number entry menubar
             TPhoneCmdParamInteger integerParam;  
                       
-            integerParam.SetInteger( 
-             CPhoneMainResourceResolver::Instance()->
-                ResolveResourceID( EPhoneNumberAcqMenubar ) );               
+            TInt menuId( GetNumberAcqMenuIdL() );
+            integerParam.SetInteger( menuId );   
 
             iViewCommandHandle->ExecuteCommandL( 
                 EPhoneViewMenuBarOpen, &integerParam );
@@ -563,7 +570,13 @@
             
         case EPhoneCmdBack:
             HandleBackCommandL();
-            break;            
+            break;      
+     
+        case EPhoneViewOpenNumberEntry:    
+            BeginTransEffectLC( ENumberEntryCreate );
+            commandStatus = CPhoneState::HandleCommandL( aCommand );
+            EndTransEffect();        
+            break; 
             
         default:
             commandStatus = CPhoneState::HandleCommandL( aCommand );
@@ -649,6 +662,7 @@
 void CPhoneStateIdle::HandleBackCommandL()
     {
     TBool previousApp(EFalse);
+
     // If previous app activation is true then open
     // previous application.
     if ( iOnScreenDialer && 
@@ -658,29 +672,40 @@
         iViewCommandHandle->ExecuteCommandL( 
             EPhoneViewGetActivatePreviousApp, &booleanParam );
         
+
         if ( booleanParam.Boolean() )
             {
             // Open previous app.
             iViewCommandHandle->ExecuteCommandL( 
                 EPhoneViewActivatePreviousApp );
 
+            BeginTransEffectLC( ENumberEntryClose ); 
+
             // Remove number entry from screen
             iViewCommandHandle->ExecuteCommandL( 
                 EPhoneViewRemoveNumberEntry ); 
 
+            EndTransEffect(); 
+
             iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW ); 
             previousApp = ETrue;   
-            }
+            }        
         }
         
     if ( !previousApp )
         {
+        BeginTransEffectLC( ENumberEntryClose ); 
+
         // Remove number entry from screen
         iViewCommandHandle->ExecuteCommandL( 
             EPhoneViewRemoveNumberEntry );
+        
+        EndTransEffect();
+        
         // Do state-specific operation when number entry is cleared
         HandleNumberEntryClearedL();
-        }    
+        }  
+ 
     }
 
 // -----------------------------------------------------------
@@ -1148,21 +1173,22 @@
             else if ( !TopAppIsDisplayedL() )
                 {
                 // Phone might not be the topmost app since it has
-                // some dialog/query open therefore we need to check this
-                // and remove dialog/phone.
-                if ( IsAnyQueryActiveL()  )
+                // some dialog/query open therefore we need to remove dialog/phone.
+            
+                if ( !IsSimStateNotPresentWithSecurityModeEnabled() )
                     {
-                    if ( !IsSimStateNotPresentWithSecurityModeEnabled() )
-                        {
-                        iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
-                        }
+                    iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
+                    }
+                // Remove number entry from screen
+                iViewCommandHandle->ExecuteCommandL( 
+                        EPhoneViewRemoveNumberEntry );
                     
-                    // Remove number entry from screen
-                    iViewCommandHandle->ExecuteCommandL( 
-                        EPhoneViewRemoveNumberEntry );
-                    } 
-			    // Bring Idle app to the foreground
+                // Bring Idle app to the foreground
                 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringIdleToForeground );
+                
+                // Updates Task list
+                iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW );
+
                 }
             }
         else if ( IsNumberEntryUsedL() )
@@ -1307,32 +1333,31 @@
 // -----------------------------------------------------------------------------
 //
 TBool CPhoneStateIdle::CheckAppLaunchingL( const TKeyCode aCode )
-	{
-	TBool valuesFetched( EFalse );
-	
-	if( !IsSimOk() )
-	    {
-	    return valuesFetched;
-	    }
-	
-	TPhoneCmdParamAppInfo appInfo;
-	HBufC8* appParam = HBufC8::NewL( KMaxParamLength );
-	CleanupStack::PushL( appParam );
+    {
+    TBool valuesFetched( EFalse );
+    
+    if( !IsSimOk() )
+        {
+        return valuesFetched;
+        }
+    
+    TPhoneCmdParamAppInfo appInfo;
+    HBufC8* appParam = HBufC8::NewL( KMaxParamLength );
+    CleanupStack::PushL( appParam );
 
-    TPhoneCmdParamInteger numberEntryCount;
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount,
-        &numberEntryCount );
+    TBool isValidAppLaunchingKeyEvent = ETrue;
     
-    TBool isValidAppLaunchingKeyEvent = EFalse;
-    if ( iCustomization && iCustomization->AllowAlphaNumericMode() &&
-         TKeyCode( KPhoneDtmfHashCharacter ) == aCode )
+    // By-pass checking of number entry length in case of #-character.
+    // #-character is handled differently from other keys, and number 
+    // entry length has been checked earlier. Checking number entry length
+    // for #-character is difficult here, because we cannot know if FEP
+    // has removed the long-# from number entry or not.
+    if ( TKeyCode( KPhoneDtmfHashCharacter ) != aCode )
         {
-        // If alphanumeric mode is supported FEP changes text input mode with
-        // long hash and removes hash from number entry.
-        isValidAppLaunchingKeyEvent = ( numberEntryCount.Integer() == 0 );
-        }
-    else
-        {
+        TPhoneCmdParamInteger numberEntryCount;
+        iViewCommandHandle->ExecuteCommandL( EPhoneViewGetNumberEntryCount,
+            &numberEntryCount );
+    
         isValidAppLaunchingKeyEvent = ( numberEntryCount.Integer() == 1 );
         }
     
@@ -1340,21 +1365,21 @@
         {
         TRAPD( err, 
             CPhoneCenRepProxy::Instance()->FetchValuesFromCenRepL( 
-        	appInfo, aCode, appParam, valuesFetched ) );
+            appInfo, aCode, appParam, valuesFetched ) );
         
         if ( KErrNone == err && valuesFetched )
             {
             // Remove the number entry window
             iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
 
-        	// Stop playing DTMF tone
-        	iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
+            // Stop playing DTMF tone
+            iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
 
             TPhoneCommandParam* phoneCommandParam = 
                 static_cast<TPhoneCommandParam*>( &appInfo );
-        	iViewCommandHandle->ExecuteCommandL( 
-        				EPhoneViewActivateAppViewConventional,
-        				phoneCommandParam ); 
+            iViewCommandHandle->ExecuteCommandL( 
+                        EPhoneViewActivateAppViewConventional,
+                        phoneCommandParam ); 
             
             // Continue displaying current app but set up the 
             // idle screen in the background
@@ -1363,7 +1388,7 @@
         }
     CleanupStack::PopAndDestroy( appParam );
     return valuesFetched;
-	}
+    }
 
 // -----------------------------------------------------------
 // CPhoneStateIdle::NumberForSpeedDialLocationL
@@ -1422,7 +1447,12 @@
         else
 #endif // _DEBUG
             {
-            if ( IsSpeedDialNumber( *phoneNumber ) )
+            if ( IsDialingExtensionInFocusL() )
+                {
+                CPhoneState::HandleCommandL( EEasyDialingVoiceCall );
+                }
+            
+            else if ( IsSpeedDialNumber( *phoneNumber ) )
                 {
                 // Handle speed dial
                 SpeedDialL( (*phoneNumber)[0], aSendKey ? EDialMethodSendCommand : EDialMethodMenuSelection );
@@ -1439,4 +1469,29 @@
         }    
     }
 
+// -----------------------------------------------------------
+// CPhoneStateIdle::HandleVoiceCallCommandL()
+// -----------------------------------------------------------
+//
+TInt CPhoneStateIdle::GetNumberAcqMenuIdL()
+    {
+    TInt menuId = CPhoneMainResourceResolver::Instance()->
+            ResolveResourceID( EPhoneNumberAcqMenubar );
+    
+    // Use easy dialing menu id, if easydialing is in focus.
+    // Otherwise use number acquisition menu id.
+    if ( IsDialingExtensionInFocusL() )
+        {
+        // Fetch easydialing menu id, check its validity and assign to menuId
+        TPhoneCmdParamInteger integerParam;  
+        iViewCommandHandle->ExecuteCommandL(
+                EPhoneViewGetEasyDialingMenuId, &integerParam );
+        if ( integerParam.Integer() ) 
+            {
+            menuId = integerParam.Integer();
+            }
+        }
+    return menuId;
+    }
+
 // End of File
--- a/phoneapp/phoneuicontrol/src/cphonestateincall.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/src/cphonestateincall.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -51,6 +51,8 @@
 #include "cphonemediatorsender.h"
 #include "cphoneterminateallconnectionscommand.h"
 #include "mphonecustomization.h"
+#include "easydialingcommands.hrh"
+
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -146,7 +148,15 @@
                 }
             else if ( IsNumberEntryVisibleL() )
                 {
-                HandleCommandL( EPhoneCmdOptions );
+                if ( IsDialingExtensionInFocusL() )
+                    {
+                    iViewCommandHandle->HandleCommandL(
+                                       EEasyDialingEnterKeyAction );
+                    }
+                else
+                    {
+                    HandleCommandL( EPhoneCmdOptions );
+                    }
                 }
             break;
 #endif            
@@ -762,7 +772,7 @@
 
         case EPhoneCmdEnd:
             CloseDtmfQueryL();
-            CPhoneState::DisconnectCallL();
+            DisconnectCallL();
             break;
             
         // 'End all calls' from menu
--- a/phoneapp/phoneuicontrol/src/cphoneuicontroller.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuicontrol/src/cphoneuicontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -35,6 +35,7 @@
 #include "cphonecenrepproxy.h"
 #include "cphonemediatorfactory.h"
 #include "tphonecmdparamnumberentryobserver.h"
+#include <phoneappcommands.hrh>
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -323,9 +324,17 @@
     {
     __ASSERT_DEBUG( iStateMachine->State(), Panic( EPhoneCtrlInvariant ) );
 
+    
 	// Send key up message to engine so that we wouldn't accidentally play
 	// any DTMF tone.
-    iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
+    
+    // DTMF tone is not ended if command is EPhoneDialerValidNumber or
+    // EPhoneDialerInvalidNumber. These commands result from
+    // user pressing numbers, and they must not interfere with tones.
+    if ( ! ( aCommand == EPhoneDialerValidNumber || aCommand == EPhoneDialerInvalidNumber ) )
+        {
+        iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
+        }
 
     return iStateMachine->State()->HandleCommandL( aCommand );
     }
--- a/phoneapp/phoneuistates/bwins/phoneuistatesu.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/bwins/phoneuistatesu.def	Fri Feb 19 22:50:26 2010 +0200
@@ -62,4 +62,6 @@
 	??0CPhoneTwoSingles@@IAE@PAVMPhoneStateMachine@@PAVMPhoneViewCommandHandle@@PAVMPhoneCustomization@@@Z @ 61 NONAME ; CPhoneTwoSingles::CPhoneTwoSingles(class MPhoneStateMachine *, class MPhoneViewCommandHandle *, class MPhoneCustomization *)
 	?CallId@CPhoneSingleCall@@IBEHXZ @ 62 NONAME ; int CPhoneSingleCall::CallId(void) const
 	?HandleConnectedConferenceL@CPhoneTwoSingles@@MAEXH@Z @ 63 NONAME ; void CPhoneTwoSingles::HandleConnectedConferenceL(int)
+	?HandleErrorL@CPhoneConferenceAndSingleAndWaiting@@UAEXABUTPEErrorInfo@@@Z @ 64 NONAME ; void CPhoneConferenceAndSingleAndWaiting::HandleErrorL(struct TPEErrorInfo const &)
+	?HandleErrorL@CPhoneConferenceAndWaiting@@UAEXABUTPEErrorInfo@@@Z @ 65 NONAME ; void CPhoneConferenceAndWaiting::HandleErrorL(struct TPEErrorInfo const &)
 
--- a/phoneapp/phoneuistates/eabi/phoneuistatesu.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/eabi/phoneuistatesu.def	Fri Feb 19 22:50:26 2010 +0200
@@ -255,4 +255,8 @@
 	_ZThn8_N16CPhoneTwoSingles17HandleKeyMessageLEN15MPhoneKeyEvents22TPhoneKeyEventMessagesE8TKeyCode @ 254 NONAME
 	_ZThn8_N16CPhoneTwoSinglesD0Ev @ 255 NONAME
 	_ZThn8_N16CPhoneTwoSinglesD1Ev @ 256 NONAME
+	_ZN26CPhoneConferenceAndWaiting12HandleErrorLERK12TPEErrorInfo @ 257 NONAME
+	_ZN35CPhoneConferenceAndSingleAndWaiting12HandleErrorLERK12TPEErrorInfo @ 258 NONAME
+	_ZThn4_N26CPhoneConferenceAndWaiting12HandleErrorLERK12TPEErrorInfo @ 259 NONAME
+	_ZThn4_N35CPhoneConferenceAndSingleAndWaiting12HandleErrorLERK12TPEErrorInfo @ 260 NONAME
 
--- a/phoneapp/phoneuistates/inc/cphoneconference.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/inc/cphoneconference.h	Fri Feb 19 22:50:26 2010 +0200
@@ -121,6 +121,7 @@
 
         void UpdateConferenceSecurityStatusL( TInt aCallId );
 		
+        virtual void DisconnectCallL();
         
      private:
               
--- a/phoneapp/phoneuistates/inc/cphoneconferenceandsingle.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/inc/cphoneconferenceandsingle.h	Fri Feb 19 22:50:26 2010 +0200
@@ -90,6 +90,7 @@
         
         virtual void HandleConferenceIdleL();
         
+        virtual void DisconnectCallL();
         
      private:
      
--- a/phoneapp/phoneuistates/inc/cphoneconferenceandsingleandwaiting.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/inc/cphoneconferenceandsingleandwaiting.h	Fri Feb 19 22:50:26 2010 +0200
@@ -66,6 +66,14 @@
             const TKeyEvent& aKeyEvent,
             TEventCode aEventCode );
         
+        /**
+        * HandleError
+        * Implements error handling framework
+        * @param aErrorInfo: the error info
+        */
+        IMPORT_C virtual void HandleErrorL( 
+            const TPEErrorInfo& aErrorInfo ); 
+        
     protected:
 
         /**
--- a/phoneapp/phoneuistates/inc/cphoneconferenceandwaiting.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/inc/cphoneconferenceandwaiting.h	Fri Feb 19 22:50:26 2010 +0200
@@ -66,6 +66,14 @@
             const TKeyEvent& aKeyEvent,
             TEventCode aEventCode );
         
+        /**
+        * HandleError
+        * Implements error handling framework
+        * @param aErrorInfo: the error info
+        */
+        IMPORT_C virtual void HandleErrorL( 
+            const TPEErrorInfo& aErrorInfo ); 
+        
     protected:
 
         /**
--- a/phoneapp/phoneuistates/src/cphonealerting.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphonealerting.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -226,12 +226,7 @@
                 }
             }
             break;
-        case MEngineMonitor::EPEMessageColpNumberAvailable:
-            {
-            HandleColpNoteL( aCallId );
-            return;
-            }
-            break;            
+                   
         
         default:
             break;
--- a/phoneapp/phoneuistates/src/cphoneconference.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneconference.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -924,6 +924,12 @@
         "CPhoneConference::HandleIncomingL()");
     
     BeginUiUpdateLC();
+    
+    // Hide the number entry if it exists
+    if ( IsNumberEntryUsedL() )
+        {
+        SetNumberEntryVisibilityL( EFalse );    
+        }
  
     TPhoneCmdParamBoolean dialerParam;
     dialerParam.SetBoolean( ETrue );
@@ -1126,4 +1132,35 @@
         }
     }
 
+// -----------------------------------------------------------
+// CPhoneConference::DisconnectCallL
+// -----------------------------------------------------------
+//
+void CPhoneConference::DisconnectCallL()
+    {
+    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConference::DisconnectCallL( ) ");
+    // Fetch active call's id from view
+    TPhoneCmdParamCallStateData callStateData;
+    callStateData.SetCallState( EPEStateConnected );
+    iViewCommandHandle->HandleCommandL(
+        EPhoneViewGetCallIdByState, &callStateData );
+
+    if( callStateData.CallId() == KErrNotFound )
+        {
+        // No connected call, find the hold call
+        callStateData.SetCallState( EPEStateHeld );
+        iViewCommandHandle->HandleCommandL(
+            EPhoneViewGetCallIdByState, &callStateData );
+        }
+  
+    if( callStateData.CallId() > KErrNotFound  )
+        {
+        iStateMachine->SendPhoneEngineMessage(
+                      CPEPhoneModelIF::EPEMessageHangUpConference );  
+        }
+    else
+        {
+        CPhoneState::DisconnectCallL();
+        }
+    }
 // End of File
--- a/phoneapp/phoneuistates/src/cphoneconferenceandcallsetup.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneconferenceandcallsetup.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -52,13 +52,15 @@
 //
 CPhoneConferenceAndCallSetup::~CPhoneConferenceAndCallSetup()
     {
-    // Reset flag
+    // Need to check iViewCommandHandle validity here to not
+    // trigger a high/can panic error in a Codescanner run.
+    // coverity[var_compare_op]
     if ( iViewCommandHandle )
         {
         TPhoneCmdParamBoolean dtmfSendFlag;
         dtmfSendFlag.SetBoolean( EFalse );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
-    	    &dtmfSendFlag );
+        TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
+    	    &dtmfSendFlag ) );
         }
     }
 
@@ -131,12 +133,6 @@
             }
             break;
             
-        case MEngineMonitor::EPEMessageColpNumberAvailable:
-            {
-            HandleColpNoteL( aCallId );            
-            }
-            break;         
-            
         default:
             {
             CPhoneConference::HandlePhoneEngineMessageL( aMessage, 
--- a/phoneapp/phoneuistates/src/cphoneconferenceandsingle.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneconferenceandsingle.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -57,13 +57,15 @@
 //
 CPhoneConferenceAndSingle::~CPhoneConferenceAndSingle()
     {
-    // Reset flag 
+    // Need to check iViewCommandHandle validity here to not
+    // trigger a high/can panic error in a Codescanner run.
+    // coverity[var_compare_op]
     if ( iViewCommandHandle )
         {
         TPhoneCmdParamBoolean dtmfSendFlag;
         dtmfSendFlag.SetBoolean( EFalse );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
-    	    &dtmfSendFlag );     	
+        TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
+    	    &dtmfSendFlag ) );     	
         }
     }
 
@@ -461,6 +463,12 @@
     
     BeginUiUpdateLC();  
     
+    // Hide the number entry if it exists
+    if ( IsNumberEntryUsedL() )
+        {
+        SetNumberEntryVisibilityL( EFalse );    
+        }
+    
     TPhoneCmdParamBoolean dialerParam;
     dialerParam.SetBoolean( ETrue );
     
@@ -653,4 +661,28 @@
     CleanupStack::PopAndDestroy( phoneNumber );
     }
 
+// -----------------------------------------------------------
+// CPhoneConferenceAndSingle::DisconnectCallL
+// -----------------------------------------------------------
+//
+void CPhoneConferenceAndSingle::DisconnectCallL()
+    {
+    __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndSingle::DisconnectCallL( ) ");
+    // Fetch active call's id from view
+    TPhoneCmdParamCallStateData callStateData;
+    callStateData.SetCallState( EPEStateConnected );
+    iViewCommandHandle->HandleCommandL(
+        EPhoneViewGetCallIdByState, &callStateData );
+  
+    if( callStateData.CallId() > KErrNotFound  && callStateData.CallId() == KConferenceCallId )
+        {
+        iStateMachine->SendPhoneEngineMessage(
+                      CPEPhoneModelIF::EPEMessageHangUpConference );  
+        }
+    else
+        {
+        CPhoneState::DisconnectCallL();
+        }
+    }
+
 // End of File
--- a/phoneapp/phoneuistates/src/cphoneconferenceandsingleandwaiting.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneconferenceandsingleandwaiting.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -34,7 +34,7 @@
 #include "phoneui.hrh"
 #include "mphonestorage.h"
 #include "cphonecenrepproxy.h"
-#include <TelephonyVariant.hrh>
+#include <telephonyvariant.hrh>
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -57,13 +57,15 @@
 //
 CPhoneConferenceAndSingleAndWaiting::~CPhoneConferenceAndSingleAndWaiting()
     {
-    // Reset flag
+    // Need to check iViewCommandHandle validity here to not
+    // trigger a high/can panic error in a Codescanner run.
+    // coverity[var_compare_op]
     if ( iViewCommandHandle )
         {
         TPhoneCmdParamBoolean dtmfSendFlag;
         dtmfSendFlag.SetBoolean( EFalse );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
-    	&dtmfSendFlag );
+        TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
+    	&dtmfSendFlag ) );
         }
     }
 
@@ -437,6 +439,28 @@
     }
 
 // -----------------------------------------------------------
+// CPhoneConferenceAndSingleAndWaiting::HandleErrorL
+// -----------------------------------------------------------
+//
+EXPORT_C void CPhoneConferenceAndSingleAndWaiting::HandleErrorL( 
+        const TPEErrorInfo& aErrorInfo )
+    {
+    __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingleAndWaiting::HandleErrorL()");
+    
+    if( aErrorInfo.iErrorCode == ECCPErrorCCUserAlertingNoAnswer )
+        {
+        // Should not shown "No Answer" note
+        __PHONELOG1( EBasic, EPhoneUIStates,
+       "PhoneUIStates: CPhoneConferenceAndSingleAndWaiting::HandleErrorL - aErrorInfo.iErrorCode =%d ",
+            aErrorInfo.iErrorCode);
+        }
+    else
+        {
+        CPhoneState::HandleErrorL( aErrorInfo );
+        }
+    }
+
+// -----------------------------------------------------------
 // CPhoneConferenceAndSingleAndWaiting::UpdateInCallCbaL
 // -----------------------------------------------------------
 //
--- a/phoneapp/phoneuistates/src/cphoneconferenceandwaiting.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneconferenceandwaiting.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -20,7 +20,7 @@
 #include <StringLoader.h>
 #include <cpephonemodelif.h>
 #include <featmgr.h>
-#include <TelephonyVariant.hrh>
+#include <telephonyvariant.hrh>
 #include "cphoneconferenceandwaiting.h"
 #include "mphonestatemachine.h"
 #include "phoneviewcommanddefinitions.h"
@@ -187,6 +187,28 @@
     }
 
 // -----------------------------------------------------------
+// CPhoneConferenceAndWaiting::HandleErrorL
+// -----------------------------------------------------------
+//
+EXPORT_C void CPhoneConferenceAndWaiting::HandleErrorL( 
+        const TPEErrorInfo& aErrorInfo )
+    {
+    __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleErrorL()");
+    
+    if( aErrorInfo.iErrorCode == ECCPErrorCCUserAlertingNoAnswer )
+        {
+        // Should not shown "No Answer" note
+        __PHONELOG1( EBasic, EPhoneUIStates,
+       "PhoneUIStates: CPhoneConferenceAndWaiting::HandleErrorL - aErrorInfo.iErrorCode =%d ",
+            aErrorInfo.iErrorCode);
+        }
+    else
+        {
+        CPhoneState::HandleErrorL( aErrorInfo );
+        }
+    }
+
+// -----------------------------------------------------------
 // CPhoneConferenceAndWaiting::OpenMenuBarL
 // -----------------------------------------------------------
 //
--- a/phoneapp/phoneuistates/src/cphoneconferenceandwaitingandcallsetup.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneconferenceandwaitingandcallsetup.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -54,13 +54,15 @@
 //
 CPhoneConferenceAndWaitingAndCallSetup::~CPhoneConferenceAndWaitingAndCallSetup()
     {
-    // Reset flag
+    // Need to check iViewCommandHandle validity here to not
+    // trigger a high/can panic error in a Codescanner run.
+    // coverity[var_compare_op]
     if ( iViewCommandHandle )
         {
         TPhoneCmdParamBoolean dtmfSendFlag;
         dtmfSendFlag.SetBoolean( EFalse );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
-            &dtmfSendFlag );        
+        TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
+            &dtmfSendFlag ) );        
         }
     }
 
@@ -135,12 +137,6 @@
             HandleIdleL( aCallId );
             }
             break;
-            
-        case MEngineMonitor::EPEMessageColpNumberAvailable:
-            {
-            HandleColpNoteL( aCallId );            
-            }
-            break;         
 
         default:
             {
--- a/phoneapp/phoneuistates/src/cphoneemergency.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneemergency.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -182,6 +182,13 @@
                     }
                  }
             break;
+            
+        case MEngineMonitor::EPEMessageColpNumberAvailable:
+            {
+            //Don't show COLP note during emergency call.
+            return;                    
+            }
+            break; 
 
         default:
             CPhoneGsmInCall::HandlePhoneEngineMessageL(
--- a/phoneapp/phoneuistates/src/cphonegsmincall.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphonegsmincall.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -142,6 +142,12 @@
     	    UpdateCbaL( EPhoneCallHandlingInCallCBA );
 			}
 			break;
+			
+        case MEngineMonitor::EPEMessageColpNumberAvailable:
+            {
+            HandleColpNoteL( aCallId );                    
+            }
+            break; 
 
         default:
             CPhoneStateInCall::HandlePhoneEngineMessageL( 
--- a/phoneapp/phoneuistates/src/cphoneincoming.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphoneincoming.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -194,6 +194,12 @@
     
     BeginUiUpdateLC();
     
+    // Hide the number entry if it exists
+    if ( IsNumberEntryUsedL() )
+        {
+        SetNumberEntryVisibilityL( EFalse );    
+        }
+    
     TPhoneCmdParamBoolean dialerParam;
     dialerParam.SetBoolean( ETrue );
     
--- a/phoneapp/phoneuistates/src/cphonesingleandalerting.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphonesingleandalerting.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -111,13 +111,7 @@
             HandleIdleL( aCallId );
             }
             break;
-            
-        case MEngineMonitor::EPEMessageColpNumberAvailable:
-            {
-            HandleColpNoteL( aCallId );            
-            }
-            break;         
-            
+           
         default:
             {
             CPhoneAlerting::HandlePhoneEngineMessageL( aMessage, aCallId );
--- a/phoneapp/phoneuistates/src/cphonesingleandcallsetupandwaiting.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphonesingleandcallsetupandwaiting.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -221,12 +221,7 @@
             // Flow through to default branch.
             CaptureKeysDuringCallNotificationL( EFalse );
             }
-            
-        case MEngineMonitor::EPEMessageColpNumberAvailable:
-            {
-            HandleColpNoteL( aCallId );            
-            }
-            break;   
+           
         default:
             {
             CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId );
--- a/phoneapp/phoneuistates/src/cphonesinglecall.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphonesinglecall.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -27,7 +27,7 @@
 #include <connect/sbdefs.h>
 #include <videotelcontrolmediatorapi.h>
 #include <MediatorDomainUIDs.h>
-#include <TelephonyVariant.hrh>
+#include <telephonyvariant.hrh>
 
 #include "cphonesinglecall.h"
 #include "tphonecmdparamstring.h"
@@ -499,6 +499,12 @@
     
     BeginUiUpdateLC();
     
+    // Hide the number entry if it exists
+    if ( IsNumberEntryUsedL() )
+        {
+        SetNumberEntryVisibilityL( EFalse );    
+        }
+    
     TPhoneCmdParamBoolean dialerParam;
     dialerParam.SetBoolean( ETrue );
     
--- a/phoneapp/phoneuistates/src/cphonetwosingles.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphonetwosingles.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -399,6 +399,12 @@
     
     BeginUiUpdateLC();
     
+    // Hide the number entry if it exists
+    if ( IsNumberEntryUsedL() )
+        {
+        SetNumberEntryVisibilityL( EFalse );    
+        }
+    
     TPhoneCmdParamBoolean dialerParam;
     dialerParam.SetBoolean( ETrue );
     
--- a/phoneapp/phoneuistates/src/cphonetwosinglesandwaiting.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuistates/src/cphonetwosinglesandwaiting.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -20,7 +20,7 @@
 #include <pevirtualengine.h>
 #include <StringLoader.h>
 #include <mpeengineinfo.h>
-#include <FeatMgr.h>
+#include <featmgr.h>
 #include "cphonetwosinglesandwaiting.h"
 #include "tphonecmdparamboolean.h"
 #include "mphonestatemachine.h"
--- a/phoneapp/phoneuiutils/inc/phoneloggerviewcommands.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiutils/inc/phoneloggerviewcommands.h	Fri Feb 19 22:50:26 2010 +0200
@@ -293,8 +293,8 @@
 		EPhoneViewIsStraightCallToVideoMailBox,
 		/** EPhoneViewSetDtmfDialerViewVisible */
 		EPhoneViewSetDtmfDialerViewVisible,
-		/** EPhoneViewSetRetrictedDialer */
-		EPhoneViewSetRetrictedDialer,
+		/** EPhoneViewSetRestrictedDialer */
+		EPhoneViewSetRestrictedDialer,
 		/** EPhoneViewIsConferenceInExpandedMode */
 		EPhoneViewIsConferenceInExpandedMode,
 		/** EPhoneViewIsMenuBarVisible */
@@ -415,6 +415,24 @@
 		EPhoneViewSetNoConnectedCalls,
 		/** EPhoneViewIsDTMFEditorVisible */
 		EPhoneViewIsDTMFEditorVisible,
+		/** EPhoneViewSetToolbarDimming */
+		EPhoneViewSetToolbarDimming,
+		/** EPhoneViewEnableToolbarButton */
+		EPhoneViewEnableToolbarButton,
+		/** EPhoneViewHideToolbar */
+		EPhoneViewHideToolbar,
+		/** EPhoneViewShowToolbar */
+		EPhoneViewShowToolbar,
+		/** EPhoneViewGetEasyDialingInFocusStatus */
+		EPhoneViewGetEasyDialingInFocusStatus,
+		/** EPhoneViewSetInvalidCsPhoneNumberFlag */
+		EPhoneViewSetInvalidCsPhoneNumberFlag,
+		/** EPhoneViewGetInvalidCsPhoneNumberFlag */
+		EPhoneViewGetInvalidCsPhoneNumberFlag,
+		/** EPhoneViewGetEasyDialingMenuId */
+		EPhoneViewGetEasyDialingMenuId,
+		/** EPhoneViewGetEasyDialingCbaId */
+		EPhoneViewGetEasyDialingCbaId,
 		/** , // Don't remove this, this should always be the last in list. */
 		EPhoneAmountOfCommands
 		};
--- a/phoneapp/phoneuiutils/inc/phonerssbase.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiutils/inc/phonerssbase.h	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002 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"
@@ -359,6 +359,7 @@
     EPhoneNoteTTYNoAudioControl, //300
     EPhoneInfoClirChange,
     EPhoneInfoCugInUse,
+    EPhoneSIMInvalidUICC,
 
     //the "DTMF number" list query
     EPhoneDtmfNumberListQuery,
@@ -389,6 +390,8 @@
     EPhoneNoteUnableToMakeVideoCallNotSupportedByOtherPhone, // cause 57,88 
     EPhoneNoteCalledNumberHasBarredIncomingCalls, // cause 21
 
+    EPhoneEasyDialingCba, // the CBA resource id is asked from Easydialing plugin
+
     // Last
     EPhoneRssBaseLast
     };
--- a/phoneapp/phoneuiutils/src/cphonepubsubproxy.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiutils/src/cphonepubsubproxy.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -301,22 +301,6 @@
             // Remove observer 
             observerRemoved = ETrue;
             iObserverArray->Delete( i );
-
-            // Remove this observers' subscriptions
-            TInt pubSubCount = iPublishSubscriberArray->Count();
-     
-            for ( TInt j = pubSubCount - 1; j >= 0; j++ )
-                {
-                CPhonePublishSubscriberAO* publishSubscriber = 
-                    iPublishSubscriberArray->At( j );
-
-                if ( publishSubscriber->Category() == observerTag.iCategory && 
-                    publishSubscriber->Key() == observerTag.iKey )
-                    {
-                    iPublishSubscriberArray->Delete( i );
-                    delete publishSubscriber;
-                    }
-                }
             }
         }
     }
--- a/phoneapp/phoneuiutils/src/cphoneresourceresolverbase.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiutils/src/cphoneresourceresolverbase.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -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"
@@ -1113,7 +1113,7 @@
             break;
 
         case EPhoneInformationWaitNote:
-            retVal = R_PHONE_INFORMATION_NOTE_WITH_WAIT;
+            retVal = R_PHONE_INFORMATION_NOTE_WITH_CBA;
             break;
 
         case EPhoneInformationErrorNote:
@@ -1307,6 +1307,9 @@
             retVal = R_PHONEUI_SIM_REMOVED;
             break;
 
+        case EPhoneSIMInvalidUICC:
+            retVal = R_SIM_INVALID_UICC;
+            break;
         case EPhoneRebootRequired:
             retVal = R_PHONEUI_REBOOT_REQUIRED;
             break;
--- a/phoneapp/phoneuiutils/src/phoneloggerviewcommands.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiutils/src/phoneloggerviewcommands.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -156,7 +156,7 @@
 _STLIT8(K129, "EPhoneViewGetIsConferenceInSelectionMode");
 _STLIT8(K130, "EPhoneViewIsStraightCallToVideoMailBox");
 _STLIT8(K131, "EPhoneViewSetDtmfDialerViewVisible");
-_STLIT8(K132, "EPhoneViewSetRetrictedDialer");
+_STLIT8(K132, "EPhoneViewSetRestrictedDialer");
 _STLIT8(K133, "EPhoneViewIsConferenceInExpandedMode");
 _STLIT8(K134, "EPhoneViewIsMenuBarVisible");
 _STLIT8(K135, "EPhoneViewGetBlockingDialogStatus");
@@ -217,7 +217,16 @@
 _STLIT8(K190, "EPhoneViewIsActiveNoteDissmissableByKeyEvent");
 _STLIT8(K191, "EPhoneViewSetNoConnectedCalls");
 _STLIT8(K192, "EPhoneViewIsDTMFEditorVisible");
-_STLIT8(K193, ", // Don't remove this, this should always be the last in list.");
+_STLIT8(K193, "EPhoneViewSetToolbarDimming");
+_STLIT8(K194, "EPhoneViewEnableToolbarButton");
+_STLIT8(K195, "EPhoneViewHideToolbar");
+_STLIT8(K196, "EPhoneViewShowToolbar");
+_STLIT8(K197, "EPhoneViewGetEasyDialingInFocusStatus");
+_STLIT8(K198, "EPhoneViewSetInvalidCsPhoneNumberFlag");
+_STLIT8(K199, "EPhoneViewGetInvalidCsPhoneNumberFlag");
+_STLIT8(K200, "EPhoneViewGetEasyDialingMenuId");
+_STLIT8(K201, "EPhoneViewGetEasyDialingCbaId");
+_STLIT8(K202, ", // Don't remove this, this should always be the last in list.");
 
 // Intermediate
 const void * const KStringPointers[] =
@@ -414,8 +423,17 @@
 	(const void*)&K190,
 	(const void*)&K191,
 	(const void*)&K192,
-	(const void*)&K193
+	(const void*)&K193,
+	(const void*)&K194,
+	(const void*)&K195,
+	(const void*)&K196,
+	(const void*)&K197,
+	(const void*)&K198,
+	(const void*)&K199,
+	(const void*)&K200,
+	(const void*)&K201,
+	(const void*)&K202
 	};
 
-const TStringTable PhoneLoggerviewCommands::Table = {193, KStringPointers, EFalse};
+const TStringTable PhoneLoggerviewCommands::Table = {202, KStringPointers, EFalse};
 
--- a/phoneapp/phoneuiutils/src/phoneloggerviewcommands.st	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiutils/src/phoneloggerviewcommands.st	Fri Feb 19 22:50:26 2010 +0200
@@ -131,7 +131,7 @@
 EPhoneViewGetIsConferenceInSelectionMode EPhoneViewGetIsConferenceInSelectionMode  
 EPhoneViewIsStraightCallToVideoMailBox EPhoneViewIsStraightCallToVideoMailBox
 EPhoneViewSetDtmfDialerViewVisible EPhoneViewSetDtmfDialerViewVisible
-EPhoneViewSetRetrictedDialer EPhoneViewSetRetrictedDialer
+EPhoneViewSetRestrictedDialer EPhoneViewSetRestrictedDialer
 EPhoneViewIsConferenceInExpandedMode EPhoneViewIsConferenceInExpandedMode 
 EPhoneViewIsMenuBarVisible EPhoneViewIsMenuBarVisible
 EPhoneViewGetBlockingDialogStatus EPhoneViewGetBlockingDialogStatus
@@ -192,4 +192,13 @@
 EPhoneViewIsActiveNoteDissmissableByKeyEvent EPhoneViewIsActiveNoteDissmissableByKeyEvent
 EPhoneViewSetNoConnectedCalls EPhoneViewSetNoConnectedCalls
 EPhoneViewIsDTMFEditorVisible EPhoneViewIsDTMFEditorVisible
+EPhoneViewSetToolbarDimming EPhoneViewSetToolbarDimming
+EPhoneViewEnableToolbarButton EPhoneViewEnableToolbarButton
+EPhoneViewHideToolbar EPhoneViewHideToolbar
+EPhoneViewShowToolbar EPhoneViewShowToolbar
+EPhoneViewGetEasyDialingInFocusStatus EPhoneViewGetEasyDialingInFocusStatus
+EPhoneViewSetInvalidCsPhoneNumberFlag EPhoneViewSetInvalidCsPhoneNumberFlag
+EPhoneViewGetInvalidCsPhoneNumberFlag EPhoneViewGetInvalidCsPhoneNumberFlag
+EPhoneViewGetEasyDialingMenuId EPhoneViewGetEasyDialingMenuId
+EPhoneViewGetEasyDialingCbaId EPhoneViewGetEasyDialingCbaId
 EPhoneAmountOfCommands, // Don't remove this, this should always be the last in list.
--- a/phoneapp/phoneuiview/bwins/phoneuiviewu.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/bwins/phoneuiviewu.def	Fri Feb 19 22:50:26 2010 +0200
@@ -24,4 +24,16 @@
 	?ExecuteCommandL@CPhoneViewController@@UAEXHPAVTPhoneCommandParam@@@Z @ 23 NONAME ; void CPhoneViewController::ExecuteCommandL(int, class TPhoneCommandParam *)
 	?FetchContent@CPhoneViewController@@UAEABVTDesC16@@XZ @ 24 NONAME ; class TDesC16 const & CPhoneViewController::FetchContent(void)
 	?HandleCommandL@CPhoneViewController@@UAEHH@Z @ 25 NONAME ; int CPhoneViewController::HandleCommandL(int)
+	?ButtonState@CPhoneDialerController@@UBEHW4TButtonIndex@MPhoneDialerController@@@Z @ 26 NONAME ; int CPhoneDialerController::ButtonState(enum MPhoneDialerController::TButtonIndex) const
+	?ConstructL@CPhoneDialerController@@IAEXXZ @ 27 NONAME ; void CPhoneDialerController::ConstructL(void)
+	??0CPhoneDialerController@@IAE@PAVCPhoneBubbleWrapper@@AAVCCoeEnv@@@Z @ 28 NONAME ; CPhoneDialerController::CPhoneDialerController(class CPhoneBubbleWrapper *, class CCoeEnv &)
+	?SetNumberEntryIsEmpty@CPhoneDialerController@@UAEXH@Z @ 29 NONAME ; void CPhoneDialerController::SetNumberEntryIsEmpty(int)
+	?EasyDialingAllowed@CPhoneDialerController@@UBEHXZ @ 30 NONAME ; int CPhoneDialerController::EasyDialingAllowed(void) const
+	?EmergencyCallActive@CPhoneDialerController@@IBEHXZ @ 31 NONAME ; int CPhoneDialerController::EmergencyCallActive(void) const
+	??1CPhoneDialerController@@UAE@XZ @ 32 NONAME ; CPhoneDialerController::~CPhoneDialerController(void)
+	?CbaResourceId@CPhoneDialerController@@UBEHXZ @ 33 NONAME ; int CPhoneDialerController::CbaResourceId(void) const
+	?NumberEntryPromptTextL@CPhoneDialerController@@UAEABVTDesC16@@XZ @ 34 NONAME ; class TDesC16 const & CPhoneDialerController::NumberEntryPromptTextL(void)
+	?MenuResourceId@CPhoneDialerController@@UBEHXZ @ 35 NONAME ; int CPhoneDialerController::MenuResourceId(void) const
+	?ButtonDimmed@CPhoneDialerController@@UBEHW4TButtonIndex@MPhoneDialerController@@@Z @ 36 NONAME ; int CPhoneDialerController::ButtonDimmed(enum MPhoneDialerController::TButtonIndex) const
+	?GetButtonData@CPhoneDialerController@@UBEHW4TButtonIndex@MPhoneDialerController@@AAV?$RPointerArray@VCButtonData@MPhoneDialerController@@@@@Z @ 37 NONAME ; int CPhoneDialerController::GetButtonData(enum MPhoneDialerController::TButtonIndex, class RPointerArray<class MPhoneDialerController::CButtonData> &) const
 
--- a/phoneapp/phoneuiview/eabi/phoneuiviewu.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/eabi/phoneuiviewu.def	Fri Feb 19 22:50:26 2010 +0200
@@ -104,4 +104,29 @@
 	_ZThn4_N20CPhoneViewController15ExecuteCommandLEii @ 103 NONAME
 	_ZThn4_N20CPhoneViewController15ExecuteCommandLEiiP18TPhoneCommandParam @ 104 NONAME
 	_ZThn4_N20CPhoneViewController15ExecuteCommandLEiiR7TDesC16 @ 105 NONAME
+	_ZTI22CPhoneDialerController @ 106 NONAME
+	_ZTV22CPhoneDialerController @ 107 NONAME
+	_ZN22CPhoneDialerController10ConstructLEv @ 108 NONAME
+	_ZN22CPhoneDialerController21SetNumberEntryIsEmptyEi @ 109 NONAME
+	_ZN22CPhoneDialerController22NumberEntryPromptTextLEv @ 110 NONAME
+	_ZN22CPhoneDialerControllerC1EP19CPhoneBubbleWrapperR7CCoeEnv @ 111 NONAME
+	_ZN22CPhoneDialerControllerC2EP19CPhoneBubbleWrapperR7CCoeEnv @ 112 NONAME
+	_ZN22CPhoneDialerControllerD0Ev @ 113 NONAME
+	_ZN22CPhoneDialerControllerD1Ev @ 114 NONAME
+	_ZN22CPhoneDialerControllerD2Ev @ 115 NONAME
+	_ZNK22CPhoneDialerController11ButtonStateEN22MPhoneDialerController12TButtonIndexE @ 116 NONAME
+	_ZNK22CPhoneDialerController12ButtonDimmedEN22MPhoneDialerController12TButtonIndexE @ 117 NONAME
+	_ZNK22CPhoneDialerController13CbaResourceIdEv @ 118 NONAME
+	_ZNK22CPhoneDialerController13GetButtonDataEN22MPhoneDialerController12TButtonIndexER13RPointerArrayINS0_11CButtonDataEE @ 119 NONAME
+	_ZNK22CPhoneDialerController14MenuResourceIdEv @ 120 NONAME
+	_ZNK22CPhoneDialerController18EasyDialingAllowedEv @ 121 NONAME
+	_ZNK22CPhoneDialerController19EmergencyCallActiveEv @ 122 NONAME
+	_ZThn4_N22CPhoneDialerController21SetNumberEntryIsEmptyEi @ 123 NONAME
+	_ZThn4_N22CPhoneDialerController22NumberEntryPromptTextLEv @ 124 NONAME
+	_ZThn4_NK22CPhoneDialerController11ButtonStateEN22MPhoneDialerController12TButtonIndexE @ 125 NONAME
+	_ZThn4_NK22CPhoneDialerController12ButtonDimmedEN22MPhoneDialerController12TButtonIndexE @ 126 NONAME
+	_ZThn4_NK22CPhoneDialerController13CbaResourceIdEv @ 127 NONAME
+	_ZThn4_NK22CPhoneDialerController14MenuResourceIdEv @ 128 NONAME
+	_ZThn4_NK22CPhoneDialerController18EasyDialingAllowedEv @ 129 NONAME
+	_ZThn4_NK22CPhoneDialerController13GetButtonDataEN22MPhoneDialerController12TButtonIndexER13RPointerArrayINS0_11CButtonDataEE @ 130 NONAME
 
--- a/phoneapp/phoneuiview/group/bld.inf	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/group/bld.inf	Fri Feb 19 22:50:26 2010 +0200
@@ -24,7 +24,8 @@
 DEFAULT
 
 PRJ_EXPORTS
-
+../inc/mphonedialercontroller.h       |../../../inc/mphonedialercontroller.h
+../inc/cphonedialercontroller.h       |../../../inc/cphonedialercontroller.h
 
 // Stub SIS files:
 ../group/phoneuiview_stub.sis                   /epoc32/data/z/system/install/phoneuiview_stub.sis
--- a/phoneapp/phoneuiview/group/phoneuiview.mmp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/group/phoneuiview.mmp	Fri Feb 19 22:50:26 2010 +0200
@@ -65,7 +65,8 @@
 SOURCE          phonebubbleextension.cpp 
 SOURCE          phonebubbleextensiondata.cpp
 SOURCE          cphonetoolbarcontroller.cpp
-
+SOURCE          cphoneeasydialingcontroller.cpp 
+SOURCE          cphonedtmfdialercontroller.cpp 
 
 /* Languages */
 LANG SC
--- a/phoneapp/phoneuiview/inc/cphonedialercontroller.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/inc/cphonedialercontroller.h	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -20,299 +20,190 @@
 #define CPHONEDIALERCONTROLLER_H
 
 #include <e32base.h>
-#include <akntoolbarobserver.h>
-#include <mnumberentry.h>
+#include "mphonedialercontroller.h"
 #include "mphonenumberentrychangedhandler.h"
 
-class CAknToolbar;
 class CPhoneBubbleWrapper;
 class CCoeEnv;
-class CPhoneMenuController;
+class MAknsSkinInstance;
 class TPhoneCommandParam;
-class CAknButton;
-class TAknsItemID;
-class MPhoneDialerController;
-class TPhoneCommandParam;
+class CPhoneEasyDialingController;
 
 /**
- *  Dialer controller, updates toolbar buttons
+ *  Dialer controller, provides toolbar button data for the normal mode dialer
  *
  *  @lib PhoneUIView.lib
  *  @since S60 v5.0
  */
-NONSHARABLE_CLASS( CPhoneDialerController ): 
-    public CBase, public MAknToolbarObserver, public MNumberEntryObserver,
-    public MPhoneNumberEntryChangedHandler
+class CPhoneDialerController : 
+    public CBase,
+    public MPhoneDialerController
     {
-public:
+public: // constructor and destructor
     /**
      * Two-phased constructor.
-     * @param aBubbleWrapper 
-     * @param aCoeEnv 
-     * @param aMenuController 
+     * @param aBubbleWrapper    Handle to bubble wrapper. Ownership not transferred.
+     *                          May be NULL, but then emergency call state can't be identified
+     * @param aCoeEnv           Handle to coeenv. Ownership not transferred.
      */
-    static CPhoneDialerController* NewL( CPhoneBubbleWrapper& aBubbleWrapper,
-                                         CCoeEnv& aCoeEnv,
-                                         CPhoneMenuController& aMenuController );
+    static CPhoneDialerController* NewL( CPhoneBubbleWrapper* aBubbleWrapper,
+                                         CCoeEnv& aCoeEnv );
     /**
      * Destructor.
      */
-    virtual ~CPhoneDialerController();
-    
-     /**
-     * Updates toolbar buttons according to numberentry state.
-     *
-     * @since S60 v5.0
-     */
-    void UpdateToolbar();
-    
-     /**
-     * Sets state of dtmf dialer visibility.
-     *
-     * @since S60 v5.0
-     * @param aVisible
-     */    
-    void SetDtmfDialerVisibleL( TBool aVisible );  
-    
-     /**
-     * Returns dtmf dialer visibility status.
-     *
-     * @since S60 v5.0
-     * @return ETrue if DTMF Dialer is visible
-     */     
-    TBool IsDTMFDialerVisible() const;
-    
-     /**
-     * Sets state of restricted dialer.
-     *
-     * @since S60 v5.0
-     * @param aRestricted
-     */      
-	void SetRestrictedDialer( TBool aRestricted );    
-	
-     /**
-     * Sets state of service code flag.
-     *
-     * @since S60 v5.0
-     * @param aCommandParam
-     */	
-	void SetServiceCodeFlagL( TPhoneCommandParam* aCommandParam );
-    
-	/**
-    * Enables toolbar
-    *
-    * @since S60 v5.0
-    */ 
-	void ShowToolbar();
-
-    /**
-    * Disables toolbar
-    *
-    * @since S60 v5.0
-    */ 
-    void HideToolbar();	
-
-    /**
-    * Sets custom dialer visible.
-    * @param aCustomController Pointer to dialer extension implementation
-    * @since S60 v5.1
-    */    
-    void ShowCustomizedDialerL( 
-            MPhoneDialerController* aCustomController );
+    IMPORT_C virtual ~CPhoneDialerController();
     
-    /**
-    * Sets custom dialer visible.
-    * @since S60 v5.1
-    */ 
-    void HideCustomizedDialer();
-	
-    /**
-    * Returns flag indicating if customized dialer is visible.
-    * @return ETrue if customized dialer visible, else EFalse
-    * @since S60 v5.1
-    */   
-    TBool IsCustomizedDialerVisible() const;
-	
-    /**
-    * Returns sotkeys resource of the customized dialer
-    * @return Customized dialer softkeys resource id
-    * @since S60 v5.1
-    */ 
-    TInt CustomizedCbaResourceId() const;
-	
-    /**
-    * Returns menu resource of the customized dialer
-    * @return Customized dialer menu resource id
-    * @since S60 v5.1
-    */ 
-    TInt CustomizedMenuResourceId() const;
-
-public:     // from MAknToolbarObserver
-    /**
-     * From base class MAknToolbarObserver
-     * Handles toolbar events for a certain toolbar item.
-     *
-     * @param aCommand The command ID of some toolbar item.
-     */ 
-    void OfferToolbarEventL( TInt aCommand );
-    
-    /**
-     * From base class MAknToolbarObserver
-     * Should be used to set the properties of some toolbar components 
-     * before it is drawn.
-     *   
-     * @param aResourceId The resource ID for particular toolbar
-     * @param aToolbar The toolbar object pointer
-     */
-    void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
-    
-public:     // from MNumberEntryObserver
-    /**
-     * From base class MNumberEntryObserver
-     * Indication that numberentry state changed
-     *
-     * @since S60 v5.0
-     */
-    void NumberEntryStateChanged( TBool aHidePromptText );    
-    
-public:    // from base class MPhoneNumberEntryChangedHandler
-        
-    /**
-     * From MPhoneNumberEntryChangedHandler
-     * 
-     * Handles number entry state change. 
-     * Checks has the content of the number entry been modifed.
-     * Informs the via call back functionality the party interested about 
-     * the change. (at the moment phone state machine) 
-     * 
-     * @since S60 5.0
-     */
-     void HandleNumberEntryChanged( );
-        
-     /**
-      * From MPhoneNumberEntryChangedHandler
-      * 
-      * Sets the call back function that is used to get notification when the 
-      * content of the Number Entry has changed. (Used by the the phone 
-      * statemachine.)  
-      * 
-      * @since S60 5.0
-      */
-     void SetNumberEntryChangedCallBack( TPhoneCommandParam* aCommandParam );
-      
-private:
-
-    /**
-     * Creates CAknButton with given parameters and leaves it to 
-     * CleanupStack.
-     * 
-     * @param aNormalIconId
-     * @param aNormalMaskId
-     * @param aTooltipText
-     * @param aSkinIconId
-     * @param aCommand 
-     */  
-    CAknButton* CreateButtonLC( TInt aNormalIconId,
-                                TInt aNormalMaskId,
-                                const TDesC& aTooltipText, 
-                                const TAknsItemID& aSkinIconId,
-                                TInt aCommand );
-    
-    /**
-     * Creates button set for an empty Number Entry.  
-     */
-    void CreateButtonSetNumberEntryEmpty();
-
-    /**
-     * Creates button set for Number Entry when some charaters 
-     * have been entered.
-     */
-    void CreateButtonSetNumberEntryNotEmpty();
+protected: // constructors
     
     /**
      * Constructor.
      * 
      * @param aBubbleWrapper 
      * @param aCoeEnv 
-     * @param aMenuController 
      */
-    CPhoneDialerController( CPhoneBubbleWrapper& aBubbleWrapper,
-                             CCoeEnv& aCoeEnv,
-                             CPhoneMenuController& aMenuController );    
+    IMPORT_C CPhoneDialerController( CPhoneBubbleWrapper* aBubbleWrapper,
+                                     CCoeEnv& aCoeEnv );
     /**
      * Symbian 2nd phase constructor.
      * 
      */
-    void ConstructL();
+    IMPORT_C void ConstructL();
     
-    /**
-     * Searches the skin id for the given icon.
-     */
-    inline TAknsItemID SkinId( TInt aIconIndex );
+public: // new methods
     
     /**
-     * Searches the tooltip text for the button using the 
-     * the given command id.
+     * Sets state of restricted dialer.
+     *
+     * @since S60 v5.0
+     * @param aRestricted
+     */      
+    void SetRestrictedDialer( TBool aRestricted );    
+    
+     /**
+     * Sets state of service code flag.
+     *
+     * @since S60 v5.0
+     * @param aCommandParam
+     */
+    void SetServiceCodeFlag( TPhoneCommandParam* aCommandParam );
+
+    /**
+     * Sets handle to the Easy Dialing controller.
      * 
-     * @param aCommandId the command id
-     * @param aText     the searched tooltip text
+     * @since S60 v5.2
+     * @param aController   Easy Dialing controller. Ownership not transferred.
      */
-    void  GetTooltipTextL( TInt aCommandId, HBufC*& aText ); 
+    void SetEasyDialingController( CPhoneEasyDialingController* aController );
     
-private: // data
+public: // From MPhoneDialerController
+
+    /**
+     * @see MPhoneDialerController
+     */
+    IMPORT_C TInt CbaResourceId() const;
+
     /**
-     * AknToolbar. 
-     * Not own.  
+     * @see MPhoneDialerController
+     */
+    IMPORT_C TInt MenuResourceId() const;
+
+    /**
+     * @see MPhoneDialerController
      */
-    CAknToolbar* iToolbar;
+    IMPORT_C const TDesC& NumberEntryPromptTextL();
+
+    /**
+     * @see MPhoneDialerController
+     */
+
+    /**
+     * @see MPhoneDialerController
+     */
+    IMPORT_C TInt GetButtonData( TButtonIndex aIndex, RPointerArray<CButtonData>& aData ) const;
     
     /**
-     * The reference to the Bubblewrapper
+     * @see MPhoneDialerController
+     */
+    IMPORT_C void SetNumberEntryIsEmpty( TBool aEmpty );
+    
+    /**
+     * @see MPhoneDialerController
+     */
+    IMPORT_C TInt ButtonState( TButtonIndex aIndex ) const;
+    
+    /**
+     * @see MPhoneDialerController
+     */
+    IMPORT_C TBool ButtonDimmed( TButtonIndex aIndex ) const;
+    
+    /**
+     * @see MPhoneDialerController
+     */
+    IMPORT_C TBool EasyDialingAllowed() const;
+
+public: // data types
+    /** 
+     * Initialization data for one toolbar button state.
      */
-    CPhoneBubbleWrapper& iBubbleWrapper;
+    struct TLocalButtonData
+        {
+        TInt iCommandId;
+        TInt iSkinItemIdMinor;
+        TInt iBitmapIndex;
+        TInt iBitmapMaskIndex;
+        TInt iTooltipResourceId;
+        };
+    
+protected: // methods
     
     /**
+     * Check is there an emergency call ongoing.
+     * @return  ETrue   if there's an active emergency call.
+     *          EFalse  otherwise.
+     */
+    TBool EmergencyCallActive() const;
+    
+    /**
+     * Create button data object from given source data.
+     * @param   aSourceData Defines, where the data should be loaded.
+     * @param   aSkin       Skin instance. Ownership not transferred.
+     * @param   aMifFile    Full path to the MIF file holding the fallback graphics.
+     * @return  New CButtonData instance. Ownership is transferred.
+     */
+    CButtonData* CreateButtonDataL( const TLocalButtonData& aSourceData, 
+            MAknsSkinInstance* aSkin, const TDesC& aMifFile ) const;
+    
+protected: // data
+    /**
      * CoeEnv 
      */
     CCoeEnv& iCoeEnv;
     
     /**
-     * Menucontroller
+     * Handle to the Bubblewrapper. May be NULL. Not owned.
      */
-    CPhoneMenuController& iMenuController;    
+    CPhoneBubbleWrapper* iBubbleWrapper;
     
     /**
-     * Used to check is the Dialer in DTMF mode
+     * Handle to Easy Dialing controller. May be NULL. Not owned. 
      */
-    TBool iDtmfDialerVisible;
-
+    CPhoneEasyDialingController* iEasyDialingController;
+    
     /**
      * Used to check is the Dialer in the restricted mode.
-     * 'Send' and 'Add to Contacts' buttons are dimmed.
      */
-    TBool iRestrictedDialer; 
+    TBool iRestrictedDialer;
     
     /**
-     * Used to check is the service code flag set.
-     * Tooltip text is changed between 'Send' or 'Call' 
+     * Used to check is the service code flag set, meaning that number entry
+     * contains a service code rather than phone number.
      */
     TBool iServiceCodeFlag;
     
-    /*
-     * Is used to check has the hide prompt text flag changed.
+    /**
+     * Store availability of phone number (etc) in the number entry.
      */
-    TBool iPreviousHidePromptTextStatus;
-    
-    // Pointer to dialer extension implementation
-    MPhoneDialerController* iCustomizedDialer;
-    
-    /**
-     * Is used to check should toolbar be updated. 
-     */
-    TBool iUpdateToolbar;
-
+    TBool iNumberAvailable;
     };
 
-#include    "cphonedialercontroller.inl"
-
 #endif // CPHONEDIALERCONTROLLER_H
--- a/phoneapp/phoneuiview/inc/cphonedialercontroller.inl	Tue Feb 02 00:10:04 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  private, CPhoneDialerController
-*
-*/
-
-#ifndef CPHONEDIALERCONTROLLER_INL_
-#define CPHONEDIALERCONTROLLER_INL_
-
-#include <AknsUtils.h>
-#include <phoneui.mbg>
-
-// ---------------------------------------------------------------------------
-// SkinId
-// ---------------------------------------------------------------------------
-//    
-inline TAknsItemID CPhoneDialerController::SkinId( TInt aIconIndex )
-    {
-    TAknsItemID skinId;
-    
-    switch ( aIconIndex )
-        {
-        case EMbmPhoneuiQgn_indi_dialer_call_send:
-            skinId = KAknsIIDQgnIndiDialerCallSend;
-            break;
-        case EMbmPhoneuiQgn_indi_button_send_dtmf:
-            skinId = KAknsIIDQgnIndiButtonSendDtmf;
-            break;
-        case EMbmPhoneuiQgn_indi_dialer_contacts:
-            skinId = KAknsIIDQgnIndiDialerContacts;
-            break;
-        case EMbmPhoneuiQgn_indi_dialer_add_contacts:
-            skinId = KAknsIIDQgnIndiDialerAddContacts;
-            break;
-        case EMbmPhoneuiQgn_indi_dialer_clear:
-            skinId = KAknsIIDQgnIndiDialerClear;
-            break;                        
-        default:
-            skinId = KAknsIIDNone;        
-            break;            
-        }
-    return skinId;   
-    }
-
-#endif /*CPHONEDIALERCONTROLLER_INL_*/
--- a/phoneapp/phoneuiview/inc/cphonedialerview.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/inc/cphonedialerview.h	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008 - 2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -56,6 +56,13 @@
         */
         void HandleResourceChange( TInt aType );
 
+        /**
+        * From CCoeControl
+        * @param aVisible : ETrue if view is to be shown
+        *                   EFalse if view is to be hidden
+        */
+        void MakeVisible( TBool aVisible );
+
     public: // New functions
 
         /**
@@ -75,7 +82,7 @@
         * @param aStatus ETrue for the security mode. EFalse for the 
         * normal mode.
         */ 
-        void SetSecurityMode ( TBool aStatus );
+        void SetSecurityMode( TBool aStatus );
         
         /**
         * Get state of the security mode flag
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneapp/phoneuiview/inc/cphonedtmfdialercontroller.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Controller for DTMF mode of Dialer
+*
+*/
+
+#ifndef CPHONEDTMFDIALERCONTROLLER_H
+#define CPHONEDTMFDIALERCONTROLLER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include "cphonedialercontroller.h"
+
+// CLASS DECLARATION
+
+/**
+ *  CPhoneDtmfDialerController
+ *  
+ *  Provides data for the DTMF mode of the dialer.
+ */
+NONSHARABLE_CLASS( CPhoneDtmfDialerController ) : public CPhoneDialerController
+    {
+public: // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CPhoneDtmfDialerController();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CPhoneDtmfDialerController* NewL( 
+            CPhoneBubbleWrapper* aBubbleWrapper,
+            CCoeEnv& aCoeEnv );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CPhoneDtmfDialerController* NewLC( 
+            CPhoneBubbleWrapper* aBubbleWrapper,
+            CCoeEnv& aCoeEnv );
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CPhoneDtmfDialerController( 
+            CPhoneBubbleWrapper* aBubbleWrapper,
+            CCoeEnv& aCoeEnv );
+
+    /**
+     * Symbian default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+public: // from CPhoneDialerController
+    
+    /**
+     * @see MPhoneDialerController
+     */
+    const TDesC& NumberEntryPromptTextL();
+    
+    /**
+     * @see MPhoneDialerController
+     */
+    TInt GetButtonData( TButtonIndex aIndex, RPointerArray<CButtonData>& aData ) const;
+    
+    /**
+     * @see MPhoneDialerController
+     */
+    TInt ButtonState( TButtonIndex aIndex ) const;
+    
+    /**
+     * @see MPhoneDialerController
+     */
+    TBool ButtonDimmed( TButtonIndex aIndex ) const;
+    
+    /**
+     * @see MPhoneDialerController
+     */
+    TBool EasyDialingAllowed() const;
+    
+private: // data
+    
+    HBufC* iPromptText; // OWN
+    };
+
+#endif // CPHONEDTMFDIALERCONTROLLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneapp/phoneuiview/inc/cphoneeasydialingcontroller.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 handles Easy dialing specific commands
+*
+*/
+
+#ifndef CPHONEEASYDIALINGCONTROLLER_H
+#define CPHONEEASYDIALINGCONTROLLER_H
+
+//INCLUDES
+#include <e32base.h>
+#include "phoneviewcommanddefinitions.h"
+
+//FORWARD
+class CDialer;
+class TPhoneCommandParam;
+class CDialingExtensionInterface;
+
+/**
+ * Class takes care of Easy dialing
+ *
+ * @lib phoneuicontrol
+ * @since S60 v9.2
+ */
+NONSHARABLE_CLASS( CPhoneEasyDialingController ) : public CBase
+    {
+    public:
+    
+        /**
+        * Creates new instance of CPhoneEasyDialingController
+        * @param aDialer: reference to dialer
+        * @return CPhoneEasyDialingController* object  
+        */
+        static CPhoneEasyDialingController* NewL(
+                CDialer& aDialer );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CPhoneEasyDialingController();
+        
+        void ExecuteCommandL(
+            TPhoneViewCommandId aCmdId,
+            TPhoneCommandParam* aCommandParam );
+
+        TPhoneViewResponseId HandleCommandL( TPhoneViewCommandId aCmdId );
+       
+        TBool InitializeEasyDialingMenuL( TPhoneCommandParam* aCommandParam );
+
+    private:
+    
+        /**
+        * C++ default constructor.
+        */
+        CPhoneEasyDialingController(CDialer& aDialer);
+        
+    private:
+        // Dialer. Not owned
+        CDialer& iDialer;
+        
+        // Easydialing in interface. Not owned.
+        CDialingExtensionInterface* iEasyDialing;
+    };
+
+#endif //CPHONEEASYDIALINGCONTROLLER_H
--- a/phoneapp/phoneuiview/inc/cphonemenucontroller.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/inc/cphonemenucontroller.h	Fri Feb 19 22:50:26 2010 +0200
@@ -116,7 +116,11 @@
 		void SendAiwCommandL( TPhoneCommandParam* aCommandParam );      
  
 		void SetContextMenu( TPhoneCommandParam* aCommandParam );
-		
+
+        void SetInvalidCsPhoneNumberFlag( TPhoneCommandParam* aCommandParam );
+	        
+        void GetInvalidCsPhoneNumberFlag( TPhoneCommandParam* aCommandParam );
+
     public: //from base class 
         
          void HandlePropertyChangedL( 
@@ -181,6 +185,8 @@
         TBool iAllowDtmfOptionsFlag;
         TBool iVoipEnabledFlag;  
         TBool iHideVideoCallDTMFVisibility;
+        TBool iInvalidCsPhoneNumber;
+
         // Eikon environment delivered from CPhoneViewController
         CEikonEnv& iEikEnv;       
         // Pointer to AIW service handler. OWNED.
--- a/phoneapp/phoneuiview/inc/cphoneviewcontroller.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/inc/cphoneviewcontroller.h	Fri Feb 19 22:50:26 2010 +0200
@@ -33,6 +33,7 @@
 #include "tphonecmdparamtranseffect.h"
 
 #include "mphoneviewblockingdialogobserver.h"
+#include "mnumberentry.h"
 
 // FORWARD DECLARATIONS
 class CPhoneButtonsController;
@@ -76,12 +77,15 @@
 class CDialer;
 class MPhoneNumberEntryChangedHandler;
 class MPhoneViewCustomization;
+class CPhoneEasyDialingController;
+class CPhoneDtmfDialerController;
 
 class CPhoneViewController :
     public CBase,
     public MPhoneViewCommandHandle,
     public MPhoneStatusPaneObserver,
-    public MPhoneViewBlockingDialogObserver
+    public MPhoneViewBlockingDialogObserver,
+    public MNumberEntryObserver
     {
     public:  // Constructors and destructor
 
@@ -245,6 +249,12 @@
         */
         IMPORT_C void SetBlockingDialogIsDisplayed( TBool aBlockingDialog );
 
+        /**
+         * From base class MNumberEntryObserver
+         * Indication that numberentry state changed
+         */
+        void NumberEntryStateChanged( TBool aEntryHasText );    
+
     private:     // New functions
 
         /**
@@ -592,12 +602,6 @@
         */
         TInt FindAppByWgIDL( TInt aAppWgID );
 
-        /**
-        * Returns pointer to the control that is responsible of handling
-        * Phone Number Entry Changed events.
-        */
-        MPhoneNumberEntryChangedHandler* NumberEntryChangedHandler() const;
-
        /**
         * Returns single item fetch type
         * @return single item fetch type
@@ -614,6 +618,16 @@
          */         
         void DisableKeyLock();
         
+        /**
+         * Checks if DTMF dialer mode is currently active        
+         */
+        TBool IsDtmfDialerActive() const;
+        
+        /**
+         * Checks if custom dialer mode is currently active        
+         */
+        TBool IsCustomDialerActive() const;
+        
     private:    // Data
 
         CPhoneView* iPhoneView;
@@ -634,9 +648,15 @@
         // Controls the touch buttons
         CPhoneDialerController* iDialerController;
         
+        // Controls touch dialer in DTMF mode
+        CPhoneDtmfDialerController* iDtmfDialerController;
+        
         // Controls the toolbar
         CPhoneToolbarController* iToolbarController;
 
+        // Handles easydialing commands. Owned.
+        CPhoneEasyDialingController* iEasyDialingController;
+        
         // For accessing incall indicator
         CPhoneIncallIndicator* iIncallIndicator;
 
--- a/phoneapp/phoneuiview/inc/mphonedialercontroller.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/inc/mphonedialercontroller.h	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -18,27 +18,58 @@
 #ifndef MPHONEDIALERCONTROLLER_H_
 #define MPHONEDIALERCONTROLLER_H_
 
-// Forward declarations
-class CAknToolbar;
+#include <e32cmn.h>
+#include <gulicon.h>
+
 
 /**
- *  Abstract custom dialer interface.
- *
+ *  Abstract dialer controller interface.
+ *  Dialer controller provides data to be shown on dialer UI
+ *  (e.g. prompt text and toolbar button contents), but is
+ *  agnostic to implementation details and layout of the
+ *  dialer UI components.
  *
  *  @lib PhoneUiView.lib
  *  @since S60 v5.0
  */
 class MPhoneDialerController
     {
-
-public:
-
+public: // data types
+    
+    /** 
+     * Indices to refer to visual button slots in the dialer toolbar. 
+     * The index order in not necessarily the same as the visual
+     * order of the buttons. The index names correspond to the button
+     * functions in the normal dialer mode.
+     * @since S60 v5.2
+     */
+    enum TButtonIndex
+        {
+        EClearButton = 0,   //< Button normally used for backspce
+        ECallButton,        //< Button normally used for "call" and "log"
+        EPhonebookButton,   //< Button normally used for "Phonebook" and "Add to Phonebook"
+        
+        ENumberOfButtons    //< Total number of buttons in the toolbar.
+        };
+    
     /**
-    * Initializes the controller. 
-    * @param    aToolbar    CAknToolbar instance.
-    * @since    S60 v5.1
-    */
-    virtual void InitializeL( CAknToolbar& aToolbar ) = 0;
+     * Struct-like class encapsulating data of one toolbar button function.
+     * @since S60 v5.2
+     */
+    class CButtonData : public CBase
+        {
+    public: // data
+        TInt iCommandId;
+        CGulIcon* iIcon; // OWN
+        HBufC* iTooltip; // OWN
+    public: // constructors & destructor
+        inline CButtonData() {}
+        inline CButtonData( TInt aCommandId, CGulIcon* aIcon, HBufC* aTooltip ) :
+            iCommandId( aCommandId ), iIcon( aIcon ), iTooltip( aTooltip ) {}
+        inline ~CButtonData() { delete iIcon; delete iTooltip; }
+        };
+    
+public:
     
     /**
     * Returns Cba resource id
@@ -60,20 +91,53 @@
     * @since S60 v5.1
     */
     virtual const TDesC& NumberEntryPromptTextL() = 0;
+
+    /**
+     * Get contents for given toolbar button. One button may have zero or more
+     * different functions. Which one is set active, depends on the return value
+     * of the member function ButtonState().
+     * @param   aIndex  Index of the button for which data is queried.
+     * @param   aData   On return, contains all the possible states for the button.
+     * @return  KErrNone if action was succesful. 
+     *          System wide error code if something went wrong.
+     * @since S60 v5.2
+     */
+    virtual TInt GetButtonData( TButtonIndex aIndex, RPointerArray<CButtonData>& aData ) const = 0;
+    
+    /**
+     * Function used to tell controller if number entry is empty or not.
+     * In many cases this has an influence on the status of some or all toolbar buttons.
+     * @param   aEmpty  ETrue if number entry is empty, EFalse othwerwise.
+     * @since S60 v5.2
+     */
+    virtual void SetNumberEntryIsEmpty( TBool aEmpty ) = 0;
     
     /**
-    * Handles the number entry empty event
-    * @param aEmpty ETrue if numberentry is empty
-    * @since S60 v5.1
-    */
-    virtual void HandleNumberEntryIsEmpty( TBool aEmpty ) = 0;
-
+     * Gets current state of the given button.
+     * @param   aIndex  Index of the button for which state is queried.
+     * @return  Index of the button state which should be active. 
+     *          KErrNotFound if the given button has no states.
+     * @since S60 v5.2
+     */
+    virtual TInt ButtonState( TButtonIndex aIndex ) const = 0;
+    
     /**
-    * Sets visibility of buttons created by the implementation
-    * @param aShow ETrue if numberentry is empty
-    * @since S60 v5.1
-    */
-    virtual void ShowButtons( TBool aShow ) = 0;
+     * Gets dimming status of the given button
+     * @param   aIndex  Index of the button for which dimming status is queried.
+     * @return  ETrue   if the given button should be dimmed.
+     *          EFalse  otherwise.
+     * @since S60 v5.2
+     */
+    virtual TBool ButtonDimmed( TButtonIndex aIndex ) const = 0;
+    
+    /**
+     * Gets value indicating whether using Easy Dialing should be allowed in
+     * the current Dialer mode.
+     * @return  ETrue   if Easy Dialing can be enabled.
+     *          EFalse  if Easy Dialing must not be enabled.
+     * @since S60 v5.2
+     */
+    virtual TBool EasyDialingAllowed() const = 0;
     };
 
 #endif /*MDIALERCONTROLLER_H_*/
--- a/phoneapp/phoneuiview/inc/phoneviewcommanddefinitions.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/inc/phoneviewcommanddefinitions.h	Fri Feb 19 22:50:26 2010 +0200
@@ -160,7 +160,7 @@
     EPhoneViewGetIsConferenceInSelectionMode,
     EPhoneViewIsStraightCallToVideoMailBox,
     EPhoneViewSetDtmfDialerViewVisible, // 130
-    EPhoneViewSetRetrictedDialer, 
+    EPhoneViewSetRestrictedDialer, 
     EPhoneViewIsConferenceInExpandedMode,
     EPhoneViewIsMenuBarVisible,
     EPhoneViewGetBlockingDialogStatus,
@@ -227,7 +227,13 @@
     EPhoneViewSetToolbarDimming,
 	EPhoneViewEnableToolbarButton,
 	EPhoneViewHideToolbar,
-	EPhoneViewShowToolbar,
+	EPhoneViewShowToolbar,    
+    EPhoneViewGetEasyDialingInFocusStatus,
+    EPhoneViewSetInvalidCsPhoneNumberFlag,
+    EPhoneViewGetInvalidCsPhoneNumberFlag,
+    EPhoneViewGetEasyDialingMenuId,
+    EPhoneViewGetEasyDialingCbaId,
+
     EPhoneAmountOfCommands, // Don't remove this, this should always be the last in list.
 };
 
--- a/phoneapp/phoneuiview/src/cphoneaudioplayer.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphoneaudioplayer.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -998,11 +998,11 @@
 
     TInt result( 0 );    
     
-    if ( iFormat == EFormatTone )
+    if ( iFormat == EFormatTone && iTonePlayer )
         {
         result = iTonePlayer->MaxVolume() * aVolume / KMaxVolumeLevel;
         }
-    else if ( iFormat == EFormatTts )
+    else if ( iFormat == EFormatTts && iTtsPlayer )
         {
         result = iTtsPlayer->MaxVolume() * aVolume / KMaxVolumeLevel;    
         }
@@ -1041,11 +1041,11 @@
     //_DPRINT( 5, "P.Aud.Mute" );
     if ( iPlayerStatus == ETonePlaying )
         {
-        if ( iFormat == EFormatTone )
+        if ( iFormat == EFormatTone && iTonePlayer )
             {
             iTonePlayer->SetVolume(0);
             }
-        else if ( iFormat == EFormatTts )
+        else if ( iFormat == EFormatTts && iTtsPlayer )
             {
             iTtsPlayer->SetVolume(0);
             }
--- a/phoneapp/phoneuiview/src/cphonebubblewrapper.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphonebubblewrapper.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -895,7 +895,11 @@
     CCoeControl* control(NULL);
     if ( iUseDialer )
         {
-        control = iDialerNumberEntry->GetNumberEntry();
+        // TODO: We should try to clarify the dialer control hierarchy.
+        // Currently, we have three controls, each of which are somewhere
+        // referred as "number entry": CDialer, CDialerNumberEntry, and CAknPhoneNumberEditor.
+        // Each of these are present on the code line below.
+        control = iDialerNumberEntry->GetNumberEntry()->Parent();
         }
     else
         {
--- a/phoneapp/phoneuiview/src/cphonedialercontroller.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphonedialercontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -21,67 +21,99 @@
 #include <eikapp.h>
 #include <eikcolib.h>
 #include <gulicon.h>
-#include <akntoolbar.h>
-#include <aknbutton.h>
 #include <StringLoader.h>
+#include <AknsUtils.h>
 #include <phoneui.rsg>
+#include <phoneui.mbg>
 #include <pevirtualengine.h>
 #include <data_caging_path_literals.hrh>
 
 #include "cphonedialercontroller.h"
+#include "cphoneeasydialingcontroller.h"
 #include "cphonebubblewrapper.h"
 #include "phoneui.hrh"
-#include "phonerssbase.h"
 #include "tphonecmdparaminteger.h"
-#include "cphonemenucontroller.h"
 #include "cphonemainresourceresolver.h"
 #include "tphonecmdparamcallstatedata.h"
 #include "tphonecmdparamboolean.h"
-#include "mphonedialercontroller.h"
 
 _LIT ( KPhoneMifFileName, "phoneui.mif" );
-_LIT( KDialerToolbarButtonEmptyStr, "" );
+
 
-const TInt KNumberOfButtons = 6;
-struct SPhoneDialerToolbarButton
+/** States for Call button. */
+enum TCallButtonState
+    {
+    ECallButtonCallStateIndex = 0,
+    ECallButtonLogStateIndex,
+    ECallButtonSendStateIndex
+    };
+static const CPhoneDialerController::TLocalButtonData KCallButtonDataTable[] =
     {
-    TInt iIconIndex;
-    TInt iMaskIndex;
-    TInt iCommandId;    
+        { EPhoneNumberAcqCmdSendCommand, 
+          EAknsMinorGenericQgnIndiButtonAnswerWhite,
+          EMbmPhoneuiQgn_indi_button_answer_white, 
+          EMbmPhoneuiQgn_indi_button_answer_white_mask,
+          R_PHONEUI_DIALER_TOOLTIP_CALL
+        },
+        { EPhoneDialerCmdLog,
+          EAknsMinorGenericQgnIndiButtonLogdialerWhite,
+          EMbmPhoneuiQgn_indi_button_logdialer_white,
+          EMbmPhoneuiQgn_indi_button_logdialer_white_mask,
+          R_PHONEUI_DIALER_TOOLTIP_RECENT_CALLS
+        },
+        { EPhoneNumberAcqCmdSendCommand, 
+          EAknsMinorGenericQgnIndiButtonAnswerWhite,
+          EMbmPhoneuiQgn_indi_button_answer_white, 
+          EMbmPhoneuiQgn_indi_button_answer_white_mask,
+          R_PHONEUI_DIALER_TOOLTIP_SEND
+        }
     };
+static const TInt KCallButtonDataTableCount = 
+    sizeof( KCallButtonDataTable ) / sizeof( CPhoneDialerController::TLocalButtonData );
+
 
-const SPhoneDialerToolbarButton bArray[KNumberOfButtons] =
-        {  
-            { EMbmPhoneuiQgn_indi_dialer_call_send,
-              EMbmPhoneuiQgn_indi_dialer_call_send_mask,
-              EPhoneDialerCmdLog
-            },
-            { EMbmPhoneuiQgn_indi_dialer_call_send,
-              EMbmPhoneuiQgn_indi_dialer_call_send_mask,
-              EPhoneNumberAcqCmdSendCommand
-            },        
-            
-            { EMbmPhoneuiQgn_indi_button_send_dtmf,
-              EMbmPhoneuiQgn_indi_button_send_dtmf_mask,
-              EPhoneCmdDtmfOk
-            },               
-            { EMbmPhoneuiQgn_indi_dialer_contacts,
-              EMbmPhoneuiQgn_indi_dialer_contacts_mask,
-              EPhoneDialerCmdContacts
-            },
-            { EMbmPhoneuiQgn_indi_dialer_add_contacts,
-              EMbmPhoneuiQgn_indi_dialer_add_contacts_mask,
-              EPhoneNumberAcqCmdAddToContacts
-            },            
-            { EMbmPhoneuiQgn_indi_dialer_clear,
-              EMbmPhoneuiQgn_indi_dialer_clear_mask,
-              EPhoneDialerCmdClear
-            }
-        }; 
+/** States for Phonebook button */
+enum TPhonebookButtonState
+    {
+    EPhonebookButtonContactsIndex = 0,
+    EPhonebookButtonAddContactIndex
+    };
+static const CPhoneDialerController::TLocalButtonData KPhonebookButtonDataTable[] =
+    {
+        { EPhoneDialerCmdContacts,
+          EAknsMinorGenericQgnIndiDialerContacts,
+          EMbmPhoneuiQgn_indi_dialer_contacts,
+          EMbmPhoneuiQgn_indi_dialer_contacts_mask,
+          R_PHONEUI_DIALER_TOOLTIP_CONTACTS
+        },
+        { EPhoneNumberAcqCmdAddToContacts,
+          EAknsMinorGenericQgnIndiDialerAddContacts,      
+          EMbmPhoneuiQgn_indi_dialer_add_contacts,
+          EMbmPhoneuiQgn_indi_dialer_add_contacts_mask,
+          R_PHONEUI_DIALER_TOOLTIP_ADD_TO_CONTACTS
+        }
+    };
+static const TInt KPhonebookButtonDataTableCount = 
+    sizeof( KPhonebookButtonDataTable ) / sizeof( CPhoneDialerController::TLocalButtonData );
 
-const TInt KDialerToolbarButtonCount = 6; 
-const TInt KDialerToolbarButtonKeyRepeatDelay = 300;
-const TInt KDialerToolbarKeyRepeatInterval = 75;
+
+/** States for Clear button */
+enum TClearButtonState
+    {
+    EClearButtonClearIndex = 0
+    };
+static const CPhoneDialerController::TLocalButtonData KClearButtonDataTable[] =
+    {
+        { EPhoneDialerCmdClear,
+          EAknsMinorGenericQgnIndiDialerClear,
+          EMbmPhoneuiQgn_indi_dialer_clear,
+          EMbmPhoneuiQgn_indi_dialer_clear_mask,
+          R_PHONEUI_DIALER_TOOLTIP_CLEAR
+        }
+    };
+static const TInt KClearButtonDataTableCount = 
+    sizeof( KClearButtonDataTable ) / sizeof( CPhoneDialerController::TLocalButtonData );
+
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -89,14 +121,11 @@
 // Constructor
 // ---------------------------------------------------------------------------
 //
-CPhoneDialerController::CPhoneDialerController( 
-                                        CPhoneBubbleWrapper& aBubbleWrapper,
-                                        CCoeEnv& aCoeEnv,
-                                        CPhoneMenuController& aMenuController ):
-    iBubbleWrapper ( aBubbleWrapper ),
-    iCoeEnv ( aCoeEnv ),
-    iMenuController( aMenuController ),
-    iUpdateToolbar( EFalse )
+EXPORT_C CPhoneDialerController::CPhoneDialerController( 
+                                        CPhoneBubbleWrapper* aBubbleWrapper,
+                                        CCoeEnv& aCoeEnv ):
+    iCoeEnv( aCoeEnv ),
+    iBubbleWrapper( aBubbleWrapper )
     {
     }
 
@@ -104,114 +133,20 @@
 // Second phase constructor
 // ---------------------------------------------------------------------------
 //
-void CPhoneDialerController::ConstructL()
+EXPORT_C void CPhoneDialerController::ConstructL()
     {
-   
-    iBubbleWrapper.SetNumberEntryObserver( *this );
-   
-    if ( !iToolbar )
-        {
-        iToolbar = CAknToolbar::NewL( R_PHONEUI_TOOLBAR );
-        }
-  
-    CEikAppUiFactory* appUiFactory =
-        static_cast<CEikAppUiFactory*>( CEikonEnv::Static()->AppUiFactory() );  
-    appUiFactory->SetViewFixedToolbar( iToolbar );
-    
-    if( iToolbar )
-        {
-        iToolbar->SetToolbarObserver( 
-                        static_cast<MAknToolbarObserver*>( this ));  
-        iToolbar->SetWithSliding( EFalse );
-        iToolbar->SetCloseOnAllCommands( EFalse );
-        iToolbar->SetFocusing( EFalse );
-        
-        CAknButton* button( NULL );
-
-        for( TInt i = 0; i < KDialerToolbarButtonCount; i++ )
-            {
-            TAknsItemID skinId = SkinId( bArray[i].iIconIndex );
-            // Load tooltip text.
-            HBufC* tooltipText;
-            GetTooltipTextL ( bArray[i].iCommandId, tooltipText );  
-            CleanupStack::PushL( tooltipText );      
-         
-            button = CreateButtonLC(
-                bArray[i].iIconIndex, 
-                bArray[i].iMaskIndex, 
-                *tooltipText, 
-                skinId,
-                bArray[i].iCommandId );
-            // Takes ownership of the button                    
-            iToolbar->AddItemL( button, EAknCtButton, bArray[i].iCommandId,0 );
-           
-            CleanupStack::Pop( button );
-            CleanupStack::PopAndDestroy( tooltipText );
-            }
-       
-        // Hide 'Send dtmf' icon
-        iToolbar->HideItem( EPhoneCmdDtmfOk, ETrue, EFalse );
-        TRAP_IGNORE(iToolbar->DisableToolbarL( ETrue ));
-        }
     }
     
 // ---------------------------------------------------------------------------
-// CreateButtonL
-// ---------------------------------------------------------------------------
-//
-CAknButton* CPhoneDialerController::CreateButtonLC( 
-    TInt aNormalIconId,
-    TInt aNormalMaskId,
-    const TDesC& aTooltipText,
-    const TAknsItemID& aSkinIconId,
-    TInt aCommand )
-    {
-    TFileName mifPath( KDriveZ );
-    mifPath.Append( KDC_APP_BITMAP_DIR );
-    mifPath.Append( KPhoneMifFileName );
-
-   
-    CAknButton* button = CAknButton::NewLC( 
-        mifPath,
-        aNormalIconId,
-        aNormalMaskId,
-        -1, -1, // dimmed
-        -1, -1, // pressed
-        -1, -1, // hover
-        KDialerToolbarButtonEmptyStr(),
-        aTooltipText, // help
-        0, // flags
-        0, // state flags
-        aSkinIconId );
-                               
-    if( aCommand == EPhoneDialerCmdClear )
-        {
-        button->SetButtonFlags( KAknButtonKeyRepeat );
-        // delay 300 ms and repeat 75 ms interval   
-        button->SetKeyRepeatInterval( KDialerToolbarButtonKeyRepeatDelay,
-                                      KDialerToolbarKeyRepeatInterval );
-        }
-                                     
-    button->SetFocusing( EFalse );
-    button->SetBackground( iToolbar );
-
-    return button;
-    }
-    
-    
-// ---------------------------------------------------------------------------
 // Static constructor
 // ---------------------------------------------------------------------------
 //
 CPhoneDialerController* CPhoneDialerController::NewL( 
-                                    CPhoneBubbleWrapper& aBubbleWrapper,
-                                    CCoeEnv& aCoeEnv,
-                                    CPhoneMenuController& aMenuController  )
+                                    CPhoneBubbleWrapper* aBubbleWrapper,
+                                    CCoeEnv& aCoeEnv )
     {
-    CPhoneDialerController* self =  new (ELeave) CPhoneDialerController( 
-                                        aBubbleWrapper
-                                       , aCoeEnv
-                                       , aMenuController );
+    CPhoneDialerController* self = 
+        new (ELeave) CPhoneDialerController( aBubbleWrapper, aCoeEnv );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -222,197 +157,11 @@
 // Destructor
 // ---------------------------------------------------------------------------
 //
-CPhoneDialerController::~CPhoneDialerController()
-    {
-    delete iToolbar;
-    }
-
-// ---------------------------------------------------------------------------
-// NumberEntryStateChanged
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::NumberEntryStateChanged( TBool aHidePromptText )
-    {
-    if( aHidePromptText != iPreviousHidePromptTextStatus )
-        {
-        iPreviousHidePromptTextStatus = aHidePromptText; 
-        iUpdateToolbar = ETrue;
-        }
-    
-    HandleNumberEntryChanged();
-    
-    }
-
-// ---------------------------------------------------------------------------
-// HandleNumberEntryChanged
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::HandleNumberEntryChanged()
-    {
-    if( iUpdateToolbar )
-        {
-        UpdateToolbar();
-        iUpdateToolbar = EFalse;        
-        }
-    
-    iBubbleWrapper.HandleNumberEntryChanged();
-    
-    } 
-
-// ---------------------------------------------------------------------------
-// HandleNumberEntryChanged
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::SetNumberEntryChangedCallBack( 
-        TPhoneCommandParam* aCommandParam )
+EXPORT_C CPhoneDialerController::~CPhoneDialerController()
     {
-    iBubbleWrapper.SetNumberEntryChangedCallBack( aCommandParam );
-    
-    }
-     
-// ---------------------------------------------------------------------------
-// CreateButtonSetNumberEntryEmpty
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::CreateButtonSetNumberEntryEmpty()
-    {
-    
-    if( iToolbar )
-        {
-        if( iDtmfDialerVisible )
-            {
-            // Dim 'Send dtmf' 
-            iToolbar->SetItemDimmed( EPhoneCmdDtmfOk, ETrue, EFalse );
-            }
-        else if ( iCustomizedDialer )
-            {
-            iCustomizedDialer->HandleNumberEntryIsEmpty( ETrue );
-            }
-        else
-            {         
-            // Show 'Logs ' and 'Contacts' items
-            iToolbar->HideItem( EPhoneDialerCmdLog, EFalse,EFalse );
-            iToolbar->HideItem( EPhoneDialerCmdContacts, EFalse, EFalse );
-            
-            if ( iRestrictedDialer )
-                {
-                // Dim 'Logs' 
-                iToolbar->SetItemDimmed( EPhoneDialerCmdLog, ETrue
-                                       , EFalse );
-                // Dim 'Contacts' 
-                iToolbar->SetItemDimmed( EPhoneDialerCmdContacts, ETrue
-                                       , EFalse );
-                }
-                            
-            // Hide 'Send' and 'Add to contacts'        
-            iToolbar->HideItem( EPhoneNumberAcqCmdSendCommand, ETrue
-                                , EFalse );
-            iToolbar->HideItem( EPhoneNumberAcqCmdAddToContacts, ETrue
-                                , EFalse );                
-            }        
-        }
     }
 
 // ---------------------------------------------------------------------------
-// CreateButtonSetNumberEntryNotEmpty
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::CreateButtonSetNumberEntryNotEmpty()
-    {
-    if( iToolbar )
-        {
-        if( iDtmfDialerVisible )
-            {
-            // Show 'Send dtmf' 
-            iToolbar->SetItemDimmed( EPhoneCmdDtmfOk, EFalse, EFalse );
-            }           
-        else if ( iCustomizedDialer )
-            {
-            iCustomizedDialer->HandleNumberEntryIsEmpty( EFalse );
-            }
-        else
-            {
-            // Show 'Send' and 'Add to contacts'
-            iToolbar->HideItem( EPhoneNumberAcqCmdAddToContacts, EFalse
-                              , EFalse );      
-            iToolbar->HideItem( EPhoneNumberAcqCmdSendCommand, EFalse
-                              , EFalse );  
-                    
-            if ( iRestrictedDialer )
-                {
-                // Dim 'Send' 
-                iToolbar->SetItemDimmed( EPhoneNumberAcqCmdSendCommand, ETrue
-                                       , EFalse );
-                // Dim 'Add to Contacts' 
-                iToolbar->SetItemDimmed( EPhoneNumberAcqCmdAddToContacts, ETrue
-                                       , EFalse );
-                }  
-                           
-            // Hide 'Logs ' and 'Contacts' 
-            iToolbar->HideItem( EPhoneDialerCmdLog, ETrue,EFalse );
-            iToolbar->HideItem( EPhoneDialerCmdContacts, ETrue, EFalse ); 
-            
-            TPhoneCmdParamCallStateData callStateData;
-            callStateData.SetCallState( EPEStateConnected );
-            iBubbleWrapper.GetCallIdByState( &callStateData );
-            TInt connected = callStateData.CallId();    
-             
-            //If there is a active emergency call, Send item must be dimmed.  
-            if ( connected == KEmergencyCallId )
-                {
-                //Dim Send
-                iToolbar->SetItemDimmed( EPhoneNumberAcqCmdSendCommand, ETrue
-                                        ,EFalse );                
-                }
-            else
-                {
-                //UnDim
-                iToolbar->SetItemDimmed( EPhoneNumberAcqCmdSendCommand, EFalse
-                                        ,EFalse );                     
-                }
-            }    
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// SetDtmfDialerVisibleL
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::SetDtmfDialerVisibleL( TBool aVisible )
-    {
-    iDtmfDialerVisible = aVisible;
-    
-    if( iDtmfDialerVisible )
-        {
-        // Load prompt resource text to DTMF dialer.
-        TInt resourceId = CPhoneMainResourceResolver::Instance()->
-                    ResolveResourceID( EPhoneDtmfDialerNumberEntryPromptText ); 
-                    
-        HBufC* loadedText = StringLoader::LoadL( resourceId
-                                               , &iCoeEnv );
-
-        iBubbleWrapper.SetNumberEntryPromptText( loadedText->Des() );
-        
-        delete loadedText;
-        }
-    else        
-        { 
-        // Clear prompt text.    
-        iBubbleWrapper.SetNumberEntryPromptText( KNullDesC );  
-                 
-        // Hide
-        iToolbar->HideItem( EPhoneCmdDtmfOk, ETrue, EFalse );  
-           
-        // Show       
-        iToolbar->HideItem( EPhoneNumberAcqCmdSendCommand, EFalse, EFalse );
-        iToolbar->HideItem( EPhoneDialerCmdLog, EFalse, EFalse );            
-        iToolbar->HideItem( EPhoneNumberAcqCmdAddToContacts, EFalse, EFalse );    
-        // Dimming 
-        iToolbar->SetItemDimmed( EPhoneDialerCmdContacts, EFalse, EFalse );                
-        }
-    }
-    
-// ---------------------------------------------------------------------------
 // SetRestrictedDialerL
 // ---------------------------------------------------------------------------
 //
@@ -420,326 +169,272 @@
     {
     iRestrictedDialer = aRestricted;
     }
-// ---------------------------------------------------------------------------
-// UpdateToolbar
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::UpdateToolbar()
-    {
-    
-    TPhoneCmdParamInteger numberEntryCountParam;
-    iBubbleWrapper.GetNumberEntryCount( 
-                            (TPhoneCommandParam*) &numberEntryCountParam );
-    TInt neLength( numberEntryCountParam.Integer() );
-    
-    if ( neLength )
-        {
-        CreateButtonSetNumberEntryNotEmpty();
-        iToolbar->SetItemDimmed( EPhoneDialerCmdClear, EFalse, EFalse );  
-        iToolbar->DrawDeferred();     
-        
-        //Update also options menu via controller
-        iMenuController.SetNumberEntryEmptyFlag( EFalse );        
-        }
-        
-    else
-        {
-        CreateButtonSetNumberEntryEmpty();
-        iToolbar->SetItemDimmed( EPhoneDialerCmdClear, ETrue, EFalse );
-        iToolbar->DrawDeferred();
-        
-        //Update also options menu via controller
-        iMenuController.SetNumberEntryEmptyFlag( ETrue );                  
-        } 
 
-    }   
-
-// ---------------------------------------------------------------------------
-// OfferToolbarEventL
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::OfferToolbarEventL( TInt aCommand )
-    {
-    switch ( aCommand )
-        {
-        case EPhoneDialerCmdClear:
-            {
-            // Send key event.
-            TKeyEvent keyEvent;
-            keyEvent.iModifiers = 0;
-            keyEvent.iRepeats = 0;
-            keyEvent.iCode = EKeyBackspace;
-            keyEvent.iScanCode = EStdKeyBackspace;
-            iCoeEnv.SimulateKeyEventL( keyEvent, EEventKey );
-            }
-            break;   
-        default:
-            {
-            // Forward pressed toolbar button to the framework 
-            // so that we can handle it in active state            
-            static_cast<MEikCommandObserver*>( CEikonEnv::Static()->EikAppUi() )
-               ->ProcessCommandL( aCommand );            
-            }
-            break;    
-        }
-    } 
-   
-// ---------------------------------------------------------------------------
-// DynInitToolbarL
-// ---------------------------------------------------------------------------
-//
-void CPhoneDialerController::DynInitToolbarL( TInt aResourceId, 
-                                              CAknToolbar* /*aToolbar*/ )
-    { 
-    if ( aResourceId == R_PHONEUI_TOOLBAR )
-        {
-        if ( !iDtmfDialerVisible )
-            {
-            UpdateToolbar();
-            }
-        else
-            {
-            // initialize toolbar for dtmf dialer
-            //
-            // Show
-            iToolbar->HideItem( EPhoneCmdDtmfOk, EFalse, EFalse );
-            iToolbar->HideItem( EPhoneDialerCmdContacts, EFalse, EFalse );     
-            
-            // Hide
-            iToolbar->HideItem( EPhoneNumberAcqCmdSendCommand, ETrue, EFalse );
-            iToolbar->HideItem( EPhoneDialerCmdLog, ETrue, EFalse );            
-            iToolbar->HideItem( EPhoneNumberAcqCmdAddToContacts, ETrue
-                              , EFalse );     
-            
-            // Dimming
-            iToolbar->SetItemDimmed( EPhoneDialerCmdContacts, ETrue, EFalse ); 
-            iToolbar->SetItemDimmed( EPhoneCmdDtmfOk, ETrue, EFalse );                   
-            }
-        }     
-    }
-// ---------------------------------------------------------------------------
-// IsDTMFDialerVisible
-// ---------------------------------------------------------------------------
-//
-TBool CPhoneDialerController::IsDTMFDialerVisible() const
-    {
-    return iDtmfDialerVisible;
-    }
-
-
-// ---------------------------------------------------------------------------
-// GetTooltipText
-//
-// Tooltip texts for toolbar buttons
-// ---------------------------------------------------------------------------
-//
-void  CPhoneDialerController::GetTooltipTextL( TInt aCommandId, HBufC*& aText ) 
-    {
-    TInt resourceId = 0;
-    switch( aCommandId )
-        {
-        case EPhoneDialerCmdLog:
-            resourceId = R_PHONEUI_DIALER_TOOLTIP_RECENT_CALLS;
-            break;              
-                  
-        case EPhoneNumberAcqCmdSendCommand:
-            resourceId = R_PHONEUI_DIALER_TOOLTIP_CALL;
-            break;      
-                          
-        case EPhoneCmdDtmfOk:
-            resourceId = R_PHONEUI_DIALER_TOOLTIP_SEND;
-            break;   
-                             
-        case EPhoneDialerCmdContacts:
-            resourceId = R_PHONEUI_DIALER_TOOLTIP_CONTACTS;
-            break;   
-                             
-        case EPhoneNumberAcqCmdAddToContacts:
-            resourceId = R_PHONEUI_DIALER_TOOLTIP_ADD_TO_CONTACTS;
-            break;   
-                             
-        case EPhoneDialerCmdClear:
-            resourceId = R_PHONEUI_DIALER_TOOLTIP_CLEAR;
-            break;
-        default:
-            aText = KNullDesC().Alloc();
-            break;
-        }
-        
-    if( resourceId )
-        {
-        aText = StringLoader::LoadL( resourceId, &iCoeEnv );
-        }
-        
-    }
 // ---------------------------------------------------------------------------
 // SetServiceCodeFlagL
 //
-// Change call button tooltip text between 'Send' or 'Call'
+// The flag rules wether green key is called "Send" or "Call"
 // 
 // ---------------------------------------------------------------------------
 //
-void CPhoneDialerController::SetServiceCodeFlagL( 
+void CPhoneDialerController::SetServiceCodeFlag( 
     TPhoneCommandParam* aCommandParam )
     {
-    
     // Check is the given parameter valid
     if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean )
-        {   
-        TInt resourceId = 0;
+        {
         TPhoneCmdParamBoolean* serviceCodeFlag = 
             static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
-        // Sanity check
-        if( serviceCodeFlag->Boolean() == iServiceCodeFlag )
-            {
-            return;
-            }
-        // Get the toolbar button control
-        CAknButton* button = static_cast<CAknButton*>
-        ( iToolbar->ControlOrNull( EPhoneNumberAcqCmdSendCommand) );
-        
-        CAknButtonState* state = button->State();                              
-        if ( serviceCodeFlag->Boolean() )
-            {
-            iServiceCodeFlag = ETrue;
-            resourceId = R_PHONEUI_DIALER_TOOLTIP_SEND;
-            }
-        else
-            {
-            iServiceCodeFlag = EFalse;
-            resourceId = R_PHONEUI_DIALER_TOOLTIP_CALL;
-            }  
-                
-        if( resourceId )
-            {    
-            // Change text              
-            HBufC* tooltipText = StringLoader::LoadL( resourceId,
-                                             CCoeEnv::Static() );
-            CleanupStack::PushL( tooltipText );                                         
-            state->SetHelpTextL( *tooltipText );
-            CleanupStack::PopAndDestroy( tooltipText );   
-            }
+        iServiceCodeFlag = serviceCodeFlag->Boolean();
         }
     }
 
 // ---------------------------------------------------------------------------
-// ShowToolbar
+// SetEasyDialingController
+// ---------------------------------------------------------------------------
 //
+void CPhoneDialerController::SetEasyDialingController( 
+        CPhoneEasyDialingController* aController )
+    {
+    iEasyDialingController = aController;
+    }
+
+// ---------------------------------------------------------------------------
+// CbaResourceId
 // ---------------------------------------------------------------------------
 //
-void CPhoneDialerController::ShowToolbar()
+EXPORT_C TInt CPhoneDialerController::CbaResourceId() const
+    {
+    return KErrNotFound;
+    }
+
+// ---------------------------------------------------------------------------
+// MenuResourceId
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CPhoneDialerController::MenuResourceId() const
     {
-    if ( iToolbar )
-        {
-        if ( iToolbar->IsToolbarDisabled() )
-            {
-            TRAP_IGNORE(iToolbar->DisableToolbarL( EFalse ));
-            }
-        iToolbar->HideItemsAndDrawOnlyBackground( EFalse );
-        iToolbar->SetToolbarVisibility( ETrue, EFalse );
-        }
+    return KErrNotFound;
+    }
+
+// ---------------------------------------------------------------------------
+// NumberEntryPromptTextL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TDesC& CPhoneDialerController::NumberEntryPromptTextL()
+    {
+    return KNullDesC;
     }
 
 // ---------------------------------------------------------------------------
-// HideToolbar
-//
+// GetButtonData
 // ---------------------------------------------------------------------------
 //
-void CPhoneDialerController::HideToolbar()
+EXPORT_C TInt CPhoneDialerController::GetButtonData( TButtonIndex aIndex, 
+        RPointerArray<CButtonData>& aData ) const
     {
-    if ( iToolbar )
+    TInt err = KErrNone;
+    
+    const TLocalButtonData* dataTable = NULL;
+    TInt count = 0;
+    
+    // Select correct data table
+    switch ( aIndex )
         {
-        if( iToolbar->IsShown() )
+        case ECallButton:
+            dataTable = KCallButtonDataTable;
+            count = KCallButtonDataTableCount;
+            break;
+        case EPhonebookButton:
+            dataTable = KPhonebookButtonDataTable;
+            count = KPhonebookButtonDataTableCount;
+            break;
+        case EClearButton:
+            dataTable = KClearButtonDataTable;
+            count = KClearButtonDataTableCount;
+            break;
+        default:
+            break;
+        }
+    
+    // Create data from the table
+    if ( dataTable )
+        {
+        // Construct MIF file path
+        TFileName mifPath( KDriveZ );
+        mifPath.Append( KDC_APP_BITMAP_DIR );
+        mifPath.Append( KPhoneMifFileName );
+        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    
+        for ( TInt i = 0 ; i < count ; ++i )
             {
-            iToolbar->HideItemsAndDrawOnlyBackground( ETrue );
+            CButtonData* btnData = NULL;
+            TRAP( err, btnData = CreateButtonDataL( dataTable[i], skin, mifPath ) );
+            if ( !err )
+                {
+                err = aData.Append( btnData );
+                }
+            if ( err )
+                {
+                // free all memory and stop here if something went wrong
+                delete btnData;
+                aData.ResetAndDestroy();
+                i = count;
+                }
             }
-        else if ( iToolbar->IsToolbarDisabled() )
-            {
-            TRAP_IGNORE(iToolbar->DisableToolbarL( EFalse ));
-            iToolbar->HideItemsAndDrawOnlyBackground( ETrue );
-            iToolbar->SetToolbarVisibility( ETrue, EFalse );
-            }
-        }        
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// SetNumberEntryEmptyIsEmpty
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CPhoneDialerController::SetNumberEntryIsEmpty( TBool aEmpty )
+    {
+    iNumberAvailable = !aEmpty;
     }
 
 // ---------------------------------------------------------------------------
-// ShowCustomizedDialerL
-//
-// Sets custom dialer buttons visible
-// 
+// ButtonState
 // ---------------------------------------------------------------------------
 //
-void CPhoneDialerController::ShowCustomizedDialerL( 
-    MPhoneDialerController* aCustomController )
-    {  
-    if ( aCustomController )
+EXPORT_C TInt CPhoneDialerController::ButtonState( TButtonIndex aIndex ) const
+    {
+    TInt state = 0;
+    // Figure out correct state for each key
+    switch ( aIndex )
         {
-        // Hide all buttons except clear button 
-        for ( TInt i = 0; i < KNumberOfButtons; i++ )
+        case ECallButton:
             {
-            if ( bArray[ i ].iCommandId != EPhoneDialerCmdClear )
+            state = ECallButtonCallStateIndex;
+            if ( !iNumberAvailable )
+                {
+                state = ECallButtonLogStateIndex;
+                }
+            else if ( iServiceCodeFlag )
                 {
-                iToolbar->HideItem( bArray[ i ].iCommandId, ETrue, EFalse );
+                // Set "Send" state unless Easy dialing is focused
+                TBool edFocused = EFalse;
+                if ( iEasyDialingController )
+                    {
+                    TInt commandResponse( EPhoneViewResponseFailed );
+                    TRAP_IGNORE( commandResponse = iEasyDialingController->HandleCommandL(
+                            EPhoneViewGetEasyDialingInFocusStatus) );
+                    edFocused = ( commandResponse == EPhoneViewResponseSuccess );
+                    }
+                if ( !edFocused )
+                    {
+                    state = ECallButtonSendStateIndex;
+                    }
                 }
             }
- 
-        aCustomController->InitializeL( *iToolbar );
-        iBubbleWrapper.SetNumberEntryPromptText( 
-            aCustomController->NumberEntryPromptTextL() );
-        aCustomController->ShowButtons( ETrue );
+            break;
+        case EPhonebookButton:
+            {
+            if ( !iNumberAvailable )
+                {
+                state = EPhonebookButtonContactsIndex;
+                }
+            else
+                {
+                state = EPhonebookButtonAddContactIndex;
+                }
+            }
+            break;
+        case EClearButton:
+            {
+            state = EClearButtonClearIndex;
+            }
+            break;
+        default:
+            break;
         }
-    iCustomizedDialer = aCustomController;
+    return state;
     }
 
 // ---------------------------------------------------------------------------
-// HideCustomizedDialerL
-//
-// Hides custom dialer buttons 
-// 
+// ButtonDimmed
 // ---------------------------------------------------------------------------
 //
-void CPhoneDialerController::HideCustomizedDialer()
-    {  
-    iCustomizedDialer->ShowButtons( EFalse );
-    iBubbleWrapper.SetNumberEntryPromptText( KNullDesC );              
-    iCustomizedDialer = NULL;
+EXPORT_C TBool CPhoneDialerController::ButtonDimmed( TButtonIndex aIndex ) const
+    {
+    TBool dimmed = EFalse;
+    // Figure out correct state for each key
+    switch ( aIndex )
+        {
+        case ECallButton:
+            dimmed = iRestrictedDialer;
+            if ( !dimmed )
+                {
+                // Prevent calling but don't prevent log during emergency call
+                dimmed = ( iNumberAvailable && EmergencyCallActive() );
+                }
+            break;
+        case EPhonebookButton:
+            dimmed = iRestrictedDialer;
+            break;
+        case EClearButton:
+            dimmed = !iNumberAvailable;
+            break;
+        default:
+            break;
+        }
+    return dimmed;
     }
 
 // ---------------------------------------------------------------------------
-// IsCustomizedDialerVisible
+// EasyDialingAllowed
 // ---------------------------------------------------------------------------
 //
-TBool CPhoneDialerController::IsCustomizedDialerVisible() const
+EXPORT_C TBool CPhoneDialerController::EasyDialingAllowed() const
     {
-    return ( NULL != iCustomizedDialer );
+    return !iRestrictedDialer && !EmergencyCallActive();
     }
 
 // ---------------------------------------------------------------------------
-// CustomizedCbaResourceId
+// EmergencyCallActive
 // ---------------------------------------------------------------------------
 //
-TInt CPhoneDialerController::CustomizedCbaResourceId() const
+EXPORT_C TBool CPhoneDialerController::EmergencyCallActive() const
     {
-    TInt resourceId = KErrNotFound;
-    if ( iCustomizedDialer )
+    TBool ret = EFalse;
+    if ( iBubbleWrapper )
         {
-        resourceId = iCustomizedDialer->CbaResourceId();
+        TPhoneCmdParamCallStateData callStateData;
+        callStateData.SetCallState( EPEStateConnected );
+        iBubbleWrapper->GetCallIdByState( &callStateData );
+        TInt connected = callStateData.CallId();    
+        ret = ( connected == KEmergencyCallId );
         }
-    return resourceId;
+    return ret;
     }
 
 // ---------------------------------------------------------------------------
-// CustomizedMenuResourceId
+// CreateButtonDataL
 // ---------------------------------------------------------------------------
 //
-TInt CPhoneDialerController::CustomizedMenuResourceId() const
+MPhoneDialerController::CButtonData* CPhoneDialerController::CreateButtonDataL( 
+        const TLocalButtonData& aSourceData, 
+        MAknsSkinInstance* aSkin, 
+        const TDesC& aMifFile ) const
     {
-    TInt resourceId = KErrNotFound;
-    if ( iCustomizedDialer )
-        {
-        resourceId = iCustomizedDialer->MenuResourceId();  
-        }
-    return resourceId;
+    // Create tooltip text
+    HBufC* tooltip = StringLoader::LoadLC( aSourceData.iTooltipResourceId );
+    
+    // Create icon
+    TAknsItemID skinId = { EAknsMajorGeneric, aSourceData.iSkinItemIdMinor };
+    CGulIcon* icon = AknsUtils::CreateGulIconL( aSkin, skinId, aMifFile, 
+            aSourceData.iBitmapIndex, aSourceData.iBitmapMaskIndex );
+    CleanupStack::PushL( icon );
+    
+    // Create button data object
+    CButtonData* buttonData =
+        new ( ELeave ) CButtonData( aSourceData.iCommandId, icon, tooltip );
+    CleanupStack::Pop( icon );
+    CleanupStack::Pop( tooltip );
+    
+    return buttonData;
     }
 
 // END
--- a/phoneapp/phoneuiview/src/cphonedialerview.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphonedialerview.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008 - 2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -57,9 +57,6 @@
     EPhoneBgLayersN             = 1
     };
 
-#define LSC_VARIETY   0
-#define PRT_VARIETY   6
-
 // ================= MEMBER FUNCTIONS =======================
 
 // -----------------------------------------------------------------------------
@@ -88,7 +85,7 @@
     CreateWindowL();
     DrawableWindow()->SetPointerGrab( ETrue );
 
-    SetRect( aRect );
+    SetComponentsToInheritVisibility( ETrue );
     }
 
 // -----------------------------------------------------------------------------
@@ -214,78 +211,25 @@
 // CPhoneDialerView::SetRect
 // -----------------------------------------------------------------------------
 //    
-void CPhoneDialerView::SetRect( const TRect &aRect )
+void CPhoneDialerView::SetRect( const TRect& aRect )
     {
-    __LOGMETHODSTARTEND(EPhoneUIView, "CPhoneDialerView::SetRect()");
-    if ( !AknLayoutUtils::PenEnabled() )
-        {
-        CCoeControl::SetRect( aRect );
-        }
-    else
+    CCoeControl::SetRect( aRect );
+    iControlRect = Rect();
+    // Forward size change to the control only if we are visible. Otherwise the
+    // control rect is just srored and relayed to control when we do become
+    // visible. This way we can avoid unnecessary relayout work for example when
+    // status bar size changes or screen is rotated while in-call ui is active.
+    if ( IsVisible() )
         {
-        if ( iSecurityMode )
-            {
-            // In security mode aRect is ok.
-            CCoeControl::SetRect( aRect );    
-            iControlRect = Rect();
-            }
-        else
-            {
-            TAknLayoutRect viewRect;
-            
-            TRect screenRect;
-            AknLayoutUtils::LayoutMetricsRect( 
-                AknLayoutUtils::EScreen,
-                screenRect  );    
-
-            // dialer view
-            viewRect.LayoutRect( 
-                screenRect, 
-                TAknWindowComponentLayout::Compose(
-                    AknLayoutScalable_Avkon::application_window( 0 ),
-                    AknLayoutScalable_Avkon::main_pane( 7 ) ) );
-
-            CCoeControl::SetRect( viewRect.Rect() );    
-            
-            TInt variety ( PRT_VARIETY ) ; // portrait
-            if ( Layout_Meta_Data::IsLandscapeOrientation() )
-                {
-                variety = LSC_VARIETY;
-                }
-            
-            // reduce toolbar
-            TAknLayoutRect toolbarRect;
-            toolbarRect.LayoutRect( 
-                screenRect, 
-                TAknWindowComponentLayout::Compose(
-                AknLayoutScalable_Avkon::application_window( 0 ),
-                AknLayoutScalable_Avkon::area_side_right_pane( variety ) ) );
-            
-            if ( toolbarRect.Rect().Intersects( viewRect.Rect() ) )
-                {
-                iControlRect = Rect();
-                if ( variety == PRT_VARIETY ) // portrait
-                    {
-                    iControlRect.iBr.iY -= toolbarRect.Rect().Height();
-                    }
-                else
-                    {
-                    iControlRect.iBr.iX -= toolbarRect.Rect().Width();
-                    }
-                }
-            else
-                {
-                iControlRect = Rect();    
-                }                            
-            }                
-        }        
+        UpdateControlRect();
+        }
     }
 
 // -----------------------------------------------------------------------------
 // CPhoneDialerView::Draw
 // -----------------------------------------------------------------------------
 //
-void CPhoneDialerView::Draw(  const TRect& aRect ) const
+void CPhoneDialerView::Draw( const TRect& aRect ) const
     {
     __LOGMETHODSTARTEND(EPhoneUIView, "CPhoneDialerView::Draw()");
     TRect rect = Rect();
@@ -343,8 +287,6 @@
     iBgContext->SetLayerImage( EPhoneBgFirstLayer, KAknsIIDQsnBgScreen );
     iBgContext->SetParentPos( screen.iTl );
     iBgContext->SetLayerRect( EPhoneBgFirstLayer, screen ) ;
-
-    UpdateControlRect();
     }
 
 // -----------------------------------------------------------------------------
@@ -387,7 +329,7 @@
             if ( iControlRect != iControl->Rect() )
                 {
                 iControl->SetRect( iControlRect );
-                }    
+                }
             } 
         }
     }
@@ -408,6 +350,22 @@
     }
 
 // -----------------------------------------------------------------------------
+// CPhoneDialerView::MakeVisible
+// -----------------------------------------------------------------------------
+//
+void CPhoneDialerView::MakeVisible( TBool aVisible )
+    {
+    if ( aVisible )
+        {
+        // Deferred control rect size update before view becomes visible.
+        // We don't relay size changes to our control while view is invisible
+        // to avoid unnecessary layout recalculations.
+        UpdateControlRect();
+        }
+    CCoeControl::MakeVisible( aVisible );
+    }
+
+// -----------------------------------------------------------------------------
 // CPhoneDialerView::SetSecurityMode
 // -----------------------------------------------------------------------------
 //
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneapp/phoneuiview/src/cphonedtmfdialercontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,208 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Controller for DTMF mode of Dialer
+*
+*/
+
+#include <StringLoader.h>
+#include <phoneui.rsg>
+#include <phoneui.mbg>
+#include <AknsUtils.h>
+#include <data_caging_path_literals.hrh>
+#include "phoneappcommands.hrh"
+#include "cphonedtmfdialercontroller.h"
+#include "cphonemainresourceresolver.h"
+#include "phonerssbase.h"
+
+_LIT ( KPhoneMifFileName, "phoneui.mif" );
+
+const CPhoneDialerController::TLocalButtonData KSendDtmfButtonData =
+    {
+    EPhoneCmdDtmfOk,
+    EAknsMinorGenericQgnIndiButtonSendDtmf,
+    EMbmPhoneuiQgn_indi_button_send_dtmf,
+    EMbmPhoneuiQgn_indi_button_send_dtmf_mask,
+    R_PHONEUI_DIALER_TOOLTIP_SEND
+    };
+
+// ---------------------------------------------------------------------------
+// CPhoneDtmfDialerController
+// ---------------------------------------------------------------------------
+//
+CPhoneDtmfDialerController::CPhoneDtmfDialerController( 
+        CPhoneBubbleWrapper* aBubbleWrapper,
+        CCoeEnv& aCoeEnv ) : 
+    CPhoneDialerController( aBubbleWrapper, aCoeEnv )
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// ~CPhoneDtmfDialerController
+// ---------------------------------------------------------------------------
+//
+CPhoneDtmfDialerController::~CPhoneDtmfDialerController()
+    {
+    delete iPromptText;
+    }
+
+// ---------------------------------------------------------------------------
+// NewLC
+// ---------------------------------------------------------------------------
+//
+CPhoneDtmfDialerController* CPhoneDtmfDialerController::NewLC( 
+        CPhoneBubbleWrapper* aBubbleWrapper,
+        CCoeEnv& aCoeEnv )
+    {
+    CPhoneDtmfDialerController* self =
+        new (ELeave) CPhoneDtmfDialerController( aBubbleWrapper, aCoeEnv );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// NewL
+// ---------------------------------------------------------------------------
+//
+CPhoneDtmfDialerController* CPhoneDtmfDialerController::NewL( 
+        CPhoneBubbleWrapper* aBubbleWrapper,
+        CCoeEnv& aCoeEnv )
+    {
+    CPhoneDtmfDialerController* self = 
+        CPhoneDtmfDialerController::NewLC( aBubbleWrapper, aCoeEnv );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// ConstructL
+// ---------------------------------------------------------------------------
+//
+void CPhoneDtmfDialerController::ConstructL()
+    {
+    CPhoneDialerController::ConstructL();
+    }
+
+// ---------------------------------------------------------------------------
+// NumberEntryPromptTextL
+// ---------------------------------------------------------------------------
+//
+const TDesC& CPhoneDtmfDialerController::NumberEntryPromptTextL()
+    {
+    if ( !iPromptText )
+        {
+        // Load prompt text when it's needed for the first time.
+        // It can't be loaded in constructor as resource resolver
+        // is not yet properly set up at that time.
+        TInt resourceId = 
+            CPhoneMainResourceResolver::Instance()->
+                   ResolveResourceID( EPhoneDtmfDialerNumberEntryPromptText ); 
+        iPromptText = StringLoader::LoadL( resourceId, &iCoeEnv );
+        }
+    if ( iPromptText )
+        {
+        return *iPromptText;
+        }
+    return KNullDesC;
+    }
+
+// ---------------------------------------------------------------------------
+// GetButtonDataL
+// ---------------------------------------------------------------------------
+//
+TInt CPhoneDtmfDialerController::GetButtonData( TButtonIndex aIndex, RPointerArray<CButtonData>& aData ) const
+    {
+    TInt err = KErrNone;
+    
+    if ( aIndex == ECallButton )
+        {
+        TFileName mifPath( KDriveZ );
+        mifPath.Append( KDC_APP_BITMAP_DIR );
+        mifPath.Append( KPhoneMifFileName );
+        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+        CButtonData* btnData = NULL;
+        TRAP( err, btnData = CreateButtonDataL( KSendDtmfButtonData, skin, mifPath ) );
+        if ( !err )
+            {
+            err = aData.Append( btnData );
+            if ( err )
+                {
+                // append failed, delete created data to avoid memory leak
+                delete btnData;
+                }
+            }
+        }
+    else if ( aIndex == EClearButton )
+        {
+        // let base class handle backspace
+        err = CPhoneDialerController::GetButtonData( aIndex, aData );
+        }
+    else
+        {
+        // leave Phonebook button empty
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// ButtonState
+// ---------------------------------------------------------------------------
+//
+TInt CPhoneDtmfDialerController::ButtonState( TButtonIndex aIndex ) const
+    {
+    TInt state = KErrNotFound;
+    // Call button has one only one state, phonebook button has no states.
+    // Clear button is handled by the base class.
+    if ( aIndex == ECallButton )
+        {
+        state = 0;
+        }
+    else if ( aIndex == EClearButton )
+        {
+        state = CPhoneDialerController::ButtonState( aIndex );
+        }
+    return state;
+    }
+
+// ---------------------------------------------------------------------------
+// GetButtonDimmed
+// ---------------------------------------------------------------------------
+//
+TBool CPhoneDtmfDialerController::ButtonDimmed( TButtonIndex aIndex ) const
+    {
+    TBool dimmed = ETrue;
+    // Call button is dimmed while number entry is empty. Phonebook button
+    // is empty and always dimmed. Clear button is handled by the base class.
+    if ( aIndex == ECallButton )
+        {
+        dimmed = !iNumberAvailable;
+        }
+    else if ( aIndex == EClearButton )
+        {
+        dimmed = CPhoneDialerController::ButtonDimmed( EClearButton );
+        }
+    return dimmed;
+    }
+
+// ---------------------------------------------------------------------------
+// EasyDialingAllowed
+// ---------------------------------------------------------------------------
+//
+TBool CPhoneDtmfDialerController::EasyDialingAllowed() const
+    {
+    return EFalse;
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneapp/phoneuiview/src/cphoneeasydialingcontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 handles Easy dialing specific commands
+*
+*/
+
+#include "cphoneeasydialingcontroller.h"
+
+#include "cdialer.h"
+#include "tphonecommandparam.h"
+#include "tphonecmdparaminteger.h"
+#include "tphonecmdparamdynmenu.h"
+#include "dialingextensioninterface.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CPhoneEasyDialingController::CPhoneEasyDialingController
+// ---------------------------------------------------------------------------
+//
+CPhoneEasyDialingController::CPhoneEasyDialingController(
+         CDialer& aDialer )
+   : iDialer ( aDialer )
+    {
+    // Get Easydialing interface. This can be NULL if easydialing is not
+    // present in current device configuration.
+    iEasyDialing = iDialer.GetEasyDialingInterface();
+    }
+
+ // ---------------------------------------------------------------------------
+ // CPhoneEasyDialingController::NewL
+ // ---------------------------------------------------------------------------
+ //
+CPhoneEasyDialingController* CPhoneEasyDialingController::NewL( 
+        CDialer& aDialer )
+     {
+     return new (ELeave) CPhoneEasyDialingController( aDialer );
+     }
+
+// ---------------------------------------------------------------------------
+//  CPhoneEasyDialingController::~CPhoneEasyDialingController
+// ---------------------------------------------------------------------------
+//
+CPhoneEasyDialingController::~CPhoneEasyDialingController()
+     {
+     }
+ 
+// ---------------------------------------------------------------------------
+//  CPhoneEasyDialingController::ExecuteCommandL
+// ---------------------------------------------------------------------------
+//
+void CPhoneEasyDialingController::ExecuteCommandL(
+        TPhoneViewCommandId aCmdId,
+        TPhoneCommandParam* aCommandParam )
+    {
+    if ( iEasyDialing )
+        {
+        switch ( aCmdId )
+            {
+            case EPhoneViewGetEasyDialingMenuId:
+                {
+                TPhoneCmdParamInteger* paramInt = 
+                    static_cast<TPhoneCmdParamInteger*>( aCommandParam );
+                paramInt->SetInteger( iEasyDialing->MenuResourceId() );            
+                }
+                break;
+                    
+            case EPhoneViewGetEasyDialingCbaId:
+                {
+                TPhoneCmdParamInteger* paramInt = 
+                    static_cast<TPhoneCmdParamInteger*>( aCommandParam );
+                paramInt->SetInteger( iEasyDialing->CbaResourceId() );            
+                }
+                break;
+                
+            default:
+                break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+//  CPhoneEasyDialingController::HandleCommandL
+// ---------------------------------------------------------------------------
+//
+TPhoneViewResponseId CPhoneEasyDialingController::HandleCommandL(
+        TPhoneViewCommandId aCmdId )
+    {
+    TPhoneViewResponseId viewResponse = EPhoneViewResponseFailed;
+
+    switch ( aCmdId )
+        {
+        // commands defined in easydialingcommands.hrh are forwarded to
+        // easydialing plugin
+        case EEasyDialingVoiceCall:
+        case EEasyDialingVideoCall:
+        case EEasyDialingSendMessage:
+        case EEasyDialingOpenContact:
+        case EEasyDialingCallHandlingActivated:
+        case EEasyDialingEnterKeyAction:
+        case EEasyDialingOn:
+        case EEasyDialingOff:
+            {
+            if( iEasyDialing && iEasyDialing->HandleCommandL( aCmdId ) )
+                {
+                viewResponse = EPhoneViewResponseSuccess;
+                }
+            }
+            break;
+            
+        case EPhoneViewGetEasyDialingInFocusStatus:
+            {
+            if ( iEasyDialing && iEasyDialing->IsFocused() )
+                {
+                viewResponse = EPhoneViewResponseSuccess;
+                }
+            }
+            break;
+        }
+    
+    return viewResponse;
+    }
+
+// ---------------------------------------------------------------------------
+//  CPhoneEasyDialingController::InitializeEasyDialingMenuL
+// ---------------------------------------------------------------------------
+//
+TBool CPhoneEasyDialingController::InitializeEasyDialingMenuL( 
+        TPhoneCommandParam* aCommandParam )
+    {
+    TBool retVal( EFalse );
+    if ( iEasyDialing )
+        {
+        TPhoneCmdParamDynMenu* menu = static_cast<TPhoneCmdParamDynMenu*>( aCommandParam );
+    
+       // TInt resourceId = menu->ResourceId();
+        CEikMenuPane*  menuPane = reinterpret_cast<CEikMenuPane*>( menu->DynMenu() );
+        
+        retVal = iEasyDialing->InitializeMenuPaneL( *menuPane, menu->ResourceId() );
+        }
+    return retVal;
+    }
--- a/phoneapp/phoneuiview/src/cphonemenucontroller.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphonemenucontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -254,6 +254,10 @@
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] );
                     }
+                else if ( iInvalidCsPhoneNumber )
+                    {
+                    menuPane->DeleteMenuItem( menuItemArray[ i ] );
+                    }
                 break;
                 
             case EPhoneNumberAcqCmdVideoCall:
@@ -268,10 +272,14 @@
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] );
                     }
+                else if ( iInvalidCsPhoneNumber )
+                    {
+                    menuPane->DeleteMenuItem( menuItemArray[ i ] );
+                    }
                 break;
  
             case EPhoneNumberAcqCmdSendMessage:            
-                if ( iNumberEntryEmpty )
+                if ( iNumberEntryEmpty || iInvalidCsPhoneNumber )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] ); 
                     }
@@ -473,7 +481,7 @@
 
             case EPhoneNumberAcqCmdAddToContacts:
                 {
-                if ( onScreenDialer && iNumberEntryEmpty   )
+                if ( onScreenDialer && iNumberEntryEmpty )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[i] );                    
                     }                
@@ -522,6 +530,15 @@
                 }
                 break;
                 
+            case EEasyDialingSettingsItemPlaceHolder:
+                {
+                if( !FeatureManager::FeatureSupported( KFeatureIdProductIncludesHomeScreenEasyDialing ) )
+                    {
+                    menuPane->DeleteMenuItem( menuItemArray[i] );
+                    }
+                }
+                break;
+                
             default:
                 break;                                                                                                
              
@@ -1058,5 +1075,52 @@
         }
     }
 
-     
+// ---------------------------------------------------------
+// CPhoneMenuController::SetInvalidCsPhoneNumberFlag
+// ---------------------------------------------------------
+//
+void CPhoneMenuController::SetInvalidCsPhoneNumberFlag( TPhoneCommandParam* aCommandParam )
+    {
+    __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetInvalidCsPhoneNumberFlag()" );
+    if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean )
+        {
+        TPhoneCmdParamBoolean* boolParam = 
+            static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
+        
+        __PHONELOG1( 
+            EBasic, 
+            EPhonePhoneapp, 
+            "CPhoneMenuController::SetInvalidCsPhoneNumberFlag() - Boolean parameter = %d)", 
+            boolParam->Boolean() );
+        
+        iInvalidCsPhoneNumber = boolParam->Boolean();
+        }    
+    }
+
+// ---------------------------------------------------------
+// CPhoneMenuController::GetInvalidCsPhoneNumberFlag
+// ---------------------------------------------------------
+//
+void CPhoneMenuController::GetInvalidCsPhoneNumberFlag( 
+        TPhoneCommandParam* aCommandParam )
+    {
+    __LOGMETHODSTARTEND( 
+            EPhoneUIView, 
+            "CPhoneMenuController::GetInvalidCsPhoneNumberFlag()" );
+    
+    if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean )
+        {
+        TPhoneCmdParamBoolean* boolParam = 
+            static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); 
+        
+        __PHONELOG1( 
+            EBasic, 
+            EPhonePhoneapp, 
+            "CPhoneMenuController::GetInvalidCsPhoneNumberFlag() - Boolean return value = %d)", 
+            boolParam->Boolean() );
+
+        boolParam->SetBoolean( iInvalidCsPhoneNumber );
+        }     
+    }
+
 // End of File
--- a/phoneapp/phoneuiview/src/cphoneringingtoneplayerao.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphoneringingtoneplayerao.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -377,8 +377,9 @@
     {
     __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneRingingTonePlayerAO::MuteRingingToneOnAnswer()" );
     
-    if ( iVideoPlayer && iTonePlayingStatus == EVideoTonePlaying ||
-         iTonePlayingStatus == EPersonalVideoTonePlaying )
+    if ( iVideoPlayer &&
+            ( iTonePlayingStatus == EVideoTonePlaying ||
+         iTonePlayingStatus == EPersonalVideoTonePlaying ) )
         {
         // Mute the video audio
         iVideoPlayer->MuteVideoRingTone();
@@ -399,8 +400,9 @@
     {
     __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneRingingTonePlayerAO::MuteRingingTone()" );
     
-    if ( iVideoPlayer && iTonePlayingStatus == EVideoTonePlaying ||
-         iTonePlayingStatus == EPersonalVideoTonePlaying )
+    if ( iVideoPlayer &&
+            ( iTonePlayingStatus == EVideoTonePlaying ||
+         iTonePlayingStatus == EPersonalVideoTonePlaying )  )
         {
         // Mute the video audio
         iVideoPlayer->MuteVideoRingTone();
@@ -1631,7 +1633,7 @@
                     ramptime ); 
                 currPlayer->SetNewVolumeAndRamptime( iTtsVolume, 0 );    
                 }
-             break;
+            break;
         
         case ESaidTwice:
             if ( iTtsRingingType == EProfileRingingTypeAscending )
@@ -1814,42 +1816,42 @@
     switch( iTonePlayingStatus )
         {
         case EAudioTonePlaying:
-            if( iAudioPlayer != NULL )
+            if( iAudioPlayer )
                 {
 				return iAudioPlayer;
                 }
             break;
             
         case EDefaultTonePlaying:
-            if ( iDefaultPlayer != NULL )
+            if ( iDefaultPlayer )
                 {
 				return iDefaultPlayer;
                 }
             break;
             
         case EBeepOnce:
-            if( iBeepOncePlayer != NULL )
+            if( iBeepOncePlayer )
                 {
 				return iBeepOncePlayer;
                 }
             break;
             
         case EBackupTonePlaying:
-            if( iBackupPlayer != NULL )
+            if( iBackupPlayer )
                 {
                 return iBackupPlayer;
                 }
             break;
             
         case ESilentTonePlaying:
-            if( iSilentPlayer != NULL )
+            if( iSilentPlayer )
                 {
                 return iSilentPlayer;
                 }
             break;
             
         case EUnsecureVoIPTonePlaying:
-            if( iUnsecureVoIPTonePlayer != NULL )
+            if( iUnsecureVoIPTonePlayer )
                 {
                 return iUnsecureVoIPTonePlayer;
                 }
@@ -1858,11 +1860,11 @@
         case EVideoTonePlaying: // video ringing tone
         case EPersonalVideoTonePlaying:
         case ESilentVideoTonePlaying:
-            if ( iBeepOncePlayer != NULL )
+            if ( iBeepOncePlayer )
                 {
                 return iBeepOncePlayer;                    
                 }    
-            else if ( iSilentPlayer != NULL )
+            else if ( iSilentPlayer )
                 {
                 return iSilentPlayer;                    
                 }    
@@ -1888,7 +1890,7 @@
         case EVideoTonePlaying: // video ringing tone, fall through
         case EPersonalVideoTonePlaying: // fall through
         case ESilentVideoTonePlaying:
-            if ( iVideoPlayer != NULL )
+            if ( iVideoPlayer )
 	            {
                 iVideoPlayer->MuteVideoRingTone();
                 return;	            	
@@ -1900,7 +1902,7 @@
 		}
 	
 	CPhoneAudioPlayer* activePlayer = ActiveAudioPlayer();
-	if( activePlayer != NULL )
+	if( activePlayer )
 		{
 		activePlayer->MutePlaying();
 		}
--- a/phoneapp/phoneuiview/src/cphonestatuspane.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphonestatuspane.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -45,7 +45,7 @@
 #include "tphonecmdparambitmap.h"
 #include "phonelogger.h"
 
-#include <stringloader.h>
+#include <StringLoader.h>
 
 // CONSTANTS
 
--- a/phoneapp/phoneuiview/src/cphonetoolbarcontroller.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphonetoolbarcontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -31,11 +31,11 @@
 #include <phoneui.mbg>
 
 #include "cphonetoolbarcontroller.h"
-#include "PhoneUI.hrh"
-#include "PhoneRssBase.h"
-#include "TPhoneCmdParamInteger.h"
-#include "TPhoneCmdParamBoolean.h"
-#include "PhoneLogger.h"
+#include "phoneui.hrh"
+#include "phonerssbase.h"
+#include "tphonecmdparaminteger.h"
+#include "tphonecmdparamboolean.h"
+#include "phonelogger.h"
 
 
 _LIT ( KPhoneMifFileName, "phoneui.mif" );
@@ -303,6 +303,8 @@
         }
     return skinId;        
     }
+
+// ---------------------------------------------------------------------------
 // ShowToolbar
 //
 // ---------------------------------------------------------------------------
@@ -310,6 +312,7 @@
 void CPhoneToolbarController::ShowToolbar()
     {
     __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneToolbarController::ShowToolbar()" );
+
     if ( iToolbar )
         {
         if ( iToolbar->IsToolbarDisabled() )
@@ -317,7 +320,6 @@
             TRAP_IGNORE(iToolbar->DisableToolbarL( EFalse ));
             }
         UpdateToolbar();
-        iToolbar->HideItemsAndDrawOnlyBackground( EFalse );
         iToolbar->SetToolbarVisibility( ETrue, EFalse );
         }
     }
@@ -332,17 +334,12 @@
     __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneToolbarController::HideToolbar()" );
     if ( iToolbar )
         {
-        if( iToolbar->IsShown() )
-            {
-            iToolbar->HideItemsAndDrawOnlyBackground( ETrue );
-            }
-        else if ( iToolbar->IsToolbarDisabled() )
+        if ( iToolbar->IsToolbarDisabled() )
             {
             TRAP_IGNORE(iToolbar->DisableToolbarL( EFalse ));
-            iToolbar->HideItemsAndDrawOnlyBackground( ETrue );
-            iToolbar->SetToolbarVisibility( ETrue, EFalse );
             }
-        }        
+        iToolbar->SetToolbarVisibility( EFalse, EFalse );
+        }
     }
 
 // ---------------------------------------------------------
--- a/phoneapp/phoneuiview/src/cphoneview.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphoneview.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -49,7 +49,7 @@
 #include <layoutmetadata.cdl.h>
 #include <aknlayoutscalable_apps.cdl.h>
 #include <aknlayoutscalable_avkon.cdl.h>
-#include <aknstatuspaneutils.h>
+#include <AknStatuspaneUtils.h>
 
 enum TPhoneBgLayers
     {
--- a/phoneapp/phoneuiview/src/cphoneviewcontroller.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphoneviewcontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005 - 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -23,6 +23,8 @@
 #include "cphonetoolbarcontroller.h"
 #include "cphonebuttonscontroller.h"
 #include "cphonedialercontroller.h"
+#include "cphoneeasydialingcontroller.h"
+#include "cphonedtmfdialercontroller.h"
 #include "cphonemenucontroller.h"
 #include "cphonenotecontroller.h"
 #include "cphonequerycontroller.h"
@@ -106,7 +108,7 @@
 #include <cphcntcontactid.h>
 #include <AknUtils.h>
 #include <AknSgcc.h>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
 #include <UikonInternalPSKeys.h>
 #include <startupdomainpskeys.h>
 #include <utf.h>
@@ -128,7 +130,9 @@
 #include <gfxtranseffect/gfxtranseffect.h>
 #include <akntranseffect.h>
 
-#include <GSLauncher.h> // Call Settings launch.
+#include <gslauncher.h> // Call Settings launch.
+
+#include <dialingextensioninterface.h>
 
 // Kastor effect IDs, aknskincontent/101f84b9.sel
 const TInt KTouchDialerOpenEffect  = 1505;
@@ -209,32 +213,40 @@
         iEikEnv.WsSession(),
         iEikEnv.WsSession().FindWindowGroupIdentifier( 0, KPhoneEikonServer ) );
 
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+    
     if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
         {
         iButtonsController = CPhoneButtonsController::NewL( iBubbleWrapper->TouchPane() );
+        iToolbarController = CPhoneToolbarController::NewL( *coeEnv );
         }
 
     if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) )
         {
+        iDialerActive = EFalse;
+        // Create dialer controller
+        iDialerController = CPhoneDialerController::NewL( iBubbleWrapper,
+                                                          *coeEnv );
         // Create dialer view
         iDialerView = CPhoneDialerView::NewL( aRect );
         iDialerView->DrawableWindow()->SetOrdinalPosition( -1 );
         iDialerView->MakeVisible( EFalse );
         // Create dialer
-        iDialer = CDialer::NewL( *iDialerView, aRect );
+        iDialer = CDialer::NewL( *iDialerView, aRect, iDialerController );
         // Set NE for bubbleWrapper
         iBubbleWrapper->SetNumberEntry( iDialer->NumberEntry() );
-        CCoeEnv* coeEnv = static_cast<CCoeControl*>(iDialer)->ControlEnv();
-        iDialerController = CPhoneDialerController::NewL( *iBubbleWrapper,
-                                                            *coeEnv,
-                                                            *iMenuController );
+        iBubbleWrapper->SetNumberEntryObserver( *this );
+        // Finalise dialer view
+        iDialerView->SetControl( iDialer );
+        iDialerView->ActivateL();
         
-        iToolbarController = CPhoneToolbarController::NewL( *coeEnv  );
-                                                           
-      
-		iDialerView->SetControl( iDialer );
-		iDialerView->ActivateL();
-		iDialerActive = EFalse;
+        // Create controller for Easy Dialing
+        iEasyDialingController = CPhoneEasyDialingController::NewL( *iDialer );
+        iDialerController->SetEasyDialingController( iEasyDialingController );
+        
+        // Create controller for DTMF mode of the dialer
+        iDtmfDialerController = CPhoneDtmfDialerController::NewL( iBubbleWrapper, 
+                                                                  *coeEnv );
         }
 
     User::LeaveIfError( iKeyLock.Connect() );
@@ -298,6 +310,10 @@
             }
         delete iDialerView;
         }
+		
+	delete iEasyDialingController;
+	delete iDtmfDialerController;
+		
     delete iDialer;
     if ( iSingleItemFetch )
         {
@@ -542,7 +558,7 @@
             {
             if ( iDialer )
                 {
-                iDialerController->UpdateToolbar();
+                iDialer->UpdateToolbar();
                 }
             }
             break;
@@ -745,8 +761,13 @@
             break;
 
         case EPhoneViewMenuPane:
-            iMenuController->SetReplaceFlag( IsReplaceAllowed() );
-            iMenuController->DynInitMenuPaneL( aCommandParam );
+            // First offer initialization to easydialing, and if no
+            // initialization done, give it to the menu controller.
+            if ( !iEasyDialingController->InitializeEasyDialingMenuL( aCommandParam ) )
+                {
+                iMenuController->SetReplaceFlag( IsReplaceAllowed() );
+                iMenuController->DynInitMenuPaneL( aCommandParam );
+                }
             break;
 
         case EPhoneViewMenuBar:
@@ -918,7 +939,7 @@
 
             if ( iDialer )
                 {
-                iDialerController->SetServiceCodeFlagL( aCommandParam );
+                iDialerController->SetServiceCodeFlag( aCommandParam );
                 }
             break;
 
@@ -1057,13 +1078,19 @@
                 {
                 TPhoneCmdParamBoolean* booleanParam =
                     static_cast<TPhoneCmdParamBoolean*>( aCommandParam );
-                iDialerController->SetDtmfDialerVisibleL(
-                                                booleanParam->Boolean() );
+                if ( booleanParam->Boolean() )
+                    {
+                    iDialer->SetControllerL( iDtmfDialerController );
+                    }
+                else
+                    {
+                    iDialer->SetControllerL( iDialerController );
+                    }
                  }
             break;
             }
 
-        case EPhoneViewSetRetrictedDialer:
+        case EPhoneViewSetRestrictedDialer:
             {
             if ( iDialer )
                 {
@@ -1106,10 +1133,12 @@
 
         case EPhoneViewShowCustomizedDialer:
             {
-            TPhoneCmdParamCustomDialer* customDialerParam =
-                static_cast<TPhoneCmdParamCustomDialer*>( aCommandParam );
-            iDialerController->ShowCustomizedDialerL(
-                                      customDialerParam->DialerController() );
+            if ( iDialer )
+                {
+                TPhoneCmdParamCustomDialer* customDialerParam =
+                    static_cast<TPhoneCmdParamCustomDialer*>( aCommandParam );
+                iDialer->SetControllerL( customDialerParam->DialerController() );
+                }
             }
             break;
         case EPhoneViewGetNumberFromEntry:
@@ -1148,6 +1177,21 @@
             iToolbarController->DimToolbar( booleanParam->Boolean());
             break;
             }
+            
+        case EPhoneViewSetInvalidCsPhoneNumberFlag:
+            iMenuController->SetInvalidCsPhoneNumberFlag( aCommandParam );
+            break;
+                
+        case EPhoneViewGetInvalidCsPhoneNumberFlag:
+            iMenuController->GetInvalidCsPhoneNumberFlag( aCommandParam );
+            break;
+
+        case EPhoneViewGetEasyDialingMenuId:
+        case EPhoneViewGetEasyDialingCbaId:
+                {
+                iEasyDialingController->ExecuteCommandL( aCmdId, aCommandParam );
+                }
+            break;
 
         default:
             __PHONELOG( EBasic, EPhonePhoneapp,
@@ -1372,7 +1416,11 @@
                     static_cast<TPhoneCmdParamTransEffect*>( aCommandParam )->Type();
                 TBool isForeground = iAppui->IsForeground();
 
-                if ( isForeground && // newer run effect if not at front
+                // Check whether the idle is on foreground
+                TBool idleInFore = ForegroundApplicationWindowGroupId() ==  IdleWindowGroupId() ?
+                        ETrue : EFalse;
+                
+                if ( isForeground && // Newer run effect if not at front
                      ( ( type == EPhoneTransEffectDialerCreate && !iDialerActive ) ||
                        ( type == EPhoneTransEffectDialerOpen && !iDialerActive &&
                          iBubbleWrapper->IsNumberEntryUsed() ) ||
@@ -1380,6 +1428,12 @@
                     {
                     HandleTransitionEffect( type );
                     }
+                // In case transition is from idle to dialer show transition effects as well.
+                else if ( idleInFore && !iDialerActive &&
+                          type == EPhoneTransEffectDialerCreate )
+                    {
+                    HandleTransitionEffect( type );
+                    }
                 }
             break;
             }
@@ -1408,8 +1462,7 @@
 
         case EPhoneViewSetNumberEntryObserver:
             {
-            NumberEntryChangedHandler()->SetNumberEntryChangedCallBack(
-                                                aCommandParam );
+            iBubbleWrapper->SetNumberEntryChangedCallBack( aCommandParam );
             break;
             }
         case EPhoneViewGetSingleItemFetchType:
@@ -1447,9 +1500,11 @@
             break;
 			
         case EPhoneViewEnableToolbarButton:
+            {
             TPhoneCmdParamInteger*  integerParam =
                 static_cast<TPhoneCmdParamInteger*>( aCommandParam );
             iToolbarController->SetToolbarButtonDimmed( integerParam->Integer(), EFalse );
+            }
             break;
 
         default:
@@ -1493,7 +1548,26 @@
                 }
              break;
 
-        case EPhoneViewIsNumberEntryNumericMode:
+         case EPhoneViewGetEasyDialingInFocusStatus:
+         case EEasyDialingVoiceCall:
+         case EEasyDialingVideoCall:
+         case EEasyDialingSendMessage:
+         case EEasyDialingOpenContact:
+         case EEasyDialingCallHandlingActivated:
+         case EEasyDialingEnterKeyAction:
+         case EEasyDialingOn:
+         case EEasyDialingOff:
+             if ( iDialer )
+                 {
+                 viewResponse = iEasyDialingController->HandleCommandL( aCmdId );
+                 }
+             else
+                 {
+                 viewResponse = EPhoneViewResponseFailed;
+                 }
+             break;
+
+         case EPhoneViewIsNumberEntryNumericMode:
             viewResponse = iBubbleWrapper->IsNENumericMode() ?
                 EPhoneViewResponseSuccess :
                 EPhoneViewResponseFailed;
@@ -1579,9 +1653,9 @@
         case EPhoneViewIsDTMFEditorVisible:
             if ( iDialer )
                 {
-                viewResponse = iDialerController->IsDTMFDialerVisible() ?
+                viewResponse = ( IsDtmfDialerActive() ?
                     EPhoneViewResponseSuccess :
-                    EPhoneViewResponseFailed;
+                    EPhoneViewResponseFailed );
                 }
             else // non-touch.
                 {
@@ -1631,13 +1705,13 @@
                     RemovePhoneDialogsL();
                     }
                 // Remove DTMF dialer when exist
-                if ( iDialerController->IsDTMFDialerVisible() )
+                if ( IsDtmfDialerActive() )
                     {
                     static_cast<MEikCommandObserver*>( CEikonEnv::Static()->EikAppUi() )
                     ->ProcessCommandL( EPhoneDtmfDialerExit );
                     }
                 else if ( iCustomization && 
-                          iDialerController->IsCustomizedDialerVisible() )
+                          IsCustomDialerActive() )
                     {
                     iCustomization->HandleCommandL( 
                        *this, EPhoneViewOpenCallHandling, NULL );
@@ -1683,7 +1757,7 @@
 
         case EPhoneIsCustomizedDialerVisible:
             {
-            viewResponse = iDialerController->IsCustomizedDialerVisible() ?
+            viewResponse = IsCustomDialerActive() ?
                 EPhoneViewResponseSuccess :
                 EPhoneViewResponseFailed;
             }
@@ -1691,8 +1765,11 @@
 
         case EPhoneViewHideCustomizedDialer:
             {
-            iDialerController->HideCustomizedDialer();
-            viewResponse = EPhoneViewResponseSuccess;
+            if ( iDialer )
+                {
+                iDialer->SetControllerL( iDialerController );
+                viewResponse = EPhoneViewResponseSuccess;
+                }
             }
             break;
         case EPhoneViewShowToolbar:
@@ -1841,19 +1918,19 @@
 
         case EPhoneViewGetCustomizedDialerMenuResourceId:
             {
-            TInt resId = iDialerController->CustomizedMenuResourceId();
+            TInt resId = iDialer->Controller()->MenuResourceId(); // easydialing change
             static_cast<TPhoneCmdParamInteger*>( aCommandParam )->SetInteger( resId );
             viewResponse = EPhoneViewResponseSuccess;
             }
             break;
         case EPhoneViewGetCustomizedDialerCbaResourceId:
             {
-            TInt resId = iDialerController->CustomizedCbaResourceId();
+            TInt resId = iDialer->Controller()->CbaResourceId(); // easydialing change
             static_cast<TPhoneCmdParamInteger*>( aCommandParam )->SetInteger( resId );
             viewResponse = EPhoneViewResponseSuccess;
             }
             break;
-
+            
         default:
             if ( iCustomization )
                 {
@@ -2029,18 +2106,13 @@
                         "CPhoneViewController::HandleResourceChangeL()" )
     // Notify the bubble that there has been a resource change
     iBubbleWrapper->Control()->HandleResourceChange( aType );
-
+    
     // Notify dialer and switch statuspane layout.
     if ( iDialer )
         {
         if ( aType == KEikDynamicLayoutVariantSwitch )
             {
             SwitchLayoutToFlatStatusPaneL( iDialerActive );
-            
-            if ( !iDialerActive && Layout_Meta_Data::IsLandscapeOrientation() )
-                {        
-                iDialerController->HideToolbar(); 
-                }
             }
         static_cast<CCoeControl*>(iDialer)->HandleResourceChange( aType );
         }
@@ -2064,10 +2136,10 @@
     __PHONELOG( EBasic, EPhoneUIView,"CPhoneViewController::HandleLayoutChange()" )
     iPhoneView->SetRect( aRect );
     if ( iDialerView )
-	    {
-		iDialerView->SetRect( aRect );
-		iStatusPane->UpdateTitlePane();
-	    }
+        {
+        iDialerView->SetRect( aRect );
+        iStatusPane->UpdateTitlePane();
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -2112,6 +2184,17 @@
     }
 
 // ---------------------------------------------------------------------------
+// CPhoneViewController::NumberEntryStateChanged
+// ---------------------------------------------------------------------------
+//
+void CPhoneViewController::NumberEntryStateChanged( TBool aEntryHasText )
+    {
+    iBubbleWrapper->HandleNumberEntryChanged();
+    iMenuController->SetNumberEntryEmptyFlag( !aEntryHasText );
+    ExecuteCommandL( EPhoneViewUpdateToolbar );
+    }
+
+// ---------------------------------------------------------------------------
 // CPhoneViewController::GetBlockingDialogIsDisplayed
 // ---------------------------------------------------------------------------
 //
@@ -2596,7 +2679,9 @@
     TInt resourceId = cbaResource->Integer();
 
     iCba->SetCommandSetL( resourceId );
+    
     iCba->DrawDeferred();
+    
     }
 
 // ---------------------------------------------------------------------------
@@ -3734,24 +3819,32 @@
         {
         iDialerActive = ETrue;
 
+        // Hide in-call view toolbar
+        iToolbarController->HideToolbar();
+
+        // Ensure that toolbar and menu commands are up-to-date 
+        TBuf<1> temp; // we are only interested if the text is empty or not
+        iDialer->GetTextFromNumberEntry( temp );
+        NumberEntryStateChanged( temp.Length() > 0 );
+        
         // Make dialer view top most
         iDialerView->DrawableWindow()->SetOrdinalPosition(
             iPhoneView->DrawableWindow()->OrdinalPosition() );
-        iDialerView->MakeVisible( ETrue );
-        iDialerView->DrawNow();
 
         SwitchLayoutToFlatStatusPaneL( ETrue );
 
         iPhoneView->DrawableWindow()->SetOrdinalPosition( -1 );
         iPhoneView->MakeVisible( EFalse );
 
-        iToolbarController->HideToolbar();
-        iDialerController->ShowToolbar();
-
         // Update control stack
         iAppui->AddToStackL( iDialerView );
-		iAppui->RemoveFromStack( iPhoneView );
-		}
+        iAppui->RemoveFromStack( iPhoneView );
+
+        // Don't make dialer view visible before status pane is updated.
+        // This prevents unnecessary resizings.
+        iDialerView->MakeVisible( ETrue );
+        iDialerView->DrawDeferred();
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -3763,34 +3856,36 @@
     __PHONELOG1( EBasic, EPhoneUIView,
         "CPhoneViewController::SetControltoCallHandlingL iDialerActive (%d)", iDialerActive );
 
+    // If securitymode or emergency call not show toolbar
+    if ( !iPhoneView->IsSecurityMode() && 
+     !iIncallIndicator->IsEmergencyCall() )
+     {
+         iToolbarController->ShowToolbar();
+     }
     if ( iDialerActive )
         {
         iDialerActive = EFalse;
-
+        // Hide dialer view. Do this before resizing status pane to prevent unnecessary
+        // resizing of dialer components. Hiding dialer view already before showing
+        // phone view might cause screen flickering but tests have proven it doesn't happen.
+        iDialerView->MakeVisible( EFalse );
+        
         SwitchLayoutToFlatStatusPaneL( EFalse );
 
-		// Make call handling view top most
-		iPhoneView->DrawableWindow()->SetOrdinalPosition(
+        // Make call handling view top most
+        iPhoneView->DrawableWindow()->SetOrdinalPosition(
             iDialerView->DrawableWindow()->OrdinalPosition() );
         iPhoneView->MakeVisible( ETrue );
         iPhoneView->DrawNow();
 
-		iDialerView->DrawableWindow()->SetOrdinalPosition( -1 );
-        iDialerView->MakeVisible( EFalse );
-
-        iDialerController->HideToolbar();
+        iDialerView->DrawableWindow()->SetOrdinalPosition( -1 );
 
         // Update control stack
-		iAppui->AddToStackL( iPhoneView );
-		iAppui->RemoveFromStack( iDialerView );
-		}
-    
-    // If securitymode or emergency call not show toolbar
-	if ( !iPhoneView->IsSecurityMode() && 
-	     !iIncallIndicator->IsEmergencyCall() )
-		{
-    	iToolbarController->ShowToolbar();
-		}
+        iAppui->AddToStackL( iPhoneView );
+        iAppui->RemoveFromStack( iDialerView );
+        
+        iEasyDialingController->HandleCommandL( EEasyDialingCallHandlingActivated );
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -3897,16 +3992,32 @@
     }
 
 // ---------------------------------------------------------------------------
-// CPhoneViewController::NumberEntryChangedHandler
+// CPhoneViewController::IsDtmfDialerActive
 // ---------------------------------------------------------------------------
 //
-MPhoneNumberEntryChangedHandler* CPhoneViewController::NumberEntryChangedHandler() const
+TBool CPhoneViewController::IsDtmfDialerActive() const
     {
-    if( iDialerController )
-        return iDialerController;
-    else
-        return iBubbleWrapper;
-
+    TBool ret = 
+            ( iDialer && iDtmfDialerController && 
+              iDialer->Controller() == iDtmfDialerController );
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// CPhoneViewController::IsCustomDialerActive
+// ---------------------------------------------------------------------------
+//
+TBool CPhoneViewController::IsCustomDialerActive() const
+    {
+    TBool ret = EFalse;
+    if ( iDialer )
+        {
+        MPhoneDialerController* curController = iDialer->Controller();
+        ret = ( curController && 
+                curController != iDialerController && 
+                curController != iDtmfDialerController );
+        }
+    return ret;
     }
 
 // End of File
--- a/phoneapp/phoneuivoipextension/group/phoneuivoipextension.mmp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuivoipextension/group/phoneuivoipextension.mmp	Fri Feb 19 22:50:26 2010 +0200
@@ -108,4 +108,7 @@
 LIBRARY         serviceselector.lib
 LIBRARY         vccuipropertyhandler.lib //For VCC Usage
 LIBRARY         ws32.lib
+LIBRARY         centralrepository.lib
+LIBRARY         phoneuiview.lib
+LIBRARY         aknskins.lib
 
--- a/phoneapp/phoneuivoipextension/inc/cphonecustomizationvoip.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuivoipextension/inc/cphonecustomizationvoip.h	Fri Feb 19 22:50:26 2010 +0200
@@ -20,7 +20,7 @@
 #define C_CPHONECUSTOMIZATIONVOIP_H
 
 // INCLUDES
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h> 
 #include <telmenuextension.h>
 #include <spdefinitions.h>
 #include "mphonecustomization.h"
@@ -207,6 +207,11 @@
         void GetVoipServiceNameL( TServiceId aServiceId, TDes& aServiceName ) const;
     	
         /**
+         * EasyDialing enabled check
+         */
+        TBool EasyDialingEnabled();
+
+        /**
     	* Modifies menu when there is active call.
     	* @param aResourceId Menu resource id.
     	* @param aMenuPane Menu pane
--- a/phoneapp/phoneuivoipextension/inc/cphonetransferdialercontroller.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuivoipextension/inc/cphonetransferdialercontroller.h	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -23,7 +23,7 @@
 
 // INCLUDES
 #include <aknbutton.h>
-#include "mphonedialercontroller.h"
+#include "cphonedialercontroller.h"
 
 // FORWARD DECLARATIONS
 class CAknToolbar; 
@@ -31,8 +31,7 @@
 /**
 *  VoIP unattended transfer dialer customization
 */
-NONSHARABLE_CLASS( CPhoneTransferDialerController ): public CBase,
-                                       public MPhoneDialerController
+NONSHARABLE_CLASS( CPhoneTransferDialerController ): public CPhoneDialerController
     {
     public:      
 
@@ -45,14 +44,6 @@
 
     public: // From MDialerController
     
-        
-        /**
-        * Initializes the controller. 
-        * @param    aToolbar    CAknToolbar instance.
-        * @since    S60 v5.1
-        */ 
-        void InitializeL( CAknToolbar& aToolbar );
-        
         /**
         * Returns Cba resource id
         * @return Resource Id of the softkeys
@@ -75,35 +66,28 @@
         const TDesC& NumberEntryPromptTextL();
         
         /**
-        * Handles the number entry empty event
-        * @param aEmpty ETrue if numberentry is empty
-        * @since S60 v5.1
-        */
-        void HandleNumberEntryIsEmpty( TBool aEmpty );
+         * @see MPhoneDialerController
+         */
+        TInt GetButtonData( TButtonIndex aIndex, RPointerArray<CButtonData>& aData ) const;
         
         /**
-        * Sets visibility of buttons created by the implementation
-        * @param aShow ETrue if numberentry is empty
-        * @since S60 v5.1
-        */
-        void ShowButtons( TBool aShow );
+         * @see MPhoneDialerController
+         */
+        TInt ButtonState( TButtonIndex aIndex ) const;
+        
+        /**
+         * @see MPhoneDialerController
+         */
+        TBool ButtonDimmed( TButtonIndex aIndex ) const;
+        
+        /**
+         * @see MPhoneDialerController
+         */
+        TBool EasyDialingAllowed() const;
         
     private:
     
         /**
-         * Creates instance of CAKnButton
-         * @param aNormalIconId Button normal icon id
-         * @param aNormalMaskId Mask id
-         * @param aTooltipText Reference to tooltip text
-         * @param aSkinIconId Skin icon id
-         * @return Pointer to created button instance
-         */
-        CAknButton* CreateButtonLC( TInt aNormalIconId,
-                                    TInt aNormalMaskId,
-                                    const TDesC& aTooltipText, 
-                                    const TAknsItemID& aSkinIconId ) const; 
-        
-        /**
          * Returns tool tip for specific command
          * @param aCommandId Command id which the tooltip text 
          * is needed
@@ -113,6 +97,10 @@
         
         TAknsItemID SkinId( TInt aIconIndex ) const;
 
+        CButtonData* CreateButtonDataL(
+                TInt aCommandId,
+                TInt aNormalIconId,
+                TInt aNormalMaskId ) const;
     protected:
 
         /**
@@ -122,17 +110,8 @@
             
     private: // Data
     
-        // Pointer to CAknToolbar, Not own
-        CAknToolbar* iToolbar;
-        
-        // ETrue if number entry input field is empty
-        TBool iNumberEntryIsEmpty;
-        
         // Number entry prompt text ("Address:")
         HBufC* iNumberEntryPromptText;
-        
-        // ETrue if initialized 
-        TBool iIsInitialized;
       
     };
 
--- a/phoneapp/phoneuivoipextension/src/cphonecustomizationvoip.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuivoipextension/src/cphonecustomizationvoip.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -28,6 +28,8 @@
 #include <phoneuivoip.rsg>
 #include <StringLoader.h>
 #include <featmgr.h>
+#include <centralrepository.h>
+#include <easydialingcrkeys.h>
 
 #include "cphonecustomizationvoip.h"
 #include "tphonecmdparaminteger.h"
@@ -207,7 +209,7 @@
             {
             case EPhoneDialerCmdTouchInput:
                 {
-                if ( !AllowAlphaNumericMode() )
+                if ( !VoIPSupportedL() )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] ); 
                     }
@@ -232,7 +234,7 @@
             case EPhoneInCallCmdNewCall:
                 {
                 if ( !FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) &&
-                     AllowAlphaNumericMode() &&
+                     VoIPSupportedL() &&
                      R_PHONEUI_NEW_CALL_MENU_VOIP != aResourceId )
                     {
                         
@@ -457,6 +459,11 @@
     
     TBool alphaModeSupported( EFalse );
     TRAP_IGNORE( alphaModeSupported = VoIPSupportedL() );
+
+    if ( !alphaModeSupported )
+        {
+        alphaModeSupported = EasyDialingEnabled();
+        }
     
     return alphaModeSupported;
     }
@@ -680,6 +687,30 @@
     return voipSupported;   
     }
 
+// -----------------------------------------------------------
+// CPhoneCustomizationVoip::EasyDialingEnabled
+// -----------------------------------------------------------
+//
+TBool CPhoneCustomizationVoip::EasyDialingEnabled()
+    {
+    __LOGMETHODSTARTEND( PhoneUIVoIPExtension,
+            "CPhoneCustomizationVoip::EasyDialingEnabled" );
+
+    TBool easyDialingEnabled( EFalse );
+    if ( FeatureManager::FeatureSupported( KFeatureIdProductIncludesHomeScreenEasyDialing ) )
+        {
+        TInt easyDialingSetting;
+        TInt err = CPhoneCenRepProxy::Instance()->GetInt(
+                KCRUidEasyDialSettings,
+                KEasyDialing,
+                easyDialingSetting);
+        if ( !err && easyDialingSetting )
+            {
+            easyDialingEnabled = ETrue;
+            }
+        }
+    return easyDialingEnabled;
+    }
 
 // -----------------------------------------------------------
 // CPhoneCustomizationVoip::ModifyInCallMenuL
@@ -776,11 +807,12 @@
 
     HBufC* phoneNumber = PhoneNumberFromEntryLC();
 
+    TInt index(KErrNotFound);
+
     if ( aResourceId == R_PHONEUI_NUMBERACQ_OPTIONS_CALL_MENU )
         {
         if ( !CPhoneKeys::Validate( phoneNumber->Des() ) )
-            {
-            TInt index(KErrNotFound);
+            {        
             if ( aMenuPane.MenuItemExists( EPhoneNumberAcqCmdCall, index ) )
                 {
                 aMenuPane.DeleteMenuItem( EPhoneNumberAcqCmdCall );
@@ -794,12 +826,12 @@
         
         aMenuPane.AddMenuItemL( voipMenuItem->iData );
         }
-    else if ( iStateMachine.PhoneEngineInfo()->PhoneNumberIsServiceCode() )
+    else if ( !aMenuPane.MenuItemExists( EPhoneNumberAcqCmdCall, index ) )
         {
-        // When user writes string recognized as service code (eg.*#31# -> clir off)
-        // call menu is not visible. Internet call must still be possible so 
-        // internet call option is added here to the menu.
-        
+        // Call menu is removed if user inserts anything that is not
+        // a valid cs number, so must add Internet call option here where
+        // we know that voip is however supported.
+    
         // If number entry is empty don't add internet call option 
         if ( phoneNumber->Length() )
             {
@@ -1089,7 +1121,16 @@
         if( array[i].iCallState == CTelMenuExtension::EOutgoing ||
             array[i].iCallState == CTelMenuExtension::EActive ||
             array[i].iCallState == CTelMenuExtension::EOnHold )
-            {
+            {              
+            if( aFeature == EFeatureTransfer &&
+                array[i].iCallState == CTelMenuExtension::EOutgoing &&
+                array[i].iCallType == CTelMenuExtension::EPsVoice  )
+                {
+                // If there is outgoing VoIP call then transfer is not supported
+                supported = EFalse;
+                break;
+                }
+            
             if( firstCallType == CTelMenuExtension::EUninitialized )
                 {
                 // Memorize first found call type
@@ -1380,7 +1421,7 @@
         "CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL" );
     
     // Menu items to be added
-    if ( iVccHandler && AllowAlphaNumericMode() &&
+    if ( iVccHandler && VoIPSupportedL() &&
         ( aResourceId == R_PHONEUI_CALLHANDLING_INCALL_OPTIONS_MENU ||
           aResourceId == R_PHONEUI_CALLWAITING_OPTIONS_MENU ||
           aResourceId == R_PHONEUI_ACTIVEANDHELDCALL_OPTIONS_MENU ||
--- a/phoneapp/phoneuivoipextension/src/cphonestateidlevoip.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuivoipextension/src/cphonestateidlevoip.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -151,7 +151,7 @@
     
     HBufC* phoneNumber = PhoneNumberFromEntryLC();
      
-    if ( !IsSimOk() || IsEmergencyNumber( *phoneNumber ) )
+    if ( !IsSimOk() || IsEmergencyNumber( *phoneNumber ) || IsDialingExtensionInFocusL() )
         {
         CPhoneIdle::HandleSendCommandL();         
         }  
--- a/phoneapp/phoneuivoipextension/src/cphonestatesinglevoip.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuivoipextension/src/cphonestatesinglevoip.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -40,6 +40,9 @@
 #include "cphonestateutilsvoip.h"
 #include "cphonestatemachinevoip.h"
 
+#include "easydialingcommands.hrh"
+
+
 // ================= MEMBER FUNCTIONS =======================
 
 // C++ default constructor can NOT contain any code, that
@@ -137,7 +140,15 @@
         	break;
      	
         case EPhoneNumberAcqCmdSendCommand:
-            StartCallingL();
+            // If easydialing has focus, call should be initiated to focused contact.
+            if ( IsDialingExtensionInFocusL() )
+                {
+                commandStatus = CPhoneSingleCall::HandleCommandL( aCommand );
+                }
+            else
+                {
+                StartCallingL();
+                }
             break;
          
         case EPhoneCmdAcceptUnattendedTransfer:
@@ -177,11 +188,19 @@
                  
             if( IsNumberEntryVisibleL() && neLength )
                 {
-                if ( IsOnScreenDialerSupported() &&  
-                     ( IsDTMFEditorVisibleL() ||
-                       IsCustomizedDialerVisibleL() ) )
+                if ( IsOnScreenDialerSupported() )
                     {
-                    return;
+                    if ( IsDTMFEditorVisibleL() || 
+                         IsCustomizedDialerVisibleL() )
+                        {
+                        return;
+                        }
+                    // If easydialing has focus, call should be initiated to focused contact.
+                    else if ( IsDialingExtensionInFocusL() )
+                        {
+                        CPhoneSingleCall::HandleKeyMessageL( aMessage, aKeyCode );
+                        return;
+                        }
                     }
                     
                 StartCallingL();
--- a/phoneapp/phoneuivoipextension/src/cphonetransferdialercontroller.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneapp/phoneuivoipextension/src/cphonetransferdialercontroller.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -19,8 +19,8 @@
 // INCLUDES
 #include <e32base.h>
 
-#include <akntoolbar.h>
 #include <AknsItemID.h>
+#include <AknsUtils.h>
 #include <StringLoader.h>
 
 #include <phoneui.mbg>
@@ -69,6 +69,7 @@
 // might leave.
 //  
 CPhoneTransferDialerController::CPhoneTransferDialerController()
+    : CPhoneDialerController( NULL, *CCoeEnv::Static() )
     {
     }
 
@@ -98,49 +99,6 @@
     }
 
 // -----------------------------------------------------------
-// CPhoneTransferDialerController::Initialize
-// -----------------------------------------------------------
-//
-void CPhoneTransferDialerController::InitializeL( CAknToolbar& aToolbar )
-    {  
-    __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
-        "CPhoneTransferDialerController::InitializeL()"); 
-    
-    if ( !iIsInitialized )
-        {    
-        __PHONELOG1( 
-                EAll, 
-                PhoneUIVoIPExtension, 
-                "Toolbar control count:=%d", 
-                aToolbar.CountComponentControls());
-        iToolbar = &aToolbar;
-        // Create transfer specific buttons and add them to the 
-        // toolbar starting from index 0
-        CAknButton* button( NULL );
-    
-        for( TInt i = 0; i < KButtonCount; i++ )
-            {
-            TAknsItemID skinId = SkinId( bArray[i].iIconIndex );
-            // Load tooltip text.
-            HBufC* tooltipText = GetTooltipTextL( bArray[i].iCommandId );  
-            CleanupStack::PushL( tooltipText );
-            button = CreateButtonLC(
-                    bArray[i].iIconIndex, 
-                    bArray[i].iMaskIndex, 
-                    *tooltipText, 
-                    skinId );
-            // Toolbar takes ownership of the button                    
-            iToolbar->AddItemL( button, EAknCtButton, bArray[i].iCommandId, 0, i );
-            CleanupStack::Pop( button );
-            CleanupStack::PopAndDestroy( tooltipText );
-            }      
-        iIsInitialized = ETrue;
-        }
-   
-    iNumberEntryIsEmpty = ETrue;
-    }
-
-// -----------------------------------------------------------
 // CPhoneTransferDialerController::CbaResourceId
 // -----------------------------------------------------------
 //
@@ -155,7 +113,7 @@
 //
 TInt CPhoneTransferDialerController::MenuResourceId() const
     {
-    if ( iNumberEntryIsEmpty )
+    if ( !iNumberAvailable )
         {
         return EPhoneVoIPTransferDialerNumberEntryEmptyMenubar;
         }
@@ -177,84 +135,138 @@
         {
         iNumberEntryPromptText = StringLoader::LoadL( 
             CPhoneMainResourceResolver::Instance()->
-            ResolveResourceID( EPhoneVoIPTransferAddress ) );
+            ResolveResourceID( EPhoneVoIPTransferAddress ), &iCoeEnv );
         }  
     
     return *iNumberEntryPromptText;
     }
 
-// -----------------------------------------------------------
-// CPhoneTransferDialerController::HandleNumberEntryIsEmpty
-// -----------------------------------------------------------
+// ---------------------------------------------------------------------------
+// GetButtonData
+// ---------------------------------------------------------------------------
 //
-void CPhoneTransferDialerController::HandleNumberEntryIsEmpty( TBool aIsEmpty )
+TInt CPhoneTransferDialerController::GetButtonData( TButtonIndex aIndex, RPointerArray<CButtonData>& aData ) const
     {
-    __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
-        "CPhoneTransferDialerController::HandleNumberEntryIsEmpty()");
-    __ASSERT_DEBUG( iToolbar, Panic( EPhoneCtrlInvariant ) );
-    iToolbar->SetItemDimmed( EPhoneCmdTransferDialerOk, aIsEmpty, EFalse );
-    iToolbar->SetItemDimmed( EPhoneCmdTransferDialerSearch, !aIsEmpty, EFalse );
-    iToolbar->SetItemDimmed( EPhoneDialerCmdClear, aIsEmpty, EFalse );
-    iNumberEntryIsEmpty = aIsEmpty;
+    TInt err = KErrNone;
+    
+    TInt arrayIdx = KErrNotFound;
+    if ( aIndex == ECallButton )
+        {
+        arrayIdx = 0;
+        }
+    else if ( aIndex == EPhonebookButton )
+        {
+        arrayIdx = 1;
+        }
+    
+    if ( arrayIdx >= 0 )
+        {
+        const TPhoneDialerToolbarButton& arrItem = bArray[ arrayIdx ];
+        CButtonData* btn = NULL;
+        TRAP( err, btn = CreateButtonDataL( arrItem.iCommandId, 
+                                            arrItem.iIconIndex, 
+                                            arrItem.iMaskIndex ) );
+        if ( !err )
+            {
+            err = aData.Append( btn );
+            if ( err )
+                {
+                delete btn;
+                }
+            }
+        }
+    else
+        {
+        // Trust base class on other buttons (i.e. the clear button)
+        err = CPhoneDialerController::GetButtonData( aIndex, aData );
+        }
+    
+    return err;
     }
 
-// -----------------------------------------------------------
-// CPhoneTransferDialerController::ShowButtons
-// -----------------------------------------------------------
+// ---------------------------------------------------------------------------
+// ButtonState
+// ---------------------------------------------------------------------------
 //
-void CPhoneTransferDialerController::ShowButtons( TBool aShow )
+TInt CPhoneTransferDialerController::ButtonState( TButtonIndex aIndex ) const
     {
-    __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
-        "CPhoneTransferDialerController::ShowButtons()");
-    __ASSERT_DEBUG( iToolbar, Panic( EPhoneCtrlInvariant ) );
-    for( TInt i = 0; i < KButtonCount; i++ )
+    // Out button have only one state. Trust base class on clear button
+    if ( aIndex == ECallButton || aIndex == EPhonebookButton )
         {
-        iToolbar->HideItem( bArray[ i ].iCommandId, !aShow, EFalse );
-        }    
-    
-    if ( aShow )
+        return 0;
+        }
+    else
         {
-        iToolbar->SetItemDimmed( EPhoneCmdTransferDialerOk, ETrue, EFalse ); 
-        iToolbar->SetItemDimmed( EPhoneCmdTransferDialerSearch, EFalse, EFalse ); 
-        iToolbar->SetItemDimmed( EPhoneDialerCmdClear, ETrue, EFalse ); 
+        return CPhoneDialerController::ButtonState( aIndex );
         }
-    
-    iToolbar->DrawDeferred();
     }
 
 // ---------------------------------------------------------------------------
-// PhoneTransferDialerController::CreateButtonLC
+// ButtonDimmed
 // ---------------------------------------------------------------------------
 //
-CAknButton* CPhoneTransferDialerController::CreateButtonLC( 
-    TInt aNormalIconId,
-    TInt aNormalMaskId,
-    const TDesC& aTooltipText,
-    const TAknsItemID& aSkinIconId ) const
-    {   
+TBool CPhoneTransferDialerController::ButtonDimmed( TButtonIndex aIndex ) const
+    {
+    TBool dimmed = EFalse;
+    
+    // Ok is dimmed when there's no number. Search is dimmed when there is
+    // a number. Trust base class on clear button.
+    if ( aIndex == ECallButton )
+        {
+        dimmed = !iNumberAvailable;
+        }
+    else if ( aIndex == EPhonebookButton )
+        {
+        dimmed = iNumberAvailable;
+        }
+    else
+        {
+        dimmed = CPhoneDialerController::ButtonDimmed( aIndex );
+        }
+    return dimmed;
+    }
+
+// ---------------------------------------------------------------------------
+// EasyDialingAllowed
+// ---------------------------------------------------------------------------
+//
+TBool CPhoneTransferDialerController::EasyDialingAllowed() const
+    {
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// PhoneTransferDialerController::CreateButtonDataL
+// ---------------------------------------------------------------------------
+//
+MPhoneDialerController::CButtonData* CPhoneTransferDialerController::CreateButtonDataL(
+        TInt aCommandId,
+        TInt aNormalIconId,
+        TInt aNormalMaskId ) const
+    {
     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
-        "CPhoneTransferDialerController::CreateButtonLC()");
+            "CPhoneTransferDialerController::CreateButtonDataL()");
+    
+    // Load tooltip text.
+    HBufC* tooltipText = GetTooltipTextL( aCommandId );
+    CleanupStack::PushL( tooltipText );
+    
+    // Load icon
     TFileName mifPath( KDriveZ );
     mifPath.Append( KDC_APP_BITMAP_DIR );
     mifPath.Append( KPhoneMifFileName );
-
-    CAknButton* button = CAknButton::NewLC( 
-        mifPath,
-        aNormalIconId,
-        aNormalMaskId,
-        -1, -1, // dimmed
-        -1, -1, // pressed
-        -1, -1, // hover
-        KNullDesC,
-        aTooltipText, // help
-        0, // flags
-        0, // state flags
-        aSkinIconId );
-                                                                 
-    button->SetFocusing( EFalse );
-    button->SetBackground( iToolbar );
-
-    return button;
+    
+    TAknsItemID skinId = SkinId( aNormalIconId );
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    CGulIcon* icon = AknsUtils::CreateGulIconL( skin, skinId, mifPath, 
+                aNormalIconId, aNormalMaskId );
+    CleanupStack::PushL( icon );
+    
+    CButtonData* btnData = new (ELeave) CButtonData( aCommandId, icon, tooltipText );
+    CleanupStack::Pop( icon );
+    CleanupStack::Pop( tooltipText );
+    
+    return btnData;
     }
 
 // ---------------------------------------------------------------------------
@@ -278,13 +290,16 @@
             resourceId = R_VOIP_DIALER_TOOLTIP_SEARCH;
             break;                      
        default:
-           tooltip = KNullDesC().Alloc();
            break;
        }
            
     if ( resourceId )
         {
-        tooltip = StringLoader::LoadL( resourceId, CCoeEnv::Static() );
+        tooltip = StringLoader::LoadL( resourceId, &iCoeEnv );
+        }
+    else
+        {
+        tooltip = KNullDesC().AllocL();
         }
     return tooltip;
     }
--- a/phoneengine/PhoneCntFinder/ContactService/inc/cphcntcontactdataselection.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/PhoneCntFinder/ContactService/inc/cphcntcontactdataselection.h	Fri Feb 19 22:50:26 2010 +0200
@@ -20,7 +20,7 @@
 #define CPHCNTCONTACTDATASELECTION_H
 
 #include <e32base.h>
-#include "MPhCntMatch.h"
+#include "mphcntmatch.h"
 
 NONSHARABLE_CLASS( CPhCntSelectedData ) : public CBase
     {
--- a/phoneengine/PhoneCntFinder/ContactService/src/CPhCntService.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/PhoneCntFinder/ContactService/src/CPhCntService.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -82,8 +82,8 @@
 	
 	
 	iCriteriaArray.AppendL( assignCriteria  );
+	CleanupStack::Pop( assignCriteria );
 	iAiwService->AttachL( iCriteriaArray ); 
-	CleanupStack::Pop( assignCriteria );
 	}
 
         
--- a/phoneengine/PhoneCntFinder/inc/Misc/MPhCntThumbnailLoaderObserver.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/PhoneCntFinder/inc/Misc/MPhCntThumbnailLoaderObserver.h	Fri Feb 19 22:50:26 2010 +0200
@@ -21,7 +21,7 @@
 
 // INCLUDES
 #include    <e32base.h>
-#include    "CPhCntThumbnailLoader.h"
+#include    "cphcntthumbnailloader.h"
 
 // FORWARD DECLARATIONS
 class CFbsBitmap;
--- a/phoneengine/PhoneCntFinder/src/CPhoneCntFactoryImpl.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/PhoneCntFinder/src/CPhoneCntFactoryImpl.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -45,7 +45,7 @@
 #include    "cphcntstoreloaderimpl.h"
 
 #include    <coemain.h>     // CONE
-#include    <SecUi.h>       // For TSecUi
+#include    <secui.h>       // For TSecUi
 #include    <featmgr.h>     // Feature Manager
 #include    <talogger.h>
 
--- a/phoneengine/callhandling/bwins/callhandlingu.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/callhandling/bwins/callhandlingu.def	Fri Feb 19 22:50:26 2010 +0200
@@ -76,4 +76,5 @@
 	?ForwardCallToAddress@CPECallHandling@@UAEHH@Z @ 75 NONAME ; int CPECallHandling::ForwardCallToAddress(int)
 	??1CPEDtmfHandling@@UAE@XZ @ 76 NONAME ; CPEDtmfHandling::~CPEDtmfHandling(void)
 	?CallCapsChanged@CPEConferenceCall@@UAEXW4TCCEConferenceCallCaps@MCCEConferenceCallObserver@@@Z @ 77 NONAME ; void CPEConferenceCall::CallCapsChanged(enum MCCEConferenceCallObserver::TCCEConferenceCallCaps)
+	?ReleaseConference@CPECallHandling@@UAEHXZ @ 78 NONAME ; int CPECallHandling::ReleaseConference(void)
 
--- a/phoneengine/callhandling/eabi/callhandlingu.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/callhandling/eabi/callhandlingu.def	Fri Feb 19 22:50:26 2010 +0200
@@ -165,4 +165,6 @@
 	_ZThn8_NK15CPECallHandling16GetCallIdByStateEj @ 164 NONAME
 	_ZThn8_NK15CPECallHandling28GetCallTerminatedDiagnosticsER4TBufILi128EE @ 165 NONAME
 	_ZThn8_NK15CPECallHandling9CallOwnerEv @ 166 NONAME
+	_ZN15CPECallHandling17ReleaseConferenceEv @ 167 NONAME
+	_ZThn8_N15CPECallHandling17ReleaseConferenceEv @ 168 NONAME
 
--- a/phoneengine/callhandling/inc/cpecallhandling.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/callhandling/inc/cpecallhandling.h	Fri Feb 19 22:50:26 2010 +0200
@@ -432,6 +432,13 @@
         * @return Error (KErrNone is success).
         */
         IMPORT_C TInt ForwardCallToAddress( TInt aIndex );
+        
+        /**
+        * Makes HangUp requests for conference call. 
+        * @return Error (ECCPErrorNotFound if there is not a conference call 
+        * 
+        */
+        IMPORT_C TInt ReleaseConference();
 
     public: // From MPECallHandling - DTMF related
         /**
--- a/phoneengine/callhandling/inc/mpecallhandling.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/callhandling/inc/mpecallhandling.h	Fri Feb 19 22:50:26 2010 +0200
@@ -317,6 +317,14 @@
         * @return Error (KErrNone is success).
         */ 
         virtual TInt ForwardCallToAddress( TInt aIndex ) = 0;
+				        
+        /**
+        * Put all the calls to idle and make an request to 
+        * end the connection 
+        * @return KErrNotFound if there is not a call 
+        *         KErrNone if there is one call at least
+        */
+        virtual TInt ReleaseConference() = 0;
         
     public: // DTMF related
         /**
--- a/phoneengine/callhandling/src/cpecallhandling.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/callhandling/src/cpecallhandling.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -833,10 +833,7 @@
 
     else if ( CallIdCheck::IsConference( aCallId ) )
         {
-        if( iConferenceCall )
-            {
-            errorCode = iConferenceCall->HangUp();
-            }
+        ReleaseConference();
         }
     return errorCode;
     }
@@ -855,12 +852,7 @@
     
     RejectCall(); // Rejects ringing call if one exists.
 
-    if ( iConferenceCall )
-        {
-        TEFLOGSTRING( KTAMESOUT, 
-            "CALL CPECallHandling::TerminateAllConnections: Hanging Up conference call" );
-        iConferenceCall->HangUp();
-        }
+    ReleaseConference(); // Release conference call if exists
             
     // Hangup normal Voice Calls
     for( TInt callId = 0; callId < KPEMaximumNumberOfVoiceCalls; callId++ )
@@ -1916,6 +1908,7 @@
     SendMessage( MEngineMonitor::EPEMessageInitiatedEmergencyCall );
     TEFLOGSTRING( KTAINT, "CALL CPECallHandling::DialEmergencyCall start emergency dialing" );
     CPESingleCall* callData = iCallArrayOwner->GetCallObject( KPEEmergencyCallId );
+    // coverity[dereference]
     callData->DialEmergency( aEmergencyNumber );   
     }
 
@@ -2466,6 +2459,20 @@
         }        
     }
         
-
+// -----------------------------------------------------------------------------
+// CPECallHandling::ReleaseConference
+// Release conference call
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CPECallHandling::ReleaseConference()
+    {
+    TInt errorCode( ECCPErrorNotFound );
+    
+    if ( iConferenceCall )
+        {            
+        errorCode = iConferenceCall->HangUp();
+        }
+    return errorCode;
+    }
 
 //  End of File 
--- a/phoneengine/loghandling/inc/cpelogevent.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/loghandling/inc/cpelogevent.h	Fri Feb 19 22:50:26 2010 +0200
@@ -103,7 +103,7 @@
 
         /**
         * Update log info for the log event
-        * @param TPELogInfo& alogInfo, log information
+        * @param CPELogInfo& alogInfo, log information
         * @return None.
         */
         void UpdateLogInfoL( const CPELogInfo& aLogInfo );
@@ -237,6 +237,13 @@
          */
         void SetRemoteContact( CLogEvent& aEvent, const CPELogInfo& aLogInfo );
         
+        /**
+         * Removes from event data the given tag and data attached to it.
+         * @since    S60 v5.1
+         * @param    aTag          Tag to be removed
+         */
+        void RemoveTagFromDataFieldL( const TDesC8& aTag );
+        
     private:    // Data
         // Owner of the object.
         CPELogHandling& iOwner;
--- a/phoneengine/loghandling/inc/cpeloghandling.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/loghandling/inc/cpeloghandling.h	Fri Feb 19 22:50:26 2010 +0200
@@ -254,6 +254,15 @@
         CPELogExtensionWrapper* CreateExtensionWrapperLC( 
             const TUid& aPluginUid ) const;
         
+        /**
+         * Checks if string is valid number for CS call.
+         * @since   S60 v5.1
+         * @param   aString A string to be checked.
+         * @return  ETrue if valid phone number.
+         */
+        TBool IsValidPhoneNumber( 
+            const TDesC& aString ) const;
+        
     private: // data 
         // Reference to MPEPhoneModelInternal, also object owner
         MPEPhoneModelInternal&  iModel;
--- a/phoneengine/loghandling/src/cpelogevent.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/loghandling/src/cpelogevent.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -673,6 +673,16 @@
     if ( KNullDesC() != aLogInfo.PhoneNumber() )
         {
         aEvent.SetNumber( aLogInfo.PhoneNumber() );
+       
+        if ( CPELogInfo::EPEVoIPEvent == aLogInfo.EventType() )
+            {
+            TRAPD( error, RemoveTagFromDataFieldL( KLogsDataFldTag_URL ) );
+            if( error )
+                {
+                TEFLOGSTRING2( KTAERROR, 
+                    "LOG CPELogEvent::SetRemoteContact()>RemoveTagFromDataFieldL(), error=%d", error )
+                }
+            }
         }
     
     if ( KNullDesC() != aLogInfo.VoipAddress() )
@@ -681,8 +691,40 @@
         if ( error )
             {
             TEFLOGSTRING2( KTAERROR, 
-                "LOG CPELogEvent::SetLogEvent()>SetDataFieldL(), error=%d", error )
+                "LOG CPELogEvent::SetRemoteContact()>SetDataFieldL(), error=%d", error )
             }
+        aEvent.SetNumber( KNullDesC() );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CPELogEvent::RemoveTagFromDataFieldL
+// -----------------------------------------------------------------------------
+//
+void CPELogEvent::RemoveTagFromDataFieldL( const TDesC8& aTag )
+    {
+    __ASSERT_ALWAYS( aTag.Length() != 0 ,
+        User::Leave( KErrArgument ) );
+
+    TInt index = iEvent->Data().Find( aTag );
+    if ( KErrNotFound != index  )
+        {
+        HBufC8* eventData = iEvent->Data().AllocLC();
+        TPtrC8 urlData = eventData->Mid( index );
+        TInt otherTag = urlData.Find( KLogsDataFldNameDelimiter );
+       
+        const TInt dlLen = KLogsDataFldNameDelimiter().Length();
+        if ( KErrNotFound == otherTag )
+            {
+            eventData->Des().Delete( index - dlLen, urlData.Length() + dlLen );
+            }
+        else
+            {
+            eventData->Des().Delete( index - dlLen, otherTag );
+            }
+        iEvent->SetDataL( *eventData );
+
+        CleanupStack::PopAndDestroy( eventData );
         }
     }
 
--- a/phoneengine/loghandling/src/cpeloghandling.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/loghandling/src/cpeloghandling.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -394,13 +394,16 @@
     
     if ( EPECallTypeVoIP == iDataStore.CallType( aCallId ) )
         {
-        // voip address field must be used for voip calls
-        aLogInfo.SetVoipAddress( aLogInfo.PhoneNumber() );
-        aLogInfo.SetPhoneNumber( KNullDesC() );
+        if ( EFalse == IsValidPhoneNumber( aLogInfo.PhoneNumber() ) )
+            {
+            // voip address field must be used for voip calls if
+            // string is not valid for CS call.
+            aLogInfo.SetVoipAddress( aLogInfo.PhoneNumber() );
+            aLogInfo.SetPhoneNumber( KNullDesC() );
+            }
         }
     }
 
-
 // -----------------------------------------------------------------------------
 // CPELogHandling::SaveCallInfoL
 // Update log external data.
@@ -841,4 +844,23 @@
     return CPELogExtensionWrapper::NewLC( aPluginUid );
     }
 
+// -----------------------------------------------------------------------------
+// CPELogHandling::IsValidPhoneNumber
+// -----------------------------------------------------------------------------
+//
+TBool CPELogHandling::IsValidPhoneNumber( 
+        const TDesC& aString ) const
+    {
+    _LIT( KAllowedCharsInPhoneNumber, "0123456789*+pw#PW" );
+    
+    TLex input( aString );
+    TPtrC validChars( KAllowedCharsInPhoneNumber );
+    while ( validChars.Locate( input.Peek() ) != KErrNotFound )
+        {
+        input.Inc();
+        }
+    
+    return ( !input.Remainder().Length() );
+    }
+
 // End of File
--- a/phoneengine/phonemodel/inc/cpemessagehandler.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/inc/cpemessagehandler.h	Fri Feb 19 22:50:26 2010 +0200
@@ -167,7 +167,13 @@
         * @return Return possible error code.
         */
         TInt HandleReleaseCall( TPEHangUpOptions aAutoResumeOption = ETPEHangUpDefault );
-
+        
+		/**
+        * Handles release message from application 
+        * @return Return possible error code.
+        */
+        TInt HandleReleaseConference();
+        
         /**
         * Handles send dtmf message from phone application 
         * @return possible error code from the CallHandling subsystem.
@@ -566,11 +572,6 @@
         TInt HandleReplaceActive();
         
         /**
-        * Check if phone is locked, if locked leave with ECCPErrorAuthenticationFailed error.
-        */
-        void CheckIfPhoneIsLockedL();
-        
-        /**
          * Handles unattended transfer request response.
          * @param    aAcceptRequest     ETrue to accept, EFalse to reject request.
          */
--- a/phoneengine/phonemodel/src/cpeclientcommandhandlermonitor.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/src/cpeclientcommandhandlermonitor.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -442,10 +442,10 @@
     TEFLOGSTRING2( KTAINT, "CPEClientCommandHandlerMonitor::HangUp aState=%d", aState); 
     TInt ret( ECCPErrorNotFound ); 
   
-    TPEState conferenceState = iCallHandling.GetCallState( KPEConferenceCallID ); 
+    TPEState conferenceState = iModel.DataStore()->ConferenceCallState();
     if ( conferenceState == aState ) 
         { 
-        ret = iCallHandling.HangUp( KPEConferenceCallID, ETPEHangUpDefault ); 
+        ret = iCallHandling.ReleaseConference(); 
         } 
     else 
         { 
--- a/phoneengine/phonemodel/src/cpeexternaldatahandler.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/src/cpeexternaldatahandler.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -26,7 +26,7 @@
 #include <ctsydomainpskeys.h>
 #include <mpedatastore.h>
 #include <pepanic.pan>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
 #include <talogger.h>
 #include <telephonyvariant.hrh>
 #include <telinternalcrkeys.h>
--- a/phoneengine/phonemodel/src/cpemessagehandler.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/src/cpemessagehandler.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -76,9 +76,9 @@
 // None.
 
 // CONSTANTS
-// Prefix change off. See SettingsInternalCRKeys.h
+// Prefix change off. See settingsinternalcrkeys.h
 const TInt KPEPrefixChangeOff = 0;
-// Prefix change on. See SettingsInternalCRKeys.h
+// Prefix change on. See settingsinternalcrkeys.h
 const TInt KPEPrefixChangeOn = 1;
 // International prefix
 _LIT( KPEIntPrefix, "+" );
@@ -403,6 +403,19 @@
     }
 
 // -----------------------------------------------------------------------------
+// CPEMessageHandler::HandleReleaseConference
+// Handles release message from phone application
+// Method calls HangUp method from the CallHandling subsystem.
+// -----------------------------------------------------------------------------
+//
+TInt CPEMessageHandler::HandleReleaseConference()
+    {
+    
+    return iCallHandling.ReleaseConference(); 
+ 
+    }
+
+// -----------------------------------------------------------------------------
 // CPEMessageHandler::HandleSendDtmf
 // Handles send dtmf message from phone application
 // Method fetches dtmf string from the CPEEngineInfo class and then
@@ -2838,26 +2851,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CPEMessageHandler::CheckIfPhoneIsLockedL
-// -----------------------------------------------------------------------------
-//
-void CPEMessageHandler::CheckIfPhoneIsLockedL()
-    {
-    // Check if phone is locked
-    TInt  keyLockStatus( EAutolockStatusUninitialized );
-    TInt err = RProperty::Get( KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus, keyLockStatus );
-    const TBool phoneIsLocked = ( keyLockStatus > EAutolockOff );
-
-    if ( phoneIsLocked && err == KErrNone )
-        {
-        // New call is not possible if device lock is on 
-        TEFLOGSTRING2( KTAERROR,
-            "PE CPEMessageHandler::CheckIfPhoneIsLockedL, keyLockStatus : %d", keyLockStatus );
-        User::Leave( ECCPErrorAuthenticationFailed );
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // CPEMessageHandler::IsActiveVideo
 // Checks if there are any connected video calls
 // -----------------------------------------------------------------------------
@@ -2896,7 +2889,7 @@
     
     if ( iDataStore.RemoteColpNumber( aCallId ).Length() )
         {
-        iModel.SendMessage( MEngineMonitor::EPEMessageColpNumberAvailable );
+        iModel.SendMessage( MEngineMonitor::EPEMessageColpNumberAvailable, aCallId );
         }
     }
 
--- a/phoneengine/phonemodel/src/cpeparserphonenumberhandler.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/src/cpeparserphonenumberhandler.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -69,9 +69,6 @@
         &aNumber, 
         &aDtmfPostfix );
     
-    // Check if phone is locked
-    iOwner.CheckIfPhoneIsLockedL();
-    
     if ( aNumber.Length() == 0 )
         {
         User::Leave( ECCPErrorInvalidPhoneNumber );
--- a/phoneengine/phonemodel/src/cpeparsersimcontrolhandler.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/src/cpeparsersimcontrolhandler.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -22,8 +22,8 @@
 #include <mpecontacthandling.h>
 #include <mpedatastore.h>
 #include <pepanic.pan>
-#include <SecUi.h>
-#include <SecUiManualSecuritySettings.h>
+#include <secui.h>
+#include <secuimanualsecuritysettings.h>
 #include <talogger.h>
 
 
--- a/phoneengine/phonemodel/src/cpeparservoipnumberhandler.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/src/cpeparservoipnumberhandler.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -98,9 +98,6 @@
           &aDtmfPostfix );
 
     TPEPhoneNumber phoneNumber;
-    
-    // Check if phone is locked
-    iOwner.CheckIfPhoneIsLockedL();
   
     if ( aNumber.Length() == 0 )
         {
--- a/phoneengine/phonemodel/src/cpepcnparserprocedurehandler.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/src/cpepcnparserprocedurehandler.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -20,8 +20,8 @@
 #include "cpepcnparserprocedurehandler.h"
 #include "mpephonemodelinternal.h"
 #include <mpedatastore.h>
-#include <SecUi.h>
-#include <SecUiManualSecuritySettings.h>
+#include <secui.h>
+#include <secuimanualsecuritysettings.h>
 #include <talogger.h>
 
 
--- a/phoneengine/phonemodel/src/cpephonemodel.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneengine/phonemodel/src/cpephonemodel.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -478,7 +478,9 @@
         case MEngineMonitor::EPEMessageRemotePartyInfoChanged:
             return MESSAGE("EPEMessageRemotePartyInfoChanged");
         case MEngineMonitor::EPEMessageConnectingWithInband:
-            return MESSAGE("EPEMessageConnectingWithInband");
+            return MESSAGE("EPEMessageConnectingWithInband");            
+        case MEngineMonitor::EPEMessageColpNumberAvailable:
+            return MESSAGE("EPEMessageColpNumberAvailable");
 
         // Contact messages                   3000 - 3999
         case MEngineMonitor::EPEMessageThumbnailLoadingCompleted:
@@ -716,8 +718,10 @@
             errorCode = iMessageHandler->HandleReleaseAll( );            
             break;
         case MPEPhoneModel::EPEMessageRelease:     //Make HangUp request
+            errorCode = iMessageHandler->HandleReleaseCall( );
+            break;
         case CPEPhoneModelIF::EPEMessageHangUpConference:
-            errorCode = iMessageHandler->HandleReleaseCall( );            
+            errorCode = iMessageHandler->HandleReleaseConference();
             break;
         case MPEPhoneModel::EPEMessageAnswer:                        //Make Answer request
             errorCode = iMessageHandler->HandleAnswerCall( EFalse );
--- a/phonesettings/pslncallimageplugin/Data/PslnCallImagePluginRsc.rss	Tue Feb 02 00:10:04 2010 +0200
+++ b/phonesettings/pslncallimageplugin/Data/PslnCallImagePluginRsc.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -102,11 +102,13 @@
             {
             command = EPslnCmdAppActivate;
             txt = qtn_skins_option_activate;
+            flags = EEikMenuItemAction;
             },
         MENU_ITEM 
             {
             command = EPslnCmdAppDownload;
             txt = qtn_options_change;
+            flags = EEikMenuItemAction;
             },
 #ifdef __SERIES60_HELP
         MENU_ITEM 
--- a/phonesettings/pslncallimageplugin/src/PslnCallImagePlugin.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phonesettings/pslncallimageplugin/src/PslnCallImagePlugin.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -41,13 +41,13 @@
 // Psln Framework specific.
 #include <pslnfwviewuids.h>
 #include <psln.hrh>
-#include <pslncommon.rsg>
+#include <PslnCommon.rsg>
 
 // General services
 #include <MGFetch.h>
 
 // Resources
-#include <psln.rsg>
+#include <Psln.rsg>
 
 // Logging
 #include "PslnCallImagePluginLogger.h"
--- a/phonesettings/pslncallimageplugin/src/PslnCallImagePluginDRM.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phonesettings/pslncallimageplugin/src/PslnCallImagePluginDRM.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -22,7 +22,7 @@
 #include    <DRMHelper.h>
 #include    <coemain.h>
 #include    <aknnotewrappers.h>
-#include    <psln.rsg>
+#include    <Psln.rsg>
 #include    <drmutility.h>
 
 // Logging
--- a/phoneuis/BubbleManager/Inc/BMTouchPaneButton.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/Inc/BMTouchPaneButton.h	Fri Feb 19 22:50:26 2010 +0200
@@ -182,6 +182,11 @@
          */
         void GetTextColors( TRgb& aPenColor ) const; 
         
+        /**
+         * Selects the correct text color.
+         */
+        void SelectTextColor(); 
+        
     private: // data
         /**
          * Array of the button commands.
--- a/phoneuis/BubbleManager/Src/BMBubbleManager.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/Src/BMBubbleManager.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -992,7 +992,7 @@
     TBool calledBegin = (TBool) CAknTransitionUtils::GetData( ( TInt ) this );
     // Only draw parent control if no number entry exists, the number entry is
     // used or if begin has not been called.
-    if ( !iNumberEntry || iNumberEntry->IsUsed() || !calledBegin )
+    if ( iNumberEntry->IsUsed() || !calledBegin )
         {
         // Do redraw. Do not use DrawDeferred() here!
         iParentControl->DrawNow();
--- a/phoneuis/BubbleManager/Src/BMBubbleOutlookFiveLined.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/Src/BMBubbleOutlookFiveLined.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -166,7 +166,7 @@
 TInt CBubbleOutlookFiveLined::CountComponentControls() const
     {
     TInt amount = 0;
-
+    
     if ( iNumberType ) 
         {
         amount++;
@@ -238,9 +238,8 @@
 //
 CCoeControl* CBubbleOutlookFiveLined::ComponentControl(TInt aIndex) const
     {
-  
     TInt amount = -1;
-
+    // coverity[var_compare_op]
     if ( iNumberType )
         {
         amount++;
@@ -248,6 +247,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iNumberType->Control();
         }
 
@@ -328,6 +328,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iSmallCallIndication->Control();
         }
 
@@ -358,6 +359,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iBigCallIndicator->Control();
         }
 
--- a/phoneuis/BubbleManager/Src/BMBubbleOutlookNE.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/Src/BMBubbleOutlookNE.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -41,7 +41,7 @@
 
 //for resources
 #include    <barsread.h>
-#include    <Bubblemanager.rsg>
+#include    <BubbleManager.rsg>
 
 // CONSTANTS
 const TUint8 KBubbleNE1LongLineFormat = 0;
--- a/phoneuis/BubbleManager/Src/BMBubbleOutlookOneLined.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/Src/BMBubbleOutlookOneLined.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -198,6 +198,7 @@
 CCoeControl* CBubbleOutlookOneLined::ComponentControl( TInt aIndex ) const
     {
     TInt amount = -1;
+    // coverity[var_compare_op]
     if ( iSmallCallIndication )
         {
         amount++;
@@ -205,6 +206,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iSmallCallIndication->Control();
         }
 
--- a/phoneuis/BubbleManager/Src/BMBubbleOutlookThreeLined.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/Src/BMBubbleOutlookThreeLined.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -216,7 +216,7 @@
 TInt CBubbleOutlookThreeLined::CountComponentControls() const
     {
     TInt amount = 0;
-    
+
     if ( iNumberType ) 
         {
         amount++;
@@ -285,7 +285,7 @@
     {
   
     TInt amount = -1;
-    
+    // coverity[var_compare_op]
     if ( iNumberType )
         {
         amount++;
@@ -293,6 +293,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iNumberType->Control();
         }
 
@@ -353,6 +354,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iSmallCallIndication->Control();
         }
 
@@ -383,6 +385,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iBrandImage->Control();
         }
     
@@ -393,6 +396,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iBigCallIndicator->Control();
         }
 
--- a/phoneuis/BubbleManager/Src/BMBubbleOutlookTwoLined.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/Src/BMBubbleOutlookTwoLined.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -275,7 +275,7 @@
     {
   
     TInt amount = -1;
-    
+    // coverity[var_compare_op]
     if ( iNumberType )
         {
         amount++;
@@ -283,6 +283,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iNumberType->Control();
         }
 
@@ -293,6 +294,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iSmallCallIndication->Control();
         }
 
@@ -363,6 +365,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iBrandImage->Control();
         }
 
@@ -373,6 +376,7 @@
 
     if ( aIndex == amount )
         {
+        // coverity[var_deref_model]
         return iBigCallIndicator->Control();
         }
     
--- a/phoneuis/BubbleManager/Src/BMTouchPaneButton.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/Src/BMTouchPaneButton.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -16,16 +16,17 @@
 */
 
 #include <AknBidiTextUtils.h>
-#include <aknsdrawutils.h>
+#include <AknsDrawUtils.h>
 #include <aknlayoutscalable_avkon.cdl.h>
 #include <gulicon.h>
 #include <barsread.h> 
 #include <AknsFrameBackgroundControlContext.h>
-#include <aknsconstants.h>
+#include <AknsConstants.h>
+#include <phoneappcommands.hrh>
 
-#include "bmtouchpanebutton.h"
+#include "BMTouchPaneButton.h"
 #include "BMTouchPaneInterface.h"
-#include "bmpanic.h"
+#include "BMPanic.h"
 
 
 const TInt KBubbleButtonText = 255;
@@ -97,9 +98,7 @@
     
     CAknButton::ConstructFromResourceL( aReader );
     
-    // function button text color
-    SetTextColorIds( KAknsIIDQsnTextColors, 
-                              EAknsCIQsnTextColorsCG65 );
+    SelectTextColor();
     
     // Customize icons
     if ( iIconProvider )
@@ -410,3 +409,25 @@
        return KAknsIIDQsnFrButtonInactive;
        }
    }
+
+// -----------------------------------------------------------------------------
+// Selects the correct text color.
+// -----------------------------------------------------------------------------
+//
+void CBubbleTouchPaneButton::SelectTextColor() 
+    { 
+    TAknsQsnTextColorsIndex textColorIndex( EAknsCIQsnTextColorsCG65 );
+    TInt command = CommandId( EFalse );
+
+    if ( command == EPhoneCallComingCmdAnswer )
+        {
+        textColorIndex = EAknsCIQsnTextColorsCG82;
+        }
+    else if ( command == EPhoneCallComingCmdReject )
+        {
+        textColorIndex = EAknsCIQsnTextColorsCG83;
+        }
+
+    // function button text color
+    SetTextColorIds( KAknsIIDQsnTextColors, textColorIndex );
+    }
--- a/phoneuis/BubbleManager/laf/BMLayout6.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/laf/BMLayout6.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -21,8 +21,8 @@
 #include "BMBubbleManager.h"
 #include <aknenv.h>
 #include <applayout.cdl.h>
-#include <aknutils.h>
-#include <aknlayout2scalabledef.h>
+#include <AknUtils.h>
+#include <AknLayout2ScalableDef.h>
 #include <aknlayoutscalable_apps.cdl.h>
 #include <layoutmetadata.cdl.h>
 
--- a/phoneuis/BubbleManager/laf/BMLayout6.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/BubbleManager/laf/BMLayout6.h	Fri Feb 19 22:50:26 2010 +0200
@@ -20,7 +20,7 @@
 
 #include <calslbs.h>
 #include <bldvariant.hrh> 
-#include <aknlayoutdef.h>
+#include <AknLayoutDef.h>
 /**
 * Layout coordinates from Application LAF
 * 
--- a/phoneuis/ConnectUtil/inc/CCoUtlActive.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/ConnectUtil/inc/CCoUtlActive.h	Fri Feb 19 22:50:26 2010 +0200
@@ -21,7 +21,7 @@
 #define CCOUTLACTIVE_H
 
 //  INCLUDES
-#include    <CCoUtlInterface.h>
+#include    <ccoutlinterface.h>
 #include    <etel.h>
 #include    <etelmm.h>
 #include    <etelpckt.h>
--- a/phoneuis/ConnectUtil/inc/CCoUtlImplementation.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/ConnectUtil/inc/CCoUtlImplementation.h	Fri Feb 19 22:50:26 2010 +0200
@@ -21,7 +21,7 @@
 #define CCOUTLIMPLEMENTATION_H
 
 //  INCLUDES
-#include    <CCoUtlInterface.h>
+#include    <ccoutlinterface.h>
 #include    <ConeResLoader.h>
 
 // FORWARD DECLARATION
--- a/phoneuis/ConnectUtil/inc/CCoUtlInterface.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/ConnectUtil/inc/CCoUtlInterface.h	Fri Feb 19 22:50:26 2010 +0200
@@ -86,7 +86,7 @@
 
     };
 
-#include    <CCoUtlInterface.inl>
+#include    <ccoutlinterface.inl>
 
 #endif      // CCOUTLINTERFACE_H
             
--- a/phoneuis/ConnectUtil/inc/CCoUtlInterface.inl	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/ConnectUtil/inc/CCoUtlInterface.inl	Fri Feb 19 22:50:26 2010 +0200
@@ -19,7 +19,7 @@
 
 // INCLUDE FILES
 #include    <ecom/ecom.h>
-#include    <CoUtlInterface.hrh>
+#include    <coutlinterface.hrh>
 
 // CONSTANTS
 _LIT8( KCoUtlResolverData, "default" );
--- a/phoneuis/ConnectUtil/src/CCoUtlActive.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/ConnectUtil/src/CCoUtlActive.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -25,7 +25,7 @@
 #include    <AknGlobalConfirmationQuery.h>
 #include    <AknUtils.h>
 #include    <StringLoader.h>
-#include    <ConnectUtilRsc.rsg>
+#include    <connectutilrsc.rsg>
 #include    <avkon.hrh>
 #include    <e32property.h>
 #include    <PSVariables.h>
--- a/phoneuis/ConnectUtil/src/CoUtlMain.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/ConnectUtil/src/CoUtlMain.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -20,7 +20,7 @@
 // INCLUDE FILES
 #include    <ecom.h>
 #include    <implementationproxy.h>
-#include    <CoUtlInterface.hrh>
+#include    <coutlinterface.hrh>
 #include    "CCoUtlImplementation.h"
 
 // CONSTANTS
--- a/phoneuis/Ussd/src/UssdEditorLines.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/Ussd/src/UssdEditorLines.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -104,9 +104,9 @@
     {
     // Move rectangles to right position
     
-    for ( TInt i = 0; 
-          iRects && i < iRects->Count() && i < UssdLayout::NumberOfEditorLines(); 
-          i++ )
+    for ( TInt i = 0;
+            i < iRects->Count() && i < UssdLayout::NumberOfEditorLines(); 
+            i++ )
         {
         iRects->At( i )->LayoutRect( Rect() , 
             UssdLayout::MessageWritingLayoutElements6( i+1 ) );
@@ -119,10 +119,10 @@
 // 
 // -----------------------------------------------------------------------------
 //
-void CUssdEditorLines::Draw( const TRect& aRect ) const
+void CUssdEditorLines::Draw( const TRect& /*aRect*/ ) const
     {
     // Take the colour from some ramdom line.
-    // Here it is takem from the first line.
+    // Here it is taken from the first line.
 
     TRgb lineColour( KRgbWhite );
 
@@ -151,7 +151,7 @@
     // Draw row lines by clearing rectangles corresponding to row locations.
     TInt count( iRects->Count() );
     TInt lines( UssdLayout::NumberOfEditorLines() );
-    for ( TInt i = 0; iRects && i < count && i < lines; i++ )
+    for ( TInt i = 0; i < count && i < lines; i++ )
         {
         gc.Clear( iRects->At( i )->Rect() );
         }
--- a/phoneuis/dialer/bwins/dialeru.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/bwins/dialeru.def	Fri Feb 19 22:50:26 2010 +0200
@@ -1,8 +1,12 @@
 EXPORTS
-	??1CDialer@@UAE@XZ @ 1 NONAME ; CDialer::~CDialer(void)
-	??1CVideoDTMFDialer@@UAE@XZ @ 2 NONAME ; CVideoDTMFDialer::~CVideoDTMFDialer(void)
-	?NewL@CDialer@@SAPAV1@ABVCCoeControl@@ABVTRect@@@Z @ 3 NONAME ; class CDialer * CDialer::NewL(class CCoeControl const &, class TRect const &)
-	?NewL@CVideoDTMFDialer@@SAPAV1@ABVCCoeControl@@AAV2@ABVTRect@@@Z @ 4 NONAME ; class CVideoDTMFDialer * CVideoDTMFDialer::NewL(class CCoeControl const &, class CCoeControl &, class TRect const &)
-	?NumberEntry@CDialer@@QAEPAVMNumberEntry@@XZ @ 5 NONAME ; class MNumberEntry * CDialer::NumberEntry(void)
-	?SetNumberEntryObserver@CDialer@@UAEXAAVMNumberEntryObserver@@@Z @ 6 NONAME ; void CDialer::SetNumberEntryObserver(class MNumberEntryObserver &)
+	?Controller@CDialer@@QAEPAVMPhoneDialerController@@XZ @ 1 NONAME ; class MPhoneDialerController * CDialer::Controller(void)
+	?NumberEntry@CDialer@@QAEPAVMNumberEntry@@XZ @ 2 NONAME ; class MNumberEntry * CDialer::NumberEntry(void)
+	?NewL@CVideoDTMFDialer@@SAPAV1@ABVCCoeControl@@AAV2@ABVTRect@@@Z @ 3 NONAME ; class CVideoDTMFDialer * CVideoDTMFDialer::NewL(class CCoeControl const &, class CCoeControl &, class TRect const &)
+	?UpdateToolbar@CDialer@@QAEXXZ @ 4 NONAME ; void CDialer::UpdateToolbar(void)
+	?SetNumberEntryObserver@CDialer@@UAEXAAVMNumberEntryObserver@@@Z @ 5 NONAME ; void CDialer::SetNumberEntryObserver(class MNumberEntryObserver &)
+	?NewL@CDialer@@SAPAV1@ABVCCoeControl@@ABVTRect@@PAVMPhoneDialerController@@@Z @ 6 NONAME ; class CDialer * CDialer::NewL(class CCoeControl const &, class TRect const &, class MPhoneDialerController *)
+	??1CDialer@@UAE@XZ @ 7 NONAME ; CDialer::~CDialer(void)
+	?GetEasyDialingInterface@CDialer@@QBEPAVCDialingExtensionInterface@@XZ @ 8 NONAME ; class CDialingExtensionInterface * CDialer::GetEasyDialingInterface(void) const
+	?SetControllerL@CDialer@@QAEXPAVMPhoneDialerController@@@Z @ 9 NONAME ; void CDialer::SetControllerL(class MPhoneDialerController *)
+	??1CVideoDTMFDialer@@UAE@XZ @ 10 NONAME ; CVideoDTMFDialer::~CVideoDTMFDialer(void)
 
--- a/phoneuis/dialer/data/dialer.pkg	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/data/dialer.pkg	Fri Feb 19 22:50:26 2010 +0200
@@ -28,3 +28,16 @@
 ;Files to install
 "\epoc32\release\armv5\urel\dialer.dll"-"z:\sys\bin\dialer.dll"
 "\epoc32\data\z\resource\dialer.rsc"-"z:\resource\dialer.rsc"
+"\epoc32\data\z\resource\dialerkeypad.rsc"-"z:\resource\dialerkeypad.rsc"
+"\epoc32\data\z\resource\dialerkeypad_cyrillic.rsc"-"z:\resource\dialerkeypad_cyrillic.rsc"
+"\epoc32\data\z\resource\dialerkeypad_greek.rsc"-"z:\resource\dialerkeypad_greek.rsc"
+"\epoc32\data\z\resource\dialerkeypad_hebrew.rsc"-"z:\resource\dialerkeypad_hebrew.rsc"
+"\epoc32\data\z\resource\dialerkeypad_arabic.rsc"-"z:\resource\dialerkeypad_arabic.rsc"
+"\epoc32\data\z\resource\dialerkeypad_farsi.rsc"-"z:\resource\dialerkeypad_farsi.rsc"
+"\epoc32\data\z\resource\dialerkeypad_urdu.rsc"-"z:\resource\dialerkeypad_urdu.rsc"
+"\epoc32\data\z\resource\dialerkeypad_thai.rsc"-"z:\resource\dialerkeypad_thai.rsc"
+"\epoc32\data\z\resource\dialerkeypad_devanagari.rsc"-"z:\resource\dialerkeypad_devanagari.rsc"
+"\epoc32\data\z\resource\dialerkeypad_chn_pinyin.rsc"-"z:\resource\dialerkeypad_chn_pinyin.rsc"
+"\epoc32\data\z\resource\dialerkeypad_chn_stroke.rsc"-"z:\resource\dialerkeypad_chn_stroke.rsc"
+"\epoc32\data\z\resource\dialerkeypad_chn_zhuyin.rsc"-"z:\resource\dialerkeypad_chn_zhuyin.rsc"
+
--- a/phoneuis/dialer/data/dialer.rss	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/data/dialer.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -32,8 +32,6 @@
 #include <avkon.loc>
 #include <data_caging_paths_strings.hrh>
 
-
-
 // CONSTANTS 
 
 // RESOURCE DEFINITIONS 
@@ -100,6 +98,5 @@
         };
      }
 
-
 // End of File
 
--- a/phoneuis/dialer/data/dialer_stub.pkg	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/data/dialer_stub.pkg	Fri Feb 19 22:50:26 2010 +0200
@@ -27,4 +27,17 @@
 
 ;Files to install
 ""-"z:\sys\bin\dialer.dll"
-""-"z:\resource\dialer.rsc"
+""-"z:\resource\dialer.r*"
+""-"z:\resource\dialerkeypad.rsc"
+""-"z:\resource\dialerkeypad_cyrillic.rsc"
+""-"z:\resource\dialerkeypad_greek.rsc"
+""-"z:\resource\dialerkeypad_hebrew.rsc"
+""-"z:\resource\dialerkeypad_arabic.rsc"
+""-"z:\resource\dialerkeypad_farsi.rsc"
+""-"z:\resource\dialerkeypad_urdu.rsc"
+""-"z:\resource\dialerkeypad_thai.rsc"
+""-"z:\resource\dialerkeypad_devanagari.rsc"
+""-"z:\resource\dialerkeypad_chn_pinyin.rsc"
+""-"z:\resource\dialerkeypad_chn_stroke.rsc"
+""-"z:\resource\dialerkeypad_chn_zhuyin.rsc"
+
Binary file phoneuis/dialer/data/dialer_stub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad.rh	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 prototypes for dialer keypad labels
+*
+*/
+#ifndef DIALERKEYPAD_RH
+#define DIALERKEYPAD_RH
+
+// system includes
+
+// constants
+#define DEFAULT_KEY_1_TEXT ""
+#define DEFAULT_KEY_2_TEXT "abc"
+#define DEFAULT_KEY_3_TEXT "def"
+#define DEFAULT_KEY_4_TEXT "ghi"
+#define DEFAULT_KEY_5_TEXT "jkl"
+#define DEFAULT_KEY_6_TEXT "mno"
+#define DEFAULT_KEY_7_TEXT "pqrs"
+#define DEFAULT_KEY_8_TEXT "tuv"
+#define DEFAULT_KEY_9_TEXT "wxyz"
+#define DEFAULT_KEY_0_TEXT <0xf812>
+#define DEFAULT_KEY_ASTERISK_TEXT ""
+#define DEFAULT_KEY_HASH_TEXT ""
+
+STRUCT DIALER_KEY
+    {
+    LTEXT firstRow = "";
+    LTEXT secondRow = "";
+    }
+
+STRUCT DIALER_KEYPAD
+    {
+    STRUCT keys[];
+    }
+
+
+#endif // DIALERKEYPAD_RH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This is the default latin variant of the file.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = DEFAULT_KEY_2_TEXT;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = DEFAULT_KEY_3_TEXT;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = DEFAULT_KEY_4_TEXT;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = DEFAULT_KEY_5_TEXT;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = DEFAULT_KEY_6_TEXT;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = DEFAULT_KEY_7_TEXT;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = DEFAULT_KEY_8_TEXT;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = DEFAULT_KEY_9_TEXT;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_arabic.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This variant is for languages written with Arabic
+*               alphabets.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = <0x062A><0x200c><0x0628>;
+            secondRow = <0x062B><0x200c><0x0629>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = <0x0621><0x200c><0x0627>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = <0x0634><0x200c><0x0633>;
+            secondRow =  <0x0636><0x200c><0x0635>;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = <0x0630><0x200c><0x062F>;
+            secondRow = <0x0632><0x200c><0x0631>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = <0x062E><0x200c><0x062D><0x200c><0x062C>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = <0x0647><0x200c><0x0646>;
+            secondRow = <0x064A><0x200c><0x0648>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = <0x0643><0x200c><0x0642><0x200c><0x0641>;
+            secondRow = <0x0645><0x200c><0x0644><0x200c>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = <0x0638><0x200c><0x0637>;
+            secondRow = <0x063A><0x200c><0x0639>;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_chn_pinyin.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,90 @@
+/*
+* 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:  Dialer virtual keypad button text labels.
+*               This is the Chinese Pinyin variant of the file.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = DEFAULT_KEY_2_TEXT;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = DEFAULT_KEY_3_TEXT;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = DEFAULT_KEY_4_TEXT;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = DEFAULT_KEY_5_TEXT;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = DEFAULT_KEY_6_TEXT;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = DEFAULT_KEY_7_TEXT;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = DEFAULT_KEY_8_TEXT;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = DEFAULT_KEY_9_TEXT;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_chn_stroke.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,95 @@
+/*
+* 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:  Dialer virtual keypad button text labels.
+*               This is the Chinese Stroke variant of the file.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = <0x4e00>;
+            secondRow = " "; // to force two line layout
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = <0x4e28>;
+            secondRow = DEFAULT_KEY_2_TEXT;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = <0x4e3f>;
+            secondRow = DEFAULT_KEY_3_TEXT;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = <0x4e36>;
+            secondRow = DEFAULT_KEY_4_TEXT;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = <0x4e5b>;
+            secondRow = DEFAULT_KEY_5_TEXT;
+            },
+        DIALER_KEY // 6
+            {
+            secondRow = DEFAULT_KEY_6_TEXT;
+            },
+        DIALER_KEY // 7
+            {
+            secondRow = DEFAULT_KEY_7_TEXT;
+            },
+        DIALER_KEY // 8
+            {
+            secondRow = DEFAULT_KEY_8_TEXT;
+            },
+        DIALER_KEY // 9
+            {
+            secondRow = DEFAULT_KEY_9_TEXT;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_chn_zhuyin.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,96 @@
+/*
+* 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:  Dialer virtual keypad button text labels.
+*               This is the Chinese Zhuyin variant of the file.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = <0x3105><0x3106>;
+            secondRow = <0x3107><0x3108>;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = <0x3109><0x310a>;
+            secondRow = <0x310b><0x310c>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = <0x310d><0x310e><0x310f>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = <0x3110><0x3111><0x3112>;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = <0x3113><0x3114>;
+            secondRow = <0x3115><0x3116>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = <0x3117><0x3118><0x3119>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = <0x311a><0x311b>;
+            secondRow = <0x311c><0x311d>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = <0x311e><0x311f>;
+            secondRow = <0x3120><0x3121>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = <0x3122><0x3123>;
+            secondRow = <0x3124><0x3125><0x3126>;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = <0x3127><0x3128><0x3129>;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_cyrillic.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This variant is for languages written with Cyrillic
+*               alphabets.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = DEFAULT_KEY_2_TEXT;
+            secondRow = <0x0430><0x0431><0x0432><0x0433>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = DEFAULT_KEY_3_TEXT;
+            secondRow = <0x0434><0x0435><0x0436><0x0437>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = DEFAULT_KEY_4_TEXT;
+            secondRow = <0x0438><0x0439><0x043A><0x043B>;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = DEFAULT_KEY_5_TEXT;
+            secondRow = <0x043C><0x043D><0x043E><0x043F>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = DEFAULT_KEY_6_TEXT;
+            secondRow = <0x0440><0x0441><0x0442><0x0443>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = DEFAULT_KEY_7_TEXT;
+            secondRow = <0x0444><0x0445><0x0446><0x0447>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = DEFAULT_KEY_8_TEXT;
+            secondRow = <0x0448><0x0449><0x044A><0x044B>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = DEFAULT_KEY_9_TEXT;
+            secondRow = <0x044C><0x044D><0x044E><0x044F>;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_devanagari.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This variant is for languages written with Devanagari
+*               alphabets.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = DEFAULT_KEY_2_TEXT;
+            secondRow = <0x0905><0x002D><0x090A>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = DEFAULT_KEY_3_TEXT;
+            secondRow = <0x090F><0x002D><0x0914>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = DEFAULT_KEY_4_TEXT;
+            secondRow = <0x0915><0x002D><0x0919>;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = DEFAULT_KEY_5_TEXT;
+            secondRow = <0x091A><0x002D><0x091E>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = DEFAULT_KEY_6_TEXT;
+            secondRow = <0x091F><0x002D><0x0923>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = DEFAULT_KEY_7_TEXT;
+            secondRow = <0x0924><0x002D><0x0928>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = DEFAULT_KEY_8_TEXT;
+            secondRow = <0x092A><0x002D><0x092E>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = DEFAULT_KEY_9_TEXT;
+            secondRow = <0x092F><0x002D><0x0939>;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_farsi.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This variant is for languages written with Farsi
+*               alphabets.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = <0x067E><0x200c><0x0628>;
+            secondRow = <0x062B><0x200c><0x062A>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = <0x0624><0x200c><0x0622><0x200c><0x0627>;
+            secondRow = <0x0621><0x200c><0x0626>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = <0x0634><0x200c><0x0633>;
+            secondRow = <0x0636><0x200c><0x0635>;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = <0x0631><0x200c><0x0630><0x200c><0x062F>;
+            secondRow = <0x0698><0x200c><0x0632>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = <0x0686><0x200c><0x062C>;
+            secondRow = <0x062E><0x200c><0x062D>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = <0x0648><0x200c><0x0646>;
+            secondRow = <0x06CC><0x200c><0x0647>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = <0x06A9><0x200c><0x0642><0x200c><0x0641>;
+            secondRow = <0x0645><0x200c><0x0644><0x200c><0x06AF>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = <0x0638><0x200c><0x0637>;
+            secondRow = <0x063A><0x200c><0x0639>;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_greek.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This variant is for languages written with Greek
+*               alphabets.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = DEFAULT_KEY_2_TEXT;
+            secondRow = <0x03B1><0x03B2><0x03B3>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = DEFAULT_KEY_3_TEXT;
+            secondRow = <0x03B4><0x03B5><0x03B6>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = DEFAULT_KEY_4_TEXT;
+            secondRow = <0x03B7><0x03B8><0x03B9>;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = DEFAULT_KEY_5_TEXT;
+            secondRow = <0x03BA><0x03BB><0x03BC>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = DEFAULT_KEY_6_TEXT;
+            secondRow = <0x03BD><0x03BE><0x03BF>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = DEFAULT_KEY_7_TEXT;
+            secondRow = <0x03C0><0x03C1><0x03C3><0x03C2>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = DEFAULT_KEY_8_TEXT;
+            secondRow = <0x03C4><0x03C5><0x03C6>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = DEFAULT_KEY_9_TEXT;
+            secondRow = <0x03C7><0x03C8><0x03C9>;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_hebrew.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This variant is for languages written with Hebrew
+*               alphabets.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = DEFAULT_KEY_2_TEXT;
+            secondRow = <0x05D5><0x05D4><0x05D3>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = DEFAULT_KEY_3_TEXT;
+            secondRow = <0x05D2><0x05D1><0x05D0>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = DEFAULT_KEY_4_TEXT;
+            secondRow =  <0x05E0><0x05DE>;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = DEFAULT_KEY_5_TEXT;
+            secondRow = <0x05DC><0x05DB><0x05D9>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = DEFAULT_KEY_6_TEXT;
+            secondRow = <0x05D8><0x05D7><0x05D6>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = DEFAULT_KEY_7_TEXT;
+            secondRow = <0x05EA><0x05E9><0x05E8>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = DEFAULT_KEY_8_TEXT;
+            secondRow = <0x05E7><0x05E6>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = DEFAULT_KEY_9_TEXT;
+            secondRow = <0x05E4><0x05E2><0x05E1>;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_thai.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This variant is for languages written with Thai
+*               alphabets.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            secondRow = <0x0E01><0x002D><0x0E05>;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = DEFAULT_KEY_2_TEXT;
+            secondRow = <0x0E06><0x002D><0x0E09>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = DEFAULT_KEY_3_TEXT;
+            secondRow = <0x0E0A><0x002D><0x0E0D>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = DEFAULT_KEY_4_TEXT;
+            secondRow = <0x0E0E><0x002D><0x0E13>; 
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = DEFAULT_KEY_5_TEXT;
+            secondRow = <0x0E14><0x002D><0x0E18>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = DEFAULT_KEY_6_TEXT;
+            secondRow = <0x0E19><0x002D><0x0E1D>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = DEFAULT_KEY_7_TEXT;
+            secondRow = <0x0E1E><0x002D><0x0E22>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = DEFAULT_KEY_8_TEXT;
+            secondRow = <0x0E23><0x002D><0x0E29>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = DEFAULT_KEY_9_TEXT;
+            secondRow = <0x0E2A><0x002D><0x0E2E>; 
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/data/dialerkeypad_urdu.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Dialer virtual keypad button text labels.
+*               This variant is for languages written with Urdu
+*               alphabets.
+*
+*/
+
+// NOTE: It's mandatory that all variated keypad resources have
+// the same resouce identifier and same structure. Same interface
+// is used for all of them!
+
+//  RESOURCE IDENTIFIER
+NAME DIKP
+
+#include <eikon.rh>
+#include <eikon.hrh>
+
+#include "dialerkeypad.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE DIALER_KEYPAD r_dialer_keypad
+    {
+    keys = 
+        {
+        DIALER_KEY // 1
+            {
+            firstRow = DEFAULT_KEY_1_TEXT;
+            },
+        DIALER_KEY // 2
+            {
+            firstRow = <0x062A><0x200c><0x067E><0x200c><0x0628>;
+            secondRow = <0x062B><0x200c><0x0679>;
+            },
+        DIALER_KEY // 3
+            {
+            firstRow = <0x0621><0x200c><0x0622><0x200c><0x0627>;
+            },
+        DIALER_KEY // 4
+            {
+            firstRow = <0x0634><0x200c><0x0633>;
+            secondRow = <0x0636><0x200c><0x0635>;
+            },
+        DIALER_KEY // 5
+            {
+            firstRow = <0x0631><0x200c><0x0630><0x200c><0x0688><0x200c><0x062F>;
+            secondRow = <0x0698><0x200c><0x0632><0x200c><0x0691>;
+            },
+        DIALER_KEY // 6
+            {
+            firstRow = <0x0686><0x200c><0x062C>;
+            secondRow = <0x062E><0x200c><0x062D>;
+            },
+        DIALER_KEY // 7
+            {
+            firstRow = <0x06BE><0x200c><0x0648><0x200c><0x0646>;
+            secondRow = <0x06D2><0x200c><0x06CC>;
+            },
+        DIALER_KEY // 8
+            {
+            firstRow = <0x06A9><0x200c><0x0642><0x200c><0x0641>;
+            secondRow = <0x0645><0x200c><0x0644><0x200c><0x06AF>;
+            },
+        DIALER_KEY // 9
+            {
+            firstRow = <0x0638><0x200c><0x0637>;
+            secondRow = <0x063A><0x200c><0x0639>;
+            },
+        DIALER_KEY // *
+            {
+            firstRow = DEFAULT_KEY_ASTERISK_TEXT;
+            },
+        DIALER_KEY // 0
+            {
+            firstRow = DEFAULT_KEY_0_TEXT;
+            },
+        DIALER_KEY // #
+            {
+            firstRow = DEFAULT_KEY_HASH_TEXT;
+            }
+        };
+    }
+
+// End Of File
--- a/phoneuis/dialer/eabi/dialeru.def	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/eabi/dialeru.def	Fri Feb 19 22:50:26 2010 +0200
@@ -3,11 +3,15 @@
 	_ZN16CVideoDTMFDialerD0Ev @ 2 NONAME
 	_ZN16CVideoDTMFDialerD1Ev @ 3 NONAME
 	_ZN16CVideoDTMFDialerD2Ev @ 4 NONAME
-	_ZN7CDialer11NumberEntryEv @ 5 NONAME
-	_ZN7CDialer22SetNumberEntryObserverER20MNumberEntryObserver @ 6 NONAME
-	_ZN7CDialer4NewLERK11CCoeControlRK5TRect @ 7 NONAME
-	_ZN7CDialerD0Ev @ 8 NONAME
-	_ZN7CDialerD1Ev @ 9 NONAME
-	_ZN7CDialerD2Ev @ 10 NONAME
-	_ZThn52_N7CDialer22SetNumberEntryObserverER20MNumberEntryObserver @ 11 NONAME ; #<thunk>#
+	_ZN7CDialer10ControllerEv @ 5 NONAME
+	_ZN7CDialer11NumberEntryEv @ 6 NONAME
+	_ZN7CDialer13UpdateToolbarEv @ 7 NONAME
+	_ZN7CDialer14SetControllerLEP22MPhoneDialerController @ 8 NONAME
+	_ZN7CDialer22SetNumberEntryObserverER20MNumberEntryObserver @ 9 NONAME
+	_ZN7CDialer4NewLERK11CCoeControlRK5TRectP22MPhoneDialerController @ 10 NONAME
+	_ZN7CDialerD0Ev @ 11 NONAME
+	_ZN7CDialerD1Ev @ 12 NONAME
+	_ZN7CDialerD2Ev @ 13 NONAME
+	_ZNK7CDialer23GetEasyDialingInterfaceEv @ 14 NONAME
+	_ZThn52_N7CDialer22SetNumberEntryObserverER20MNumberEntryObserver @ 15 NONAME
 
--- a/phoneuis/dialer/group/bld.inf	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/group/bld.inf	Fri Feb 19 22:50:26 2010 +0200
@@ -30,6 +30,8 @@
 
 ../rom/dialer.iby           CORE_APP_LAYER_IBY_EXPORT_PATH(dialer.iby)
 
+../rom/dialer_variant.iby   CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(dialer_variant.iby)
+
 PRJ_EXTENSIONS
 START EXTENSION s60/mifconv
   OPTION TARGETFILE dialer.mif
--- a/phoneuis/dialer/group/dialer.mmp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/group/dialer.mmp	Fri Feb 19 22:50:26 2010 +0200
@@ -39,15 +39,22 @@
 SOURCE  cdialer.cpp
 SOURCE  cdialercontainerbase.cpp
 SOURCE  cdialerkeypadcontainer.cpp
+SOURCE  cdialerkeypadbutton.cpp
 SOURCE  cdialernumberentry.cpp
 SOURCE  cdialervideocontainer.cpp
 SOURCE  cvideodtmfdialer.cpp
+SOURCE  cdialingextensionobserver.cpp 
+SOURCE  cdialertoolbarcontainer.cpp
+SOURCE  cdialerkeypadlabelmanager.cpp
+SOURCE  cdialercenrepwrapper.cpp
 
 USERINCLUDE ../inc 
 USERINCLUDE ../data 
 
 APP_LAYER_SYSTEMINCLUDE
 
+SYSTEMINCLUDE ../../../inc
+
 LIBRARY euser.lib eikcore.lib estor.lib etext.lib 
 LIBRARY cone.lib ws32.lib bmpanim.lib 
 LIBRARY eikcoctl.lib fbscli.lib bafl.lib 
@@ -60,5 +67,61 @@
 LIBRARY efsrv.lib
 LIBRARY aknlayout2.lib touchfeedback.lib
 
+LIBRARY ecom.lib
+LIBRARY CommonEngine.lib
+LIBRARY PtiEngine.lib
+LIBRARY centralrepository.lib
+LIBRARY cenrepnotifhandler.lib 
 
+
+// Keypad resources. Header is generated only for the
+// default variant, all the variants use the same header.
+START RESOURCE ../data/dialerkeypad.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+HEADER
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_cyrillic.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_greek.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_hebrew.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_arabic.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_farsi.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_urdu.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_thai.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_devanagari.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_chn_pinyin.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_chn_zhuyin.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
+
+START RESOURCE ../data/dialerkeypad_chn_stroke.rss
+TARGETPATH   RESOURCE_FILES_DIR 
+END  // RESOURCE
 // End of File
--- a/phoneuis/dialer/group/dialerstub.mmp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/group/dialerstub.mmp	Fri Feb 19 22:50:26 2010 +0200
@@ -67,5 +67,6 @@
 LIBRARY bitgdi.lib
 LIBRARY egul.lib
 LIBRARY efsrv.lib
+LIBRARY ecom.lib
 
 // End of File
--- a/phoneuis/dialer/group/iconlist.txt	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/group/iconlist.txt	Fri Feb 19 22:50:26 2010 +0200
@@ -1,12 +1,1 @@
--c8,8  qgn_indi_dialer_eight
--c8,8  qgn_indi_dialer_five
--c8,8  qgn_indi_dialer_four
--c8,8  qgn_indi_dialer_hash
--c8,8  qgn_indi_dialer_nine
--c8,8  qgn_indi_dialer_one
--c8,8  qgn_indi_dialer_prefix
--c8,8  qgn_indi_dialer_seven
--c8,8  qgn_indi_dialer_six
--c8,8  qgn_indi_dialer_three
--c8,8  qgn_indi_dialer_two
--c8,8  qgn_indi_dialer_zero
\ No newline at end of file
+-c8,8  qgn_indi_dialer_voicemail
--- a/phoneuis/dialer/inc/cdialer.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/inc/cdialer.h	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -37,6 +37,10 @@
 class CEikonEnv;
 class CAknEdwinState;
 class MNumberEntryObserver;
+class CDialingExtensionInterface;
+class CDialingExtensionObserver;
+class CDialerToolbarContainer;
+class MPhoneDialerController;
 
 // CLASS DECLARATION
 
@@ -114,7 +118,7 @@
     delete dialer;
 *
 */
-NONSHARABLE_CLASS(CDialer) : public CCoeControl, public MNumberEntry
+NONSHARABLE_CLASS(CDialer) : public CCoeControl, public MNumberEntry, public MCoeControlObserver // easy dialing change
     {
     public:  // Constructors and destructor
 
@@ -122,10 +126,12 @@
         * Two phase constructor
         * @param aContainer Parent container
         * @param aRect Area to use for dialer
+        * @param aController Dialer controller providing state data for dialer
         * @return New instance of Dialer
         */
         IMPORT_C static CDialer* NewL( const CCoeControl& aContainer,
-                                       const TRect& aRect );
+                                       const TRect& aRect,
+                                       MPhoneDialerController* aController );
 
         /**
         * Destructor.
@@ -144,6 +150,32 @@
         * Set number entry observer.
         */
         IMPORT_C void SetNumberEntryObserver( MNumberEntryObserver& aObserver );
+
+        /**
+        * Sets controller of the dialer. Controller is responsible of providing
+        * toolbar functions, text prompt, etc, as appropriate for the curret dialer state.
+        */
+        IMPORT_C void SetControllerL( MPhoneDialerController* aController );
+
+        /**
+        * Gets current controller of the dialer.
+        */
+        IMPORT_C MPhoneDialerController* Controller();
+        
+        /**
+         * Returns pointer to easydialing interface. This can be NULL if
+         * easydialing is not present in device, so value must be checked
+         * before using the interface.
+         * 
+         * @return  Pointer to easydialing interface
+         */
+        IMPORT_C CDialingExtensionInterface* GetEasyDialingInterface() const;
+        
+        /**
+         * Toolbar of the easydialing layout is owned by the Dialer.
+         * Calling this methods updates status of its buttons.
+         */
+        IMPORT_C void UpdateToolbar();
         
     public: // from MNumberEntry 
 
@@ -179,9 +211,9 @@
         
         /**
         * Get Number Entry Text.
-        * @param aDesC The text.
+        * @param aDes The text.
         */
-        void GetTextFromNumberEntry( TDes& aDesC );
+        void GetTextFromNumberEntry( TDes& aDes );
         
         /**
         * Removes NE and empties the buffer.
@@ -223,6 +255,10 @@
         */             
         void EnableTactileFeedback( const TBool aEnable );
 
+    private: // Functions from MCoeControlObserver
+        
+        void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
+        
     private:  // Functions from CCoeControl
         
         /**
@@ -287,9 +323,11 @@
         * 2nd phase constructor.
         * @param aContainer Parent container
         * @param aRect Area to use for dialer
+        * @param aController Dialer controller providing state data for dialer 
         */
-        void ConstructL( const CCoeControl& aContainer , 
-            const TRect& aRect );
+        void ConstructL( const CCoeControl& aContainer, 
+            const TRect& aRect,
+            MPhoneDialerController* aController );
         
         /**
         * Load resource file.
@@ -319,6 +357,26 @@
          */
         void UpdateVkbEditorFlagsL();
 
+        /**
+         * Loads easydialing plugin. If loading fails (for instance when
+         * easydialing feature flag is not enabled in the device),
+         * iEasyDialer will be NULL after this function returns.
+         */
+        void LoadEasyDialingPlugin();
+        
+        /**
+         * Checks if Easy dialing is available, allowed, and currently enabled.
+         * 
+         * @return  ETrue if Easy Dialing is enabked 
+         */
+        TBool EasyDialingEnabled() const;
+        
+        /**
+         * Layout number entry component. The used layout depends on
+         * the availability and state of Easy dialing. 
+         */
+        void LayoutNumberEntry( const TRect& aParent, TInt aVariety );
+        
     private:    // Data
           
         // Keypad container  - owned
@@ -327,9 +385,6 @@
         // Number entry container - owned
         CDialerNumberEntry* iNumberEntry;
         
-        // Parent container
-        const CCoeControl* iParentControl;
-        
         // Is Number entry (e.g. dialer) being used at the moment
         TBool iIsUsed;
         
@@ -342,6 +397,30 @@
         // Is virtual key board open
         TBool iVirtualKeyBoardOpen;
 
+        /**
+         * Easydialing plugin. This can be NULL if easydialing feature flag
+         * is not enabled in the device.
+         * Own.
+         */
+        CDialingExtensionInterface* iEasyDialer;
+        
+        /**
+         * Observer for Easydialing.
+         * Own.
+         */
+        CDialingExtensionObserver* iDialingExtensionObserver;
+        
+        /**
+         * Toolbar used in Easy dialing layout.
+         * Own.
+         */
+        CDialerToolbarContainer* iToolbar;
+        
+        /**
+         * Controller rules the mode of the Dialer (e.g. normal, DTMF, restricted...)
+         * Not owned.
+         */
+        MPhoneDialerController* iController;
     };
 
 #endif      // CDIALER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/inc/cdialercenrepwrapper.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Wrapper class for Central Repository handling.
+*               Using this helper class is most helpful when one class needs
+*               to observe state changes in several repositories.
+*/
+
+#ifndef DIALERCENREPWRAPPER_H
+#define DIALERCENREPWRAPPER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <cenrepnotifyhandler.h>
+
+// CALLBACK INTERFACE
+NONSHARABLE_CLASS( MDialerCenRepObserver )
+    {
+public:
+    virtual void HandleRepositoryChange( TUid aRepository, TUint32 aKey ) = 0;
+    };
+
+// FORWARD DECLARATIONS
+class CRepository;
+
+// CLASS DECLARATION
+
+/**
+ *  CDialerCenRepWrapper
+ * 
+ */
+NONSHARABLE_CLASS( CDialerCenRepWrapper ): 
+    public CBase, public MCenRepNotifyHandlerCallback
+    {
+public: // constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CDialerCenRepWrapper();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CDialerCenRepWrapper* NewL( 
+            MDialerCenRepObserver& aObserver, TUid aRepository );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CDialerCenRepWrapper* NewLC( 
+            MDialerCenRepObserver& aObserver, TUid aRepository );
+
+private: // consturctors
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CDialerCenRepWrapper( 
+            MDialerCenRepObserver& aObserver, TUid aRepository );
+
+    /**
+     * Symbian default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+public: // from MCenRepNotifyHandlerCallback
+    
+    /**
+     * @see MCenRepNotifyHandlerCallback
+     */
+    void HandleNotifyGeneric( TUint32 aId );
+    
+public: // new methods
+    
+    /**
+     * Get integer value from the repository.
+     * @see CRepository::Get
+     */
+    TInt Get( TUint32 aKey, TInt& aValue );
+    
+    // Getters for other data types may be added here if needed
+
+private: // data
+
+    /** Observer is notified on repository changes */
+    MDialerCenRepObserver& iObserver;
+
+    /** UID of the repository */
+    TUid iRepositoryId;
+
+    /** Repository handle. Owned. */
+    CRepository* iRepository;
+
+    /** Helper for reacting to repository changes. */
+    CCenRepNotifyHandler* iCenRepNotifyHandler;
+    };
+
+#endif // DIALERCENREPWRAPPER_H
--- a/phoneuis/dialer/inc/cdialerkeypadbutton.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/inc/cdialerkeypadbutton.h	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -21,6 +21,9 @@
 
 #include <e32base.h>
 #include <aknbutton.h>
+#include "dialercommon.h"
+
+const TMifDialer KDialerNoIcon = EMbmDialerLastElement;
 
 // CLASS DECLARATION
 
@@ -30,39 +33,185 @@
 *  @lib dialer.lib
 *  @since S60 v5.0
 */
-NONSHARABLE_CLASS( CDialerKeyPadButton ) : public CBase
+NONSHARABLE_CLASS( CDialerKeyPadButton ) : public CAknButton
     {
     public:
     
-        CDialerKeyPadButton();
-
+        /**
+         * @param   aNumberLabel            The number (etc) of the key.
+         *                                  Reference must remain valid until reset with SetNumLabel
+         * @parem   aPrimaryAlphaLabel      The first row of alphabets of the key.
+         *                                  Reference must remain valid until reset with SetPrimaryAlphaLabel
+         * @param   aSecondaryAlphaLabel    The second row of alphabets of the key.
+         *                                  Reference must remain valid until reset with SetSecondaryAlphaLabel
+         * @param   aScanCode               The button scanCode. 
+         * @param   aKeyCode                The button keyCode.
+         * @param   aButtonIconId           The icon for the normal state.
+         * @param   aButtonIconMaskId       The icon mask for the normal state.
+         * @param   aFlags                  CAknButton flags
+         */
+        static CDialerKeyPadButton* NewLC( const TDesC& aNumberLabel,
+                                           const TDesC& aPrimaryAlphaLabel,
+                                           const TDesC& aSecondaryAlphaLabel,
+                                           TInt aScanCode, 
+                                           TInt aKeyCode,
+                                           TMifDialer aButtonIconId, 
+                                           TMifDialer aButtonIconMaskId,
+                                           TInt aFlags );  
+        
+        /**
+         * Destructor
+         */
         ~CDialerKeyPadButton();
-    
+        
     public:
-        CCoeControl* Control() const { return iButton; };
+
+        /**
+         * Scan code associated with the key.
+         */
         TInt ScanCode() const;
+        
+        /**
+         * Key code associated with the key
+         */
         TInt KeyCode() const;
-        void CreateButtonL( const TInt aScanCode,
-                            const TInt aKeyCode, 
-                            const TMifDialer aButtonIcon, 
-                            const TMifDialer aButtonIconMask );
-        void SetIconSize( TSize& aSize );                    
-        void HandleResourceChange( TInt aType );
-        void MapDialerIconToSkinIcon( const TInt aDialerIcon, 
-                                      TAknsItemID& aItemId ) const;  
+        
+        /**
+         * Set layout variety to be used
+         */
+        void SetVariety( TInt aVariety );
+        
+        /**
+         * Set operation mode of the keypad. Operation mode has rules,
+         * which labels are shown and how they are laid out.
+         */
+        void SetOperationMode( TDialerOperationMode aMode );
+        
+        /**
+         * Set number label for the key.
+         * @param   aLabel  Reference to new label text. The reference must remain
+         *                  valid until reset or this button is deleted.
+         */
+        void SetNumLabel( const TDesC& aLabel );
+
+        /**
+         * Set first row alphabet label.
+         * @param   aLabel  Reference to new label text. The reference must remain
+         *                  valid until reset or this button is deleted.
+         */
+        void SetPrimaryAlphaLabel( const TDesC& aLabel );
+        
+        /**
+         * Set second row alphabet label for the key.
+         * @param   aLabel  Reference to new label text. The reference must remain
+         *                  valid until reset or this button is deleted.
+         */
+        void SetSecondaryAlphaLabel( const TDesC& aLabel );
+        
+        /**
+         * Enable or disable audio feedback for this button.
+         * @param   aEnable ETrue if audio feedback should be enabled.
+         *                  EFalse otherwise.
+         */
         void EnableAudioFeedback( const TBool aEnable );
 
+    public: //from CAknButton
+        
+        /**
+         * @see CAknButton
+         */
+        void HandleResourceChange( TInt aType );
+
+    protected: // from CAknButton
+        
+        /**
+         * @see CAknButton
+         */
+        void Draw(const TRect& aRect) const;
+        
+        /**
+         * @see CAknButton
+         */
+        void SizeChanged();
+        
     private:
+
         void UpdateIconL();
+        void DrawIconAndText( CWindowGc& aGc ) const;
+        void GetTextColors( TRgb& aPenColor, TRgb& aBrushColor ) const; 
+        void MapDialerIconToSkinIcon( TInt aDialerIcon, 
+                                      TAknsItemID& aItemId ) const; 
+        
+    private: // constructors    
+        
+        /**
+         * C++ constructor
+         * 
+         * @param aNumberLabel          The number (etc) of the key.
+         * @param aPrimaryAlphaLabel    The first row of alphabets of the key.
+         * @param aSecondaryAlphaLabel  The second row of alphabets of the key.
+         * @param aScanCode             The button scanCode. 
+         * @param aKeyCode              The button keyCode.
+         * @param aButtonIconId         The icon for the normal state.
+         * @param aButtonIconMaskId     The mask icon for the normal state.
+         * @param   aFlags              CAknButton flags
+         */ 
+        CDialerKeyPadButton( const TDesC& aNumberLabel,
+                             const TDesC& aPrimaryAlphaLabel,
+                             const TDesC& aSecondaryAlphaLabel,
+                             TInt aScanCode, 
+                             TInt aKeyCode,
+                             TMifDialer aButtonIconId, 
+                             TMifDialer aButtonIconMaskId,
+                             TInt aFlags );
+        
+        /**
+         * Symbian 2nd phase constructor.
+         *
+         * @param aFlags Flags of the button.
+         */
+        void ConstructL( TInt aFlags );
         
     private: // data
-    
-        CAknButton*  iButton;
-        
+
+        /** Scan code of the key */
         TInt iScanCode;
+        
+        /** Key code of the key */
         TInt iKeyCode;
-        TMifDialer iButtonIcon;
-        TMifDialer iButtonIconMask;
+        
+        /** ID of the icon bitmap */
+        TMifDialer iButtonIconId;
+        
+        /** ID of the icon mask */
+        TMifDialer iButtonIconMaskId;
+        
+        /** Layout variety to use */
+        TInt iVariety;
+        
+        /** Operation mode of the keypad */
+        TDialerOperationMode iOperationMode;
+        
+        /** Layout for number */
+        TAknLayoutText iNumberLayout;
+        
+        /** Layout for primary row of alphabets */
+        TAknLayoutText iPrimaryAlphaLayout;
+        
+        /** Layout for secondar row of alphabets */
+        TAknLayoutText iSecondaryAlphaLayout;
+        
+        /** Label containing the number or hash or asterisk */
+        TPtrC iNumberLabel;
+        
+        /** Label containing first row of alphabets */
+        TPtrC iPrimaryAlphaLabel;  
+        
+        /** Label containing second row of alphabets */
+        TPtrC iSecondaryAlphaLabel;
+        
+        /** Rect inside the button where icon is drawn (if available) */
+        TRect iIconRect;
     };
 
 #endif // C_CDIALERKEYPADBUTTON_H
--- a/phoneuis/dialer/inc/cdialerkeypadcontainer.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/inc/cdialerkeypadcontainer.h	Fri Feb 19 22:50:26 2010 +0200
@@ -26,12 +26,14 @@
 #include    <coemain.h>
 
 #include    "cdialercontainerbase.h"
+#include    "cdialerkeypadlabelmanager.h"
 
 // CONSTANTS
 
 // FORWARD DECLARATIONS
 class CDialerKeyPadButton;
 
+
 // CLASS DECLARATION
  
 /**
@@ -41,7 +43,8 @@
 *  @since S60 v5.0
 */
 NONSHARABLE_CLASS(CDialerKeyPadContainer) : public CDialerContainerBase, 
-                                            public MCoeForegroundObserver
+                                            public MCoeForegroundObserver,
+                                            public MDialerKeyPadLabelManagerCallback
     {
     public:  // Constructors and destructor
         
@@ -69,6 +72,19 @@
         
         void EnableTactileFeedback( const TBool aEnable );
         
+        // moved from private to public
+        /**
+        * @see CCoeControl
+        */        
+        void MakeVisible( TBool aVisible );
+        
+        /**
+         * Sets the operation mode. New mode takes effect once the
+         * size of the component is reset.
+         * @param   aOperatingMode  New operation mode.
+         */
+        void SetOperationMode( TDialerOperationMode aOperatingMode );
+        
     private:  // Functions from base classes
         
         /**
@@ -92,11 +108,6 @@
         void HandleResourceChange( TInt aType );   
         
         /**
-        * @see CCoeControl
-        */        
-        void MakeVisible( TBool aVisible );     
-        
-        /**
         * @see MCoeControlObserver
         */        
         void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType );      
@@ -111,6 +122,10 @@
         */         
         void HandleLosingForeground();      
         
+        /**
+         * @see MDialerKeyPadLabelManagerCallback
+         */
+        void KeyLabelsChanged();
         
     private: // From CDialerContainerBase
     
@@ -140,6 +155,11 @@
         void SetPhoneLayout();
 
         /**
+         * Set layout in Easy Dialing mode
+         */
+        void SetEasyDialingLayout();
+        
+        /**
         * Set layout in Video DTMF mode
         */
         void SetVideoLayout();
@@ -149,7 +169,6 @@
         */
         void CreateButtonsL();
         
-        
     private:    // Data
     
         TDialerOperationMode iOperatingMode;
@@ -174,6 +193,11 @@
          * Stores last pointer event. 
          */        
         TPointerEvent iPointerEvent;
+        
+        /**
+         * Helper to manage keypad button labels
+         */
+        CDialerKeyPadLabelManager* iKeyLabelManager;
     };
 
 #endif      // CDIALERKEYPADCONTAINER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/inc/cdialerkeypadlabelmanager.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,222 @@
+/*
+* 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:  Helper class to handle virtual keypad text labels
+*
+*/
+
+#ifndef CDIALERKEYPADLABELMANAGER_H
+#define CDIALERKEYPADLABELMANAGER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include "cdialercenrepwrapper.h"
+
+
+// FORWARD DECLARATIONS
+class CPtiEngine;
+class CEnvironmentChangeNotifier;
+
+
+// CALLBACK INTERFACE
+NONSHARABLE_CLASS( MDialerKeyPadLabelManagerCallback )
+    {
+public:
+    /**
+     * This event is given when change in system settings has
+     * caused key label texts to change. All the TPtrC descriptors
+     * previously returned by CDialerKeyPadLabelManager become
+     * dangling references when this happens and they must not
+     * be used after this method is called. 
+     */
+    virtual void KeyLabelsChanged() = 0;
+    };
+
+
+// CLASS DECLARATION
+
+/**
+ *  CDialerKeyPadLabelManager
+ * 
+ */
+NONSHARABLE_CLASS( CDialerKeyPadLabelManager ) : public CBase, public MDialerCenRepObserver
+    {
+public: // Constructors and destructor
+    
+    /**
+     * Destructor.
+     */
+    ~CDialerKeyPadLabelManager();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CDialerKeyPadLabelManager* NewL( CCoeEnv& aCoeEnv, 
+            MDialerKeyPadLabelManagerCallback& aObserver );
+
+    /**
+     * Two-phased constructor.
+     */
+    static CDialerKeyPadLabelManager* NewLC( CCoeEnv& aCoeEnv, 
+            MDialerKeyPadLabelManagerCallback& aObserver );
+
+private: // consturctors
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CDialerKeyPadLabelManager( CCoeEnv& aCoeEnv, 
+            MDialerKeyPadLabelManagerCallback& aObserver );
+
+    /**
+     * Symbian default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+public: // methods
+    
+    /**
+     * Get number label for the button.
+     * @return   Reference to the number text in current global number mode. 
+     *           The reference is valid until this label manager is deleted or 
+     *           global number mode is changed. Callback KeyLabelsChanged()
+     *           is given to observer in the latter case.
+     */        
+    TPtrC ButtonNumLabel( TInt aIndex ) const;
+    
+    /**
+     * Get first row alphabet label for the button
+     * @return  Reference to descriptor containing text for the first
+     *          row of alphabets to be shown on the key. The reference is
+     *          valid until this label manager is deleted or input language
+     *          is changed. Callback KeyLabelsChanged()
+     *          is given to observer in the latter case.        
+     */        
+    TPtrC ButtonFirstAlphaLabel( TInt aIndex ) const;
+    
+    /**
+     * Get second row alphabet label for the button
+     * @return  Reference to descriptor containing text for the first
+     *          row of alphabets to be shown on the key. The reference is
+     *          valid until this label manager is deleted or input language
+     *          is changed. Callback KeyLabelsChanged()
+     *           is given to observer in the latter case.
+     */        
+    TPtrC ButtonSecondAlphaLabel( TInt aIndex ) const;
+
+public: // from MDialerCenRepObserver
+    
+    /**
+     * Handle change in one of the observed repositories.
+     */
+    void HandleRepositoryChange( TUid aRepository, TUint32 aId );
+    
+private: // methods
+    
+    /**
+     * Handle environment change event. We are interested about digit
+     * type changes in locale data.
+     */
+    void HandleEnvChange();
+    
+    /**
+     * Static wrapper for HandleEnvChange() function to be passed in TCallBack object.
+     */
+    static TInt EnvChangeCallback( TAny* aSelfPtr );
+    
+    /**
+     * Update button text labels to match current input and UI language.
+     */
+    void UpdateTextLabelsL();
+    
+    /**
+     * Update button number labels to use current global number mode.
+     */
+    void UpdateNumLabelsL();
+    
+    /**
+     * Get the full path of the keypad resource file to be used in current situation.
+     * @param   aFileName   On return, contains the file name. Caller is responsible
+     *                      of supplying large enough buffer. Maximum path length
+     *                      in Symbian is 256 characters.
+     */
+    void GetResourceFileNameL( TDes& aFileName );
+    
+    /**
+     * Returns code of the script to be used in current situation.
+     * It depends on the current input language, current UI language, and all
+     * available input languages on the device.
+     */
+    TInt LabelScriptToUseL() const;
+    
+    /**
+     * Returns code of the Chinese script to be used in key labels.
+     * This depends on the currently active Chinese adaptive search mode.
+     * This should be used only when current input language is Chinese.
+     */
+    TInt ChineseScriptToUseL() const;
+    
+private: // data
+    
+    /** Control environment to use for resource management */
+    CCoeEnv& iCoeEnv;
+    
+    /** Observer is notified when keypad labels are changed */
+    MDialerKeyPadLabelManagerCallback& iObserver;
+    
+    /** PtiEngine instance is needed to find out available input languages */
+    CPtiEngine* iPtiEngine;
+    
+    /** AknFep repository stores the current input language */
+    CDialerCenRepWrapper* iAknFepRepository;
+    
+    /** Avkon repository stores the current Chinese matching mode */
+    CDialerCenRepWrapper* iAvkonRepository;
+    
+    /** Helper to observe locale changes. Locale data contains digit type used for number labels. */
+    CEnvironmentChangeNotifier* iEnvChangeNotifier;
+    
+    /** 
+     * Array of number labels. Indexing matches that of the 
+     * CDialerKeypadContainer::iButtons array. Owned. 
+     */
+    CDesCArray* iKeypadNumLabelArray;
+    
+    /** 
+     * Array of first row alphabet labels. Indexing matches that of the 
+     * CDialerKeypadContainer::iButtons array. Owned. 
+     */
+    CDesCArray* iKeypadFirstLabelArray;
+    
+    /** 
+     * Array of second row alphabet labels. Indexing matches that of the 
+     * CDialerKeypadContainer::iButtons array. Owned. 
+     */
+    CDesCArray* iKeypadSecondLabelArray;
+    
+    /** 
+     * Offset value of currently loaded keypad resource. 
+     * 0 if there's no loaded resource. 
+     */
+    TInt iResourceOffset;
+    
+    /** Script ID of the current keypad labels */
+    TInt iLabelScriptInUse;
+    
+    /** Digit type currently used for keypad number labels */
+    TDigitType iDigitTypeInUse;
+    };
+
+#endif // CDIALERKEYPADLABELMANAGER_H
+
--- a/phoneuis/dialer/inc/cdialernumberentry.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/inc/cdialernumberentry.h	Fri Feb 19 22:50:26 2010 +0200
@@ -28,6 +28,7 @@
 #include <AknPhoneNumberEditor.h>
 
 #include "cdialercontainerbase.h"
+#include "dialer.hrh"
 
 // CONSTANTS
 
@@ -37,7 +38,7 @@
 class CAknsFrameBackgroundControlContext;
 class MNumberEntryObserver;
 class CEikLabel;
-
+class CDialingExtensionInterface;
 
 // Number entry varietys
 enum TDialerNEVariety
@@ -111,10 +112,16 @@
         void SetTextToNumberEntry( const TDesC& aDesC );
 
         /**
+        * Returns TPtrC pointed to editor text.
+        * @return   Pointer to editor text.
+        */
+        TPtrC Text() const;
+        
+        /**
         * Get tect from number entry.
-        * @param aDesc Text is returned here.
+        * @param aDes Text is returned here.
         */
-        void GetTextFromNumberEntry( TDes& aDesC );
+        void GetTextFromNumberEntry( TDes& aDes );
 
         /**
         * Reset editor to default values.
@@ -143,7 +150,13 @@
         * Clear editor flags to default values.
         */
         void ClearEditorFlags();
+
+        void SetEasyDialingPlugin( CDialingExtensionInterface* iEasyDialer );
         
+        void SetOperationMode( TDialerOperationMode aMode );
+        
+        TBool Validate( const TDesC& aString );
+
     private:  // Functions from MCoeControlObserver
         /**
         * @see MCoeControlObserver
@@ -178,12 +191,22 @@
         */
         void HandleResourceChange( TInt aType );        
 
+        /**
+        * @see CCoeControl
+        */
+        void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+
     public:        
         /**
         * @see CCoeControl
         */
         void SetFocus( TBool aFocus, 
                        TDrawNow aDrawNow=ENoDrawNow );
+					   
+		/**
+        * @see CCoeControl
+        */			   
+        void MakeVisible( TBool aVisible );
    
     private: // From CDialerContainerBase
 
@@ -289,6 +312,16 @@
         MNumberEntryObserver* iObserver;    
         
         TBool iNumberContents;  
+        
+        TBuf<KDialerPhoneNumberEntryBufferSize> iPreviousNumberEntryContent;
+
+        // NOT OWN
+        CDialingExtensionInterface* iEasyDialer;
+        
+        TDialerOperationMode iOperationMode;
+        
+        // NOT OWNED.
+        CEikAppUi* iAppUi;
     };
 
 #endif      // CDIALERNUMBERENTRY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/inc/cdialertoolbarcontainer.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,129 @@
+/*
+* 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:  CDialerToolbarContainer replaces the standard S60 toolbar
+*               in the Dialer layout in the Easy dialing mode. It's 
+*               responsible of the toolbar layout and logic, but not of the 
+*               contents which are provided by an instance of 
+*               MPhoneDialerController.
+*
+*/
+
+#ifndef CDIALERTOOLBAR_H_
+#define CDIALERTOOLBAR_H_
+
+// INCLUDES
+#include <mphonedialercontroller.h>
+#include "cdialercontainerbase.h"
+
+// FORWARD DECLARATIONS
+class CAknButton;
+
+
+// CLASS DECLARATION
+NONSHARABLE_CLASS(CDialerToolbarContainer) : 
+    public CDialerContainerBase, 
+    private MCoeForegroundObserver
+    {
+public: // constructor and destructor
+    static CDialerToolbarContainer* NewL( 
+            CCoeControl& aParent, 
+            MPhoneDialerController* aContentProvider );
+    virtual ~CDialerToolbarContainer();
+
+private: // constructors
+    CDialerToolbarContainer( 
+            CCoeControl& aParent,
+            MPhoneDialerController* aContentProvider );
+    void ConstructL();
+
+public: // new methods
+    /**
+     * Set provider of toolbar button functions
+     */
+    void SetContentProviderL( MPhoneDialerController* aProvider );
+    
+    /**
+     * Update states of all toolbar buttons.
+     */
+    void UpdateButtonStates();
+
+protected: // from CDialerContainerBase
+    virtual void SetVariety();
+    virtual void SetLayout();
+    
+protected: // from CCoeControl
+    TInt CountComponentControls() const;
+    CCoeControl* ComponentControl( TInt aIndex ) const;
+    void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+
+private: // from MCoeControlObserver
+    /**
+     * Callback for handling button presses.
+     */
+    void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
+
+private: // from MCoeForegroundObserver
+    void HandleGainingForeground();
+    void HandleLosingForeground();
+    
+private: // new methods
+    
+    /**
+     * Create toolbar button instances and fill them with states
+     * according the data given by the content provider.
+     */
+    void CreateButtonsL();
+    
+    /**
+     * Delete all buttons and free the memory reserved for button data.
+     */
+    void DeleteButtons();
+    
+    /**
+     * Create and add new button state.
+     */
+    void AddButtonStateL( TInt aButtonIndex, MPhoneDialerController::CButtonData& aButtonData );
+    
+    /**
+     * Get command ID for the given button in it's current state.
+     */
+    TInt ButtonCommand( const CAknButton& aButton ) const;
+    
+    /**
+     * Set layout for one button.
+     * @param   aButtonIdx  Index of the button to be laid out.
+     * @param   aPos        Position (top-left corned) where button is to be placed.
+     * @return  Position of the next button.
+     */
+    TPoint LayoutButton( TInt aButtonIdx, TPoint aPos );
+    
+private: // data
+    
+    /** Provides toolbar button data. Not owned. */
+    MPhoneDialerController* iContentProvider;
+    
+    /** Button objects. Owned. */
+    RPointerArray< CAknButton > iButtons;
+    
+    /** 
+     * Maps buttons states to command IDs. 
+     * First index is the button index, second index is the state index.
+     */
+    RArray< RArray<TInt> > iButtonCommands;
+        
+    /** The last received pointer event. */
+    TPointerEvent iLatestPointerEvent;
+    };
+
+#endif /* CDIALERTOOLBAR_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/inc/cdialingextensionobserver.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,89 @@
+/*
+* 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:  CDialingExtensionObserver provides an observer class for 
+*               dialingextension plug-in.
+*
+*/
+
+#ifndef CDIALINGEXTENSIONOBSERVER_H
+#define CDIALINGEXTENSIONOBSERVER_H
+
+#include <dialingextensioninterface.h>
+
+class CDialingExtensionInterface;
+class CDialerNumberEntry;
+class CDialer;
+
+
+NONSHARABLE_CLASS( CDialingExtensionObserver ) : public CBase, public MDialingExtensionObserver
+    {
+public:
+    
+    /**
+    * Two phase constructor
+    * @param aDialingExtension  Dialer extension. Does not take ownership.
+    * @param aNumberEditor      Number editor. Does not take ownership.
+    * @param aDialer            Dialer. Does not take ownership.
+    * @return New instance
+    */
+    static CDialingExtensionObserver* NewL( 
+            CDialingExtensionInterface* aDialingExtension, 
+            CDialerNumberEntry* aNumberEntry,
+            CDialer* aDialer );
+    
+    /**
+     * Destructor
+     */
+    ~CDialingExtensionObserver();
+    
+    /**
+    * MDialingExtensionObserver function.
+    */
+    void HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent );
+    
+private:
+    
+    
+    /**
+    * Cconstructor
+    * @param aDialingExtension  Dialer extension. Does not take ownership.
+    * @param aNumberEditor      Number editor. Does not take ownership.
+    * @param aDialer            Dialer. Does not take ownership.
+    */
+    CDialingExtensionObserver( 
+            CDialingExtensionInterface* aDialingExtension, 
+            CDialerNumberEntry* aNumberEntry,
+            CDialer* aDialer );
+    
+    void UpdateCba();
+    
+    void SearchL();
+    
+private:
+    
+    // Not owned.
+    CDialingExtensionInterface* iDialingExtension;
+    
+    // Not owned.
+    CDialerNumberEntry* iNumberEntry;
+    
+    // Not owned.
+    CDialer* iDialer;
+    
+    // Not owned.
+    CEikonEnv* iEikonEnvironment;    
+    };
+
+#endif // CDIALINGEXTENSIONOBSERVER_H
+
--- a/phoneuis/dialer/inc/dialer.hrh	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/inc/dialer.hrh	Fri Feb 19 22:50:26 2010 +0200
@@ -101,7 +101,8 @@
     {
     EModeDialer, // Phone Dialer
     EModeVoiceDTMF, // Phone DTMF string query 
-    EModeVideoDTMF // Video telephony DTMF send
+    EModeVideoDTMF, // Video telephony DTMF send
+    EModeEasyDialing // Easy dialing mode
     };
 
 enum TVideoVariety 
--- a/phoneuis/dialer/inc/dialercommon.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/inc/dialercommon.h	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -35,6 +35,27 @@
 // ROM drive.
 _LIT( KDriveZ, "z:" );
 
+// Application name literal for panic macro
+_LIT( KModuleName, "Dialer" );
+
+// Panic macro
+inline void DialerPanic( TInt aReason )
+    {
+    User::Panic( KModuleName, aReason );
+    }
+
+// Panic codes
+enum TDialerPanicCode 
+    {
+    EDialerPanicDrawingError = 100,
+    EDialerPanicNoApplicationInstance,
+    EDialerPanicUnknownScript,
+    EDialerPanicChineseScriptError,
+    EDialerPanicLabelNotFound,
+    EDialerPanicToolbarButtonNotFound,
+    EDialerPanicNullController
+    };
+
 #endif // DIALERCOMMON_H
 
 // End of file
--- a/phoneuis/dialer/inc/mnumberentry.h	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/inc/mnumberentry.h	Fri Feb 19 22:50:26 2010 +0200
@@ -29,6 +29,7 @@
 
 // FORWARD DECLARATIONS
 class CCoeControl;
+class CEikMenuPane; // easydialing
 
 // CLASS DECLARATION
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/rom/dialer_variant.iby	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* 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: Image description file for variable resouces of Dialer
+*
+*/
+
+
+#ifndef DIALER_VARIANT_IBY
+#define DIALER_VARIANT_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+// NOTE: It's necessary to include keypad resources only to those scripts
+// which are present in the device. However, including them all doens't hurt
+// either and each resource file is quite small.
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad.rsc            RESOURCE_FILES_DIR\dialerkeypad.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_cyrillic.rsc   RESOURCE_FILES_DIR\dialerkeypad_cyrillic.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_greek.rsc      RESOURCE_FILES_DIR\dialerkeypad_greek.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_hebrew.rsc     RESOURCE_FILES_DIR\dialerkeypad_hebrew.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_arabic.rsc     RESOURCE_FILES_DIR\dialerkeypad_arabic.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_farsi.rsc      RESOURCE_FILES_DIR\dialerkeypad_farsi.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_urdu.rsc       RESOURCE_FILES_DIR\dialerkeypad_urdu.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_thai.rsc       RESOURCE_FILES_DIR\dialerkeypad_thai.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_devanagari.rsc RESOURCE_FILES_DIR\dialerkeypad_devanagari.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_chn_pinyin.rsc RESOURCE_FILES_DIR\dialerkeypad_chn_pinyin.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_chn_stroke.rsc RESOURCE_FILES_DIR\dialerkeypad_chn_stroke.rsc
+data = DATAZ_\RESOURCE_FILES_DIR\dialerkeypad_chn_zhuyin.rsc RESOURCE_FILES_DIR\dialerkeypad_chn_zhuyin.rsc
+
+#endif // DIALER_VARIANT_IBY
--- a/phoneuis/dialer/src/cdialer.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/src/cdialer.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -31,20 +31,24 @@
 #include <data_caging_path_literals.hrh>    // for KDC_APP_RESOURCE_DIR
 #include <bautils.h>                        // for BaflUtils
 #include <aknedsts.h>
+#include <dialingextensioninterface.h>
+#include <dialer.rsg>
 
 #include "cdialer.h"
 #include "dialercommon.h"
-#include <dialer.rsg>
 #include "dialer.hrh"
 #include "cdialerkeypadcontainer.h"
 #include "cdialernumberentry.h"
 #include "dialertrace.h"
 #include "mnumberentry.h"
+#include "cdialingextensionobserver.h"
+#include "cdialertoolbarcontainer.h"
 
 /// ROM drive.
 _LIT( KDialerResourceFile, "dialer.rsc" );
-// number entry, keypad area
-const TInt KContainedControlsInTelephonyMode = 2;  
+
+// number entry, keypad area, easydialing, toolbar
+const TInt KContainedControlsInTelephonyMode = 4;  
 
 // ========================= MEMBER FUNCTIONS ================================
 
@@ -55,12 +59,13 @@
 // ---------------------------------------------------------------------------
 //
 EXPORT_C CDialer* CDialer::NewL( const CCoeControl& aContainer, 
-                                 const TRect& aRect )
+                                 const TRect& aRect,
+                                 MPhoneDialerController* aController )
     {
-    CDialer* self = new( ELeave )CDialer ( );    
+    CDialer* self = new( ELeave )CDialer();
     CleanupStack::PushL( self );
-    self->ConstructL( aContainer , aRect );
-    CleanupStack::Pop();    // self
+    self->ConstructL( aContainer, aRect, aController );
+    CleanupStack::Pop( self );
     return self;
     }
 
@@ -73,6 +78,10 @@
     delete iKeypadArea;
     delete iNumberEntry;
 
+    delete iEasyDialer;
+    delete iDialingExtensionObserver;
+    delete iToolbar;
+
     UnLoadResources();
     DIALER_PRINT("CDialer::~CDialer>"); 
     }
@@ -85,7 +94,8 @@
 //
 void CDialer::ConstructL( 
     const CCoeControl& aContainer, 
-    const TRect& aRect )
+    const TRect& aRect,
+    MPhoneDialerController* aController )
     {    
     DIALER_PRINT("CDialer::ConstructL<");	
     LoadResourceL();    
@@ -93,16 +103,28 @@
     // set window
     SetContainerWindowL( aContainer );
     SetParent( const_cast<CCoeControl*>(&aContainer) );
-    iParentControl = &aContainer;
 
     iNumberEntry = CDialerNumberEntry::NewL( *this );    
 
-    iKeypadArea = CDialerKeyPadContainer::NewL( *this,  EModeDialer );    
+    iController = aController;
+    
+    iKeypadArea = CDialerKeyPadContainer::NewL( *this, EModeEasyDialing );    
     
+    iToolbar = CDialerToolbarContainer::NewL( *this, iController );
+
+    // try to create easydialing plugin. If plugin is not present, iEasydialer gets value NULL.
+    LoadEasyDialingPlugin();
+
+    iNumberEntry->SetEasyDialingPlugin( iEasyDialer );
+    iNumberEntry->SetObserver( this );
+    iNumberEntry->SetNumberEntryPromptTextL( iController->NumberEntryPromptTextL() );
+
+    UpdateToolbar();
+
     SetRect( aRect );
     
-    SetComponentsToInheritVisibility( ETrue );
-    
+    SetComponentsToInheritVisibility( EFalse );
+
     ActivateL();
     DIALER_PRINT("CDialer::ConstructL>");
     }
@@ -136,6 +158,59 @@
     iNumberEntry->SetNumberEntryObserver( aObserver );  
     }
 
+// -----------------------------------------------------------------------------
+// CDialer::SetControllerL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CDialer::SetControllerL( MPhoneDialerController* aController )
+    {
+    DIALER_PRINTF( "CDialer::SetControllerL, aController = %x", aController );
+    __ASSERT_DEBUG( aController, DialerPanic(EDialerPanicNullController) );
+    if ( aController && iController != aController )
+        {
+        iController = aController;
+        iToolbar->SetContentProviderL( iController );
+        iNumberEntry->SetNumberEntryPromptTextL( iController->NumberEntryPromptTextL() );
+        SizeChanged();
+        UpdateToolbar();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CDialer::Controller
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MPhoneDialerController* CDialer::Controller()
+    {
+    return iController;
+    }
+            
+// ---------------------------------------------------------------------------
+// CDialer::GetEasyDialingInterface
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CDialingExtensionInterface* CDialer::GetEasyDialingInterface() const
+    {
+    DIALER_PRINT("CDialer::GetEasyDialingInterface");
+    return iEasyDialer;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialer::UpdateToolbar
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CDialer::UpdateToolbar()
+    {
+    if ( iToolbar && iNumberEntry && iController )
+        {
+        TBool numAvailable = ( iNumberEntry->TextLength() > 0 );
+        iController->SetNumberEntryIsEmpty( !numAvailable );
+        iToolbar->UpdateButtonStates();
+        iToolbar->DrawDeferred();
+        iKeypadArea->DrawDeferred(); // needed to remove drawing problem from leftmost button column
+        }
+    }
+
 // Methods from MNumberEntry
 
 // ---------------------------------------------------------------------------
@@ -149,7 +224,7 @@
     DIALER_PRINT("CDialer::CreateNumberEntry<");
     
     iIsUsed = ETrue;    
-    
+
     DIALER_PRINT("CDialer::CreateNumberEntry>");        
     }
     
@@ -158,7 +233,7 @@
 //  
 // ---------------------------------------------------------------------------
 //
-CCoeControl* CDialer::GetNumberEntry( ) const
+CCoeControl* CDialer::GetNumberEntry() const
     {
     CCoeControl* control( NULL );
     control = iNumberEntry->GetNumberEntry();
@@ -170,7 +245,7 @@
 //  
 // ---------------------------------------------------------------------------
 //
-TBool CDialer::IsNumberEntryUsed( ) const
+TBool CDialer::IsNumberEntryUsed() const
     {
     return iIsUsed;
     }
@@ -199,9 +274,9 @@
 //  
 // ---------------------------------------------------------------------------
 //
-void CDialer::GetTextFromNumberEntry( TDes& aDesC )
+void CDialer::GetTextFromNumberEntry( TDes& aDes )
     {
-    iNumberEntry->GetTextFromNumberEntry( aDesC );
+    iNumberEntry->GetTextFromNumberEntry( aDes );
     }
     
 // ---------------------------------------------------------------------------
@@ -209,10 +284,18 @@
 //  
 // ---------------------------------------------------------------------------
 //
-void CDialer::RemoveNumberEntry( )
+void CDialer::RemoveNumberEntry()
     {
     ResetEditorToDefaultValues();
     iIsUsed = EFalse;
+
+    // easydialer change begins
+    if (iEasyDialer)
+        {
+        TRAP_IGNORE( iEasyDialer->HandleCommandL( EEasyDialingClosePopup ) );
+        iEasyDialer->Reset();
+        }
+    // easydialer change ends
     }
     
 // ---------------------------------------------------------------------------
@@ -281,6 +364,30 @@
     iKeypadArea->EnableTactileFeedback( aEnable );
     }
 
+// ---------------------------------------------------------------------------
+// CDialer::HandleControlEventL
+// ---------------------------------------------------------------------------
+//
+void CDialer::HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType )
+    {
+    switch ( aEventType )
+        {
+        case MCoeControlObserver::EEventRequestFocus:
+            if ( aControl == iNumberEntry )
+                {
+                if ( iEasyDialer )
+                    {
+                    iEasyDialer->SetFocus( EFalse );
+                    }
+                iNumberEntry->SetFocus( ETrue );
+                }
+            break;
+            
+        default:
+            break;
+        }
+    }
+
 // Functions from CCoeControl
 
 // ---------------------------------------------------------------------------
@@ -293,7 +400,7 @@
 void CDialer::SizeChanged()
     {
     AknsUtils::RegisterControlPosition( this );
-    TRect parentRect(Rect()); 
+    TRect parentRect( Rect() );
        
     // Method is called before containers are created.
     if ( !iKeypadArea )
@@ -301,19 +408,32 @@
         return;
         }
         
-    TDialerVariety variety( EDialerVarietyLandscape );
-    if (  !Layout_Meta_Data::IsLandscapeOrientation() )
-        {
-        variety = EDialerVarietyPortrait;
-        }            
-    // number entry
-    AknLayoutUtils::LayoutControl(
-        iNumberEntry, parentRect, 
-        AknLayoutScalable_Apps::dialer2_ne_pane( variety ).LayoutLine() );
-    // keypad area.
+    TDialerVariety variety = ( Layout_Meta_Data::IsLandscapeOrientation() ?
+        EDialerVarietyLandscape : EDialerVarietyPortrait );
+    
+    // keypad area
+    TDialerOperationMode keypadOpMode = 
+            ( EasyDialingEnabled() ? EModeEasyDialing : EModeDialer );
+    iKeypadArea->SetOperationMode( keypadOpMode );
     AknLayoutUtils::LayoutControl(
         iKeypadArea, parentRect, 
-        AknLayoutScalable_Apps::grid_dialer2_keypad_pane( variety ).LayoutLine() );
+        AknLayoutScalable_Apps::dia3_keypad_num_pane( variety ).LayoutLine() );
+
+    // toolbar
+    AknLayoutUtils::LayoutControl(
+        iToolbar, parentRect, 
+        AknLayoutScalable_Apps::dia3_keypad_fun_pane( variety ).LayoutLine() );
+
+    // easy dial contacts list
+    if ( iEasyDialer )
+        {
+        AknLayoutUtils::LayoutControl(
+            iEasyDialer, parentRect, 
+            AknLayoutScalable_Apps::dia3_listscroll_pane( variety ).LayoutLine() );
+        }
+
+    // number entry
+    LayoutNumberEntry( parentRect, variety );   
     }
 
 // ---------------------------------------------------------------------------
@@ -333,8 +453,12 @@
 //
 TInt CDialer::CountComponentControls() const
     {
-    TInt count(0);
-    count = KContainedControlsInTelephonyMode;
+    TInt count( KContainedControlsInTelephonyMode );
+    
+    if ( !iEasyDialer )
+        {
+        count--;
+        }
     return count;
     }
     
@@ -347,7 +471,7 @@
 CCoeControl* CDialer::ComponentControl( TInt aIndex ) const
     {
     CCoeControl* currentControl(NULL);
-    currentControl = ComponentControlForDialerMode( aIndex);
+    currentControl = ComponentControlForDialerMode( aIndex );
     return currentControl;
     } 
 
@@ -365,7 +489,17 @@
 //
 void CDialer::FocusChanged(TDrawNow aDrawNow)
     {
-    iNumberEntry->SetFocus( IsFocused(), aDrawNow );    
+    if ( iEasyDialer )
+        {           
+        // Number entry is set to focus if dialer is in focus and easydialing plugin
+        // is not in focus.
+        TBool numberEntryFocus = IsFocused() && !iEasyDialer->IsFocused();
+        iNumberEntry->SetFocus( numberEntryFocus, aDrawNow );
+        }
+    else
+        {
+        iNumberEntry->SetFocus( IsFocused(), aDrawNow );    
+        }
     }
     
 // ---------------------------------------------------------------------------
@@ -373,9 +507,32 @@
 // ---------------------------------------------------------------------------
 //
 void CDialer::MakeVisible( TBool aVisible )
-	{
-	CCoeControl::MakeVisible( aVisible );
-	}
+    {
+    CCoeControl::MakeVisible( aVisible );
+
+    // Component control do not inherit visibility automatically as we
+    // want to control their visibility separately.
+    if ( iNumberEntry )
+        {
+        iNumberEntry->MakeVisible( aVisible );
+        }
+
+    if ( iKeypadArea )
+        {
+        iKeypadArea->MakeVisible( aVisible );
+        }
+
+    if ( iEasyDialer )
+        {
+        TBool edVisible = 
+            ( aVisible && EasyDialingEnabled() );
+        iEasyDialer->MakeVisible( edVisible );
+        }
+    if ( iToolbar )
+        {
+        iToolbar->MakeVisible( aVisible );
+        }
+    }
 
 // ---------------------------------------------------------------------------
 // CDialer::PrepareForFocusGainL
@@ -471,6 +628,14 @@
         case 1:
             currentControl = iKeypadArea;
             break;
+            
+        case 2:
+            currentControl = iToolbar;
+            break;
+        case 3:
+            currentControl = iEasyDialer;
+            break;
+            
         default:
             {
             __ASSERT_DEBUG( EFalse, _L("CDialer::ComponentControl no such component defined"));
@@ -524,4 +689,74 @@
                     MAknEdStateObserver::EAknEdwinStateEventStateUpdate );
     }
 
+// ---------------------------------------------------------------------------
+// CDialer::LoadEasyDialingPlugin
+// ---------------------------------------------------------------------------
+//
+void CDialer::LoadEasyDialingPlugin()
+    {
+    DIALER_PRINT( "CDialer::LoadEasyDialingPlugin" )
+    TRAPD( error, 
+        {
+        iEasyDialer = CDialingExtensionInterface::NewL();
+        iEasyDialer->InitializeL( *this );
+        
+        iDialingExtensionObserver = CDialingExtensionObserver::NewL( iEasyDialer, iNumberEntry, this );
+        iEasyDialer->AddObserverL( iDialingExtensionObserver );
+        } );
+
+    if ( error )
+        {
+        DIALER_PRINT( "CDialer::LoadEasyDialingPlugin, load failed" )
+                
+        delete iEasyDialer;        
+        iEasyDialer = NULL;
+        
+        delete iDialingExtensionObserver;
+        iDialingExtensionObserver = NULL;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CDialer::EasyDialingEnabled
+// ---------------------------------------------------------------------------
+//
+TBool CDialer::EasyDialingEnabled() const
+    {
+    TBool easyDialEnabled = ( iEasyDialer &&
+                              iEasyDialer->IsEnabled() &&
+                              iController &&
+                              iController->EasyDialingAllowed() );
+    return easyDialEnabled;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialer::LayoutNumberEntry
+// ---------------------------------------------------------------------------
+//
+void CDialer::LayoutNumberEntry( const TRect& aParent, TInt aVariety )
+    {
+    // Use larger number entry if Easy dialing is not currently enabled.
+    if ( EasyDialingEnabled() )
+        {
+        iNumberEntry->SetOperationMode( EModeEasyDialing );
+        AknLayoutUtils::LayoutControl(
+            iNumberEntry, aParent, 
+            AknLayoutScalable_Apps::dia3_numentry_pane( aVariety ).LayoutLine() );
+        }
+    else
+        {
+        iNumberEntry->SetOperationMode( EModeDialer );
+        TAknLayoutRect neLayoutRect;
+        neLayoutRect.LayoutRect( aParent, AknLayoutScalable_Apps::dia3_numentry_pane( aVariety ) );
+        TAknLayoutRect edLayoutRect;
+        edLayoutRect.LayoutRect( aParent, AknLayoutScalable_Apps::dia3_listscroll_pane( aVariety ) );
+
+        // create rect which is union of layout rects for ED and NE
+        TRect neRect( edLayoutRect.Rect().iTl, neLayoutRect.Rect().iBr );
+
+        iNumberEntry->SetRect( neRect );
+        }
+    }
+
 // End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/src/cdialercenrepwrapper.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,111 @@
+/*
+* 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:  Wrapper class for Central Repository handling.
+*               Using this helper class is most helpful when one class needs
+*               to observe state changes in several repositories.
+*/
+
+#include <centralrepository.h>
+#include "cdialercenrepwrapper.h"
+
+// ---------------------------------------------------------------------------
+// CDialerCenRepWrapper::CDialerCenRepWrapper
+//
+// ---------------------------------------------------------------------------
+//
+CDialerCenRepWrapper::CDialerCenRepWrapper( 
+        MDialerCenRepObserver& aObserver, TUid aRepository ) :
+    iObserver( aObserver ), iRepositoryId( aRepository )
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerCenRepWrapper::~CDialerCenRepWrapper
+//
+// ---------------------------------------------------------------------------
+//
+CDialerCenRepWrapper::~CDialerCenRepWrapper()
+    {
+    if ( iCenRepNotifyHandler )
+        {
+        iCenRepNotifyHandler->StopListening();
+        delete iCenRepNotifyHandler;
+        }
+    delete iRepository;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerCenRepWrapper::NewLC
+//
+// ---------------------------------------------------------------------------
+//
+CDialerCenRepWrapper* CDialerCenRepWrapper::NewLC( 
+        MDialerCenRepObserver& aObserver, TUid aRepository )
+    {
+    CDialerCenRepWrapper* self = 
+            new (ELeave) CDialerCenRepWrapper( aObserver, aRepository );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerCenRepWrapper::NewL
+//
+// ---------------------------------------------------------------------------
+//
+CDialerCenRepWrapper* CDialerCenRepWrapper::NewL( 
+        MDialerCenRepObserver& aObserver, TUid aRepository )
+    {
+    CDialerCenRepWrapper* self = 
+            CDialerCenRepWrapper::NewLC( aObserver, aRepository );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerCenRepWrapper::ConstructL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerCenRepWrapper::ConstructL()
+    {
+    iRepository = CRepository::NewL( iRepositoryId );
+    iCenRepNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iRepository );
+    iCenRepNotifyHandler->StartListeningL();
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerCenRepWrapper::HandleNotifyGeneric
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerCenRepWrapper::HandleNotifyGeneric( TUint32 aId )
+    {
+    iObserver.HandleRepositoryChange( iRepositoryId, aId );
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerCenRepWrapper::Get
+//
+// ---------------------------------------------------------------------------
+//
+TInt CDialerCenRepWrapper::Get( TUint32 aKey, TInt& aValue )
+    {
+    return iRepository->Get( aKey, aValue );
+    }
+
+// end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/src/cdialerkeypadbutton.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,460 @@
+/*
+* 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:  Shows number keypad and generates keypress event when 
+*                 buttons are pressed.
+*
+*/
+
+
+// INCLUDE FILES
+#include <gulicon.h>
+#include <aknutils.h>
+#include <aknbutton.h>
+#include <akncontrol.h>
+#include <aknsutils.h>
+#include <aknsskininstance.h>
+#include <aknsdrawutils.h>
+#include <data_caging_path_literals.hrh> // for KDC_APP_RESOURCE_DIR
+#include <touchfeedback.h>
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <aknsframebackgroundcontrolcontext.h>
+
+#include "dialercommon.h"
+#include "dialertrace.h"
+#include "cdialerkeypadbutton.h"
+
+_LIT( KDialerMifFileName, "dialer.mif" );
+static const TInt KIconMarginPercent = 5;
+static const TInt KCent = 100;
+
+// ---------------------------------------------------------------------------
+// C++ default constructor
+// ---------------------------------------------------------------------------
+//
+CDialerKeyPadButton::CDialerKeyPadButton( const TDesC& aNumberLabel,
+                                          const TDesC& aPrimaryAlphaLabel,
+                                          const TDesC& aSecondaryAlphaLabel,
+                                          TInt aScanCode, 
+                                          TInt aKeyCode,
+                                          TMifDialer aButtonIconId, 
+                                          TMifDialer aButtonIconMaskId,
+                                          TInt aFlags ):
+        CAknButton( aFlags ), 
+        iScanCode( aScanCode ), 
+        iKeyCode( aKeyCode ),
+        iButtonIconId( aButtonIconId ),
+        iButtonIconMaskId( aButtonIconMaskId ),
+        iNumberLabel( aNumberLabel ),
+        iPrimaryAlphaLabel( aPrimaryAlphaLabel ),
+        iSecondaryAlphaLabel( aSecondaryAlphaLabel )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CDialerKeyPadButton::NewLC
+// Two-phased constructor.
+// Constructs dialer button.
+// -----------------------------------------------------------------------------
+//
+
+CDialerKeyPadButton* CDialerKeyPadButton::NewLC( const TDesC& aNumberLabel,
+                                                 const TDesC& aPrimaryAlphaLabel,
+                                                 const TDesC& aSecondaryAlphaLabel,
+                                                 TInt aScanCode, 
+                                                 TInt aKeyCode,
+                                                 TMifDialer aButtonIconId, 
+                                                 TMifDialer aButtonIconMaskId,
+                                                 TInt aFlags )
+    {
+    CDialerKeyPadButton* self = new (ELeave) CDialerKeyPadButton( aNumberLabel, 
+                                                                  aPrimaryAlphaLabel, 
+                                                                  aSecondaryAlphaLabel, 
+                                                                  aScanCode, 
+                                                                  aKeyCode,
+                                                                  aButtonIconId,
+                                                                  aButtonIconMaskId,
+                                                                  aFlags );
+    CleanupStack::PushL( self );
+    self->ConstructL( aFlags );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CDialerKeyPadButton::ConstructL
+// Symbian 2nd phase constructor for dialer button.
+// -----------------------------------------------------------------------------
+//
+void CDialerKeyPadButton::ConstructL( TInt aFlags )
+    {
+    CAknButton::ConstructL( NULL, NULL, NULL, NULL, KNullDesC, KNullDesC, aFlags );
+    UpdateIconL();
+    
+    // button text color
+    SetTextColorIds( KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG65 );
+    SetIconScaleMode( EAspectRatioPreserved );
+    SetMargins( TMargins8(0,0,0,0) );
+    AknsUtils::RegisterControlPosition( this );
+    }
+	
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CDialerKeyPadButton::~CDialerKeyPadButton()
+    {
+    AknsUtils::DeregisterControlPosition( this );
+    
+    MTouchFeedback* feedback = MTouchFeedback::Instance();
+    if ( feedback )
+        {
+        feedback->RemoveFeedbackForControl( this );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Draw dialer button,  text and icon.
+// ---------------------------------------------------------------------------
+// 
+void CDialerKeyPadButton::Draw( const TRect& aRect ) const
+    {
+    TAknLayoutRect centerLayout;
+    centerLayout.LayoutRect( aRect,
+        AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine() );
+    TRect innerRect = centerLayout.Rect();
+
+    CWindowGc& gc = SystemGc();
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    TAknsItemID frameId = KAknsIIDQsnFrButtonNormal;
+
+    if ( iButtonPressed )
+        {
+        frameId = KAknsIIDQsnFrButtonPressed;
+        }
+    else if ( IsDimmed() )
+        {
+        frameId = KAknsIIDQsnFrButtonInactive;
+        }
+        
+    iBgContext->SetFrame( frameId );
+    iBgContext->SetCenter( KAknsIIDQsnFrButtonCenterNormal );
+    iBgContext->SetFrameRects( aRect, innerRect );
+
+    TBool bgDrawn = AknsDrawUtils::Background( skin, 
+                                    iBgContext, 
+                                    NULL, 
+                                    gc, 
+                                    aRect, 
+                                    KAknsDrawParamNoClearUnderImage );
+                                    
+    __ASSERT_DEBUG( bgDrawn, DialerPanic( EDialerPanicDrawingError ) );
+                                    
+    DrawIconAndText( gc );
+    }
+
+// -----------------------------------------------------------------------------
+// Respond to changes in the button size
+// -----------------------------------------------------------------------------
+//
+void CDialerKeyPadButton::SizeChanged()
+    {
+    CAknButton::SizeChanged();
+    AknsUtils::RegisterControlPosition( this );
+    
+    TRect buttonRect = Rect();
+    TAknLayoutRect iconLayout;
+    const CGulIcon* icon = GetCurrentIcon();
+
+    if ( iOperationMode == EModeEasyDialing )
+        {
+        // Number layout.
+        iNumberLayout.LayoutText( buttonRect,
+            AknLayoutScalable_Apps::cell_dia3_key_num_pane_t1( iVariety ) );
+        // Use different number layout if key doens't contain any alphabets or icon.
+        if ( !icon && !iPrimaryAlphaLabel.Length() && !iSecondaryAlphaLabel.Length() )
+            {
+            iNumberLayout.LayoutText( buttonRect, 
+                AknLayoutScalable_Apps::cell_dialer2_keypad_pane_t1(), 
+                iNumberLayout.Font() );
+            }
+
+        // Alphabet layout is different if two rows of alphabets are given
+        if ( iSecondaryAlphaLabel.Length() )
+            {
+            iPrimaryAlphaLayout.LayoutText( buttonRect, 
+                AknLayoutScalable_Apps::cell_dia3_key_num_pane_t3( iVariety ) );
+            iSecondaryAlphaLayout.LayoutText( buttonRect, 
+                AknLayoutScalable_Apps::cell_dia3_key_num_pane_t4( iVariety ) );
+            }
+        else
+            {
+            iPrimaryAlphaLayout.LayoutText( buttonRect, 
+                AknLayoutScalable_Apps::cell_dia3_key_num_pane_t2( iVariety ) );
+            }
+
+        // Icon layout
+        iconLayout.LayoutRect( buttonRect, 
+            AknLayoutScalable_Apps::cell_dialer2_keypad_pane_g2( 1 ) );
+        iIconRect = iconLayout.Rect();
+
+        // Icon doesn't fit to location set in the layout if key has any alpha label.
+        // In that case, move the icon to upper-right corner.
+        if ( iPrimaryAlphaLabel.Length() || iSecondaryAlphaLabel.Length() )
+            {
+            TSize iconSize = iIconRect.Size();
+            TInt xMargin = buttonRect.Width() * KIconMarginPercent / KCent;
+            TInt yMargin = buttonRect.Height() * KIconMarginPercent / KCent;
+            TPoint iconPos( buttonRect.iBr.iX - iconSize.iWidth - xMargin, 
+                            buttonRect.iTl.iY + yMargin );
+            iIconRect.SetRect( iconPos, iconSize );
+            }
+        }
+    else if ( iOperationMode == EModeDialer )
+        {
+        // Number layout
+        iNumberLayout.LayoutText( buttonRect, 
+            AknLayoutScalable_Apps::cell_dialer2_keypad_pane_t1() );
+    
+        // Icon layout
+        iconLayout.LayoutRect( buttonRect,
+            AknLayoutScalable_Apps::cell_dialer2_keypad_pane_g2( 1 ) );
+        iIconRect = iconLayout.Rect();
+        }
+    else // video mode layout
+        {
+        // Number layout
+        iNumberLayout.LayoutText( buttonRect, 
+            AknLayoutScalable_Apps::cell_video_dialer_keypad_pane_t1() );
+        
+        // Icon layout
+        iconLayout.LayoutRect( buttonRect, 
+            AknLayoutScalable_Apps::cell_video_dialer_keypad_pane_g2( 2 ) );
+        iIconRect = iconLayout.Rect();
+        }
+
+    SetIconSize( iIconRect.Size() );
+    }
+
+// -----------------------------------------------------------------------------
+// Gets the correct text color.
+// -----------------------------------------------------------------------------
+//
+void CDialerKeyPadButton::GetTextColors( TRgb& aPenColor, TRgb& aBrushColor ) const 
+   { 
+   aBrushColor = iEikonEnv->ControlColor( EColorControlBackground, *this ); 
+   
+   if ( iButtonPressed )
+       {
+       aPenColor = iEikonEnv->ControlColor( EColorButtonTextPressed, *this );
+       }
+   else
+       {
+       aPenColor = iEikonEnv->ControlColor( EColorButtonText, *this );
+       }
+   }
+
+// --------------------------------------------------------------------------
+// Draw text and icon according to the layout.
+// --------------------------------------------------------------------------
+//
+void CDialerKeyPadButton::DrawIconAndText( CWindowGc& aGc ) const
+    {
+    TRect parentRect( Rect() );
+    TAknLayoutText buttonText;
+    TAknLayoutRect layoutRect;
+    
+    TRgb penColor;
+    TRgb brushColor;
+    GetTextColors( penColor, brushColor );
+    
+    // Don't ues logical-to-visual conversion, strings in our keypad resources are already
+    // in visual order.
+    TBool logToVisConv = EFalse;
+    
+    iNumberLayout.DrawText( aGc, iNumberLabel, logToVisConv, penColor );
+
+    // Draw also alphabet label(s) in Easy Dialing mode
+    if ( iOperationMode == EModeEasyDialing )
+        {
+        if ( iPrimaryAlphaLabel.Length() )
+            {
+            iPrimaryAlphaLayout.DrawText( aGc, iPrimaryAlphaLabel, logToVisConv, penColor );
+            }
+        if ( iSecondaryAlphaLabel.Length() )
+            {
+            iSecondaryAlphaLayout.DrawText( aGc, iSecondaryAlphaLabel, logToVisConv, penColor );
+            }
+        }
+    
+    const CGulIcon* icon = GetCurrentIcon();
+    if ( icon )
+        {
+        CFbsBitmap* buttonBmp = icon->Bitmap();
+        CFbsBitmap* buttonMask = icon->Mask();
+   
+        if ( buttonBmp && buttonMask )
+            {
+            aGc.BitBltMasked( iIconRect.iTl, buttonBmp,
+                    iIconRect.Size(), buttonMask, ETrue );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------
+// Set layout data for text.
+// --------------------------------------------------------------------------
+void CDialerKeyPadButton::SetVariety( TInt aVariety )
+    {
+    iVariety = aVariety;
+    }
+
+// --------------------------------------------------------------------------
+// Set layout data for text.
+// --------------------------------------------------------------------------
+void CDialerKeyPadButton::SetOperationMode( TDialerOperationMode aMode ) 
+    {
+    iOperationMode = aMode;
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//    
+void CDialerKeyPadButton::SetNumLabel( const TDesC& aLabel )
+    {
+    iNumberLabel.Set( aLabel );
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//    
+void CDialerKeyPadButton::SetPrimaryAlphaLabel( const TDesC& aLabel )
+    {
+    iPrimaryAlphaLabel.Set( aLabel );
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//    
+void CDialerKeyPadButton::SetSecondaryAlphaLabel( const TDesC& aLabel )
+    {
+    iSecondaryAlphaLabel.Set( aLabel );
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//    
+TInt CDialerKeyPadButton::ScanCode() const
+    {
+    return iScanCode;
+    }
+    
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//    
+TInt CDialerKeyPadButton::KeyCode() const
+    {
+    return iKeyCode;
+    }    
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadButton::MapDialerIconToSkinIcon( 
+        TInt aDialerIcon, TAknsItemID& aItemId ) const
+    {    
+     switch ( aDialerIcon )
+        {       
+        case EMbmDialerQgn_indi_dialer_voicemail:
+            aItemId = KAknsIIDQgnIndiDialerVoicemail;
+            break; 
+        default:
+            break;
+        }
+    }   
+
+// ---------------------------------------------------------------------------
+// Update icon when skin is changed
+// ---------------------------------------------------------------------------
+//   
+void CDialerKeyPadButton::UpdateIconL()
+    {
+    if ( KDialerNoIcon != iButtonIconId )
+        {
+        TFileName mifPath( KDriveZ );
+        mifPath.Append( KDC_APP_BITMAP_DIR );
+        mifPath.Append( KDialerMifFileName );
+        
+        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+        CFbsBitmap* bitmap (NULL);
+        CFbsBitmap* mask (NULL);
+            
+        // Get icon id.
+        TAknsItemID skinItemId( KAknsIIDNone );  
+        MapDialerIconToSkinIcon( iButtonIconId, skinItemId );
+        
+        AknsUtils::CreateColorIconLC( 
+                skin, 
+                skinItemId,
+                KAknsIIDQsnIconColors, 
+                EAknsCIQsnIconColorsCG30,
+                bitmap, 
+                mask, 
+                mifPath, 
+                iButtonIconId, 
+                iButtonIconMaskId,
+                KRgbBlack
+                );
+        
+        CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
+        CleanupStack::Pop( 2 );
+        
+        State()->SetIcon( icon ); // icon ownership transfered
+        }
+    }  
+
+// ---------------------------------------------------------------------------
+// 
+// Enable or disable audio but keep vibra feedback 
+// ---------------------------------------------------------------------------
+//   
+void CDialerKeyPadButton::EnableAudioFeedback( const TBool aEnable )
+    {
+    MTouchFeedback* feedback = MTouchFeedback::Instance();
+    if ( feedback )
+        {
+        feedback->EnableFeedbackForControl( this, ETrue, aEnable );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadButton::HandleResourceChange( TInt aType )
+    {
+   CAknButton::HandleResourceChange( aType );
+   
+    if ( KAknsMessageSkinChange == aType )
+        {
+        TRAP_IGNORE( UpdateIconL() );
+        }    
+    }
+    
+// End of File
--- a/phoneuis/dialer/src/cdialerkeypadcontainer.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/src/cdialerkeypadcontainer.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -21,7 +21,6 @@
 #include <e32event.h>
 #include <gulicon.h>
 #include <eikapp.h>
-#include <AknUtils.h>
 #include <aknbutton.h>
 #include <AknControl.h>
 #include <AknsUtils.h>
@@ -33,310 +32,59 @@
 #include <layoutmetadata.cdl.h>
 #include <data_caging_path_literals.hrh> // for KDC_APP_RESOURCE_DIR
 #include <touchfeedback.h>
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <aknsframebackgroundcontrolcontext.h>
 
 #include "cdialerkeypadcontainer.h"
 #include "dialercommon.h"
 #include "dialertrace.h"
 
 #include "cdialerkeypadbutton.h"
-_LIT( KDialerMifFileName, "dialer.mif" );
 
 // Number of buttons in this container
 const TInt KNumberOfButtons = 12; 
 
-// Keypad button images
-const TMifDialer KKeyPadButtons[] =
+struct TDialerButton
+    {
+    TMifDialer iBitmap;
+    TMifDialer iBitmapMask;
+    TInt iScanCode;
+    TInt iKeyCode;
+    };  
+
+const TDialerButton KKeyPadButtons[ KNumberOfButtons ] =
+
     {
-    EMbmDialerQgn_indi_dialer_one,
-    EMbmDialerQgn_indi_dialer_two,
-    EMbmDialerQgn_indi_dialer_three,
-    EMbmDialerQgn_indi_dialer_four,
-    EMbmDialerQgn_indi_dialer_five,
-    EMbmDialerQgn_indi_dialer_six,
-    EMbmDialerQgn_indi_dialer_seven,
-    EMbmDialerQgn_indi_dialer_eight,
-    EMbmDialerQgn_indi_dialer_nine,
-    EMbmDialerQgn_indi_dialer_prefix,
-    EMbmDialerQgn_indi_dialer_zero,
-    EMbmDialerQgn_indi_dialer_hash
-    };
-
-// Keypad button image masks
-const TMifDialer KKeyPadButtonsMasks[] =
-    {
-    EMbmDialerQgn_indi_dialer_one_mask,
-    EMbmDialerQgn_indi_dialer_two_mask,
-    EMbmDialerQgn_indi_dialer_three_mask,
-    EMbmDialerQgn_indi_dialer_four_mask,
-    EMbmDialerQgn_indi_dialer_five_mask,
-    EMbmDialerQgn_indi_dialer_six_mask,
-    EMbmDialerQgn_indi_dialer_seven_mask,
-    EMbmDialerQgn_indi_dialer_eight_mask,
-    EMbmDialerQgn_indi_dialer_nine_mask,
-    EMbmDialerQgn_indi_dialer_prefix_mask,
-    EMbmDialerQgn_indi_dialer_zero_mask,
-    EMbmDialerQgn_indi_dialer_hash_mask
+        { EMbmDialerQgn_indi_dialer_voicemail,
+          EMbmDialerQgn_indi_dialer_voicemail_mask, 
+          '1',
+          '1'
+        },
+        { KDialerNoIcon, KDialerNoIcon, 
+          '2', '2' },
+        { KDialerNoIcon, KDialerNoIcon,  
+          '3', '3' },
+        { KDialerNoIcon, KDialerNoIcon,  
+          '4', '4' },
+        { KDialerNoIcon, KDialerNoIcon,  
+          '5', '5' },
+        { KDialerNoIcon, KDialerNoIcon,  
+          '6', '6' },
+        { KDialerNoIcon, KDialerNoIcon, 
+          '7', '7' },
+        { KDialerNoIcon, KDialerNoIcon,  
+          '8', '8' },
+        { KDialerNoIcon, KDialerNoIcon,  
+          '9', '9' },
+        { KDialerNoIcon, KDialerNoIcon,  
+          EStdKeyNkpAsterisk, '*'  },
+        { KDialerNoIcon, KDialerNoIcon,  
+          '0', '0' },
+        { KDialerNoIcon, KDialerNoIcon,      
+          EStdKeyHash, '#' }
     };
 
-// Match keypresses to keyevents send to the phone
-//
-const TInt TDialerButtonToKeypadMap[12][2] = 
-        {  
-            { 49, // ScanCode
-              49  // KeyCode
-            },
-            { 50,
-              50
-            },
-            { 51,
-              51
-            },
-            { 52,
-              52
-            },    
-            { 53,
-              53
-            },
-            { 54,
-              54
-            },
-            { 55,
-              55
-            },
-            { 56,
-              56
-            },
-            { 57,
-              57
-            },                        
-            { EStdKeyNkpAsterisk,
-              42
-            },
-            { '0',
-              '0'
-            }, 
-            { EStdKeyHash,
-              35
-            }                                                                                                       
-        };   
 
-// Class declaration for CDialerKeyPadButton separated to cdialerkeypadbutton.h.
-
-// ---------------------------------------------------------------------------
-// C++ default constructor
-// ---------------------------------------------------------------------------
-//
-CDialerKeyPadButton::CDialerKeyPadButton()
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CDialerKeyPadButton::~CDialerKeyPadButton()
-    {
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if ( feedback )
-        {
-        feedback->RemoveFeedbackForControl( iButton );
-        }
-    delete iButton;   
-    }
-        
-// ---------------------------------------------------------------------------
-// Creates number keypad button
-// ---------------------------------------------------------------------------
-//
-void CDialerKeyPadButton::CreateButtonL( const TInt aScanCode, 
-                                         const TInt aKeyCode,
-                                         const TMifDialer aButtonIcon, 
-                                         const TMifDialer aButtonIconMask )
-    {
-    iScanCode = aScanCode;
-    iKeyCode  = aKeyCode;
-    iButtonIcon = aButtonIcon;
-    iButtonIconMask = aButtonIconMask;
-    
-    TFileName mifPath( KDriveZ );
-    mifPath.Append( KDC_APP_BITMAP_DIR );
-    mifPath.Append( KDialerMifFileName );
-
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    CFbsBitmap* bitmap (NULL);
-    CFbsBitmap* mask (NULL);
-
-    // Get icon ids.
-    TAknsItemID skinItemId( KAknsIIDNone );  
-    
-    // Create button image.
-    MapDialerIconToSkinIcon( aButtonIcon ,skinItemId );
-    AknsUtils::CreateColorIconLC( 
-        skin, 
-        skinItemId,
-        KAknsIIDQsnIconColors, 
-        EAknsCIQsnIconColorsCG30,
-        bitmap, 
-        mask, 
-        mifPath, 
-        aButtonIcon, 
-        aButtonIconMask,
-        KRgbBlack
-        );
-
-    CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
-    CleanupStack::Pop( 2 );
-    CleanupStack::PushL( icon );
-    iButton = CAknButton::NewL(
-        icon , // ownership taken
-        NULL, NULL, NULL, _L(""), _L(""), 0, 0 );
-    iButton->SetButtonFlags( KAknButtonReportOnLongPress|
-                            KAknButtonReportOnKeyDown  |
-                            KAknButtonRequestExitOnButtonUpEvent );
-    iButton->SetIconScaleMode( EAspectRatioPreserved );
-    iButton->SetMargins( TMargins8(0,0,0,0) );    
-    CleanupStack::Pop( icon ); 
-    }
-    
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//    
-TInt CDialerKeyPadButton::ScanCode() const
-    {
-    return iScanCode;
-    }
-    
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//    
-TInt CDialerKeyPadButton::KeyCode() const
-    {
-    return iKeyCode;
-    }    
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void CDialerKeyPadButton::MapDialerIconToSkinIcon( const TInt aDialerIcon, 
-                                         TAknsItemID& aItemId ) const
-    {    
-    switch ( aDialerIcon )
-        {
-        case EMbmDialerQgn_indi_dialer_one:
-            aItemId = KAknsIIDQgnIndiDialerOne;
-            break;
-        case EMbmDialerQgn_indi_dialer_two:
-            aItemId = KAknsIIDQgnIndiDialerTwo;
-            break;
-        case EMbmDialerQgn_indi_dialer_three:
-            aItemId = KAknsIIDQgnIndiDialerThree;
-            break;
-        case EMbmDialerQgn_indi_dialer_four:
-            aItemId = KAknsIIDQgnIndiDialerFour;
-            break;
-        case EMbmDialerQgn_indi_dialer_five:
-            aItemId = KAknsIIDQgnIndiDialerFive;
-            break;
-        case EMbmDialerQgn_indi_dialer_six:
-            aItemId = KAknsIIDQgnIndiDialerSix;
-            break;
-        case EMbmDialerQgn_indi_dialer_seven:
-            aItemId = KAknsIIDQgnIndiDialerSeven;
-            break;    
-        case EMbmDialerQgn_indi_dialer_eight:
-            aItemId = KAknsIIDQgnIndiDialerEight;
-            break;
-        case EMbmDialerQgn_indi_dialer_nine:
-            aItemId = KAknsIIDQgnIndiDialerNine;
-            break;
-        case EMbmDialerQgn_indi_dialer_zero:
-            aItemId = KAknsIIDQgnIndiDialerZero;
-            break;
-        case EMbmDialerQgn_indi_dialer_prefix:
-            aItemId = KAknsIIDQgnIndiDialerPrefix;
-            break;
-        case EMbmDialerQgn_indi_dialer_hash:
-            aItemId = KAknsIIDQgnIndiDialerHash;
-            break;                        
-        default:
-            break;
-        }
-    }   
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//   
-void CDialerKeyPadButton::SetIconSize( TSize& aSize )
-    {
-    iButton->SetIconSize( aSize );
-    }  
-    
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//   
-void CDialerKeyPadButton::UpdateIconL()
-    {
-    TFileName mifPath( KDriveZ );
-    mifPath.Append( KDC_APP_BITMAP_DIR );
-    mifPath.Append( KDialerMifFileName );
-    
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    CFbsBitmap* bitmap (NULL);
-    CFbsBitmap* mask (NULL);
-        
-    // Get icon id.
-    TAknsItemID skinItemId( KAknsIIDNone );  
-    MapDialerIconToSkinIcon( iButtonIcon, skinItemId );
-    
-    AknsUtils::CreateColorIconLC( 
-            skin, 
-            skinItemId,
-            KAknsIIDQsnIconColors, 
-            EAknsCIQsnIconColorsCG30,
-            bitmap, 
-            mask, 
-            mifPath, 
-            iButtonIcon, 
-            iButtonIconMask,
-            KRgbBlack
-            );
-    
-    CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
-    CleanupStack::Pop( 2 );
-    
-    iButton->State()->SetIcon( icon ); // icon ownership transfered
-    
-    }  
-
-// ---------------------------------------------------------------------------
-// 
-// Enable or disable audio but keep vibra feedback 
-// ---------------------------------------------------------------------------
-//   
-void CDialerKeyPadButton::EnableAudioFeedback( const TBool aEnable )
-    {
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if ( feedback )
-        {
-        feedback->EnableFeedbackForControl( iButton, ETrue, aEnable );
-        }
-    }
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void CDialerKeyPadButton::HandleResourceChange( TInt aType )
-    {
-    if ( aType == KAknsMessageSkinChange )
-        {
-        TRAP_IGNORE( UpdateIconL() );
-        iButton->HandleResourceChange( aType );
-        }    
-    }
 
 // ========================= MEMBER FUNCTIONS ================================
 
@@ -366,9 +114,9 @@
     {    
     DIALER_PRINT("KeyPadContainer::ConstructL<");
     BaseConstructL();
+    iKeyLabelManager = CDialerKeyPadLabelManager::NewL( *iCoeEnv, *this );
     CreateButtonsL();
-    CCoeEnv* env = CCoeEnv::Static();
-    env->AddForegroundObserverL( *this );
+    iCoeEnv->AddForegroundObserverL( *this );
     DIALER_PRINT("KeyPadContainer::ConstructL>");
     }
 
@@ -387,14 +135,12 @@
 CDialerKeyPadContainer::~CDialerKeyPadContainer()
     {
     for ( TInt i = 0; i < iButtonCount; i++ )
-        {
-        AknsUtils::DeregisterControlPosition( 
-                   ((CDialerKeyPadButton*)iButtons[i])->Control());   
+        {   
         delete iButtons[i];
         }
     iButtons.Close();
-    CCoeEnv* env = CCoeEnv::Static();
-    env->RemoveForegroundObserver( *this );
+    iCoeEnv->RemoveForegroundObserver( *this );
+    delete iKeyLabelManager;
     }
 
 // ---------------------------------------------------------------------------
@@ -417,7 +163,7 @@
     __ASSERT_DEBUG( aIndex < KNumberOfButtons, 
     _L("CDialerKeyPadContainer::ComponentControl, index out of range."));
     
-    return ((CDialerKeyPadButton*)iButtons[aIndex])->Control();
+    return iButtons[aIndex];
     }
     
 // ---------------------------------------------------------------------------
@@ -465,9 +211,12 @@
 //
 void CDialerKeyPadContainer::SetLayout()
     {
-    if ( iOperatingMode == EModeDialer )
+    if ( iOperatingMode == EModeDialer ||
+         iOperatingMode == EModeEasyDialing )
         {
-        SetPhoneLayout();
+        // Same renewed layout is used regardless of the status
+        // of Easy Dialing
+        SetEasyDialingLayout();
         }
     else
         {
@@ -497,20 +246,9 @@
     
     TRect parentRect( Rect() );
 
-    // Icon size - all in same size
-    TAknLayoutRect functionGraphics;  
-             
-    functionGraphics.LayoutRect( 
-        parentRect,
-        TAknWindowComponentLayout::Compose(
-            AknLayoutScalable_Apps::cell_dialer2_keypad_pane( iVariety ),
-            AknLayoutScalable_Apps::cell_dialer2_keypad_pane_g1( 
-                                                        iVariety ) ) );
-    TSize iconSize = functionGraphics.Rect().Size();
-    
     // Layout buttons
     TAknLayoutScalableParameterLimits limits = 
-    AknLayoutScalable_Apps::cell_dialer2_keypad_pane_ParamLimits( iVariety );
+        AknLayoutScalable_Apps::cell_dialer2_keypad_pane_ParamLimits( iVariety );
     
     TInt i = 0;
     for ( TInt row = limits.FirstRow(); row <= limits.LastRow(); row++ )
@@ -518,22 +256,63 @@
         for ( TInt col = limits.FirstColumn(); 
               col <= limits.LastColumn(); col++ )
             {
-            // Layout button
-            AknLayoutUtils::LayoutControl(
-                ((CDialerKeyPadButton*)iButtons[i])->Control(), parentRect, 
-                TAknWindowComponentLayout::Compose( 
-                    AknLayoutScalable_Apps::cell_dialer2_keypad_pane( iVariety,
-                                                col, row ), 
-                    AknLayoutScalable_Apps::bg_button_pane_pane_cp04( 
-                                                iVariety ) ) );
-            
-            // Set icon size
-            ((CDialerKeyPadButton*)iButtons[i++])->SetIconSize( iconSize );
+            iButtons[i]->SetVariety( iVariety );
+            iButtons[i]->SetOperationMode( iOperatingMode );
+    
+            AknLayoutUtils::LayoutControl( iButtons[i], parentRect, TAknWindowComponentLayout::Compose( 
+                    AknLayoutScalable_Apps::cell_dialer2_keypad_pane( iVariety, col, row ), 
+                    AknLayoutScalable_Apps::bg_button_pane_pane_cp04( iVariety ) ) );
+            i++;
             }
         }
     }
 
 // ---------------------------------------------------------------------------
+// CDialerKeyPadContainer::SetEasyDialingLayout
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadContainer::SetEasyDialingLayout()
+    {
+    TRect parentRect( Rect() );
+    
+    // Layout buttons
+    TAknLayoutScalableParameterLimits limits = 
+        AknLayoutScalable_Apps::cell_dialer2_keypad_pane_ParamLimits( iVariety );
+    
+    // Rectangle of the first button
+    TAknLayoutRect buttonLayoutRect;
+    buttonLayoutRect.LayoutRect( parentRect, 
+            AknLayoutScalable_Apps::cell_dia3_key_num_pane( iVariety ) );
+    TRect firstButtonRect = buttonLayoutRect.Rect();
+    // Move the first button rect to top-left-corner of the keypad area, 
+    // the default place is wrong in mirrored layout.
+    firstButtonRect.SetRect( parentRect.iTl, firstButtonRect.Size() );
+    
+    TInt colCount = limits.LastColumn() - limits.FirstColumn() + 1;
+
+    for ( TInt row = limits.FirstRow() ; row <= limits.LastRow() ; row++ )
+        {
+        for ( TInt col = limits.FirstColumn() ; col <= limits.LastColumn() ; col++ )
+            {
+            // Calculate corresponding index in iButtons array
+            TInt idx = col + row * colCount;
+            
+            // Set mode and variety so that correct button internal layout will be used
+            iButtons[idx]->SetVariety( iVariety );
+            iButtons[idx]->SetOperationMode( iOperatingMode );
+            
+            // Layout button
+            TRect buttonRect = firstButtonRect;
+            buttonRect.Move( col * buttonRect.Width(), row * buttonRect.Height() );
+            buttonRect.Shrink( 1, 1 ); // to create small gap between buttons
+            iButtons[idx]->SetRect( buttonRect );
+            }
+        }
+    
+    }
+
+// ---------------------------------------------------------------------------
 // CDialerKeyPadContainer::SetVideoLayout
 //
 // ---------------------------------------------------------------------------
@@ -542,21 +321,8 @@
     {
     TRect parentRect( Rect() );
     
-    // Icon size - all in same size
-    TAknLayoutRect functionGraphics;  
-             
-    functionGraphics.LayoutRect( 
-        parentRect,
-        TAknWindowComponentLayout::Compose(
-            AknLayoutScalable_Apps::cell_video_dialer_keypad_pane( iVariety, 
-                                        0, 0 ),
-            AknLayoutScalable_Apps::cell_video_dialer_keypad_pane_g1( 
-                                        iVariety ) ) );
-    TSize iconSize = functionGraphics.Rect().Size();
-    
     TAknLayoutScalableParameterLimits limits = 
-        AknLayoutScalable_Apps::cell_video_dialer_keypad_pane_ParamLimits( 
-                                        iVariety ) ;
+        AknLayoutScalable_Apps::cell_video_dialer_keypad_pane_ParamLimits( iVariety ) ;
     
     TInt i = 0;
     for ( TInt row = limits.FirstRow(); row <= limits.LastRow(); row++ )
@@ -565,17 +331,17 @@
               col <= limits.LastColumn(); 
               col++ )
             {
+            iButtons[i]->SetVariety( iVariety );
+            iButtons[i]->SetOperationMode( iOperatingMode );
+        
             // Layout button
             AknLayoutUtils::LayoutControl(
-                ((CDialerKeyPadButton*)iButtons[i])->Control(), parentRect, 
+                iButtons[i], parentRect, 
                 TAknWindowComponentLayout::Compose( 
                     AknLayoutScalable_Apps::cell_video_dialer_keypad_pane( 
-                        iVariety, col, row ), 
-                    AknLayoutScalable_Apps::bg_button_pane_cp08( 
-                                        iVariety ) ) );
-            
-            // Set icon size
-            iButtons[i++]->SetIconSize( iconSize );
+                        iVariety, col, row ),             
+                    AknLayoutScalable_Apps::bg_button_pane_cp08( iVariety ) ) );
+            i++;
             }
         }
     }
@@ -590,24 +356,37 @@
     {
     DIALER_PRINT("KeyPadContainer::CreateButtonsL<");
     
-    for ( TInt i=0; i < KNumberOfButtons; i++ )
+    TInt flags ( KAknButtonReportOnLongPress|
+                 KAknButtonReportOnKeyDown  |
+                 KAknButtonRequestExitOnButtonUpEvent );
+    
+    for ( TInt i = 0; i < KNumberOfButtons; i++ )
         {
-        CDialerKeyPadButton* button = new (ELeave) CDialerKeyPadButton();
-        CleanupStack::PushL( button );
-        button->CreateButtonL( TDialerButtonToKeypadMap[i][0],
-                               TDialerButtonToKeypadMap[i][1],         
-                               KKeyPadButtons[i],
-                               KKeyPadButtonsMasks[i] );
+        const TPtrC numLabel = iKeyLabelManager->ButtonNumLabel( i );
+
+        const TPtrC alphaLabel = iKeyLabelManager->ButtonFirstAlphaLabel( i );
+
+        const TPtrC secondAlphaLabel = iKeyLabelManager->ButtonSecondAlphaLabel( i );
+        
+        CDialerKeyPadButton* button = CDialerKeyPadButton::NewLC( 
+            numLabel,
+            alphaLabel,
+            secondAlphaLabel,
+            KKeyPadButtons[i].iScanCode,
+            KKeyPadButtons[i].iKeyCode,
+            KKeyPadButtons[i].iBitmap,
+            KKeyPadButtons[i].iBitmapMask,
+            flags );
+        iButtons.AppendL( button );
         CleanupStack::Pop( button );
-        iButtons.Append( button );                      
-        button->Control()->SetMopParent( this );
-        button->Control()->SetParent( this );    
-        button->Control()->SetContainerWindowL( *this );
-        button->Control()->SetObserver( this );    
-        button->Control()->ActivateL();
-        AknsUtils::RegisterControlPosition( button->Control() );   
+        
+        button->SetMopParent( this );
+        button->SetParent( this );
+        button->SetContainerWindowL( *this );
+        button->SetObserver( this );
+        button->ActivateL();
         }     
-    DIALER_PRINT("KeyPadContainer::CreateButtonsL>");        
+    DIALER_PRINT("KeyPadContainer::CreateButtonsL>");
     }
 
 // ---------------------------------------------------------------------------
@@ -635,17 +414,19 @@
         CDialerKeyPadButton* tappedButton = NULL;
         for ( TInt i=0; i < iButtons.Count(); i++ )
             {
-            if ( iButtons[i]->Control() == aControl )
+            if ( iButtons[i] == aControl )
                 {
                 tappedButton = iButtons[i];
                 break;
                 }    
             }
-            
+        
+        __ASSERT_ALWAYS( tappedButton, 
+        _L("CDialerKeyPadContainer::HandleControlEventL, invalid button handle"));
+        
         // Send key event to phone.
         TKeyEvent keyEvent;
         keyEvent.iScanCode = tappedButton->ScanCode();
-        keyEvent.iCode = tappedButton->KeyCode();
         keyEvent.iModifiers = 0;
         keyEvent.iRepeats = 0;  
              
@@ -664,7 +445,7 @@
                 {    
                 DIALER_PRINT("HandleControlEventL.EEventStateChanged");
                 iButtonPressedDown = ETrue;
-
+                keyEvent.iCode = tappedButton->KeyCode();
                 iParentControl.PrepareForFocusGainL();
 
                 ControlEnv()->SimulateKeyEventL( keyEvent, EEventKeyDown );    
@@ -696,8 +477,7 @@
         {    
         for ( TInt i=0; i < iButtons.Count(); i++ )
             {
-            (( CDialerKeyPadButton* )iButtons[i])->HandleResourceChange( 
-                                                                    aType );
+            iButtons[i]->HandleResourceChange( aType );
             }
         }
     }
@@ -705,7 +485,7 @@
 // ---------------------------------------------------------------------------
 // CDialerKeyPadContainer::MakeVisible
 //
-// Called when dialer control come visible or unvisible
+// Called when dialer control becomes visible or invisible
 //
 // ---------------------------------------------------------------------------
 //
@@ -723,6 +503,17 @@
     CCoeControl::MakeVisible( aVisible );        
     }
 
+// ---------------------------------------------------------------------------
+// CDialerKeyPadContainer::SetOperationMode
+//
+// Set new operation mode for the keypad
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadContainer::SetOperationMode( TDialerOperationMode aOperatingMode )
+    {
+    iOperatingMode = aOperatingMode;
+    }
 
 // ---------------------------------------------------------------------------
 // CDialerKeyPadContainer::HandleGainingForeground
@@ -755,6 +546,30 @@
     }
 
 // ---------------------------------------------------------------------------
+// CDialerKeyPadContainer::KeyLabelsChanged
+//
+// Reset button labels and update the layout
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadContainer::KeyLabelsChanged()
+    {
+    for ( TInt i = 0 ; i < iButtons.Count() ; i++ )
+        {
+        const TPtrC numLabel = iKeyLabelManager->ButtonNumLabel( i );
+        const TPtrC alphaLabel = iKeyLabelManager->ButtonFirstAlphaLabel( i );
+        const TPtrC secondAlphaLabel = iKeyLabelManager->ButtonSecondAlphaLabel( i );
+        
+        iButtons[i]->SetNumLabel( numLabel );
+        iButtons[i]->SetPrimaryAlphaLabel( alphaLabel );
+        iButtons[i]->SetSecondaryAlphaLabel( secondAlphaLabel );
+        
+        // reset layout
+        iButtons[i]->SetSize( iButtons[i]->Size() );
+        }
+    DrawDeferred();
+    }
+
+// ---------------------------------------------------------------------------
 // CDialerKeyPadContainer::EnableTactileFeedback
 //
 //
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/src/cdialerkeypadlabelmanager.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,659 @@
+/*
+* 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:  Helper class to handle virtual keypad text labels
+*
+*/
+
+#include <AknUtils.h>
+#include <bautils.h>
+#include <barsread.h>
+#include <avkon.rsg>
+#include <dialer.rsg>
+#include <dialerkeypad.rsg>
+#include <e32const.h>
+#include <e32lang.h>
+#include <PtiEngine.h>
+#include <AknFepInternalCRKeys.h>
+#include <AvkonInternalCRKeys.h>
+#include <bacntf.h> 
+
+#include "cdialerkeypadlabelmanager.h"
+#include "dialercommon.h"
+
+// CONSTANTS
+const TInt KKeyCount( 12 );
+
+_LIT( KDialerButton1NumLabel, "1" );
+_LIT( KDialerButton2NumLabel, "2" );
+_LIT( KDialerButton3NumLabel, "3" );
+_LIT( KDialerButton4NumLabel, "4" );
+_LIT( KDialerButton5NumLabel, "5" );
+_LIT( KDialerButton6NumLabel, "6" );
+_LIT( KDialerButton7NumLabel, "7" );
+_LIT( KDialerButton8NumLabel, "8" );
+_LIT( KDialerButton9NumLabel, "9" );
+_LIT( KDialerButton10NumLabel, "*+" );
+_LIT( KDialerButton11NumLabel, "0" );
+_LIT( KDialerButton12NumLabel, "#" );
+
+_LIT( KDialerKeypadResourceFile, "z:\\resource\\dialerkeypad" );
+_LIT( KDialerKeypadResourceFileExt, ".rsc" );
+_LIT( KDialerKeypadVariantExtSeparator, "_" );
+
+_LIT( KScriptLatin, "latin" );
+_LIT( KScriptCyrillic, "cyrillic" );
+_LIT( KScriptGreek, "greek" );
+_LIT( KScriptHebrew, "hebrew" );
+_LIT( KScriptArabic, "arabic" );
+_LIT( KScriptFarsi, "farsi" );
+_LIT( KScriptUrdu, "urdu" );
+_LIT( KScriptThai, "thai" );
+_LIT( KScriptDevanagari, "devanagari" );
+_LIT( KScriptChnPinyin, "chn_pinyin" );
+_LIT( KScriptChnZhuyin, "chn_zhuyin" );
+_LIT( KScriptChnStroke, "chn_stroke" );
+_LIT( KScriptChnCangjie, "chn_cangjie" );
+
+enum TScript
+    {
+    EScriptLatin = 0,
+    EScriptCyrillic,
+    EScriptGreek,
+    EScriptHebrew,
+    EScriptArabic,
+    EScriptFarsi,
+    EScriptUrdu,
+    EScriptThai,
+    EScriptDevanagari,
+    EScriptChinese, // generic value for all Chinese input modes
+    EScriptChnPinyin,
+    EScriptChnZhuyin,
+    EScriptChnStroke,
+    EScriptChnCangjie
+    };
+
+struct TLanguageScriptMapping
+    {
+    TLanguage iLang;
+    TScript iScript;
+    };
+
+// Following table maps non-Latin languages to corresponding scripts.
+// Rest of the languages are asumed to use Latin script.
+// The data of the table has been extracted from the header 
+// \sf\mw\inputmethods\textinput\peninputgenericitut\inc\peninputgenericitutdata.h
+const TLanguageScriptMapping KScriptMap[] =
+    {
+        {ELangRussian, EScriptCyrillic},
+        {ELangBulgarian, EScriptCyrillic},
+        {ELangUkrainian, EScriptCyrillic},
+        
+        {ELangGreek, EScriptGreek},
+        {ELangCyprusGreek, EScriptGreek},
+        
+        {ELangHebrew, EScriptHebrew},
+        
+        {ELangArabic, EScriptArabic},
+        
+        {ELangFarsi, EScriptFarsi},
+        
+        {ELangUrdu, EScriptUrdu},
+        
+        {ELangThai, EScriptThai},
+        
+        {ELangHindi, EScriptDevanagari},
+        {ELangMarathi, EScriptDevanagari},
+        
+        {ELangTaiwanChinese, EScriptChinese},
+        {ELangHongKongChinese, EScriptChinese},
+        {ELangPrcChinese, EScriptChinese}
+    };
+const TInt KScriptMapCount = sizeof( KScriptMap ) / sizeof( TLanguageScriptMapping );
+
+// Values for Chinese adaptive search modes, as documented in AvkonInternalCRKeys.h
+enum TChinesePrcMode
+    {
+    EChnPrcPinyin = 0,
+    EChnPrcStroke = 1
+    };
+enum TChineseTwMode
+    {
+    EChnTwZhuyin = 0,
+    EChnTwStroke = 1
+    };
+enum TChineseHkMode
+    {
+    EChnHkStroke = 0,
+    EChnHkCangjie = 1
+    };
+
+
+// LOCAL FUNCTION DECLARATIONS
+static TScript ScriptForLang( TLanguage aLang );
+static const TDesC& ScriptName( TScript aScriptCode );
+static TBool ScriptCanSubstituteLatin( TScript aScript );
+
+
+// MEMBER FUNCTION DEFINITIONS
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::CDialerKeyPadLabelManager
+//
+// ---------------------------------------------------------------------------
+//
+CDialerKeyPadLabelManager::CDialerKeyPadLabelManager( CCoeEnv& aCoeEnv, 
+        MDialerKeyPadLabelManagerCallback& aObserver )
+    : iCoeEnv( aCoeEnv ), iObserver( aObserver )
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::~CDialerKeyPadLabelManager
+//
+// ---------------------------------------------------------------------------
+//
+CDialerKeyPadLabelManager::~CDialerKeyPadLabelManager()
+    {
+    delete iPtiEngine;
+    
+    delete iAknFepRepository;
+    delete iAvkonRepository;
+    
+    if ( iEnvChangeNotifier )
+        {
+        iEnvChangeNotifier->Cancel();
+        delete iEnvChangeNotifier;
+        }
+    
+    delete iKeypadNumLabelArray;
+    delete iKeypadFirstLabelArray;
+    delete iKeypadSecondLabelArray;
+    
+    if ( iResourceOffset )
+        {
+        iCoeEnv.DeleteResourceFile( iResourceOffset );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::NewLC
+//
+// ---------------------------------------------------------------------------
+//
+CDialerKeyPadLabelManager* CDialerKeyPadLabelManager::NewLC( CCoeEnv& aCoeEnv, 
+        MDialerKeyPadLabelManagerCallback& aObserver )
+    {
+    CDialerKeyPadLabelManager* self =
+            new (ELeave) CDialerKeyPadLabelManager( aCoeEnv, aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::NewL
+//
+// ---------------------------------------------------------------------------
+//
+CDialerKeyPadLabelManager* CDialerKeyPadLabelManager::NewL( CCoeEnv& aCoeEnv, 
+        MDialerKeyPadLabelManagerCallback& aObserver )
+    {
+    CDialerKeyPadLabelManager* self = 
+            CDialerKeyPadLabelManager::NewLC( aCoeEnv, aObserver );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::ConstructL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadLabelManager::ConstructL()
+    {
+    iPtiEngine = CPtiEngine::NewL();
+    
+    iAknFepRepository = CDialerCenRepWrapper::NewL( *this, KCRUidAknFep );
+    iAvkonRepository = CDialerCenRepWrapper::NewL( *this, KCRUidAvkon );
+    
+    TCallBack envChangeCallback( EnvChangeCallback, this );
+    iEnvChangeNotifier = CEnvironmentChangeNotifier::NewL( 
+            CActive::EPriorityStandard, envChangeCallback );
+    iEnvChangeNotifier->Start();
+    
+    iKeypadNumLabelArray = new ( ELeave ) CDesCArrayFlat( KKeyCount );
+    iKeypadFirstLabelArray = new ( ELeave ) CDesCArrayFlat( KKeyCount );
+    iKeypadSecondLabelArray = new ( ELeave ) CDesCArrayFlat( KKeyCount );
+    
+    UpdateNumLabelsL();
+    UpdateTextLabelsL();
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::ButtonNumLabel
+//
+// ---------------------------------------------------------------------------
+//
+TPtrC CDialerKeyPadLabelManager::ButtonNumLabel( TInt aIndex ) const
+    {
+    __ASSERT_DEBUG( aIndex < iKeypadNumLabelArray->Count(), DialerPanic(EDialerPanicLabelNotFound) );
+
+    TPtrC label( KNullDesC );
+    if ( aIndex < iKeypadNumLabelArray->Count() )
+        {
+        label.Set( (*iKeypadNumLabelArray)[ aIndex ] );
+        }
+    return label;
+    }   
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::ButtonFirstAlphaLabel
+//
+// ---------------------------------------------------------------------------
+//
+TPtrC CDialerKeyPadLabelManager::ButtonFirstAlphaLabel( TInt aIndex ) const
+    {
+    __ASSERT_DEBUG( aIndex < iKeypadFirstLabelArray->Count(), DialerPanic(EDialerPanicLabelNotFound) );
+
+    TPtrC label( KNullDesC );
+    if ( aIndex < iKeypadFirstLabelArray->Count() )
+        {
+        label.Set( (*iKeypadFirstLabelArray)[ aIndex ] );
+        }
+    return label;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::ButtonSecondAlphaLabel
+//
+// ---------------------------------------------------------------------------
+//
+TPtrC CDialerKeyPadLabelManager::ButtonSecondAlphaLabel( TInt aIndex ) const
+    {
+    __ASSERT_DEBUG( aIndex < iKeypadSecondLabelArray->Count(), DialerPanic(EDialerPanicLabelNotFound) );
+
+    TPtrC label( KNullDesC );
+    if ( aIndex < iKeypadSecondLabelArray->Count() )
+        {
+        label.Set( (*iKeypadSecondLabelArray)[ aIndex ] );
+        }
+    return label;
+    }   
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::UpdateTextLabelsL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadLabelManager::HandleRepositoryChange( 
+        TUid aRepository, TUint32 aId )
+    {
+    if ( (aRepository == KCRUidAknFep && aId == KAknFepInputTxtLang) ||
+         (aRepository == KCRUidAvkon && aId == KAknAdaptiveSearchChinesePRC) ||
+         (aRepository == KCRUidAvkon && aId == KAknAdaptiveSearchChineseTW) ||
+         (aRepository == KCRUidAvkon && aId == KAknAdaptiveSearchChineseHongkong) )
+        {
+        // Check if alpabet labels need to be changed
+        TInt scriptToUse( EScriptLatin );
+        TRAP_IGNORE( scriptToUse = LabelScriptToUseL() );
+        if ( iLabelScriptInUse != scriptToUse )
+            {
+            TRAP_IGNORE( UpdateTextLabelsL() );
+            iObserver.KeyLabelsChanged();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::HandleEnvChange
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadLabelManager::HandleEnvChange()
+    {
+    if ( iEnvChangeNotifier->Change() & EChangesLocale )
+        {
+        TLocale locale;
+        if ( locale.DigitType() != iDigitTypeInUse )
+            {
+            TRAP_IGNORE( UpdateNumLabelsL() );
+            iObserver.KeyLabelsChanged();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::EnvChangeCallback
+//
+// ---------------------------------------------------------------------------
+//
+TInt CDialerKeyPadLabelManager::EnvChangeCallback( TAny* aSelfPtr )
+    {
+    CDialerKeyPadLabelManager* self =
+            static_cast< CDialerKeyPadLabelManager* >( aSelfPtr );
+    self->HandleEnvChange();
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::UpdateTextLabelsL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadLabelManager::UpdateTextLabelsL()
+    {
+    iKeypadFirstLabelArray->Reset();
+    iKeypadSecondLabelArray->Reset();
+    
+    // Load the correct keypad resource file
+    TFileName resourceName;
+    GetResourceFileNameL( resourceName );
+    iResourceOffset = iCoeEnv.AddResourceFileL( resourceName );
+
+    // Read keypad labels from the resource
+    TResourceReader reader;
+    iCoeEnv.CreateResourceReaderLC( reader, R_DIALER_KEYPAD );
+    
+    TInt16 count = reader.ReadInt16();
+
+    for ( TInt i = 0 ; i < count ; ++i )
+        {
+        TPtrC firstRow = reader.ReadTPtrC();
+        iKeypadFirstLabelArray->AppendL( firstRow );
+        TPtrC secondRow = reader.ReadTPtrC();
+        iKeypadSecondLabelArray->AppendL( secondRow );
+        }
+
+    CleanupStack::PopAndDestroy(); // reader
+    
+    // Free resource as it's not usually needed anymore. Ensure that destructor 
+    // won't free it again.
+    iCoeEnv.DeleteResourceFile( iResourceOffset );
+    iResourceOffset = 0;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::UpdateNumLabelsL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadLabelManager::UpdateNumLabelsL()
+    {
+    // Save digit type used. This is to allow us update number labels
+    // only when digit type is changed and not on all locale changes.
+    TLocale locale;
+    iDigitTypeInUse = locale.DigitType();
+    
+    iKeypadNumLabelArray->Reset();
+    
+    // Fill number labels array
+    iKeypadNumLabelArray->AppendL( KDialerButton1NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton2NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton3NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton4NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton5NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton6NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton7NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton8NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton9NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton10NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton11NumLabel );
+    iKeypadNumLabelArray->AppendL( KDialerButton12NumLabel );
+    
+    // Convert num labels to current global number mode
+    for ( TInt i = 0 ; i < iKeypadNumLabelArray->Count() ; ++i )
+        {
+        // A bit of magic is needed to get a modifiable pointer
+        // descriptor which points to string within the array.
+        TPtrC roPtr = (*iKeypadNumLabelArray)[i];
+        TPtr ptr( const_cast<TUint16*>( roPtr.Ptr() ), roPtr.Length(), roPtr.Length() );
+        
+        AknTextUtils::LanguageSpecificNumberConversion( ptr );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::GetResourceFileNameL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerKeyPadLabelManager::GetResourceFileNameL( TDes& aFileName )
+    {
+    TFileName resName;
+
+    iLabelScriptInUse = LabelScriptToUseL();
+    // Try to get variated resource name if necessary
+    if ( iLabelScriptInUse != EScriptLatin )
+        {
+        const TDesC& scriptName = ScriptName( static_cast<TScript>(iLabelScriptInUse) );
+        resName.Copy( KDialerKeypadResourceFile );
+        resName.Append( KDialerKeypadVariantExtSeparator );
+        resName.Append( scriptName );
+        resName.Append( KDialerKeypadResourceFileExt );
+        
+        BaflUtils::NearestLanguageFile( iCoeEnv.FsSession(), resName );
+        if ( !BaflUtils::FileExists( iCoeEnv.FsSession(), resName ) )
+            {
+            // resource not found, fall back to Latin
+            iLabelScriptInUse = EScriptLatin;
+            }
+        }
+    
+    // Get the default resource name if Latin script was selected or
+    // resource file for the selected script was not found.
+    if ( iLabelScriptInUse == EScriptLatin )
+        {
+        resName.Copy( KDialerKeypadResourceFile );
+        resName.Append( KDialerKeypadResourceFileExt );
+        BaflUtils::NearestLanguageFile( iCoeEnv.FsSession(), resName );
+        }
+    
+    aFileName.Copy( resName );
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::LabelScriptToUseL
+//
+// ---------------------------------------------------------------------------
+//
+TInt CDialerKeyPadLabelManager::LabelScriptToUseL() const
+    {
+    TInt lang( ELangEnglish );
+    
+    // Get current input language
+    TInt err = iAknFepRepository->Get( KAknFepInputTxtLang, lang );
+    __ASSERT_DEBUG( !err, DialerPanic(err) );
+            
+    TInt script = ScriptForLang( static_cast<TLanguage>(lang) );
+    
+    // Distinct logic is used to select labels when current input language
+    // is any version of Chinese. PCS uses different algorith for Chinese.
+    if ( script == EScriptChinese )
+        {
+        script = ChineseScriptToUseL();
+        }
+    // If current input language is written in Latin script, then we check
+    // if some other script of the device could also be shown on the labels.
+    // Most variated labels include Latin characters as well.
+    else if ( script == EScriptLatin )
+        {
+        RArray<TInt> availableLanguages;
+        CleanupClosePushL( availableLanguages );
+        iPtiEngine->GetAvailableLanguagesL( availableLanguages );
+        
+        // Scirpt of the current UI language is preferred option for 
+        // alternative script. Ensure it's considered first.
+        TLanguage uiLang = User::Language();
+        TInt pos = availableLanguages.Find( uiLang );
+        if ( pos != KErrNotFound )
+            {
+            availableLanguages.Remove( pos );
+            availableLanguages.InsertL( uiLang, 0 );
+            }
+        
+        TInt langCount = availableLanguages.Count();
+        for ( TInt i = 0 ; i < langCount ; ++i )
+            {
+            TLanguage altLang = static_cast<TLanguage>( availableLanguages[i] );
+            TScript altScript = ScriptForLang( altLang );
+            if ( altScript != EScriptLatin && ScriptCanSubstituteLatin(altScript) )
+                {
+                // Suitable alternative script found. Use its labels
+                // instead of showing only Latin alphabets.
+                script = altScript;
+                i = langCount; // to break out
+                }
+            }
+        
+        CleanupStack::PopAndDestroy( &availableLanguages );
+        }
+    
+    return script;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerKeyPadLabelManager::ChineseScriptToUseL
+//
+// ---------------------------------------------------------------------------
+//
+TInt CDialerKeyPadLabelManager::ChineseScriptToUseL() const
+    {
+    TInt script( EScriptLatin );
+    
+    TInt lang( ELangPrcChinese );
+    TInt chnSearchMode( 0 );
+    
+    TInt err = iAknFepRepository->Get( KAknFepInputTxtLang, lang );
+    __ASSERT_DEBUG( !err, DialerPanic(EDialerPanicChineseScriptError) );
+    
+    switch ( lang )
+        {
+        case ELangPrcChinese:
+            {
+            err = iAvkonRepository->Get( KAknAdaptiveSearchChinesePRC, chnSearchMode );
+            script = ( chnSearchMode == EChnPrcPinyin ? EScriptChnPinyin : EScriptChnStroke );
+            }
+            break;
+        case ELangTaiwanChinese:
+            {
+            err = iAvkonRepository->Get( KAknAdaptiveSearchChineseTW, chnSearchMode );
+            script = ( chnSearchMode == EChnTwZhuyin ? EScriptChnZhuyin : EScriptChnStroke );
+            }
+            break;
+        case ELangHongKongChinese:
+            {
+            err = iAvkonRepository->Get( KAknAdaptiveSearchChineseHongkong, chnSearchMode );
+            script = ( chnSearchMode == EChnHkStroke ? EScriptChnStroke : EScriptChnCangjie );
+            }
+            break;
+        default:
+            {
+            err = KErrUnknown;
+            }
+            break;
+        }
+    __ASSERT_DEBUG( !err, DialerPanic(EDialerPanicChineseScriptError) );
+    
+    return script;
+    }
+
+
+// LOCAL FUNCTION DEFINITIONS
+
+// ---------------------------------------------------------------------------
+// ScriptForLang
+//
+// ---------------------------------------------------------------------------
+//
+static TScript ScriptForLang( TLanguage aLang )
+    {
+    TScript script( EScriptLatin );
+    for ( TInt i = 0 ; i < KScriptMapCount ; ++i )
+        {
+        if ( aLang == KScriptMap[i].iLang )
+            {
+            script = KScriptMap[i].iScript;
+            i = KScriptMapCount; // to break out
+            }
+        }
+    return script;
+    }
+
+// ---------------------------------------------------------------------------
+// ScriptName
+//
+// ---------------------------------------------------------------------------
+//
+static const TDesC& ScriptName( TScript aScriptCode )
+    {
+    // Convert script ID to script name
+    switch ( aScriptCode )
+        {
+        case EScriptLatin:
+            return KScriptLatin;
+        case EScriptCyrillic:
+            return KScriptCyrillic;
+        case EScriptGreek:
+            return KScriptGreek;
+        case EScriptHebrew:
+            return KScriptHebrew;
+        case EScriptArabic:
+            return KScriptArabic;
+        case EScriptFarsi:
+            return KScriptFarsi;
+        case EScriptUrdu:
+            return KScriptUrdu;
+        case EScriptThai:
+            return KScriptThai;
+        case EScriptDevanagari:
+            return KScriptDevanagari;
+        case EScriptChnPinyin:
+            return KScriptChnPinyin;
+        case EScriptChnZhuyin:
+            return KScriptChnZhuyin;
+        case EScriptChnStroke:
+            return KScriptChnStroke;
+        case EScriptChnCangjie:
+            return KScriptChnCangjie;
+        default:
+            __ASSERT_DEBUG( EFalse, DialerPanic(EDialerPanicUnknownScript) );
+        }
+    return KNullDesC;
+    }
+
+// ---------------------------------------------------------------------------
+// ScriptCanSubstituteLatin
+// Return ETrue if labels of given script can be used instead of Latin labels
+// when current input language is written with Latin script. This requires
+// that the labels include also Latin characters and that labels don't contain
+// any characters which would only make sense in some specific input mode.
+// ---------------------------------------------------------------------------
+//
+static TBool ScriptCanSubstituteLatin( TScript aScript )
+    {
+    // It would be better to figure this out from the resources but that would
+    // require opening and parsing several resource files.
+    return !( aScript == EScriptArabic || 
+              aScript == EScriptUrdu || 
+              aScript == EScriptFarsi ||
+              aScript == EScriptChinese ||
+              aScript == EScriptChnPinyin ||
+              aScript == EScriptChnZhuyin ||
+              aScript == EScriptChnStroke ||
+              aScript == EScriptChnCangjie );
+    }
+
+// end of file
+
--- a/phoneuis/dialer/src/cdialernumberentry.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/src/cdialernumberentry.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -44,10 +44,13 @@
 #include "dialertrace.h"
 #include "dialer.hrh"
 #include "mnumberentry.h"
-
+#include    <dialingextensioninterface.h>
+#include    <phoneappcommands.hrh>
 
 const TInt KNumberEntryControlCount = 2; //  = number entry, label
 
+_LIT( KPhoneValidChars, "0123456789*#+pwPW" );
+
 // ========================= MEMBER FUNCTIONS ================================
 
 // ---------------------------------------------------------------------------
@@ -76,7 +79,7 @@
 //
 void CDialerNumberEntry::ConstructL()
     {   
-   	DIALER_PRINT("numberentry::ConstructL<");  
+    DIALER_PRINT("numberentry::ConstructL<");  
     BaseConstructL();
  
     // Create number entry editor    
@@ -106,6 +109,9 @@
     iLabel->SetTextL( KNullDesC );
     iLabel->MakeVisible( EFalse );    
     CheckLabelSkinningColor();
+    
+    iAppUi = iEikonEnv->EikAppUi();
+    __ASSERT_ALWAYS( iAppUi, DialerPanic( EDialerPanicNoApplicationInstance ) );
      
     ActivateL();
     DIALER_PRINT("numberentry::ConstructL>");
@@ -128,7 +134,6 @@
     delete iEditor;
     delete iFrameContext;
     delete iLabel;
-    
     }
 
 
@@ -146,11 +151,11 @@
 // CDialerNumberEntry::SetFocus
 // ---------------------------------------------------------------------------
 //
-void CDialerNumberEntry::SetFocus( TBool aFocus, 
-                                            TDrawNow /*aDrawNow*/ )
+void CDialerNumberEntry::SetFocus( TBool aFocus, TDrawNow aDrawNow )
     {
     DIALER_PRINT("numberentry::SetFocus<");
     
+    CCoeControl::SetFocus( aFocus, aDrawNow );
     iEditor->SetFocus( aFocus );
      
     DIALER_PRINT("numberentry::SetFocus>");    
@@ -211,6 +216,12 @@
     DIALER_PRINT("numberentry::SetTextToNumberEntry<");
         	
     iEditor->SetText( aDesC );   
+    
+    if ( iEasyDialer && iOperationMode == EModeEasyDialing )
+        {
+        TRAP_IGNORE( iEasyDialer->SetInputL( aDesC ) );
+        }
+    
     iEditor->DrawNow();
     
     DIALER_PRINT("numberentry::SetTextToNumberEntry>");
@@ -220,9 +231,18 @@
 // CDialerNumberEntry::GetTextFromNumberEntry
 // ---------------------------------------------------------------------------
 //
-void CDialerNumberEntry::GetTextFromNumberEntry( TDes& aDesC )
+void CDialerNumberEntry::GetTextFromNumberEntry( TDes& aDes )
     {
-    iEditor->GetText( aDesC );
+    iEditor->GetText( aDes );
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerNumberEntry::Text
+// ---------------------------------------------------------------------------
+//
+TPtrC CDialerNumberEntry::Text() const
+    {
+    return iEditor->Text();
     }
 
 // ---------------------------------------------------------------------------
@@ -301,15 +321,15 @@
     {
     DIALER_PRINT("numberentry::HandleControlEventL<"); 
     
-    TInt format( KDialerNELayoutLargeFont );
     if ( aControl == iEditor && aEventType == EEventStateChanged )
         {
         HandleEditorFormatting();
+        
         InformNumberEntryState();        
-        iEditor->DrawDeferred();
         
+        iEditor->DrawDeferred();
         }
-        
+    
     DIALER_PRINT("numberentry::HandleControlEventL>");                
     }
 
@@ -320,8 +340,22 @@
 TKeyResponse CDialerNumberEntry::OfferKeyEventL( 
                                             const TKeyEvent& aKeyEvent, 
                                             TEventCode aType )
-    {   
-    return iEditor->OfferKeyEventL( aKeyEvent, aType );
+    {       
+    TKeyResponse handled = EKeyWasNotConsumed;
+        
+    // First, offer keyevent to easy dialer.
+    if (iEasyDialer)
+        {
+        handled = iEasyDialer->OfferKeyEventL(aKeyEvent, aType);
+        }
+        
+    // Then to number entry editor. 
+    if (handled == EKeyWasNotConsumed)
+        {
+        handled = iEditor->OfferKeyEventL(aKeyEvent, aType);
+        }
+        
+    return handled;
     }
     
 // ---------------------------------------------------------------------------
@@ -398,14 +432,15 @@
     AknsUtils::RegisterControlPosition( this );
 
     TDialerVariety variety( EDialerVarietyLandscape );
-    if (  !Layout_Meta_Data::IsLandscapeOrientation() )
+    if ( !Layout_Meta_Data::IsLandscapeOrientation() )
         {
         variety = EDialerVarietyPortrait;
         }      
         
     TRect parentRect( Rect() );
-    TAknTextComponentLayout neLayout = 
-                        AknLayoutScalable_Apps::dialer2_ne_pane_t1( variety ); 
+    TAknTextComponentLayout neLayout = ( iOperationMode == EModeEasyDialing ?
+        AknLayoutScalable_Apps::dia3_numentry_pane_t1( variety ) :
+        AknLayoutScalable_Apps::dialer2_ne_pane_t1( variety ) );
 
     AknLayoutUtils::LayoutControl(
         iEditor, parentRect, 
@@ -418,13 +453,13 @@
         neLayout.H()
         );
 
-    UpdateNumberEntryFormats(); 
-      
     RectFrameInnerOuterRects(
-           Rect(),
+           parentRect,
            iOuterRect,
            iInnerRect );
 
+    UpdateNumberEntryFormats();
+      
     iFrameContext->SetFrameRects( iOuterRect, iInnerRect );
                 
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
@@ -438,15 +473,13 @@
     // Portrait variety is temporarily used also in landscape.
     // Landscape layout data is now unavailable. 
     TAknTextComponentLayout labelLayout = 
-                        AknLayoutScalable_Apps::dialer2_ne_pane_t2( 
-                                                    EDialerVarietyPortrait );
+        AknLayoutScalable_Apps::dialer2_ne_pane_t2( EDialerVarietyPortrait );
     // Temporary solution 
-    labelLayout.Setl(neLayout.l());
+    labelLayout.Setl( neLayout.l() );
     AknLayoutUtils::LayoutLabel( iLabel, parentRect, labelLayout );
     
     HandleEditorFormatting();
     iEditor->DrawDeferred();
-    
     }
 
 // ---------------------------------------------------------------------------
@@ -502,111 +535,62 @@
 void CDialerNumberEntry::CalculateLayout( 
         CAknPhoneNumberEditor::TFormat& aFormat, TInt aNEVariety )
     {
-    TAknLayoutText textsLargeFontLine1Text;
-    TAknLayoutText textsLargeFontLine2Text;
-    TAknLayoutText textsLargeFontLine3Text;
-    
-    TAknLayoutText textsSmallFontLine1Text;
-    TAknLayoutText textsSmallFontLine2Text;
-    TAknLayoutText textsSmallFontLine3Text;    		
-      
-    const CAknLayoutFont* layoutFont;
-	
-	switch ( aNEVariety )
-		{
-		case KDialerNELayoutLargeFont:
-			{
-			TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 2 : 0;
-			
-            TAknLayoutScalableParameterLimits limits = 
-                AknLayoutScalable_Apps::dialer2_ne_pane_t1_ParamLimits( 
-                                                         variety );                
-            //Line 1
-            textsLargeFontLine1Text.LayoutText( Rect(), 
-                 AknLayoutScalable_Apps::dialer2_ne_pane_t1( 
-                                                         variety, 0, 0 ) );  
-            //Line 2     
-            textsLargeFontLine2Text.LayoutText( Rect(), 
-                 AknLayoutScalable_Apps::dialer2_ne_pane_t1( 
-                                                         variety, 
-                                                         0, 
-                                                         1 ) );
-            //Last row
-            textsLargeFontLine3Text.LayoutText( Rect(), 
-                AknLayoutScalable_Apps::dialer2_ne_pane_t1( variety,
-                                                            0, 
-                                                            limits.LastRow() ) );
+    TAknLayoutText textsLine1Text;
+    TAknLayoutText textsLine2Text;
+
+    if ( iOperationMode == EModeEasyDialing )
+        {
+        TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0;
+        textsLine1Text.LayoutText( Rect(), AknLayoutScalable_Apps::dia3_numentry_pane_t1(variety) );        
+        textsLine2Text = textsLine1Text;
+        }
+    else
+        {
+        TInt variety = 0;
+        if ( aNEVariety == KDialerNELayoutLargeFont )
+            {
+            variety = Layout_Meta_Data::IsLandscapeOrientation() ? 2 : 0;
+            }
+        else
+            {
+            variety = Layout_Meta_Data::IsLandscapeOrientation() ? 3 : 1;
+            }
 
-            //Need to add one row because zero is the first line                
-            aFormat.iNumLines =  limits.LastRow()+1;
-                            	
-        	//take font from line 1    
-            aFormat.iFont = textsLargeFontLine1Text.Font();
-            layoutFont = CAknLayoutFont::AsCAknLayoutFontOrNull( aFormat.iFont);
-            aFormat.iBottomBaselineOffset = 
-                                         layoutFont->BaselineToTextPaneBottom();
-            //outer rect from last line
-            aFormat.iOuterRect = textsLargeFontLine3Text.TextRect();
-            // have to add extra gap
-            aFormat.iOuterRect.iTl.iY -= aFormat.iBottomBaselineOffset; 
-         
-            //calculate baselineSeparation from the difference of the second 
-            //line and the first line bottom right Y coordinates            
-            TInt baselineSeparation = textsLargeFontLine2Text.TextRect().iBr.iY 
-                - textsLargeFontLine1Text.TextRect().iBr.iY;
-            
-            aFormat.iOuterRect.iTl.iY -= ( (aFormat.iNumLines - 1) 
-                                            * baselineSeparation );
-            aFormat.iBaselineSeparation = baselineSeparation;  									
-			}
-			break;
-		case KDialerNELayoutSmallFont:
-			{
-			TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 3 : 1;
-			
-            TAknLayoutScalableParameterLimits limits = 
-                AknLayoutScalable_Apps::dialer2_ne_pane_t1_ParamLimits( 
-                                                                variety );                   
-            //Line 1
-            textsSmallFontLine1Text.LayoutText( Rect(), 
-                 AknLayoutScalable_Apps::dialer2_ne_pane_t1( variety,0,0 ) );  
-            //Line 2     
-            textsSmallFontLine2Text.LayoutText( Rect(), 
-                 AknLayoutScalable_Apps::dialer2_ne_pane_t1( variety,0,1 ) );
-            //Last row
-            textsSmallFontLine3Text.LayoutText( Rect(), 
-                 AknLayoutScalable_Apps::dialer2_ne_pane_t1( 
-                                                         variety,
-                                                         0, 
-                                                         limits.LastRow() ) ); 
-            
-            //Need to add one row because zero is the first line
-            aFormat.iNumLines =  limits.LastRow()+1;
-                                                                   
-        	 //take font from line 1     
-            aFormat.iFont = textsSmallFontLine1Text.Font();
-            layoutFont = CAknLayoutFont::AsCAknLayoutFontOrNull( 
-                                                           aFormat.iFont);
-            aFormat.iBottomBaselineOffset = 
-                                        layoutFont->BaselineToTextPaneBottom();
-            //outer rect from line 3
-            aFormat.iOuterRect = textsSmallFontLine3Text.TextRect();
-            // have to add extra gap
-            aFormat.iOuterRect.iTl.iY -= aFormat.iBottomBaselineOffset; 
-            
-            //calculate baselineSeparation from the difference of the second 
-            //line and the first line bottom right Y coordinates
-            TInt baselineSeparation = textsSmallFontLine2Text.TextRect().iBr.iY 
-                - textsSmallFontLine1Text.TextRect().iBr.iY;
-            
-            aFormat.iOuterRect.iTl.iY -= ( (aFormat.iNumLines - 1) 
-                                            * baselineSeparation );
-            aFormat.iBaselineSeparation = baselineSeparation; 					
-			} 
-			break;
-	 	default:
-	 		break;
-		} 				
+        //Line 1
+        textsLine1Text.LayoutText( Rect(), 
+            AknLayoutScalable_Apps::dialer2_ne_pane_t1( variety, 0, 0 ) );  
+        //Line 2     
+        textsLine2Text.LayoutText( Rect(), 
+            AknLayoutScalable_Apps::dialer2_ne_pane_t1( variety, 0, 1 ) );
+        }
+    
+    //take font from line 1
+    aFormat.iFont = textsLine1Text.Font();
+    const CAknLayoutFont* layoutFont = CAknLayoutFont::AsCAknLayoutFontOrNull( aFormat.iFont );
+    aFormat.iBottomBaselineOffset = layoutFont->BaselineToTextPaneBottom();
+
+    // Calculate baselineSeparation from the difference of the second 
+    // line and the first line bottom right Y coordinates.
+    TInt baselineSeparation = 
+        textsLine2Text.TextRect().iBr.iY - textsLine1Text.TextRect().iBr.iY;
+    aFormat.iBaselineSeparation = baselineSeparation;
+
+    // Outer rect of the text editor is the inner rect of the whole text box
+    aFormat.iOuterRect = iInnerRect;
+    
+    aFormat.iNumLines = 1;
+    
+    // If multiline layout is to be used, the exact number of lines is calculated 
+    // based on available area and the row height (i.e. baselineSeparation)
+    if ( baselineSeparation > 0 && baselineSeparation < iInnerRect.Height() )
+        {
+        aFormat.iNumLines = ( iInnerRect.Height() / baselineSeparation );
+
+        // Center editor vertically to the available area.
+        TInt editorHeight = aFormat.iNumLines * baselineSeparation;
+        TInt deltaHeight = ( iInnerRect.Height() - editorHeight ) / 2;
+        aFormat.iOuterRect.Shrink( 0, deltaHeight );
+        }
 	}
 
 // ---------------------------------------------------------------------------
@@ -622,6 +606,24 @@
         CheckLabelSkinningColor(); 
         }
     }
+
+// ---------------------------------------------------------------------------
+// CDialerNumberEntry::HandlePointerEventL  
+// ---------------------------------------------------------------------------
+//
+void CDialerNumberEntry::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    // Normal pointer event handling and delegation to editor component 
+    // happens only if we are already in focus. Otherwise we just take the
+    // focus. This is to prevent accidental cursor movements as putting the
+    // cursor back to the end of the text is difficult for right-aligned
+    // text.
+    if ( iEditor->IsFocused() )
+        {
+        CCoeControl::HandlePointerEventL( aPointerEvent );
+        }
+    }
+
 // ---------------------------------------------------------------------------
 // CDialerNumberEntry::HandleEditorFormatting  
 // ---------------------------------------------------------------------------
@@ -679,41 +681,51 @@
                                               TRect& aOuterRect,
                                               TRect& aInnerRect )
     {
-    if ( Layout_Meta_Data::IsMirrored() )
+    if ( iOperationMode == EModeEasyDialing )
         {
-        TAknLayoutRect frameTopRight;        
-        frameTopRight.LayoutRect( 
-         aFrameRect, 
-         AknLayoutScalable_Apps::bg_popup_call2_rect_pane_g3().LayoutLine() );                
-                
-        TAknLayoutRect frameBottomLeft;        
-        frameBottomLeft.LayoutRect( 
-         aFrameRect, 
-         AknLayoutScalable_Apps::bg_popup_call2_rect_pane_g4().LayoutLine() );                        
-
-        aOuterRect = TRect( frameTopRight.Rect().iTl, 
-                            frameBottomLeft.Rect().iBr );
-                
-        aInnerRect = TRect( frameTopRight.Rect().iBr, 
-                            frameBottomLeft.Rect().iTl );    
+        aOuterRect = Rect();
+        TAknLayoutRect innerRectLayout;
+        innerRectLayout.LayoutRect( aOuterRect, AknLayoutScalable_Apps::bg_dia3_numentry_pane_g1() );
+        aInnerRect = innerRectLayout.Rect();
         }
     else
         {
-        TAknLayoutRect frameTopLeft;        
-        frameTopLeft.LayoutRect( 
-         aFrameRect, 
-         AknLayoutScalable_Apps::bg_popup_call2_rect_pane_g2().LayoutLine() );
-
-        TAknLayoutRect frameBottomRight;        
-        frameBottomRight.LayoutRect( 
-         aFrameRect, 
-         AknLayoutScalable_Apps::bg_popup_call2_rect_pane_g5().LayoutLine() );
-        
-        aOuterRect = TRect( frameTopLeft.Rect().iTl, 
-                            frameBottomRight.Rect().iBr );
-        aInnerRect = TRect( frameTopLeft.Rect().iBr, 
-                            frameBottomRight.Rect().iTl );    
-        }                    
+        if ( Layout_Meta_Data::IsMirrored() )
+            {
+            TAknLayoutRect frameTopRight;        
+            frameTopRight.LayoutRect( 
+             aFrameRect, 
+             AknLayoutScalable_Apps::bg_popup_call2_rect_pane_g3().LayoutLine() );                
+                    
+            TAknLayoutRect frameBottomLeft;        
+            frameBottomLeft.LayoutRect( 
+             aFrameRect, 
+             AknLayoutScalable_Apps::bg_popup_call2_rect_pane_g4().LayoutLine() );                        
+    
+            aOuterRect = TRect( frameTopRight.Rect().iTl, 
+                                frameBottomLeft.Rect().iBr );
+                    
+            aInnerRect = TRect( frameTopRight.Rect().iBr, 
+                                frameBottomLeft.Rect().iTl );    
+            }
+        else
+            {
+            TAknLayoutRect frameTopLeft;        
+            frameTopLeft.LayoutRect( 
+             aFrameRect, 
+             AknLayoutScalable_Apps::bg_popup_call2_rect_pane_g2().LayoutLine() );
+    
+            TAknLayoutRect frameBottomRight;        
+            frameBottomRight.LayoutRect( 
+             aFrameRect, 
+             AknLayoutScalable_Apps::bg_popup_call2_rect_pane_g5().LayoutLine() );
+            
+            aOuterRect = TRect( frameTopLeft.Rect().iTl, 
+                                frameBottomRight.Rect().iBr );
+            aInnerRect = TRect( frameTopLeft.Rect().iBr, 
+                                frameBottomRight.Rect().iTl );    
+            }
+        }
     }    
     
 // -----------------------------------------------------------------------------
@@ -741,11 +753,28 @@
         iNumberContents = EFalse;
         } 
 
-    if( iObserver )
+    if ( iPreviousNumberEntryContent.Compare( iEditor->Text() ) != 0 )
         {
-        iObserver->NumberEntryStateChanged( iNumberContents );
+        iPreviousNumberEntryContent.Zero();
+        iEditor->GetText( iPreviousNumberEntryContent );
+
+        // The following stores the information of validity of the number for normal calls.
+        // This information is needed so that we don't show call items for invalid numbers.
+        TBool validPhoneNumber = Validate( iEditor->Text() );
+        TInt commandId = validPhoneNumber ? EPhoneDialerValidNumber : EPhoneDialerInvalidNumber;
+        
+        TRAP_IGNORE( iAppUi->HandleCommandL( commandId ) );
+    
+        if ( iEasyDialer && iOperationMode == EModeEasyDialing )
+            {
+            TRAP_IGNORE( iEasyDialer->SetInputL( iEditor->Text() ) );
+            }
+
+        if ( iObserver )
+            {
+            iObserver->NumberEntryStateChanged( iNumberContents );
+            }
         }
-    
     }
     
 // -----------------------------------------------------------------------------
@@ -771,4 +800,54 @@
         }   
     }
     
+    
+// CDialerNumberEntry::MakeVisible( TBool aVisible )
+// -----------------------------------------------------------------------------
+//	
+void CDialerNumberEntry::MakeVisible( TBool aVisible )
+	{
+	CCoeControl::MakeVisible( aVisible );
+	iEditor->MakeVisible( aVisible );
+	}
+	
+	
+// -----------------------------------------------------------------------------
+// CDialerNumberEntry::SetEasyDialingPlugin
+// -----------------------------------------------------------------------------
+//
+void CDialerNumberEntry::SetEasyDialingPlugin(CDialingExtensionInterface* aEasyDialer)
+    {
+    DIALER_PRINT("numberentry::SetEasyDialingPlugin");
+    iEasyDialer = aEasyDialer;
+    }
+
+// -----------------------------------------------------------------------------
+// CDialerNumberEntry::SetOperationMode
+// -----------------------------------------------------------------------------
+//
+void CDialerNumberEntry::SetOperationMode( TDialerOperationMode aMode )
+    {
+    iOperationMode = aMode;
+    }
+
+// -----------------------------------------------------------------------------
+// CDialerNumberEntry::Validate
+//
+// Copied from cphonekeys.
+// -----------------------------------------------------------------------------
+//
+TBool CDialerNumberEntry::Validate( const TDesC& aString )
+    {
+    DIALER_PRINT("numberentry::Validate");
+    TLex input( aString );
+    TPtrC valid( KPhoneValidChars );
+
+    while ( valid.Locate( input.Peek() ) != KErrNotFound )
+        {
+        input.Inc();
+        }
+    
+    return !input.Remainder().Length();
+    }
+
 // End of File
--- a/phoneuis/dialer/src/cdialerstub.cpp	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/dialer/src/cdialerstub.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* 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"
@@ -30,11 +30,12 @@
 // ---------------------------------------------------------------------------
 //
 EXPORT_C CDialer* CDialer::NewL( const CCoeControl& aContainer, 
-                                 const TRect& aRect )
+                                 const TRect& aRect, 
+                                 MPhoneDialerController* aController )
     {
     CDialer* self = new( ELeave )CDialer ( );    
     CleanupStack::PushL( self );
-    self->ConstructL( aContainer , aRect );
+    self->ConstructL( aContainer , aRect, aController );
     CleanupStack::Pop();    // self
     return self;
     }
@@ -53,12 +54,12 @@
 //
 void CDialer::ConstructL( 
     const CCoeControl& aContainer, 
-    const TRect& aRect )
-    {    
+    const TRect& aRect,
+    MPhoneDialerController* /*aController*/ )
+    {
     // set window
     SetContainerWindowL( aContainer );
     SetParent( const_cast<CCoeControl*>(&aContainer) );
-    iParentControl = &aContainer;
     SetRect( aRect );
     }
 
@@ -90,6 +91,41 @@
     // Empty
     }
 
+// -----------------------------------------------------------------------------
+// CDialer::SetControllerL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CDialer::SetControllerL( MPhoneDialerController* /*aController*/ ) 
+    {
+    // Empty
+    }
+
+// ---------------------------------------------------------------------------
+// CDialer::Controller
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MPhoneDialerController* CDialer::Controller()
+    {
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CDialer::GetEasyDialingInterface
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CDialingExtensionInterface* CDialer::GetEasyDialingInterface() const
+    {
+    return NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialer::UpdateToolbar
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CDialer::UpdateToolbar()
+    {
+    // empty
+    }
 
 // Methods from MNumberEntry
 
@@ -226,6 +262,18 @@
     {
     // Empty
     }
+
+
+// ---------------------------------------------------------------------------
+// CDialer::HandleControlEventL
+// ---------------------------------------------------------------------------
+//
+void CDialer::HandleControlEventL( CCoeControl* /*aControl*/, TCoeEvent /*aEventType*/ )
+    {
+    // Empty
+    }
+
+
 // Functions from CCoeControl
 
 // ---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/src/cdialertoolbarcontainer.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,461 @@
+/*
+* 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:  CDialerToolbarContainer replaces the standard S60 toolbar
+*               in the Dialer layout in the Easy dialing mode. It's 
+*               responsible of the toolbar layout and logic, but not of the 
+*               contents which are provided by an instance of 
+*               MPhoneDialerController.
+*
+*/
+
+#include <aknbutton.h>
+#include <aknappui.h>
+#include <AknsUtils.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <phoneui.rsg>
+#include <phoneappcommands.hrh>
+#include <StringLoader.h>
+#include <data_caging_path_literals.hrh>
+
+#include "dialercommon.h"
+#include "cdialertoolbarcontainer.h"
+
+
+// CONSTANTS
+const TInt KDialerToolbarButtonKeyRepeatDelay = 300;
+const TInt KDialerToolbarKeyRepeatInterval = 75;
+
+
+
+// CLASS DEFINITION
+
+// ---------------------------------------------------------------------------
+// NewL
+//
+// ---------------------------------------------------------------------------
+//
+CDialerToolbarContainer* CDialerToolbarContainer::NewL( CCoeControl& aParent,
+        MPhoneDialerController* aContentProvider )
+    {
+    CDialerToolbarContainer* self = 
+            new (ELeave) CDialerToolbarContainer( aParent, aContentProvider );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CDialerToolbarContainer
+//
+// ---------------------------------------------------------------------------
+//
+CDialerToolbarContainer::CDialerToolbarContainer( CCoeControl& aParent,
+        MPhoneDialerController* aContentProvider ) : 
+    CDialerContainerBase( aParent ), 
+    iContentProvider( aContentProvider )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// ~CDialerToolbarContainer
+//
+// ---------------------------------------------------------------------------
+//
+CDialerToolbarContainer::~CDialerToolbarContainer()
+    {
+    iCoeEnv->RemoveForegroundObserver( *this );
+    DeleteButtons();
+    }
+
+// ---------------------------------------------------------------------------
+// ConstructL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::ConstructL()
+    {
+    BaseConstructL();
+    
+    CreateButtonsL();
+
+    iCoeEnv->AddForegroundObserverL( *this );
+    }
+
+// ---------------------------------------------------------------------------
+// SetContentProviderL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::SetContentProviderL( MPhoneDialerController* aProvider )
+    {
+    if ( iContentProvider != aProvider )
+        {
+        iContentProvider = aProvider;
+        
+        // Recreate buttons to reset available button states
+        DeleteButtons();
+        CreateButtonsL();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// UpdateButtonStates
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::UpdateButtonStates()
+    {
+    // safety check
+    if ( iButtons.Count() < MPhoneDialerController::ENumberOfButtons ||
+         !iContentProvider )
+        {
+        return;
+        }
+    
+    for ( TInt i = 0 ; i < MPhoneDialerController::ENumberOfButtons ; ++i )
+        {
+        MPhoneDialerController::TButtonIndex idx =
+            static_cast< MPhoneDialerController::TButtonIndex >( i );
+        TInt state = iContentProvider->ButtonState( idx );
+        TBool dimmed = iContentProvider->ButtonDimmed( idx );
+        if ( state >= 0 )
+            {
+            iButtons[i]->SetCurrentState( state, EFalse );
+            }
+        iButtons[i]->SetDimmed( dimmed );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// SetVariety
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::SetVariety()
+    {
+    iVariety = ( Layout_Meta_Data::IsLandscapeOrientation() ?
+        EDialerVarietyLandscape : EDialerVarietyPortrait );
+    }
+
+// ---------------------------------------------------------------------------
+// SetLayout
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::SetLayout()
+    {
+    if ( iButtons.Count() < MPhoneDialerController::ENumberOfButtons )
+        {
+        return;
+        }
+    
+    // Position for the first button
+    TPoint buttonPos = Rect().iTl;
+    
+    if ( iVariety == EDialerVarietyPortrait )
+        {
+        // In portrait, buttons are laid out from top to bottom
+        for ( TInt i = 0 ; i < iButtons.Count() ; ++i )
+            {
+            buttonPos = LayoutButton( i, buttonPos );
+            }
+        }
+    else
+        {
+        // In landscape, buttons are laid out from right to left.
+        // This is achieved by looping button array backwards and laying
+        // those out from left to right.
+        for ( TInt i = iButtons.Count()-1 ; i >= 0  ; --i )
+            {
+            buttonPos = LayoutButton( i, buttonPos );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CountComponentControls
+//
+// ---------------------------------------------------------------------------
+//
+TInt CDialerToolbarContainer::CountComponentControls() const
+    {
+    return iButtons.Count();
+    }
+
+// ---------------------------------------------------------------------------
+// ComponentControl
+//
+// ---------------------------------------------------------------------------
+//
+CCoeControl* CDialerToolbarContainer::ComponentControl( TInt aIndex ) const
+    {
+    CCoeControl* control = NULL;
+    if ( aIndex >= 0 && aIndex < iButtons.Count() )
+        {
+        control = iButtons[ aIndex ];
+        }
+    return control;
+    }
+
+// ---------------------------------------------------------------------------
+// HandleControlEventL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType )
+    {
+    if ( aEventType == MCoeControlObserver::EEventStateChanged )
+        {
+        // Handle button press. 
+
+        // Multistate buttons change state automatically when pressed. 
+        // Revert this change as we do not want to use states
+        // for "toggle button" type of functionality but to give one button
+        // different functions depending on the situation.
+        UpdateButtonStates();
+
+        // Handle the command attached to the button
+        CAknButton* button = static_cast<CAknButton*>( aControl );
+        TInt commandId = ButtonCommand( *button );
+        
+        if ( commandId == EPhoneDialerCmdClear )
+            {
+            // simulate backspace
+            TKeyEvent keyEvent;
+            keyEvent.iModifiers = 0;
+            keyEvent.iRepeats = 0;
+            keyEvent.iCode = EKeyBackspace;
+            keyEvent.iScanCode = EStdKeyBackspace;
+            iCoeEnv->SimulateKeyEventL( keyEvent, EEventKey );
+            }
+        else
+            {
+            // Forward pressed toolbar button to the framework 
+            // so that we can handle it in active state
+            CAknAppUi* appUi = static_cast<CAknAppUi*>( iCoeEnv->AppUi() );
+            appUi->ProcessCommandL( commandId );  
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// HandlePointerEventL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    iLatestPointerEvent = aPointerEvent;
+    CCoeControl::HandlePointerEventL( aPointerEvent );
+    }
+
+// ---------------------------------------------------------------------------
+// HandleGainingForeground
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::HandleGainingForeground()
+    {
+    // no implementation needed
+    }
+    
+// ---------------------------------------------------------------------------
+// HandleLosingForeground
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::HandleLosingForeground()
+    {
+    // This is needed when dialer control disappeares during keypress. 
+    // Last pressed pointer event must be forwarted to framework 
+    // as pointer up event. Thus button is set to unpressed state etc. 
+    // 
+    if ( iLatestPointerEvent.iType != TPointerEvent::EButton1Up )
+        {    
+        iLatestPointerEvent.iType = TPointerEvent::EButton1Up;
+        TRAP_IGNORE( HandlePointerEventL( iLatestPointerEvent ) );
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// CreateButtonsL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::CreateButtonsL()
+    {
+    // Create the avkon button objects
+    for ( TInt i = 0 ; i < MPhoneDialerController::ENumberOfButtons ; ++i )
+        {
+        CAknButton* button = CAknButton::NewLC();
+        button->SetContainerWindowL( *this ); // this sets also parent and mopParent
+        button->SetObserver( this );
+        button->SetIconScaleMode( EAspectRatioPreserved );
+        AknsUtils::RegisterControlPosition( button );
+        button->ActivateL();
+        iButtons.AppendL( button );
+        CleanupStack::Pop( button );
+        iButtonCommands.AppendL( RArray<TInt>() );
+        }
+
+    // Backspace button has auto-repeat feature
+    iButtons[MPhoneDialerController::EClearButton]->SetButtonFlags( KAknButtonKeyRepeat );
+    iButtons[MPhoneDialerController::EClearButton]->SetKeyRepeatInterval( 
+        KDialerToolbarButtonKeyRepeatDelay, KDialerToolbarKeyRepeatInterval );
+    
+    // Call button doesn't use default button background but a green one 
+    // (same as used by in-call view for answer button)
+    iButtons[MPhoneDialerController::ECallButton]->SetFrameAndCenterIds( 
+            KAknsIIDQsnFrButtonNormalAnswer, KAknsIIDQsnFrButtonNormalAnswerCenter,
+            KAknsIIDQsnFrButtonPressedAnswer, KAknsIIDQsnFrButtonPressedAnswerCenter, 
+            KAknsIIDQsnFrButtonInactiveAnswer, KAknsIIDQsnFrButtonInactiveAnswerCenter, 
+            KAknsIIDQsnFrButtonPressedAnswer, KAknsIIDQsnFrButtonPressedAnswerCenter, 
+            KAknsIIDQsnFrButtonInactiveAnswer, KAknsIIDQsnFrButtonInactiveAnswerCenter
+            );
+        
+    // Add button states
+    if ( iContentProvider )
+        {
+        for ( TInt i = 0 ; i < MPhoneDialerController::ENumberOfButtons ; ++i )
+            {
+            MPhoneDialerController::TButtonIndex btnIdx =
+                static_cast< MPhoneDialerController::TButtonIndex >( i );
+            RPointerArray< MPhoneDialerController::CButtonData > states;
+            CleanupClosePushL( states );
+            iContentProvider->GetButtonData( btnIdx, states );
+            for ( TInt j = 0 ; j < states.Count() ; ++j )
+                {
+                TRAP_IGNORE( AddButtonStateL( i, *states[j] ) );
+                delete states[j];
+                states[j] = NULL;
+                }
+            CleanupStack::PopAndDestroy( &states );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// DeleteButtons
+// Reset internal arrays holding the button data
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::DeleteButtons()
+    {
+    for ( TInt i = 0 ; i < iButtons.Count() ; ++i )
+        {
+        AknsUtils::DeregisterControlPosition( iButtons[i] );
+        }
+    iButtons.ResetAndDestroy();
+    
+    for ( TInt i = 0 ; i < iButtonCommands.Count() ; ++i )
+        {
+        iButtonCommands[i].Reset();
+        }
+    iButtonCommands.Reset();
+    }
+
+// ---------------------------------------------------------------------------
+// AddButtonStateL
+//
+// ---------------------------------------------------------------------------
+//
+void CDialerToolbarContainer::AddButtonStateL( TInt aButtonIndex, 
+        MPhoneDialerController::CButtonData& aButtonData )
+    {
+    iButtons[ aButtonIndex ]->AddStateL(
+            aButtonData.iIcon,      //CGulIcon* aIcon, 
+            NULL,                   //CGulIcon* aDimmedIcon, 
+            NULL,                   //CGulIcon* aPressedIcon,
+            NULL,                   //CGulIcon* aHoverIcon,
+            KNullDesC,              //const TDesC& aText, 
+            *aButtonData.iTooltip,  //const TDesC& aHelpText, 
+            0 );                    //const TInt aStateFlags
+    aButtonData.iIcon = NULL; // ownership transferred
+    iButtonCommands[ aButtonIndex ].AppendL( aButtonData.iCommandId );
+    }
+
+// ---------------------------------------------------------------------------
+// ButtonCommand
+//
+// ---------------------------------------------------------------------------
+//
+TInt CDialerToolbarContainer::ButtonCommand( const CAknButton& aButton ) const
+    {
+    TInt commandId = KErrNotFound;
+    
+    // Find out index of the button in iButtons array
+    TInt btnIndex = KErrNotFound;
+    for ( TInt i = 0 ; i < iButtons.Count() ; ++i )
+        {
+        if ( iButtons[i] == &aButton )
+            {
+            btnIndex = i;
+            i = iButtons.Count(); // to break out of the loop
+            }
+        }
+    __ASSERT_DEBUG( btnIndex >= 0, DialerPanic( EDialerPanicToolbarButtonNotFound ) );
+    
+    // Find the corresponding command from command array
+    TInt btnStateIdx = aButton.StateIndex();
+    if ( btnIndex < iButtonCommands.Count() &&
+         btnStateIdx < iButtonCommands[btnIndex].Count() )
+        {
+        commandId = iButtonCommands[btnIndex][btnStateIdx];
+        }
+    
+    __ASSERT_DEBUG( commandId != KErrNotFound, DialerPanic( EDialerPanicToolbarButtonNotFound ) );
+    return commandId;
+    }
+
+// ---------------------------------------------------------------------------
+// LayoutButton
+// Set layout for one button.
+// ---------------------------------------------------------------------------
+//
+TPoint CDialerToolbarContainer::LayoutButton( TInt aButtonIdx, TPoint aPos )
+    {
+    TRect parentRect = Rect();
+
+    TAknWindowComponentLayout buttonLayout = 
+        ( aButtonIdx == MPhoneDialerController::ECallButton ? 
+          AknLayoutScalable_Apps::cell_dia3_key1_fun_pane( iVariety ) :
+          AknLayoutScalable_Apps::cell_dia3_key0_fun_pane( iVariety ) );
+        
+    TAknLayoutRect layoutRect;
+    layoutRect.LayoutRect( parentRect, buttonLayout );
+    TRect outerRect = layoutRect.Rect();
+    outerRect.SetRect( aPos, outerRect.Size() );
+
+    TRect innerRect = outerRect;
+    innerRect.Shrink( 1, 1 );
+    iButtons[ aButtonIdx ]->SetRect( innerRect );
+    AknsUtils::RegisterControlPosition( iButtons[ aButtonIdx ] );
+    
+    // Calculate position for the next button
+    TPoint nextPos = aPos;
+    if ( iVariety == EDialerVarietyPortrait )
+        {
+        nextPos.iY += outerRect.Height();
+        }
+    else
+        {
+        nextPos.iX += outerRect.Width();
+        }
+    
+    return nextPos;
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/dialer/src/cdialingextensionobserver.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,180 @@
+/*
+* 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:  Observer for dialingextension plug-in.
+*
+*/
+
+// INCLUDE FILES
+#include <eikenv.h>
+#include <eikappui.h>
+#include <phoneappcommands.hrh>
+
+// USER INCLUDE FILES
+#include "cdialingextensionobserver.h"
+#include "cdialernumberentry.h"
+#include "cdialer.h"
+
+
+// ---------------------------------------------------------------------------
+//  CDialingExtensionObserver::CDialingExtensionObserver
+//  
+// 
+// ---------------------------------------------------------------------------
+//    
+CDialingExtensionObserver* CDialingExtensionObserver::NewL( 
+        CDialingExtensionInterface* aDialingExtension, 
+        CDialerNumberEntry* aNumberEntry,
+        CDialer* aDialer )
+    {
+    CDialingExtensionObserver* self = new (ELeave) CDialingExtensionObserver( 
+            aDialingExtension, aNumberEntry, aDialer );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+//  CDialingExtensionObserver::~CDialingExtensionObserver
+//  
+// 
+// ---------------------------------------------------------------------------
+//
+CDialingExtensionObserver::~CDialingExtensionObserver()
+    {
+    // no owned data => no implementation needed
+    }
+
+// ---------------------------------------------------------------------------
+//  CDialingExtensionObserver::HandleDialingExtensionEvent
+//  
+// 
+// ---------------------------------------------------------------------------
+//    
+void CDialingExtensionObserver::HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent )
+    {
+    switch ( aEvent )
+        {
+        case MDialingExtensionObserver::EFocusChanged:
+            {
+            // The basic idea of EFocusChanged event handling:
+            // - If dialing extension gets in focus, focus is taken from number entry editor.
+            // - If dialing extension gives up focus, focus is given to number entry editor.
+            
+            if ( iDialingExtension->IsFocused() && iNumberEntry->IsFocused() )
+                {
+                iNumberEntry->SetFocus(EFalse);
+                UpdateCba();
+                iDialer->UpdateToolbar();
+                }
+            else if ( !iDialingExtension->IsFocused() && !iNumberEntry->IsFocused() && iDialer->IsFocused() )
+                {
+                // Number entry editor is set focused only if the parent control is in focus.
+                // If number entry editor was focused but parent was not, this may show as a
+                // a blinking cursor in an inappropriate place.
+                iNumberEntry->SetFocus(ETrue);
+                UpdateCba();
+                iDialer->UpdateToolbar();
+                }
+            
+            iNumberEntry->DrawDeferred();
+            }
+            break;
+
+        case MDialingExtensionObserver::ECCALauncherExit:
+        case MDialingExtensionObserver::ECommunicationCancelled:
+        case MDialingExtensionObserver::ECommunicationStarted:
+            {
+            // No actions. We should stay in dialer, and not go to idle.
+            }
+            break;
+        
+        case MDialingExtensionObserver::EEasyDialingEnabled:
+            {
+            // order dialer to refresh its layout
+            iDialer->SetSize( iDialer->Size() );
+            if (iDialingExtension && iNumberEntry)
+                {
+                // get matches for the current input
+                TRAP_IGNORE( SearchL() );
+                }
+            iDialer->DrawDeferred();
+            }
+            break;
+
+        case MDialingExtensionObserver::EEasyDialingDisabled:
+            {
+            // order parent to refresh its layout
+            iDialer->SetSize( iDialer->Size() );
+            iDialer->DrawDeferred();
+            }
+            break;
+            
+        default:
+            break;
+        }    
+    }
+
+
+// ---------------------------------------------------------------------------
+//  CDialingExtensionObserver::CDialingExtensionObserver
+//  
+// 
+// ---------------------------------------------------------------------------
+//    
+CDialingExtensionObserver::CDialingExtensionObserver( 
+        CDialingExtensionInterface* aDialingExtension, 
+        CDialerNumberEntry* aNumberEntry,
+        CDialer* aDialer ) :
+iDialingExtension( aDialingExtension ), 
+iNumberEntry( aNumberEntry ), 
+iDialer( aDialer ),
+iEikonEnvironment( NULL )
+    {
+    }
+        
+        
+// ---------------------------------------------------------------------------
+//  CDialingExtensionObserver::CDialingExtensionObserver
+//  
+// 
+// ---------------------------------------------------------------------------
+//    
+void CDialingExtensionObserver::UpdateCba()
+    {
+    if ( !iEikonEnvironment )
+        {
+        iEikonEnvironment = CEikonEnv::Static();
+        }
+    
+    if( iEikonEnvironment && iEikonEnvironment->EikAppUi() )
+        {
+        TRAP_IGNORE( iEikonEnvironment->EikAppUi()->HandleCommandL( EPhoneCmdUpdateCba ));
+        }
+    }
+
+
+// ---------------------------------------------------------------------------
+//  CDialingExtensionObserver::SearchL
+//  
+// 
+// ---------------------------------------------------------------------------
+//    
+void CDialingExtensionObserver::SearchL()
+    {
+    TPtrC searchString = iNumberEntry->Text();
+    if ( searchString.Length() )
+        {
+        iDialingExtension->SetInputL( searchString );
+        }
+    }
+
+// end of file
Binary file phoneuis/easydialing/cenrep/200212A0.txt has changed
Binary file phoneuis/easydialing/conf/easydialing.confml has changed
Binary file phoneuis/easydialing/conf/easydialing_200212A0.crml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/data/200212A0.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* 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:  Easy dialing ECom registry info.
+*
+*/
+
+//  INCLUDES
+
+#include <registryinfov2.rh>
+#include "ExtrStandbyScrConst.h"
+#include "easydialingconstants.hrh"
+
+RESOURCE REGISTRY_INFO theInfo
+    {
+    resource_format_version = RESOURCE_FORMAT_VERSION_2;
+
+    dll_uid = EASYDIALING_PLUGIN_DLL_UID;
+
+    interfaces = 
+        {
+        INTERFACE_INFO
+            {
+            interface_uid = EASYDIALING_PLUGIN_IF_UID;
+            implementations = 
+                {
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = EASYDIALING_PLUGIN_ECOM_IMPL_UID;
+                    version_no         = 1;
+                    display_name       = "Easy dialing";
+                    default_data       = "";
+                    opaque_data        = "";
+                    rom_only           = 0;
+                    }
+                };
+            }
+        };
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/data/easydialing_stub.pkg	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,23 @@
+; easydialing_stub.pkg
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"Easy dialing plug-in"},(0x200212A0),1,0,0, TYPE=SA
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+""-"z:\sys\bin\easydialingplugin.dll"
+""-"z:\resource\plugins\easydialingplugin.r*"
+""-"z:\resource\easydialingpluginresources.r*"
+""-"z:\resource\apps\easydialing.mif"
+
+""-"z:\sys\bin\edcontactor.dll"
+""-"z:\resource\edcontactor.r*"
+
+""-"z:\system\data\10202BE9\200212A0.txt"
\ No newline at end of file
Binary file phoneuis/easydialing/data/easydialing_stub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/data/easydialingpluginresources.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,213 @@
+/*
+* 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:  Easy dialing resources.
+*
+*/
+
+//  RESOURCE IDENTIFIER
+
+NAME EDPL
+
+
+//  INCLUDES
+
+#include <eikon.rh>
+#include <avkon.rh>
+
+#include <avkon.loc>
+#include <numberentry.loc>
+#include <callui.loc>
+#include "easydialing.loc"
+
+#include <phoneappcommands.hrh>
+#include "easydialingcommands.hrh"
+
+
+//  CONSTANTS  
+
+//  MACROS  
+
+//  RESOURCE DEFINITIONS 
+
+// ---------------------------------------------------------
+//   
+//    Define the resource file signature 
+//    This resource should be empty.
+//
+// ---------------------------------------------------------
+//
+
+RESOURCE RSS_SIGNATURE { }
+
+// ---------------------------------------------------------
+//   
+//    r_easydialing_cba
+//    Contains softkey definitions for easy dialing.
+//
+// ---------------------------------------------------------
+//
+RESOURCE CBA r_easydialing_cba
+    {
+    buttons =
+        {
+        CBA_BUTTON
+            {
+            id = EPhoneCmdOptions;
+            txt = text_softkey_option;
+            },      
+        CBA_BUTTON
+            {
+            id = EPhoneCmdBack;
+            txt = text_softkey_exit;
+            },
+        CBA_BUTTON
+            {
+            id = EAknSoftkeyOpen;
+            txt = text_softkey_open;
+            }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//   r_easydialing_menubar
+//   Menubar for easy dialing when action menu is closed.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_easydialing_menubar
+    {
+    titles =
+        {
+        MENU_TITLE { menu_pane = r_easydialing_menu; }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//   r_easydialing_menu
+//   Menu pane
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_easydialing_menu
+    {
+    items =
+        {
+        MENU_ITEM
+                {
+                command = EEasyDialingOpenContact;
+                txt = qtn_options_open;
+                },
+        MENU_ITEM
+                {
+                command = EEasyDialingVoiceCall;
+                cascade = r_easydialing_options_call_menu;
+                txt = text_number_call;
+                },
+        MENU_ITEM
+                {
+                command = EEasyDialingSendMessage;
+                txt = qtn_nren_send_message;
+                },
+        MENU_ITEM
+                {
+                txt = qtn_easydial_option_submenu_title;
+                cascade = r_easydialing_options_on_off_cascade_menu;
+                },
+        MENU_ITEM 
+                {
+                command = EPhoneDialerCmdHelp; 
+                txt = qtn_options_help;
+                },
+        MENU_ITEM 
+                {
+                command = EPhoneCmdBack; 
+                txt = qtn_options_exit;
+                }
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//    r_easydialing_options_call_menu
+//    Number Acquisition view options call menu pane.
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_easydialing_options_call_menu
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command = EEasyDialingVoiceCall; 
+            txt =   qtn_call_sub_voice;
+            },
+        MENU_ITEM
+            {
+            command = EEasyDialingVideoCall; 
+            txt =  qtn_call_sub_video;
+            }
+        };
+    }
+
+//----------------------------------------------------------------------------
+// r_easydialing_options_on_off_menu_item
+//
+// Menu item for setting Easy dialing on/off.
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_easydialing_options_on_off_menu_item
+   {
+   items =
+       {
+       MENU_ITEM 
+           {
+           txt = qtn_easydial_option_submenu_title;
+           cascade = r_easydialing_options_on_off_cascade_menu;
+           }
+       };
+   }
+
+//----------------------------------------------------------------------------
+// r_easydialing_options_on_off_cascade_menu
+//
+// Submenu for setting Easy dialing on/off.
+// ---------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_easydialing_options_on_off_cascade_menu
+   {
+   items =
+       {
+       MENU_ITEM 
+           {
+           command  = EEasyDialingOn;
+           txt      = qtn_easy_dialing_on;
+           flags    = EEikMenuItemRadioStart;
+           },
+       MENU_ITEM 
+           { 
+           command  = EEasyDialingOff;
+           txt      = qtn_easy_dialing_off;
+           flags    = EEikMenuItemRadioEnd;
+           }
+       };
+   }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/bwins/edcontactoru.def	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,6 @@
+EXPORTS
+	?ExecuteServiceL@CEDContactorService@@QAEXABVTCSParameter@1@@Z @ 1 NONAME ; void CEDContactorService::ExecuteServiceL(class CEDContactorService::TCSParameter const &)
+	?IsBusy@CEDContactorService@@QBEHXZ @ 2 NONAME ; int CEDContactorService::IsBusy(void) const
+	?NewL@CEDContactorService@@SAPAV1@PAVMEDContactorObserver@@@Z @ 3 NONAME ; class CEDContactorService * CEDContactorService::NewL(class MEDContactorObserver *)
+	?CancelService@CEDContactorService@@QAEXXZ @ 4 NONAME ; void CEDContactorService::CancelService(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/data/edcontactor.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,60 @@
+/*
+* 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 for CCA Contactor Service
+*
+*/
+
+
+//  RESOURCE IDENTIFIER
+NAME    EDCO // 4 letter ID
+
+//  INCLUDES
+#include <bldvariant.hrh>
+#include <data_caging_paths_strings.hrh>
+#include <eikon.rh>
+#include <avkon.rh>
+
+
+#include <AiwCommon.rh>
+#include <AiwGenericParam.hrh>
+
+//  RESOURCE DEFINITIONS 
+
+// ---------------------------------------------------------------------------
+// RSS_SIGNATURE
+// ---------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE {}
+
+// --------------------------------------------------------------------------
+// AIW_INTEREST
+// Contact selection interest.
+// --------------------------------------------------------------------------
+//
+RESOURCE AIW_INTEREST r_edcontactorservice_contact_selection_interest
+    {
+    items=
+        {
+        AIW_CRITERIA_ITEM
+            {
+            id = KAiwCmdSelect;  // serviceCmd used here also as ID
+            serviceCmd   = KAiwCmdSelect;
+            contentType  = EGenericParamContactLinkArrayStr;
+            serviceClass = KAiwClassBase;
+            maxProviders = 1;
+            }
+        };
+    }
+
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/eabi/edcontactoru.def	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,6 @@
+EXPORTS
+	_ZN19CEDContactorService15ExecuteServiceLERKNS_12TCSParameterE @ 1 NONAME
+	_ZN19CEDContactorService4NewLEP20MEDContactorObserver @ 2 NONAME
+	_ZNK19CEDContactorService6IsBusyEv @ 3 NONAME
+	_ZN19CEDContactorService13CancelServiceEv @ 4 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/group/bld.inf	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,24 @@
+/*
+* 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: Easy dialing contactor module bld.inf.
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+edcontactor.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/group/edcontactor.mmp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,76 @@
+/*
+* 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: Easy dialing contactor module project file.
+*
+*/
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+
+
+TARGET                  edcontactor.dll
+TARGETTYPE              dll
+UID                     0x1000008d 0x200212A3
+VENDORID                VID_DEFAULT
+CAPABILITY              CAP_CLIENT_DLL NetworkServices NetworkControl
+
+USERINCLUDE             ../inc
+USERINCLUDE             ../../inc
+
+SOURCEPATH              ../src
+SOURCE 					edcontactorservice.cpp
+SOURCE					edcontactorserviceoperator.cpp
+SOURCE                  edcontactorpopuphandler.cpp
+
+SOURCE                  edcontactor.cpp
+SOURCE                  edcontactoroperation.cpp
+SOURCE                  edcontactorcalloperation.cpp
+SOURCE                  edcontactorunieditoroperation.cpp
+SOURCE                  edcontactoremailoperation.cpp
+SOURCE                  edcontactorimoperation.cpp
+SOURCE                  edcontactorvoipoperation.cpp
+SOURCE                  edphonecall.cpp
+SOURCE                  edcontactorvideocalloperation.cpp
+SOURCE                  edmsgeditors.cpp
+
+// resources
+START RESOURCE      ../data/edcontactor.rss 
+HEADER
+TARGETPATH          RESOURCE_FILES_DIR
+LANGUAGE_IDS
+END
+
+
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE         /epoc32/include/ecom
+
+LIBRARY               cone.lib
+LIBRARY               ws32.lib
+LIBRARY               euser.lib
+LIBRARY               efsrv.lib
+LIBRARY               bafl.lib
+LIBRARY               aiwdialdata.lib //AIW
+LIBRARY               commonengine.lib
+LIBRARY               servicehandler.lib //AIW
+LIBRARY               sendui.lib
+LIBRARY               ecom.lib 
+LIBRARY               serviceprovidersettings.lib
+LIBRARY               apgrfx.lib
+LIBRARY		      avkon.lib
+LIBRARY		      eikcore.lib
+DEBUGLIBRARY          flogger.lib
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactor.h	Fri Feb 19 22:50:26 2010 +0200
@@ -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:  Class for launching the different communication methods
+*
+*/
+
+
+#ifndef EDCONTACTORSERVICE_H
+#define EDCONTACTORSERVICE_H
+
+// INCLUDES
+#include <e32std.h>
+#include <VPbkFieldTypeSelectorFactory.h>
+// CLASS DECLARATION
+
+/**
+ * Class for launching communication methods
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactor) : CBase
+    {
+public:
+    /**
+     * Starts a communication method.
+     * 
+     * @param aCommMethod The communication method.
+     * @param aParam Parameter for the communication, for example phone number or e-mail address.
+     * @param aName Name of the contact which the parameter is from, for example for the sms/mms editor's to-field (optional)
+     * @param aForcedService Should the service be forced or not, relevant in voice call set-up.
+     * @param aServiceID The service ID for the VoIP call comm method, has no effect and can be left out for other comm methods
+     */
+    static void ExecuteServiceL(VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aCommMethod, const TDesC& aParam, 
+            const TDesC& aName = KNullDesC, TBool aForcedService = EFalse, TUint32 aServiceId = 0);
+
+    };
+
+#endif // EDCONTACTORSERVICE_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorcalloperation.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,92 @@
+/*
+* 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 implementing the call operation
+*
+*/
+
+
+#ifndef EDCONTACTORCALLOPERATION_H
+#define EDCONTACTORCALLOPERATION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CLASS DECLARATION
+class CEDContactorOperation;
+
+/**
+ * Class implementing the call operation
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorCallOperation) : public CEDContactorOperation
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CEDContactorCallOperation();
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The phone number to call.
+     * @param aForcedCallType Should (voice) call be initiated as forced cs call or not.
+     */
+    static CEDContactorCallOperation* NewL(const TDesC& aParam, TBool aForcedCallType);
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The phone number to call.
+     * @param aForcedCallType Should (voice) call be initiated as forced cs call or not.
+     */
+    static CEDContactorCallOperation* NewLC(const TDesC& aParam, TBool aForcedCallType);
+    
+    /**
+     * Executes the operation (makes the call)
+     */
+    virtual void ExecuteLD();
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     * 
+     * @param aParam The phone number to call.
+     * @param aForcedCallType Should (voice) call be initiated as forced cs call or not.
+     */
+    CEDContactorCallOperation(const TDesC& aParam, TBool aForcedCallType);
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+    
+private:
+    
+    /** Perform voice call as forced cs call or not.*/
+    TBool iForcedCallType;
+    };
+
+#endif // EDCONTACTORCALLOPERATION_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactoremailoperation.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 implementing the email operation
+*
+*/
+
+
+#ifndef EDCONTACTOREMAILOPERATION_H
+#define EDCONTACTOREMAILOPERATION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CLASS DECLARATION
+class CEDContactorOperation;
+
+/**
+ * Class implementing the email operation
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorEmailOperation) : public CEDContactorOperation
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CEDContactorEmailOperation();
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The address to send email to.
+     * @param aName The name of the contact, to be shown in the "to" field
+     */
+    static CEDContactorEmailOperation* NewL(const TDesC& aParam, const TDesC& aName);
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The address to send email to.
+     * @param aName The name of the contact, to be shown in the "to" field
+     */
+    static CEDContactorEmailOperation* NewLC(const TDesC& aParam, const TDesC& aName);
+    
+    /**
+     * Executes the operation (starts the email editor)
+     */
+    virtual void ExecuteLD();
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     * 
+     * @param aParam The address to send email to.
+     * @param aName The name of the contact, to be shown in the "to" field
+     */
+    CEDContactorEmailOperation(const TDesC& aParam, const TDesC& aName);
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+    };
+
+#endif // EDCONTACTOREMAILOPERATION_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorheaders.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,75 @@
+/*
+* 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:  ccacontactor's headers
+*
+*/
+
+
+#ifndef __EDCONTACTORHEADERS_H__
+#define __EDCONTACTORHEADERS_H__
+
+
+// Constants
+#include <e32cons.h>
+_LIT( KColon, ":" );
+
+// system
+#include <e32base.h>
+#include <bautils.h>
+#include <coeutils.h>
+#include <coemain.h>
+#include <apgcli.h> 
+#include <apgtask.h>
+#include <eikenv.h>
+
+//Phbk 
+#include <VPbkFieldTypeSelectorFactory.h>
+
+// AIW
+#include <AiwCommon.h>
+#include <AiwServiceHandler.h>
+#include <AiwGenericParam.h>
+#include <AiwContactSelectionDataTypes.h>
+#include <AiwVariant.h>
+#include <AiwGenericParam.hrh>
+#include <aiwdialdataext.h>
+
+
+//SPSettings
+#include <spsettings.h>
+#include <spproperty.h>
+
+//Sendui
+#include <SenduiMtmUids.h>
+#include <sendui.h>
+#include <CMessageData.h>
+#include <commonphoneparser.h>
+#include <CSendingServiceInfo.h>
+
+//IM plugin
+#include <cmscontactorimpluginbase.h>
+
+//own
+#include "edcontactor.h"
+#include "edcontactoroperation.h"
+#include "edcontactorcalloperation.h"
+#include "edcontactorvideocalloperation.h"
+#include "edcontactorunieditoroperation.h"
+#include "edcontactoremailoperation.h"
+#include "edcontactorvoipoperation.h"
+#include "edcontactorimoperation.h"
+#include "edmsgeditors.h"
+#include "edphonecall.h"
+
+#endif // __EDCONTACTORHEADERS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorimoperation.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class implementing the instant messaging operation
+*
+*/
+
+
+#ifndef EDCONTACTORIMOPERATION_H
+#define EDCONTACTORIMOPERATION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+
+// CLASS DECLARATION
+class CCmsContactorImPluginBase;
+class CSPSettings;
+class CEDContactorOperation;
+
+/**
+ * Class implementing the instant messaging operation
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorIMOperation) : public CEDContactorOperation
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CEDContactorIMOperation();
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The IM "address" to send the message to
+     */
+    static CEDContactorIMOperation* NewL(const TDesC& aParam);
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The IM "address" to send the message to
+     */
+    static CEDContactorIMOperation* NewLC(const TDesC& aParam);
+    
+    /**
+     * Executes the operation (opens the message editor)
+     */
+    virtual void ExecuteLD();
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     * 
+     * @param aParam The IM "address" to send the message to
+     */
+    CEDContactorIMOperation(const TDesC& aParam);
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+    
+private:
+    /**
+     * Resolve IM Launcher ECom UID
+     * 
+     * @since S60 v5.0     
+     * @param aServiceId service id 
+     * @return ECom UID
+     */ 
+    TUid ResolveEcomUidL( const TDesC& aServiceId );     
+    
+    /**
+     * Resolve IM Launcher ECom UID
+     * 
+     * @since S60 v5.0     
+     * @param aServiceId service id 
+     * @return Ecom UId in interegr
+     */ 
+    TInt DoResolveEcomUidL( const TDesC& aServiceId );     
+                    
+    /**
+     * Load the ECom plugin
+     * 
+     * @since S60 v5.0       
+     * @param aUidImp implementation UID
+     * @param aXspId service provider id
+     */
+    void LoadEcomL( TUid aUidImp, const TDesC& aXspId );
+    
+    /**
+     * Extracts service part from XspId
+     * 
+     * @since S60 v5.0       
+     * @param aXspId service provider id   
+     * @return service part (uri scheme part)
+     */
+    TPtrC ExtractService( const TDesC& aXspId );
+private:
+    
+    /**
+     * Im Plugin. 
+     * OWN
+     */
+    CCmsContactorImPluginBase* iPlugin;        
+
+    /**
+     * Service Provider Settings
+     * OWN
+     */
+    CSPSettings* iSPSettings;
+
+    };
+
+#endif // EDCONTACTORIMOPERATION_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactoroperation.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* 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 communication method launching operations
+*
+*/
+
+
+#ifndef EDCONTACTOROPERATION_H
+#define EDCONTACTOROPERATION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CLASS DECLARATION
+
+/**
+ * Base class for communication method launching operations
+ */
+NONSHARABLE_CLASS(CEDContactorOperation) : public CBase
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    virtual ~CEDContactorOperation();
+    
+    /**
+     * Executes the operation
+     */
+    virtual void ExecuteLD()=0;
+
+protected:
+
+    /**
+     * Constructor for performing 1st stage construction
+     * 
+     * @param aParam Communication parameter, for example phone number or e-mail address
+     * @param aName Name of the contact to which the communication is started (optional)
+     */
+    CEDContactorOperation(const TDesC& aParam, const TDesC& aName = KNullDesC);
+    
+protected:
+
+    const TDesC& iParam;
+    
+    const TDesC& iName;
+
+    };
+
+#endif // EDCONTACTOROPERATION_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorpopuphandler.h	Fri Feb 19 22:50:26 2010 +0200
@@ -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:  Class for handling popup query.
+*
+*/
+
+
+#ifndef EDCONTACTORPOPUPHANDLER_H
+#define EDCONTACTORPOPUPHANDLER_H
+
+#include <e32base.h>
+
+//FORWARD DECLERATIONS
+class CAiwServiceHandler;
+class CCoeEnv;
+
+/**
+ *  CEDContactorPopupHandler
+ *  Handling launch of popup query.
+ *
+ *  @code
+ *
+ *  @endcode
+ *
+ *  @lib ccacontactorservice
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorPopupHandler) :
+    public CBase,
+    public MAiwNotifyCallback
+    {
+
+public:
+
+    /**
+     * Two-phased constructor.
+     */
+    static CEDContactorPopupHandler* NewL();
+
+    /**
+     * Destructor.
+     */
+    virtual ~CEDContactorPopupHandler();
+
+    /**
+     * Launch popup.
+     *
+     * Leaves KErrNotFound if field data not found,
+     *        KErrCancel if popup canceled
+     *        KErrAbort if red key pressed
+     *        KErrGeneral if error occurred
+     *
+     * @since S60 5.0
+     * @param aCommAddressSelectType: Select Type.
+     * @param aUseDefaults: Is default functionality enabled.
+     */
+    TDesC& LaunchPopupL(
+        const TDesC8& aContactLinkArray,
+        TAiwCommAddressSelectType aCommAddressSelectType,
+        TBool aUseDefaults);
+
+    void ClosePopupL();
+    
+private:
+
+    // from base class MAiwNotifyCallback
+    TInt HandleNotifyL(TInt aCmdId, TInt aEventId,
+        CAiwGenericParamList& aEventParamList,
+        const CAiwGenericParamList& aInParamList);
+
+private:
+    /**
+     * Constructor.
+     */
+    CEDContactorPopupHandler();
+    void ConstructL();
+
+private: //new methods
+    void PrepareResourcesL();
+    void ReadFieldDataL(CAiwGenericParamList& aEventParamList);
+    void AsyncStop();
+
+private:
+    // data
+
+    /**
+     * Pointer to AIW service handler
+     * Own.
+     */
+    CAiwServiceHandler* iServiceHandler;
+
+    /**
+     * Pointer to scheduler wait.
+     * Own.
+     */
+    CActiveSchedulerWait* iSchedulerWait;
+
+    /**
+     * Environment.
+     * Not Own.
+     */
+    CCoeEnv& iCoeEnv;
+
+    /**
+     * Offset of loaded resource file.
+     * Own.
+     */
+    TInt iResourceOffset;
+
+    /**
+     * Result string from the AIW service.
+     * Own.
+     */
+    HBufC* iQueryResults;
+
+    /**
+     * For error handling.
+     * Own.
+     */
+    TInt iError;
+    
+    };
+
+#endif // EDCONTACTORPOPUPHANDLER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorservice.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,189 @@
+/*
+* 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 is a class for starting services
+*
+*/
+
+#ifndef __EDCONTACTORSERVICE_H__
+#define __EDCONTACTORSERVICE_H__
+
+// INCLUDES
+#include <e32std.h>
+#include <f32file.h>
+#include <VPbkFieldTypeSelectorFactory.h>
+
+//FORWARD DECLARATIONS
+
+class CEDContactorServiceOperator;
+class MEDContactorObserver;
+
+
+/**
+ *  CEDContactorService
+ *
+ *  Class for starting services of CCA contactor service.
+ *  @code
+ *      HBufC* fullName = GetFullNameLC();
+ *      CVPbkContactLinkArray* linkArray = CVPbkContactLinkArray::NewLC();
+ *      linkArray->AppendL(iContactLink);
+ *      HBufC8* streamedArray = linkArray->PackLC();
+ *
+ *      //Set control flags.
+ *      TUint flags;
+ *      flags |= CEDContactorService::TCSParameter::EEnableDefaults;
+ *
+ *      CEDContactorService::TCSParameter params(VPbkFieldTypeSelectorFactory::EVoiceCallSelector, *streamedArray, flags, *fullName);
+ *      CEDContactorService::ExecuteServiceL(params);
+ *
+ *      CleanupStack::PopAndDestroy(3); //linkArray, streamedArray, fullName
+ *
+ *  @endcode
+ *
+ *  @lib CEDContactorService
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorService) : public CBase
+    {
+public:
+
+    /**
+     * Parameter class for the service.
+     *
+     * @since S60 v5.0
+     */
+    class TCSParameter
+        {
+        public:
+
+        /** Flags for controlling CCA Contactor Service */
+        enum TControlFlags
+            {
+            /**
+             * Enable defaults. If this is set, AIW popup query will automatically search possible
+             * default settings and if found one, it doesn't show selection query at all.
+             */
+            EEnableDefaults  = 0x0001,
+            
+            /**
+             * Execute service as forced. If this is set, then voice call will be
+             * executed as forced cs voice call. Doesn't affect other services currently.
+             */
+            EForcedService = 0x0002
+            };
+
+        /*
+         * Constructor
+         */
+        inline TCSParameter(
+                VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aCommTypeSelector,
+                TDesC8& aContactLinkArray, TUint aControlFlag, TDesC& aFullName) :
+                iCommTypeSelector(aCommTypeSelector),
+                iContactLinkArray(aContactLinkArray),
+                iControlFlag(aControlFlag),
+                iFullName(aFullName)
+            {
+            };
+
+         /*
+         * Enumeration for inticating which communication method is wanted to use.
+         */
+        VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector iCommTypeSelector;
+
+        /*
+         * Streamed contact link array of contact who will be communicated at.
+         */
+        TDesC8& iContactLinkArray;
+
+        /**
+         * Flag for controlling behaviour of service. Currently only set of default 
+         * and forced service supported.
+         */
+        TUint iControlFlag;
+
+        /*
+         * Some communication methods requires contacts name order to use services.
+         * (for example mms/sms editor)
+         */
+        TDesC& iFullName;
+        };
+
+    /**
+     *
+     */
+    IMPORT_C static CEDContactorService* NewL( MEDContactorObserver* aObserver );
+
+    /**
+     * Destructor.
+     */
+    virtual ~CEDContactorService();
+
+    /**
+     * Start communication service.
+     *
+     * If the contactlink contains a multiple contact fields for selected communication
+     * method, the executed service will launch Phbk AIW selection popup. User have to select
+     * wanted field to be used for communication.
+     * The communication method is defined by TVPbkCommTypeSelector.
+     * After selection, communication is automatically started by the service.
+     *
+     * @see TVPbkCommTypeSelector from VPbkFieldTypeSelectorFactory.h.
+     * Leaves KErrArgument if given parameter doesn't have valid values.
+     *
+     * @since S60 5.0
+     * @param aParameter: The Launch Parameter.
+     */
+    IMPORT_C void ExecuteServiceL(const TCSParameter& aParameter);
+
+    /**
+     * Cancels an ongoing service execution.
+     */
+    IMPORT_C void CancelService();
+    
+    /**
+     * Is contactor service busy.
+     */
+    IMPORT_C TBool IsBusy() const;
+
+private:
+    /**
+     * Constructor.
+     */
+    CEDContactorService( MEDContactorObserver* aObserver );
+
+    /**
+     *
+     */
+    void ConstructL();
+
+private:
+    // data
+
+    /**
+     *
+     */
+    CEDContactorServiceOperator* iOperator;
+    
+    /**
+     * ETrue, if command is being handled at the moment
+     */
+    TBool iCommandIsBeingHandled;
+    
+    TInt iResourceFileOffset;
+    
+    MEDContactorObserver* iObserver;
+    };
+
+#endif      //__EDCONTACTORSERVICE_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorserviceheaders.h	Fri Feb 19 22:50:26 2010 +0200
@@ -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:  ccacontactorservice's headers
+*
+*/
+
+
+#ifndef __EDCONTACTORSERVICEHEADERS_H__
+#define __EDCONTACTORSERVICEHEADERS_H__
+
+// Constants
+#include <e32cons.h>
+#define KEDContactorServiceLoggerFile CCA_L("ccacontactorservice.txt")
+_LIT( KEDContactorServiceResourceFileName, "\\resource\\ccacontactorservicersc.rsc" );
+_LIT( KColon, ":" );
+
+
+// system
+#include <e32base.h>
+#include <bautils.h>
+#include <coeutils.h>
+#include <coemain.h>
+
+//Phbk 
+#include <VPbkFieldTypeSelectorFactory.h>
+
+// AIW
+#include <AiwCommon.h>
+#include <AiwServiceHandler.h>
+#include <AiwGenericParam.h>
+#include <AiwContactSelectionDataTypes.h>
+
+//SPSettings
+#include <spsettings.h>
+#include <spproperty.h>
+
+//own
+#include "edcontactorservice.h"
+#include "edcontactorserviceoperator.h"
+#include "medcontactorobserver.h"
+#include "edcontactorpopuphandler.h"
+#include <edcontactor.rsg>
+
+#include "edcontactor.h"
+
+#include "easydialinglogger.h"
+
+#endif // __EDCONTACTORSERVICEHEADERS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorserviceoperator.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,175 @@
+/*
+* 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 for handling service logic.
+*
+*/
+
+
+#ifndef EDCONTACTORSERVICEHANDLER_H
+#define EDCONTACTORSERVICEHANDLER_H
+
+#include <e32std.h>
+#include <e32base.h>
+
+//FORWARD DECLERATIONS
+class CEDContactorPopupHandler;
+
+/**
+ *  CEDContactorServiceOperator
+ *  Handling logic of service.
+ *
+ *  @code
+ *
+ *  @endcode
+ *
+ *  @lib ccacontactorservice
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorServiceOperator) : public CBase
+    {
+
+public:
+
+    /**
+     * Two-phased constructor.
+     */
+    static CEDContactorServiceOperator* NewLC( MEDContactorObserver* aObserver );
+
+    static CEDContactorServiceOperator* NewL( MEDContactorObserver* aObserver );
+
+    /**
+     * Destructor.
+     */
+    virtual ~CEDContactorServiceOperator();
+
+public:
+    //new methods
+
+    /**
+     * Start service.
+     * All leaves are trapped.
+     *
+     * @since S60 5.0
+     */
+    void Execute(const CEDContactorService::TCSParameter& aParameter);
+    
+    /**
+     * Cancel an ongoing operation.
+     */
+    void Cancel();
+
+private:
+    /**
+     * Constructor.
+     */
+    CEDContactorServiceOperator( MEDContactorObserver* aObserver );
+
+    void ConstructL();
+
+private: //new methods
+    /**
+     * Helper class for handling special cases.
+     * Currently VOIP ServiceID implemented.
+     *
+     * @param aFieldData: Selected field.
+     * @since S60 5.0
+     */
+    void ResolveSpecialCasesL(const TDesC& aFieldData);
+
+    /**
+     * Helper class for searching ServiceID
+     *
+     * @param aFieldData: Selected field.
+     * @return ServiceId
+     * @since S60 5.0
+     */
+    TUint32 ResolveServiceIdL(const TDesC& aFieldData);
+
+    /**
+     * Helper class for parsing xSP identification.
+     *
+     * @param aFieldData: Selected field.
+     * @param aXSPId: Found xSP ID.
+     * @return boolean if xSP is found.
+     * @since S60 5.0
+     */
+    TBool ExtractServiceL(const TDesC& aFieldData, TPtrC& aXSPId);
+
+    /**
+     * Helper class for searching ServiceId from spsettings
+     *
+     * @param aFieldData: Selected field.
+     * @return ServiceId
+     * @since S60 5.0
+     */
+    TUint32 SearchServiceIdL(const TDesC& aFieldData);
+
+    /**
+     * Helper class for checking if MSISDN addressing is supported.
+     *
+     * @return ServiceId
+     * @since S60 5.0
+     */
+    TUint32 ResolveMSISDNAddressingSupportedL();
+
+    /**
+     * Helper class for starting communication method.
+     *
+     * @param aFieldData: Selected field.
+     * @since S60 5.0
+     */
+    void LaunchCommunicationMethodL(const TDesC& aFieldData);
+
+    /**
+     * Helper class for mapping AIW enum & selector factory enums together.
+     *
+     * @param aCommTypeSelector: Selector factory enum.
+     * @return AIW communication enum.
+     * @since S60 5.0
+     */
+    TAiwCommAddressSelectType CommunicationEnumMapper(
+        VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aCommTypeSelector);
+
+
+private:
+    // data
+
+    /**
+     * Pointer to popup handler class
+     * Own.
+     */
+    CEDContactorPopupHandler* iPopupHandler;
+
+    /**
+     * Reference to the launch parameter.
+     * Not own.
+     */
+    const CEDContactorService::TCSParameter* iParameter;
+
+    /**
+     * ServiceId for VOIP service.
+     * Own.
+     */
+    TUint32 iServiceId;
+    
+    /**
+     * Observer for contactor events.
+     * Not owned.
+     */
+    MEDContactorObserver* iObserver;
+    };
+
+#endif // EDCONTACTORSERVICEHANDLER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorunieditoroperation.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* 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 implementing the unieditor operation (SMS/MMS)
+*
+*/
+
+
+#ifndef EDCONTACTORUNIEDITOROPERATION_H
+#define EDCONTACTORUNIEDITOROPERATION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CLASS DECLARATION
+class CEDContactorOperation;
+
+/**
+ * Class implementing the unieditor operation (SMS/MMS)
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib ccappcommlauncherplugin.dll
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorUniEditorOperation) : public CEDContactorOperation
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CEDContactorUniEditorOperation();
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The phone number to send the message to
+     * @param aName The name of the contact, to be shown in the "to" field
+     */
+    static CEDContactorUniEditorOperation* NewL(const TDesC& aParam, const TDesC& aName);
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The phone number to send the message to
+     * @param aName The name of the contact, to be shown in the "to" field
+     */
+    static CEDContactorUniEditorOperation* NewLC(const TDesC& aParam, const TDesC& aName);
+    
+    /**
+     * Executes the operation (starts editor for sending the message)
+     */
+    virtual void ExecuteLD();
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     * 
+     * @param aParam The phone number to send the message to
+     * @param aName The name of the contact, to be shown in the "to" field
+     */
+    CEDContactorUniEditorOperation(const TDesC& aParam, const TDesC& aName);
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+    };
+
+#endif // EDCONTACTORUNIEDITOROPERATION_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorvideocalloperation.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* 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 implementing the video call operation
+*
+*/
+
+
+#ifndef EDCONTACTORVIDEOCALLOPERATION_H
+#define EDCONTACTORVIDEOCALLOPERATION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CLASS DECLARATION
+class CEDContactorOperation;
+
+/**
+ * Class implementing the video call operation
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorVideocallOperation) : public CEDContactorOperation
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CEDContactorVideocallOperation();
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The phone number to video call
+     */
+    static CEDContactorVideocallOperation* NewL(const TDesC& aParam);
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The phone number to video call
+     */
+    static CEDContactorVideocallOperation* NewLC(const TDesC& aParam);
+    
+    /**
+     * Executes the operation (makes the video call)
+     */
+    virtual void ExecuteLD();
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     * 
+     * @param aParam The phone number to video call
+     */
+    CEDContactorVideocallOperation(const TDesC& aParam);
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+    };
+
+#endif // EDCONTACTORVIDEOCALLOPERATION_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edcontactorvoipoperation.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,93 @@
+/*
+* 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 implementing the voip operation
+*
+*/
+
+
+#ifndef EDCONTACTORVOIPOPERATION_H
+#define EDCONTACTORVOIPOPERATION_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// CLASS DECLARATION
+class CEDContactorOperation;
+
+/**
+ * Class implementing the voip operation
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDContactorVOIPOperation) : public CEDContactorOperation
+    {
+public:
+    // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CEDContactorVOIPOperation();
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The address to make the voip call to
+     * @param aServiceID The voip service ID
+     */
+    static CEDContactorVOIPOperation* NewL(const TDesC& aParam, TUint32 aServiceID);
+
+    /**
+     * Two-phased constructor.
+     * 
+     * @param aParam The address to make the voip call to
+     * @param aServiceID The voip service ID
+     */
+    static CEDContactorVOIPOperation* NewLC(const TDesC& aParam, TUint32 aServiceID);
+    
+    /**
+     * Executes the operation (launches the voip call)
+     */
+    virtual void ExecuteLD();
+
+private:
+
+    /**
+     * Constructor for performing 1st stage construction
+     * 
+     * @param aParam The address to make the voip call to
+     * @param aServiceID The voip service ID
+     */
+    CEDContactorVOIPOperation(const TDesC& aParam, TUint32 aServiceID);
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+    
+    /**
+     * The voip service id
+     */
+    TUint32 iServiceId;
+
+    };
+
+#endif // EDCONTACTORVOIPOPERATION_H
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edmsgeditors.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,53 @@
+/*
+* 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:  Launching Editors. 
+*
+*/
+
+
+#ifndef __EDMSGEDITORS_H__
+#define __EDMSGEDITORS_H__
+
+#include <e32base.h>                             
+
+/**
+ * Helper class for launching message editors
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib
+ *  @since S60 v5.0
+ */
+NONSHARABLE_CLASS(CEDMsgEditors) : public CBase
+	{
+public:
+
+	/**
+	 * Launch a msg editor.
+	 *
+	 * @param TUid Service uid (MTM) 
+	 * @param TDesC& Address where to send the msg
+	 * @param TDesC& Alias name for msg editor
+	 *
+	 * @return void 
+	 */
+	static void ExecuteL( const TUid aServiceUid, const TDesC& aAddress,
+			const TDesC& aName);
+
+	};
+
+#endif // __EDMSGEDITORS_H__
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/edphonecall.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,75 @@
+/*
+* 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:  Launching Calls. 
+*
+*/
+
+
+#ifndef __EDPHONECALL_H__
+#define __EDPHONECALL_H__
+
+#include <e32base.h>                             
+
+// CLASS DECLARATION
+class CAiwDialDataExt;
+
+
+/**
+ * Helper class for launching calls (voice, voip & video)
+ *
+ *  @code
+ *   ?good_class_usage_example(s)
+ *  @endcode
+ *
+ *  @lib
+ *  @since S60 v5.0
+ */
+class CEDPhoneCall : public CBase
+	{
+public:
+    
+    /**
+     * Type of call
+     */
+    enum TEDPhoneCallType { ECCACallTypeVoice, ECCACallTypeVoIP, ECCACallTypeVideo };
+
+	/**
+	 * Establish a call by using a phone number (or voip address)
+	 *
+	 * @param TDesC8& Phone number
+	 * @param aCallType Is this a cellular Voice, VoIP, or Video call
+	 * @param aForceCallType Whether to execute call type as forced one. 
+     *                       Currently only voice call type can be variated with this.
+	 *
+	 * @return void 
+	 */
+	static void ExecuteL( const TDesC& aPhoneNumber, TEDPhoneCallType aCallType, 
+	        TBool aForcedCallType, 
+	        TUint32 aServiceId = 0);
+
+private:
+
+	/**
+	 * Establish a call by using a phone number
+	 *
+	 * @param TDesC8& Phone number
+	 * @param TBool Is this a VoIP call
+	 *
+	 * @return void 
+	 */
+	static void DoAIWCallL( CAiwDialDataExt& aDialData);
+	};
+
+#endif // __EDPHONECALL_H__
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/inc/medcontactorobserver.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,61 @@
+/*
+* 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 implementing the abstract contactor observer class.
+*
+*/
+
+#ifndef MEDCONTACTOROBSERVER_H_
+#define MEDCONTACTOROBSERVER_H_
+
+/**
+ * MEDContactorObserver
+ * 
+ * Observer class for contactor module.
+ * 
+ * 
+ * 
+ */
+
+class MEDContactorObserver 
+    {
+    
+public:
+    
+    /*
+     * Enum for communication events.
+     */
+    typedef enum TEvent_enum
+        {
+        /*
+         * ECommunicationStarted
+         * Used when communication was normally started.
+         */
+        ECommunicationStarted = 1,
+        
+        /*
+         * ECommunicationCancelled
+         * Used when
+         * 1. User cancelled communication when choosing phone number, email, etc.
+         * 2. When there was no appropriate field in the contact.
+         */
+        ECommunicationCancelled
+        
+        } TEvent;
+    
+    virtual void InformContactorEvent( TEvent aEvent ) = 0;
+    };
+
+
+
+#endif /* MEDCONTACTOROBSERVER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactor.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,63 @@
+/*
+* 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 ccacontactor
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// EDContactor::ExecuteServiceL()
+// -----------------------------------------------------------------------------
+//
+void CEDContactor::ExecuteServiceL(VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aCommMethod, const TDesC& aParam, const TDesC& aName, 
+        TBool aForcedService, TUint32 aServiceId)
+    {
+    CEDContactorOperation* operation = 0;
+    
+    switch (aCommMethod)
+        {
+        case VPbkFieldTypeSelectorFactory::EVoiceCallSelector:
+            operation = CEDContactorCallOperation::NewL(aParam, aForcedService);
+            break;
+            
+        case VPbkFieldTypeSelectorFactory::EVideoCallSelector:
+            operation = CEDContactorVideocallOperation::NewL(aParam);
+            break;
+        case VPbkFieldTypeSelectorFactory::EUniEditorSelector:
+            operation = CEDContactorUniEditorOperation::NewL(aParam, aName);
+            break;
+        case VPbkFieldTypeSelectorFactory::EEmailEditorSelector:
+            operation = CEDContactorEmailOperation::NewL(aParam, aName);
+            break;
+        case VPbkFieldTypeSelectorFactory::EVOIPCallSelector:
+            operation = CEDContactorVOIPOperation::NewL(aParam, aServiceId);
+            break;
+        case VPbkFieldTypeSelectorFactory::EInstantMessagingSelector:
+            operation = CEDContactorIMOperation::NewL(aParam);
+            break;
+        
+        }
+    if (operation)
+        {
+        operation->ExecuteLD();
+        operation = NULL;
+        }
+    }
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactorcalloperation.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,89 @@
+/*
+* 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 call operation
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEDContactorCallOperation::CEDContactorCallOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorCallOperation::CEDContactorCallOperation(const TDesC& aParam, 
+        TBool aForcedCallType) : CEDContactorOperation(aParam), 
+        iForcedCallType( aForcedCallType )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorCallOperation::~CEDContactorCallOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorCallOperation::~CEDContactorCallOperation()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorCallOperation::NewLC()
+// -----------------------------------------------------------------------------
+//
+CEDContactorCallOperation* CEDContactorCallOperation::NewLC(const TDesC& aParam,
+        TBool aForcedCallType )
+    {
+    CEDContactorCallOperation* self = 
+        new (ELeave)CEDContactorCallOperation(aParam, aForcedCallType);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorCallOperation::NewL()
+// -----------------------------------------------------------------------------
+//
+CEDContactorCallOperation* CEDContactorCallOperation::NewL(const TDesC& aParam,
+        TBool aForcedCallType)
+    {
+    CEDContactorCallOperation* self =
+        CEDContactorCallOperation::NewLC(aParam,aForcedCallType);
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorCallOperation::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorCallOperation::ConstructL()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorCallOperation::ExecuteLD()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorCallOperation::ExecuteLD()
+    {
+    CleanupStack::PushL(this);
+    CEDPhoneCall::ExecuteL(iParam, CEDPhoneCall::ECCACallTypeVoice, iForcedCallType );
+    CleanupStack::PopAndDestroy(this);
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactoremailoperation.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* 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 email operation
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEDContactorEmailOperation::CEDContactorEmailOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorEmailOperation::CEDContactorEmailOperation(const TDesC& aParam, const TDesC& aName) : 
+    CEDContactorOperation(aParam, aName)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorEmailOperation::~CEDContactorEmailOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorEmailOperation::~CEDContactorEmailOperation()
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorEmailOperation::NewLC()
+// -----------------------------------------------------------------------------
+//
+CEDContactorEmailOperation* CEDContactorEmailOperation::NewLC(const TDesC& aParam, const TDesC& aName)
+    {
+    CEDContactorEmailOperation* self = new (ELeave)CEDContactorEmailOperation(aParam, aName);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorEmailOperation::NewL()
+// -----------------------------------------------------------------------------
+//
+CEDContactorEmailOperation* CEDContactorEmailOperation::NewL(const TDesC& aParam, const TDesC& aName)
+    {
+    CEDContactorEmailOperation* self=CEDContactorEmailOperation::NewLC(aParam, aName);
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorEmailOperation::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorEmailOperation::ConstructL()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorEmailOperation::ExecuteLD()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorEmailOperation::ExecuteLD()
+    {
+    CleanupStack::PushL(this);
+    CEDMsgEditors::ExecuteL(KSenduiMtmSmtpUid, iParam,
+                iName);
+    CleanupStack::PopAndDestroy(this);
+    }
+// Enf of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactorimoperation.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,186 @@
+/*
+* 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 im operation
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "edcontactorheaders.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEDContactorIMOperation::CEDContactorIMOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorIMOperation::CEDContactorIMOperation(const TDesC& aParam) : CEDContactorOperation(aParam)
+    {
+    iPlugin = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorIMOperation::~CEDContactorIMOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorIMOperation::~CEDContactorIMOperation()
+    {
+    delete iPlugin;
+    iPlugin = NULL;
+    REComSession::FinalClose();   
+    delete iSPSettings;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorIMOperation::NewLC()
+// -----------------------------------------------------------------------------
+//
+CEDContactorIMOperation* CEDContactorIMOperation::NewLC(const TDesC& aParam)
+    {
+    CEDContactorIMOperation* self = new (ELeave)CEDContactorIMOperation(aParam);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorIMOperation::NewL()
+// -----------------------------------------------------------------------------
+//
+CEDContactorIMOperation* CEDContactorIMOperation::NewL(const TDesC& aParam)
+    {
+    CEDContactorIMOperation* self=CEDContactorIMOperation::NewLC(aParam);
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorIMOperation::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorIMOperation::ConstructL()
+    {
+    iSPSettings = CSPSettings::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorIMOperation::ExecuteLD()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorIMOperation::ExecuteLD()
+    {
+    CleanupStack::PushL(this);
+    TPtrC aXspId = iParam;
+
+    TUid dllUid = ResolveEcomUidL( ExtractService(aXspId)  );    
+    LoadEcomL( dllUid, aXspId );
+    CleanupStack::PopAndDestroy(this);
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorIMOperation::ResolveEcomUidL
+// --------------------------------------------------------------------------
+//
+TUid CEDContactorIMOperation::ResolveEcomUidL( const TDesC& aServiceId )
+    {    
+    // Resolve ECom UID from SP settings
+    TInt launchId = KErrNotFound;  
+               
+    launchId = DoResolveEcomUidL( aServiceId ); 
+    TUid launchUid = {launchId };    
+    return launchUid;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorIMOperation::DoResolveEcomUidL
+// --------------------------------------------------------------------------
+//
+TInt CEDContactorIMOperation::DoResolveEcomUidL( const TDesC& aServiceId )
+    {    
+    // Resolve ECom UID from SP settings
+    TInt err = KErrNone;
+    TInt launchId = KErrNotFound;  
+    CDesCArrayFlat* nameArray = NULL;      
+    
+    RIdArray ids;
+    CleanupClosePushL( ids );
+    
+    nameArray = new (ELeave) CDesCArrayFlat(2);
+    CleanupStack::PushL( nameArray );    
+    
+    err = iSPSettings->FindServiceIdsL( ids );  
+    User::LeaveIfError( err );     
+    err = iSPSettings->FindServiceNamesL( ids, *nameArray );  
+    User::LeaveIfError( err );     
+    
+    TInt count = nameArray->MdcaCount();
+    for ( TInt i(0); i < count; i++)
+        {
+        // search the mathching service name
+        TPtrC p = nameArray->MdcaPoint( i );
+        if (!p.CompareF( aServiceId ))
+            {
+            // We have found the service, now get the plugin id
+            CSPProperty* IMLaunchIdProperty = CSPProperty::NewLC();
+            err = iSPSettings->FindPropertyL( ids[i], ESubPropertyIMLaunchUid, *IMLaunchIdProperty );
+            User::LeaveIfError( err );               
+            err = IMLaunchIdProperty->GetValue( launchId );
+            User::LeaveIfError( err ); 
+            CleanupStack::PopAndDestroy( IMLaunchIdProperty );            
+            break;
+            }
+        }    
+    CleanupStack::PopAndDestroy( nameArray );
+    CleanupStack::PopAndDestroy( ); // >>> ids
+    
+    return launchId; 
+    }
+    
+// --------------------------------------------------------------------------
+// CEDContactorIMOperation::LoadEcomL
+// --------------------------------------------------------------------------
+//
+void CEDContactorIMOperation::LoadEcomL( TUid aUidImp, const TDesC& aXspId  )
+    {         
+    TUid destructorId;
+
+    TAny* volatile implementation =
+        REComSession::CreateImplementationL( aUidImp,
+                                             destructorId );
+                                             
+    iPlugin = reinterpret_cast< CCmsContactorImPluginBase* >( implementation );    
+    iPlugin->SetDestructorId( destructorId );    
+    iPlugin->ExecuteL( aXspId );    
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorIMOperation::ExtractService
+// --------------------------------------------------------------------------
+//
+TPtrC CEDContactorIMOperation::ExtractService( const TDesC& aXspId )
+    {         
+    TInt pos = aXspId.Find(KColon);
+    if ( pos >= 0)
+        {
+        // ok input
+        return aXspId.Left(pos);
+        }
+    else
+        {
+        // return something in illegal input case
+        return TPtrC(KNullDesC);
+        }
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactoroperation.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* 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 base class of contactor operations
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEDContactorOperation::CEDContactorOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorOperation::CEDContactorOperation(const TDesC& aParam, const TDesC& aName) : iParam(aParam), iName(aName)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorOperation::~CEDContactorOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorOperation::~CEDContactorOperation()
+    {
+    // No implementation required
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactorpopuphandler.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,296 @@
+/*
+* 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 for handling popup query.
+*
+*/
+
+
+#include <e32std.h>
+#include <s32mem.h>
+#include <aknappui.h>
+#include <coemain.h> 
+#include <phoneappcommands.hrh>
+
+#include "edcontactorserviceheaders.h"
+
+#include <edcontactor.rsg>
+
+// ================= MEMBER FUNCTIONS =======================
+//
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::NewL
+// --------------------------------------------------------------------------
+//
+CEDContactorPopupHandler* CEDContactorPopupHandler::NewL()
+    {
+    CEDContactorPopupHandler* self = new (ELeave) CEDContactorPopupHandler();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::~CEDContactorPopupHandler
+// --------------------------------------------------------------------------
+//
+CEDContactorPopupHandler::~CEDContactorPopupHandler()
+    {
+    LOGSTRING("CEDContactorPopupHandler::~CEDContactorPopupHandler");
+    delete iServiceHandler;
+    delete iSchedulerWait;
+    iCoeEnv.DeleteResourceFile (iResourceOffset);
+    delete iQueryResults;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::LaunchPopupL
+// --------------------------------------------------------------------------
+//
+TDesC& CEDContactorPopupHandler::LaunchPopupL(
+    const TDesC8& aContactLinkArray,
+    TAiwCommAddressSelectType aCommAddressSelectType,
+    TBool aUseDefaults )
+    {
+    LOGSTRING("CEDContactorPopupHandler::LaunchPopupL");
+
+    __ASSERT_ALWAYS (NULL != &aContactLinkArray, User::Leave (KErrArgument));
+    __ASSERT_ALWAYS (0 < aContactLinkArray.Size(), User::Leave (KErrArgument));
+
+    TUint fetchFlags = 0;
+
+    // Stop scheduler just in case this is called while operation is still ongoing.
+    AsyncStop();
+    
+    // Set service data
+    TAiwSingleItemSelectionDataV3 data;
+
+    if (!aUseDefaults)
+        {
+        fetchFlags |= ::EDoNotUseDefaultField;
+        }
+
+    data.SetFlags(fetchFlags);
+    data.SetCommAddressSelectType(aCommAddressSelectType);
+    CAiwGenericParamList& inParamList = iServiceHandler->InParamListL();
+    inParamList.AppendL(TAiwGenericParam(EGenericParamContactSelectionData,
+        TAiwVariant(TAiwSingleItemSelectionDataV3Pckg(data))));
+
+    // Set contactlink
+    inParamList.AppendL(TAiwGenericParam(EGenericParamContactLinkArray,
+        TAiwVariant(aContactLinkArray)));
+
+    iServiceHandler->ExecuteServiceCmdL(KAiwCmdSelect, inParamList,
+        iServiceHandler->OutParamListL(), 0, this);
+
+    // Waiting for popup selection.
+    // Make this whole operation look synchronous
+    CAknAppUi* appUi = static_cast<CAknAppUi*>( iCoeEnv.AppUi() );
+    appUi->HandleCommandL( EPhoneCmdBlockingDialogLaunched );
+    iSchedulerWait->Start();
+    appUi->HandleCommandL( EPhoneCmdBlockingDialogClosed );
+    
+    User::LeaveIfError(iError);
+
+    LOGSTRING("CEDContactorPopupHandler::LaunchPopupL: Done.");
+
+    return *iQueryResults;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::ClosePopupL
+// --------------------------------------------------------------------------
+//
+void CEDContactorPopupHandler::ClosePopupL()
+    {
+    if ( iSchedulerWait->IsStarted() )
+        {
+        iServiceHandler->ExecuteServiceCmdL( KAiwCmdSelect, 
+                iServiceHandler->InParamListL(),
+                iServiceHandler->OutParamListL(), 
+                KAiwOptCancel, 
+                this );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::HandleNotifyL
+// --------------------------------------------------------------------------
+//
+TInt CEDContactorPopupHandler::HandleNotifyL(TInt aCmdId, TInt aEventId,
+        CAiwGenericParamList& aEventParamList,
+        const CAiwGenericParamList& /*aInParamList*/)
+    {
+    LOGSTRING("CEDContactorPopupHandler::HandleNotifyL");
+    TInt returnValue = KErrNone;
+
+    if (aCmdId == KAiwCmdSelect)
+        {
+        switch(aEventId)
+            {
+            case KAiwEventCompleted:
+                {
+                LOGSTRING("CEDContactorPopupHandler::HandleNotifyL: KAiwEventCompleted");
+                // Selection done.
+                // Read and store results
+                TRAP(iError, ReadFieldDataL(aEventParamList));
+                }
+                break;
+
+            case KAiwEventCanceled:
+                LOGSTRING("CEDContactorPopupHandler::HandleNotifyL: KAiwEventCanceled");
+                // Selection canceled.
+                iError = KErrCancel;
+                break;
+
+            case KAiwEventError:
+            case KAiwEventStopped:
+                LOGSTRING("CEDContactorPopupHandler::HandleNotifyL: KAiwEventError or KAiwEventStopped");
+                // Error occurred.
+                iError = KErrGeneral;
+                break;
+
+            case KAiwEventQueryExit:
+                iError = KErrAbort;
+                returnValue = EFalse; // Telephony must not be allowed to be closed down
+                break;
+
+            default:
+                LOGSTRING("CEDContactorPopupHandler::HandleNotifyL: Unknown");
+                iError = KErrGeneral;
+                break;
+            }
+        // Stop scheduler if service execution has finished.
+        if ( aEventId != KAiwEventQueryExit )
+            {
+            AsyncStop();
+            }
+        }
+
+    LOGSTRING("CEDContactorPopupHandler::HandleNotifyL: Done.");
+    return returnValue;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::CEDContactorPopupHandler
+// --------------------------------------------------------------------------
+//
+CEDContactorPopupHandler::CEDContactorPopupHandler() :
+    iCoeEnv(*CCoeEnv::Static()),
+    iError(KErrNone)
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::ConstructL
+// --------------------------------------------------------------------------
+//
+void CEDContactorPopupHandler::ConstructL()
+    {
+    LOGSTRING("CEDContactorPopupHandler::ConstructL");
+
+    PrepareResourcesL();
+
+    iServiceHandler = CAiwServiceHandler::NewL();
+    iServiceHandler->AttachL(R_EDCONTACTORSERVICE_CONTACT_SELECTION_INTEREST);
+
+    iSchedulerWait = new (ELeave) CActiveSchedulerWait();
+
+    LOGSTRING("CEDContactorPopupHandler::ConstructL: Done.");
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::PrepareResourcesL
+// --------------------------------------------------------------------------
+//
+void CEDContactorPopupHandler::PrepareResourcesL()
+    {
+    LOGSTRING("CEDContactorPopupHandler::PrepareResourcesL");
+
+    // preparing resources for use
+    TFileName fileName;
+    fileName.Append (KEDContactorServiceResourceFileName);
+
+    BaflUtils::NearestLanguageFile (iCoeEnv.FsSession (), fileName);
+    if (ConeUtils::FileExists (fileName))
+        {
+        iResourceOffset = iCoeEnv.AddResourceFileL (fileName);
+        }
+    else // not found from user drive, leave badly.
+        {
+        LOGSTRING("CEDContactorPopupHandler::PrepareResourcesL: Resource file not exists.");
+        User::Leave (KErrGeneral);
+        }
+
+    LOGSTRING("CEDContactorPopupHandler::PrepareResourcesL: Done.");
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::ReadFieldDataL
+// --------------------------------------------------------------------------
+//
+void CEDContactorPopupHandler::ReadFieldDataL(
+    CAiwGenericParamList& aEventParamList)
+    {
+    LOGSTRING("CEDContactorPopupHandler::ReadFieldDataL");
+
+    if (iQueryResults)
+        {
+        delete iQueryResults;
+        iQueryResults = NULL;
+        }
+
+    TInt index = 1; // Get field data from index 1
+    const TAiwGenericParam* param =
+         aEventParamList.FindFirst(index, EGenericParamContactFieldData);
+    if (KErrNotFound != index)
+        {
+        TInt length = param->Value().AsDes().Length();
+        iQueryResults = HBufC::NewL(length);
+        iQueryResults->Des().Append(param->Value().AsDes());
+
+        // Data must be found!
+        if (0 >= iQueryResults->Length())
+            {
+            LOGSTRING("CEDContactorPopupHandler::ReadFieldDataL: Failed to get field data!");
+            User::Leave(KErrGeneral);
+            }
+        }
+    else
+        {
+        LOGSTRING("CEDContactorPopupHandler::ReadFieldDataL: Not found!");
+        User::Leave(KErrNotFound);
+        }
+
+    LOGSTRING("CEDContactorPopupHandler::ReadFieldDataL: Done.");
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorPopupHandler::AsyncStop
+// --------------------------------------------------------------------------
+//
+void CEDContactorPopupHandler::AsyncStop()
+    {
+    LOGSTRING("CEDContactorPopupHandler::AsyncStop");
+
+    if(iSchedulerWait->IsStarted())
+        {
+        iSchedulerWait->AsyncStop();
+        }
+
+    LOGSTRING("CEDContactorPopupHandler::AsyncStop: Done.");
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactorservice.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,126 @@
+/*
+* 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 is a class for starting services
+*
+*/
+
+#include <e32std.h>
+
+#include "edcontactorserviceheaders.h"
+
+_LIT(KContactorResourceFile, "\\resource\\edcontactor.rsc");
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// --------------------------------------------------------------------------
+// CEDContactorService::ExecuteServiceL
+// --------------------------------------------------------------------------
+//
+EXPORT_C CEDContactorService* CEDContactorService::NewL( MEDContactorObserver* aObserver )
+    {
+    CEDContactorService* self = new (ELeave) CEDContactorService(aObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// Destructor
+// --------------------------------------------------------------------------
+//
+CEDContactorService::~CEDContactorService()
+    {
+    delete iOperator;
+    
+    CCoeEnv* coe = CCoeEnv::Static();
+    if( coe )
+        {
+        coe->DeleteResourceFile( iResourceFileOffset );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// Constructor
+// --------------------------------------------------------------------------
+//
+CEDContactorService::CEDContactorService( MEDContactorObserver* aObserver ) :
+iObserver(aObserver)
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorService::ConstructL
+// --------------------------------------------------------------------------
+//
+void CEDContactorService::ConstructL()
+    {
+    CCoeEnv* coe = CCoeEnv::Static();    
+    if( coe )
+        {
+        TFileName dllFileName;
+        Dll::FileName( dllFileName );
+        
+        TParse parse;
+        User::LeaveIfError(parse.Set(KContactorResourceFile, &dllFileName, NULL));
+        TFileName resourceFileName(parse.FullName());
+         
+        iResourceFileOffset = coe->AddResourceFileL( resourceFileName );
+        }
+    
+    iOperator = CEDContactorServiceOperator::NewL( iObserver );
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorService::ExecuteServiceL
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CEDContactorService::ExecuteServiceL(
+    const TCSParameter& aParameter)
+    {
+    LOGSTRING("CEDContactorService::ExecuteServiceL(): enter");
+
+    iCommandIsBeingHandled = ETrue;
+
+    // All leaves are trapped in op class.
+    iOperator->Execute(aParameter);
+
+    iCommandIsBeingHandled = EFalse;
+
+    LOGSTRING("CEDContactorService::ExecuteServiceL(): exit");
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorService::CancelService
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CEDContactorService::CancelService()
+    {
+    if ( iOperator )
+        {
+        iOperator->Cancel();
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorService::IsBusy
+// --------------------------------------------------------------------------
+//
+EXPORT_C TBool CEDContactorService::IsBusy() const
+    {
+    return iCommandIsBeingHandled;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactorserviceoperator.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,493 @@
+/*
+* 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 for handling service logic.
+*
+*/
+
+#include <e32std.h>
+#include <s32mem.h>
+
+#include "edcontactorserviceheaders.h"
+
+// ================= MEMBER FUNCTIONS =======================
+//
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::NewLC
+// --------------------------------------------------------------------------
+//
+CEDContactorServiceOperator* CEDContactorServiceOperator::NewLC( MEDContactorObserver* aObserver )
+    {
+    CEDContactorServiceOperator* self = new (ELeave) CEDContactorServiceOperator(aObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::NewL
+// --------------------------------------------------------------------------
+//
+CEDContactorServiceOperator* CEDContactorServiceOperator::NewL( MEDContactorObserver* aObserver )
+    {
+    CEDContactorServiceOperator* self = CEDContactorServiceOperator::NewLC(aObserver);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::~CEDContactorServiceOperator
+// --------------------------------------------------------------------------
+//
+CEDContactorServiceOperator::~CEDContactorServiceOperator()
+    {
+    LOGSTRING("CEDContactorServiceOperator::~CEDContactorServiceOperator");
+
+    delete iPopupHandler;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::Execute
+// --------------------------------------------------------------------------
+//
+void CEDContactorServiceOperator::Execute(
+    const CEDContactorService::TCSParameter& aParameter)
+    {
+    LOGSTRING("CEDContactorServiceOperator::Execute");
+
+    iParameter = &aParameter;
+
+    /**
+     * LOGIC:
+     * 1. Launch AIW popup
+     * 2. Special cases: Find out serviceid for voip
+     * 3. Launch communication service
+     *
+     * All actions are trapped here.
+     */
+    TDesC* result = NULL;
+    TBool useDefaults = EFalse;
+
+    // Check default control flag
+    if (CEDContactorService::TCSParameter::EEnableDefaults &
+        iParameter->iControlFlag)
+        {
+        useDefaults = ETrue;
+        }
+
+    // Launch popup
+    TRAPD(err, result = &iPopupHandler->LaunchPopupL(
+        iParameter->iContactLinkArray,
+        CommunicationEnumMapper(iParameter->iCommTypeSelector),
+        useDefaults));
+
+    if (KErrNone != err)
+        {
+        LOGSTRING1("CEDContactorServiceOperator::ExecuteL: LaunchPopupL: Leaves %d.", err);
+        
+        if (iObserver)
+            {
+            iObserver->InformContactorEvent(MEDContactorObserver::ECommunicationCancelled);
+            }       
+        return;
+        }
+
+    // Resolve special cases
+    TRAP(err, ResolveSpecialCasesL(*result));
+
+    if (KErrNone != err)
+        {
+        LOGSTRING1("CEDContactorServiceOperator::ExecuteL: ResolveSpecialCasesL: Leaves %d.", err);
+        
+        if (iObserver)
+            {
+            iObserver->InformContactorEvent(MEDContactorObserver::ECommunicationCancelled);
+            }       
+        return;
+        }
+
+    // Launch communication service
+    TRAP(err, LaunchCommunicationMethodL(*result));
+
+    if (KErrNone != err)
+        {
+        LOGSTRING1("CEDContactorServiceOperator::ExecuteL: LaunchCommunicationMethodL: Leaves %d.", err);
+        
+        if (iObserver)
+            {
+            iObserver->InformContactorEvent(MEDContactorObserver::ECommunicationCancelled);
+            }       
+        return;
+        }
+    LOGSTRING("CEDContactorServiceOperator::Execute: Done.");
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::Cancel
+// --------------------------------------------------------------------------
+//
+void CEDContactorServiceOperator::Cancel()
+    {
+    if ( iPopupHandler )
+        {
+        TRAP_IGNORE( iPopupHandler->ClosePopupL() );
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::CEDContactorServiceOperator
+// --------------------------------------------------------------------------
+//
+CEDContactorServiceOperator::CEDContactorServiceOperator( MEDContactorObserver* aObserver ):
+    iServiceId((TUint32)KErrNotFound),
+    iObserver(aObserver)
+    {
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::ConstructL
+// --------------------------------------------------------------------------
+//
+void CEDContactorServiceOperator::ConstructL()
+    {
+    LOGSTRING("CEDContactorServiceOperator::ConstructL");
+
+    iPopupHandler = CEDContactorPopupHandler::NewL();
+
+    LOGSTRING("CEDContactorServiceOperator::ConstructL: Done.");
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::ResolveSpecialCasesL
+// --------------------------------------------------------------------------
+//
+void CEDContactorServiceOperator::ResolveSpecialCasesL(const TDesC& aFieldData)
+    {
+    LOGSTRING("CEDContactorServiceOperator::ResolveSpecialCasesL");
+
+    /*
+     * Currently only VOIP ServiceId is needed to find out.
+     */
+    switch(iParameter->iCommTypeSelector)
+        {
+        case VPbkFieldTypeSelectorFactory::EVOIPCallSelector:
+            iServiceId = ResolveServiceIdL(aFieldData);
+            break;
+        }
+
+    LOGSTRING("CEDContactorServiceOperator::ResolveSpecialCasesL: Done.");
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::ResolveServiceIdL
+// --------------------------------------------------------------------------
+//
+TUint32 CEDContactorServiceOperator::ResolveServiceIdL(const TDesC& aFieldData)
+    {
+    LOGSTRING("CEDContactorServiceOperator::ResolveServiceIdL");
+
+    __ASSERT_ALWAYS (NULL != &aFieldData, User::Leave (KErrArgument));
+    __ASSERT_ALWAYS (0 < aFieldData.Size(), User::Leave (KErrArgument));
+
+    TUint32 ret = (TUint32)KErrNotFound;
+
+    //LOGIC:
+    /*
+     * 1. Find out is there xSP prefix ( voip address for some specific service provider )
+     * 2. If there is, search service id
+     * 3. If not, find out how many services support msisdn
+     * 4. If only one, find use that service id
+     * 5. If more than one, do not use service id. User will be prompt which service to use.
+     */
+
+    TPtrC result;
+
+    // 1. Find out is there xSP prefix
+    if (ExtractServiceL(aFieldData, result))
+        {
+        LOGSTRING("CEDContactorServiceOperator::ResolveServiceIdL: ExtractServiceL found.");
+
+        // 2. If there is, search service id
+        ret = SearchServiceIdL(result);
+        }
+    else
+        {
+        LOGSTRING("CEDContactorServiceOperator::ResolveServiceIdL: ExtractServiceL not found.");
+
+        // 3. If not, find out how many services support msisdn ( normal phone number )
+        ret = ResolveMSISDNAddressingSupportedL();
+        if ((TUint32)KErrNotFound != ret)
+            {
+            // 4. If only one, find use that service id
+            // Currently no implementation.
+            LOGSTRING("CEDContactorServiceOperator::ResolveServiceIdL: ResolveMSISDNAddressingSupportedL only one service.");
+
+            }
+        else
+            {
+            // 5. If more than one or none found, do not use service id.
+            // User will be asked to choose among services when call is initiated.
+            // Currently no implementation. 
+            LOGSTRING("CEDContactorServiceOperator::ResolveServiceIdL: ResolveMSISDNAddressingSupportedL more than one service.");
+            }
+        }
+
+    LOGSTRING("CEDContactorServiceOperator::ResolveServiceIdL: Done.");
+
+    return ret;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::ExtractServiceL
+// --------------------------------------------------------------------------
+//
+TBool CEDContactorServiceOperator::ExtractServiceL(
+    const TDesC& aFieldData, TPtrC& aXSPId)
+    {
+    LOGSTRING("CEDContactorServiceOperator::ExtractServiceL");
+
+    TBool found = EFalse;
+
+    TInt pos = aFieldData.Find(KColon);
+    if (pos >= 0)
+        {
+        // ok input
+        aXSPId.Set(aFieldData.Left(pos));
+        found = ETrue;
+        }
+
+    LOGSTRING("CEDContactorServiceOperator::ExtractServiceL: Done.");
+
+    return found;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::SearchServiceIdL
+// --------------------------------------------------------------------------
+//
+TUint32 CEDContactorServiceOperator::SearchServiceIdL(const TDesC& aFieldData)
+    {
+    LOGSTRING("CEDContactorServiceOperator::SearchServiceIdL");
+
+    TUint32 ret = (TUint32)KErrNotFound;
+    TInt err = KErrNone;
+    CDesCArrayFlat* nameArray = NULL;
+
+    RIdArray ids;
+    CleanupClosePushL(ids);
+
+    nameArray = new (ELeave) CDesCArrayFlat(2);
+    CleanupStack::PushL(nameArray);
+
+    CSPSettings* settings = CSPSettings::NewLC();
+
+    err = settings->FindServiceIdsL(ids);
+    User::LeaveIfError(err);
+    err = settings->FindServiceNamesL(ids, *nameArray);
+    User::LeaveIfError(err);
+
+    TInt count = nameArray->MdcaCount();
+    for (TInt i(0); i < count; i++)
+        {
+        // search the mathching service name
+        TPtrC p = nameArray->MdcaPoint(i);
+        if (!p.CompareF(aFieldData))
+            {
+            // Service found
+            ret = ids[i];
+
+            LOGSTRING("CEDContactorServiceOperator::SearchServiceIdL: Service found.");
+            break;
+            }
+        }
+    CleanupStack::PopAndDestroy( settings ); 
+    CleanupStack::PopAndDestroy( nameArray ); 
+    CleanupStack::PopAndDestroy( &ids ); 
+
+    LOGSTRING("CEDContactorServiceOperator::SearchServiceIdL: Done.");
+
+    return ret;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::ResolveMSISDNAddressingSupportedL
+// --------------------------------------------------------------------------
+//
+TUint32 CEDContactorServiceOperator::ResolveMSISDNAddressingSupportedL()
+    {
+    LOGSTRING("CEDContactorServiceOperator::ResolveMSISDNAddressingSupportedL");
+
+    /*
+     * LOGIC:
+     * -Find out services that support calling normal mobile/telephone numbers
+     * -If only 1 service, return the serviceid
+     * -If services are more than 1, then do not use serviceid.
+     */
+
+    TInt err = KErrNone;
+    TInt foundNo = 0;
+    TUint32 ret = (TUint32)KErrNotFound;
+
+    RIdArray ids;
+    CleanupClosePushL(ids);
+
+    CSPSettings* settings = CSPSettings::NewLC();
+
+    err = settings->FindServiceIdsL(ids);
+    User::LeaveIfError(err);
+    
+    CSPProperty* property = CSPProperty::NewLC();
+
+    TInt count = ids.Count();
+    for (TInt i(0); i < count; i++)
+        {
+        // Find out property
+        err = settings->FindPropertyL(ids[i],
+            EPropertyServiceAttributeMask, *property);
+
+        // If service have property
+        if (KErrNone == err)
+            {
+            // read the value of mask property
+            TInt mask = 0;
+            err = property->GetValue(mask);
+            if (KErrNone == err)
+                {
+                if ((mask & ESupportsMSISDNAddressing) &&
+                    (mask & ESupportsInternetCall))
+                    {
+                    // Found one.
+                    ret = ids[i];
+                    foundNo++;
+
+                    }// if mask
+                }// if err
+            }// if err
+
+        }// for
+
+    // If more than 1 service, do not use serviceid
+
+    if (1 < foundNo)
+    {
+        ret = (TUint32)KErrNotFound;
+    }
+
+    CleanupStack::PopAndDestroy( property );
+    CleanupStack::PopAndDestroy( settings );
+    CleanupStack::PopAndDestroy( &ids );
+
+    LOGSTRING("CEDContactorServiceOperator::ResolveMSISDNAddressingSupportedL: Done.");
+    return ret;
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::LaunchCommunicationMethodL
+// --------------------------------------------------------------------------
+//
+void CEDContactorServiceOperator::LaunchCommunicationMethodL(
+    const TDesC& aFieldData)
+    {
+    LOGSTRING("CEDContactorServiceOperator::LaunchCommunicationMethodL");
+
+    __ASSERT_ALWAYS (NULL != &iParameter->iFullName, User::Leave (KErrArgument));
+    __ASSERT_ALWAYS (0 < iParameter->iFullName.Size(), User::Leave (KErrArgument));
+
+
+    TBool forcedService( EFalse );
+    
+    // Check forced service flag
+    if (CEDContactorService::TCSParameter::EForcedService &
+        iParameter->iControlFlag)
+        {
+        forcedService = ETrue;
+        }
+    
+    // If serviceid found, use it.
+    if ((TUint32)KErrNotFound != iServiceId)
+        {
+        LOGSTRING("CEDContactorServiceOperator::ExecuteL: ExecuteServiceL with serviceid");
+        CEDContactor::ExecuteServiceL(
+            iParameter->iCommTypeSelector,
+            aFieldData,
+            iParameter->iFullName,
+            forcedService,
+            iServiceId);
+        }
+    else
+        {
+        LOGSTRING("CEDContactorServiceOperator::ExecuteL: ExecuteServiceL without serviceid");
+        CEDContactor::ExecuteServiceL(
+            iParameter->iCommTypeSelector,
+            aFieldData,
+            iParameter->iFullName,
+            forcedService);
+        }
+
+    LOGSTRING("CEDContactorServiceOperator::LaunchCommunicationMethodL: Done.");
+    }
+
+// --------------------------------------------------------------------------
+// CEDContactorServiceOperator::CommunicationEnumMapper
+// --------------------------------------------------------------------------
+//
+TAiwCommAddressSelectType CEDContactorServiceOperator::CommunicationEnumMapper(
+    VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aCommTypeSelector)
+    {
+    LOGSTRING("CEDContactorServiceOperator::CommunicationEnumMapper");
+
+    TAiwCommAddressSelectType type;
+
+    switch(aCommTypeSelector)
+        {
+        case VPbkFieldTypeSelectorFactory::EEmptySelector:
+            type = EAiwCommEmpty;
+            break;
+
+        case VPbkFieldTypeSelectorFactory::EVoiceCallSelector:
+            type = EAiwCommVoiceCall;
+            break;
+
+        case VPbkFieldTypeSelectorFactory::EUniEditorSelector:
+            type = EAiwCommUniEditor;
+            break;
+
+        case VPbkFieldTypeSelectorFactory::EEmailEditorSelector:
+            type = EAiwCommEmailEditor;
+            break;
+
+        case VPbkFieldTypeSelectorFactory::EInstantMessagingSelector:
+            type = EAiwCommInstantMessaging;
+            break;
+
+        case VPbkFieldTypeSelectorFactory::EVOIPCallSelector:
+            type = EAiwCommVOIPCall;
+            break;
+
+        case VPbkFieldTypeSelectorFactory::EVideoCallSelector:
+            type = EAiwCommVideoCall;
+            break;
+
+        default:
+            LOGSTRING("CEDContactorServiceOperator::CommunicationEnumMapper: default -> Empty mapped.");
+            type = EAiwCommEmpty;
+            break;
+        }
+
+    LOGSTRING("CEDContactorServiceOperator::CommunicationEnumMapper: Done.");
+
+    return type;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactorunieditoroperation.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* 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 unieditor (SMS/MMS) operation
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEDContactorUniEditorOperation::CEDContactorUniEditorOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorUniEditorOperation::CEDContactorUniEditorOperation(const TDesC& aParam, const TDesC& aName) : 
+    CEDContactorOperation(aParam, aName)
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorUniEditorOperation::~CEDContactorUniEditorOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorUniEditorOperation::~CEDContactorUniEditorOperation()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorUniEditorOperation::NewLC()
+// -----------------------------------------------------------------------------
+//
+CEDContactorUniEditorOperation* CEDContactorUniEditorOperation::NewLC(const TDesC& aParam, const TDesC& aName)
+    {
+    CEDContactorUniEditorOperation* self = new (ELeave)CEDContactorUniEditorOperation(aParam, aName);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorUniEditorOperation::NewL()
+// -----------------------------------------------------------------------------
+//
+CEDContactorUniEditorOperation* CEDContactorUniEditorOperation::NewL(const TDesC& aParam, const TDesC& aName)
+    {
+    CEDContactorUniEditorOperation* self =
+            CEDContactorUniEditorOperation::NewLC( aParam, aName );
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorUniEditorOperation::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorUniEditorOperation::ConstructL()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorUniEditorOperation::ExecuteLD()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorUniEditorOperation::ExecuteLD()
+    {
+    CleanupStack::PushL(this);
+    CEDMsgEditors::ExecuteL( KSenduiMtmUniMessageUid, iParam, iName );
+    CleanupStack::PopAndDestroy(this);
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactorvideocalloperation.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,84 @@
+/*
+* 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 video call operation
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEDContactorVideocallOperation::CEDContactorVideocallOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorVideocallOperation::CEDContactorVideocallOperation(const TDesC& aParam) : CEDContactorOperation(aParam)
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVideocallOperation::~CEDContactorVideocallOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorVideocallOperation::~CEDContactorVideocallOperation()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVideocallOperation::NewLC()
+// -----------------------------------------------------------------------------
+//
+CEDContactorVideocallOperation* CEDContactorVideocallOperation::NewLC(const TDesC& aParam)
+    {
+    CEDContactorVideocallOperation* self = new (ELeave)CEDContactorVideocallOperation(aParam);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVideocallOperation::NewL()
+// -----------------------------------------------------------------------------
+//
+CEDContactorVideocallOperation* CEDContactorVideocallOperation::NewL(const TDesC& aParam)
+    {
+    CEDContactorVideocallOperation* self=
+            CEDContactorVideocallOperation::NewLC(aParam);
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVideocallOperation::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorVideocallOperation::ConstructL()
+    {
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVideocallOperation::ExecuteLD()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorVideocallOperation::ExecuteLD()
+    {
+    CleanupStack::PushL(this);
+    CEDPhoneCall::ExecuteL(iParam, CEDPhoneCall::ECCACallTypeVideo, ETrue );
+    CleanupStack::PopAndDestroy(this);
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edcontactorvoipoperation.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,84 @@
+/*
+* 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 voip operation
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEDContactorVOIPOperation::CEDContactorVOIPOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorVOIPOperation::CEDContactorVOIPOperation(const TDesC& aParam, TUint32 aServiceId) : CEDContactorOperation(aParam), iServiceId(aServiceId)
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVOIPOperation::~CEDContactorVOIPOperation()
+// -----------------------------------------------------------------------------
+//
+CEDContactorVOIPOperation::~CEDContactorVOIPOperation()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVOIPOperation::NewLC()
+// -----------------------------------------------------------------------------
+//
+CEDContactorVOIPOperation* CEDContactorVOIPOperation::NewLC(const TDesC& aParam, TUint32 aServiceId)
+    {
+    CEDContactorVOIPOperation* self = new (ELeave)CEDContactorVOIPOperation(aParam, aServiceId);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVOIPOperation::NewL()
+// -----------------------------------------------------------------------------
+//
+CEDContactorVOIPOperation* CEDContactorVOIPOperation::NewL(const TDesC& aParam, TUint32 aServiceId)
+    {
+    CEDContactorVOIPOperation* self=CEDContactorVOIPOperation::NewLC(aParam, aServiceId);
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVOIPOperation::ConstructL()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorVOIPOperation::ConstructL()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CEDContactorVOIPOperation::ExecuteLD()
+// -----------------------------------------------------------------------------
+//
+void CEDContactorVOIPOperation::ExecuteLD()
+    {
+    CleanupStack::PushL(this);
+    CEDPhoneCall::ExecuteL(iParam, CEDPhoneCall::ECCACallTypeVoIP, EFalse,
+                           iServiceId);
+    CleanupStack::PopAndDestroy(this);
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edmsgeditors.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,144 @@
+/*
+* 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:  Launching Editors.
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+#include <SendUiConsts.h>
+
+#ifndef KSenduiMtmOnlineAlbumUidValue
+#define KSenduiMtmOnlineAlbumUidValue       0x200009D5
+#endif
+
+/// Unnamed namespace for local definitions
+namespace
+	{
+
+#ifdef _DEBUG
+	enum TPanicCode
+		{
+		EPanicPreCond_ExecuteL = 1
+		};
+
+	void Panic(TPanicCode aReason)
+		{
+		_LIT(KPanicText, "CCmsMsgEditors");
+		User::Panic (KPanicText, aReason);
+		}
+#endif // _DEBUG
+
+
+	} /// namespace
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------
+// CEDMsgEditors::ExecuteL
+// ---------------------------------------------------------
+void CEDMsgEditors::ExecuteL( const TUid aServiceUid,
+		const TDesC& aAddress, const TDesC& aName )
+	{
+    __ASSERT_DEBUG (NULL != &aAddress && 0 < aAddress.Size() &&
+                        NULL != &aName && 0 < aName.Size() && 
+                        NULL != &aServiceUid, Panic (EPanicPreCond_ExecuteL));
+
+	//ParsePhoneNumber may only short length of phonenumber, 
+	//so it's safe to use same lenght as given number and do the copy.
+	HBufC* numBuf = aAddress.AllocLC();
+	TPtr numDesc( numBuf->Des() );
+
+	//Unieditor could also use email adresses. If parser returns EFalse, do not care. 
+	if ( KSenduiMtmUniMessageUid == aServiceUid)
+		{
+		CommonPhoneParser::ParsePhoneNumber( numDesc,
+				CommonPhoneParser::EPhoneClientNumber );
+		}
+
+	CSendUi* sendui = CSendUi::NewLC ();
+	CMessageData* msgdata = CMessageData::NewLC ();
+	msgdata->AppendToAddressL( *numBuf, aName);
+	
+	if (KSenduiMtmSmtpUid == aServiceUid)
+	    {
+	    const TUid KMfEUidValue = { 0x1020695B }; //Where is this defined?
+	    TBool mailAvailabe = EFalse;
+	    TBool mfeAvailable = EFalse;
+	    TUid selectedServiceID = KNullUid;
+	    RPointerArray<CSendingServiceInfo> availableServices;
+	    sendui->AvailableServicesL(availableServices, KGenericMtmPlugin);
+	    for (TInt i=0; i < availableServices.Count(); i++)
+	        {
+	        if (!(availableServices[i]->ServiceFeatures() & CSendingServiceInfo::EServiceInValid))
+	            {
+    	        if (availableServices[i]->ServiceId() == KSenduiMtmSmtpUid)
+    	            {
+                    mailAvailabe = ETrue;
+    	            }
+    	        else if (availableServices[i]->ServiceId() ==  KMfEUidValue)
+    	            {
+    	            selectedServiceID = availableServices[i]->ServiceId();
+    	            mfeAvailable = ETrue;
+    	            }
+	            }
+	        }
+	    availableServices.ResetAndDestroy();
+	    	    
+	    if (mailAvailabe && mfeAvailable)
+	        {
+    	    CArrayFixFlat<TUid>* servicesToDim = new (ELeave) CArrayFixFlat<TUid>(1);
+    	    CleanupStack::PushL(servicesToDim);
+    	    
+    	    servicesToDim->AppendL(KSenduiTechnologySmsUid);
+    	    servicesToDim->AppendL(KSenduiTechnologyMmsUid);
+    	    //servicesToDim->AppendL(KSenduiTechnologyMailUid); Email is not to be dimmed
+    	    servicesToDim->AppendL(KSenduiTechnologyUniEditorUid);
+    	    servicesToDim->AppendL(KSenduiTechnologyIrUid);
+    	    servicesToDim->AppendL(KSenduiTechnologyBtUid);
+    	    servicesToDim->AppendL(KSenduiTechnologyIMUid);	    
+    	    servicesToDim->AppendL(KMmsDirectUpload);
+    	    servicesToDim->AppendL(KMmsIndirectUpload);
+    	    servicesToDim->AppendL(KMmsUploadService1Id);
+    	    servicesToDim->AppendL(KMmsUploadService2Id);
+    	    servicesToDim->AppendL(KMmsUploadService3Id);
+    	    servicesToDim->AppendL(KMmsUploadService4Id);
+    	    const TUid KShareOnline = { KSenduiMtmOnlineAlbumUidValue }; // From SendUiInternalConsts.h
+    	    servicesToDim->AppendL(KShareOnline);
+    	    
+    	    sendui->ShowQueryAndSendL(msgdata, KCapabilitiesForAllServices, servicesToDim);
+    	    servicesToDim->Reset();
+    	    CleanupStack::PopAndDestroy(servicesToDim);
+	        }
+	    else if (mfeAvailable)
+	        {
+	        sendui->CreateAndSendMessageL(selectedServiceID, msgdata, KNullUid, EFalse);
+	        }
+	    else
+	        {
+	        sendui->CreateAndSendMessageL(aServiceUid, msgdata, KNullUid, EFalse);
+	        }
+	    }
+	else
+	    {
+	    sendui->CreateAndSendMessageL(aServiceUid, msgdata, KNullUid, EFalse);
+	    }
+
+	CleanupStack::PopAndDestroy( 3, numBuf ); //msgdata, sendui
+
+	return;
+	}
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/edcontactor/src/edphonecall.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,144 @@
+/*
+* 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:  Launching Call.
+*
+*/
+
+
+// INCLUDE FILES
+#include "edcontactorheaders.h"
+
+_LIT8( KAiwContentTypeAll, "*" );
+
+/// Unnamed namespace for local definitions
+namespace
+	{
+
+#ifdef _DEBUG
+	enum TPanicCode
+		{
+		EPanicPreCond_ExecuteL = 1,
+		EPanicPreCond_ExecuteL2
+		};
+
+	void Panic(TPanicCode aReason)
+		{
+		_LIT(KPanicText, "CCmsPhoneCall");
+		User::Panic (KPanicText, aReason);
+		}
+#endif // _DEBUG
+
+
+	} /// namespace
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------
+// CEDPhoneCall::ExecuteL
+// ---------------------------------------------------------
+void CEDPhoneCall::ExecuteL( const TDesC& aPhoneNumber, TEDPhoneCallType aCallType,
+        TBool aForcedCallType, TUint32 aServiceId )
+	{   
+    __ASSERT_DEBUG( NULL != &aPhoneNumber && 0 < aPhoneNumber.Size(), Panic(EPanicPreCond_ExecuteL) );
+
+#ifdef _DEBUG
+	HBufC8* buf = HBufC8::NewLC( aPhoneNumber.Length() );
+	buf->Des().Copy( aPhoneNumber );
+	TPtrC8 numberDesc( buf->Des() );
+	CleanupStack::PopAndDestroy( buf );
+#endif
+
+	//aPhoneNumber will be an xsp id of format "ServiceName:UserId"
+	//here we need to truncate the servicename and pass only the UserId
+	
+    //Find if aPhoneNumber of type "ServiceName:UserId"
+	//if true, then remove the service part
+    TPtrC phoneNum( aPhoneNumber );
+    TInt phoneNumberStart = phoneNum.Locate(':');
+    
+    if ( KErrNotFound != phoneNumberStart )
+        {
+        phoneNumberStart++; //To get rid of ':'
+        phoneNum.Set( phoneNum.Mid( phoneNumberStart ) );
+        }
+    
+    HBufC* numBuf = phoneNum.AllocLC();
+    TPtr numDesc( numBuf->Des() );
+	CommonPhoneParser::ParsePhoneNumber( numDesc,
+			CommonPhoneParser::EPhoneClientNumber ); 
+
+	CAiwDialDataExt* dialDataExt = CAiwDialDataExt::NewLC();
+	dialDataExt->SetPhoneNumberL( *numBuf );
+	switch (aCallType)
+	    {
+	    case ECCACallTypeVoice:
+	        if ( aForcedCallType )
+	            {
+	            // Use this with Action menu's Voice call icon
+	            dialDataExt->SetCallType( CAiwDialData::EAIWForcedCS );
+	            }
+	        else
+	            {
+	            // To be on the safe side, use this with Send key and big Call icon
+	            dialDataExt->SetCallType( CAiwDialData::EAIWVoice );
+	            }
+	        break;
+	    case ECCACallTypeVoIP:
+	        dialDataExt->SetServiceId( aServiceId );
+	        dialDataExt->SetCallType( CAiwDialData::EAIWVoiP );
+	        break;
+	    case ECCACallTypeVideo:
+	        dialDataExt->SetCallType( CAiwDialData::EAIWForcedVideo );
+	        break;
+	    default:
+	        dialDataExt->SetCallType( CAiwDialData::EAIWForcedCS );
+	        break;
+	    }
+
+	dialDataExt->SetWindowGroup( CCoeEnv::Static()->RootWin().Identifier() );
+
+	DoAIWCallL( *dialDataExt );
+
+	CleanupStack::PopAndDestroy( dialDataExt );
+	CleanupStack::PopAndDestroy( numBuf );
+	}
+
+// ---------------------------------------------------------
+// CEDPhoneCall::DoAIWCallL
+// ---------------------------------------------------------
+void CEDPhoneCall::DoAIWCallL( CAiwDialDataExt& aDialData )
+	{
+	RCriteriaArray interest;
+	CleanupClosePushL( interest );
+	CAiwCriteriaItem* criteria = CAiwCriteriaItem::NewLC( KAiwCmdCall,
+			KAiwCmdCall, KAiwContentTypeAll );
+	criteria->SetServiceClass( TUid::Uid(KAiwClassBase) );
+	User::LeaveIfError( interest.Append( criteria ) );
+
+	CAiwServiceHandler* serviceHandler = CAiwServiceHandler::NewLC();
+	serviceHandler->AttachL( interest );
+
+	CAiwGenericParamList& paramList = serviceHandler->InParamListL();
+	aDialData.FillInParamListL( paramList );
+
+	serviceHandler->ExecuteServiceCmdL( KAiwCmdCall, paramList,
+			serviceHandler->OutParamListL(), 0, NULL );
+	serviceHandler->DetachL( interest );
+
+	CleanupStack::PopAndDestroy( serviceHandler );
+	CleanupStack::PopAndDestroy( criteria );
+	CleanupStack::PopAndDestroy( &interest );
+	}
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/group/bld.inf	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build info file
+*
+*/
+
+#include <platform_paths.hrh>
+
+#include "../edcontactor/group/bld.inf"
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../rom/easydialingplugin.iby             CORE_APP_LAYER_IBY_EXPORT_PATH(easydialingplugin.iby)
+../rom/easydialingpluginresources.iby    LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(easydialingpluginresources.iby)
+
+
+../conf/easydialing.confml               APP_LAYER_CONFML(easydialing.confml)
+../conf/easydialing_200212A0.crml        APP_LAYER_CRML(easydialing_200212A0.crml)
+../cenrep/200212A0.txt                   /epoc32/data/z/private/10202be9/200212A0.txt
+../cenrep/200212A0.txt                   /epoc32/release/winscw/udeb/z/private/10202be9/200212A0.txt
+
+../inc/dialingextensioninterface.h       |../../../inc/dialingextensioninterface.h
+../inc/easydialingcommands.hrh           |../../../inc/easydialingcommands.hrh
+../inc/easydialingcrkeys.h               APP_LAYER_PLATFORM_EXPORT_PATH(easydialingcrkeys.h)
+
+../loc/easydialing.loc                   APP_LAYER_LOC_EXPORT_PATH(easydialing.loc)
+
+../data/easydialing_stub.sis              /epoc32/data/z/system/install/easydialing_stub.sis
+
+
+PRJ_EXTENSIONS
+START EXTENSION s60/mifconv
+  OPTION TARGETFILE easydialing.mif
+  OPTION HEADERFILE easydialing.mbg
+  OPTION SOURCEFILE iconlist.txt		  
+END
+
+PRJ_MMPFILES
+easydialingplugin.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/group/easydialingplugin.mmp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,132 @@
+/*
+* 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 config file
+*
+*/
+
+#include <platform_paths.hrh>
+#include "data_caging_paths.hrh"
+#include "../inc/easydialingconstants.hrh"
+
+TARGET          easydialingplugin.dll
+CAPABILITY      CAP_ECOM_PLUGIN
+
+TARGETTYPE      PLUGIN
+UID             0x10009D8D 0x200212A0 // EASYDIALING_PLUGIN_DLL_UID (Uncommented because of OST)
+VENDORID        VID_DEFAULT
+
+SOURCEPATH      ../src
+SOURCE          dllmain.cpp
+SOURCE          easydialingplugin.cpp
+SOURCE          easydialinglistbox.cpp
+SOURCE          easydialinglistboxdata.cpp
+SOURCE          easydialinglistboxitemdrawer.cpp
+SOURCE          easydialinglistboxview.cpp
+SOURCE	        easydialingcenreplistener.cpp
+SOURCE          easydialingcontactdata.cpp
+SOURCE          easydialingcontactdatamanager.cpp
+SOURCE          easydialingutils.cpp
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../edcontactor/inc
+USERINCLUDE     ../traces
+
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE    /epoc32/include/internal
+SYSTEMINCLUDE    /epoc32/include/ecom
+
+SOURCEPATH      ../data
+
+START RESOURCE 200212A0.rss
+    LANG    SC
+    TARGET  easydialingplugin.rsc
+END
+
+START RESOURCE easydialingpluginresources.rss
+    HEADER
+    TARGETPATH  /resource
+    TARGET      easydialingpluginresources.rsc
+	LANGUAGE_IDS
+END
+
+
+// Symbian framework libraries
+
+LIBRARY euser.lib
+LIBRARY ECom.lib
+LIBRARY cone.lib
+LIBRARY avkon.lib
+LIBRARY eikcore.lib
+LIBRARY eikctl.lib
+LIBRARY eikcoctl.lib
+LIBRARY bafl.lib
+LIBRARY gdi.lib 
+LIBRARY egul.lib
+LIBRARY	efsrv.lib
+LIBRARY	ws32.lib
+LIBRARY fbscli.lib
+LIBRARY bitgdi.lib
+LIBRARY	etext.lib
+
+// Avkon, Avkon skin and Avkon layout libraries.
+LIBRARY aknicon.lib
+LIBRARY aknlistloadertfx.lib
+LIBRARY aknskins.lib 
+LIBRARY aknskinsrv.lib 
+LIBRARY aknswallpaperutils.lib
+LIBRARY aknlayout2scalable.lib
+LIBRARY cdlengine.lib
+LIBRARY aknlayout2.lib
+
+// AIW library
+LIBRARY servicehandler.lib
+
+// Predictive search libraries
+LIBRARY PcsUtils.lib
+LIBRARY PsServerClientAPI.lib
+
+// Virtual phonebook library
+LIBRARY VPbkEng.lib
+
+// Phonebook engine
+LIBRARY	pbkeng.lib
+
+// ECE Communication launcher library
+LIBRARY ccaclient.lib
+
+// Central repository
+LIBRARY centralrepository.lib   
+LIBRARY commonengine.lib
+LIBRARY cenrepnotifhandler.lib 
+
+// CPbk2ImageManager
+LIBRARY pbk2presentation.lib
+
+// bitmap handling
+LIBRARY bitmaptransforms.lib
+
+// Easy dialing own contactor module.
+LIBRARY edcontactor.lib
+
+// Service provider settings api
+LIBRARY serviceprovidersettings.lib
+
+// CMS library used for getting information about contacts.
+//LIBRARY 		  cmsclient.lib
+
+// Libraries used for R&D purposes only
+DEBUGLIBRARY flogger.lib
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/group/iconlist.txt	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,3 @@
+-c8,8 qgn_indi_org_arrow_right.svg
+-c8,8 qgn_indi_org_arrow_left.svg
+-c8,8 qgn_indi_org_arrow_down.svg
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/dialingextensioninterface.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,228 @@
+/*
+* 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:  Ecom interface header
+*
+*/
+
+#ifndef __CDIALEREXTENSIONINTERFACE_H
+#define __CDIALEREXTENSIONINTERFACE_H
+
+#include <easydialingcommands.hrh>
+
+#include <ecom/ecom.h>
+#include <coecntrl.h>
+#include <eikmenup.h>
+
+
+/** UID of dialing extension ECom interface. */
+const TUid KEasyDialingPluginInterfaceUID = { 0x200212A1 };
+
+/** UID of easy dialing plugin. */
+const TUid KEasyDialingPluginImplementationUID = { 0x200212A0 };
+
+/**
+ * Observer class for easy dialing.
+ */
+class MDialingExtensionObserver
+    {
+public:
+    
+    /**
+     * Identifiers for easy dialing events.
+     */
+    typedef enum TEvent_enum
+        {
+        
+        /** Contact search has completed. */
+        ESearchComplete = 1,
+        
+        /** Easy dialing has gained or given up the focus. */
+        EFocusChanged,
+        
+        /** Easy dialing has started communication launcher (a.k.a. contact view) */
+        ECCALauncherStarted,
+        
+        /** Communication launcher a.k.a. contact view has been close. */
+        ECCALauncherExit,
+        
+        /** Easy dialing feature has been switched on. */
+        EEasyDialingEnabled,
+        
+        /** Easy dialing feature has been switched off. */
+        EEasyDialingDisabled,
+        
+        /** User has started communication (SMS, IM, E-mail ...). Not used for phone calls. */
+        ECommunicationStarted,
+        
+        /** User has cancelled communication once started. */
+        ECommunicationCancelled
+       
+        } TEvent;
+
+
+    /**
+     * Handles event from easy dialing plugin.
+     * 
+     * @param aEvent    Event id.
+     * 
+     */
+    virtual void HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent ) = 0;
+    };
+
+
+
+
+/**
+ * Easy dialing plugin class.
+ */
+
+class CDialingExtensionInterface : public CCoeControl
+    {
+public:
+    
+    /**
+     * Creates an instance of plugin.
+     */
+    static CDialingExtensionInterface* NewL();
+
+
+    /**
+     * Destructor.
+     */
+    virtual ~CDialingExtensionInterface();
+    
+    
+    /**
+     * Does the rest of the initialization of the plugin.
+     * Must be called after NewL before using any other 
+     * functions of the plugin.
+     * 
+     * @param aParent   Parent container of the plugin.
+     */
+    virtual void InitializeL( CCoeControl& aParent ) = 0;
+    
+
+    /**
+     * Resets the previous search results. 
+     */
+    virtual void Reset() = 0;
+    
+        
+    /**
+     * Adds an observer to the plugin.
+     * 
+     * @param aObserver Observer to be added.
+     */
+    virtual void AddObserverL( MDialingExtensionObserver* aObserver ) = 0;
+   
+    
+    /**
+     * Removes an observer from the plugin.
+     * 
+     * @param aObserver Observer to be removed.
+     */
+    virtual void RemoveObserver( MDialingExtensionObserver* aObserver ) = 0;
+
+    
+    /**
+     * Sets input string (search string) to plugin.
+     * 
+     * @param aDesC Input string descriptor.
+     */
+    virtual void SetInputL( const TDesC& aDesC ) = 0;
+
+
+    /**
+     * Gets the resource id of plugin's control button area resource.
+     * 
+     * @return  Resource id.
+     */
+    virtual TInt CbaResourceId( ) = 0;
+    
+    
+    /**
+     * Gets the resource id of plugin's menu bar resource.
+     * 
+     * @return  Resource id.
+     */
+    virtual TInt MenuResourceId() = 0;
+    
+    
+    /**
+     * Gets the resource id of plugin's menu bar resource.
+     * 
+     * @param   aMenuPane   Menu pane
+     * @param   aMenuResourceId Menu bar resource id.
+     * @return  Resource id.
+     */
+    virtual TBool InitializeMenuPaneL( CEikMenuPane& aMenuPane, TInt aMenuResourceId ) = 0;
+
+    
+    /**
+     * Gets the resource id of plugin's menu bar resource.
+     * 
+     * @param   aCommand   Command id.
+     * @return  ETrue if command was handled, EFalse otherwise.
+     */
+    virtual TBool HandleCommandL( TInt aCommand ) = 0;
+
+    
+    /**
+     * Tells if extension is currently enabled from settings.
+     * @return  ETrue if extension is enabled, EFalse otherwise.
+     */
+    virtual TBool IsEnabled() = 0;
+    
+private: // data
+
+    /** ECom instance identifier key. */
+    TUid iDestructorIDKey;
+    };
+
+
+
+// INLINE FUNCTIONS
+
+// -----------------------------------------------------------------------------
+// CDialingExtensionInterface::NewL
+//
+// -----------------------------------------------------------------------------
+//
+inline CDialingExtensionInterface* CDialingExtensionInterface::NewL()
+    {
+    // TEComResolverParams resolverParams; // data passed to the plugin
+    // resolverParams.SetDataType();    // no data yet
+
+    TAny* ptr = REComSession::CreateImplementationL( KEasyDialingPluginImplementationUID,
+                                                     _FOFF( CDialingExtensionInterface, iDestructorIDKey )
+                                                     // resolverParams 
+                                                    );
+
+    return STATIC_CAST( CDialingExtensionInterface*, ptr );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CDialingExtensionInterface::~CDialingExtensionInterface()
+//
+// -----------------------------------------------------------------------------
+//
+inline CDialingExtensionInterface::~CDialingExtensionInterface()
+    {
+    REComSession::DestroyedImplementation( iDestructorIDKey );
+    }
+    
+#endif //__CDIALEREXTENSIONINTERFACE_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingcenreplistener.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,107 @@
+/*
+* 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:  Grid for easy dialing action menu.
+*
+*/
+
+
+#ifndef __EASYDIALINGCENREPLISTENER_H__
+#define __EASYDIALINGCENREPLISTENER_H__
+
+//  INCLUDES
+#include <e32base.h>
+#include <cenrepnotifyhandler.h> // link against commonengine.lib
+
+// FORWARD DECLARATIONS
+class CRepository;
+class CenRepNotifyHandler;
+class MEasyDialingCenrepListenerObserver;
+
+// CLASS DECLARATION
+
+/**
+*  Central Repository event monitor
+*/
+class CEasyDialingCenrepListener
+    : public CBase, public MCenRepNotifyHandlerCallback
+{
+    public:  // Constructors and destructor
+
+        /**
+        * Static constructor. Construct a CEasyDialingCenrepListener
+        * using two phase construction, and return a pointer to the created object.
+        * @param    aObserver   Pointer to observer.
+        * @return   Created object.
+        */
+        static CEasyDialingCenrepListener* NewL(MEasyDialingCenrepListenerObserver* aObserver);
+        
+        /**
+        * Destructor. Destroy the object and release all memory objects
+        */
+        virtual ~CEasyDialingCenrepListener();
+
+    public:
+
+        /**
+        * Gets the easydialing on/off cenrep key value
+        * @return   The key value
+        */
+        TInt Value();
+        
+        /**
+         * Sets the easydialing on/off cenrep key value
+         * @param aValue Value to be set.
+         */
+        void SetEasyDialingSettingsValue( const TInt aValue );        
+        
+        /**
+         * Handles cenrep notifications.
+         * @param   Id of the changed key.
+         */
+       void HandleNotifyGeneric( TUint32 aId );
+              
+    private:
+
+        /**
+        * Perform the first phase of two phase construction
+        * @param    aObserver   Pointer to observer
+        */
+        CEasyDialingCenrepListener(MEasyDialingCenrepListenerObserver* aObserver);
+
+        /**
+        * Second phase constructor
+        */
+        void ConstructL();
+
+    private:       
+
+        /** The central repository handle. Owned. */
+        CRepository* iClient;
+
+        /** Observer to this class. Not owned. */
+        MEasyDialingCenrepListenerObserver* iObserver;
+        
+        /** The cenrep value for easydialing setting. */
+        TInt iEasyDialingSettingValue;
+        
+        /** The cenrep value for contact thumbnail setting (shown / not shown). */
+        TInt iContactThumbnailsSettingsValue;
+     
+        /** Cenrep notify handler. Owned. */
+        CCenRepNotifyHandler* iNotifyHandler;
+};
+
+#endif      // __EASYDIALINGCENREPLISTENER_H__
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingcommands.hrh	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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:  Easy dialing command ids.
+*
+*/
+
+#ifndef __EASYDIALINGCOMMANDS_HRH__
+#define __EASYDIALINGCOMMANDS_HRH__
+
+/*
+ * Easy dialing commands live in the same id space with several other 
+ * enumerations. It's range is chosen so that it does not conflict these 
+ * others.
+ * 
+ * The other enumerations are:
+ * - phoneviewcommanddefinitions from 1 to currently ~200
+ * - phoneappcommands id space from 6000 upwards
+ */
+
+
+enum 
+    {
+    EEasyDialingVoiceCall = 400,
+    EEasyDialingVideoCall,
+    EEasyDialingSendMessage,
+    EEasyDialingOpenContact,
+    EEasyDialingCallHandlingActivated,
+    EEasyDialingEnterKeyAction,
+    EEasyDialingOn,
+    EEasyDialingOff,
+    EEasyDialingClosePopup
+    };
+
+#endif //__EASYDIALINGCOMMANDS_HRH__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingconstants.hrh	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,39 @@
+/*
+* 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:  Easy dialing constant definitions.
+*
+*/
+
+#ifndef __EASYDIALINGCONSTANTS_HRH__
+#define __EASYDIALINGCONSTANTS_HRH__
+
+/**
+ * Dll uid for plugin.
+ */
+#define EASYDIALING_PLUGIN_DLL_UID 0x200212A0
+
+/**
+ * Ecom interface uid plugin
+ */
+#define EASYDIALING_PLUGIN_IF_UID 0x200212A1
+
+/**
+ * Ecom implementation uid plugin. Same as DLL UID.
+ */
+#define EASYDIALING_PLUGIN_ECOM_IMPL_UID 0x200212A0
+
+#endif //__EASYDIALINGCONSTANTS_HRH__
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingcontactdata.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,159 @@
+/*
+* 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:  Easy dialing contact data manager. 
+*
+*/
+
+
+#ifndef __EASYDIALINGCONTACTDATA_H__
+#define __EASYDIALINGCONTACTDATA_H__
+
+class CFbsBitmap;
+class MVPbkContactLink;
+
+/**
+ *  Container for easy dialing contact data for one contact.
+ */
+class CEasyDialingContactData : public CBase
+    {
+public:
+    
+    /**
+    * Constructor.
+    */
+    CEasyDialingContactData(MVPbkContactLink* aContactLink);
+    
+    /**
+     * Destructor.
+     */
+    ~CEasyDialingContactData();
+    
+
+    /**
+     * Gets a pointer to contact link.
+     * @return  Pointer to contact link object.
+     */
+    MVPbkContactLink* ContactLink();
+    
+    
+    /**
+     * Get's contact's thumbnail bitmap.
+     * @return  Pointer to bitmap object.
+     */
+    CFbsBitmap* Thumbnail();
+    
+    
+    /**
+     * Setting function for contact thumbnail.
+     * @param   aThumnail   Thumbnail to set.
+     */
+    void SetThumbnail(CFbsBitmap* aThumbnail);
+    
+    
+    /**
+     * Get favourite status of the contact.
+     * @return  ETrue, if contact is a favourite, EFalse otherwise.
+     */
+    TBool Fav();
+    
+    
+    /**
+     * Sets favourite status of the contact.
+     * @param   aFav    Boolean value containing the status.
+     */
+    void SetFav(TBool aFav);
+    
+    
+    /**
+     * Returns the loading status of the contact.
+     * @return  ETrue, if contact data loading has completed, EFalse otherwise.
+     */
+    TBool IsLoaded();
+    
+    
+    /**
+     * Sets loading status to complete.
+     */
+    void LoadingComplete();
+
+    
+    /**
+     * Deletes the thumbnail image of the contact.
+     */
+    void DeleteThumbnail();
+    
+    
+    /**
+     * Return ETrue if voice call is available.
+     */
+    TBool VoiceCallAvailable();
+    
+    
+    /**
+     * Sets voice call availability status.
+     * @param   aVailable   Availability of voice call.
+     */
+    void SetVoiceCallAvailable( TBool aVailable );
+    
+    
+    /**
+     * Return ETrue if video call is available.
+     */
+    TBool VideoCallAvailable();
+    
+    
+    /**
+     * Sets video call availability status.
+     * @param   aVailable   Availability of video call.
+     */
+    void SetVideoCallAvailable( TBool aVailable );
+    
+    
+    /**
+     * Return ETrue if uni-editor (SMS, MMS, e-mail) is available.
+     */
+    TBool UniEditorAvailable();
+    
+    
+    /**
+     * Sets uni-editor availability status.
+     * @param   aVailable   Availability of uni-editor.
+     */
+    void SetUniEditorAvailable( TBool aVailable );
+    
+private:
+    
+    /** Contact link. Owned. */
+    MVPbkContactLink* iContactLink;
+    
+    /** Thumbnail bitmap. Owned. */
+    CFbsBitmap* iThumbnail;
+
+    /** ETrue if this is a favourite contact. */
+    TBool iFav;
+       
+    /** ETrue is asynchronous loading of contact data is complete.  */
+    TBool iLoaded;
+       
+    /** ETrue if voice call is a possible action with this contact. */
+    TBool iVoiceCallAvailable;
+    
+    /** ETrue if video call is a possible action with this contact. */
+    TBool iVideoCallAvailable;
+
+    /** ETrue if SMS or MMS is a possible action with this contact. */
+    TBool iUniEditorAvailable;
+    };
+
+#endif //__EASYDIALINGCONTACTDATA_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingcontactdatamanager.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,322 @@
+/*
+* 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:  Easy dialing contact data manager.
+*
+*/
+
+
+#ifndef __EASYDIALINGCONTACTDATAMANAGER_H__
+#define __EASYDIALINGCONTACTDATAMANAGER_H__
+
+#include <MPbk2ImageOperationObservers.h>
+#include <MVPbkSingleContactOperationObserver.h>
+#include <MVPbkContactStoreObserver.h>
+#include <MVPbkOperationObserver.h>
+#include <MVPbkContactViewBase.h>
+#include <CPbkContactEngine.h>  // for TPbkNameOrder
+#include <TPbk2ImageManagerParams.h>
+#include "easydialingcontactdata.h"
+
+// FORWARD DECLARATIONS
+class CVPbkContactManager;
+class MContactDataManagerObserver;
+class MVPbkFieldType;
+class CPbk2ImageManager;
+class CVPbkTopContactManager;
+class CRepository;
+
+/**
+ *  CEasyDialingContactDataManager
+ *  Handles the loading and storing of thumbnail bitmaps
+ */
+class CEasyDialingContactDataManager : 
+        public CBase,
+        public MPbk2ImageGetObserver,
+        public MVPbkSingleContactOperationObserver,
+        public MVPbkContactStoreObserver,
+        public MVPbkOperationErrorObserver,
+        public MVPbkOperationResultObserver<MVPbkContactViewBase*>
+        
+    {
+public:
+    
+    
+    /**
+    * Constructor.
+    */
+    CEasyDialingContactDataManager(CVPbkContactManager* aContactManager);
+    
+    
+    /**
+     * Destructor.
+     */
+    ~CEasyDialingContactDataManager();
+    
+    
+    /**
+     * Second phase constructor of the class.
+     */
+    void ConstructL();
+    
+    /**
+    * Sets the observer. Observer is notified when thumbnail loading is complete
+    * @param aObserver
+    */
+    void SetObserver(MContactDataManagerObserver* aObserver);
+    
+    /**
+    * Sets the size of the thumbnails. If the loaded thumbnail is larger than
+    * the set size, thumnail is scaled to the size. If the set size is different
+    * from the old one, deletes all loaded thumbnails, which causes them to be
+    * reloaded when they are needed the next time.
+    * @param aSize The size of the thumbnails
+    */
+    void SetThumbnailSize(const TSize& aSize);
+    
+    /**
+    * Gets an id string for the thumbnail, if thumbnail exists for the contact.
+    * Used when the listbox items are created.
+    * @param aContact Contact link
+    * @param aMatchThumbnail If true, tries to match the link to the existing thumbnails
+    * @param aFav Is this contact a favourite
+    * @return id string. caller needs to delete this.
+    */
+    HBufC* GetThumbnailIdL( MVPbkContactLink* aContact, TBool aMatchThumbnail, TBool aFav );
+    
+    /**
+    * Gets the thumbnail for a contact item. If thumbnail is not loaded, starts
+    * loading it.
+    * @param aContact Contact link
+    * @param aThumbnail Outparam. Contact thumbnail. NULL if contact doesn't have thumbnail
+    * @param aFav Outparam. Favourite status
+    * @return true if contact data has been loaded
+    */
+    TBool GetThumbnailAndFav(const TDesC& aId, CFbsBitmap*& aThumbnail, TBool& aFav);
+    
+    /**
+    * Deletes all loaded thumbnails and cancel asynchronous operations.
+    */
+    void Reset();
+    
+    /**
+    * Returs ETrue if voice call is available for current contact.
+    */
+    TBool VoiceCallAvailable( TInt aIndex );
+    
+    
+    /**
+    * Returs ETrue if video call is available for current contact.
+    */
+    TBool VideoCallAvailable( TInt aIndex );
+    
+    
+    /**
+    * Returs ETrue if uni-editor is available for current contact.
+    */
+    TBool UniEditorAvailable( TInt aIndex );
+    
+    
+    /**
+    * Returns HBufC8 descriptor containing MVPbkContactLink
+    * link packaged.
+    */
+    HBufC8* ContactLinkLC( TInt aIndex );
+    
+    
+    /**
+     * Sets the iContactThumbnailSetting member variable to either true or false 
+     * which is read and if it is false then thumbnails are not shown 
+     * @param aContactThumbnailSetting which is cenrep value for ContactThumbnailSetting
+     */
+    void SetContactThumbnailSetting( TInt aContactThumbnailSetting );
+    
+    /**
+     * Gets the iContactThumbnailSetting member variable to either true or false 
+     * which is read and if it is false then thumbnails are not shown 
+     * returns iContactThumbnailSetting which is cenrep value for ContactThumbnailSetting
+     */
+    TBool GetContactThumbnailSetting( );
+    
+
+    /**
+    * Flushes the asynchronous contact data of all contacts.
+    */    
+    void Reload();
+    
+    /**
+    * Checks if contact link is a favourite. This is meant to be used for contacts that
+    * don't yet have contact data item. Since this needs to go through all the favourites,
+    * unnecessary calls should be avoided.
+    */    
+    TBool IsFavL( MVPbkContactLink* aLink );
+    
+    /**
+    * @return the number of favourites in contact db
+    */
+    TInt NumberOfFavsL();
+    
+    /**
+    * Creates contact link to a favourite contact.
+    * @param aIndex Index of the favourite in favourites view
+    * @return the newly created link (added to cleanupstack)
+    */
+    MVPbkContactLink* FavLinkLC( TInt aIndex );
+
+    /**
+    * Creates contact string for favourite contact. This string can be used directly
+    * in the contact listbox. F.ex. "Firstname Surname\tCompanyname".
+    * @param aIndex Index of the favourite in favourites view
+    * @param aNameOrder Name ordering to be used
+    * @return the newly created string (added to cleanupstack)
+    */
+    HBufC* FavContactStringLC( TInt aIndex, CPbkContactEngine::TPbkNameOrder aNameOrder );
+
+public:
+    
+    
+    /**
+     * From MPbk2ImageGetObserver.
+     */
+    void Pbk2ImageGetComplete(MPbk2ImageOperation& aOperation, CFbsBitmap* aBitmap);
+    
+    
+    /**
+     * From MPbk2ImageGetObserver.
+     */
+    void Pbk2ImageGetFailed(MPbk2ImageOperation& aOperation, TInt aError);
+
+private: 
+
+    
+    /**
+     * From MVPbkSingleContactOperationObserver.
+     */
+    void VPbkSingleContactOperationComplete(
+            MVPbkContactOperationBase& aOperation,
+            MVPbkStoreContact* aContact );
+
+    
+    /**
+     * From MVPbkSingleContactOperationObserver.
+     */
+    void VPbkSingleContactOperationFailed(
+            MVPbkContactOperationBase& aOperation, 
+            TInt aError );
+
+private:
+    
+    
+    /**
+     * From MVPbkContactStoreObserver.
+     */
+    void StoreReady( MVPbkContactStore& aContactStore );
+
+
+    /**
+     * From MVPbkContactStoreObserver.
+     */
+    void StoreUnavailable( MVPbkContactStore& aContactStore, TInt aReason );
+    
+    
+    /**
+     * From MVPbkContactStoreObserver.
+     */
+    void HandleStoreEventL( MVPbkContactStore& aContactStore, 
+            TVPbkContactStoreEvent aStoreEvent );
+
+private:
+    /**
+     * From MVPbkOperationErrorObserver.
+     */
+    void VPbkOperationFailed(
+            MVPbkContactOperationBase* aOperation,
+            TInt aError );
+
+private:
+    /**
+     * From MVPbkOperationResultObserver.
+     */
+    void VPbkOperationResultCompleted(
+            MVPbkContactOperationBase* aOperation,
+            MVPbkContactViewBase* aOperationResult );
+
+private:
+       
+    void InitReady();
+    
+    TInt FindContactIndex( MVPbkContactLink* aContact );
+    
+    void LoadNextContactDataL();
+    
+    void DoHandleImageGetCompleteL(CFbsBitmap* aBitmap, TInt aIndex);
+    
+    void HandleError(TInt aError);
+    
+    void DoHandleContactOperationCompleteL( MVPbkStoreContact* aContact, TInt aIndex);
+    
+    void GetAvailableServicesL( MVPbkStoreContact* aContact, TInt aIndex );
+    
+    void InformObserver();
+
+private:
+    /** Array that contains all loaded contact data. Owned. */
+    RPointerArray<CEasyDialingContactData> iContactDataArray;
+
+    /** Array that contains indexes of thumbnails that are waiting to be loaded. Owned. */
+    RArray<TInt> iWaitingContacts;
+
+    /** Phonebook image manager. Owned. */
+    CPbk2ImageManager* iImageManager;
+    
+    /** Parameters for image manager. Contains info about the size of thumbnails. */
+    TPbk2ImageManagerParams iImageManagerParams;
+    
+    /** Field type. Not owned. */
+    const MVPbkFieldType* iThumbnailFieldType;
+    
+    /** Image loading operation. Owned. */
+    MPbk2ImageOperation* iImageOperation;
+    
+    /** Contact item for which a thumbnail is being loaded. Owned. */
+    MVPbkStoreContact* iStoreContact;
+    
+    /** Virtual phonebook contact manager. Not owned. */
+    CVPbkContactManager* iContactManager;
+
+    /** Contact data manager observer. Not owned. */
+    MContactDataManagerObserver* iObserver;
+
+    /** Top (i.e. favourite) contacts manager. Owned. */
+    CVPbkTopContactManager* iVPbkTopContactManager;
+    
+    /** Virtual phonebook operation handle. Owned. */
+    MVPbkContactOperationBase* iContactOperation;
+
+    /** Default contact store. Not owned. */
+    MVPbkContactStore* iContactStore;
+    
+    /** Variable which tells either to show or hide contact thumbnails. */
+    TBool iContactThumbnailSetting;
+    
+    /** ETrue if asynchronous opening of the contac store is ready. */
+    TBool iStoreReady;
+    
+    /** View to vpbk containing all favourite contacts. Owned. */
+    MVPbkContactViewBase* iFavsView;
+        
+    /** Virtual phonebook operation handle for getting favourites. Owned. */
+    MVPbkContactOperationBase* iFavsOperation;
+    };
+
+#endif //__EASYDIALINGTHUMBNAILMANAGER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingcrkeys.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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:  Easy dialing central repository keys.
+*
+*/
+
+
+#ifndef __EASYDIALINGCRKEYS_H__
+#define __EASYDIALINGCRKEYS_H__
+
+#include <e32cmn.h>
+
+/**
+* Easydialing settings CR UID (same as easydialing DLL uid)
+*/
+const TUid KCRUidEasyDialSettings = {0x200212A0};
+
+/**
+* Easydialing on/off
+*
+* Possible values are:
+* 0 = Easydialing is off
+* 1 = Easydialing is on
+*/
+const TUint32 KEasyDialing = 0x00000001;
+
+/**
+* Easydialing Contact Thumbnails show/hide
+* Possible values are:
+* 0 = Thumbnails are hidden
+* 1 = Thumbnails are shown
+*/
+const TUint32 KEasyDialingContactThumbnails = 0x00000002;
+
+#endif //__EASYDIALINGCRKEYS_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialinglistbox.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,202 @@
+/*
+* 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:  Easy dialing listbox.
+*
+*/
+
+
+#ifndef _EASYDIALINGLISTBOX_H
+#define _EASYDIALINGLISTBOX_H
+
+// INCLUDE FILES
+#include "easydialinglistboxview.h"
+#include "easydialinglistboxitemdrawer.h"
+#include "easydialinglistboxdata.h"
+#include <aknlists.h>
+#include <aknlongtapdetector.h>
+
+// CONSTANTS
+
+// Easy dialing specific listbox events
+const TInt KEasyDialingContactSelected( 0x1001 );
+const TInt KEasyDialingContactLongTapped( 0x1002 );
+
+// FORWARD DECLARATIONS
+
+class CEasyDialingListBoxItemDrawer;
+class CAknsFrameBackgroundControlContext;
+class CEasyDialingContactDataManager;
+class CAknLongTapDetector;
+class CAknPointerEventSuppressor;
+
+// CLASS DECLARATIONS
+
+/*
+ * ==============================================================================
+ * 
+ * CEasyDialingListBox
+ * 
+ * ==============================================================================
+ */
+
+class CEasyDialingListBox : public CEikFormattedCellListBox, 
+                            public MAknLongTapDetectorCallBack
+    {   
+public:
+    
+    /**
+    * Constructor.
+    */
+    CEasyDialingListBox();
+    
+    /**
+    * Destructor.
+    */
+    ~CEasyDialingListBox();
+    
+    /**
+    * Second phase constructor.
+    * @param    aFlags  Listbox flags.
+    * @param    aContactDataManager Pointer to contact data manager
+    */
+    void ConstructL( TInt aFlags, 
+            CEasyDialingContactDataManager* aContactDataManager );
+
+    /**
+    * From CEikFormattedCellListBox.
+    */
+    virtual CListBoxView* MakeViewClassInstanceL();
+    
+    /**
+    * From CEikFormattedCellListBox.
+    */
+    CEasyDialingListBoxItemDrawer* ItemDrawer() const;
+    
+    /**
+    * From CEikFormattedCellListBox.
+    */
+    void Draw(const TRect& aRect) const;
+    
+    /**
+    * From CEikFormattedCellListBox.
+    */
+    void HandleResourceChange(TInt aType);
+    
+    /**
+    * From CCoeControl
+    */
+    void MakeVisible(TBool aVisible);
+    
+    /**
+    * From CCoeControl
+    */
+    void HandlePointerEventL(const TPointerEvent& aPointerEvent);
+    
+    /**
+     * The the rectangle within which the listbox must always fit.
+     * @param   aMaxRect   The largest allowed rect size, given in
+	 *                     screen relative coordinate system.
+     */
+    void SetMaxRect( TRect aMaxRect );
+    
+    /**
+     * Adjusts the control rect according to amount of visible contacts. 
+     * @param   aNumberOfNames  Number of contact to which to adjust.
+     */
+    void SetRectToNumberOfItems( TInt aNumberOfNames );
+    
+    
+    /**
+     * Puts list box control into focus, and moved the focus highlight
+     * to the appropriate item.
+     * @param   aKeyEvent   key event
+     * @param   aType       key event type
+     * @return  Whether the key was handled or not.
+     */
+    TKeyResponse SetFocusedWithKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+
+    
+    /**
+    * Gets the height of the listbox based on the number of items.
+    * @param    aNum    Number of items.
+    */
+    TInt GetHeightBasedOnNumberOfItems( TInt aNum ) const;
+    
+    /**
+     * Gets the contact index of the currently selected contact item.
+     * Contact index points to contact data object in 
+     * CEasyDialingContactDataManager. 
+     * @return  Contact data manager index.
+     */
+    TInt CurrentContactDataIndex();
+    
+    /**
+     * Return contact link of current item packaged in HBufC object. 
+     * @return  Contact link.
+     */
+    HBufC8* CurrentContactLinkLC();
+    
+public:
+    /**
+     * From MAknLongTapDetectorCallBack
+     */
+    void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation );
+    
+protected:
+    
+    /**
+    * From CEikFormattedCellListBox.
+    */
+    virtual void FocusChanged(TDrawNow aDrawNow);
+        
+    /**
+    * From CEikFormattedCellListBox.
+    */
+    virtual void CreateItemDrawerL();
+    
+    /**
+    * From CEikFormattedCellListBox.
+    */
+    virtual void SizeChanged();
+        
+    /**
+    * From CCoeControl
+    */
+    TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+    
+private:
+    
+    /** Background control context. Owned. */
+    CAknsFrameBackgroundControlContext* iBGContext;
+        
+    /** Pointer to a contact data manager; Not Own. */
+    CEasyDialingContactDataManager* iContactDataManager;
+    
+    /** Number of matching contacts. */
+    TInt iNumberOfNames;
+    
+    /** Maximum size rectangle. */
+    TRect iMaxRect;
+    
+    /** Detector for Long Tap event; Owned. */
+    CAknLongTapDetector* iLongTapDetector;
+    
+    /** Flag set when long pointer press has been handled after latest pointer down event.*/
+    TBool iPointerLongPressHandled;	
+    };
+    
+#endif // _EASYDIALINGLISTBOX_H
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialinglistboxdata.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,216 @@
+/*
+* 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:  Easy dialing listbox data.
+*
+*/
+
+
+#ifndef _EASYDIALINGLISTBOXDATA_H
+#define _EASYDIALINGLISTBOXDATA_H
+
+
+// INCLUDE FILES
+#include <aknlists.h>
+
+// CONSTANTS
+
+/*
+ * Matching highlight separator character is used in listbox model to separate
+ * matching and non-matching charaters. 0x1F is chosen for this because
+ * it is a control character "INFORMATION SEPARATOR ONE" of ASCII set. 
+ * User of the listbox must use this character in creating list box item 
+ * strings.
+ */
+// FORWARD DECLARATIONS
+class CEasyDialingListBox;
+class CEasyDialingContactDataManager;
+
+// CLASS DECLARATIONS
+
+/*
+ * Easy dialing listbox data class.
+ */
+
+class CEasyDialingListBoxData : public CFormattedCellListBoxData
+    {
+public:
+    
+    class TExtendedColors : public CFormattedCellListBoxData::TColors 
+        {
+        public:
+            
+            TExtendedColors();
+    
+            /** The matching text colour. */
+            TRgb iMatchingText;
+    
+            /** The matching background colour. */
+            TRgb iMatchingBack;
+    
+        };
+    
+    
+    /**
+    * Constructor.
+    */
+    CEasyDialingListBoxData();
+       
+    /**
+     * Destructor
+     */
+    ~CEasyDialingListBoxData();
+       
+    /**
+    * Second phase constructor of the class.
+    * @return   Pointer to the instance. 
+    */
+    static CEasyDialingListBoxData* NewL();
+     
+    /**
+    * Draws selected item.
+    */
+    void DrawData(
+        const TListItemProperties& aItemProperties, 
+        CWindowGc& aGc,
+        const TDesC* aText,
+        const TRect& aRect,
+        TBool aHighlight,
+        const TExtendedColors& aColors ) const;
+     
+    /**
+    * Draws selected item highlight.
+    * @param    aGc         Graphics context.
+    * @param    aItemRect   Item rectangle.
+    */
+    void DrawHighlight( CWindowGc &aGc, const TRect &aItemRect ) const;
+    
+    /**
+    * Sets the contact data manager. Must be set before using the listbox.
+    * @param    aContactDataManager Contact data manager.
+    */
+    void SetContactDataManager( CEasyDialingContactDataManager* aContactDataManager );
+
+    /**
+    * Sets a pointer to listbox class. Called from listbox constructor.
+    * @param    aControl    Pointer to easy dialing listbox cotrol.
+    */
+    void SetEDLBXControl( CEasyDialingListBox* aControl );
+    
+    /**
+     * Handle change in list item size
+     */
+    void HandleItemSizeChange();
+    
+protected:
+        
+    void ConstructLD();
+   
+private:
+    
+    /**
+    * Determines fonts for contact name and company name.
+    * The font sizes are determined based on list box item height.
+    * This function must be called once before any drawing routines are 
+    * done.
+    * @param    aItemHeight List box item height
+    */
+    void ObtainFonts( TInt aItemHeight );
+    
+    /**
+     * Update the color bitmap used for fallback graphics for the Action Menu arrow according to 
+     * size changes in listbox control.
+     * @param   aSize   New size.
+     */
+    void UpdateColorBitmapL( const TSize& aSize );
+    
+    /**
+    * Draws the data for one list item.
+    * @param    aProperties List item property structure.
+    * @param    aGc Graphics context.
+    * @param    aText   String containing  list item data information.
+    * @param    aItemRect   Item rectangle.
+    * @param    aHighlight  ETrue if the item has highlight, EFalse otherwise.
+    * @param    aColors Structure containing used colors.
+    */
+    void DrawDataFormatted( 
+        TListItemProperties aProperties,
+        CWindowGc& aGc,
+        const TDesC* aText,
+        const TRect& aItemRect,
+        TBool aHighlight,
+        const TExtendedColors& aColors ) const;
+
+    /**
+     * Draws the Contact Thumbnail Icon if any else draws the dummy contact thumbnail.
+     * @param   aGc Graphics context.
+     * @param   aBoundingBox    Rectangle containing bounds for contact thumbnail.
+     * @param   aDescId Descriptor containing contact id.
+     */
+    TBool ContactThumbnailDrawing(
+            CWindowGc& aGc,
+            TRect aBoundingBox,
+            TPtrC aDescId) const;
+    
+    /**
+     * Draws the Action Menu.
+     * @param   aGc Graphics context.
+     * @param   aActionMenuArrowRect    Rectangle where arrow is to be drawn.
+     */ 
+    void DrawArrowIcon( CWindowGc& aGc, TRect aActionMenuArrowRect ) const;
+    
+    /**
+     * Draws the Favourite Icon. Takes the name rect as a parameter. Name rect
+     * must be unmirrored, because the mirroring is done as the last thing
+     * before drawing.
+     * @param   aGc Graphics context.
+     * @param   aNameRectUnMirrored Name rect, where fav star is contained
+     * @param   aTextWidth The width of the name
+     * @param   aEffectiveRect The whole listbox item rect. Used for mirroring.
+     */
+    void DrawFavouriteIcon(
+            CWindowGc& aGc, 
+            TRect aNameRectUnMirrored,
+            TInt aTextWidth,
+            TRect aEffectiveRect) const;
+    
+private:
+    
+    /** Font to be used showing contact name. Not owned. */
+    CFont* iContactNameFont;
+    
+    /** Font to be used showing company name. Not owned. */ 
+    CFont* iCompanyNameFont;
+    
+    /** Handle for loading and storing the thumbnails. Not owned.*/ 
+    CEasyDialingContactDataManager* iContactDataManager;
+        
+    /** Action Menu LeftPointing Arrow for mirrored layout. Owned. */
+    CGulIcon* iArrowPointingRight;
+    
+    /** Action Menu RightPointing Arrow. Owned. */
+    CGulIcon* iArrowPointingLeft;
+
+    /** Action icon color bitmap. Owned. */
+    CFbsBitmap* iColorBitmap;
+
+    /** Default image for contacts with no own thumbnail. Owned. */
+    CGulIcon* iDummyThumbnail;
+    
+    /** Pointer to listbox. Not owned. */
+    CEasyDialingListBox* iControl;
+    };
+
+
+#endif // _EASYDIALINGLISTBOXDATA_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialinglistboxitemdrawer.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,112 @@
+/*
+* 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:  Easy dialing listbox list item drawer.
+*
+*/
+
+
+#ifndef _EASYDIALINGLISTBOXDRAWER_H
+#define _EASYDIALINGLISTBOXDRAWER_H
+
+
+// INCLUDE FILES
+#include <aknlists.h>
+
+// FORWARD DECLARATIONS
+
+class CEasyDialingListBoxData;
+
+// CLASS DECLARATIONS
+
+/*
+ * Easy dialing list item drawer.
+ */
+
+class CEasyDialingListBoxItemDrawer : public CFormattedCellListBoxItemDrawer
+    {
+public:
+    
+    /**
+    * Constructor.
+    * @param aTextListBoxModel Listbox mode.
+    * @param aFont  Font parameter required by super class constructor.
+    * @param aFormattedCellData List box data pointer.
+    */
+    CEasyDialingListBoxItemDrawer(
+            MTextListBoxModel* aTextListBoxModel, 
+            const CFont* aFont, 
+            CFormattedCellListBoxData* aFormattedCellData);
+   
+    /**
+    * Returns pointer to item data.
+    */
+    CEasyDialingListBoxData* EasyDialingCellData() const;
+
+    /**
+    * Draws item.
+    * @param    aItemIndex  Index of the item.
+    * @param    aItemRectPos    Position of the item.
+    * @param    aItemIsSelected ETrue if item is selected, EFalse otherwise.
+    * @param    aItemIsCurrent  ETrue if this item is the current item.
+    * @param    aViewIsEmphasized ETrue if item is emphasized.
+    * @param    aViewIsDimmed   ETrue if item is dimmed.
+    */
+    void DrawItem(
+            TInt aItemIndex, 
+            TPoint aItemRectPos, 
+            TBool aItemIsSelected, 
+            TBool aItemIsCurrent, 
+            TBool aViewIsEmphasized, 
+            TBool aViewIsDimmed) const;
+
+    /**
+    * Draws data content of the item. Not just text but
+    * but any content.
+    * @param    aItemIndex  Index of the item.
+    * @param    aItemTextRect   Rectangle of the item.
+    * @param    aItemIsCurrent  ETrue is the item is currently selected item.
+    * @param    aViewIsEmphasized   ETrue if the item is emphasized.
+    * @param    aItemIsSelected ETrue if item is selected.
+    */
+    void DrawItemText( 
+            TInt aItemIndex,
+            const TRect& aItemTextRect,
+            TBool aItemIsCurrent,
+            TBool aViewIsEmphasized,
+            TBool aItemIsSelected ) const;
+    
+    /**
+    * Finds proper listbox colors from theme and makes them active.
+    */
+    void SetColors();
+
+protected:
+    
+    /**
+    * Draws background of list item.
+    * @param    aItemTextRect   Item rectangle.
+    */
+    void DrawBackgroundAndSeparatorLines( const TRect& aItemTextRect ) const;
+    
+protected:
+    
+    /** The matching text colour. */
+    TRgb iMatchingText;
+
+    /** The matching text background colour. */
+    TRgb iMatchingBack;    
+    };
+
+
+#endif // _EASYDIALINGLISTBOXDRAWER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialinglistboxview.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* 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:  Easy dialing list box view.
+*
+*/
+
+#ifndef _EASYDIALINGLISTBOXVIEW_H
+#define _EASYDIALINGLISTBOXVIEW_H
+
+// INCLUDE FILES
+#include <aknlists.h>
+
+// CLASS DECLARATIONS
+
+/*
+ * Easy dialing listbox view.
+ */
+
+class CEasyDialingListBoxView : public CFormattedCellListBoxView
+    {
+public:
+    
+    /**
+    * Sets current index value to outside-of-range value. After this, no
+    * item in the listbox is highlighted. 
+    */
+    void SetCurrentItemIndexToNone();
+    };
+    
+    
+#endif // _EASYDIALINGLISTBOXVIEW_H
+    
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialinglogger.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,98 @@
+/*
+* 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:  Easy dialing logging functions.
+*
+*/
+
+
+#ifndef __EASYDIALINGLOGGER_H__
+#define __EASYDIALINGLOGGER_H__
+
+// Note! These macros are to be used in trace prints (legacy support).
+//       To be used only in error situations and major events only !
+//       Otherwise use OST - Open System Trace
+
+#ifdef _DEBUG
+
+// #define USE_FILE_LOGGING
+
+// From this point on, internal implementation
+
+#include <e32svr.h>     // for RDebug::Print
+
+#ifdef USE_FILE_LOGGING
+#include <flogger.h>
+_LIT( KLogDir,  "ed" );
+_LIT( KLogFile, "easydialing.log" );
+#endif
+
+
+NONSHARABLE_CLASS(TOverflowTruncate) : public TDes16Overflow
+    {
+    public:
+        void Overflow(TDes16& /*aDes*/) {}
+    };
+
+inline void DoDebugPrintF(TRefByValue<const TDesC> aFmt, VA_LIST& aList)
+    {
+    TBuf<200> buf;
+    TOverflowTruncate overFlow;
+    buf.AppendFormatList( aFmt, aList, &overFlow );
+    _LIT(KLogPrintFormat,"%S: %S");                         // Log printing format
+    const TDesC& thname = RThread().Name();                 // With FullName more info
+    RDebug::Print( KLogPrintFormat, &thname, &buf );
+#ifdef USE_FILE_LOGGING
+    RFileLogger::Write(KLogDir, KLogFile, EFileLoggingModeAppend, buf);
+#endif
+    }
+
+inline void DebugPrintF(const TRefByValue<const TDesC> aFmt,...)
+    {
+    VA_LIST list;
+    VA_START(list,aFmt);
+    DoDebugPrintF(aFmt, list);
+    }
+
+
+// Macros
+
+#define LOGSTRING( TEXT ) DebugPrintF( _L( TEXT ) )
+#define LOGSTRING1( TEXT, VAR1 ) DebugPrintF( _L( TEXT ), VAR1 )
+#define LOGSTRING2( TEXT, VAR1, VAR2 ) DebugPrintF( _L( TEXT ), VAR1, VAR2 )
+
+#define PERF_MEASURE_START \
+        TTime startTime, endTime; \
+        startTime.HomeTime();\
+        DebugPrintF( _L("EasyDialingPlugin: Measure start..") );
+
+
+#define PERF_MEASURE_STOP \
+        endTime.HomeTime(); \
+        TTimeIntervalMicroSeconds microsecs = endTime.MicroSecondsFrom( startTime ); \
+        TReal timeSecs=(TReal)((TReal)(microsecs.Int64())/1000); \
+        DebugPrintF( _L("EasyDialingPlugin: Measure stop, time taken %5.3f msecs"), timeSecs );
+
+#else
+
+#define LOGSTRING( TEXT )
+#define LOGSTRING1( TEXT, VAR1 )
+#define LOGSTRING2( TEXT, VAR1, VAR2 )
+
+#define PERF_MEASURE_START
+#define PERF_MEASURE_STOP
+
+#endif
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingpanics.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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:  Easy dialing panic codes and macro.
+*
+*/
+
+#ifndef EASYDIALINGPANICS_H_
+#define EASYDIALINGPANICS_H_
+
+/** Easy dialing panic codes */
+enum 
+    {
+    EEasyDialingPanicInvalidListBoxModelString = 200,
+    EEasyDialingPanicNoResults,
+    EEasyDialingPanicNoContactSelected,
+    EEasyDialingActionNotSupported,
+    EEasyDialingNoFontFound,
+    // add further panics here
+    };
+
+
+/** Easy dialing string for panic function */
+_LIT( KEasyDialingPanicString, "Easy dialing" );
+
+
+/**
+ * Panic function for easy dialing module. 
+ * 
+ */
+inline void EasyDialingPanic( TInt aReason )
+    {
+    User::Panic( KEasyDialingPanicString, aReason );
+    }
+
+
+#endif /* EASYDIALINGPANICS_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingplugin.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,474 @@
+/*
+* 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: Easy dialing plugin implementation.
+*
+*/
+
+
+#ifndef __CEASYDIALINGPLUGIN_H__
+#define __CEASYDIALINGPLUGIN_H__
+
+// INCLUDES
+
+#include "dialingextensioninterface.h"
+#include <MPsResultsObserver.h>
+#include <mccaconnection.h>
+#include <mccaconnectionext.h>
+#include "measydialingcenreplistenerobserver.h"
+#include "mcontactdatamanagerobserver.h"
+#include "medcontactorobserver.h"
+
+// Phonebook engine API
+#include <CPbkContactEngine.h>
+#include <MVPbkContactStoreListObserver.h>
+
+// ListBox Observer API
+#include <eiklbo.h>
+
+// MAknInputBlockCancelHandler
+#include <akninputblock.h> 
+
+
+// CONSTANTS
+
+/** Maximum constact search string length. */
+const TInt KEDMaxSearchStringLength = 200;
+
+/** Maximum string length for listbox model string. */
+const TInt KEDMaxContactStringLength = 600;
+
+/** Maximum phone number length. */
+const TInt KEDMaxPhoneNumberLength = 64;
+
+// MACROS
+
+// DATA TYPES
+
+// FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+class CPSRequestHandler;
+class CPsQuery;
+class CVPbkContactStoreUriArray;
+class CVPbkContactManager;
+class CEasyDialingListBox;
+class MVPbkContactLink;
+class CEasyDialingCenrepListener;
+class CEasyDialingContactDataManager;
+class CEDContactorService;
+class CEikMenuPane;
+class CAsyncCallBack;
+
+
+// CLASS DECLARATION
+
+/**
+* Easy dialing plugin.
+*/
+class CEasyDialingPlugin : public CDialingExtensionInterface,
+                           public MVPbkContactStoreListObserver,
+                           public MPsResultsObserver,
+                           public MCCAObserver,
+                           public MEasyDialingCenrepListenerObserver,
+                           public MContactDataManagerObserver,
+                           public MEDContactorObserver,
+                           public MEikListBoxObserver,
+                           public MAknInputBlockCancelHandler
+{
+public:
+    
+    /**
+    * Static constructor. 
+    * @return: Created object.
+    */
+    static CEasyDialingPlugin* NewL();
+
+    /**
+    * Destructor. 
+    */
+    virtual ~CEasyDialingPlugin();
+
+public: // from CCoeControl 
+
+    /**
+    * From CCoeControl.
+    */
+    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+
+    /**
+    * From CCoeControl
+    */
+    TInt CountComponentControls() const;
+    
+    /**
+    * From CCoeControl
+    */
+    CCoeControl* ComponentControl( TInt aIndex ) const;
+    
+    /**
+    * From CCoeControl
+    */
+    void MakeVisible( TBool aVisible );
+
+protected:
+    
+    /**
+    * See CCoeControl
+    */
+    void SizeChanged();
+    
+    /**
+    * See CCoeControl
+    */
+    void FocusChanged( TDrawNow aDrawNow );
+    
+public: // from CDialingExtensionInterface
+    
+    /**
+    * Does further initialization to component.
+    * @param: parent container of this control.
+    */
+    virtual void InitializeL( CCoeControl& aParent );
+    
+    /**
+    * Reset the previour easy dialing search.
+    */
+    void Reset();
+    
+    /**
+    * Adds an observer to dialing extension.
+    * @param: aObserver: observer to be added.
+    */
+    void AddObserverL( MDialingExtensionObserver* aObserver );
+   
+    /**
+    * Removes an observer from dialing extension.
+    * @param: aObserver: observer to be removed.
+    */
+    void RemoveObserver( MDialingExtensionObserver* aObserver );
+    
+    /**
+     * Sets input string (search string) to easy dialing.
+     * @param: aDesC: input string descriptor.
+     */
+    void SetInputL( const TDesC& aDesC );
+    
+    /**
+     * Returns the number of matching contacts in previous search.
+     * @return: number of matches.
+     */
+    TInt MatchingContactCount();
+
+    /**
+     * Gets the resource id of plugin's control button area resource.
+     * 
+     * @return  Resource id.
+     */
+    TInt CbaResourceId();
+    
+    /**
+     * From CDialingExtensionInterface.
+     * Gets the resource id of plugin's menu bar resource.
+     * 
+     * @return  Resource id.
+     */
+    TInt MenuResourceId();
+    
+    /**
+     * From CDialingExtensionInterface.
+     * Gets the resource id of plugin's menu bar resource.
+     * 
+     * @param   aMenuPane   Menu pane
+     * @param   aMenuResourceId Menu bar resource id.
+     * @return  Resource id.
+     */
+    TBool InitializeMenuPaneL( CEikMenuPane& aMenuPane, TInt aMenuResourceId );
+    
+    /**
+     * From CDialingExtensionInterface.
+     * Gets the resource id of plugin's menu bar resource.
+     * 
+     * @param   aCommand   Command id.
+     * @return  ETrue if command was handled, EFalse otherwise.
+     */
+    TBool HandleCommandL( TInt aCommand );
+
+    /**
+     * Tells if extension is currently enabled from settings.
+     * @return  ETrue if extension is enabled, EFalse otherwise.
+     */
+    TBool IsEnabled();
+    
+public:
+    
+    /**
+     * From MVPbkContactStoreListObserver.
+     */
+    void StoreReady(MVPbkContactStore& aContactStore);
+    
+    /**
+     * From MVPbkContactStoreListObserver.
+     */
+    void StoreUnavailable(MVPbkContactStore& aContactStore, TInt aReason);
+    
+    /**
+     * From MVPbkContactStoreListObserver.
+     */
+    void HandleStoreEventL( MVPbkContactStore& aContactStore, 
+                            TVPbkContactStoreEvent aStoreEvent);
+    
+    /**
+     * From MVPbkContactStoreListObserver.
+     */
+    void OpenComplete();
+    
+    /**
+    * From MEasyDialingCenrepListenerObserver.
+    */
+    void EasyDialingSettingsChanged( TInt aValue );
+    
+    /**
+    * From MEasyDialingCenrepListenerObserver.
+    */
+    void EasyDialingContactThumbnailsSettingsChanged( TInt aThumbnailSettingValue );
+        
+    /**
+    * From MContactDataManagerObserver.
+    */
+    void AllContactDataLoaded();
+    
+    /**
+    * From MEDContactorObserver.
+    */
+    void InformContactorEvent( MEDContactorObserver::TEvent aEvent );
+    
+    /**
+    * From MEikListBoxObserver.
+    */
+    void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
+
+    /**
+    * From MAknInputBlockCancelHandler.
+    */
+    void AknInputBlockCancel();
+    
+
+private:
+
+    /**
+    * Constructor.
+    */
+    CEasyDialingPlugin ();
+
+    /**
+    * Second phase constructor.
+    */
+    void ConstructL ();
+
+    void InitPredictiveContactSearchL();
+        
+    /**
+    * From MPsResultsObserver.
+    */
+    virtual void HandlePsResultsUpdate( RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs );
+    virtual void HandlePsError( TInt aErrorCode );
+    virtual void CachingStatus( TCachingStatus& aStatus, TInt& aError );
+    
+    /**
+     * FindContactFieldPCSIndex
+     * Searches the index that stores the given contact field.
+     * To see possible contact field numbering, see file "vpbkeng.rsg".
+     * @param: contact field to search for. See file "vpbkeng.rsg"
+     * for contact field numbering.
+     * @return: index of the contact field. KErrNotFound if field was not found.
+     * Non-negative return values are for indexing CPsClientData array.
+     */
+    TInt FindContactFieldPCSIndexL( TInt aIndex );
+        
+    /**
+     * HandlePsResultsUpdateL
+     * A leaving function to be trapped in HandlePsResultsUpdate.
+     */
+    void HandlePsResultsUpdateL( RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs );
+    
+public:
+    
+    /**
+     * MCCAObserver function handling exit of CCA launcher.
+     */
+    void CCASimpleNotifyL( TNotifyType aType, TInt aReason );
+
+private:
+    
+    /*
+     * Informs all observers registered with AddObserverL.
+     * @param: aEvent: event id to be informed.
+     */
+    void InformObservers( MDialingExtensionObserver::TEvent aEvent );
+
+
+private: 
+
+    /**
+    * This method perform the drawing functionality of the component.
+    * @param: aRect: The rect to be rendered
+    * @return None
+    */
+    void Draw( const TRect& aRect ) const;
+    
+    /**
+    * Initiates predictive contact search.
+    */
+    void LaunchSearchL();
+    
+    /**
+     * Opens ca launcher for currently selected contact.
+     */
+    void LaunchCurrentContactL();
+    
+    /**
+     * Creates listbox model string.
+     */
+    void CreateListBoxContactStringL(
+            const TDesC& aContactString,
+            MVPbkContactLink *aLink,
+            TBool aMatchThumbnails,
+            TBool aFav );
+    
+    /**
+     * Creates string with first name, last name and company name.
+     */
+    HBufC* CreateContactStringLC( CPsClientData* aResult, CPbkContactEngine::TPbkNameOrder aNameOrder );
+    
+    /** Possible actions launched by this plugin. */
+    enum TEasyDialingAction
+        {
+        ENoActionDefined,
+        ECallCurrentContact,
+        EVideoCallCurrentContact,
+        ESendMessageCurrentContact,
+        ELaunchCurrentContact,
+		ELaunchSearch
+        };
+ 
+   /**
+     * Initiates asynchronous callback to launch action and sets
+     * input blocker active. 
+     */
+    void AsyncActionLaunchL( const TEasyDialingAction aAction );
+       
+    /**
+     * Callback for CAsyncCallBack. Launches action set in iActionToBeLaunched
+     * and stops input block when launch is done.
+     */
+    static TInt AsyncCallBackToLaunchAction( TAny* aPtr );
+    
+    /**
+     * Launches action defined in iActionToBeLaunched.
+     */
+    void DoLaunchActionL();
+    
+    /**
+     * Cancels async action launch and input block.
+     */
+    void CancelActionLaunchAndInputBlock();
+    
+    
+private:
+
+    /** Textual version of current search string. */
+    TBuf<KEDMaxSearchStringLength> iSearchString;
+
+    /** Handle to predictive search engine. Owned. */
+    CPSRequestHandler* iPredictiveContactSearchHandler;
+    
+    /** PCS type of presentation of the current search string. Owned. */
+    CPsQuery* iPredictiveSearchQuery;
+    
+    /** If ETrue, completing PCS searches are not displayed but just discarded. */
+    TBool iDiscardCompletingSearches;
+    
+    /** ETrue if contact database has been changed and a new search is needed. */
+    TBool iNewSearchNeeded;
+    
+    /** Array of used data stores. Owned. */
+    RPointerArray<TDesC> iContactDataStores;
+    
+    /** Contact store array. Owned. */
+    CVPbkContactStoreUriArray* iContactStoreUriArray;
+    
+    /** Contact manager handle. Owned. */
+    CVPbkContactManager* iContactManager;
+	
+    /** Search result field index for first name field. */
+	TInt iFirstNamePCSIndex;
+    
+    /** Search result field index for last name field. */
+	TInt iLastNamePCSIndex;
+    
+    /** Search result field index for first name field. */
+	TInt iCompanyNamePCSIndex;
+
+	/** Array containing observers to this class. Owned. */
+	RPointerArray<MDialingExtensionObserver> iObservers;
+	
+	/** Contact listbox. Owned. */
+	CEasyDialingListBox* iContactListBox;
+
+	/** Listbox model from search results. Owned. */
+	CDesCArrayFlat* iListBoxModel;
+	
+	/** Number of found matching contacts from most recent search. */
+	TInt iNumberOfNames;
+	
+	/** Handle to contact launcher. */
+    MCCAConnectionExt* iContactLauncher;
+    
+    /** ETrue if contact launcher (a.k.a. communication launcher) is open. */
+    TBool iContactLauncherActive;
+    
+    /** If true, contact listbox must not reset focus when contact launcher exits. */
+    TBool iRememberFocus;
+    
+	/** Working buffer for creating contact string to listbox. */
+    TBuf<KEDMaxContactStringLength> iContactStringCreationBuffer;
+
+    /** Central repository listener. Owned. */
+    CEasyDialingCenrepListener* iCenrepListener;
+    
+    /** Contact data manager. Owned. */
+    CEasyDialingContactDataManager* iContactDataManager;
+    
+    /** Easy dialing contactor service. Owned. */
+    CEDContactorService* iContactorService;
+
+    /** Easy dialing resource file offset in current application. */
+    TInt iResourceFileOffset;
+    
+    /** Blocks user input when action is being launched. NULL if not active. Owned. */
+    CAknInputBlock* iInputBlocker;
+    
+    /** Used to launch action asynchronously. Owned.*/
+    CAsyncCallBack* iAsyncCallBack;
+    
+    /** Action to be launched next asynchronously. */
+    TEasyDialingAction iActionToBeLaunched;
+       
+};
+
+
+#endif //__CEASYDIALINGPLUGIN_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/easydialingutils.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* 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:  Helper class for easydialing. 
+*
+*/
+
+#ifndef __EASYDIALINGUTILS_H__
+#define __EASYDIALINGUTILS_H__
+
+#include <CPbkContactEngine.h>  // for TPbkNameOrder
+
+class EasyDialingUtils
+    {
+    public:
+
+        /*
+         * Creates contact string from first name, last name and company name.
+         * F.ex. "Firstname Lastname\tCompany"
+         * @param aFirstName First name
+         * @param aFirstName Last name
+         * @param aFirstName Comapany name
+         * @param aNameOrder The name ordering to be used
+         * @return Contact string (in cleanupstack)
+         */
+        static HBufC* CreateContactStringLC(
+            const TDesC& aFirstName,
+            const TDesC& aLastName,
+            const TDesC& aCompanyName,
+            CPbkContactEngine::TPbkNameOrder aNameOrder );
+    };
+
+#endif //__EASYDIALINGUTILS_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/mcontactdatamanagerobserver.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Easy dialing contac data observer class.
+*
+*/
+
+#ifndef __MCONTACTDATAMANAGEROBSERVER_H__
+#define __MCONTACTDATAMANAGEROBSERVER_H__
+
+/**
+ *  MContactDataManagerObserver
+ *  Thumbnail manager observer interface
+ */
+class MContactDataManagerObserver
+    {
+public:
+    virtual void AllContactDataLoaded() = 0;
+    };
+
+#endif //__MCONTACTDATAMANAGEROBSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/inc/measydialingcenreplistenerobserver.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,44 @@
+/*
+* 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:  Easy dialing cenrep observer class.
+*
+*/
+
+
+#ifndef __MEASYDIALINGCENREPLISTENEROBSERVER_H__
+#define __MEASYDIALINGCENREPLISTENEROBSERVER_H__
+
+/**
+ * Easy dialing central repository observer.
+ */
+class MEasyDialingCenrepListenerObserver
+    {
+public:
+    
+    
+    /**
+     * Called when easy dialing feature setting (on / off) value is changed. 
+     * @param   aValue  1 if setting is set on, otherwise 0.
+     */
+    virtual void EasyDialingSettingsChanged(TInt aValue) = 0;
+    
+    
+    /**
+     * Called when easy dialing thumbnail setting (shown / not shown) value is changed.
+     * @param   aThumbnailSettingValue  1 if shown, otherwise 0.
+     */
+    virtual void EasyDialingContactThumbnailsSettingsChanged( TInt aThumbnailSettingValue ) = 0;
+    };
+
+#endif //__MEASYDIALINGCENREPLISTENEROBSERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/layers.sysdef.xml	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+  <!ENTITY layer_real_source_path "addon/custom_sw_tre/easydialing" >
+]>
+
+<SystemDefinition name="easydialing" schema="1.4.0">
+  <systemModel>
+    <layer name="addon_layer">
+      <module name="easydialing">
+        <unit unitID="cusw.easydialing" mrp="" bldFile="&layer_real_source_path;\group" name="easydialing" />
+      </module>
+    </layer>
+    <layer name="api_test_layer">
+      <module name="easydialing_api_tests">
+        <unit unitID="easydialing.test" mrp="" bldFile="&layer_real_source_path;\tsrc\t_easydialingplugin\group" name="easydialing_test" />
+      </module>
+    </layer>
+  </systemModel>
+</SystemDefinition>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/loc/easydialing.loc	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* 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:  Easy dialing localization file.
+*
+*/
+
+// LOCALISATION STRINGS
+
+// d: Option in Number Acquisition state menu.
+// d: It contains submenu on/off states of easy dialing.
+// l: list_single_pane_t1_cp2/opt3
+// r:9.1
+#define qtn_easydial_option_submenu_title "Contact search"
+
+//d: Submenu item for easy dialing setting.
+//l: list_single_popup_submenu_pane_t1/opt1
+//r:9.2
+//
+#define qtn_easy_dialing_on "On"
+
+//d: Submenu item for easy dialing setting.
+//l: list_single_popup_submenu_pane_t1/opt1
+//r:9.2
+//
+#define qtn_easy_dialing_off "Off"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/rom/easydialingplugin.iby	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: The ROM definition file
+*
+*/
+
+#ifdef FF_HOME_SCREEN_EASY_DIALING
+
+#ifndef __ED_PLUGIN_IBY_
+#define __ED_PLUGIN_IBY_
+
+#include <bldvariant.hrh>
+
+// Stub sis file
+data=ZSYSTEM\install\easydialing_stub.sis            System\Install\easydialing_stub.sis
+
+// Binary code and not localized resources
+
+ECOM_PLUGIN(easydialingplugin.dll,easydialingplugin.rsc)
+
+file=ABI_DIR\BUILD_DIR\edcontactor.dll SHARED_LIB_DIR\edcontactor.dll
+data=DATAZ_\RESOURCE_FILES_DIR\edcontactor.rsc RESOURCE_FILES_DIR\edcontactor.rsc
+
+data=\epoc32\data\z\private\10202be9\200212A0.txt     "\private\10202be9\200212A0.txt"
+
+#endif // __ED_PLUGIN_IBY_
+
+#endif // FF_HOME_SCREEN_EASY_DIALING
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/rom/easydialingpluginresources.iby	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: The ROM definition file
+*
+*/
+
+#ifdef FF_HOME_SCREEN_EASY_DIALING
+
+#ifndef __ED_PLUGINRESOURCES_IBY_
+#define __ED_PLUGINRESOURCES_IBY_
+
+#include <bldvariant.hrh>
+
+// Localisable resources
+
+data=DATAZ_\RESOURCE_FILES_DIR\easydialingpluginresources.rsc   RESOURCE_FILES_DIR\easydialingpluginresources.rsc
+data=DATAZ_\APP_RESOURCE_DIR\easydialing.mif APP_RESOURCE_DIR\easydialing.mif
+
+#endif // __ED_PLUGINRESOURCES_IBY_
+
+#endif FF_HOME_SCREEN_EASY_DIALING
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/dllmain.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,79 @@
+/*
+* 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:  Easy dialing DLL main.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32std.h>
+#include <implementationproxy.h>
+#include "easydialingplugin.h"
+#include "easydialingconstants.hrh"
+
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+// CONSTANTS
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+const TImplementationProxy ImplementationTable[] =
+    {
+#ifdef __EABI__ 
+    IMPLEMENTATION_PROXY_ENTRY( EASYDIALING_PLUGIN_ECOM_IMPL_UID, CEasyDialingPlugin::NewL ) 
+#else
+    {{EASYDIALING_PLUGIN_ECOM_IMPL_UID},  CEasyDialingPlugin::NewL }
+#endif
+    };
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ---------------------------------------------------------
+// ImplementationGroupProxy
+//
+// Provides a key value pair table, this is used to identify
+// Function used to return an instance of the proxy table.
+// the correct construction function for the requested interface.
+// ---------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy (TInt& aTableCount)
+    {
+    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+    return ImplementationTable;
+    }
+
+// ---------------------------------------------------------
+// E32Dll
+//
+// Standard Symbian OS DLL entry point.
+// ---------------------------------------------------------
+//
+#ifndef EKA2
+TBool E32Dll(TDllReason)
+    {
+    return ETrue;
+    }
+#endif // EKA2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialingcenreplistener.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,135 @@
+/*
+* 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:  Easy dialing cenrep listener.
+*
+*/
+
+// INCLUDE FILES
+#include <centralrepository.h>
+#include <cenrepnotifyhandler.h>
+#include "easydialingcenreplistener.h"
+#include "measydialingcenreplistenerobserver.h"
+#include "easydialingcrkeys.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CEasyDialingCenrepListener::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CEasyDialingCenrepListener* CEasyDialingCenrepListener::NewL(MEasyDialingCenrepListenerObserver* aObserver)
+    {   
+    CEasyDialingCenrepListener* self = new (ELeave) CEasyDialingCenrepListener(aObserver);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CEasyDialingCenrepListener::~CEasyDialingCenrepListener
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CEasyDialingCenrepListener::~CEasyDialingCenrepListener()
+    {
+    if (iNotifyHandler)
+        {
+        iNotifyHandler->StopListening();
+        delete iNotifyHandler;
+        iNotifyHandler = NULL;
+        }
+
+    delete iClient;
+    }
+
+// -----------------------------------------------------------------------------
+// CEasyDialingCenrepListener::CEasyDialingCenrepListener
+// C++ default constructor.
+// -----------------------------------------------------------------------------
+//
+CEasyDialingCenrepListener::CEasyDialingCenrepListener(MEasyDialingCenrepListenerObserver* aObserver)
+        : iObserver(aObserver),
+        iEasyDialingSettingValue(0),
+        iContactThumbnailsSettingsValue(1)
+        
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEasyDialingCenrepListener::ConstructL
+// Symbian 2nd phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingCenrepListener::ConstructL()
+    {
+    iClient = CRepository::NewL(KCRUidEasyDialSettings);
+    
+    User::LeaveIfError(iClient->Get( KEasyDialing, iEasyDialingSettingValue ));
+    User::LeaveIfError(iClient->Get( KEasyDialingContactThumbnails, iContactThumbnailsSettingsValue ));
+    
+    iNotifyHandler = CCenRepNotifyHandler::NewL(*this, *iClient );
+    iNotifyHandler->StartListeningL();
+    }
+
+// -----------------------------------------------------------------------------
+// CEasyDialingCenrepListener::KeyValueL
+// Returns key value
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingCenrepListener::Value()
+    {
+    return iEasyDialingSettingValue;
+    }
+
+// -----------------------------------------------------------------------------
+// CEasyDialingCenrepListener::SetEasyDialingSettingsValue
+// Sets key value.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingCenrepListener::SetEasyDialingSettingsValue( const TInt aValue )
+    {
+    iClient->Set( KEasyDialing, aValue );
+    }
+
+// -----------------------------------------------------------------------------
+// CEasyDialingCenrepListener::HandleNotifyInt
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingCenrepListener::HandleNotifyGeneric( TUint32 aId )
+    {
+    TInt value(0);
+    
+    iClient->Get( aId, value );
+    
+    if( aId == KEasyDialingContactThumbnails)
+        {
+        if( value!= iContactThumbnailsSettingsValue )
+            {
+            iContactThumbnailsSettingsValue = value;
+            iObserver->EasyDialingContactThumbnailsSettingsChanged( iContactThumbnailsSettingsValue );
+            }
+        }
+    
+    else if ( aId == KEasyDialing )
+        {
+        if ( value != iEasyDialingSettingValue )
+            {
+            iEasyDialingSettingValue = value;
+            iObserver->EasyDialingSettingsChanged( iEasyDialingSettingValue );
+            }        
+        }
+    }
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialingcontactdata.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,185 @@
+/*
+* 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:  Easy dialing contact data container.
+*
+*/
+
+#include <e32std.h>
+#include <MVPbkContactLink.h>
+#include <fbs.h>
+
+#include "easydialingcontactdata.h"
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::CEasyDialingContactData
+// ---------------------------------------------------------------------------
+//
+CEasyDialingContactData::CEasyDialingContactData(MVPbkContactLink* aContactLink)
+        : iContactLink(aContactLink), iThumbnail(NULL),iFav(EFalse), iLoaded(EFalse)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::~CEasyDialingContactData
+// ---------------------------------------------------------------------------
+//
+CEasyDialingContactData::~CEasyDialingContactData()
+    {
+    delete iThumbnail;
+    delete iContactLink;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::Id
+// ---------------------------------------------------------------------------
+//
+MVPbkContactLink* CEasyDialingContactData::ContactLink()
+    {
+    return iContactLink;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::Thumbnail
+// ---------------------------------------------------------------------------
+//
+CFbsBitmap* CEasyDialingContactData::Thumbnail()
+    {
+    return iThumbnail;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::SetThumbnail
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactData::SetThumbnail(CFbsBitmap* aThumbnail)
+    {
+    if (iThumbnail)
+        {
+        delete iThumbnail;
+        }
+    iThumbnail = aThumbnail;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::Fav
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactData::Fav()
+    {
+    return iFav;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::SetFav
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactData::SetFav(TBool aFav)
+    {
+    iFav = aFav;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::IsLoaded
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactData::IsLoaded() 
+    {
+    return iLoaded;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::LoadingComplete
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactData::LoadingComplete()
+    {
+    iLoaded = ETrue;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::DeleteThumbnail
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactData::DeleteThumbnail()
+    {
+    delete iThumbnail;
+    iThumbnail = NULL;
+    iLoaded = EFalse;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::VoiceCallAvailable
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactData::VoiceCallAvailable()
+    {
+    return iVoiceCallAvailable;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::SetVoiceCallAvailable
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactData::SetVoiceCallAvailable( TBool aVailable )
+    {
+    iVoiceCallAvailable = aVailable;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::VideoCallAvailable
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactData::VideoCallAvailable()
+    {
+    return iVideoCallAvailable;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::SetVideoCallAvailable
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactData::SetVideoCallAvailable( TBool aVailable )
+    {
+    iVideoCallAvailable = aVailable;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::UniEditorAvailable
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactData::UniEditorAvailable()
+    {
+    return iUniEditorAvailable;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactData::SetUniEditorAvailable
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactData::SetUniEditorAvailable( TBool aVailable )
+    {
+    iUniEditorAvailable = aVailable;
+    }
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialingcontactdatamanager.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,790 @@
+/*
+* 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:  Easy dialing contact data manager.
+*
+*/
+
+#include <e32std.h>
+#include <fbs.h>
+#include <CPbk2ImageManager.h>
+#include <CVPbkContactManager.h>
+#include <MVPbkContactStoreList.h>
+#include <MVPbkContactLink.h>
+#include <VPbkContactStoreUris.h>
+#include <TVPbkContactStoreUriPtr.h>
+#include <CVPbkTopContactManager.h>
+#include <MVPbkContactOperationBase.h>
+#include <TVPbkStoreContactAnalyzer.h>
+#include <MVPbkFieldType.h>
+#include <VPbkEng.rsg>
+
+#include <MVPbkContactViewBase.h>
+#include <MVPbkBaseContactFieldCollection.h>
+#include <MVPbkContactFieldTextData.h>
+#include <MVPbkContactFieldData.h>
+
+#include <CVPbkContactLinkArray.h>
+#include <MVPbkContactLink.h>
+#include <MVPbkContactOperationBase.h>
+#include <MVPbkOperationObserver.h>
+#include <MVPbkContactStore.h>          // MVPbkContactStore
+#include <MVPbkStoreContact.h>
+#include <centralrepository.h>
+
+#include "easydialingcontactdata.h"
+#include "easydialingcontactdatamanager.h"
+#include "easydialingutils.h"
+#include "mcontactdatamanagerobserver.h"
+#include "easydialingcrkeys.h"
+#include "easydialinglogger.h"
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::CEasyDialingContactDataManager
+// ---------------------------------------------------------------------------
+//
+CEasyDialingContactDataManager::CEasyDialingContactDataManager(CVPbkContactManager* aContactManager)
+        : iImageOperation(NULL), iContactManager(aContactManager), iContactOperation(NULL),
+          iContactThumbnailSetting(ETrue), iStoreReady(EFalse)
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::~CEasyDialingContactDataManager
+// ---------------------------------------------------------------------------
+//
+CEasyDialingContactDataManager::~CEasyDialingContactDataManager()
+    {
+    Reset();
+    iWaitingContacts.Close();
+    iContactDataArray.Close();
+    delete iImageManager;
+    delete iVPbkTopContactManager;
+    delete iImageOperation;
+    delete iContactOperation;
+    delete iFavsView;
+    if (iContactStore)
+        {
+        iContactStore->Close( *this);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::ConstructL()
+    {
+    iImageManager = CPbk2ImageManager::NewL(*iContactManager);
+    
+    TVPbkContactStoreUriPtr uri( VPbkContactStoreUris::DefaultCntDbUri() );
+    iContactStore = iContactManager->ContactStoresL().Find( uri );
+
+    iVPbkTopContactManager = CVPbkTopContactManager::NewL( *iContactManager );
+
+    iImageManagerParams.iFlags = TPbk2ImageManagerParams::EScaleImage | TPbk2ImageManagerParams::EKeepAspectRatio;
+    iThumbnailFieldType = iContactManager->FieldTypes().Find( R_VPBK_FIELD_TYPE_THUMBNAILPIC );
+
+    // Open the store
+    iContactStore->OpenL( *this );
+    
+    // Read easydialing setting from cenrep.
+    CRepository* cenrep = CRepository::NewL( KCRUidEasyDialSettings );
+    CleanupStack::PushL( cenrep );
+    User::LeaveIfError( cenrep->Get( KEasyDialingContactThumbnails, iContactThumbnailSetting ) );
+    CleanupStack::PopAndDestroy( cenrep );
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::SetObserver
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::SetObserver(MContactDataManagerObserver* aObserver)
+    {
+    iObserver = aObserver;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::SetThumbnailSize
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::SetThumbnailSize(const TSize& aSize)
+    {
+    if (iImageManagerParams.iSize != aSize)
+        {
+        iImageManagerParams.iSize = aSize;
+        Reload();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::GetThumbnailIdL
+// ---------------------------------------------------------------------------
+//
+HBufC* CEasyDialingContactDataManager::GetThumbnailIdL(
+        MVPbkContactLink* aContact, TBool aMatchThumbnails, TBool aFav )
+    {
+    LOGSTRING("CEasyDialingContactDataManager: GetThumbnailIdL");
+    TInt newIndex(KErrNotFound);
+    if (aMatchThumbnails)
+        {
+        newIndex = FindContactIndex( aContact );
+        }
+    
+    LOGSTRING1("newIndex = %d", newIndex);
+    if (newIndex == KErrNotFound)
+        {
+        MVPbkContactLink* newLink = aContact->CloneLC();
+        CEasyDialingContactData *newThumbnail = new (ELeave) CEasyDialingContactData(newLink);
+        CleanupStack::Pop(); // newLink
+        newIndex = iContactDataArray.Count();
+        CleanupStack::PushL(newThumbnail);
+        iContactDataArray.AppendL(newThumbnail);
+        CleanupStack::Pop(newThumbnail);
+        }
+    
+    iContactDataArray[ newIndex ]->SetFav( aFav );
+    
+    HBufC* id = HBufC::NewL( sizeof(TInt) * 2 ); // space for hex representation of TInt
+    TPtr ptr = id->Des();
+    ptr.Num(newIndex, EHex);
+    LOGSTRING1("CEasyDialingContactDataManager: GetThumbnailIdL returns %S", id);
+    return id;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::GetThumbnail 
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactDataManager::GetThumbnailAndFav(const TDesC& aId, CFbsBitmap*& aThumbnail, TBool& aFav)
+    {
+    LOGSTRING("CEasyDialingContactDataManager: GetThumbnailAndFav");
+    TUint idVal(0);
+    TLex lex(aId);
+    lex.Val(idVal, EHex);
+	
+    TBool retVal;
+    
+    CEasyDialingContactData* thumbnail = iContactDataArray[idVal];
+    aFav = thumbnail->Fav();
+    if (thumbnail->IsLoaded())
+        {
+        aThumbnail = thumbnail->Thumbnail();
+        retVal = ETrue;
+        }
+    else
+        {
+        aThumbnail = NULL;
+        retVal = EFalse;
+        if (iWaitingContacts.Find(idVal) == KErrNotFound)
+            {
+            LOGSTRING1("iWaitingContacts.Append %d", idVal);            
+            iWaitingContacts.Append(idVal);
+            TRAPD(err, LoadNextContactDataL());
+            if (err)
+                {
+                HandleError(err);
+                }
+            }
+        }    
+    LOGSTRING("CEasyDialingContactDataManager: GetThumbnailAndFav Exit");
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::IsFavL
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactDataManager::IsFavL( MVPbkContactLink* aLink )
+    {
+    if ( iFavsView && iFavsView->IndexOfLinkL( *aLink ) > KErrNotFound )
+        {
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::NumberOfFavsL
+// ---------------------------------------------------------------------------
+//
+TInt CEasyDialingContactDataManager::NumberOfFavsL()
+    {
+    if ( iFavsView )
+        {
+        return iFavsView->ContactCountL();
+        }
+    else
+        {
+        return 0;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::FavLinkLC
+// ---------------------------------------------------------------------------
+//
+MVPbkContactLink* CEasyDialingContactDataManager::FavLinkLC( TInt aIndex )
+    {
+    if ( iFavsView )
+        {
+        return iFavsView->ContactAtL( aIndex ).CreateLinkLC();
+        }
+    else
+        {
+        return NULL;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::FavContactStringLC
+// ---------------------------------------------------------------------------
+//
+HBufC* CEasyDialingContactDataManager::FavContactStringLC( TInt aIndex, CPbkContactEngine::TPbkNameOrder aNameOrder )
+    {
+    const MVPbkBaseContactFieldCollection& fields = iFavsView->ContactAtL( aIndex ).Fields();
+    TPtrC firstName;
+    TPtrC lastName;
+    TPtrC companyName;
+    for ( TInt i = 0; i < fields.FieldCount(); i++ )
+        {
+        const MVPbkFieldType* fieldType = fields.FieldAt( i ).MatchFieldType( 0 );
+        switch ( fieldType->FieldTypeResId() )
+            {
+            case R_VPBK_FIELD_TYPE_LASTNAME:
+                {
+                const MVPbkContactFieldTextData& data = 
+                        MVPbkContactFieldTextData::Cast( fields.FieldAt( i ).FieldData() );
+                lastName.Set( data.Text() );
+                }
+                break;
+            case R_VPBK_FIELD_TYPE_FIRSTNAME:
+                {
+                const MVPbkContactFieldTextData& data = 
+                        MVPbkContactFieldTextData::Cast( fields.FieldAt( i ).FieldData() );
+                firstName.Set( data.Text() );
+                }
+                break;
+            case R_VPBK_FIELD_TYPE_COMPANYNAME:
+                {
+                const MVPbkContactFieldTextData& data = 
+                        MVPbkContactFieldTextData::Cast( fields.FieldAt( i ).FieldData() );
+                companyName.Set( data.Text() );
+                }
+                break;
+            default:
+                break;
+            }
+        }
+    
+    return EasyDialingUtils::CreateContactStringLC( firstName, lastName, companyName, aNameOrder );
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::InitReady
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::InitReady()
+    {
+    // Initialization is ready. we can start loading contact data, if needed.
+    // (It is unlikely that there is any data to load at this point)
+    iStoreReady = ETrue;
+    if ( iWaitingContacts.Count() )
+        {
+        TRAPD( err, LoadNextContactDataL() )
+        if ( err )
+            {
+            HandleError( err );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::FindContactIndex
+// ---------------------------------------------------------------------------
+//
+TInt CEasyDialingContactDataManager::FindContactIndex( MVPbkContactLink* aContact )
+    {
+    TInt index( KErrNotFound );
+
+    for ( TInt i = 0; i < iContactDataArray.Count(); i++ )
+        {
+        if ( iContactDataArray[i]->ContactLink()->IsSame( *aContact ) )
+            {
+            index = i;
+            break;
+            }
+        }
+    
+    return index;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::LoadNextContactDataL
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::LoadNextContactDataL()
+    {
+    LOGSTRING("CEasyDialingContactDataManager: LoadNextContactDataL");
+    if (!iImageOperation && !iContactOperation && iWaitingContacts.Count() && iStoreReady)
+        {
+        // first we need to load the contact item
+        CEasyDialingContactData* tn = iContactDataArray[iWaitingContacts[0]];
+        iContactOperation = iContactManager->RetrieveContactL( *(tn->ContactLink()), *this);
+
+        if (!iContactOperation)
+            {
+            tn->LoadingComplete();
+            RDebug::Print(_L("iWaitingContacts.Remove %d"), iWaitingContacts[0]);            
+            iWaitingContacts.Remove(0);
+            LoadNextContactDataL();
+            }
+        }          
+    LOGSTRING("CEasyDialingContactDataManager: LoadNextContactDataL Exit");
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::PbkImageGetComplete
+// From MPbkImageGetObserver
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::Pbk2ImageGetComplete(MPbk2ImageOperation& aOperation, CFbsBitmap* aBitmap)
+    {
+    LOGSTRING("CEasyDialingContactDataManager: Pbk2ImageGetComplete");
+    TInt index = iWaitingContacts[0];
+    LOGSTRING1("iWaitingContacts.Remove %d", iWaitingContacts[0]);            
+    iWaitingContacts.Remove(0);
+    delete &aOperation;
+    iImageOperation = NULL;
+    delete iStoreContact;
+    iStoreContact = NULL;
+        
+    TRAPD(err, DoHandleImageGetCompleteL(aBitmap, index));
+    if (err)
+        {
+        HandleError(err);
+        }
+    LOGSTRING("CEasyDialingContactDataManager: Pbk2ImageGetComplete Exit");
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::PbkImageGetFailed
+// From MPbkImageGetObserver
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::Pbk2ImageGetFailed(MPbk2ImageOperation& aOperation, TInt /*aError*/)
+    {
+    LOGSTRING("CEasyDialingContactDataManager: Pbk2ImageGetFailed");
+    Pbk2ImageGetComplete(aOperation, NULL);
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::DoHandleImageGetCompleteL
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::DoHandleImageGetCompleteL(CFbsBitmap* aBitmap, TInt aIndex)
+    {
+    LOGSTRING("CEasyDialingContactDataManager: DoHandleImageGetCompleteL");
+    CEasyDialingContactData *tn = iContactDataArray[aIndex];
+    tn->LoadingComplete();
+    if (aBitmap)
+        {
+        tn->SetThumbnail(aBitmap);
+        }
+    
+    LoadNextContactDataL();
+    InformObserver();
+    LOGSTRING("CEasyDialingContactDataManager: DoHandleImageGetCompleteL Exit");
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::Reset
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::Reset()
+    {
+    LOGSTRING("CEasyDialingContactDataManager: Reset");
+    delete iImageOperation;
+    iImageOperation = NULL;
+    delete iContactOperation;
+    iContactOperation = NULL;
+    delete iStoreContact;
+    iStoreContact = NULL;
+    iWaitingContacts.Reset();
+    iContactDataArray.ResetAndDestroy();
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::VoiceCallAvailable
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactDataManager::VoiceCallAvailable( TInt aIndex )
+    {
+    LOGSTRING("CEasyDialingContactDataManager: VoiceCallAvailable");
+
+    TBool ret( EFalse );
+    
+    if( aIndex >= 0 )
+        {
+        // If the parsed index is valid, return the availability.
+        ret = iContactDataArray[ aIndex ]->VoiceCallAvailable();
+        }
+    
+    LOGSTRING1("CEasyDialingContactDataManager: VoiceCallAvailable returns %d", ret);
+    return ret;    
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::VideoCallAvailable
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactDataManager::VideoCallAvailable( TInt aIndex )
+    {
+    LOGSTRING("CEasyDialingContactDataManager: VideoCallAvailable");
+
+    TBool ret( EFalse );
+    
+    if( aIndex >= 0 )
+        {
+        // If the parsed index is valid, return the availability.
+        ret = iContactDataArray[ aIndex ]->VideoCallAvailable();
+        }
+    
+    LOGSTRING1("CEasyDialingContactDataManager: VideoCallAvailable returns %d", ret);
+    return ret;    
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::UniEditorAvailable
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactDataManager::UniEditorAvailable( TInt aIndex )
+    {
+    LOGSTRING("CEasyDialingContactDataManager: UniEditorAvailable");
+
+    TBool ret( EFalse );
+    
+    if( aIndex >= 0 )
+        {
+        // If the parsed index is valid, return the availability.
+        ret = iContactDataArray[ aIndex ]->UniEditorAvailable();
+        }
+    
+    LOGSTRING1("CEasyDialingContactDataManager: UniEditorAvailable returns %d", ret);
+    return ret;    
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::ContactLinkLC
+// ---------------------------------------------------------------------------
+//
+HBufC8* CEasyDialingContactDataManager::ContactLinkLC( TInt aIndex )
+    {
+    LOGSTRING( "CEasyDialingContactDataManager: ContactLinkLC" );
+
+    if( aIndex >= 0 )
+        {
+        // If the parsed index is valid, return the availability.
+        return iContactDataArray[ aIndex ]->ContactLink()->PackLC();
+        }
+    else 
+        {
+        return NULL; 
+        }
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::HandleError
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::HandleError(TInt /*aError*/)
+    {
+    LOGSTRING("CEasyDialingContactDataManager: HandleError");
+    // Something went wrong, but there is no need to panic.
+    // Cancel async operations and notify observer that we are done.
+    iWaitingContacts.Reset();
+    delete iImageOperation;
+    iImageOperation = NULL;
+    delete iContactOperation;
+    iContactOperation = NULL;
+    if (iObserver)
+        {
+        iObserver->AllContactDataLoaded();
+        }
+    }
+    	
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::StoreReady
+// from MVPbkContactStoreObserver
+// Called when the contact store is ready to be used, signals
+// the next engine state.
+// @param aContactStore The store that is ready.
+// ---------------------------------------------------------------------------
+//
+
+void CEasyDialingContactDataManager::StoreReady( MVPbkContactStore& /*aContactStore*/ )
+    {
+    // next open the favourites view
+    TRAPD( err, iVPbkTopContactManager->GetTopContactsViewL( *this, *this ) );
+    if ( err )
+        {
+        HandleError( err );
+        }
+    }
+    
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::StoreUnavailable
+// from MVPbkContactStoreObserver
+// Called when a contact store becomes unavailable.
+// @param aContactStore The store that became unavailable.
+// @param aReason The reason why the store is unavailable.
+//                This is one of the system wide error codes.
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::StoreUnavailable( MVPbkContactStore& /*aContactStore*/,
+        TInt /*aReason*/ )
+    {
+    // Opening main contact database failed. Easydialing can operate without
+    // it, but thumbnails and favourite stars can't be shown, and availability
+    // of action menu items can't be checked.
+    //   Of course, if easydialing can't open the database, probably PCSServer
+    // can't open it either...
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::HandleStoreEventL
+// from MVPbkContactStoreObserver
+// Called when changes occur in the contact store.
+// IGNORED.
+// @param aContactStore A store whose event it is.
+// @param aStoreEvent The event that has occurred.
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::HandleStoreEventL(MVPbkContactStore& /*aContactStore*/,
+        TVPbkContactStoreEvent /*aStoreEvent*/)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::VPbkOperationFailed
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::VPbkOperationFailed(
+        MVPbkContactOperationBase* /*aOperation*/,
+        TInt /*aError*/ )
+    {
+    // Loading list of favourite contacts failed.
+    // Continue as if none of the contacts are favourited.
+    delete iFavsOperation;
+    iFavsOperation = NULL;        
+    delete iFavsView;
+    iFavsView = NULL;
+
+    InitReady();
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::VPbkOperationResultCompleted
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::VPbkOperationResultCompleted(
+        MVPbkContactOperationBase* /*aOperation*/,
+        MVPbkContactViewBase* aOperationResult )
+    {
+    delete iFavsOperation;
+    iFavsOperation = NULL;
+    delete iFavsView;
+    iFavsView = aOperationResult;
+    
+    InitReady();
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::DoHandleContactOperationCompleteL
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::DoHandleContactOperationCompleteL(
+        MVPbkStoreContact* aContact, TInt aIndex)
+    {
+    LOGSTRING("CEasyDialingContactDataManager: DoHandleContactOperationCompleteL");
+    if (aContact)
+        {
+        
+        __ASSERT_DEBUG((!iStoreContact && !iImageOperation), User::Panic(_L("CEasyDialingContactDataManager"), 1));
+        iStoreContact = aContact;
+        
+        // Find out the available communication methods for the contact.
+        GetAvailableServicesL( aContact, aIndex );
+        
+                
+        // Next initiate async thumbnail get operation.
+        
+        if(GetContactThumbnailSetting()) // reads the iContactThumbnailSetting value if it is false we dont fetch images
+            {
+            if (iImageManager->HasImage(*iStoreContact, *iThumbnailFieldType))
+                {
+                iImageOperation = iImageManager->GetImageAsyncL(
+                        &iImageManagerParams,
+                        *iStoreContact,
+                        *iThumbnailFieldType,
+                        *this);
+                }
+            }
+        if (!iImageOperation)
+            {
+            CEasyDialingContactData *tn = iContactDataArray[aIndex];
+            tn->LoadingComplete();
+            LOGSTRING1("iWaitingContacts.Remove %d", iWaitingContacts[0]);            
+            iWaitingContacts.Remove(0);
+            delete iStoreContact;
+            iStoreContact = NULL;
+            LoadNextContactDataL();
+            InformObserver();
+            }
+        }
+    else
+        {
+        // Protective coding. If aContact is NULL, act like opening the contact link failed.
+        CEasyDialingContactData *tn = iContactDataArray[aIndex];
+        tn->LoadingComplete();
+        LOGSTRING1("iWaitingContacts.Remove %d", iWaitingContacts[0]);            
+        iWaitingContacts.Remove(0);
+        LoadNextContactDataL();
+        InformObserver();
+        }
+    LOGSTRING("CEasyDialingContactDataManager: DoHandleContactOperationCompleteL Exit");
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::GetAvailableServicesL
+//
+// Reads from parameter contact which services, i.e. communication methods,
+// can be used with this contact. 
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::GetAvailableServicesL( MVPbkStoreContact* aContact, TInt aIndex )
+    {
+    LOGSTRING1("CEasyDialingContactDataManager: GetAvailableServicesL index = %d", aIndex);
+    TVPbkStoreContactAnalyzer analyzer( *iContactManager, aContact );
+    
+    CEasyDialingContactData* contactData = iContactDataArray[aIndex];
+    
+    // Voice call is available if either circuit-switched call or voip call is available.
+    TBool csdCall = (analyzer.HasFieldL( VPbkFieldTypeSelectorFactory::EVoiceCallSelector ) != KErrNotFound);
+    TBool voipCall = (analyzer.HasFieldL( VPbkFieldTypeSelectorFactory::EVOIPCallSelector ) != KErrNotFound);
+    
+    contactData->SetVoiceCallAvailable( csdCall || voipCall );
+    
+    contactData->SetVideoCallAvailable(
+            analyzer.HasFieldL( VPbkFieldTypeSelectorFactory::EVideoCallSelector ) != KErrNotFound );
+    
+    contactData->SetUniEditorAvailable(
+            analyzer.HasFieldL( VPbkFieldTypeSelectorFactory::EUniEditorSelector ) != KErrNotFound );
+    
+    LOGSTRING("CEasyDialingContactDataManager: GetAvailableServicesL Exit");
+    }
+
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::VPbkSingleContactOperationComplete
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::VPbkSingleContactOperationComplete(
+        MVPbkContactOperationBase& aOperation,
+        MVPbkStoreContact* aContact )
+    {
+    LOGSTRING("CEasyDialingContactDataManager: VPbkSingleContactOperationComplete");
+    delete &aOperation;
+    iContactOperation = NULL;
+    TInt index = iWaitingContacts[0];
+    LOGSTRING1("VPbkSingleContactOperationComplete, Index=%d", index);
+    TRAPD(err, DoHandleContactOperationCompleteL(aContact, index));
+    if (err)
+        {
+        HandleError(err);
+        }
+    LOGSTRING("CEasyDialingContactDataManager: VPbkSingleContactOperationComplete Exit");
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::VPbkSingleContactOperationFailed
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::VPbkSingleContactOperationFailed(
+        MVPbkContactOperationBase& /*aOperation*/, 
+        TInt aError )
+    {
+    LOGSTRING("CEasyDialingContactDataManager: VPbkSingleContactOperationFailed");
+    delete iContactOperation;
+    iContactOperation = NULL;
+    HandleError(aError);
+    LOGSTRING("CEasyDialingContactDataManager: VPbkSingleContactOperationFailed Exit");
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::InformObserver
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::InformObserver()
+    {
+    if (iObserver && !iWaitingContacts.Count())
+        {
+        iObserver->AllContactDataLoaded();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::SetContactThumbnailSetting
+// ---------------------------------------------------------------------------
+//
+void CEasyDialingContactDataManager::SetContactThumbnailSetting( TInt aContactThumbnailSetting )
+    {
+    iContactThumbnailSetting = aContactThumbnailSetting;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::GetContactThumbnailSetting
+// ---------------------------------------------------------------------------
+//
+TBool CEasyDialingContactDataManager::GetContactThumbnailSetting( )
+    {
+     return iContactThumbnailSetting;
+    }
+
+// ---------------------------------------------------------------------------
+// CEasyDialingContactDataManager::Reload
+// ---------------------------------------------------------------------------
+//
+void  CEasyDialingContactDataManager::Reload( )
+    {
+    LOGSTRING("CEasyDialingContactDataManager: Reload");
+    for ( TInt i = 0 ; i < iContactDataArray.Count() ; i++ )
+        {
+        iContactDataArray[ i ]->DeleteThumbnail();
+        }
+    }
+
+// TODO: open item: sorting of favourites
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialinglistbox.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,537 @@
+/*
+* 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:  Easy dialing list box.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "easydialinglistbox.h"
+#include "easydialinglistboxview.h"
+#include "easydialinglistboxitemdrawer.h"
+#include "easydialinglistboxdata.h"
+#include "easydialingpanics.h"
+#include "easydialingcontactdatamanager.h"
+#include "easydialingcrkeys.h"
+
+#include <easydialingpluginresources.rsg>
+
+#include <phoneappcommands.hrh>
+#include <phonebook2.mbg>
+#include <phonebook2ece.mbg>
+
+#include <ccappcommlauncherpluginrsc.rsg>
+
+// AvKON and drawing header files
+
+#include <aknpointereventsuppressor.h> 
+#include <aknlongtapdetector.h> // Required for touch
+#include <AknsFrameBackgroundControlContext.h>
+#include <AknInfoPopupNoteController.h>  // tooltips
+
+#include <aknlayoutscalable_apps.cdl.h>
+#include <layoutmetadata.cdl.h>
+#include <gulicon.h>
+#include <centralrepository.h>
+#include <bautils.h>    // for BaflUtils
+
+#include <aknlistloadertfx.h>
+#include <aknlistboxtfxinternal.h>
+#include <aknlistboxtfx.h>
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+extern TRect ContactImageBoundingBox( const TRect& aItemRect );
+extern TRect ActionMenuIconBoundingBox(const TRect& aItemRect);
+
+// CONSTANTS
+static const TInt KListBoxMarginWidth = 2;
+static const TInt KMaxVisibleItemsPortrait = 3;
+static const TInt KMaxVisibleItemsLandscape = 2;
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+
+/*
+ * ==============================================================================
+ * 
+ * 
+ * class CEasyDialingListBox
+ * 
+ * 
+ * ==============================================================================
+ */
+
+
+// -----------------------------------------------------------------------------
+// CEasyDialingListBox
+// 
+// -----------------------------------------------------------------------------
+//
+CEasyDialingListBox::CEasyDialingListBox() :
+    CEikFormattedCellListBox()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// ~CEasyDialingListBox
+// 
+// -----------------------------------------------------------------------------
+//
+CEasyDialingListBox::~CEasyDialingListBox()
+    {
+    delete iBGContext;    
+    delete iLongTapDetector;
+    }
+
+// -----------------------------------------------------------------------------
+// ConstructL
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::ConstructL( TInt aFlags, 
+        CEasyDialingContactDataManager* aContactDataManager )
+    {
+    CEikFormattedCellListBox::ConstructL( NULL, aFlags );
+    
+    iLongTapDetector = CAknLongTapDetector::NewL( this );
+ 
+    CEasyDialingListBoxItemDrawer* drawer = static_cast<CEasyDialingListBoxItemDrawer*> (iItemDrawer);
+    CEasyDialingListBoxData* data = drawer->EasyDialingCellData();
+    data->SetContactDataManager(aContactDataManager);
+    data->SetEDLBXControl(this);
+    
+    iBGContext = CAknsFrameBackgroundControlContext::NewL( KAknsIIDQsnFrPopupSub,
+            Rect(), Rect(), EFalse );
+       
+    // ContactDataManager is accessed from SizeChanged. If list item size
+    // changes -> thumbnail size changes
+    iContactDataManager = aContactDataManager;
+    
+    drawer->SetColors();
+
+    CreateScrollBarFrameL( ETrue );
+    ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
+    }
+
+
+// -----------------------------------------------------------------------------
+// MakeViewClassInstanceL
+// 
+// -----------------------------------------------------------------------------
+//
+CListBoxView* CEasyDialingListBox::MakeViewClassInstanceL()
+    {
+    return (new ( ELeave ) CEasyDialingListBoxView);
+    }
+
+
+// -----------------------------------------------------------------------------
+// ItemDrawer
+// 
+// -----------------------------------------------------------------------------
+//
+CEasyDialingListBoxItemDrawer* CEasyDialingListBox::ItemDrawer() const
+    {
+    return (CEasyDialingListBoxItemDrawer*) iItemDrawer;
+    }
+
+
+// -----------------------------------------------------------------------------
+// FocusChanged
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::FocusChanged( TDrawNow aDrawNow )
+    {
+    if ( !IsFocused() )
+        {
+        CEasyDialingListBoxView* view = static_cast<CEasyDialingListBoxView*>( iView );
+        view->SetCurrentItemIndexToNone();
+        
+        // Invalidate window area. 
+        // This fixes the drawing problem that the top 
+        // of listbox is not always redrawn on the area that overlaps 
+        // the status pane area. 
+        // TODO: This overlapping no longer happens in 9.2 so this may
+        // now be unnecessary.
+        Window().Invalidate();
+        }
+    CEikFormattedCellListBox::FocusChanged( aDrawNow );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CreateItemDrawerL
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::CreateItemDrawerL()
+    {
+    CEasyDialingListBoxData* celldata = CEasyDialingListBoxData::NewL();
+    CleanupStack::PushL( celldata );
+    iItemDrawer = new(ELeave) CEasyDialingListBoxItemDrawer(Model(), iEikonEnv->NormalFont(), celldata);
+    CleanupStack::Pop( celldata );  
+    }
+
+
+// -----------------------------------------------------------------------------
+// Draw
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::Draw(const TRect& aRect) const
+    {
+    MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iItemDrawer->Gc() );
+    if ( transApi )
+        {
+        transApi->SetListType( MAknListBoxTfxInternal::EListBoxTypeMainPane );
+        transApi->BeginRedraw( MAknListBoxTfxInternal::EListView, this->Rect() );
+        }
+    
+    if (!iView->RedrawDisabled() )
+        {
+        TRect clientRect( Rect() );
+        TRect viewRect = iView->ViewRect();
+        
+        if ( transApi )
+            {
+            transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
+            }
+
+        AknsDrawUtils::BackgroundBetweenRects( 
+            AknsUtils::SkinInstance(), 
+            iBGContext, 
+            this, 
+            *iItemDrawer->Gc(), 
+            clientRect, 
+            viewRect );
+        
+        if ( transApi )
+            {
+            transApi->StopDrawing();
+            }
+        }
+    
+    if ( iModel->NumberOfItems() )
+        {
+        // Draw the actual list
+        iView->Draw(&aRect);
+        }
+    if ( transApi )
+        {
+        transApi->EndViewRedraw( aRect );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// HandleResourceChange
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::HandleResourceChange(TInt aType)
+    {
+    CEikFormattedCellListBox::HandleResourceChange( aType );
+    iSBFrame->VerticalScrollBar()->HandleResourceChange( aType );
+    iSBFrame->DrawScrollBarsNow();
+    ItemDrawer()->SetColors();
+    
+    // Base call to HandleResourceChange justifies the list to even items
+    // on the top. This causes problems when listbox height is not a multiple of
+    // listitem heights. Fix scrolling manually for these cases.
+    TRAP_IGNORE( HandleItemAdditionL() ); // needed to prevent drawing problems
+    TInt scrollIndex = ( IsFocused() ? CurrentItemIndex() : iNumberOfNames - 1 );
+    ScrollToMakeItemVisible( scrollIndex );
+    
+    DrawDeferred();
+    }
+
+
+// -----------------------------------------------------------------------------
+// SizeChanged
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::SizeChanged()
+    {
+    CEikFormattedCellListBox::SizeChanged();
+    
+    // Set the listbox colors.
+    // For some reason, calling this in HandleResourceChange is not enough, it does
+    // not get called in situation it should.
+    ItemDrawer()->SetColors();
+   
+    // resize scroll bar
+    if ( iSBFrame )
+        {
+        TAknLayoutRect rect;
+        TInt variety = ( Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0 );
+    
+        TAknWindowComponentLayout viewLayout( AknLayoutScalable_Apps::dia3_list_pane( variety ) );
+        rect.LayoutRect( Rect(), viewLayout );
+        TRect viewRect( rect.Rect() );
+        // Add a bit of margin around the view as layout doesn't define any
+        viewRect.Shrink( KListBoxMarginWidth, KListBoxMarginWidth );
+        
+        TAknWindowComponentLayout scrollBarLayout( AknLayoutScalable_Apps::scroll_pane_cp12() );
+        rect.LayoutRect( Rect(), scrollBarLayout );
+        TRect scrollBarRect( rect.Rect() );
+
+        iView->SetViewRect( viewRect );
+        
+        CAknDoubleSpanScrollBar* scrollbar = static_cast <CAknDoubleSpanScrollBar*>( iSBFrame->VerticalScrollBar() );
+
+        scrollbar->SetFixedLayoutRect( scrollBarRect );
+        scrollbar->SetRect( scrollBarRect );
+        
+        TRect viewAndScrollBarRect( viewRect );
+        
+        if ( AknLayoutUtils::LayoutMirrored() )
+            {
+            viewAndScrollBarRect.iTl = scrollBarRect.iTl;
+            }
+        else
+            {
+            viewAndScrollBarRect.iBr = scrollBarRect.iBr;
+            }
+        iBGContext->SetFrameRects( Rect(), viewAndScrollBarRect );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// MopSupplyObject
+// 
+// -----------------------------------------------------------------------------
+//
+TTypeUid::Ptr CEasyDialingListBox::MopSupplyObject( TTypeUid aId )
+    {
+    if ( aId.iUid == MAknsControlContext::ETypeId && iBGContext )
+        {
+        return MAknsControlContext::SupplyMopObject( aId, iBGContext );
+        }
+    return CEikFormattedCellListBox::MopSupplyObject( aId );    
+    }
+
+// -----------------------------------------------------------------------------
+// MakeVisible
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::MakeVisible( TBool aVisible )
+    {
+    if ( aVisible != IsVisible() )
+        {
+        CEikFormattedCellListBox::MakeVisible( aVisible );
+        if ( iSBFrame )
+            {
+            CEikScrollBar* sb = iSBFrame->GetScrollBarHandle( CEikScrollBar::EVertical );
+            if ( sb )
+                {
+                sb->MakeVisible( aVisible );
+                if ( aVisible )
+                    {
+                    UpdateScrollBarThumbs();
+                    }
+                }
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// SetMaxRect
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::SetMaxRect( TRect aMaxRect )
+    {
+    iMaxRect = aMaxRect;
+
+    // Update the list item size according the maximum view rect size
+    TInt variety = ( Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0 );
+    TAknLayoutRect maxViewLayout;
+    maxViewLayout.LayoutRect( aMaxRect, AknLayoutScalable_Apps::dia3_list_pane( variety ) );
+    TRect maxViewRect( maxViewLayout.Rect() );
+    maxViewRect.Shrink( KListBoxMarginWidth, KListBoxMarginWidth ); // layout data doens't include any margins but we have added some
+    
+    TInt maxItemsShown = ( variety ? KMaxVisibleItemsLandscape : KMaxVisibleItemsPortrait );
+    TInt itemHeight = maxViewRect.Height() / maxItemsShown;
+    TRAP_IGNORE( SetItemHeightL( itemHeight ) );
+
+    // Calculate new thumbnail rect from item size
+    TSize itemSize( maxViewRect.Width(), itemHeight );
+    TRect thumbnailRect = ContactImageBoundingBox( itemSize );
+    iContactDataManager->SetThumbnailSize( thumbnailRect.Size() ); // reloads thumbnails if the new size is different from old one
+
+    // Inform listbox data class about changed list item size
+    ItemDrawer()->EasyDialingCellData()->HandleItemSizeChange();
+    }
+
+// -----------------------------------------------------------------------------
+// SetRectToNumberOfItems
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::SetRectToNumberOfItems( TInt aNumberOfNames ) 
+    {
+    iNumberOfNames = aNumberOfNames;
+
+    TRect listboxRect( iMaxRect );
+    
+    // Make listbox smaller if maximum size is not needed to show
+    // all list items.
+    TInt requiredHeight = GetHeightBasedOnNumberOfItems( iNumberOfNames );
+    if ( requiredHeight < listboxRect.Height() )
+        {
+        // Shrink rect height so that bottom of the rect doesn't move
+        listboxRect.iTl.iY += ( listboxRect.Height() - requiredHeight );
+        }
+    
+    SetRect( listboxRect );
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// SetFocusedWithKeyEventL
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CEasyDialingListBox::SetFocusedWithKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
+    {
+    TKeyResponse keyResponse = EKeyWasNotConsumed;
+    TInt keyCode = aKeyEvent.iCode;
+            
+    // Disable redrawing temporarily.
+    // This is because OfferKeyEventL puts the focus to the wrong item,
+    // and we don't want to show it flashing there.
+    // Make sure that no leave happens before redraw is enabled again.
+    iView->SetDisableRedraw( ETrue );
+        
+    TRAP_IGNORE( keyResponse = OfferKeyEventL( aKeyEvent, aType ) );
+    
+    TInt itemToFocus = ( keyCode == EKeyUpArrow ? iNumberOfNames - 1 : 0 );
+    ScrollToMakeItemVisible( itemToFocus );
+    SetCurrentItemIndex( itemToFocus );
+        
+    iView->SetDisableRedraw( EFalse );
+    
+    DrawDeferred();
+    
+    return keyResponse;
+    }
+
+
+// -----------------------------------------------------------------------------
+// GetHeightBasedOnNumberOfItems
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingListBox::GetHeightBasedOnNumberOfItems( TInt aNum ) const
+    {
+    return ( ItemHeight()*aNum + KListBoxMarginWidth*2 ); 
+    }
+
+
+// -----------------------------------------------------------------------------
+// CurrentContactDataIndex
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingListBox::CurrentContactDataIndex()
+    {
+    if ( CurrentItemIndex() >= 0 ) 
+        {
+        TPtrC itemText = Model()->ItemText( CurrentItemIndex() );
+        TPtrC indexText;
+        
+        TInt error = TextUtils::ColumnText( indexText , 0, &itemText );
+        __ASSERT_DEBUG( error == KErrNone, EasyDialingPanic( EEasyDialingPanicInvalidListBoxModelString ) );
+
+        TUint id( 0 );
+        TLex lex( indexText );
+        error = lex.Val( id, EHex );
+        __ASSERT_DEBUG( error == KErrNone, EasyDialingPanic( EEasyDialingPanicInvalidListBoxModelString ) );
+        
+        return id;
+        }
+    else 
+        {
+        return KErrNotFound;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CurrentContactLinkLC
+// 
+// -----------------------------------------------------------------------------
+//
+HBufC8* CEasyDialingListBox::CurrentContactLinkLC()
+    {
+    TInt index = CurrentContactDataIndex();
+    return iContactDataManager->ContactLinkLC( index );
+    }
+
+
+// -----------------------------------------------------------------------------
+// HandleLongTapEventL
+// Callback from CAknLongTapDetector.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::HandleLongTapEventL( const TPoint& /*aPenEventLocation*/, 
+                                               const TPoint& /*aPenEventScreenLocation*/ )
+    {
+    ReportListBoxEventL( static_cast<MEikListBoxObserver::TListBoxEvent>
+            ( KEasyDialingContactLongTapped ) );
+    iPointerLongPressHandled = ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// HandlePointerEventL
+// Pointer event handling within the EasyDialingListBox.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBox::HandlePointerEventL(const TPointerEvent& aPointerEvent)
+    {
+    // Button down event starts new pointer press. Reset flags at this point.
+    if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
+        {
+        iPointerLongPressHandled = EFalse;
+        }
+    
+    iLongTapDetector->PointerEventL(aPointerEvent);
+    if ( iPointerLongPressHandled )
+        {
+        // No further handling is made after long tap on list item
+        // has been detected.
+        return;
+        }
+
+    CEikFormattedCellListBox::HandlePointerEventL( aPointerEvent );
+    }
+
+
+// end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialinglistboxdata.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,1319 @@
+/*
+* 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:  Easy dialing list box data.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "easydialinglistboxdata.h"
+#include "easydialinglistbox.h"
+#include "easydialinglistboxview.h"
+#include "easydialinglistboxitemdrawer.h"
+#include "easydialingpanics.h"
+
+#include "easydialingcontactdatamanager.h"
+#include <easydialing.mbg>
+#include <phonebook2.mbg>
+#include <phonebook2ece.mbg>
+
+// AvKON and drawing header files
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <akniconconfig.h>
+#include <gulicon.h>
+#include <AknBidiTextUtils.h>
+#include <bidivisual.h>
+
+#include <aknlistloadertfx.h>
+#include <aknlistboxtfxinternal.h>
+#include <aknlistboxtfx.h>
+
+#include <akntransitionutils.h>
+#include <avkon.rsg>
+
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+// CONSTANTS
+
+// KHighlightSeparatorChar is character used to separate matching and non-matching
+// portions of contact names. 
+const TInt KHighlightSeparatorChar = 0x1F;
+_LIT( KHighlightSeparatorCharAsLit, "\x1F" );
+
+
+// KContactNameFontHeightPercent is contact name font height relative to list item height.
+const TInt KContactNameFontHeightPercent = 35;
+
+// KCompanyNameFontHeightPercent is company name font height relative to list item height.
+const TInt KCompanyNameFontHeightPercent = 30;
+
+// KTextBoundingBoxHeightPercent gives the text bounding box height in percentages 
+// relative to font height. This must be over 100, or part of the text cuts off.
+const TInt KTextBoundingBoxHeightPercent = 120;
+
+// KTextPlacementPercent controls how text is placed vertically within its bounding box. 
+// The value is between 0 and 100. 0 means in top part, 50 mean in the middle, 100 means in the
+// bottom. 
+const TInt KTextPlacementPercent = 70;
+
+// KMarginXPercent defines a width of horizontal margin used in many places. In relation to
+// the width of the item rectangle.
+const TInt KMarginXPercent = 2;
+
+// KMarginYPercent defines a height of vertical margin. In relation to
+// the height of the item rectangle. Currently used only with contact thumbnail.
+const TInt KMarginYPercent = 4;
+
+// KContacNameYOffsetPercent defines the vertical placement of contact name in relation to 
+// item height.
+const TInt KContactNameYOffsetPercent = 10;
+
+// KCompanyNameYOffsetPercent defines the vertical placement of company name in relation to 
+// item height.
+const TInt KCompanyNameYOffsetPercent = 60;
+
+// KArrowIconSizePercent defines the size of action menu icon relative to item height.
+const TInt KArrowIconSizePercent = 20;
+
+// KMatchingTextMarginInPixels the absolute pixel width of highlight margin. Highlight margin
+// is an extra space in highlight boundary to make the text look less crowded.
+const TInt KMatchingTextMarginInPixels = 3;
+
+// KMatchingTextMarginInPixels is the absolute pixel value for rounding used in highlight 
+// rectangle.
+const TInt KHighligthRectangleRoundingYInPixels = 4;
+
+// KThumbnailAspectRatio is the aspect ratio of contact thumbnail in percents. 133 for instance
+// is 4:3 aspect ration.
+const TInt KThumbnailAspectRatio = 133;
+
+const TInt KCent = 100;
+
+const TInt KMaxRunInfoArrayCount = 20;
+
+// IMPLEMENTATION SPECIFIC CONSTANTS
+// The mif file from where you would like to show the 
+// icon on the screen.
+_LIT( KFavouriteIconBitmapFile, "\\resource\\apps\\phonebook2.mif" );
+_LIT( KEasyDialingBitmapFile, "\\resource\\apps\\easydialing.mif" );
+_LIT( KPhonebook2EceBitmapFile, "\\resource\\apps\\phonebook2ece.mif" );
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+// MODULE DATA STRUCTURES
+
+// GLOBAL FUNCTION PROTOTYPES
+TRect ContactImageBoundingBox( const TRect& aItemRect );
+TRect ArrowIconBoundingBox(const TRect& aItemRect);
+
+// LOCAL FUNCTION PROTOTYPES
+static TRect ContactNameBoundingBox(
+        const TRect& aItemRect, 
+        const CFont* aContactNameFont, 
+        TBool aIsCurrentItem,
+        TBool aIsFavourite, 
+        TBool aThumbnailsShown );
+static TRect CompanyNameBoundingBox(
+        const TRect& aItemRect, 
+        const CFont* aCompanyNameFont, 
+        TBool aIsCurrentItem,
+        TBool aThumbnailsShown );
+static TRect FavouriteIconBoundingBox( const TRect& aContactNameBoundingBox, TInt aTextWidth );
+static TRect MirrorLayoutBoundingBox(const TRect& aSourceRect, TRect& aBoundingBoxRect);
+static TInt BaseLineOffset( const TRect& aTextBoundingBox, const CFont* aFont );
+static TBool ContainsRightToLeftText( const TDesC& aDesc );
+static TInt HighlightSeparatorCount( const TDesC& aText );
+static HBufC* ConvertToVisualAndClipLC( const TDesC& aText, const CFont& aFont, const TRect& aBoundingBox ); 
+
+static void ClipTextToWidth(
+        TDes& aText,
+        const CFont& aFont,
+        TInt aMaxWidthInPixels,
+        TBool& aMatch );
+
+static TBool DrawPieceOfText(
+        const TRect& aBoundingBox,
+        TInt& aXOffset,
+        CWindowGc &aGc, 
+        const TDesC& aText,
+        TBool aMatch,
+        const CFont* aFont,
+        const CEasyDialingListBoxData::TExtendedColors& aColors,
+        TBool aHighLight);
+
+static TInt DrawTextWithMatchHighlightL(
+        const TRect& aBoundingBox,
+        CWindowGc &aGc, 
+        const TDesC& aText,
+        const CFont* aFont,
+        const CEasyDialingListBoxData::TExtendedColors& aColors,
+        TBool aHighLight );
+
+static TInt CalculateTextWidth(
+        const TRect& aBoundingBox,
+        const TDesC& aText,
+        const CFont* aFont );
+
+static TBool CalculateTextPieceWidth(
+        const TRect& aBoundingBox,
+        TInt& aXOffset,
+        const TDesC& aText,
+        TBool aMatch,
+        const CFont* aFont );
+
+// FORWARD DECLARATIONS
+
+
+/*
+ * ==============================================================================
+ * 
+ * 
+ * class EasyDialingListBoxData::TExtendedColors
+ * 
+ * 
+ * ==============================================================================
+ */
+
+
+// -----------------------------------------------------------------------------
+// TExtendedColors
+// 
+// -----------------------------------------------------------------------------
+//       
+CEasyDialingListBoxData::TExtendedColors::TExtendedColors() :
+CFormattedCellListBoxData::TColors(),
+iMatchingText(KRgbBlack),
+iMatchingBack(KRgbDarkYellow)
+    {
+    }
+
+
+/*
+ * ==============================================================================
+ * 
+ * 
+ * class CEasyDialingListBoxData
+ * 
+ * 
+ * ==============================================================================
+ */
+
+
+// -----------------------------------------------------------------------------
+// CEasyDialingListBoxData
+// 
+// -----------------------------------------------------------------------------
+//       
+CEasyDialingListBoxData::CEasyDialingListBoxData() :
+CFormattedCellListBoxData()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// Destructor
+// 
+// -----------------------------------------------------------------------------
+//       
+CEasyDialingListBoxData::~CEasyDialingListBoxData()
+    {
+    // Release fonts. ReleaseFont function can cope with null pointer
+    // so we don't need to null check them.
+    CWsScreenDevice& screenDev = *( CEikonEnv::Static()->ScreenDevice() );
+    screenDev.ReleaseFont( iContactNameFont );
+    screenDev.ReleaseFont( iCompanyNameFont );
+    
+    delete iArrowPointingRight;
+    delete iArrowPointingLeft;
+    delete iColorBitmap;
+    delete iDummyThumbnail;
+    
+    iContactDataManager = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// NewL
+// 
+// -----------------------------------------------------------------------------
+//       
+CEasyDialingListBoxData* CEasyDialingListBoxData::NewL()
+    {
+    CEasyDialingListBoxData* self = new (ELeave) CEasyDialingListBoxData();
+    
+    CleanupStack::PushL( self );
+    self->ConstructLD();
+    CleanupStack::Pop( self );
+ 
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// DrawData
+// 
+// -----------------------------------------------------------------------------
+//       
+void CEasyDialingListBoxData::DrawData(
+    const TListItemProperties& aProperties, 
+    CWindowGc& aGc,
+    const TDesC* aText,
+    const TRect& aRect,
+    TBool aHighlight,
+    const TExtendedColors& aColors ) const
+    {
+    const TRect &aItemRect = aRect;
+    
+    if ( aHighlight )
+        {
+        DrawHighlight( aGc, aItemRect );
+        }
+    
+    // Draw the actual items.
+    DrawDataFormatted( aProperties, aGc, aText, aItemRect, 
+            aHighlight, aColors );
+    }
+
+
+// -----------------------------------------------------------------------------
+// ConstructLD
+// 
+// -----------------------------------------------------------------------------
+//       
+void CEasyDialingListBoxData::ConstructLD()
+    {
+    CFormattedCellListBoxData::ConstructLD();
+    
+    // EasyDialing bitmap file is attempted to be read from the same directory where the
+    // executed binary is located
+    TFileName dllFileName;
+    Dll::FileName( dllFileName );
+     
+    TParse parse;
+    User::LeaveIfError(parse.Set(KEasyDialingBitmapFile, &dllFileName, NULL));
+    TFileName bitmapFileName(parse.FullName());
+      
+    CFbsBitmap* bm;
+    CFbsBitmap* mask;
+    
+    // iArrowPointingLeft is the icon displayed for the selected item in EasyDialingListBox
+    AknIconUtils::CreateIconL( bm, mask, bitmapFileName, EMbmEasydialingQgn_indi_org_arrow_left, 
+            EMbmEasydialingQgn_indi_org_arrow_left_mask );
+
+    iArrowPointingLeft = CGulIcon::NewL( bm, mask );
+
+    AknIconUtils::CreateIconL( bm, mask, bitmapFileName, EMbmEasydialingQgn_indi_org_arrow_right, 
+            EMbmEasydialingQgn_indi_org_arrow_right_mask );
+
+    iArrowPointingRight = CGulIcon::NewL( bm, mask );
+
+    // Only mask for the icons are used. iColorBitmap is used for making the icon 
+    // to follow text color changes according to skin.
+    iColorBitmap = new (ELeave) CFbsBitmap;
+
+    // Contact default thumbnail is not available in themes. It is read from phonebook resource. 
+    AknIconUtils::CreateIconL( bm, mask, KPhonebook2EceBitmapFile,
+            EMbmPhonebook2eceQgn_prop_pb_thumb_unknown, EMbmPhonebook2eceQgn_prop_pb_thumb_unknown_mask );
+    iDummyThumbnail = CGulIcon::NewL( bm, mask );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+// DrawHighlight
+// 
+// -----------------------------------------------------------------------------
+//       
+void CEasyDialingListBoxData::DrawHighlight( CWindowGc &aGc, const TRect &aItemRect ) const
+    {
+    MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( &aGc );
+    if ( transApi )
+        {
+        transApi->Invalidate(MAknListBoxTfxInternal::EListHighlight );
+        transApi->BeginRedraw( MAknListBoxTfxInternal::EListHighlight, aItemRect );
+        transApi->StartDrawing( MAknListBoxTfxInternal::EListHighlight );
+        aGc.SetClippingRect( iControl->Rect() );
+        }
+
+    TAknLayoutRect outerRect;
+    TAknLayoutRect innerRect;
+    outerRect.LayoutRect( aItemRect, TAknWindowComponentLayout::Compose(
+            AknLayoutScalable_Avkon::list_highlight_pane_cp1(),
+            AknLayoutScalable_Avkon::list_highlight_pane_g10_cp1() ).LayoutLine() );
+    innerRect.LayoutRect( aItemRect, TAknWindowComponentLayout::Compose(
+            AknLayoutScalable_Avkon::list_highlight_pane_cp1(),
+            AknLayoutScalable_Avkon::list_highlight_pane_g1_cp1() ).LayoutLine() );
+    MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
+
+    if ( !cc ) 
+        {
+        cc = SkinBackgroundContext();
+        }
+
+    if ( cc )
+        {
+        aGc.SetPenStyle( CGraphicsContext::ENullPen );
+        AknsDrawUtils::DrawFrame(
+                AknsUtils::SkinInstance(), 
+                aGc,
+                outerRect.Rect(),
+                innerRect.Rect(),
+                KAknsIIDQsnFrList,
+                KAknsIIDQsnFrListCenter );
+        }
+
+    if ( transApi )
+        {
+        aGc.CancelClippingRect();
+        transApi->StopDrawing();
+        transApi->EndRedraw( MAknListBoxTfxInternal::EListHighlight );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// DrawDataFormatted
+// 
+// -----------------------------------------------------------------------------
+// 
+// ToDo: SetSize function could be called once for all static data in SizeChanged.
+// Applies at least to icons.
+void CEasyDialingListBoxData::DrawDataFormatted( 
+        TListItemProperties /* aProperties */,
+        CWindowGc& aGc,
+        const TDesC* aText,
+        const TRect& aItemRect,
+        TBool aHighlight,
+        const TExtendedColors& aColors ) const
+    {
+    TPtrC cellText;
+
+    TInt error = TextUtils::ColumnText( cellText , 0, aText );
+    __ASSERT_DEBUG( error == KErrNone, EasyDialingPanic( EEasyDialingPanicInvalidListBoxModelString ) );
+    __ASSERT_DEBUG( iContactNameFont, EasyDialingPanic( EEasyDialingNoFontFound ) );
+    __ASSERT_DEBUG( iCompanyNameFont, EasyDialingPanic( EEasyDialingNoFontFound ) );
+    
+    MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
+    if ( transApi )
+        {
+        transApi->StartDrawing( MAknListBoxTfxInternal::EListItem );
+        if ( transApi->EffectsDisabled() )
+            {
+            aGc.SetClippingRect( iControl->Rect() );
+            }
+        }
+
+    TRect boundingBox = ContactImageBoundingBox( aItemRect );
+    if ( AknLayoutUtils::LayoutMirrored() )
+        {
+        boundingBox = MirrorLayoutBoundingBox( aItemRect, boundingBox );
+        }
+    
+    //Draws the Contact Thumbnail Icon if exists else draws the dummy contact thumbnail
+    TBool fav = ContactThumbnailDrawing( aGc, boundingBox, cellText );   
+
+    error = TextUtils::ColumnText( cellText , 1, aText );
+    __ASSERT_DEBUG( error == KErrNone, EasyDialingPanic( EEasyDialingPanicInvalidListBoxModelString ) );
+
+    boundingBox = ContactNameBoundingBox( aItemRect,
+                                          iContactNameFont,
+                                          aHighlight,
+                                          fav,
+                                          iContactDataManager->GetContactThumbnailSetting() );
+    TRect nameRectUnMirrored = boundingBox; // used for favourite star drawing
+
+    if ( AknLayoutUtils::LayoutMirrored() )
+        {
+        boundingBox = MirrorLayoutBoundingBox( aItemRect, boundingBox );
+        }
+
+    // favourite icon size is set the same as contact name bounding box height.
+    TInt favouriteIconSize = boundingBox.Height();
+    
+    TRect arrowRect = ArrowIconBoundingBox( aItemRect );
+    if ( AknLayoutUtils::LayoutMirrored() )
+        {
+        arrowRect = MirrorLayoutBoundingBox( aItemRect, arrowRect );
+        }
+    
+    // Draw arrow icon if the item is in focus.
+    if ( aHighlight )
+        {
+        DrawArrowIcon( aGc, arrowRect );
+        }
+
+    TInt textWidth( 0 );
+    TInt err( KErrNone );
+    TRAP( err, textWidth = DrawTextWithMatchHighlightL(
+            boundingBox, aGc, cellText, iContactNameFont, aColors, aHighlight ) );
+
+    if ( !err && TextUtils::ColumnText( cellText , 2, aText ) == KErrNone ) 
+        {
+        TRect companyNameBoundingBox = CompanyNameBoundingBox( 
+                aItemRect, iCompanyNameFont, aHighlight, iContactDataManager->GetContactThumbnailSetting() );
+        if ( AknLayoutUtils::LayoutMirrored() )
+            {
+            companyNameBoundingBox = MirrorLayoutBoundingBox( aItemRect, companyNameBoundingBox );
+            }
+        TRAP( err, DrawTextWithMatchHighlightL(
+                companyNameBoundingBox, aGc, cellText, iCompanyNameFont, aColors, aHighlight ) );
+        }
+
+    if ( !err && fav )
+        {
+        // Draws the Favourite Icon
+        DrawFavouriteIcon( aGc, nameRectUnMirrored, textWidth, aItemRect );
+        }
+    
+    if ( transApi )
+        {
+        aGc.CancelClippingRect();
+        transApi->StopDrawing();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// ContactThumbnailDrawing
+// 
+// Draws the Contact Thumbnail Icon if any else draws the dummy contact thumbnail
+// -----------------------------------------------------------------------------
+
+TBool CEasyDialingListBoxData::ContactThumbnailDrawing(CWindowGc& aGc, TRect aBoundingBox, TPtrC aCellText) const
+    {
+    TBool fav(EFalse);
+    CFbsBitmap* thumbnail(NULL);
+    TBool isLoaded = iContactDataManager->GetThumbnailAndFav(aCellText, thumbnail, fav);
+    if ( isLoaded && thumbnail )
+        {
+        // center the thumbnail in its rect
+        TSize size(thumbnail->SizeInPixels());
+        TInt xOffset = (aBoundingBox.Width() - size.iWidth) / 2;
+        TInt yOffset = (aBoundingBox.Height() - size.iHeight) / 2;
+        TPoint tl(aBoundingBox.iTl.iX + xOffset, aBoundingBox.iTl.iY + yOffset);
+        TRect sourceRect( TPoint(0,0),size);
+        aGc.BitBlt(tl, thumbnail, sourceRect);
+        }
+    else if ( isLoaded && iContactDataManager->GetContactThumbnailSetting() )
+        {
+        // draw dummy thumnbnail, but only if we know that the contact doesn't
+        // have a thumbnail, and thumbnail drawing is enabled.
+        AknIconUtils::SetSize(iDummyThumbnail->Bitmap(), aBoundingBox.Size());
+        AknIconUtils::SetSize(iDummyThumbnail->Mask(), aBoundingBox.Size());
+        aGc.BitBltMasked( aBoundingBox.iTl, iDummyThumbnail->Bitmap(),
+                TRect( TPoint(0,0), aBoundingBox.Size() ), 
+                iDummyThumbnail->Mask(), ETrue );
+        }
+    return fav;
+    }
+
+
+// -----------------------------------------------------------------------------
+// DrawArrowIcon
+//  Draws the Action Menu 
+// -----------------------------------------------------------------------------
+void CEasyDialingListBoxData::DrawArrowIcon( 
+        CWindowGc& aGc, TRect aArrowRect) const
+    {
+    // Action Menu Arrow for opening the Action Menu
+    if ( AknLayoutUtils::LayoutMirrored() )
+        {
+        // For mirrored layout the UI logic is mirrored as well
+        AknIconUtils::SetSize( iArrowPointingLeft->Mask(), aArrowRect.Size() );
+        aGc.BitBltMasked( aArrowRect.iTl, iColorBitmap,
+                TRect( TPoint(0,0), aArrowRect.Size() ), 
+                iArrowPointingLeft->Mask(), ETrue );
+
+        }
+    else
+        {
+        AknIconUtils::SetSize( iArrowPointingRight->Mask(), aArrowRect.Size() );
+        aGc.BitBltMasked( aArrowRect.iTl, iColorBitmap,
+                TRect( TPoint(0,0), aArrowRect.Size() ), 
+                iArrowPointingRight->Mask(), ETrue );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// DrawFavouriteIcon
+// 
+// Draws the Favourite Icon
+// -----------------------------------------------------------------------------
+void CEasyDialingListBoxData::DrawFavouriteIcon(
+        CWindowGc& aGc, 
+         TRect aNameRectUnMirrored,
+         TInt aTextWidth,
+         TRect aEffectiveRect) const
+    {
+    CFbsBitmap* favouriteIcon;
+    CFbsBitmap* favouriteIconMask;
+    TRect favouriteIconBoundingBox;
+
+    favouriteIconBoundingBox = FavouriteIconBoundingBox( aNameRectUnMirrored, aTextWidth );
+
+    if ( AknLayoutUtils::LayoutMirrored() )
+        {
+        favouriteIconBoundingBox = MirrorLayoutBoundingBox(aEffectiveRect, favouriteIconBoundingBox);
+        }
+
+    aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
+    TRect sourceRect( TPoint(0,0), favouriteIconBoundingBox.Size() );
+
+    if( AknsUtils::SkinInstance()->GetCachedItemData(KAknsIIDQgnFsContactsFavorite) )
+        {
+        AknsDrawUtils::DrawCachedImage( AknsUtils::SkinInstance(), aGc, sourceRect, 
+                KAknsIIDQgnFsContactsFavorite );
+        }
+    else
+        {
+        // Create the bitmap and mask to draw.
+        TRAP_IGNORE( AknIconUtils::CreateIconL(favouriteIcon, favouriteIconMask, KFavouriteIconBitmapFile, 
+                EMbmPhonebook2Qgn_prop_pb_topc, EMbmPhonebook2Qgn_prop_pb_topc_mask ));
+
+        // Set size for the bitmap and mask
+        AknIconUtils::SetSize(favouriteIcon, favouriteIconBoundingBox.Size());
+        AknIconUtils::SetSize(favouriteIconMask, favouriteIconBoundingBox.Size());
+        aGc.BitBltMasked( favouriteIconBoundingBox.iTl , favouriteIcon, sourceRect, favouriteIconMask, ETrue);
+        }
+    }
+// -----------------------------------------------------------------------------
+// SetContactDataManager
+// 
+// -----------------------------------------------------------------------------
+// 
+void CEasyDialingListBoxData::SetContactDataManager(CEasyDialingContactDataManager* aContactDataManager)
+    {
+    iContactDataManager = aContactDataManager;
+    }
+
+// -----------------------------------------------------------------------------
+// HandleItemSizeChange
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBoxData::HandleItemSizeChange()
+    {
+    TInt height = iControl->ItemHeight();
+    TSize size( height, height );
+    TRAP_IGNORE( UpdateColorBitmapL( size ) );
+    
+    // Obtain fonts.
+    ObtainFonts( height );
+    
+    // TODO: also bounding boxes could be updated and stored here
+    }
+
+// -----------------------------------------------------------------------------
+// ObtainFonts
+// 
+// -----------------------------------------------------------------------------
+//       
+void CEasyDialingListBoxData::ObtainFonts( TInt aItemHeight )
+    {
+    CWsScreenDevice& screenDev = *( CEikonEnv::Static()->ScreenDevice() );
+    
+    // Release previous fonts. ReleaseFont function can cope with null pointers
+    // so we don't need to null check them.
+    screenDev.ReleaseFont( iContactNameFont );
+    screenDev.ReleaseFont( iCompanyNameFont );
+    
+    // Get a logical font to a basis for our own fonts.
+    const CFont* logicalFont = AknLayoutUtils::FontFromId( EAknLogicalFontSecondaryFont );
+
+    // Extract font information
+    TFontSpec fontSpec = logicalFont->FontSpecInTwips();
+    
+    // Calculate contact name font height in TWIPs.
+    TInt fontHeightPixels = aItemHeight * KContactNameFontHeightPercent / KCent;
+    TInt fontHeightTwips = screenDev.VerticalPixelsToTwips( fontHeightPixels );
+    
+    // Set height, weight, and posture.
+    fontSpec.iHeight = fontHeightTwips;
+    fontSpec.iFontStyle.SetStrokeWeight( EStrokeWeightBold );
+    fontSpec.iFontStyle.SetPosture( EPostureUpright );
+    
+    // Obtain contact name font
+    TInt err = screenDev.GetNearestFontToDesignHeightInTwips( iContactNameFont, fontSpec );
+    __ASSERT_DEBUG( err == KErrNone, EasyDialingPanic( EEasyDialingNoFontFound ) ); 
+    
+    // Calculate company name font height in TWIPs.
+    fontHeightPixels = aItemHeight * KCompanyNameFontHeightPercent / KCent;
+    fontHeightTwips = screenDev.VerticalPixelsToTwips( fontHeightPixels );
+    fontSpec.iHeight = fontHeightTwips;
+    fontSpec.iFontStyle.SetStrokeWeight( EStrokeWeightNormal );
+    
+    // Obtain company name font.  
+    err = screenDev.GetNearestFontToDesignHeightInTwips( iCompanyNameFont, fontSpec );
+    __ASSERT_DEBUG( err == KErrNone, EasyDialingPanic( EEasyDialingNoFontFound ) ); 
+   }
+
+
+// -----------------------------------------------------------------------------
+// UpdateColorBitmapL
+// ColorBitmap is redrawn when UI layout or text color (Theme) changes
+// -----------------------------------------------------------------------------
+//       
+void CEasyDialingListBoxData::UpdateColorBitmapL( const TSize& aSize )
+    {
+    TRgb color;
+    // Get the HighLighted text color in ListBox from the Theme
+    AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color, 
+                               KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG10 );
+    
+    // Create a bitmap with the similar display mode than what the device currently
+    // uses for using it as an offscreen bitmap
+    AknIconConfig::TPreferredDisplayMode mode;
+    AknIconConfig::PreferredDisplayMode( mode, AknIconConfig::EImageTypeOffscreen );
+    User::LeaveIfError( iColorBitmap->Create( aSize, mode.iBitmapMode ) );
+
+    // Create a new drawing device and graphics context for enabling drawing to
+    // the offscreen bitmap
+    CFbsBitmapDevice* destinationDevice = CFbsBitmapDevice::NewL( iColorBitmap );
+    CleanupStack::PushL(destinationDevice);
+
+    CFbsBitGc* destinationGc;
+    User::LeaveIfError( destinationDevice->CreateContext( destinationGc ) );
+
+    // Set the color and style for pen and brush and draw a rectangle to the
+    // bitmap graphics
+    destinationGc->SetPenColor( color );
+    destinationGc->SetPenStyle( CGraphicsContext::ESolidPen );
+    destinationGc->SetBrushColor( color );
+    destinationGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
+    destinationGc->DrawRect( TRect( TPoint( 0,0 ), aSize ) );
+
+    // Colorbitmap is ready, cleanup
+    delete destinationGc;    
+    CleanupStack::PopAndDestroy(destinationDevice); 
+    }
+
+// -----------------------------------------------------------------------------
+// SetEDLBXControl
+// 
+// -----------------------------------------------------------------------------
+//       
+void CEasyDialingListBoxData::SetEDLBXControl(CEasyDialingListBox* aControl)
+    {
+    iControl = aControl;
+    }
+
+
+/*
+ * ==============================================================================
+ * 
+ * Local functions
+ * 
+ * ==============================================================================
+ */
+
+
+// -----------------------------------------------------------------------------
+// ContactImageBoundingBox
+// Calculates the area where contact thumbnail is confined
+// -----------------------------------------------------------------------------
+//
+TRect ContactImageBoundingBox(const TRect& aItemRect)
+    {
+    TInt leftMargin = aItemRect.Width() * KMarginXPercent / KCent;
+    TInt topMargin = KMarginYPercent * aItemRect.Height() / KCent;
+    TInt bottomMargin = topMargin;
+    TInt width = ((aItemRect.Height() - topMargin - bottomMargin) * KThumbnailAspectRatio) / KCent;
+
+    return TRect(
+            aItemRect.iTl.iX + leftMargin,
+            aItemRect.iTl.iY + topMargin,
+            aItemRect.iTl.iX + leftMargin + width,
+            aItemRect.iBr.iY - bottomMargin);  
+    }
+
+// -----------------------------------------------------------------------------
+// ContactNameBoundingBox
+// Calculates the area to which the contact name and possible match highlights
+// are confined.
+//      
+// -----------------------------------------------------------------------------
+//
+static TRect ContactNameBoundingBox(
+        const TRect& aItemRect,
+        const CFont* aContactNameFont,
+        TBool aIsCurrentItem,
+        TBool aIsFavourite,
+        TBool aThumbnailsShown )
+    {
+    // Position X will contain the starting position of text from left side of item rect.
+    TInt positionX = aItemRect.Width() * KMarginXPercent / KCent;
+    
+    if (aThumbnailsShown)
+        {
+        // If contact image is shown, text starts from right side of contact picture + margin.
+        TRect contactImageBoundingBox = ContactImageBoundingBox( aItemRect );
+        positionX += contactImageBoundingBox.Width();
+        positionX += aItemRect.Width() * KMarginXPercent / KCent;
+        }
+    
+    TInt topMargin = KContactNameYOffsetPercent * aItemRect.Height() / KCent;
+    TInt height = KTextBoundingBoxHeightPercent * aContactNameFont->FontMaxHeight() / KCent;
+    TInt rightMargin = KMarginXPercent * aItemRect.Width() / KCent;
+    
+    // Reserve space for communication launcher icon.
+    // Communication launcher icon is shown only id item is highlighted.
+    if ( aIsCurrentItem )
+        {
+        rightMargin += KArrowIconSizePercent * aItemRect.Height() / KCent;
+        }
+    
+    // If item is favourite, reserve space for favourite icon. Icon dimensions are the same as bounding box height.
+    if ( aIsFavourite )
+        {
+        rightMargin += height;
+        }
+    
+    return TRect(
+        aItemRect.iTl.iX + positionX,
+        aItemRect.iTl.iY + topMargin,
+        aItemRect.iTl.iX + aItemRect.Width() - rightMargin,
+        aItemRect.iTl.iY + topMargin + height);
+    }
+
+
+// -----------------------------------------------------------------------------
+// CompanyNameBoundingBox
+// Calculates the area to which the company name and possible match highlights
+// are confined.
+// -----------------------------------------------------------------------------
+//
+static TRect CompanyNameBoundingBox(
+        const TRect& aItemRect, 
+        const CFont* aCompanyNameFont, 
+        TBool aIsCurrentItem,
+        TBool aThumbnailsShown )
+    {
+    // Position X will contain the starting position of text from left side of item rect.
+    TInt positionX = aItemRect.Width() * KMarginXPercent / KCent;
+    
+    if (aThumbnailsShown)
+        {
+        // If contact image is show, text starts from right side of contact picture + margin.
+        TRect contactImageBoundingBox = ContactImageBoundingBox( aItemRect );
+        positionX += contactImageBoundingBox.Width();
+        positionX += aItemRect.Width() * KMarginXPercent / KCent;
+        }
+    
+    TInt topMargin = KCompanyNameYOffsetPercent * aItemRect.Height() / KCent;
+    TInt height = KTextBoundingBoxHeightPercent * aCompanyNameFont->FontMaxHeight() / KCent;
+    TInt rightMargin = KMarginXPercent * aItemRect.Width() / KCent;
+
+    // Reserve space for communication launcher icon.
+    // Communication launcher icon is shown only id item is highlighted.
+    if ( aIsCurrentItem )
+        {
+        rightMargin += KArrowIconSizePercent * aItemRect.Height() / KCent;
+        }
+    
+    return TRect(
+        aItemRect.iTl.iX + positionX,
+        aItemRect.iTl.iY + topMargin,
+        aItemRect.iTl.iX + aItemRect.Width() - rightMargin,
+        aItemRect.iTl.iY + topMargin + height);
+    }
+
+
+// -----------------------------------------------------------------------------
+// ArrowIconBoundingBox
+// Calculates the area to which the action menu icon is drawn.
+// -----------------------------------------------------------------------------
+//
+TRect ArrowIconBoundingBox(const TRect& aItemRect)
+    {
+    TInt iconSize = KArrowIconSizePercent * aItemRect.Height() / KCent;
+    TInt rightMargin = KMarginXPercent * aItemRect.Width() / KCent;
+    TInt positionX = aItemRect.iBr.iX - rightMargin - iconSize;
+    TInt topMargin = ( aItemRect.Height() - iconSize ) / 2; // Icon is vertically centered.
+
+    return TRect(
+        positionX,
+        aItemRect.iTl.iY + topMargin,
+        positionX + iconSize,
+        aItemRect.iTl.iY + topMargin + iconSize );
+    }
+
+
+// -----------------------------------------------------------------------------
+// FavouriteIconBoundingBox
+// Calculates the area to which the favourite icon is drawn.
+// Because favourite icon is drawn in the same line with contact name,
+// this function takes contact name bounding box as the parameter, not
+// the whole item rect. 
+// -----------------------------------------------------------------------------
+//
+static TRect FavouriteIconBoundingBox( const TRect& aContactNameBoundingBox, TInt aTextWidth )
+    {
+    return TRect(
+            aContactNameBoundingBox.iTl.iX + aTextWidth,
+            aContactNameBoundingBox.iTl.iY,
+            aContactNameBoundingBox.iTl.iX + aTextWidth + aContactNameBoundingBox.Height(),
+            aContactNameBoundingBox.iBr.iY);
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// BaseLineOffset
+//
+// -----------------------------------------------------------------------------
+//
+static TInt BaseLineOffset( const TRect& aTextBoundingBox, const CFont* aFont )
+    {
+    TInt fontHeight = aFont->FontMaxHeight();
+    TInt topMargin = KTextPlacementPercent * (aTextBoundingBox.Height() - fontHeight) / KCent;
+    return fontHeight + topMargin - aFont->FontMaxDescent();
+    }
+
+
+// -----------------------------------------------------------------------------
+// MirrorLayoutBoundingBox
+//
+// -----------------------------------------------------------------------------
+//
+static TRect MirrorLayoutBoundingBox(const TRect& aSourceRect, TRect& aBoundingBoxRect)
+    {
+    return TRect(
+            aSourceRect.iTl.iX + aSourceRect.iBr.iX - aBoundingBoxRect.iBr.iX,
+            aBoundingBoxRect.iTl.iY,
+            aSourceRect.iTl.iX + aSourceRect.iBr.iX - aBoundingBoxRect.iTl.iX,
+            aBoundingBoxRect.iBr.iY);
+    }
+
+
+// -----------------------------------------------------------------------------
+// ClipTextToWidth
+// Cuts the text in the given pixel width. Also considers match highlight
+// issues.
+// NOTE: Can change the aMatch parameter if considers that there is too little
+// width for matching highlight.
+// NOTE 2: This function cannot handle right-to-left or bidirectional text currently.
+// These cases must be handled elsewhere.
+// -----------------------------------------------------------------------------
+//
+
+_LIT( KThreeDots, "..." );
+
+static void ClipTextToWidth(
+        TDes& aText,
+        const CFont& aFont,
+        TInt aMaxWidthInPixels,
+        TBool& aMatch)
+    {
+    TInt minimumWidth = aFont.TextWidthInPixels( KThreeDots );
+    
+    // If this is a matching piece of text, also match text marginals need to be counted.
+    if ( aMatch )
+        {
+        minimumWidth += 2 * KMatchingTextMarginInPixels;
+        }
+    
+    if ( minimumWidth > aMaxWidthInPixels )
+        {
+        
+        // Not enough space for any text. 
+        aText.Zero();
+        aMatch = EFalse; // No match highlight shown.
+        return;
+        }
+    
+    if ( aMatch )
+        {
+        aMaxWidthInPixels -= 2 * KMatchingTextMarginInPixels;
+        }
+    
+    AknTextUtils::ClipToFit( aText, aFont, aMaxWidthInPixels );    
+    }
+
+
+// -----------------------------------------------------------------------------
+// DrawPieceOfText
+// Draws a piece of text of contact, either matching or not matching.
+// Updates aXOffset argument by adding drawn text width.
+//
+// @return: ETrue, if there was enough space for the text to draw. 
+// NOTE: CWindowGc font must be set before calling this function. 
+// -----------------------------------------------------------------------------
+//
+static TBool DrawPieceOfText(
+        const TRect& aBoundingBox,
+        TInt& aXOffset,
+        CWindowGc &aGc, 
+        const TDesC& aText,
+        TBool aMatch,
+        const CFont* aFont,
+        const CEasyDialingListBoxData::TExtendedColors& aColors,
+        TBool aHighLight )
+    {    
+    if (aText.Length() == 0) 
+        {
+        return ETrue;
+        }
+    
+    HBufC* newText = aText.Alloc();
+    if ( !newText )
+        {
+        return EFalse;
+        }
+    
+    TPtr textPtr = newText->Des();
+    
+    // textWidth is the width needed for the text. 
+    TInt textWidth = AknBidiTextUtils::MeasureTextBoundsWidth( *aFont, textPtr, CFont::TMeasureTextInput::EFVisualOrder );
+    
+    // whole width includes also possible highlight margins. 
+    TInt wholeWidth = textWidth + ( aMatch ? 2 * KMatchingTextMarginInPixels : 0);
+    
+    // availableWidth is the space left for drawing. 
+    TInt availableWidth = aBoundingBox.Width() - aXOffset;
+    
+    if ( availableWidth < wholeWidth )
+        {
+        ClipTextToWidth( textPtr, *aFont, availableWidth, aMatch );
+        wholeWidth = availableWidth;
+        if ( aMatch )
+            {
+            textWidth = wholeWidth - (2 * KMatchingTextMarginInPixels);
+            }
+        else
+            {
+            textWidth = wholeWidth;
+            }
+        }
+    
+    // textBox is rectangle for text without highlight.
+    TRect textBox( aBoundingBox );
+    textBox.iTl.iX += aXOffset;
+    textBox.iBr.iX = textBox.iTl.iX + textWidth;
+    
+    TInt baseLineOffset = BaseLineOffset( textBox, aFont );
+    
+    if ( aMatch )
+        {
+        // highlightBox rectangle for text with highlight.
+        // Compared to no highlight, it has extra margins on both sides.
+        TRect highlightBox( textBox );
+        highlightBox.iBr.iX = highlightBox.iTl.iX + wholeWidth;
+        
+        // Also boundingBox is shifted right for one margin width.
+        textBox.iTl.iX += KMatchingTextMarginInPixels;
+        textBox.iBr.iX += KMatchingTextMarginInPixels;
+       
+        // Outline of matching highlight is of same colour as text.
+        // This looks quite OK.
+        aGc.SetPenColor( aColors.iMatchingText );
+        aGc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+        aGc.SetBrushColor( aColors.iMatchingBack );
+        
+        aGc.DrawRoundRect( highlightBox, TSize( KMatchingTextMarginInPixels, KHighligthRectangleRoundingYInPixels ) );
+        
+        aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
+        }
+    else 
+        {
+        if ( aHighLight )
+            {
+            aGc.SetPenColor( aColors.iHighlightedText );                 
+            }
+        else 
+            {
+            aGc.SetPenColor( aColors.iText );                   
+            }
+        }
+    
+    aGc.DrawText( textPtr, textBox, baseLineOffset );
+    delete newText;
+    aXOffset += wholeWidth;
+    return ETrue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// DrawTextWithMatchHighlight
+// Draws a string with match highlight. Highlighted and non-highlighted
+// parts are separated with KHighlightSeparatorChar.
+// The first text part is not highlighted and from that on highlight
+// is on on every other text piece.
+// 
+// -----------------------------------------------------------------------------
+//
+static TInt DrawTextWithMatchHighlightL(
+        const TRect& aBoundingBox,
+        CWindowGc &aGc, 
+        const TDesC& aText,
+        const CFont* aFont,
+        const CEasyDialingListBoxData::TExtendedColors& aColors,
+        TBool aHighLight)
+    {
+    TInt xOffset = 0;
+    
+    HBufC* visualBuf = ConvertToVisualAndClipLC( aText, *aFont, aBoundingBox );
+    
+    TInt calculatedTextWidth = CalculateTextWidth( aBoundingBox, *visualBuf, aFont );
+    
+    if ( AknLayoutUtils::LayoutMirrored() )
+        {
+        xOffset = aBoundingBox.Width() - calculatedTextWidth;
+        }
+    TPtrC textPiece;
+    TInt textPieceIndex = 0;
+    TBool match = EFalse;
+
+    aGc.UseFont( aFont );
+    aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
+
+    while ( TextUtils::ColumnText( textPiece , textPieceIndex, visualBuf, KHighlightSeparatorChar) == KErrNone ) 
+        {
+        if (! DrawPieceOfText( aBoundingBox, xOffset, aGc, textPiece, match, aFont, aColors, aHighLight ))
+            {
+            // If there was not enough space for this piece of text, exit the loop stop drawing further pieces.
+            break;
+            }
+
+        // Toggle match
+        match = !match;
+
+        ++textPieceIndex;
+        }
+    
+    CleanupStack::PopAndDestroy( visualBuf );
+
+    aGc.DiscardFont();
+    
+    return calculatedTextWidth;
+    }
+
+// -----------------------------------------------------------------------------
+// CalculateTextWidth
+// Calculates the width of the text and returns it 
+// -----------------------------------------------------------------------------
+//
+static TInt CalculateTextWidth(const TRect& aBoundingBox, const TDesC& aText, const CFont* aFont )
+    {
+    
+    TInt xOffset = 0;
+    TPtrC textPiece;
+    TInt textPieceIndex = 0;
+    TBool match = EFalse;
+
+    while ( TextUtils::ColumnText( textPiece , textPieceIndex, &aText, KHighlightSeparatorChar) == KErrNone ) 
+        {
+        if (! CalculateTextPieceWidth( aBoundingBox, xOffset, textPiece, match, aFont ))
+            {
+            // If there was not enough space for this piece of text, exit the loop stop drawing further pieces.
+            break;
+            }
+
+        // Toggle match
+        match = !match;
+
+        ++textPieceIndex;
+        }
+
+    return xOffset;
+    }
+
+// -----------------------------------------------------------------------------
+// CalculateTextPieceWidth
+// 
+// Calculates the width of the text piece of highlighted text. 
+// The function is aware of the available width for the text, and can take
+// possible clippings into account. 
+//
+// The available width is given by parameters aBoundingBox (space for all text
+// pieces) and aXOffset (now much of that space has already been used).
+//
+// The function adds the text width to the aXOffset reference parameter.
+// Returns EFalse, if there is no more space for new text pieces, otherwise
+// ETrue.
+//
+// This function contains the same logic as function DrawPieceOfText.
+// -----------------------------------------------------------------------------
+//
+static TBool CalculateTextPieceWidth(
+        const TRect& aBoundingBox,
+        TInt& aXOffset,
+        const TDesC& aText,
+        TBool aMatch,
+        const CFont* aFont )
+    {    
+    if (aText.Length() == 0) 
+        {
+        return ETrue;
+        }
+
+    // textWidth is the width needed for the text. 
+    TInt textWidth = AknBidiTextUtils::MeasureTextBoundsWidth( *aFont, aText, CFont::TMeasureTextInput::EFVisualOrder );
+
+    // whole width includes also possible highlight margins. 
+    TInt wholeWidth = textWidth + ( aMatch ? 2 * KMatchingTextMarginInPixels : 0);
+
+    // availableWidth is the space left for drawing. 
+    TInt availableWidth = aBoundingBox.Width() - aXOffset;
+
+    if ( availableWidth < wholeWidth )
+        {
+
+        // We get to this branch, if there is not enough space for the text piece.
+        HBufC* newText = aText.Alloc();
+        if ( !newText )
+            {
+            return EFalse;
+            }
+
+        TPtr textPtr = newText->Des();
+        
+        // Clip the text so that it fits the space.
+        ClipTextToWidth( textPtr, *aFont, availableWidth, aMatch );
+
+        if ( textPtr.Length() > 0 )
+            {
+            wholeWidth = AknBidiTextUtils::MeasureTextBoundsWidth( *aFont, textPtr, CFont::TMeasureTextInput::EFVisualOrder );
+            wholeWidth += (aMatch ? 2 * KMatchingTextMarginInPixels : 0);
+
+            aXOffset += wholeWidth;
+            }
+
+        delete newText;
+
+        return EFalse;
+        }
+
+    aXOffset += wholeWidth;
+
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// ContainsRightToLeftText
+// 
+// Returns true if argument descriptor contains right-to-left text.
+// -----------------------------------------------------------------------------
+//
+static TBool ContainsRightToLeftText( const TDesC& aDesc )
+    {
+    TBool rtlFound = EFalse;
+    
+    // TRunInfoArray contains information of the directionalities of the different sections of the aText    
+    TBidirectionalState::TRunInfo array[ KMaxRunInfoArrayCount ];
+    
+    // Initialize the TBidiLogicalToVisual converter for making the conversion from logical to visual order
+    TBidiLogicalToVisual converter( aDesc, array, KMaxRunInfoArrayCount );
+    
+    // Do the reordering. Amount of different directionality sections is returned.
+    TInt count( converter.Reorder() );
+    // If there are more directionality blocks than we are prepared to handle, just ignore
+    // the rest. Those shouldn't fit the screen anyway.
+    count = Min( count, KMaxRunInfoArrayCount );
+    
+    for ( TInt i = 0 ; i < count && !rtlFound ; i++ )
+        {
+        // iDirection is 0 for left-to-right text.
+        if (array[i].iDirection)
+            {
+            rtlFound = ETrue;
+            }
+        }
+
+    return rtlFound;
+    }
+
+// -----------------------------------------------------------------------------
+// ConvertToVisualAndClipL
+// 
+// Clip bidirectional text to given box and convert it to visual order, ensuring
+// that the match highlights don't get broken in the process. Result is given
+// as new heap descriptor which is left to CleanupStack.
+// NOTE1: No clipping happens here if given descriptor contains only 
+// left-to-right text. 
+// NOTE2: It's assumed that there can be highlights only in pure LTR and RTL
+// texts. Highlights for mixed LTR-RTL text cannot be handled properly.
+// -----------------------------------------------------------------------------
+//
+static HBufC* ConvertToVisualAndClipLC( const TDesC& aText, 
+                                       const CFont& aFont, 
+                                       const TRect& aBoundingBox )
+    {
+    HBufC* buf = HBufC::NewLC( aText.Length() + KAknBidiExtraSpacePerLine );
+    TPtr ptr = buf->Des();
+    ptr.Copy( aText );
+    
+    // Calling AknBidiTextUtils::ConvertToVisualAndClip doesn't work correctly 
+    // with the highlight separator characters (they are not considered to be 
+    // zero-length). To minimise the problem, we call the function only when 
+    // necessary, i.e. when given text really contains RTL text. This should be 
+    // considered as temporary solutions because now the problem of excessive 
+    // truncation still remains with RTL languages.
+    if ( ContainsRightToLeftText( ptr ) )
+        {
+        AknBidiTextUtils::ConvertToVisualAndClipL(
+                ptr, aFont, aBoundingBox.Width(),
+                aBoundingBox.Width() );
+        
+        // If there's an odd number of highlight separators in the RTL text, 
+        // then the matching and and not-matching parts have gone 
+        // off-sync in the visual conversion (because parts are drawn starting 
+        // from left and first part is always interpreted as not-matching part).
+        // Fix this by adding one highlight separator.
+        TInt sepCount = HighlightSeparatorCount( ptr );
+        if ( sepCount % 2 )
+            {
+            if ( ptr.Length() == ptr.MaxLength() )
+                {
+                // There's no more space available. We need to reallocate the 
+                // buffer in order to fit the extra separator character.
+                HBufC* newBuf = buf->ReAllocL( buf->Length() + 1 );
+                CleanupStack::Pop( buf ); // original buf deleted by ReAllocL
+                buf = newBuf;
+                CleanupStack::PushL( buf );
+                ptr.Set( buf->Des() );
+                }
+            ptr.Insert( 0, KHighlightSeparatorCharAsLit );
+            }
+        }
+    
+    return buf;
+    }
+
+// -----------------------------------------------------------------------------
+// HighlightSeparatorCount
+// 
+// Returns number of match highlight separator characters in the text
+// -----------------------------------------------------------------------------
+//
+static TInt HighlightSeparatorCount( const TDesC& aText )
+    {
+    TInt len = aText.Length();
+    TInt sepCount = 0;
+    
+    for ( TInt i = 0; i < len; i++ )
+        {
+        if ( aText[i] == KHighlightSeparatorChar )
+            {
+            sepCount++;
+            }
+        }
+    
+    return sepCount;
+    }
+
+//  End of File.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialinglistboxitemdrawer.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,288 @@
+/*
+* 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:  Easy dialing listbox list item drawer.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "easydialinglistboxitemdrawer.h"
+#include "easydialinglistboxdata.h"
+#include "easydialinglistbox.h"
+#include "easydialinglistboxview.h"
+
+#include <aknlistloadertfx.h>
+#include <aknlistboxtfxinternal.h>
+#include <aknlistboxtfx.h>
+
+#include <akntransitionutils.h>
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+// CONSTANTS
+
+const TInt KTextColorFallBack = 215;
+const TInt KMatchingTextColorFallBack  = 0;
+const TInt KMatchingTextBackgroundFallBack = 243;
+
+// FORWARD DECLARATIONS
+
+/*
+ * ==============================================================================
+ * 
+ * 
+ * class CEasyDialingListBoxItemDrawer
+ * 
+ * 
+ * ==============================================================================
+ */
+
+// -----------------------------------------------------------------------------
+// CEasyDialingListBoxItemDrawer
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CEasyDialingListBoxItemDrawer::CEasyDialingListBoxItemDrawer(
+        MTextListBoxModel* aTextListBoxModel, 
+        const CFont* aFont, 
+        CFormattedCellListBoxData* aFormattedCellData) :
+        CFormattedCellListBoxItemDrawer( aTextListBoxModel, aFont, aFormattedCellData)
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// EasyDialingCellData
+// 
+// -----------------------------------------------------------------------------
+//       
+CEasyDialingListBoxData* CEasyDialingListBoxItemDrawer::EasyDialingCellData() const
+    {
+    return STATIC_CAST( CEasyDialingListBoxData*, iData );
+    }
+
+
+// -----------------------------------------------------------------------------
+// DrawItem
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBoxItemDrawer::DrawItem( 
+    TInt aItemIndex, 
+    TPoint aItemRectPos, 
+    TBool aItemIsSelected, 
+    TBool aItemIsCurrent, 
+    TBool aViewIsEmphasized, 
+    TBool aViewIsDimmed) const 
+    {
+    CFormattedCellListBoxItemDrawer::DrawItem( aItemIndex, aItemRectPos, aItemIsSelected, aItemIsCurrent, aViewIsEmphasized, aViewIsDimmed);  
+    }
+
+
+// -----------------------------------------------------------------------------
+// DrawItemText
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBoxItemDrawer::DrawItemText( 
+    TInt aItemIndex,
+    const TRect& aItemTextRect,
+    TBool aItemIsCurrent,
+    TBool aViewIsEmphasized,
+    TBool /* aItemIsSelected */) const
+    {
+    MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( iGc );
+    if ( transApi )
+        {
+        transApi->StartDrawing( MAknListBoxTfxInternal::EListNotSpecified );
+        }
+        
+    iGc->SetPenColor(iTextColor);
+    iGc->SetBrushColor(iBackColor);
+
+    TPtrC temp=iModel->ItemText(aItemIndex);
+
+    SetupGc(aItemIndex);
+    if ( transApi )
+        {
+        transApi->StopDrawing();
+        }
+
+//    TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse());
+
+    CEasyDialingListBoxData::TExtendedColors colors;
+    colors.iText=iTextColor;
+    colors.iBack=iBackColor;
+    colors.iHighlightedText = iHighlightedTextColor;
+    colors.iHighlightedBack = iHighlightedBackColor;
+    colors.iMatchingText = iMatchingText;
+    colors.iMatchingBack = iMatchingBack;
+
+    DrawBackgroundAndSeparatorLines( aItemTextRect );
+
+    TBool highlightShown = ETrue;
+    if ( ( FormattedCellData()->RespectFocus() && !aViewIsEmphasized ) )
+        {
+        if ( transApi )
+            {
+            transApi->Remove( MAknListBoxTfxInternal::EListHighlight );
+            }
+
+        highlightShown = EFalse;
+        }
+    
+    // normal drawing without mark icon
+    EasyDialingCellData()->DrawData(
+            Properties(aItemIndex),
+            *iGc,
+            &temp,
+            aItemTextRect,
+            aItemIsCurrent && highlightShown,
+            colors );
+    
+    //currently few themes doesnt support IsListSeperatorLines method therefore it is commented out
+    // for the time being in the below if loop
+    
+    if ( /*AknsDrawUtils::IsListSeperatorLines( AknsUtils::SkinInstance() ) &&*/ aItemTextRect.iTl.iY > iViewRect.iTl.iY )
+        {
+        if ( transApi )
+            {
+            transApi->StartDrawing( MAknListBoxTfxInternal::EListItem );
+            }
+
+        TRgb lineColor;
+        TInt retVal = AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), lineColor, KAknsIIDFsLineColors, 
+                EAknsCIFsLineColorsCG1);
+        // we are fetching lineColor from the skin.Incase, if there isn't any lineColor then we are using
+        //iMatchingBack as a backup line Color
+        if( retVal == KErrNone)
+            {
+            iGc->SetPenColor(lineColor);
+            }
+        else
+            {
+            iGc->SetPenColor(iMatchingBack);
+            }
+        iGc->SetPenStyle(CGraphicsContext::ESolidPen);
+        iGc->DrawLine( aItemTextRect.iTl, TPoint( aItemTextRect.iBr.iX, aItemTextRect.iTl.iY) );
+        
+        if ( transApi )
+            {
+            transApi->StopDrawing();
+            }
+        }
+    }
+        
+
+// -----------------------------------------------------------------------------
+// SetColors
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBoxItemDrawer::SetColors()
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance(); 
+    
+    if ( !skin ) 
+        {
+        // These values are copied from "aknlist.cpp".
+        // This branch should be never take, and can be considered protective programming.
+        iTextColor = AKN_LAF_COLOR_STATIC( KTextColorFallBack);
+        iHighlightedTextColor = AKN_LAF_COLOR_STATIC( KTextColorFallBack );
+        iMatchingText = AKN_LAF_COLOR_STATIC( KMatchingTextColorFallBack );
+        iMatchingBack = AKN_LAF_COLOR_STATIC( KMatchingTextBackgroundFallBack );
+        }
+    
+    else 
+        {
+        AknsUtils::GetCachedColor( skin,
+                iTextColor,
+                KAknsIIDQsnTextColors,
+                EAknsCIQsnTextColorsCG7 );
+        
+        AknsUtils::GetCachedColor( skin,
+                iHighlightedTextColor,
+                KAknsIIDQsnTextColors,
+                EAknsCIQsnTextColorsCG10 );
+        
+        AknsUtils::GetCachedColor( skin,
+                iMatchingText,
+                KAknsIIDQsnTextColors,
+                EAknsCIQsnTextColorsCG24 );
+        
+        AknsUtils::GetCachedColor( skin,
+                iMatchingBack,
+                KAknsIIDQsnHighlightColors,
+                EAknsCIQsnHighlightColorsCG2 );  
+        }
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// DrawBackgroundAndSeparatorLines
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBoxItemDrawer::DrawBackgroundAndSeparatorLines( const TRect& aItemTextRect ) const
+    {
+    CCoeControl* control = FormattedCellData()->Control();    
+
+    MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( iGc );
+    
+    if ( transApi && !transApi->EffectsDisabled() )
+        {
+        MAknListBoxTfx* tfxApi = CAknListLoader::TfxApi( iGc );
+
+        if ( tfxApi )
+            {
+            tfxApi->EnableEffects( ETrue );
+            }
+        }
+
+    if ( transApi )
+        {
+        transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
+        }
+    TBool bgDrawn( EFalse );
+    
+    if ( control )
+        {        
+        MAknsControlContext *cc = AknsDrawUtils::ControlContext( control );
+                
+        bgDrawn = AknsDrawUtils::DrawBackground( 
+                AknsUtils::SkinInstance(), 
+                cc, 
+                control, 
+                *Gc(), 
+                aItemTextRect.iTl, 
+                aItemTextRect, 
+                KAknsDrawParamDefault );        
+        }
+    
+    if ( !bgDrawn )
+        {
+        iGc->Clear( aItemTextRect );
+        }
+    if ( transApi )
+        {
+        transApi->StopDrawing();
+        }
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialinglistboxview.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,78 @@
+/*
+* 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:  Easy dialing listbox view.
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "easydialinglistboxview.h"
+#include "easydialinglistbox.h"
+#include "easydialinglistboxitemdrawer.h"
+#include "easydialinglistboxdata.h"
+#include "easydialingcontactdatamanager.h"
+#include <phonebook2.mbg>
+#include <phonebook2ece.mbg>
+
+#include <ccappcommlauncherpluginrsc.rsg>
+
+// AvKON and drawing header files
+#include <aknlayoutscalable_avkon.cdl.h>
+
+#include <aknlistloadertfx.h>
+#include <aknlistboxtfxinternal.h>
+#include <aknlistboxtfx.h>
+
+#include <akntransitionutils.h>
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+// CONSTANTS
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+/*
+ * ==============================================================================
+ * 
+ * 
+ * class CEasyDialingListBoxView
+ * 
+ * 
+ * ==============================================================================
+ */
+
+
+// -----------------------------------------------------------------------------
+// SetCurrentItemIndexToNone
+// 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingListBoxView::SetCurrentItemIndexToNone()
+    {
+    iCurrentItemIndex = -1;
+    }
+
+//  End of File.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialingplugin.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,1892 @@
+/*
+* 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:  Easy dialing plugin.
+*
+*/
+
+// INCLUDE FILES
+
+#include "easydialingplugin.h"
+#include "easydialinglistbox.h"
+#include "easydialinglogger.h"
+#include "easydialingpanics.h"
+#include "easydialingcenreplistener.h"
+#include "easydialingcontactdatamanager.h"
+#include "easydialingutils.h"
+#include <easydialingpluginresources.rsg>
+
+// AVKON and drawing header files
+#include <gdi.h>
+#include <aknlists.h>
+#include <AknUtils.h>
+#include <e32cmn.h>
+#include <bidivisual.h>
+
+// Predictive search header files
+#include <CPsSettings.h>
+#include <CPsQuery.h>
+#include <CPsQueryItem.h>
+#include <CPsClientData.h>
+#include <CPsPattern.h>
+#include <CPsRequestHandler.h>
+
+// Virtual phonebook header files
+#include <VPbkContactStoreUris.h>
+#include <CVPbkContactStoreUriArray.h>
+#include <TVPbkContactStoreUriPtr.h>
+#include <CVPbkContactLinkArray.h>
+#include <VPbkEng.rsg> // contains virtual phonebook data fields
+#include <phoneui.rsg> 
+
+// CCA Launcher header files.
+#include <ccafactory.h>
+#include <mccaparameter.h>
+#include <mccaconnection.h>
+#include <mccaconnectionext.h> 
+
+// Service provider settings api
+#include <spsettingsvoiputils.h>
+
+// AIW header files
+#include <AiwContactAssignDataTypes.h>
+#include <AiwContactSelectionDataTypes.h>
+
+// CCA contactor service.
+#include "edcontactorservice.h"
+
+// Open system trace
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "easydialingpluginTraces.h"
+#endif
+
+#include <phoneappcommands.hrh>
+#include <bautils.h>    // for BaflUtils
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES
+
+// CONSTANTS
+const TInt KEDMaximumMatchingContactsCount = 100;
+const TInt KEasyDialingListBoxModelGranularity = 8;
+const TInt KEasyDialingMaximumMatchingParts = 10;
+const TInt KErrEasyDialingNoFirstNamePCSIndexing = -2000;
+const TInt KErrEasyDialingNoLastNamePCSIndexing = -2001;
+
+const TInt KEDFlushContactDataManagerLimit = 20;
+
+const TText KHighlightSeparatorChar = 0x1F;
+_LIT(KHighlightSeparatorCharAsLiteral,"\x1F");
+const TText KListFieldSeparatorChar = '\t';
+
+const TText KArabicAndSouthEastAsianRangeStart = 0x0600;
+const TText KArabicAndSouthEastAsianRangeEnd = 0x19FF;
+const TText KArabicPresentationFormsARangenStart = 0xFB50;
+const TText KArabicPresentationFormsARangeEnd = 0xFDFF;
+const TText KArabicPresentationFormsBRangenStart = 0xFE70;
+const TText KArabicPresentationFormsBRangeEnd = 0xFEFF;
+
+const TInt KMaxRunInfoArrayCount = 20;
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+_LIT(KResourceFile, "\\resource\\easydialingpluginresources.rsc");
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+TInt CompareTPsMatchLocation( const TPsMatchLocation& a1, const TPsMatchLocation& a2);
+
+void AppendStringWithMatchDataL(
+        TDes& aBuffer,
+        const TDesC& aText,
+        CPSRequestHandler* aPSHandler,
+        const CPsQuery* aPSQuery );
+
+TBool HighlightingSupportedForText( const TDesC& aText );
+
+inline TBool HighlightingSupportedForScript( TText aChar );
+
+TBool IsStrictlyBidirectional( const TDesC& aText );
+
+static HBufC* AllocWithoutHighlightSeparatorsLC( TDesC& aDesc );
+
+static TBool IsItuTCharacter( TChar aChar );
+
+// FORWARD DECLARATIONS
+
+using namespace AknLayoutScalable_Avkon;
+
+
+// -----------------------------------------------------------------------------
+// CEasyDialingPlugin
+// The default c++ constructor
+// -----------------------------------------------------------------------------
+//
+CEasyDialingPlugin::CEasyDialingPlugin() 
+    : iActionToBeLaunched( ENoActionDefined )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// NewL
+// Create instance of concrete ECOM interface implementation.
+// -----------------------------------------------------------------------------
+//
+CEasyDialingPlugin* CEasyDialingPlugin::NewL()
+    {
+    OstTrace0( TRACE_NORMAL, CEASYDIALINGPLUGIN_NEWL_LOAD_PLUGIN, "Loading plugin.." );
+    LOGSTRING("EasyDialingPlugin: Loading plugin..");
+
+    CEasyDialingPlugin* self = new (ELeave) CEasyDialingPlugin;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    OstTrace0( TRACE_NORMAL, CEASYDIALINGPLUGIN_NEWL_LOAD_PLUGIN_OK, "Loading plugin completed succesfully" );
+    LOGSTRING("EasyDialingPlugin: Loading plugin completed succesfully");
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// ConstructL
+// Main construction handled here. Creates connection to the predictive search
+// engine and initialises all member data.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::ConstructL()
+    {
+    // Create a contact store array.
+    HBufC* defaultCdb = VPbkContactStoreUris::DefaultCntDbUri().AllocLC();
+    iContactDataStores.AppendL( defaultCdb );
+    CleanupStack::Pop( defaultCdb );
+
+    // Create a contact manager instance.
+    iContactStoreUriArray = CVPbkContactStoreUriArray::NewL();
+    iContactStoreUriArray->AppendL( TVPbkContactStoreUriPtr( VPbkContactStoreUris::DefaultCntDbUri() ) );
+    iContactManager = CVPbkContactManager::NewL( *iContactStoreUriArray );
+    
+    // Set contact store observer to listen to contact store events.
+    iContactManager->ContactStoresL().OpenAllL( *this );
+    
+    PERF_MEASURE_START
+
+    InitPredictiveContactSearchL();
+
+    PERF_MEASURE_STOP
+ 
+    // Find a handle to ca launcher extension MCCAConnectionExt.
+    // Easydialing has to use the extension API, because it needs function CloseAppL
+    // only found in extension.
+    // MCCAConnection extension has to be obtained through MCCAParameter extension,
+    // since MCCAConnection is not designed to be extensible API.
+    MCCAParameter* parameter = TCCAFactory::NewParameterL();    
+    TAny* any = parameter->CcaParameterExtension( KMCCAConnectionExtUid );
+    
+    // Parameter can be deallocated since "any" containing pointer to contact launcher
+    // is not tied to parameter in any way.
+    parameter->Close();
+    
+    // Cast the pointer into contact launcher object. 
+    User::LeaveIfNull( any );
+    iContactLauncher = static_cast<MCCAConnectionExt*>( any );
+    
+    iCenrepListener = CEasyDialingCenrepListener::NewL(this);
+    
+    iContactDataManager = new (ELeave) CEasyDialingContactDataManager(iContactManager);
+    iContactDataManager->ConstructL();
+    iContactDataManager->SetObserver(this);
+   
+    iContactorService = CEDContactorService::NewL( this );
+
+    // EasyDialing resource file is attempted to be read from the same directory where the
+    // executed binary is located
+    TFileName dllFileName;
+    Dll::FileName( dllFileName );
+    
+    TParse parse;
+    User::LeaveIfError( parse.Set(KResourceFile, &dllFileName, NULL) );
+    TFileName resourceFileName( parse.FullName() );
+
+    BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), resourceFileName );
+    iResourceFileOffset = iCoeEnv->AddResourceFileL( resourceFileName );
+  
+    SetComponentsToInheritVisibility( ETrue );
+    }
+
+// ---------------------------------------------------------
+// ~CEasyDialingPlugin
+// The desctructor
+// ---------------------------------------------------------
+//
+CEasyDialingPlugin::~CEasyDialingPlugin()
+    {
+    iObservers.Reset();
+    
+    if ( iContactManager )
+        {
+        TRAP_IGNORE( iContactManager->ContactStoresL().CloseAll( *this ) );
+        }
+
+    delete iCenrepListener;
+    delete iContactDataManager;
+    delete iPredictiveSearchQuery;
+    delete iContactManager;
+    delete iContactStoreUriArray;
+    iContactDataStores.ResetAndDestroy();
+
+    if (iPredictiveContactSearchHandler)
+        {
+        iPredictiveContactSearchHandler->RemoveObserver(this);
+        }
+    delete iPredictiveContactSearchHandler;
+
+    delete iListBoxModel;
+    
+    delete iContactListBox;
+
+    if (iContactLauncher)
+        {
+        iContactLauncher->Close();
+        }
+    
+    delete iContactorService;
+    
+    iCoeEnv->DeleteResourceFile( iResourceFileOffset );
+    
+    delete iInputBlocker;
+    
+    if ( iAsyncCallBack )
+        {
+        iAsyncCallBack->Cancel();
+        }
+    delete iAsyncCallBack;
+    
+    OstTrace0( TRACE_NORMAL, CEASYDIALINGPLUGIN_UNLOAD_PLUGIN, "Plugin unloaded" );
+    LOGSTRING("EasyDialingPlugin: Plugin unloaded");
+    }
+
+
+// -----------------------------------------------------------------------------
+// Initialize
+// Initialises easy dialing.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::InitializeL( CCoeControl& aParent )
+    {
+    SetContainerWindowL( aParent );
+    SetMopParent( &aParent );
+    
+    TCallBack asyncCallBack( AsyncCallBackToLaunchAction, this );
+    iAsyncCallBack = new ( ELeave ) CAsyncCallBack( asyncCallBack, 
+                                                    CActive::EPriorityStandard );
+
+    iContactListBox = new (ELeave) CEasyDialingListBox();
+    iListBoxModel = new(ELeave) CDesCArrayFlat( KEasyDialingListBoxModelGranularity );
+
+    iContactListBox->ConstructL( CEikListBox::EPaintedSelection
+            | CEikListBox::ENoFirstLetterMatching
+            | CEikListBox::EDisableItemSpecificMenu, 
+            iContactDataManager );
+    iContactListBox->SetListBoxObserver(this);
+
+    iContactListBox->SetMopParent(this);
+
+    CTextListBoxModel* model = iContactListBox->Model();
+    model->SetItemTextArray( iListBoxModel );
+    model->SetOwnershipType( ELbmDoesNotOwnItemArray );
+
+
+    iContactListBox->MakeVisible( EFalse );
+    
+    SetFocus( EFalse );    
+    iContactListBox->ActivateL();
+
+    }
+
+
+// -----------------------------------------------------------------------------
+// Reset
+// Resets easydialing plugin.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::Reset()
+    {
+    // PCS searches completing must be discarded, if the complete
+    // after Reset() -call.    
+    iDiscardCompletingSearches = ETrue;
+    
+    iNewSearchNeeded = EFalse;
+    iSearchString.Zero();
+    iListBoxModel->Reset();
+    iNumberOfNames = 0;
+    iContactListBox->MakeVisible( EFalse );
+    iContactDataManager->Reset();
+    if ( IsFocused() )
+        {
+        SetFocus( EFalse );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// InitPredictiveContactSearchL
+// Initialises predictive contact search.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::InitPredictiveContactSearchL()
+    {
+    iPredictiveContactSearchHandler = CPSRequestHandler::NewL();
+    iPredictiveContactSearchHandler->AddObserverL(this);
+
+    // Put the searched contact fields into array.
+    RArray<TInt> contact_fields;
+    CleanupClosePushL(contact_fields);
+
+    // Check which relevant contact fields are indexed in PCS search.
+    iFirstNamePCSIndex = FindContactFieldPCSIndexL( R_VPBK_FIELD_TYPE_FIRSTNAME );
+    iLastNamePCSIndex = FindContactFieldPCSIndexL( R_VPBK_FIELD_TYPE_LASTNAME );
+    iCompanyNamePCSIndex = FindContactFieldPCSIndexL( R_VPBK_FIELD_TYPE_COMPANYNAME );
+
+    // If first name and last name are not indexed in PCS, easy dialing plugin
+    // can not function reasonably. The function leaves, which in turn causes
+    // the plugin not to be initialized.
+    // Company name not being indexed is not as severe case, and does not cause a leave.
+    // Fields used in PCS indexing are configured in cenrep 2000B5C6.
+    if ( iFirstNamePCSIndex == KErrNotFound )
+        {
+        OstTrace0( TRACE_ERROR, CEASYDIALINGPLUGIN_INITPREDICTIVECONTACTSEARCHL_ERROR_NO_FIRST_NAME, "ERROR, PCS does not support first name indexing!" );
+        LOGSTRING("EasyDialingPlugin: PCS does not support first name indexing => Leave");
+        User::Leave( KErrEasyDialingNoFirstNamePCSIndexing );
+        }
+    if ( iLastNamePCSIndex == KErrNotFound )
+        {
+        OstTrace0( TRACE_ERROR, CEASYDIALINGPLUGIN_INITPREDICTIVECONTACTSEARCHL_ERROR_NO_LAST_NAME, "ERROR, PCS does not support last name indexing!" );
+        LOGSTRING("EasyDialingPlugin: PCS does not support last name indexing => Leave");
+        User::Leave( KErrEasyDialingNoLastNamePCSIndexing );
+        }
+
+    // First name, last name and company name (if supported) are used in PCS search.
+    contact_fields.Append(R_VPBK_FIELD_TYPE_FIRSTNAME);
+    contact_fields.Append(R_VPBK_FIELD_TYPE_LASTNAME);
+    if ( iCompanyNamePCSIndex != KErrNotFound )
+        {
+        contact_fields.Append(R_VPBK_FIELD_TYPE_COMPANYNAME);
+        }
+
+    // Create and fill ps settings object.
+    CPsSettings* ps_settings = CPsSettings::NewL();
+    CleanupStack::PushL(ps_settings);
+
+    ps_settings->SetSearchUrisL(iContactDataStores);
+    ps_settings->SetMaxResults(KEDMaximumMatchingContactsCount);
+    ps_settings->SetSortType(EAlphabetical);
+    ps_settings->SetDisplayFieldsL(contact_fields);
+
+    // Set the PCS settings.
+    iPredictiveContactSearchHandler->SetSearchSettingsL(*ps_settings);
+
+    CleanupStack::PopAndDestroy(ps_settings);
+    CleanupStack::PopAndDestroy(&contact_fields);
+
+    iPredictiveSearchQuery = CPsQuery::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// OfferKeyEventL
+// Check the received keypad event and performs user
+// actions related to it.
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CEasyDialingPlugin::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+    TKeyResponse keyResponse = EKeyWasNotConsumed;
+
+    if ( aKeyEvent.iCode == 0 && aKeyEvent.iScanCode != EStdKeyDevice3)
+        {
+        return keyResponse;
+        }
+
+    TInt keyCode = aKeyEvent.iCode;
+    
+    // Swap right and left key codes in mirrored layout. This needs to be done
+    // also for action menu grid as CAknGrid handles arrow keys like this:
+    // left key = next column (not item!) and right is previous column and
+    // grid layout (LtR/RtL) is not taken into account when movement is done
+    // in columns (always like in LtR layout). So if right key should move
+    // focus to the right also in mirroded layout, key codes must be switched.
+    // This kind of approach is used also e.g. in application grid.
+    if ( AknLayoutUtils::LayoutMirrored() ) 
+        {
+        if ( keyCode == EKeyRightArrow ) keyCode = EKeyLeftArrow;
+        else if ( keyCode == EKeyLeftArrow ) keyCode = EKeyRightArrow;
+        }
+    
+
+    if ( IsFocused() )
+        {
+        if ( keyCode == EKeyUpArrow )
+            {
+            // if the focus is on the top-most item
+            if ( iContactListBox->CurrentItemIndex() == 0)
+                {
+                // then focus jumps off the component.
+                SetFocus( EFalse );
+                DrawDeferred();
+                keyResponse = EKeyWasConsumed;
+                }
+            else
+                {
+                keyResponse = iContactListBox->OfferKeyEventL( aKeyEvent, aType );
+                }
+            }
+        else if ( keyCode == EKeyDownArrow )
+            {
+            // if the focus is on the bottom-most item
+            if ( iContactListBox->CurrentItemIndex() == (iNumberOfNames - 1) )
+                {
+                // then focus jumps off the component.
+                SetFocus( EFalse );
+                DrawDeferred();
+                keyResponse = EKeyWasConsumed;
+                }
+            else
+                {
+                keyResponse = iContactListBox->OfferKeyEventL( aKeyEvent, aType );
+                }
+            }
+
+        else if ( keyCode == EKeyRightArrow )
+            {
+            iRememberFocus = ETrue;
+            AsyncActionLaunchL( ELaunchCurrentContact );
+            keyResponse = EKeyWasConsumed;
+            }
+
+        else if ( keyCode == EKeyLeftArrow )
+            {
+            // then focus jumps off the component.
+            SetFocus( EFalse );
+            DrawDeferred();
+            keyResponse = EKeyWasConsumed;
+            }
+
+        else
+            {
+            // then focus jumps off the component.
+            SetFocus( EFalse );
+            }
+        }
+
+    else if ( iNumberOfNames > 0 ) // not in focus but there are contacts to show
+        {
+        if ( keyCode == EKeyUpArrow || keyCode == EKeyDownArrow )
+            {
+            SetFocus( ETrue );
+            keyResponse = iContactListBox->SetFocusedWithKeyEventL( aKeyEvent, aType );
+            }
+        }
+    return keyResponse;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CountComponentControls
+//
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingPlugin::CountComponentControls() const
+    {
+    return iNumberOfNames > 0 ? 1 : 0;
+    }
+
+
+// -----------------------------------------------------------------------------
+// ComponentControl
+//
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CEasyDialingPlugin::ComponentControl( TInt aIndex ) const
+    {
+    return aIndex == 0 ? iContactListBox : NULL;
+    }
+
+
+// -----------------------------------------------------------------------------
+// MakeVisible
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::MakeVisible( TBool aVisible )
+    {
+    if ( aVisible != IsVisible() )
+        {
+        CCoeControl::MakeVisible( aVisible );
+        
+        if ( !aVisible && IsFocused() )
+            {
+            SetFocus( EFalse );
+            }
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// SizeChanged
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::SizeChanged()
+    {
+    TRect rect = Rect();
+    // convert rect to absolute coordinates
+    rect.SetRect( PositionRelativeToScreen(), rect.Size() );
+    
+    iContactListBox->SetMaxRect( rect );
+    iContactListBox->SetRectToNumberOfItems( iNumberOfNames );
+    }
+
+
+// -----------------------------------------------------------------------------
+// FocusChanged
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::FocusChanged( TDrawNow aDrawNow )
+    {
+    iContactListBox->SetFocus( IsFocused() );
+    if( !IsFocused() )
+        {
+        // To be on the safe side, cancel async callback and reset input block.
+        CancelActionLaunchAndInputBlock();
+        }
+    CCoeControl::FocusChanged( aDrawNow );
+    InformObservers( MDialingExtensionObserver::EFocusChanged );
+    }
+
+
+// -----------------------------------------------------------------------------
+// SetInputL
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::SetInputL( const TDesC& aSearchString )
+    {
+    if ( !IsEnabled() )
+        {
+        return;
+        }
+    OstTraceExt1( TRACE_NORMAL, CEASYDIALINGPLUGIN_SET_INPUT, "SetInput: '%S' ", aSearchString );
+    LOGSTRING1("EasyDialingPlugin: SetInput: '%S'", &aSearchString );
+    
+    // Earlier here was a test if the search string is the same as the one used in previous search.
+    // If it was, no search was done but function returned immediately.
+    // This has now been removed. It is possible that contacts have changed, and a new search
+    // may be needed even if the search string is the same. 
+    
+    // Check if search string is just empty space or 0-length. Decision was made that no
+    // matches are shown if search string is just space (would show all contacts)
+    // even if somebody might have unnamed contacts. Should be quite rare.
+    // It's assumed later on in the code that string is not just empty space.
+    TLex searchString( aSearchString );
+    searchString.SkipSpace();
+    if ( searchString.Eos() )
+        {
+        // the end of the string reached after skipping empty space
+        Reset();
+        }
+    else // proper search string
+        {
+        iSearchString.Copy( aSearchString.Left( iSearchString.MaxLength() ) );
+        LaunchSearchL();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// MatchingContactCount
+//
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingPlugin::MatchingContactCount()
+    {
+    return iNumberOfNames;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEasyDialingPlugin::StoreReady
+// From MVPbkContactStoreListObserver.
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::StoreReady(MVPbkContactStore& /* aContactStore */)
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEasyDialingPlugin::StoreUnavailable
+// From MVPbkContactStoreListObserver.
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::StoreUnavailable(MVPbkContactStore& /* aContactStore */, TInt /* aReason */)
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEasyDialingPlugin::HandleStoreEventL
+// From MVPbkContactStoreListObserver.
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::HandleStoreEventL( MVPbkContactStore& /* aContactStore */, 
+                        TVPbkContactStoreEvent aStoreEvent)
+    {
+    // Store's observers are informed one by one using active object so one shouldn't
+    // perform search syncronously as one must try to ensure that PCS has had a
+    // chance to update its store. However there seems to be no way to be
+    // 100% sure that PCS is up-to-date when search is launched: telephony app
+    // has such a high priority and there are no APIs to query PCS' status.
+    switch ( aStoreEvent.iEventType )
+        {
+        case TVPbkContactStoreEvent::EContactAdded:
+        case TVPbkContactStoreEvent::EContactDeleted:
+        case TVPbkContactStoreEvent::EContactChanged:
+            {
+            if ( iSearchString.Length() > 0 )
+                {
+                if ( iContactLauncherActive )
+                    {
+                    // Set the flag to make a search when communication launcher exits.
+                    iNewSearchNeeded = ETrue;                   
+                    }
+                else
+                    {
+                    // We get here if user e.g. leaves dialer open and goes to Contacts
+                    // application and does some editing.
+                    AsyncActionLaunchL( ELaunchSearch );
+                    }
+                }
+            }
+            
+            break;
+       
+        default:
+            
+            break;
+        }
+    
+
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEasyDialingPlugin::OpenComplete
+// From MVPbkContactStoreListObserver.
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::OpenComplete()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// EasyDialingSettingsChanged
+// From MEasyDialingCenrepListenerObserver
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::EasyDialingSettingsChanged( TInt aValue )
+    {
+    if ( aValue == 0 )
+        {
+        Reset();
+        InformObservers( MDialingExtensionObserver::EEasyDialingDisabled );
+        }
+    else if ( aValue == 1 )
+        {
+        InformObservers( MDialingExtensionObserver::EEasyDialingEnabled );
+        }
+    MakeVisible( aValue );
+    }
+
+// -----------------------------------------------------------------------------
+// EasyDialingContactThumbnailsSettingsChanged
+// From MEasyDialingCenrepListenerObserver
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::EasyDialingContactThumbnailsSettingsChanged( TInt aThumbnailSettingValue )
+    {
+    iContactDataManager->SetContactThumbnailSetting( aThumbnailSettingValue );
+    iContactDataManager->Reload();
+    DrawDeferred();
+    }
+
+// -----------------------------------------------------------------------------
+// AllContactDataLoaded
+// From MContactDataManagerObserver
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::AllContactDataLoaded()
+    {
+    iContactListBox->DrawDeferred();
+    }
+
+// -----------------------------------------------------------------------------
+// InformContactorEvent
+// From MEDContactorObserver
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::InformContactorEvent( MEDContactorObserver::TEvent aEvent )
+    {
+
+    // This callback function simply propagates the events to its own listener.
+    switch ( aEvent )
+        {
+        case MEDContactorObserver::ECommunicationStarted:
+            InformObservers( MDialingExtensionObserver::ECommunicationStarted );
+            break;
+        case MEDContactorObserver::ECommunicationCancelled:
+            InformObservers( MDialingExtensionObserver::ECommunicationCancelled );
+            break;
+        default:
+            break;
+        }
+    
+    // Reset focus unless it is flagged to be remembered.
+    if ( ! iRememberFocus )
+        {
+        SetFocus( EFalse );
+        DrawDeferred();
+        }
+    
+    iRememberFocus = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// Draw
+// The actual UI drawing function. Draws the easy dialing popup bubble on the
+// idle screen.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::Draw( const TRect& /* aRect */ ) const
+    {
+    return;
+    }
+
+
+// -----------------------------------------------------------------------------
+// LaunchSearchL
+// Initiates predictive contact search.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::LaunchSearchL()
+    {
+    if ( iSearchString.Length() == 0 )
+        {
+        return;
+        }
+    
+    iDiscardCompletingSearches = EFalse;
+    iNewSearchNeeded = EFalse;
+    
+    iPredictiveSearchQuery->Reset();
+
+    for ( TInt i = 0; i < iSearchString.Length(); i++ )
+        {
+         // Add a query item
+        CPsQueryItem* item = CPsQueryItem::NewL();
+        CleanupStack::PushL(item);
+
+        item->SetCharacter( iSearchString[i] );
+        
+        // The PCS mode used with character is based on character itself,
+        // not to the keyboard it is made with. While this is not strictly
+        // identical to checking the used keyboard, this behaves identically
+        // in most of the normal cases, and makes the logic simpler.
+        if ( IsItuTCharacter( iSearchString[i] ) )
+            {
+            item->SetMode( EItut );
+            }
+        else 
+            {
+            item->SetMode( EQwerty );
+            }
+        
+        iPredictiveSearchQuery->AppendL(*item);
+
+        // Previous CPsQuery::AppendL takes the ownership of item.
+        // Do not delete item.
+        CleanupStack::Pop(item);
+        }
+
+    // Issue the search. SearchL is asynchronous function => returns immediately.
+    iPredictiveContactSearchHandler->SearchL(*iPredictiveSearchQuery);
+    }
+
+
+// -----------------------------------------------------------------------------
+// HandlePsResultsUpdate from MPsResultsObserver
+// Called after predictive search has been completed.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::HandlePsResultsUpdate( RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs )
+    {
+    if (iCenrepListener && iCenrepListener->Value() == 0)
+        {
+        // Easydialing is off. We should arrive here only if user turned it off while a search was happening.
+        Reset();
+        return;
+        }
+    TRAPD( leaveError, HandlePsResultsUpdateL( aResults, aSeqs ) );
+
+    if( leaveError )
+        {
+        OstTrace1( TRACE_ERROR, CEASYDIALINGPLUGIN_HANDLEPSRESULTSUPDATE, "HandlePsResultsUpdate failed: %d", leaveError );
+        LOGSTRING1("EasyDialingPlugin: HandlePsResultsUpdate failed: %d", leaveError );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// HandlePsError from MPsResultsObserver
+// Called when search error happens.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::HandlePsError( TInt aErrorCode )
+    {
+    OstTrace1( TRACE_ERROR, CEASYDIALINGPLUGIN_HANDLEPSERROR, "PCS Error: %d", aErrorCode );
+    LOGSTRING1("EasyDialingPlugin: PCS Error: %d", aErrorCode );
+    }
+
+// -----------------------------------------------------------------------------
+// CachingStatus from MPsResultsObserver
+// Called to update caching status.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::CachingStatus( TCachingStatus& aStatus, TInt& aError )
+    {
+    OstTraceExt2( TRACE_NORMAL, CEASYDIALINGPLUGIN_CACHINGSTATUS, "PCS CachingStatus: %d, error: %d", ( TUint )( aStatus ), aError );
+    LOGSTRING2("EasyDialingPlugin: PCS CachingStatus: %d, error: %d", aStatus, aError );
+    }
+
+
+// -----------------------------------------------------------------------------
+// FindContactFieldPCSIndex
+// Searches the index that stores the given contact field.
+// To see possible contact field numbering, see file "vpbkeng.rsg".
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingPlugin::FindContactFieldPCSIndexL( TInt aIndex )
+    {
+    RArray<TInt> fieldOrder;
+    CleanupClosePushL( fieldOrder );
+
+    // Current implementation searches only from default database.
+    // Later this may be expanded to search SIM contacts as well.
+    HBufC* default_cdb = VPbkContactStoreUris::DefaultCntDbUri().AllocLC();
+
+    iPredictiveContactSearchHandler->GetDataOrderL( *default_cdb, fieldOrder );
+
+    for ( TInt i = 0; i < fieldOrder.Count(); i++)
+        {
+        if ( fieldOrder[i] == aIndex )
+            {
+            CleanupStack::PopAndDestroy( default_cdb );
+            CleanupStack::PopAndDestroy( &fieldOrder );
+            return i;
+            }
+        }
+
+    CleanupStack::PopAndDestroy( default_cdb );
+    CleanupStack::PopAndDestroy( &fieldOrder );
+    return KErrNotFound;
+    }
+
+
+// -----------------------------------------------------------------------------
+// HandlePsResultsUpdateL
+// This function does the actual callback fork, and must be trapped inside
+// HandlePsResultsUpdateL.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::HandlePsResultsUpdateL( RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& /*aSeqs*/ )
+    {
+    // If iDiscardCompletingSearches is ETrue, don't show search results but just return.
+    // If easydialing has been reset with reset function, no searches completed after that
+    // can be shown.
+    // This is done like this because there seems not to be a feasible way of cancelling all 
+    // PCS search request in PCS API. CancelRequest does not work here.
+    if ( iDiscardCompletingSearches )
+        {
+        return;
+        }
+    
+    iListBoxModel->Reset();
+    iContactListBox->HandleItemRemovalL();
+
+    TInt numberOfPCSMatches( aResults.Count() );
+    
+    // Resetting the contactdatamanager causes the thumbnails to flicker a bit, because
+    // we need to load the thumbnails again. But if there are lots of search results, or
+    // lots of loaded thumbnails in the manager, matching the search results to the
+    // thumbnail manager contents may take too much time. If there are lots of results,
+    // it is likely that the contents of the listbox change anyway, so the flickering
+    // doesn't matter too much. This also limits the memory usage of the manager.
+    //   But if there are fewer search results, it is worth trying to match them
+    // with the contents of thumbnail manager.
+    
+    TBool matchThumbnails(ETrue);
+    if ( numberOfPCSMatches > KEDFlushContactDataManagerLimit )
+        {
+        iContactDataManager->Reset();
+        matchThumbnails = EFalse;
+        }
+
+    OstTrace1( TRACE_NORMAL, CEASYDIALINGPLUGIN_HANDLEPSRESULTSUPDATEL_MATCHES, "Matching results from PCS: %d", numberOfPCSMatches );
+    LOGSTRING1("EasyDialingPlugin: Matching results from PCS: %d", numberOfPCSMatches );
+
+    if ( numberOfPCSMatches > 0 )
+        {
+        // retrieve the name order before adding
+        CPbkContactEngine* pbkEngine = CPbkContactEngine::NewL();
+        CleanupStack::PushL( pbkEngine );
+        CPbkContactEngine::TPbkNameOrder nameOrder = pbkEngine->NameDisplayOrderL();
+        CleanupStack::PopAndDestroy( pbkEngine );
+
+        // map results to old contact match data
+        for( TInt i = 0; i < numberOfPCSMatches; i++ )
+            {
+            TInt indexFromEnd = numberOfPCSMatches - i - 1;
+
+            MVPbkContactLink* link = iPredictiveContactSearchHandler->ConvertToVpbkLinkLC(
+                    *(aResults[indexFromEnd]), *iContactManager );
+            if ( !iContactDataManager->IsFavL( link ) )
+                {
+                // handle favourites separately, in another loop
+                HBufC* contactString = CreateContactStringLC( aResults[ indexFromEnd ], nameOrder );
+                CreateListBoxContactStringL( *contactString, link, matchThumbnails, EFalse );
+                CleanupStack::PopAndDestroy( contactString );
+                }
+            CleanupStack::PopAndDestroy( link );
+            
+            OstTraceExt2( TRACE_NORMAL, CEASYDIALINGPLUGIN_HANDLEPSRESULTSUPDATEL_SHOW_MATCH, "Contact #%d: '%S'", i+1, iContactStringCreationBuffer );
+            LOGSTRING2("EasyDialingPlugin: Contact #%d: '%S'", i+1, &iContactStringCreationBuffer );    
+            }
+
+        TInt numberOfFavs( iContactDataManager->NumberOfFavsL() );
+        TBuf<KBufferMaxLen> results;
+        for ( TInt i = 0; i < numberOfFavs; i++ )
+            {
+            // check if this fav matches the search
+            HBufC* favContactString = iContactDataManager->FavContactStringLC( i, nameOrder );
+            results = KNullDesC;
+            iPredictiveContactSearchHandler->LookupMatchL(
+                    *iPredictiveSearchQuery, *favContactString, results );
+            if ( results.Length() > 0 )
+                {
+                // matches, add this fav to listbox.
+                MVPbkContactLink* link = iContactDataManager->FavLinkLC( i );
+                CreateListBoxContactStringL( *favContactString, link, matchThumbnails, ETrue );
+                CleanupStack::PopAndDestroy(); //link
+                }
+            CleanupStack::PopAndDestroy( favContactString );
+            }
+        
+        iNumberOfNames = iListBoxModel->Count();
+        iContactListBox->SetRectToNumberOfItems( iNumberOfNames );
+        iContactListBox->HandleItemAdditionL();
+        // Scroll the list to bottom
+        iContactListBox->ScrollToMakeItemVisible( iNumberOfNames-1 );
+
+        iContactListBox->MakeVisible( ETrue );
+        }
+    else
+        {
+        iNumberOfNames = 0;
+        iContactListBox->MakeVisible( EFalse );
+        }
+
+    if ( IsFocused() )
+        {
+        SetFocus( EFalse );
+        }
+
+    DrawDeferred();
+
+    InformObservers( MDialingExtensionObserver::ESearchComplete );
+    }
+
+
+// -----------------------------------------------------------------------------
+// void CCASimpleNotifyL()
+// Implements MCCAObserver notification interface.
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::CCASimpleNotifyL( TNotifyType aType, TInt aReason )
+    {
+    OstTraceExt2( TRACE_NORMAL, CEASYDIALINGPLUGIN_CCASIMPLENOTIFYL, "CCASimpleNotifyL: type: %d, reason: %d", ( TUint )( aType ), aReason );
+    LOGSTRING2("EasyDialingPlugin: CCASimpleNotifyL: type: %d, reason: %d", (TInt)aType, aReason );
+
+    iContactLauncherActive = EFalse;
+
+    CAknAppUi* appUi = static_cast<CAknAppUi*>( iCoeEnv->AppUi() );
+    appUi->HandleCommandL( EPhoneCmdBlockingDialogClosed );
+    
+    // If contacts have been edited during contact launcher being open, a new search
+    // needs to be done.
+    if ( iNewSearchNeeded )
+        {
+        // The cached information in contact data manager may be outdated. Call to reload makes sure that when the 
+        // search is made, all data is loaded again.
+        iContactDataManager->Reload();
+        
+        LaunchSearchL();
+        }
+
+    // Give up focus, if iRememberFocus flag is not set.
+    if ( ! iRememberFocus )
+        {
+        SetFocus( EFalse );
+        DrawDeferred();
+        }    
+    iRememberFocus = EFalse;
+
+    // Inform observers.
+    InformObservers( MDialingExtensionObserver::ECCALauncherExit );
+    }
+
+
+// -----------------------------------------------------------------------------
+// void LaunchCurrentContactL()
+// Implements MCCAObserver notification interface.
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::LaunchCurrentContactL()
+    {
+    __ASSERT_DEBUG( iNumberOfNames > 0, EasyDialingPanic( EEasyDialingPanicNoResults ) );
+    __ASSERT_DEBUG( iContactListBox->CurrentItemIndex() >= 0, EasyDialingPanic( EEasyDialingPanicNoContactSelected ) );
+
+    if (( iContactLauncherActive ) || ( iNumberOfNames == 0 ) || ( !iContactListBox ) || ( iContactListBox->CurrentItemIndex() < 0 ))
+        {
+        OstTrace0( TRACE_ERROR, CEASYDIALINGPLUGIN_LAUNCHCURRENTCONTACTL_ERROR, "LaunchCurrentContactL: Parameter error" );
+        LOGSTRING("EasyDialingPlugin: LaunchCurrentContactL - Parameter error");
+        return;
+        }
+
+    MCCAParameter* launchParameters = TCCAFactory::NewParameterL();
+    CleanupClosePushL( *launchParameters );
+
+    // ESoftExit flag causes that ca launcher will not close the 
+    // client application in any circumstance. 
+    // Application hosting easydialing is telephone application.
+    // It must never be closed, so we must use this flag.
+    launchParameters->SetConnectionFlag(MCCAParameter::ESoftExit);
+    
+    launchParameters->SetContactDataFlag(MCCAParameter::EContactLink);
+
+    // Get the contact link of the current contact item.
+    HBufC8* contact8 = iContactListBox->CurrentContactLinkLC();
+    
+    // Expand it into 16-bit descriptor because cca launcher api expects this. 
+    HBufC16* contact16 = HBufC16::NewLC( contact8->Length() );
+    contact16->Des().Copy( *contact8 );
+
+    launchParameters->SetContactDataL( *contact16 );
+
+    CleanupStack::PopAndDestroy( contact16 );
+    CleanupStack::PopAndDestroy( contact8 );
+
+    TPtrC selectedName = iListBoxModel->MdcaPoint( iContactListBox->CurrentItemIndex() );
+    OstTraceExt1( TRACE_NORMAL, CEASYDIALINGPLUGIN_LAUNCHCURRENTCONTACTL_LAUNCH_CCA, "Launch CL for contact: '%S'", selectedName );
+    LOGSTRING1("EasyDialingPlugin: Launch CL for contact: '%S'", &selectedName );
+
+    iContactLauncher->LaunchAppL( *launchParameters, this );
+
+    // Ownership of parameter transferred to CCA launcher => pop but do not destroy.
+    CleanupStack::Pop( launchParameters );
+
+
+    iContactLauncherActive = ETrue;
+    CAknAppUi* appUi = static_cast<CAknAppUi*>( iCoeEnv->AppUi() );
+    appUi->HandleCommandL( EPhoneCmdBlockingDialogLaunched );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CreateListBoxContactStringL
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::CreateListBoxContactStringL(
+        const TDesC& aContactString,
+        MVPbkContactLink *aLink,
+        TBool aMatchThumbnails,
+        TBool aFav )
+    {
+    // Construct the contact string for the listbox model.
+    iContactStringCreationBuffer.Zero();
+    
+    // Append contact thumbnail id.
+    HBufC* thumbnailId = iContactDataManager->GetThumbnailIdL( aLink, aMatchThumbnails, aFav );
+    iContactStringCreationBuffer.Append( *thumbnailId );
+    delete thumbnailId;
+    iContactStringCreationBuffer.Append( KListFieldSeparatorChar );
+    
+    AppendStringWithMatchDataL(
+            iContactStringCreationBuffer,
+            aContactString,
+            iPredictiveContactSearchHandler,
+            iPredictiveSearchQuery );
+    
+    // Append the whole string to listbox model.
+    iListBoxModel->AppendL( iContactStringCreationBuffer );
+    }
+
+// -----------------------------------------------------------------------------
+// CreateContactStringLC
+//
+// -----------------------------------------------------------------------------
+//
+HBufC* CEasyDialingPlugin::CreateContactStringLC( CPsClientData* aResult, CPbkContactEngine::TPbkNameOrder aNameOrder )
+    {
+    TPtr firstName = aResult->Data( iFirstNamePCSIndex )->Des();
+    TPtr lastName = aResult->Data( iLastNamePCSIndex )->Des();
+    TPtr companyName( NULL, 0 );
+    
+    if ( iCompanyNamePCSIndex != KErrNotFound )
+        {
+        companyName.Set( aResult->Data( iCompanyNamePCSIndex )->Des() );
+        }
+    return EasyDialingUtils::CreateContactStringLC( firstName, lastName, companyName, aNameOrder );
+    }
+
+
+// -----------------------------------------------------------------------------
+// AddObserverL
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::AddObserverL( MDialingExtensionObserver* aObserver )
+    {
+    if ( !aObserver )
+        {
+        return;
+        }
+    
+    User::LeaveIfError( iObservers.Append( aObserver ) );
+    }
+
+
+// -----------------------------------------------------------------------------
+// RemoveObserver
+//
+// Removes the parameter observer from observer list if found. If same observer
+// has registered multiple times (which is unnecessary), removed just the first
+// registration.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::RemoveObserver( MDialingExtensionObserver* aObserver )
+    {
+    for ( TInt i = 0; i < iObservers.Count(); i++ )
+        {
+        if ( iObservers[i] == aObserver)
+            {
+            iObservers.Remove( i );
+            return;
+            }
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// InformObservers
+// Informs all registered observers of easy dialing events.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::InformObservers( MDialingExtensionObserver::TEvent aEvent )
+    {
+    for ( TInt i = 0; i < iObservers.Count(); i++ )
+        {
+        iObservers[i]->HandleDialingExtensionEvent( aEvent );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CbaResourceId
+// Returns EasyDialingPlugin specific CBA resource ID that
+// Phone application can use when updating Soft Keys.
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingPlugin::CbaResourceId()
+    {
+    return R_EASYDIALING_CBA;
+    }
+
+
+// -----------------------------------------------------------------------------
+// MenuResourceId
+// Returns EasyDialingPlugin specific menu resource ID that
+// Phone application can use when easydialing is in focus.
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingPlugin::MenuResourceId()
+    {
+    return R_EASYDIALING_MENUBAR;
+    }
+
+
+// -----------------------------------------------------------------------------
+// InitializeMenuPaneL
+// Initializes easy dialing menu pane. This function is meant to be called in 
+// DynInitMenuPaneL of the application, if the application wants to use easy
+// dialing menu.
+// -----------------------------------------------------------------------------
+//
+TBool CEasyDialingPlugin::InitializeMenuPaneL( CEikMenuPane& aMenuPane, TInt aMenuResourceId )
+    {   
+    if ( aMenuResourceId == R_PHONEUIDIALER_OPTIONS_MENU )
+        {
+        TInt index( KErrNotFound );
+        // To be on the safe side - place holder was added into phoneui.rss.
+        if ( aMenuPane.MenuItemExists( EEasyDialingSettingsItemPlaceHolder, index ) )
+            {
+            // Add first menu item (= on/off submenu) after placeHolder item and 
+            // then delete that (empty) placeHolder.
+            aMenuPane.AddMenuItemsL( R_EASYDIALING_OPTIONS_ON_OFF_MENU_ITEM, 
+                                     EEasyDialingSettingsItemPlaceHolder );
+            aMenuPane.DeleteMenuItem( EEasyDialingSettingsItemPlaceHolder );
+            
+            LOGSTRING("EasyDialingPlugin::InitializeMenuPaneL: Added on/off menu into dialer's menu" );
+            }
+
+        // Return EFalse as only one menu item was added here.
+        return EFalse; 
+        }
+    
+    else if ( aMenuResourceId == R_EASYDIALING_MENU )
+        {
+        TBool voiceCall = EFalse;
+        TBool videoCall = EFalse;
+        TBool message = EFalse;
+        
+        if ( iContactListBox->CurrentItemIndex() >= 0 ) 
+            {
+            TInt index = iContactListBox->CurrentContactDataIndex(); 
+            
+            voiceCall = iContactDataManager->VoiceCallAvailable( index );
+            videoCall = iContactDataManager->VideoCallAvailable( index );
+            message = iContactDataManager->UniEditorAvailable( index );
+            }
+            
+        // Call menu item is not show if neither voice call nor video call are possible. 
+        aMenuPane.SetItemDimmed( EEasyDialingVoiceCall, !voiceCall && !videoCall ); 
+        aMenuPane.SetItemDimmed( EEasyDialingSendMessage, !message ); 
+        
+        LOGSTRING("EasyDialingPlugin::InitializeMenuPaneL: InitializeMenuPaneL done" );
+        
+        return ETrue;  
+        }
+    
+    else if ( aMenuResourceId == R_EASYDIALING_OPTIONS_CALL_MENU )
+        {
+        TBool voiceCall = EFalse;
+        TBool videoCall = EFalse;
+        
+        if ( iContactListBox->CurrentItemIndex() >= 0 ) 
+            {
+            TInt index = iContactListBox->CurrentContactDataIndex();
+            
+            voiceCall = iContactDataManager->VoiceCallAvailable( index );
+            videoCall = iContactDataManager->VideoCallAvailable( index );
+            }
+        
+        aMenuPane.SetItemDimmed( EEasyDialingVoiceCall, !voiceCall ); 
+        aMenuPane.SetItemDimmed( EEasyDialingVideoCall, !videoCall ); 
+
+        LOGSTRING("EasyDialingPlugin::InitializeMenuPaneL: InitializeMenuPaneL for call submenu done" );
+        
+        return ETrue;
+        }
+    
+    else if ( aMenuResourceId == R_EASYDIALING_OPTIONS_ON_OFF_CASCADE_MENU )
+        {
+        if ( IsEnabled() )
+            {
+            aMenuPane.SetItemButtonState( EEasyDialingOn, EEikMenuItemSymbolOn );      
+            }
+        else
+            {
+            aMenuPane.SetItemButtonState( EEasyDialingOff, EEikMenuItemSymbolOn );
+            }
+        
+        LOGSTRING("EasyDialingPlugin::InitializeMenuPaneL: InitializeMenuPaneL for on/off submenu done" );
+        
+        return ETrue;
+        }
+    
+    else 
+        {
+        return EFalse;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// HandleCommandL
+// Method for handling EasyDialingPlugin specific commands.
+// -----------------------------------------------------------------------------
+//
+TBool CEasyDialingPlugin::HandleCommandL( TInt aCommand )
+    {      
+    // Input blocker can't block controls higher on the control stack than 
+    // ECoeStackPriorityDialog so we will get HandleCommandL calls from 
+    // phoneappui (CBA) when input blocker is active (=not NULL).
+    
+    if ( iInputBlocker && aCommand != EEasyDialingCallHandlingActivated )
+        {
+        // Some action is already being launched since iInputBlocker exists.
+        // Only call activation command requires always action from this plugin.
+        return ETrue;
+        }
+ 
+    
+    TBool ret(EFalse);
+    
+    switch( aCommand )
+        {
+        case EEasyDialingOpenContact:
+            
+            iRememberFocus = ETrue;
+            AsyncActionLaunchL( ELaunchCurrentContact );
+            ret = ETrue;
+            break;
+
+        // EEasyDialingEnterKeyAction is sent when Enter key is pressed.
+        // EEasyDialingMakeCall is sent when send key or send toolbar button or send menu item is pressed.
+        case EEasyDialingVoiceCall: // fall through
+        case EEasyDialingEnterKeyAction:
+            // Make a call.
+            iRememberFocus = ETrue;
+            AsyncActionLaunchL( ECallCurrentContact );
+            ret = ETrue;
+            break;
+            
+        // Video call is selectable only through menu.
+        case EEasyDialingVideoCall:
+            // Make a video call.
+            iRememberFocus = ETrue;
+            AsyncActionLaunchL( EVideoCallCurrentContact );
+            ret = ETrue;
+            break;
+                
+        // Uni-editor message is selectable only through menu.
+        case EEasyDialingSendMessage:
+            // Create a message.
+            iRememberFocus = ETrue;
+            AsyncActionLaunchL( ESendMessageCurrentContact );
+            ret = ETrue;
+            break;
+                    
+        // EEasyDialingCallHandlingActivated is sent when the in-call-ui of telephony gets activated
+        case EEasyDialingCallHandlingActivated:
+            
+            iRememberFocus = EFalse;
+            // Stop input block and async action launch in case they are active.
+            CancelActionLaunchAndInputBlock();
+            // Close down number selection popup in case it happens to be open.
+            iContactorService->CancelService();
+            // Close down communication launcher if it's active
+            if ( iContactLauncherActive )
+                {
+                iNewSearchNeeded = EFalse;
+                iContactLauncher->CloseAppL();
+                }
+            ret = ETrue;
+            break;
+            
+        case EEasyDialingOn:
+            
+            iCenrepListener->SetEasyDialingSettingsValue( 1 );
+            ret = ETrue;
+            break;
+
+        case EEasyDialingOff:
+            
+            iCenrepListener->SetEasyDialingSettingsValue( 0 );
+            ret = ETrue;
+            break;    
+            
+        case EEasyDialingClosePopup:
+            
+            // Not only Number Entry is removed but also closes down number selection popup in case it happens to be open.
+            iContactorService->CancelService();
+			ret = ETrue;
+            break;
+            
+        default:
+            break;
+        }
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// IsEnabled
+// Check if Easy dialing is enabled in the settings
+// -----------------------------------------------------------------------------
+//
+TBool CEasyDialingPlugin::IsEnabled()
+    {
+    return ( iCenrepListener->Value() != 0 );
+    }
+
+// -----------------------------------------------------------------------------
+// AsyncActionLaunchL
+// Use asynchronous callback to launch action. While action is being launched,
+// input blocker is used to avoid OfferKeyEvent and HandlePointerEvent calls
+// coming in. Both end key and application key work despite of input blocker.
+// Input blocker can't block phoneappui's cba so extra check is needed in
+// HandleCommandL method.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::AsyncActionLaunchL( const TEasyDialingAction aAction )
+    {
+    iActionToBeLaunched = aAction;
+    
+    CancelActionLaunchAndInputBlock();
+    
+    if ( aAction == ELaunchSearch )
+        {
+        // Must be set as low as possible to enable PCS to update its store.
+        iAsyncCallBack->SetPriority( CActive::EPriorityIdle );
+        }
+    else
+        {
+        iAsyncCallBack->SetPriority( CActive::EPriorityStandard );
+        }
+    
+    iAsyncCallBack->CallBack(); // activates callback request
+    
+    // By defining cancel handler, we don't block all input but system is still
+    // able to deactivate the view etc.
+    iInputBlocker = CAknInputBlock::NewCancelHandlerLC( this );
+    CleanupStack::Pop( iInputBlocker );
+    
+    // This means that iInputBlocker is deleted by CAknInputBlock when
+    // it's cancelled ( we get a callback where iInputBlocker is set to NULL).
+    iInputBlocker->SetCancelDelete( iInputBlocker );                         
+    }
+
+// -----------------------------------------------------------------------------
+// AsyncCallBackToLaunchAction
+// Callback function for CAsyncCallBack class.
+// -----------------------------------------------------------------------------
+//
+TInt CEasyDialingPlugin::AsyncCallBackToLaunchAction( TAny* aPtr )
+    {
+    CEasyDialingPlugin* plugin = static_cast<CEasyDialingPlugin*>( aPtr );
+    
+    TRAP_IGNORE( plugin->DoLaunchActionL() );
+    
+    // Stop input block if active (=not NULL).
+    if ( plugin->iInputBlocker )
+        {
+        plugin->iInputBlocker->Cancel();
+        }
+    
+    plugin->iActionToBeLaunched = ENoActionDefined;
+    
+    return KErrNone;
+    }
+    
+// -----------------------------------------------------------------------------
+// DoLaunchActionL
+//
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::DoLaunchActionL( )
+    {
+    // If ELaunchCurrentContact, then we launch cca launcher.
+    if ( iActionToBeLaunched == ELaunchCurrentContact )
+        {
+        LaunchCurrentContactL();
+        return;
+        }
+    else if ( iActionToBeLaunched == ELaunchSearch )
+        {
+        LaunchSearchL();
+        return;
+        }
+    
+    // If not for launching current contact or performing search, 
+    // the action is launching some communication method.
+    
+    if ( iContactorService->IsBusy() )
+        {
+        LOGSTRING("EasyDialingPlugin: LaunchActionL - contactor service is busy!");
+        return;
+        }
+ 
+    // Get current contact link.
+    HBufC8* contact8 = iContactListBox->CurrentContactLinkLC();
+    
+    TPtrC contactString( iListBoxModel->MdcaPoint( iContactListBox->CurrentItemIndex() ) );
+    
+    TPtrC fullNameSeparators;
+    TInt error = TextUtils::ColumnText( fullNameSeparators , 1, &contactString );
+    __ASSERT_DEBUG( error == KErrNone, EasyDialingPanic( EEasyDialingPanicInvalidListBoxModelString ) );
+    
+    // Remove highlight separators. It is possible that some contactor API has problem with them.
+    HBufC* fullName = AllocWithoutHighlightSeparatorsLC( fullNameSeparators );
+    
+    VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector selector( 
+            VPbkFieldTypeSelectorFactory::EEmptySelector );   
+    
+    switch ( iActionToBeLaunched ) 
+        {
+        case ECallCurrentContact:
+            {
+            // Easy Dialing provides pretty much the same functionality for big Call icon 
+            // and Send key than phonebook's contact list view by using aiw interface 
+            // in edcontactor.
+            // At this point one must however check whether to use voip or voice call selector - 
+            // otherwise correct logic is provided by aiw interface.
+            // Note that Easy Dialing ignores default numbers and addresses set for
+            // action types and shows always the number and address list if there are
+            // more than one possible number/address for some action.
+             
+            CSPSettingsVoIPUtils* sPSettings = CSPSettingsVoIPUtils::NewLC();
+            
+            if ( sPSettings->IsPreferredTelephonyVoIP() )
+                {
+                selector = VPbkFieldTypeSelectorFactory::EVOIPCallSelector;
+                }
+            else
+                {
+                selector = VPbkFieldTypeSelectorFactory::EVoiceCallSelector;
+                }
+            
+            CleanupStack::PopAndDestroy( sPSettings );         
+            }
+            break;
+            
+        case EVideoCallCurrentContact:
+            
+            selector = VPbkFieldTypeSelectorFactory::EVideoCallSelector;
+            break;
+            
+        case ESendMessageCurrentContact:
+            
+            selector = VPbkFieldTypeSelectorFactory::EUniEditorSelector;
+            break;
+            
+        default:
+            CleanupStack::PopAndDestroy( fullName );           
+            CleanupStack::PopAndDestroy( contact8 );
+            __ASSERT_DEBUG( EFalse, EasyDialingPanic( EEasyDialingActionNotSupported ) );
+            return;
+        }
+
+    CEDContactorService::TCSParameter param( selector, *contact8, 0, *fullName );
+
+    iContactorService->ExecuteServiceL( param );
+
+    CleanupStack::PopAndDestroy( fullName );
+    CleanupStack::PopAndDestroy( contact8 );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CancelActionLaunchAndInputBlock
+// Should be called when focus is lost or when call ui is activated.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::CancelActionLaunchAndInputBlock()
+    {
+    iAsyncCallBack->Cancel();
+    if ( iInputBlocker )
+        {
+        iInputBlocker->Cancel();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// HandleListBoxEventL
+// EasyDialerListBox calls this function when listbox events are reported
+// to observers.
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin::HandleListBoxEventL( CEikListBox* /*aListBox*/, TListBoxEvent aEventType )
+    {
+    LOGSTRING1( "EasyDialingPlugin: HandleListBoxEventL( %d ) - Enter", aEventType );
+
+    switch( aEventType )
+        {
+        case EEventItemSingleClicked:
+            // 9.2. Selecting contact initiates call
+            AsyncActionLaunchL( ECallCurrentContact );
+            break;
+
+        case KEasyDialingContactLongTapped:
+            AsyncActionLaunchL( ELaunchCurrentContact );
+            break;
+            
+        // We are not interested about the other listbox events.
+        default:
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// From MAknInputBlockCancelHandler.
+// Called when input block is cancelled.
+// -----------------------------------------------------------------------------
+//
+ void CEasyDialingPlugin::AknInputBlockCancel()
+     {
+     LOGSTRING("EasyDialingPlugin: AknInputBlockCancel");
+     
+     // iInputBlocker will be deleted right after this callback by CAknInputBlock
+     // cause we are using CAknInputBlock::SetCancelDelete method.
+     iInputBlocker = NULL;
+     }
+
+/*
+ * ==============================================================================
+ * 
+ * Local functions
+ * 
+ * ==============================================================================
+ */
+
+
+
+// -----------------------------------------------------------------------------
+// CompareTPsMatchLocation
+// Compares two TPsMatchLocation objects based on where the match 
+// is located in the search string. This used in ordering matches
+// based on their location.
+// -----------------------------------------------------------------------------
+//
+TInt CompareTPsMatchLocation( const TPsMatchLocation& a1, const TPsMatchLocation& a2)
+    {
+    if ( a1.index == a2.index )
+        {
+        return 0;
+        }
+    return ( a1.index > a2.index ) ? 1 : -1;
+    }
+
+
+// -----------------------------------------------------------------------------
+// AppendStringWithMatchDataL
+// Appends a string with match data into a TDes buffer. Match data is a string 
+// where matching and non-matching parts are separated by matching hightlight separator
+// characters.
+// -----------------------------------------------------------------------------
+//
+void AppendStringWithMatchDataL(
+        TDes& aBuffer,
+        const TDesC& aText,
+        CPSRequestHandler* aPSHandler,
+        const CPsQuery* aPSQuery )
+    {
+    if ( HighlightingSupportedForText( aText ) )
+        {
+        CDesCArrayFlat* matchingParts = new (ELeave) CDesCArrayFlat(KEasyDialingMaximumMatchingParts);
+        CleanupStack::PushL( matchingParts );
+     
+        RArray<TPsMatchLocation> matchIndices;
+        CleanupClosePushL( matchIndices );
+        
+        aPSHandler->LookupL( *aPSQuery , aText , *matchingParts, matchIndices );
+        
+        // Sort matchIndices array. Later handling assumes it to be sorted according to index field.
+        TLinearOrder<TPsMatchLocation> order( CompareTPsMatchLocation );
+        matchIndices.Sort( order );
+       
+        TInt numberOfIndices = matchIndices.Count();
+        TInt textOffset = 0;
+        
+        for (TInt i = 0; i < numberOfIndices ; i++ )
+            {
+            TInt matchingPartStart = matchIndices[i].index;
+            TInt matchingPartLength = matchIndices[i].length;
+            
+            // Append the non-matching part (if exists) 
+            if ( matchingPartStart > textOffset )
+                {
+                TPtrC notMatchingPart = aText.Mid( textOffset, matchingPartStart - textOffset );
+                aBuffer.Append( notMatchingPart );
+                }
+            
+            // Append matching separator charactes.
+            aBuffer.Append( KHighlightSeparatorChar );
+            
+            TPtrC matchingPart = aText.Mid( matchingPartStart, matchingPartLength );
+            aBuffer.Append( matchingPart );
+    
+            // Append matching separator charactes.
+            aBuffer.Append( KHighlightSeparatorChar );
+                    
+            textOffset = matchingPartStart + matchingPartLength;
+            }
+
+        CleanupStack::PopAndDestroy( &matchIndices );
+        CleanupStack::PopAndDestroy( matchingParts );
+
+        // Now there still may be one not matching part to be appended.
+        if ( textOffset < aText.Length() )
+            {
+            TPtrC notMatchingPart = aText.Mid( textOffset, aText.Length() - textOffset );
+            aBuffer.Append( notMatchingPart );
+            }
+        }
+    else // HighlightingSupportedForText( aText )
+        {
+        aBuffer.Append( aText );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// HighlightingSupportedForText
+// Checks if highlighting of matching text part is supported for the combination
+// of scripts used in the given text
+// -----------------------------------------------------------------------------
+//
+TBool HighlightingSupportedForText( const TDesC& aText )
+    {
+    // Highlighting for text is supported unless it contains one ore more
+    // characters written with unsupported script.
+    TBool supported = ETrue;
+    for ( TInt i = 0 ; i < aText.Length() && supported ; ++i )
+        {
+        supported = HighlightingSupportedForScript( aText[i] );
+        }
+    
+    // ... or it contains both LTR and RTL blocks
+    if ( supported )
+        {
+        supported = !IsStrictlyBidirectional( aText );
+        }
+    
+    return supported;
+    }
+
+// -----------------------------------------------------------------------------
+// HighlightingSupportedForScript
+// Checks if highlighting of matching text part is supported for the script
+// of given character
+// -----------------------------------------------------------------------------
+//
+TBool HighlightingSupportedForScript( TText aChar )
+    {
+    // For now, we don't support highlighting for any Arabic or South East Asian 
+    // script. This is because many of these scripts use rendering rules
+    // which cause problems for our simple highlighting logic designed for
+    // Latin script.
+
+    TBool belongsToUnsupportedRange = 
+        ( aChar >= KArabicAndSouthEastAsianRangeStart && aChar <= KArabicAndSouthEastAsianRangeEnd ) ||
+        ( aChar >= KArabicPresentationFormsARangenStart && aChar <= KArabicPresentationFormsARangeEnd ) ||
+        ( aChar >= KArabicPresentationFormsBRangenStart && aChar <= KArabicPresentationFormsBRangeEnd );
+    return !belongsToUnsupportedRange;
+    }
+
+// -----------------------------------------------------------------------------
+// IsStrictlyBidirectional
+// 
+// Returns true if argument descriptor contains both left-to-right and
+// right-to-left blocks
+// -----------------------------------------------------------------------------
+//
+TBool IsStrictlyBidirectional( const TDesC& aText )
+    {
+    TBool bothDirectionsFound = EFalse;
+    
+    // TRunInfoArray contains information of the directionalities of the different sections of the aText    
+    TBidirectionalState::TRunInfo array[ KMaxRunInfoArrayCount ];
+    
+    // Initialize the TBidiLogicalToVisual converter for making the conversion from logical to visual order
+    TBidiLogicalToVisual converter( aText, array, KMaxRunInfoArrayCount );
+    
+    // Do the reordering. Amount of different directionality sections is returned.
+    TInt blockCount = converter.Reorder();
+    if ( blockCount > KMaxRunInfoArrayCount )
+        {
+        // If there are  more directionality blocks than we are prepared to handle, then we don't
+        // know the directionality of them all. Report this as bidirectional to be on the safe side.
+        // This should be an extremely rare special case.
+        bothDirectionsFound = ETrue;
+        }
+    else if ( blockCount > 1 )
+        {
+        // If there are more than one directionality blocks, go through all of them and
+        // check if the resolved direction changes in any of the blocks.
+        TUint8 firstDirection = array[0].iDirection;
+        for ( TInt i = 1 ; i < blockCount && !bothDirectionsFound ; i++ )
+            {
+            if ( array[i].iDirection != firstDirection )
+                {
+                bothDirectionsFound = ETrue;
+                }
+            }
+        }
+
+    return bothDirectionsFound;
+    }
+
+
+// -----------------------------------------------------------------------------
+// AllocWithoutHighlightSeparatorsLC
+// 
+// Allocates a copy of the parameter descriptor with highlight separators 
+// removed.
+// -----------------------------------------------------------------------------
+//
+static HBufC* AllocWithoutHighlightSeparatorsLC( TDesC& aDesc )
+    {
+    HBufC* resultDesc = aDesc.AllocLC();
+    TPtr ptr = resultDesc->Des();
+    AknTextUtils::StripCharacters( ptr, KHighlightSeparatorCharAsLiteral );
+    return resultDesc;
+    }
+
+
+// -----------------------------------------------------------------------------
+// IsItuTCharacter
+// 
+// Test whether parameter character is a number pad character "0123456789#*+"
+// -----------------------------------------------------------------------------
+//
+static TBool IsItuTCharacter( TChar aChar )
+    {
+    return aChar.IsDigit() || 
+         aChar.GetCategory() == TChar::EArabicNumber ||
+         aChar == TChar('#') ||
+         aChar == TChar('*') ||
+         aChar == TChar('+');
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/src/easydialingutils.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* 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:  Helper class for easydialing.
+*
+*/
+
+#include <e32std.h>
+#include <AknUtils.h>
+
+#include "easydialingutils.h"
+
+const TText KNameSeparatorChar = ' ';
+const TText KListFieldSeparatorChar = '\t';
+
+// -----------------------------------------------------------------------------
+// CreateContactStringLC
+//
+// -----------------------------------------------------------------------------
+//
+HBufC* EasyDialingUtils::CreateContactStringLC(
+        const TDesC& aFirstName,
+        const TDesC& aLastName,
+        const TDesC& aCompanyName,
+        CPbkContactEngine::TPbkNameOrder aNameOrder )
+    {
+    // first strip control chars from the names
+    HBufC* firstName = aFirstName.AllocLC();
+    TPtr fPtr = firstName->Des();
+    AknTextUtils::StripCharacters( fPtr, KAknStripListControlChars );
+
+    HBufC* lastName = aLastName.AllocLC();
+    TPtr lPtr = lastName->Des();
+    AknTextUtils::StripCharacters( lPtr, KAknStripListControlChars );
+
+    HBufC* companyName = aCompanyName.AllocLC();
+    TPtr cPtr = companyName->Des();
+    AknTextUtils::StripCharacters( cPtr, KAknStripListControlChars );
+
+    // Calculate string lenght. If first name and last name are missing, company name is duplicated.
+    // Add company name lenght twice to make sure there is enough space.
+    TInt stringLength = firstName->Length() + lastName->Length() + 2 * companyName->Length() + 2;
+    HBufC* string = HBufC::NewLC( stringLength );
+    TPtr ptr = string->Des();
+    
+    // If there is no first name, the last name will be used.
+    if ( firstName->Length() == 0 )
+        {
+        ptr.Copy( *lastName );
+        }
+    
+    // If there is no last name, the first name will be used.
+    else if ( lastName->Length() == 0 )
+        {
+        ptr.Copy( *firstName );
+        }
+    
+    // If there are both first and last name, the name string is composed of them both.
+    else 
+        {
+        if( aNameOrder == CPbkContactEngine::EPbkNameOrderFirstNameLastName )
+            {
+            ptr.Copy( *firstName );
+            ptr.Append( KNameSeparatorChar );
+            ptr.Append( *lastName );
+            }
+        else
+            {
+            ptr.Copy( *lastName );
+            ptr.Append( KNameSeparatorChar );
+            ptr.Append( *firstName );
+            }        
+        } 
+    
+    // If firstname and last name are missing, duplicate company name into name field.
+    if ( ptr.Length() == 0 )
+        {
+        ptr.Append( *companyName );
+        }
+    
+    // Append company name using tab as a separator.
+    ptr.Append( KListFieldSeparatorChar );
+    ptr.Append( *companyName );
+    
+    CleanupStack::Pop( string );
+    CleanupStack::PopAndDestroy( 3, firstName );
+    CleanupStack::PushL( string );
+    return string;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/traces/OstTraceDefinitions.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,23 @@
+/*
+* 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: OstTraceDefinitions.h
+*
+*/
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
+// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
+// #define OST_TRACE_COMPILER_IN_USE
+#include <OpenSystemTrace.h>
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/traces/easydialingpluginTraces.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,22 @@
+/*
+* 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: easydialingpluginTraces.h
+*
+*/
+// Created by TraceCompiler1.1.0
+// DO NOT EDIT, CHANGES WILL BE LOST
+// CONTENT WILL BE GENERATED AUTOMATICALLY HERE
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/data/edta.rls	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,91 @@
+/*
+* 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:  
+*
+*/
+
+
+//  LOCALISATION STRINGS
+
+
+//d:Caption string for app.
+rls_string STRING_r_hewb_caption_string "Easy dialing test application"
+
+//d:Short caption string for app.
+rls_string STRING_r_hewb_short_caption_string "HW"
+
+//d:Subcaption for options menu
+rls_string STRING_r_hewb_command_plugin_functions_menu "ED plugin functions"
+
+//d:Subcaption for options menu
+rls_string STRING_r_hewb_command_test_functions_menu "Testing functions"
+
+//d:First item in "Options" menu pane, "hello" event.
+rls_string STRING_r_hewb_command_set_plugin_input "Set ED plugin input"
+
+//d:Menu item for show matching contacts.
+rls_string STRING_r_hewb_command_search_contacts "Search contacts"
+
+//d:Menu item for launching the first contact of the previous search.
+rls_string STRING_r_hewb_command_launch_first_contact "Launch first"
+
+//d:Menu item for selecting and launching a contact from the previous search.
+rls_string STRING_r_hewb_command_select_and_launch_contact "Select contact and open CL"
+
+//d:Menu item for checking the PCSserver.
+rls_string STRING_r_hewb_command_check_pcsserver "Check PCS Server"
+
+//d:Menu item for showing phonebooks name order
+rls_string STRING_r_hewb_command_show_name_ordering "Phonebook name order"
+
+//d:Menu item for creating test contact database
+rls_string STRING_r_hewb_command_create_contact_base "Create test contacts"
+
+//d:Menu item for two consequtive searches test.
+rls_string STRING_r_hewb_command_two_consequtive_searches "Two consequtive searches"
+
+//d:Menu item for coverage tests.
+rls_string STRING_r_hewb_command_coverage_test "Coverage test"
+
+//d:Fourth item in "Options" menu pane, "exit" event.
+rls_string STRING_r_hewb_exit "Exit"
+
+//d:When user requests EEdtaSetPluginInput event, text below is shown.
+rls_string STRING_r_hewb_command_set_plugin_input_text "Set easy dial input"
+
+// d: Menu item for thumbnail setting
+rls_string STRING_r_hewb_command_thumbnail_settings_menu "Thumbnail cenrep setting"
+
+// d: Menu item for thumbnail setting item
+rls_string STRING_r_hewb_command_show_thumbnails "Show thumbnails"
+
+// d: Menu item for thumbnail setting item
+rls_string STRING_r_hewb_command_hide_thumbnails "Hide thumbnails"
+
+//d:When user requests EEdtaCommand2 event, text below is shown.
+rls_string STRING_r_hewb_file_text ""
+
+rls_string STRING_r_edta_loc_resource_file_1 "\\resource\\apps\\edta"
+
+// d: Default document name. Not to be localised.
+rls_string STRING_r_default_document_name "EDTA"
+
+// d: Icon file path. Not to be localised.
+rls_string STRING_r_icon_file_path "\\resource\\apps\\edta_aif.mif"
+
+// d: Application file. Not to be localised.
+rls_string STRING_r_app_file "edta"
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/data/edta.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,279 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+//  RESOURCE IDENTIFIER
+NAME HEWB    // 4 letter ID
+
+
+//  INCLUDES
+#include <eikon.rh>
+#include <avkon.rh>
+#include <avkon.rsg>
+#include <appinfo.rh>
+#include <AiwCommon.rh>
+
+#include "edta.hrh"
+#include "edta.rls"
+//#include "easydialingconstants.hrh"
+
+//  RESOURCE DEFINITIONS
+// -----------------------------------------------------------------------------
+//
+//    Define the resource file signature
+//    This resource should be empty.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE
+    {
+    }
+
+// -----------------------------------------------------------------------------
+//
+//    Default Document Name
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_default_document_name
+    {
+    buf=STRING_r_default_document_name;
+    }
+
+// -----------------------------------------------------------------------------
+//
+//    Define default menu and CBA key.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+    {
+    menubar = r_edta_menubar;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//   r_edta_menubar
+//   Menubar for edta example
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_edta_menubar
+    {
+    titles =
+        {
+        MENU_TITLE { menu_pane = r_edta_menu; }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//   r_edta_menu
+//   Menu for "Options"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_edta_menu
+    {
+    items =
+        {
+        MENU_ITEM
+                {
+                txt = STRING_r_hewb_command_plugin_functions_menu;
+                cascade = r_edta_plugin_functions_menu;
+                },
+        MENU_ITEM
+                {
+                command = EEdtaCommandShowContacts;
+                txt = STRING_r_hewb_command_search_contacts;
+                },
+        MENU_ITEM
+                {
+                command = EEdtaSelectAndLaunchContact;
+                txt = STRING_r_hewb_command_select_and_launch_contact;
+                },
+        MENU_ITEM
+                {
+                command = EEdtaCommandCheckPCSServer;
+                txt = STRING_r_hewb_command_check_pcsserver;
+                },
+        MENU_ITEM
+                {
+                command = EEdtaCommandShowNameOrdering;
+                txt = STRING_r_hewb_command_show_name_ordering;
+                },
+        MENU_ITEM
+                {
+                txt = STRING_r_hewb_command_test_functions_menu;
+                cascade = r_edta_test_functions_menu;
+                },
+        MENU_ITEM
+                {
+                command = EAknSoftkeyExit;
+                txt = STRING_r_hewb_exit;
+                }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//
+//   r_edta_plugin_functions_menu
+//   Submenu for "Options"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_edta_plugin_functions_menu
+    {
+    items =
+        {
+        MENU_ITEM
+                {
+                command = EEdtaSetPluginInput;
+                txt = STRING_r_hewb_command_set_plugin_input;
+                },
+        MENU_ITEM
+                {
+                command = EEdtaCommandTwoConsequtiveSearchesTest;
+                txt = STRING_r_hewb_command_two_consequtive_searches;
+                },
+        MENU_ITEM
+                {
+                txt = STRING_r_hewb_command_thumbnail_settings_menu;
+                cascade = r_edta_plugin_thumbnail_settings_menu;
+                }              
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//
+//   r_edta_plugin_thumbnail_settings_menu
+//   Submenu for "Thumbnail setting"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_edta_plugin_thumbnail_settings_menu
+    {
+    items =
+       {
+       MENU_ITEM
+               {
+               command = EEdtaCommandShowThumbnails;
+               txt = STRING_r_hewb_command_show_thumbnails;
+               },
+       MENU_ITEM
+               {
+               command = EEdtaCommandHideThumbnails;
+               txt = STRING_r_hewb_command_hide_thumbnails;
+               }
+       };
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+//   r_edta_test_functions_menu
+//   Submenu for "Options"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_edta_test_functions_menu
+    {
+    items =
+        {
+        MENU_ITEM
+                {
+                command = EEdtaCommandCreateTestContactBase;
+                txt = STRING_r_hewb_command_create_contact_base;
+                },               
+        MENU_ITEM
+                {
+                command = EEdtaCommandMiscCoverageTest;
+                txt = STRING_r_hewb_command_coverage_test;
+                }
+        };
+    }
+
+
+// -----------------------------------------------------------------------------
+//
+// Resources for messages.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF32 r_hewb_command_set_plugin_input_text { buf=STRING_r_hewb_command_set_plugin_input_text; }
+RESOURCE TBUF32 r_hewb_file_text { buf=STRING_r_hewb_file_text; }
+RESOURCE TBUF32 r_hewb_caption_string { buf=STRING_r_hewb_caption_string; }
+
+// ----------------------------------------------------------------------------
+//
+// r_edta_localisable_app_info
+//
+// ----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_edta_localisable_app_info
+    {
+    short_caption = STRING_r_hewb_caption_string;
+    caption_and_icon =
+    CAPTION_AND_ICON_INFO
+        {
+        caption = STRING_r_hewb_caption_string;
+
+        number_of_icons = 1;
+	   	icon_file = STRING_r_icon_file_path;
+	    };
+    }
+
+// ----------------------------------------------------------------------------
+//
+// r_dialog_text_edit_query
+//
+// ----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_dialog_text_edit_query
+    {
+    flags = EAknGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_DATA_QUERY
+                {
+                layout = EDataLayout;
+                label = "Enter dial search string ?";
+                control = EDWIN
+                    {
+                    allowed_case_modes = EAknEditorAllCaseModes; 
+                    default_case = EAknEditorLowerCase;
+                    allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode;
+                    default_input_mode = EAknEditorTextInputMode;
+                    avkon_flags = EAknEditorFlagNoT9;
+                    width = 32;
+                    maxlength = 32;
+                    lines = 1;
+                    };
+                };
+            }
+        };
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/data/edta_reg.rss	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,35 @@
+/*
+* 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 "edta.rls"
+#include <appinfo.rh>
+#include <edta.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x2000FDDC
+//UID3 0xA000017F
+
+RESOURCE APP_REGISTRATION_INFO
+  {
+  app_file=STRING_r_app_file;
+  localisable_resource_file =  STRING_r_edta_loc_resource_file_1;
+  localisable_resource_id = R_EDTA_LOCALISABLE_APP_INFO;
+
+  embeddability=KAppNotEmbeddable;
+  newfile=KAppDoesNotSupportNewFile;
+  }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/gfx/qgn_menu_edta.svg	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 87.999">
+<g>
+<g>
+<g>
+<g>
+<rect fill="none" width="88" height="87.999"/>
+</g>
+</g>
+<g>
+<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="12.3042" y1="18.3799" x2="63.4113" y2="79.287">
+<stop offset="0" style="stop-color:#B3DDFF"/>
+<stop offset="0.8146" style="stop-color:#084296"/>
+<stop offset="1" style="stop-color:#084296"/>
+</linearGradient>
+<path fill="url(#XMLID_7_)" d="M32.135,7.415L14.363,17.432v23.167c0,0,8.926,15.351,10.468,18.001       c-2.386,1.704-15.44,11.03-15.44,11.03l21.613,12.652c0,0,12.907-9.85,14.71-11.226c1.979,1.109,16.231,9.101,16.231,9.101       l16.664-15.132c0,0-14.066-6.929-16.888-8.318c1.467-3.01,10.531-21.604,10.531-21.604l-22.298-9.59       c0,0-1.486,3.173-2.093,4.467c-2.046-0.88-6.573-2.826-6.573-2.826s-3.713,2.463-5.696,3.778       c-0.327-0.744-0.542-1.233-0.657-1.495c0.007-0.824,0.213-23.72,0.213-23.72L32.135,7.415z"/>
+<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="40.8276" y1="52.1914" x2="16.1997" y2="21.1353">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_8_)" points="59.051,57.621 69.536,36.111 50.944,28.115 48.852,32.581 41.493,29.418 34.719,33.911        32.932,29.849 33.117,9.157 16.363,18.601 16.363,40.06 27.476,59.169 13.064,69.463 30.856,79.879 45.546,68.669        61.667,77.708 75.089,65.521 "/>
+<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="60.585" y1="31.876" x2="53.8582" y2="45.1125">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_9_)" points="41.26,48.783 50.944,28.115 69.536,36.111 59.051,57.621 "/>
+<polygon fill="#0046B7" points="16.363,40.06 27.476,59.169 41.26,48.783 32.932,29.849 "/>
+<polygon fill="#3366CC" points="16.363,40.06 16.363,18.601 33.117,9.157 32.932,29.849 "/>
+<polygon fill="#CFECFF" points="26.696,39.23 41.493,29.418 59.523,37.168 45.546,47.954 "/>
+<path fill="#5AA7E0" d="M41.954,55.286"/>
+<polygon fill="#3366CC" points="26.696,39.23 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#5AA7E0" points="13.064,69.463 27.476,59.169 45.546,68.669 30.856,79.879 "/>
+<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="29.2085" y1="63.6836" x2="48.7102" y2="56.1976">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.0056" style="stop-color:#5AA7E0"/>
+<stop offset="0.85" style="stop-color:#3366CC"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_10_)" points="43.423,46.971 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#0046B7" points="45.546,47.954 45.546,68.669 59.051,57.621 59.523,37.168 "/>
+<linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="45.3936" y1="59.5186" x2="59.0508" y2="59.5186">
+<stop offset="0" style="stop-color:#0046B7"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_11_)" points="45.394,50.368 45.546,68.669 59.051,57.621 "/>
+<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="60.8945" y1="68.6807" x2="57.2953" y2="58.792">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.4101" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_12_)" points="61.667,77.708 45.546,68.669 59.051,57.621 75.089,65.521 "/>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/group/Icons_scalable_dc.mk	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,53 @@
+#
+# 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:  This is file for creating .mif file (scalable icon)
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
+else
+ZDIR=$(EPOCROOT)epoc32\data\z
+endif
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\edta_aif.mif
+
+ICONDIR=..\gfx
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE :	
+	mifconv $(ICONTARGETFILENAME) \
+		/c32 $(ICONDIR)\qgn_menu_edta.svg
+		
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/group/bld.inf	Fri Feb 19 22:50:26 2010 +0200
@@ -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:
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+gnumakefile icons_scalable_dc.mk
+
+edta.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/group/edta.mmp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* 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 <platform_paths.hrh>
+
+TARGET            edta.exe
+TARGETTYPE        exe
+UID		  0x100039CE 0x2000FDDC
+
+SECUREID	  0x2000FDDC
+EPOCSTACKSIZE	  0x5000
+
+SOURCEPATH        ..\src
+SOURCE            edta.cpp
+SOURCE            edta_application.cpp
+SOURCE            edta_appview.cpp
+SOURCE            edta_appui.cpp
+SOURCE            edta_document.cpp
+SOURCE            edta_querydialog.cpp
+SOURCE            edta_screentextbuffer.cpp
+SOURCE            edta_createtestcontactbase.cpp
+SOURCE            edta_dummylistener.cpp
+
+
+SOURCEPATH        ../data
+
+START RESOURCE    edta.rss
+HEADER
+TARGETPATH resource/apps
+LANG SC 01 09 31 32
+END //RESOURCE
+
+START RESOURCE    edta_reg.rss
+TARGETPATH 	  /private/10003a3f/apps
+END //RESOURCE
+
+
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE 	  ../../../../../inc
+
+USERINCLUDE       ../inc
+
+LIBRARY           euser.lib
+LIBRARY           apparc.lib
+LIBRARY           cone.lib
+LIBRARY           gdi.lib
+LIBRARY           eikcore.lib
+LIBRARY           avkon.lib
+LIBRARY           bafl.lib
+LIBRARY           commonengine.lib
+LIBRARY		      efsrv.lib
+LIBRARY           estor.lib
+LIBRARY           eikcoctl.lib
+LIBRARY           eikdlg.lib
+LIBRARY           PcsUtils.lib
+LIBRARY           PsServerClientAPI.lib
+LIBRARY           VPbkEng.lib ccaclient.lib
+LIBRARY           ecom.lib
+LIBRARY           cntmodel.lib
+LIBRARY           pbkeng.lib
+LIBRARY	          servicehandler.lib
+LIBRARY           centralrepository.lib   
+
+DEBUGLIBRARY      flogger.lib
+
+
+VENDORID	  	  VID_DEFAULT
+
+CAPABILITY LocalServices Location NetworkServices ReadDeviceData ReadUserData UserEnvironment WriteDeviceData WriteUserData
+
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta.hrh	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#ifndef __EDTA_HRH__
+#define __EDTA_HRH__
+
+// Edta enumerate command codes
+enum TEdtaIds
+    {
+    EEdtaSetPluginInput = 0x6001, // start value must not be 0
+    EEdtaCommandShowContacts,
+    EEdtaLaunchFirstContact,
+    EEdtaSelectAndLaunchContact,
+    EEdtaCommandCheckPCSServer,
+    EEdtaCommandShowNameOrdering,
+    EEdtaCommandCreateTestContactBase,
+    EEdtaCommandTwoConsequtiveSearchesTest,
+    EEdtaCommandMiscCoverageTest,
+    EEdtaCommandShowThumbnails,
+    EEdtaCommandHideThumbnails,
+    EEdtaCommandLast
+    };
+
+#endif // __EDTA_HRH__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta.pan	Fri Feb 19 22:50:26 2010 +0200
@@ -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:  Easy dialing test application.
+*
+*/
+
+#ifndef __EDTA_PAN__
+#define __EDTA_PAN__
+
+#include "edta_debugprint.h"
+
+/** Edta application panic codes */
+enum TEdtaPanics
+    {
+    EEdtaUi = 1,
+    EEdtaSkinChangePanic = 2,
+    EEdtaCalculatePanic = 3,
+    EEdtaFieldNotInitialized = 4
+    // add further panics here
+    };
+
+_LIT(KEdtaApplicationName,"Edta");
+
+inline void Panic(TEdtaPanics aReason)
+    {
+    DebugPrintF(_L("Panic reason: %d"), (TInt) aReason);
+    User::Panic(KEdtaApplicationName, aReason);
+    }
+
+inline void Panic(TEdtaPanics aReason, TDesC aText)
+    {
+    DebugPrintF(_L("Panic reason: %d, '%S'"), (TInt) aReason, &aText );
+    User::Panic(KEdtaApplicationName, aReason);
+    }
+
+#endif // __EDTA_PAN__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta_application.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,56 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#ifndef __EDTA_APPLICATION_H__
+#define __EDTA_APPLICATION_H__
+
+// INCLUDES
+#include <aknapp.h>
+
+// CLASS DECLARATION
+
+/**
+* CEdtaApplication application class.
+* Provides factory to create concrete document object.
+* An instance of CEdtaApplication is the application part of the
+* AVKON application framework for the Edta example application.
+*/
+class CEdtaApplication : public CAknApplication
+    {
+    public: // Functions from base classes
+
+        /**
+        * From CApaApplication, AppDllUid.
+        * @return Application's UID (KUidEdtaApp).
+        */
+        TUid AppDllUid() const;
+
+    protected: // Functions from base classes
+
+        /**
+        * From CApaApplication, CreateDocumentL.
+        * Creates document object. The returned
+        * pointer in not owned by the CEdtaApplication object.
+        * @return A pointer to the created document object.
+        */
+        CApaDocument* CreateDocumentL();
+    };
+
+#endif // __EDTA_APPLICATION_H__
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta_appui.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,70 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#ifndef __EDTA_APPUI_H__
+#define __EDTA_APPUI_H__
+
+// INCLUDES
+#include <aknappui.h>
+#include "edta_screentextbuffer.h"
+
+// FORWARD DECLARATIONS
+class CEdtaAppView;
+class CAiwServiceHandler;
+class CRepository;
+
+// CLASS DECLARATION
+/**
+* CEdtaAppUi application UI class.
+* Interacts with the user through the UI and request message processing
+* from the handler class
+*/
+class CEdtaAppUi : public CAknAppUi
+    {
+    public: // Constructors and destructor
+
+        void ConstructL();
+        CEdtaAppUi();
+        virtual ~CEdtaAppUi();
+
+        TBool CheckPluginLoadedAndShowNote();
+
+    private:  // Functions from base classes
+
+        void HandleCommandL( TInt aCommand );
+		void HandleStatusPaneSizeChange();
+		void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+    protected:
+        
+    private: // Data
+
+        CEdtaAppView* iAppView;
+        
+        // Contains query text
+        TBuf<KEdtaMaxLineWidth> iQueryText;
+
+        // OWN: aiw service handler
+        CAiwServiceHandler* iServiceHandler;
+        
+        // own
+        CRepository* iRepository;
+    };
+
+#endif // __EDTA_APPUI_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta_appview.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,142 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#ifndef __EDTA_APPVIEW_H__
+#define __EDTA_APPVIEW_H__
+
+// INCLUDES
+#include "edta_screentextbuffer.h"
+#include <coecntrl.h>
+#include <MPsResultsObserver.h>
+#include <mccaconnection.h>
+#include <dialingextensioninterface.h>
+
+
+// FORWARD DECLARATIONS
+class CPsClientData;
+class CPbkContactEngine;
+class CPsQuery;
+class CVPbkContactManager;
+class CVPbkContactStoreUriArray;
+class MVPbkContactLink;
+class CPSRequestHandler;
+class TCCAFactory;
+class MCCAParameter;
+class CDialingExtensionInterface;
+class CDummyListener;
+
+
+
+// CLASS DECLARATION
+class CEdtaAppView : public CCoeControl, public MPsResultsObserver, public MCCAObserver, public MDialingExtensionObserver
+    {
+    public: // New methods
+
+        static CEdtaAppView* NewL( const TRect& aRect );
+        static CEdtaAppView* NewLC( const TRect& aRect );
+        virtual ~CEdtaAppView();
+         
+        TInt CountComponentControls() const;
+        CCoeControl* ComponentControl(TInt aIndex) const;
+        
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+        
+        CEdtaScreenTextBuffer* GetScreenBuffer();
+        
+        CDialingExtensionInterface* GetEasyDialer();
+        
+        void ShowMatchingContactsL(const TDesC& aSearchString);
+
+        TBool IsPCSServerLoaded();
+        void CheckPCSServerL();
+        
+        void ShowNameOrderL();
+        
+        void LoadPluginL();
+        
+        void LaunchNthContactL(TInt aIx);
+        
+        void SelectAndLaunchContactL();
+        
+        void DoMiscellaneousTestsL();
+        
+    public:  // Functions from base classes
+
+        virtual void SizeChanged();
+
+    private: // Constructors
+
+        void ConstructL(const TRect& aRect);
+        
+        CEdtaAppView();
+        
+        void Draw( const TRect& aRect ) const;
+        
+        void InitContactDataStoreUrisL();
+        void InitPredictiveContactSearchL();
+         
+    private:    
+
+        //MPsResultsObserver functions
+        virtual void HandlePsResultsUpdate(RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs);
+        virtual void HandlePsError(TInt aErrorCode);
+        virtual void CachingStatus(TCachingStatus& aStatus, TInt& aError);
+       
+        /**
+         * Leaving function for Predictive search callback. Call TRAPPED in HandlePsResultsUpdate.
+         */
+        void HandlePredictiveSearchResultL(RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs);
+       
+        //MCCAObserver functions
+        void CCASimpleNotifyL( TNotifyType aType, TInt aReason );
+    
+        void HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent );
+
+    private:
+        
+        CEdtaScreenTextBuffer* iScreenBuffer;
+        
+        CPSRequestHandler* iPredictiveContactSearchHandler;
+        
+        CVPbkContactManager* iContactManager;
+        
+        CVPbkContactStoreUriArray* iContactStoreUriArray;
+        
+        RPointerArray<TDesC> iContactDataStores;
+        
+        RPointerArray<TDesC> iContactNames;
+        
+        RPointerArray<MVPbkContactLink> iMatchingContactLinks;
+        
+        CPsQuery* iPredictiveSearchQuery;
+        
+        MCCAConnection* iContactLauncher;
+        
+        /*
+         * Pointer to easy dialing plugin. This may be null, if no plugin present.
+         * Null-check is a must before use.
+         */
+        CDialingExtensionInterface* iEasyDialer;
+        
+        CDummyListener* iDummyListener;
+
+    };
+
+#endif // __EDTA_APPVIEW_H__
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta_debugprint.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,83 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+
+#ifndef __EDTADEBUGPRINT_H__
+#define __EDTADEBUGPRINT_H__
+
+// If you want file logging, uncomment the next define.
+
+#ifdef _DEBUG
+// #define USE_FILE_LOGGING
+#endif // _DEBUG
+
+#ifdef USE_FILE_LOGGING
+#include <flogger.h>
+_LIT( KLogDir,  "ed" );
+_LIT( KLogFile, "edta.log" );
+#endif
+
+
+// From this point on, internal implementation
+
+NONSHARABLE_CLASS(TOverflowTruncate) : public TDes16Overflow
+	{
+	public:
+	    void Overflow(TDes16& /*aDes*/) {}
+	};
+
+inline void DoDebugPrintF(TRefByValue<const TDesC> aFmt, VA_LIST& aList)
+    {
+    TBuf<200> buf;
+	TOverflowTruncate overFlow;
+    buf.AppendFormatList( aFmt, aList, &overFlow );
+    _LIT(KLogPrintFormat,"%S: %S");   // Log printing format 
+    const TDesC& thname = RThread().Name();                 // FullName
+    RDebug::Print( KLogPrintFormat, &thname, &buf );
+#ifdef USE_FILE_LOGGING
+    RFileLogger::Write(KLogDir, KLogFile, EFileLoggingModeAppend, buf);
+#endif
+    }
+
+inline void DebugPrintF(const TRefByValue<const TDesC> aFmt,...)
+    {
+    VA_LIST list;
+    VA_START(list,aFmt);
+    DoDebugPrintF(aFmt, list);
+    }
+
+
+#ifdef _DEBUG
+
+// These macros are to be used in debug prints
+#define DEBUGPRINT(x)           DebugPrintF(x)
+#define DEBUGPRINT_2(x,y)       DebugPrintF(x,y)
+#define DEBUGPRINT_3(x,y,z)     DebugPrintF(x,y,z)
+#define DEBUGPRINT_4(x,y,z,a)   DebugPrintF(x,y,z,a)
+
+#else // _DEBUG
+
+#define DEBUGPRINT(x)
+#define DEBUGPRINT_2(x,y)
+#define DEBUGPRINT_3(x,y,z)
+#define DEBUGPRINT_4(x,y,z,a)
+
+#endif // _DEBUG
+
+#endif // __EDTADEBUGPRINT_H__
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta_document.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#ifndef __EDTA_DOCUMENT_H__
+#define __EDTA_DOCUMENT_H__
+
+// INCLUDES
+#include <akndoc.h>
+
+// FORWARD DECLARATIONS
+class CEdtaAppUi;
+class CEikApplication;
+
+
+// CLASS DECLARATION
+
+/**
+* CEdtaDocument application class.
+* An instance of class CEdtaDocument is the Document part of the
+* AVKON application framework for the Edta example application.
+*/
+class CEdtaDocument : public CAknDocument
+    {
+    public: // Constructors and destructor
+
+        /**
+        * NewL.
+        * Two-phased constructor.
+        * Construct a CEdtaDocument for the AVKON application aApp
+        * using two phase construction, and return a pointer
+        * to the created object.
+        * @param aApp Application creating this document.
+        * @return A pointer to the created instance of CEdtaDocument.
+        */
+        static CEdtaDocument* NewL( CEikApplication& aApp );
+
+        /**
+        * NewLC.
+        * Two-phased constructor.
+        * Construct a CEdtaDocument for the AVKON application aApp
+        * using two phase construction, and return a pointer
+        * to the created object.
+        * @param aApp Application creating this document.
+        * @return A pointer to the created instance of CEdtaDocument.
+        */
+        static CEdtaDocument* NewLC( CEikApplication& aApp );
+
+        /**
+        * ~CEdtaDocument
+        * Virtual Destructor.
+        */
+        virtual ~CEdtaDocument();
+
+    public: // Functions from base classes
+
+        /**
+        * CreateAppUiL
+        * From CEikDocument, CreateAppUiL.
+        * Create a CEdtaAppUi object and return a pointer to it.
+        * The object returned is owned by the Uikon framework.
+        * @return Pointer to created instance of AppUi.
+        */
+        CEikAppUi* CreateAppUiL();
+
+    private: // Constructors
+
+        /**
+        * ConstructL
+        * 2nd phase constructor.
+        */
+        void ConstructL();
+
+        /**
+        * CEdtaDocument.
+        * C++ default constructor.
+        * @param aApp Application creating this document.
+        */
+        CEdtaDocument( CEikApplication& aApp );
+
+    };
+
+#endif // __EDTA_DOCUMENT_H__
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta_dummylistener.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,34 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#ifndef EDTA_DUMMYLISTENER_H_
+#define EDTA_DUMMYLISTENER_H_
+
+#include <coecntrl.h>
+#include <dialingextensioninterface.h>
+
+class CDummyListener : public CBase, public MDialingExtensionObserver
+    {
+public:
+    
+    CDummyListener();
+    ~CDummyListener();
+    
+    void HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent );    
+    };
+
+#endif /* EDTA_DUMMYLISTENER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta_querydialog.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#ifndef _EDTA_QUERYDIALOG_H
+#define _EDTA_QUERYDIALOG_H
+
+
+//  INCLUDES
+#include <aknquerydialog.h>
+
+// CLASS DECLARATION
+
+/**
+*  CEdtaQueryDialog class.
+*  This class is used to query the user for text information
+*/
+class CEdtaQueryDialog : public CAknTextQueryDialog
+    {
+    public:  // Constructors and destructor
+
+        CEdtaQueryDialog( TDes& aBuf, const HBufC *aDefInput );
+        virtual ~CEdtaQueryDialog() {};
+        
+
+    private:    // from CEikDialog
+
+        void  PreLayoutDynInitL();
+
+    private:    // Data
+
+        HBufC&  iDefInput;
+    };
+
+#endif // _EDTA_QUERYDIALOG_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/inc/edta_screentextbuffer.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,96 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#ifndef __EDTA_SCREENTEXTBUFFER_H__
+#define __EDTA_SCREENTEXTBUFFER_H__
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklabel.h>
+#include <coecntrl.h>
+#include <gdi.h>
+#include <eiksbobs.h>
+
+// FORWARD DECLARATIONS
+class CEikScrollBarFrame;
+class CFont;
+class TBidiText;
+class CAknsBasicBackgroundControlContext;
+
+// CONSTANTS
+const TInt KEdtaMaxLineWidth = 200;
+
+
+// CLASS DECLARATION
+class CEdtaScreenTextBuffer : public CCoeControl, public MEikScrollBarObserver
+    {
+    
+public:
+    static CEdtaScreenTextBuffer* NewL( const TRect& aRect );
+    static CEdtaScreenTextBuffer* NewLC( const TRect& aRect );
+    
+public:
+    CEdtaScreenTextBuffer();
+    ~CEdtaScreenTextBuffer();
+
+    void ConstructL( const TRect& aRect );
+    void HandleResourceChange(TInt aType);
+    void WriteLineL( TRefByValue<const TDesC> aText,... ); // text wrapping, was: const TDesC& aText
+    void DeleteLastLine(TInt aCount = 1);
+    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aModifiers );
+    
+protected:
+    
+    virtual void FocusChanged(TDrawNow aDrawNow);
+    
+private:
+    
+    void SizeChanged();
+
+    void Draw( const TRect& aRect ) const;
+    void ActivateL();
+    void HandleScrollEventL ( CEikScrollBar* aScrollBar, TEikScrollEvent aEventType);
+    TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+    
+private:
+    void CalculateL(const TRect& aRect);
+    void UpdateScrollIndicatorL();
+
+    
+    
+private: // Data
+
+    CArrayPtr<HBufC>* iText;
+    CArrayFixFlat<TInt>* iScreenStarts;
+    TInt iCurrentScreen;
+    TBool iDoNotShowLastLineAgain;
+    CGraphicsContext::TTextAlign iTextAlign;
+    CEikScrollBarFrame* iSBFrame;
+    const CFont* iFont; // not owned
+    
+    TInt iLineWidth;
+    TInt iBaseLineDelta;
+    TInt iTopBaseLineX;
+    TInt iTopBaseLineY;
+    TInt iLinesPerScreen;
+    
+    };
+
+
+#endif // __EDTA_SCREENTEXTBUFFER_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/rom/edta.iby	Fri Feb 19 22:50:26 2010 +0200
@@ -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 __EDTA_IBY__
+#define __EDTA_IBY__
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\edta.exe PROGRAMS_DIR\edta.exe
+S60_APP_AIF_ICONS(edta)
+S60_UPGRADABLE_APP_REG_RSC(edta)
+data=\epoc32\data\z\private\2000FDDC\backup_registration.xml \private\2000FDDC\backup_registration.xml
+
+#endif // __EDTA_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/rom/edta_resources.iby	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef __EDTA_RESOURCES_IBY__
+#define __EDTA_RESOURCES_IBY__
+
+#include <bldvariant.hrh>
+
+S60_APP_RESOURCE(edta)
+
+#endif // __EDTA_RESOURCES_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/sis/backup_registration.xml	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+  <system_backup/>
+  <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/sis/edta_armv5.pkg	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,52 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: 
+;
+; Edta_armv5.pkg
+;
+;Language - standard language definitions
+&EN,FI,ZH,JA
+
+; standard SIS file header
+#{"Easy dialing test application", "Easy dialing test application", "Easy dialing test application", "Easy dialing test application"},(0x2000FDDC),1,0,0
+
+;Localised Vendor name
+%{"Nokia", "Nokia", "Nokia", "Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID", "S60ProductID", "S60ProductID", "S60ProductID"}
+
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series605thProductID","Series605thProductID","Series605thProductID","Series605thProductID"}
+
+;ErrRD Support:
+"\epoc32\data\z\private\10003a3f\apps\edta_reg.rsc" - "C:\resource\ErrRd"
+
+;Files to install
+"\epoc32\release\armv5\urel\Edta.exe" -"!:\sys\bin\edta.exe"
+
+"\epoc32\data\z\resource\apps\edta.rsc" -"!:\resource\apps\edta.rsc"
+"\epoc32\data\z\resource\apps\edta.r09" -"!:\resource\apps\edta.r09"
+"\epoc32\data\z\resource\apps\edta.r31" -"!:\resource\apps\edta.r31"
+"\epoc32\data\z\resource\apps\edta.r32" -"!:\resource\apps\edta.r32"
+
+"\epoc32\data\z\private\10003a3f\apps\edta_reg.rsc" -"!:\private\10003a3f\import\apps\edta_reg.rsc"
+"\epoc32\data\z\resource\apps\edta_aif.mif" -"!:\resource\apps\edta_aif.mif"
+
+;required for application to be covered by backup/restore facility
+"backup_registration.xml"						-"!:\private\2000FDDC\backup_registration.xml"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/sis/edta_armv5_udeb.pkg	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,52 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: 
+;
+; Edta_armv5.pkg
+;
+;Language - standard language definitions
+&EN,FI,ZH,JA
+
+; standard SIS file header
+#{"Easy dialing test application", "Easy dialing test application", "Easy dialing test application", "Easy dialing test application"},(0x2000FDDC),1,0,0
+
+;Localised Vendor name
+%{"Nokia", "Nokia", "Nokia", "Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"S60ProductID", "S60ProductID", "S60ProductID", "S60ProductID"}
+
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series605thProductID","Series605thProductID","Series605thProductID","Series605thProductID"}
+
+;ErrRD Support:
+"\epoc32\data\z\private\10003a3f\apps\edta_reg.rsc" - "C:\resource\ErrRd"
+
+;Files to install
+"\epoc32\release\armv5\udeb\Edta.exe" -"!:\sys\bin\edta.exe"
+
+"\epoc32\data\z\resource\apps\edta.rsc" -"!:\resource\apps\edta.rsc"
+"\epoc32\data\z\resource\apps\edta.r09" -"!:\resource\apps\edta.r09"
+"\epoc32\data\z\resource\apps\edta.r31" -"!:\resource\apps\edta.r31"
+"\epoc32\data\z\resource\apps\edta.r32" -"!:\resource\apps\edta.r32"
+
+"\epoc32\data\z\private\10003a3f\apps\edta_reg.rsc" -"!:\private\10003a3f\import\apps\edta_reg.rsc"
+"\epoc32\data\z\resource\apps\edta_aif.mif" -"!:\resource\apps\edta_aif.mif"
+
+;required for application to be covered by backup/restore facility
+"backup_registration.xml"						-"!:\private\2000FDDC\backup_registration.xml"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+// INCLUDE FILES
+#include <eikstart.h>
+#include "edta_application.h"
+
+/**
+ * factory function to create the Hello World Basic application class
+ */
+LOCAL_C CApaApplication* NewApplication()
+	{
+	return new CEdtaApplication;
+	}
+
+/**
+ * A normal Symbian OS executable provides an E32Main() function which is
+ * called by the operating system to start the program.
+ */
+GLDEF_C TInt E32Main()
+	{
+	return EikStart::RunApplication( NewApplication );
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta_application.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,52 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+// INCLUDE FILES
+#include "edta_document.h"
+#include "edta_application.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// UID for the application.
+// this should correspond to the uid defined in the mmp file
+const TUid KUidEdtaApp = { 0x2000FDDC };
+
+// -----------------------------------------------------------------------------
+// CEdtaApplication::CreateDocumentL()
+// Creates CApaDocument object
+// -----------------------------------------------------------------------------
+//
+CApaDocument* CEdtaApplication::CreateDocumentL()
+    {
+    // Create an Edta document, and return a pointer to it
+    return (static_cast<CApaDocument*>
+                    ( CEdtaDocument::NewL( *this ) ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CEdtaApplication::AppDllUid()
+// Returns application UID
+// -----------------------------------------------------------------------------
+//
+TUid CEdtaApplication::AppDllUid() const
+    {
+    // Return the UID for the Edta application
+    return KUidEdtaApp;
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta_appui.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,310 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+// INCLUDE FILES
+#include <avkon.hrh>
+#include <aknnotewrappers.h>
+#include <stringloader.h>
+#include <Edta.rsg>
+#include <f32file.h>
+#include <s32file.h>
+#include <aiwservicehandler.h>
+#include <centralrepository.h>
+#include <easydialingcrkeys.h>
+
+#include "edta.pan"
+#include "edta_appui.h"
+#include "edta_appview.h"
+#include "edta.hrh"
+#include "edta_querydialog.h"
+#include <AknQueryDialog.h>
+
+
+
+
+// CONSTANTS
+const TInt KSearchStringMaxLen = 64;
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CEdtaAppUi::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppUi::ConstructL()
+    {
+    // Initialise app UI with standard value.
+    BaseConstructL(CAknAppUi::EAknEnableSkin);
+
+    // Create view object
+    iAppView = CEdtaAppView::NewL( ClientRect() );
+    
+    // TODO: remove?
+    iServiceHandler = CAiwServiceHandler::NewL();
+
+    iRepository = CRepository::NewL( KCRUidEasyDialSettings );
+    
+    AddToStackL(iAppView);
+    }
+
+// -----------------------------------------------------------------------------
+// CEdtaAppUi::CEdtaAppUi()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CEdtaAppUi::CEdtaAppUi()
+    {
+    // No implementation required
+    }
+
+// -----------------------------------------------------------------------------
+// CEdtaAppUi::~CEdtaAppUi()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CEdtaAppUi::~CEdtaAppUi()
+    {
+    if ( iAppView )
+        {
+        RemoveFromStack(iAppView);
+        delete iAppView;
+        iAppView = NULL;
+        }
+    delete iServiceHandler;
+    
+    if ( iRepository )
+        {
+        // default setting
+        iRepository->Set(KEasyDialingContactThumbnails, 1);
+        }
+    delete iRepository;
+    }
+
+
+TInt CreateTestContactDatabaseL(); // Should be moved into correct place
+
+// -----------------------------------------------------------------------------
+// CEdtaAppUi::HandleCommandL()
+// Takes care of command handling.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppUi::HandleCommandL( TInt aCommand )
+    {
+    DebugPrintF(_L("CEdtaAppUi::HandleCommandL enter: 0x%X"), aCommand );
+
+    switch( aCommand )
+        {
+        case EEikCmdExit:
+        case EAknSoftkeyExit:
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: EXIT"));
+            Exit();
+            break;
+
+        case EEdtaSetPluginInput:
+            {
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: EEdtaSetPluginInput"));
+
+            if( CheckPluginLoadedAndShowNote() )
+                {
+                CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL( iQueryText );
+                if( dlg->ExecuteLD(R_DIALOG_TEXT_EDIT_QUERY))
+                    {
+                    if (iAppView->GetEasyDialer())
+                        {
+                        iAppView->GetEasyDialer()->SetInputL( iQueryText );
+                        }
+                    }
+                }
+            }
+            break;
+
+        case EEdtaCommandShowContacts:
+            {
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: EEdtaCommandShowContacts"));
+
+            if( iAppView->IsPCSServerLoaded() )
+                {
+                CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL( iQueryText );
+                if( dlg->ExecuteLD(R_DIALOG_TEXT_EDIT_QUERY))
+                    {
+                    iAppView->ShowMatchingContactsL(iQueryText);
+                    }
+                }
+            }
+            break;
+
+        case EEdtaLaunchFirstContact:
+            {
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: EEdtaLaunchFirstContact"));
+            if( iAppView->IsPCSServerLoaded() )
+                iAppView->LaunchNthContactL( 0 );
+            }
+            break;
+
+        case EEdtaSelectAndLaunchContact:
+            {
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: EEdtaSelectAndLaunchContact"));
+            iAppView->SelectAndLaunchContactL();
+            }
+            break;
+
+        case EEdtaCommandCheckPCSServer:
+            {
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: EEdtaCommandCheckPCSServer"));
+            if( iAppView->IsPCSServerLoaded() )
+                iAppView->CheckPCSServerL();
+            }
+            break;
+
+        case EEdtaCommandShowNameOrdering:
+            {
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: EEdtaCommandShowNameOrdering"));
+            iAppView->ShowNameOrderL();
+            }
+            break;
+
+        case EEdtaCommandCreateTestContactBase:
+            {
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: EEdtaCommandCreateTestContactBase"));
+            TInt newContactsCount = CreateTestContactDatabaseL();
+            iAppView->GetScreenBuffer()->WriteLineL(_L("Test contacts updated"));
+            iAppView->GetScreenBuffer()->WriteLineL(_L("%d new contacts"), newContactsCount );
+            }
+            break;
+            
+        case EEdtaCommandTwoConsequtiveSearchesTest:
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: Two search test"));
+
+             if( CheckPluginLoadedAndShowNote() )
+                 {
+                 CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL( iQueryText );
+                 if( dlg->ExecuteLD(R_DIALOG_TEXT_EDIT_QUERY))
+                     {
+                     HBufC* anotherQueryText = HBufC::NewLC( KSearchStringMaxLen );
+                     TPtr ptr = anotherQueryText->Des();
+                     
+                     CAknTextQueryDialog* dlg2 = CAknTextQueryDialog::NewL( ptr );
+                     
+                     if ( dlg2->ExecuteLD(R_DIALOG_TEXT_EDIT_QUERY) )
+                         {                   
+                         if (iAppView->GetEasyDialer())
+                             {
+                             iAppView->GetEasyDialer()->SetInputL( iQueryText );
+                             iAppView->GetEasyDialer()->SetInputL( ptr );
+                             }
+                         }
+                     CleanupStack::PopAndDestroy( anotherQueryText );
+                     }
+                 }
+             break;
+
+        case EEdtaCommandMiscCoverageTest:
+            
+            if (iAppView->GetEasyDialer())
+                 {
+                 iAppView->DoMiscellaneousTestsL(  );
+                 }            
+            break;
+        
+        case EEdtaCommandShowThumbnails:
+            iRepository->Set(KEasyDialingContactThumbnails, 1);         
+            break;
+            
+        case EEdtaCommandHideThumbnails:
+            iRepository->Set(KEasyDialingContactThumbnails, 0);
+            break;
+            
+        default:
+            iServiceHandler->ExecuteMenuCmdL(
+                aCommand,
+                iServiceHandler->InParamListL(),    // No input parameters
+                iServiceHandler->OutParamListL(),   // No output parameters
+                0,                                  // No options used.
+                NULL);                              // No need for callback    
+
+            DebugPrintF(_L("CEdtaAppUi::HandleCommandL: AIW (or unknown) menu command: 0x%X"), aCommand );
+            break;
+        }
+
+    DebugPrintF(_L("CEdtaAppUi::HandleCommandL exit"));
+    }
+
+
+void CEdtaAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
+    {
+    // First, offer menu pane to AIW framework. It might be the case, that the 
+    // user is opening an AIW submenu. In this case, the AIW handles the menu.
+    if ( iServiceHandler->HandleSubmenuL( *aMenuPane ) )
+        {
+        return;
+        }
+        
+    // Add your normal (non-AIW) menu initialisation code here...      
+
+    // Let AIW provider add its menu items to the menu.
+    iServiceHandler->InitializeMenuPaneL(
+        *aMenuPane, 
+        aResourceId, 
+        EEdtaCommandLast, 
+        iServiceHandler->InParamListL());    
+    }
+
+// -----------------------------------------------------------------------------
+//  Called by the framework when the application status pane
+//  size is changed.  Passes the new client rectangle to the
+//  AppView
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppUi::HandleStatusPaneSizeChange()
+    {
+    iAppView->SetRect( ClientRect() );
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// Display note id easydialing plugin is not loaded
+// -----------------------------------------------------------------------------
+//
+TBool CEdtaAppUi::CheckPluginLoadedAndShowNote()
+    {
+    TBool plugin_loaded( ETrue );
+
+    if( !(iAppView->GetEasyDialer()) )
+        {
+        plugin_loaded = EFalse;
+        TBuf<KEdtaMaxLineWidth> tempStr;
+        tempStr.Copy(_L("Easydialing plugin not loaded!"));
+        
+        TRAP_IGNORE(
+                {
+                CAknErrorNote* myNote = new (ELeave) CAknErrorNote();
+                myNote->SetTimeout( CAknNoteDialog::ELongTimeout );
+                myNote->ExecuteLD( tempStr );
+                }
+        );
+        }
+
+    DebugPrintF(_L("CEdtaAppUi::CheckPluginLoadedAndShowNote: Plugin loaded: %d"), plugin_loaded );
+
+    return plugin_loaded;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta_appview.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,872 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+// INCLUDE FILES
+#include <coemain.h>
+#include <aknutils.h>
+#include "edta_appview.h"
+#include "edta_debugprint.h"
+#include "edta_dummylistener.h"
+#include <aknnotewrappers.h>        
+
+// AVKON components
+#include <aknlists.h>
+#include <aknpopup.h>
+
+// Predictive search header files.
+#include <CPsSettings.h>
+#include <CPsQuery.h>
+#include <CPsQueryItem.h>
+#include <CPsClientData.h>
+#include <CPsPattern.h>
+#include <CPsRequestHandler.h>
+
+// Virtual phonebook header files.
+#include <VPbkContactStoreUris.h>
+#include <CVPbkContactStoreUriArray.h>
+#include <TVPbkContactStoreUriPtr.h>
+// contains virtual phonebook data fields
+#include <vpbkeng.rsg>
+
+// Phonebook engine API 
+#include <CPbkContactEngine.h>
+
+// CCA Launcher header files.
+#include <ccafactory.h>
+#include <mccaparameter.h>
+#include <mccaconnection.h>
+
+
+const TInt KEdtaMaximumMatchingCount = 100;
+const TInt KEdtaContactCompanyIndex = 2;
+const TInt KEdtaContactEmailHomeIndex = 3;
+const TInt KEdtaContactEmailWorkIndex = 4;
+const TInt KEdtaContactEmailGenIndex = 5;
+const TInt KEdtaListBoxGranularity = 5;
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// NewL
+// First phase constructor without cleanup stack.
+// -----------------------------------------------------------------------------
+//
+CEdtaAppView* CEdtaAppView::NewL( const TRect& aRect )
+    {
+    CEdtaAppView* self = CEdtaAppView::NewLC( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// NewLC
+// First phase constructor with cleanup stack.
+// -----------------------------------------------------------------------------
+//
+CEdtaAppView* CEdtaAppView::NewLC( const TRect& aRect )
+    {
+    CEdtaAppView* self = new ( ELeave ) CEdtaAppView;
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// ConstructL
+// Second phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::ConstructL( const TRect& aRect )
+    {
+    DebugPrintF(_L("CEdtaAppView::ConstructL enter, rect: %d, %d - %d, %d"), aRect.iTl.iX, aRect.iTl.iY, aRect.iBr.iX, aRect.iBr.iY  );
+
+    // Create a window for this application view
+    CreateWindowL();
+
+    const TDesC& thname = RThread().Name();
+    iScreenBuffer = CEdtaScreenTextBuffer::NewL( aRect );
+    iScreenBuffer->SetFocus( ETrue );
+    iScreenBuffer->WriteLineL(thname);
+
+    LoadPluginL(); 
+  
+    DebugPrintF(_L("CEdtaAppView::ConstructL: iScreenBuffer: 0x%X, iEasyDialer: 0x%X"), iScreenBuffer, iEasyDialer );
+
+    if (iEasyDialer) 
+        {
+        DebugPrintF(_L("CEdtaAppView::ConstructL: Easydialer plugin found, adding observer..") );
+
+        iEasyDialer->AddObserverL( this );
+        iEasyDialer->SetFocus( EFalse );
+
+        DebugPrintF(_L("CEdtaAppView::ConstructL: Add observer done"));
+        }
+
+    // Init PCS Server..
+    TRAPD( error, InitPredictiveContactSearchL());
+    if( error )
+        {
+        DebugPrintF(_L("CEdtaAppView::ConstructL: Failed to load predictive search engine: %d"), error );
+        iScreenBuffer->WriteLineL(_L("* PCS Server load fail: %d"), error );
+        }
+
+    // Init Communication Launcher..
+    TRAP( error, iContactLauncher = TCCAFactory::NewConnectionL());
+    if( error )
+        {
+        DebugPrintF(_L("CEdtaAppView::ConstructL: Failed connect communication launcher: %d"), error );
+        iScreenBuffer->WriteLineL(_L("* CCA open fail: %d"), error );
+        }
+        
+    iDummyListener = new ( ELeave ) CDummyListener();
+
+    // Set the windows size
+    SetRect( aRect );
+    ActivateL();
+
+    DebugPrintF(_L("CEdtaAppView::ConstructL exit"));
+    }
+
+// -----------------------------------------------------------------------------
+// CEdtaAppView
+// The C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CEdtaAppView::CEdtaAppView()
+    {
+    // No implementation here
+    }
+
+// -----------------------------------------------------------------------------
+// ~CEdtaAppView
+// The destructor.
+// -----------------------------------------------------------------------------
+//
+CEdtaAppView::~CEdtaAppView()
+    {
+    DebugPrintF(_L("CEdtaAppView::~CEdtaAppView enter, iEasyDialer: 0x%x"), iEasyDialer );
+    
+    delete iDummyListener;
+
+    if (iEasyDialer)
+        {
+        iEasyDialer->RemoveObserver( this );
+        }
+
+    if (iPredictiveContactSearchHandler)
+        {
+        iPredictiveContactSearchHandler->RemoveObserver(this);
+        }
+
+    delete iEasyDialer;
+    iContactNames.ResetAndDestroy();
+    iMatchingContactLinks.ResetAndDestroy();
+
+    if (iContactLauncher)
+        {
+        iContactLauncher->Close();
+        }
+
+    delete iPredictiveSearchQuery;
+    delete iContactManager;
+    delete iPredictiveContactSearchHandler;
+    delete iContactStoreUriArray;
+    iContactDataStores.ResetAndDestroy();
+
+    delete iScreenBuffer;
+    DebugPrintF(_L("CEdtaAppView::~CEdtaAppView exit"));
+    }
+
+
+// -----------------------------------------------------------------------------
+// Draw
+// Draw itself. Clear the canvas.
+// -----------------------------------------------------------------------------
+//
+
+void CEdtaAppView::Draw( const TRect& aRect ) const
+    {
+    DebugPrintF(_L("CEdtaAppView::Draw, rect: %d, %d - %d, %d"), aRect.iTl.iX, aRect.iTl.iY, aRect.iBr.iX, aRect.iBr.iY );
+
+    CWindowGc& gc = SystemGc();
+    gc.SetClippingRect( aRect );
+    
+    gc.SetBrushColor( KRgbWhite );
+    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+    gc.Clear( aRect );
+    }
+
+
+// -----------------------------------------------------------------------------
+// SizeChanged
+// Called by framework when the view size is changed.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::SizeChanged()
+    {
+    DebugPrintF(_L("CEdtaAppView::SizeChanged: iScreenBuffer: 0x%X, iEasyDialer: 0x%X"), iScreenBuffer, iEasyDialer );
+
+    // Controls must set rects, otherwise not drawn
+    // If easy dialer plugin is loaded, the controls are reorganized to screen.
+    if( iEasyDialer )
+        {
+        // Screen buffer occupies upper half of the view.
+        TRect screen_buffer_rect = iAvkonAppUi->ClientRect();
+        screen_buffer_rect.iBr.iY -= (screen_buffer_rect.Height() / 2 );
+        TRect easy_dialer_rect(0, screen_buffer_rect.Height(), screen_buffer_rect.Width(), iAvkonAppUi->ClientRect().Height());
+        iEasyDialer->SetRect( easy_dialer_rect );
+        iScreenBuffer->SetRect(screen_buffer_rect);
+        }
+    else if ( iScreenBuffer )
+        {
+        iScreenBuffer->SetRect(iAvkonAppUi->ClientRect());
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CountComponentControls
+// -----------------------------------------------------------------------------
+//
+TInt CEdtaAppView::CountComponentControls() const
+    {
+    return iEasyDialer ? 2 : 1;
+    }
+
+
+// -----------------------------------------------------------------------------
+// ComponentControl
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CEdtaAppView::ComponentControl(TInt aIndex) const
+    {
+    switch (aIndex)
+        {
+        case 0: return iScreenBuffer;
+        case 1: return iEasyDialer; // Can be null
+        default: return NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// OfferKeyEventL
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CEdtaAppView::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
+    {
+    TKeyResponse handled = EKeyWasNotConsumed;
+    
+    if ( iEasyDialer )
+        {
+        handled = iEasyDialer->OfferKeyEventL(aKeyEvent, aType);
+        }
+    
+    if ( handled == EKeyWasNotConsumed )
+        {
+        handled = iScreenBuffer->OfferKeyEventL(aKeyEvent, aType);
+        }
+    else 
+        {
+        handled = EKeyWasConsumed;
+        }
+
+    return handled;
+    }
+
+// -----------------------------------------------------------------------------
+// GetScreenBuffer
+// Returns the pointer to the screen buffer of the view.
+// -----------------------------------------------------------------------------
+//
+CEdtaScreenTextBuffer* CEdtaAppView::GetScreenBuffer()
+    {
+    return iScreenBuffer;
+    }
+
+
+// -----------------------------------------------------------------------------
+// GetEasyDialer
+// Returns the pointer to the easy dialer.
+// -----------------------------------------------------------------------------
+//
+CDialingExtensionInterface* CEdtaAppView::GetEasyDialer()
+    {
+    return iEasyDialer;
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// InitContactDataStoreUrisL
+// Initialises user contact data store URIs into field iContactDataStores.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::InitContactDataStoreUrisL()
+    {
+    HBufC* default_cdb = VPbkContactStoreUris::DefaultCntDbUri().AllocLC();
+    User::LeaveIfError(iContactDataStores.Append( default_cdb ));
+    CleanupStack::Pop( default_cdb );
+
+    iContactStoreUriArray = CVPbkContactStoreUriArray::NewL();
+    iContactStoreUriArray->AppendL(TVPbkContactStoreUriPtr( VPbkContactStoreUris::DefaultCntDbUri() ));
+    }
+
+
+// -----------------------------------------------------------------------------
+// InitPredictiveContactSearchL
+// Initialises predictive contact search.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::InitPredictiveContactSearchL()
+    {
+    DebugPrintF(_L("CEdtaAppView::InitPredictiveContactSearchL enter"));
+
+    iPredictiveContactSearchHandler = CPSRequestHandler::NewL();
+    iPredictiveContactSearchHandler->AddObserverL(this);
+
+    DebugPrintF(_L("CEdtaAppView::InitPredictiveContactSearchL => CPSRequestHandler::NewL done"));
+
+    InitContactDataStoreUrisL();
+
+    DebugPrintF(_L("CEdtaAppView::InitPredictiveContactSearchL => InitContactDataStoreUrisL done"));
+
+    iContactManager = CVPbkContactManager::NewL(*iContactStoreUriArray);
+
+    // Put the searched contact fields into array.
+    RArray<TInt> contact_fields;
+    CleanupClosePushL(contact_fields);
+
+    // All supported fields are searched. The supported fiels are specified in cenrep private\10202BE9\2000B5C6.
+    contact_fields.Append(R_VPBK_FIELD_TYPE_FIRSTNAME);
+    contact_fields.Append(R_VPBK_FIELD_TYPE_LASTNAME);
+    contact_fields.Append(R_VPBK_FIELD_TYPE_COMPANYNAME);
+    contact_fields.Append(R_VPBK_FIELD_TYPE_EMAILHOME);
+    contact_fields.Append(R_VPBK_FIELD_TYPE_EMAILWORK);
+    contact_fields.Append(R_VPBK_FIELD_TYPE_EMAILGEN);
+
+    // Create and fill ps settings object.
+    CPsSettings* ps_settings = CPsSettings::NewL();
+    CleanupStack::PushL(ps_settings);
+
+    ps_settings->SetSearchUrisL(iContactDataStores);
+    ps_settings->SetMaxResults(KEdtaMaximumMatchingCount);
+    ps_settings->SetSortType(EAlphabetical);
+    ps_settings->SetDisplayFieldsL(contact_fields);
+
+    // Set the ps settings.
+    iPredictiveContactSearchHandler->SetSearchSettingsL(*ps_settings);
+
+    DebugPrintF(_L("CEdtaAppView::InitPredictiveContactSearchL => CPSRequestHandler::SetSearchSettingsL done"));
+
+    CleanupStack::PopAndDestroy(ps_settings);
+    CleanupStack::PopAndDestroy(&contact_fields);
+
+    iPredictiveSearchQuery = CPsQuery::NewL();
+
+    DebugPrintF(_L("CEdtaAppView::InitPredictiveContactSearchL => CPsQuery::NewL done"));
+
+    DebugPrintF(_L("CEdtaAppView::InitPredictiveContactSearchL exit"));
+    }
+
+
+// -----------------------------------------------------------------------------
+// void ShowMatchingContacts(const TDesC& aSearchString)
+// Starts an asynchronous search for contacts matching to aSearchString.
+// The actual displaying of contact is done in callback HandlePsResultsUpdate
+// - Hardcode to use ITU keyboard parameters
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::ShowMatchingContactsL(const TDesC& aSearchString)
+    {
+    DebugPrintF(_L("CEdtaAppView::ShowMatchingContactsL: enter '%S'"), &aSearchString );
+
+    iPredictiveSearchQuery->Reset();
+
+    for(TInt i = 0; i < aSearchString.Length() ;i++)
+        {
+         // Add a query item
+        CPsQueryItem* item = CPsQueryItem::NewL();
+        CleanupStack::PushL(item);
+
+        item->SetCharacter( aSearchString[i] );
+        item->SetMode( EItut );
+        iPredictiveSearchQuery->AppendL(*item);
+
+        // Previous CPsQuery::AppendL takes the ownership of item.
+        // Do not delete item.
+        CleanupStack::Pop(item);
+        }
+
+    // Issue the search. SearchL is asynchronous function => returns immediately.
+    iPredictiveContactSearchHandler->SearchL(*iPredictiveSearchQuery);
+
+    DebugPrintF(_L("CEdtaAppView::ShowMatchingContactsL: exit"));
+    }
+
+
+// -----------------------------------------------------------------------------
+// ShowNameOrderL
+// Check the name ordering from phonebook engine by using phonebook engine API.
+// -----------------------------------------------------------------------------
+// 
+void CEdtaAppView::ShowNameOrderL()
+    {
+    DebugPrintF(_L("CEdtaAppView::ShowNameOrderL: enter"));
+
+    CPbkContactEngine* pbkEngine = CPbkContactEngine::NewL();
+    CPbkContactEngine::TPbkNameOrder nameOrder = pbkEngine->NameDisplayOrderL();
+
+    iScreenBuffer->WriteLineL(_L("Phonebook name order is"));
+    switch ( nameOrder )
+        {
+        case CPbkContactEngine::EPbkNameOrderLastNameFirstName:
+            DebugPrintF(_L("CEdtaAppView::ShowNameOrderL: The name order is: %d == LastName -> FirstName"), nameOrder );
+            iScreenBuffer->WriteLineL(_L("* Last name, first name"));
+            break;
+        case CPbkContactEngine::EPbkNameOrderFirstNameLastName:
+            DebugPrintF(_L("CEdtaAppView::ShowNameOrderL: The name order is: %d == FirstName -> LastName"), nameOrder );
+            iScreenBuffer->WriteLineL(_L("* First name, last name"));
+            break;
+        case CPbkContactEngine::EPbkNameOrderNotDefined:
+            DebugPrintF(_L("CEdtaAppView::ShowNameOrderL: The name order is: %d == Not defined"), nameOrder );
+            iScreenBuffer->WriteLineL(_L("* Not defined"));
+            break;
+        default:
+            DebugPrintF(_L("CEdtaAppView::ShowNameOrderL: The name order is: %d == Unknown"), nameOrder );
+            iScreenBuffer->WriteLineL(_L("* Unknown value: %d"), nameOrder );
+        }
+
+    delete pbkEngine;
+    
+    DebugPrintF(_L("CEdtaAppView::ShowNameOrderL: exit"));
+    }
+
+// -----------------------------------------------------------------------------
+// IsPCSServerLoaded
+// Checks if the PCSServer is loaded properly at constructor
+// -----------------------------------------------------------------------------
+//
+TBool CEdtaAppView::IsPCSServerLoaded()
+    {
+    if( !iPredictiveSearchQuery )
+        {
+        DebugPrintF(_L("CEdtaAppView::CheckPCSServerL: PCS server not loaded properly!"));
+
+        TBuf<KEdtaMaxLineWidth> tempStr;
+        tempStr.Copy(_L("PCS server not loaded!"));;
+        
+        TRAP_IGNORE(
+                {
+                CAknErrorNote* myNote = new (ELeave) CAknErrorNote();
+                myNote->SetTimeout( CAknNoteDialog::ELongTimeout );
+                TRAP_IGNORE( myNote->ExecuteLD( tempStr ) );
+                }
+        );
+        return EFalse;
+        }
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CheckPCSServerL
+// Checks the configuration of the PCSServer and prints the sortorder of fields.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::CheckPCSServerL()
+    {
+    RArray<TInt> field_order;
+    CleanupClosePushL(field_order);
+
+    HBufC* default_cdb = VPbkContactStoreUris::DefaultCntDbUri().AllocLC();
+
+    _LIT(KEdtaField, "*");
+    TBuf<KEdtaMaxLineWidth> line(KEdtaField);
+
+    iPredictiveContactSearchHandler->GetDataOrderL(*default_cdb, field_order);
+
+    DebugPrintF(_L("CEdtaAppView::ShowContactFieldOrderL: Number of fields: %d"), field_order.Count() );
+
+    TInt requiredFieldsCount = 3;
+    
+    for ( TInt i = 0; i < field_order.Count(); i++)
+        {
+        line.Append((TChar) ' ');
+        line.AppendNum(field_order[i]);
+        
+        if(( field_order[i] ==  R_VPBK_FIELD_TYPE_FIRSTNAME) ||
+           ( field_order[i] ==  R_VPBK_FIELD_TYPE_LASTNAME) ||
+           ( field_order[i] ==  R_VPBK_FIELD_TYPE_COMPANYNAME ))
+            {
+            requiredFieldsCount--;
+            }
+        }
+
+    CleanupStack::PopAndDestroy( default_cdb );
+    CleanupStack::PopAndDestroy( &field_order );
+
+    iScreenBuffer->WriteLineL(_L("PCS server fields:"));
+    iScreenBuffer->WriteLineL(line);
+
+    DebugPrintF(_L("CEdtaAppView::ShowContactFieldOrderL: '%S'"), &line );
+
+    if( requiredFieldsCount == 0 )
+        {
+        DebugPrintF(_L("CEdtaAppView::ShowContactFieldOrderL: All required fields found from PCSServer, configuration is OK"));
+        iScreenBuffer->WriteLineL(_L("* All required fields found"));
+        }
+    else
+        {
+        DebugPrintF(_L("CEdtaAppView::ShowContactFieldOrderL: Not all required fields found from PCSServer, configuration is wrong"));
+        iScreenBuffer->WriteLineL(_L("* PCS server misconfigured!"));
+        iScreenBuffer->WriteLineL(_L("* Easydialing may not"));
+        iScreenBuffer->WriteLineL(_L("* match your queries!"));
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// void LaunchNthContactL(TInt aIx)
+// Launches communication launcher for the first contact in the previous
+// search. If not contacts found or no search yet done, function does nothing.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::LaunchNthContactL(TInt aIx)
+    {
+    if (aIx < 0 || iMatchingContactLinks.Count() <= aIx)
+        {
+        DebugPrintF(_L("CEdtaAppView::LaunchNthContactL: No contacts retrieved yet") );
+        return;
+        }
+
+    DebugPrintF(_L("CEdtaAppView::LaunchNthContactL: enter, index: %d, setting parameters.."), aIx );
+
+    MCCAParameter* launch_parameters = TCCAFactory::NewParameterL();
+    CleanupClosePushL( *launch_parameters );
+
+    launch_parameters->SetConnectionFlag(MCCAParameter::ENormal);
+    launch_parameters->SetContactDataFlag(MCCAParameter::EContactLink);
+
+    // Pack the contact link and expand it to 16-bit descriptor.
+    HBufC8* contact8 = iMatchingContactLinks[aIx]->PackLC();
+    HBufC16* contact16 = HBufC16::NewLC( contact8->Length() );
+    contact16->Des().Copy( contact8->Des() );
+
+    launch_parameters->SetContactDataL( contact16->Des() );
+
+    CleanupStack::PopAndDestroy( contact16 );
+    CleanupStack::PopAndDestroy( contact8 );
+
+    DebugPrintF(_L("CEdtaAppView::LaunchNthContactL: launching CCA.."));
+
+    iContactLauncher->LaunchAppL( *launch_parameters, this );
+
+    // Ownership of parameter transferred to CCA launcher => pop but do not destroy.
+    CleanupStack::Pop(launch_parameters);  // Close parameter
+
+    DebugPrintF(_L("CEdtaAppView::LaunchNthContactL: exit"));
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// void DoMiscellaneousTestsL()
+// Does various tests on easy dialing that are difficult to do through normal
+// testing. Mainly for coverage testing purposes.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::DoMiscellaneousTestsL()
+    {
+    // Coverage tests for observer handling.
+    iEasyDialer->AddObserverL( iDummyListener );
+    iEasyDialer->AddObserverL( NULL );
+    iEasyDialer->RemoveObserver( iDummyListener );
+    }
+
+// -----------------------------------------------------------------------------
+// void HandlePsResultsUpdate(RPointerArray<CPsClientData>& aResult, RPointerArray<CPsPattern>& aSeqs)
+// Searched matching contacts using PCS and shows them on the screen.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::HandlePsResultsUpdate(RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs)
+    {
+    TRAP_IGNORE( HandlePredictiveSearchResultL(aResults, aSeqs) );
+    }
+
+
+// -----------------------------------------------------------------------------
+// void HandlePsError(TInt aErrorCode)
+// Called when search error happens.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::HandlePsError(TInt aErrorCode)
+    {
+    DebugPrintF(_L("CEdtaAppView::HandlePsError: %d"), aErrorCode );
+
+    _LIT(KEdtaCachingError, "*** Caching error %d ***");
+    TRAP_IGNORE( iScreenBuffer->WriteLineL(KEdtaCachingError, aErrorCode) );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+// void CachingStatus(TCachingStatus& aStatus, TInt& aError)
+// Called to update caching status.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::CachingStatus(TCachingStatus& aStatus, TInt& aError )
+    {
+    DebugPrintF(_L("CEdtaAppView::CachingStatus: %d"), aError);
+
+    switch (aStatus)
+        {
+        case ECachingNotStarted:
+            {
+            _LIT(KEdtaCachingStatusStarted, "*** Caching started ***");
+            TRAP_IGNORE( iScreenBuffer->WriteLineL(KEdtaCachingStatusStarted) );
+            }
+            break;
+        case ECachingInProgress:
+            {
+            _LIT(KEdtaCachingStatusInProgress, "*** Caching in progress ***");
+            TRAP_IGNORE( iScreenBuffer->WriteLineL(KEdtaCachingStatusInProgress) );
+            }
+            break;
+        case ECachingComplete:
+            {
+            _LIT(KEdtaCachingStatusComplete, "*** Caching complete ***");
+            TRAP_IGNORE( iScreenBuffer->WriteLineL(KEdtaCachingStatusComplete) );
+            }
+            break;
+        case ECachingCompleteWithErrors:
+            {
+            _LIT(KEdtaCachingStatusCompleteWithErrors, "*** Caching complete with error %d ***");
+            TRAP_IGNORE( iScreenBuffer->WriteLineL(KEdtaCachingStatusCompleteWithErrors, aError) );
+            }
+            break;
+        default:
+            {
+            _LIT(KEdtaCachingStatusUnknown, "*** Unknown caching status %d ***");
+            TRAP_IGNORE( iScreenBuffer->WriteLineL(KEdtaCachingStatusUnknown, (TInt) aStatus) );
+            }
+            break;
+        }
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// void HandlePredictiveSearchResultL(RPointerArray<CPsClientData>& aResult, RPointerArray<CPsPattern>& aSeqs)
+// Handles predictive search results. A leaving version to be trapped in HandlePsResultsUpdate.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::HandlePredictiveSearchResultL(RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& /* aSeqs */)
+    {
+    TInt results = aResults.Count();
+    DebugPrintF(_L("CEdtaAppView::HandlePredictiveSearchResultL enter, matching contacts found: %d"), results );
+
+    iContactNames.ResetAndDestroy();
+    iMatchingContactLinks.ResetAndDestroy();
+
+    // map results to old contact match data
+    for (TInt i = 0; i < aResults.Count(); i ++)
+        {
+        TBuf<KEdtaMaxLineWidth> temp;
+        _LIT(KEdtaContactFormatString, "%S %S");
+
+        // Store each contact name into iContactNames.
+        temp.Format(KEdtaContactFormatString, aResults[i]->Data(0), aResults[i]->Data(1));
+
+        DebugPrintF(_L("CEdtaAppView::HandlePredictiveSearchResultL: Contact #%d: '%S'"), i+1, &temp );
+
+        HBufC* contact_name = HBufC::NewL(temp.Length());
+        *contact_name = temp;
+        iContactNames.Append( contact_name );
+
+
+        // Each contact link stored to iMatchingContactLinks, to be possible used later by
+        // CCA launcher functions.
+        MVPbkContactLink* link = iPredictiveContactSearchHandler->ConvertToVpbkLinkLC(*(aResults[i]), *iContactManager);
+        iMatchingContactLinks.Append( link );
+        CleanupStack::Pop( link );
+
+        // Write the contact name to screen buffer
+        iScreenBuffer->WriteLineL( *contact_name );
+
+        TUint8 match_mask = aResults[i]->FieldMatch();
+
+        // Show other search fields only if search matches them.
+        if (match_mask & (1 << KEdtaContactCompanyIndex))
+            {
+            _LIT(KEdtaContactCompany, "* Company: %S");
+            iScreenBuffer->WriteLineL(KEdtaContactCompany, aResults[i]->Data(KEdtaContactCompanyIndex));
+            }
+        if (match_mask & (1 << KEdtaContactEmailHomeIndex))
+            {
+            _LIT(KEdtaContactEmailHome, "* Home e-mail: %S");
+            iScreenBuffer->WriteLineL(KEdtaContactEmailHome, aResults[i]->Data(KEdtaContactEmailHomeIndex));
+            }
+        if (match_mask & (1 << KEdtaContactEmailWorkIndex))
+            {
+            _LIT(KEdtaContactEmailWork, "* Work e-mail: %S");
+            iScreenBuffer->WriteLineL(KEdtaContactEmailWork, aResults[i]->Data(KEdtaContactEmailWorkIndex));
+            }
+        if (match_mask & (1 << KEdtaContactEmailGenIndex))
+            {
+            _LIT(KEdtaContactEmailGen, "* E-mail: %S");
+            iScreenBuffer->WriteLineL(KEdtaContactEmailGen, aResults[i]->Data(KEdtaContactEmailGenIndex));
+            }
+        }
+    _LIT(KEdtaNumberOfMatchingContacts, "*** %d contacts found! ***");
+    iScreenBuffer->WriteLineL(KEdtaNumberOfMatchingContacts, aResults.Count());
+
+    DebugPrintF(_L("CEdtaAppView::HandlePredictiveSearchResultL exit"));
+    }
+
+
+// -----------------------------------------------------------------------------
+// HandleDialingExtensionEvent
+// 
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent )
+    {
+    DebugPrintF(_L("CEdtaAppView::HandleDialingExtensionEvent"));
+
+    if ( aEvent == MDialingExtensionObserver::EFocusChanged )
+        {
+        if ( iEasyDialer->IsFocused() )
+            {
+            iScreenBuffer->SetFocus( EFalse, EDrawNow );
+            }
+        else 
+            {
+            iScreenBuffer->SetFocus( ETrue, EDrawNow );
+            }
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// SelectAndLaunchContactL
+// Shows a list box, the launches CCA launcher for user selected contact.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::SelectAndLaunchContactL()
+    {
+    DebugPrintF(_L("CEdtaAppView::SelectAndLaunchContactL enter"));
+
+    // Create list of matched contacts and show them on the screen
+
+    CAknSingleHeadingPopupMenuStyleListBox* listBox = new(ELeave) CAknSingleHeadingPopupMenuStyleListBox;
+    CleanupStack::PushL( listBox );
+
+    CAknPopupList* popupList = CAknPopupList::NewL( listBox,
+                                                    R_AVKON_SOFTKEYS_SELECT_CANCEL,
+                                                    AknPopupLayouts::EMenuGraphicHeadingWindow );
+    CleanupStack::PushL( popupList );
+
+    listBox->ConstructL( popupList, EAknListBoxSelectionList );
+    listBox->CreateScrollBarFrameL( ETrue );
+    listBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,
+                                                        CEikScrollBarFrame::EAuto );
+
+    _LIT( KMatchedContacts, "Matched contacts:" );
+    popupList->SetTitleL( KMatchedContacts );
+
+    // Add items into list
+
+    CDesCArrayFlat* itemArray = new(ELeave)CDesCArrayFlat(KEdtaListBoxGranularity);
+    CleanupStack::PushL(itemArray);
+
+    _LIT( KListItemSeparator1, ". \t" );
+
+    for (TInt listIndex = 0; listIndex < iContactNames.Count(); listIndex++ )
+        {
+        TBuf<KEdtaMaxLineWidth> itemString;
+        itemString.Zero();
+        itemString.AppendNum( listIndex+1 );
+        itemString.Append( KListItemSeparator1 );
+        itemString.Append( *iContactNames[listIndex] );
+
+        itemArray->AppendL(itemString);
+        }
+
+    CTextListBoxModel* model = listBox->Model();
+    model->SetItemTextArray( itemArray );
+    model->SetOwnershipType( ELbmOwnsItemArray );
+    CleanupStack::Pop( itemArray );     // Pop itemArray - the listBox model owns this now
+
+    if( popupList->ExecuteLD() )        // Show the list finally
+        {
+        if( listBox->CurrentItemIndex() >= 0 )
+            {
+            // Launch communication launcher for selected contact
+            LaunchNthContactL( listBox->CurrentItemIndex() );
+            }
+        }
+
+    CleanupStack::Pop( popupList );
+    CleanupStack::PopAndDestroy( listBox );
+
+    DebugPrintF(_L("CEdtaAppView::SelectAndLaunchContactL exit"));
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCASimpleNotifyL
+// Implements MCCAObserver notification interface.
+// Nothing better to do but show the parameters.
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::CCASimpleNotifyL( TNotifyType aType, TInt aReason )
+    {
+    DebugPrintF(_L("CEdtaAppView::CCASimpleNotifyL: aType: %d, aReason: %d"), (TInt)aType, aReason );
+
+    _LIT(KEdtaCCAExitReason, "Launcher exit reason %d, %d");
+    iScreenBuffer->WriteLineL(KEdtaCCAExitReason, aType, aReason);
+    }
+
+
+// -----------------------------------------------------------------------------
+// LoadPluginL
+// Load the easydialing ECOM plugin
+// -----------------------------------------------------------------------------
+//
+void CEdtaAppView::LoadPluginL()
+    {
+    TRAPD( error, 
+        {
+        iEasyDialer = CDialingExtensionInterface::NewL();
+        iEasyDialer->InitializeL( *this );        
+        } );
+
+    if( error )
+        {
+        DebugPrintF(_L("CEdtaAppView::LoadPluginL FAIL, error: %d"), error );
+        iScreenBuffer->WriteLineL(_L("* EasyDialing Plugin load fail: %d"), error );
+        iEasyDialer = NULL;
+        }
+    else
+        {
+        iScreenBuffer->WriteLineL(_L("EasyDialing Plugin loaded"));
+        DebugPrintF(_L("CEdtaAppView::LoadPluginL OK" ));
+        }
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta_createtestcontactbase.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,266 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+
+
+#include <cntdb.h> 
+#include <cntitem.h> 
+#include <cntfldst.h> 
+#include <cpbkcontactitem.h>
+#include <cpbkcontactengine.h>
+#include "edta_debugprint.h"
+
+
+/*
+ * Number of contacts in contactdata array.
+ */
+const TInt nbr_of_contacts = 15;
+
+/*
+ * Contact data contains contact data as text strings.
+ * Each contact takes six line:
+ * - first name
+ * - last name
+ * - cell number
+ * - home number
+ * - company name
+ * - e-mail address
+ */
+const char* contactdata[] = 
+{
+    "Dummy",
+    "Contact",
+    "+1056439939",
+    "035558756",
+    "Ericsson",
+    "dummy.contact@ericsson.sw",
+    
+    "Jaakko",
+    "Helanti",
+    "+358405287761",
+    "034447611",
+    "Nokia",
+    "jaakko.helanti@nokia.com",
+    
+    "Stan",
+    "Laurel",
+    "+0104438839992",
+    "+0104438839000",
+    "MGM",
+    "stan.laurel@heaven.com",
+    
+    "Oliver",
+    "Hardy",
+    "+01078398927",
+    "+10364537882",
+    "MGM",
+    "oliver.hardy@heaven.com",
+    
+    "Harold",
+    "Lloyd",
+    "+102843947",
+    "+10290503958",
+    "Universal",
+    "harold.lloyd@universal.com",
+    
+    "Tauno",
+    "Palo",
+    "+358405557631",
+    "014445466",
+    "Suomi Filmi",
+    "tauno.palo@gmail.com",
+    
+    "Tea",
+    "Ista",
+    "+358475554590",
+    "018723195",
+    "Helsingin Kaupungin Teatteri",
+    "tea.ista@cultureclub.com",
+
+    "Ansa",
+    "Ikonen",
+    "+358471134099",
+    "012388192",
+    "Suomi Filmi",
+    "ansa.ikonen@gmail.com",
+
+    "Bertil",
+    "Nystrom",
+    "+35866377334",
+    "074500998",
+    "Rovaniemen Viuluveistämö",
+    "bertil.nystrom@rvv.com",
+        
+    "",
+    "Onlylastname",
+    "+3585556743",
+    "+35835552727",
+    "",
+    "",
+    
+    "Onlyfirstname",
+    "",
+    "+358405559874",
+    "035553747",
+    "",
+    "",
+       
+    "",
+    "Two-Part Lastname",
+    "+358405557432",
+    "",
+    "",
+    "",
+    
+    "",
+    "",
+    "+35866377334",
+    "074500998",
+    "Just Companyname",
+    "john.doe@justcompanyname.com",
+        
+    "One",
+    "Number",
+    "",
+    "075553266",
+    "Idaho",
+    "",
+    
+    "No",
+    "Number",
+    "",
+    "",
+    "Ericsson",
+    "no.number@ericsson.com",    
+};
+
+
+HBufC* CreateFieldStringL(TInt aIx)
+    {
+    const char* str = contactdata[aIx];
+    TInt len = 0;
+    
+    while (str[len] != '\0')
+        {
+        len++;
+        }
+    
+    if ( len == 0 )
+        {
+        return NULL;
+        }
+    
+    HBufC *field = HBufC::NewL( len );
+    TPtr des = field->Des();
+    des.SetLength( len );
+    
+    for (TInt i = 0; i < len; i++)
+        {
+        des[i] = (TChar) str[i];
+        }
+    
+    return field;
+    }
+
+
+void AddFieldStringL( CPbkContactItem* aContact, TInt aIx, TInt aFieldId )
+    {
+    HBufC* fieldName = CreateFieldStringL( aIx );
+    
+    if ( fieldName ) 
+        {
+        CleanupStack::PushL( fieldName );
+        aContact->FindField( aFieldId )->TextStorage()->SetTextL( *fieldName );
+        CleanupStack::PopAndDestroy(fieldName); 
+        }
+    }
+
+
+void AddContactL(CPbkContactEngine* engine, TInt aIx)
+    {
+    CPbkContactItem* contact = engine->CreateEmptyContactL();
+    CleanupStack::PushL( contact );
+    
+    AddFieldStringL( contact, aIx * 6 + 0, EPbkFieldIdFirstName );
+    AddFieldStringL( contact, aIx * 6 + 1, EPbkFieldIdLastName );
+    AddFieldStringL( contact, aIx * 6 + 2, EPbkFieldIdPhoneNumberMobile );
+    AddFieldStringL( contact, aIx * 6 + 3, EPbkFieldIdPhoneNumberGeneral );
+    AddFieldStringL( contact, aIx * 6 + 4, EPbkFieldIdCompanyName );
+    AddFieldStringL( contact, aIx * 6 + 5, EPbkFieldIdEmailAddress );
+        
+    engine->AddNewContactL( *contact );
+    
+    CleanupStack::PopAndDestroy( contact );
+    }
+
+
+
+// ---------------------------------------------------------
+// CreateTestContactDatabaseL
+//
+// Creates a test contact database if it hasn't been created yet.
+// The existence of test base is done through testing if there
+// is a contact matching with word "Dummy". Test data base has
+// a contact for Mr Dummy Contact.
+// This is the primary function of this file. 
+// ---------------------------------------------------------
+//
+TInt CreateTestContactDatabaseL()
+    {
+    DebugPrintF(_L("CreateTestContactDatabaseL: Contacts creation started.."));
+
+    CPbkContactEngine* engine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( engine );
+    
+    _LIT(KDummyContact, "Dummy");
+        
+    CContactIdArray* findings = engine->FindLC( KDummyContact );
+    
+    // If dummy contact is found, the test database has already been created. 
+    if (findings->Count() > 0)
+        {
+        CleanupStack::PopAndDestroy( findings );
+        CleanupStack::PopAndDestroy( engine );
+        DebugPrintF(_L("CreateTestContactDatabaseL: Database already set up"));
+        return 0;
+        }
+    
+    CleanupStack::PopAndDestroy( findings );
+
+    for (TInt i = 0; i < nbr_of_contacts; i++ )
+        {
+        AddContactL( engine, i );
+        }
+    
+    CleanupStack::PopAndDestroy(engine);
+
+    DebugPrintF(_L("CreateTestContactDatabaseL: Contacts creation completed, number of contacts: %d"), nbr_of_contacts );
+
+    return nbr_of_contacts;
+    }
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta_document.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,83 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+// INCLUDE FILES
+#include "edta_appui.h"
+#include "edta_document.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CEdtaDocument::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CEdtaDocument* CEdtaDocument::NewL( CEikApplication& aApp )
+    {
+    CEdtaDocument* self = NewLC( aApp );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEdtaDocument::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CEdtaDocument* CEdtaDocument::NewLC( CEikApplication& aApp )
+    {
+    CEdtaDocument* self = new ( ELeave ) CEdtaDocument( aApp );
+
+    CleanupStack::PushL( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEdtaDocument::CEdtaDocument()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CEdtaDocument::CEdtaDocument( CEikApplication& aApp )
+    : CAknDocument( aApp )
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// CEdtaDocument::~CEdtaDocument()
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CEdtaDocument::~CEdtaDocument()
+    {
+    // No implementation required
+    }
+
+// ---------------------------------------------------------------------------
+// CEdtaDocument::CreateAppUiL()
+// Constructs CreateAppUi.
+// ---------------------------------------------------------------------------
+//
+CEikAppUi* CEdtaDocument::CreateAppUiL()
+    {
+    // Create the application user interface, and return a pointer to it.
+    // The framework takes ownership of this object.
+    return ( static_cast <CEikAppUi*> ( new ( ELeave ) CEdtaAppUi ) );
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta_dummylistener.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+#include "edta_dummylistener.h"
+
+
+CDummyListener::CDummyListener()
+    {
+    }
+
+CDummyListener::~CDummyListener()
+    {
+    }
+    
+void CDummyListener::HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent /* aEvent */ )
+    {
+    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta_querydialog.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -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:  Easy dialing test application.
+*
+*/
+
+// INCLUDE FILES
+
+#include <avkon.hrh>
+#include "edta_querydialog.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CEdtaQueryDialog::CEdtaQueryDialog( TDes& aBuf, const HBufC *aDefInput )
+    : CAknTextQueryDialog( aBuf )
+    , iDefInput(*(const_cast<HBufC*> (aDefInput)))
+    {
+    }
+
+
+
+// ---------------------------------------------------------
+// CEdtaQueryDialog::PreLayoutDynInitL
+// ---------------------------------------------------------
+//
+void  CEdtaQueryDialog::PreLayoutDynInitL()
+    {
+    // first we have to execute PreLayoutDynInitL() of the base-class
+    CAknTextQueryDialog::PreLayoutDynInitL();
+
+    // acquire pointer to editor-control and set the default input.
+    CAknQueryControl* control = QueryControl();
+    control->SetTextL(iDefInput);
+
+    // enable OK-button, so that default text can be accepted as it is
+    // without modifying the text
+    MakeLeftSoftkeyVisible( ETrue );
+    }
+
+//  End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/edta/src/edta_screentextbuffer.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,500 @@
+/*
+* 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:  Easy dialing test application.
+*
+*/
+
+// INCLUDE FILES
+#include "edta_screentextbuffer.h"
+#include "edta_debugprint.h"
+#include "edta.pan"
+
+#include <coemain.h>
+#include <aknsbasicbackgroundcontrolcontext.h>
+#include <eiksbfrm.h>
+#include <eikenv.h>
+#include <eikdef.h>
+#include <aknappui.h>
+#include <aknutils.h>
+
+
+const TInt KLineWidthCent = 90; // Percent of total screen width
+const TInt KHeightMarginCent = 7; // Percent of total height
+const TInt KBottomMarginCent = 3; // Percent of total height
+const TInt KLineHeightCent = 135; // How many percent is the line height of font height
+const TInt KCent = 100;
+const TInt KInitialScreenBufferSize = 20; // This many lines is initially allocated to the screen buffer.
+const TInt KInitialScreenStartAmount = 5; // This many screen starts are initially allocated to screen buffer.
+
+
+CEdtaScreenTextBuffer* CEdtaScreenTextBuffer::NewL( const TRect& aRect )
+    {
+    CEdtaScreenTextBuffer* self = CEdtaScreenTextBuffer::NewLC( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+CEdtaScreenTextBuffer* CEdtaScreenTextBuffer::NewLC( const TRect& aRect )
+    {
+    CEdtaScreenTextBuffer* self = new ( ELeave ) CEdtaScreenTextBuffer;
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    return self;
+    }
+
+// constructors
+CEdtaScreenTextBuffer::CEdtaScreenTextBuffer()
+    {
+    }
+
+void CEdtaScreenTextBuffer::ConstructL( const TRect& aRect )
+    {
+    CreateWindowL();
+    CalculateL(aRect);
+    ActivateL();
+    }
+
+// destructor
+CEdtaScreenTextBuffer::~CEdtaScreenTextBuffer()
+    {
+    delete iSBFrame;
+    delete iScreenStarts;
+
+    if ( iText )
+        {
+        iText->ResetAndDestroy();
+        delete iText;
+        }
+    }
+
+void CEdtaScreenTextBuffer::SizeChanged()
+    {
+    // TRAP_IGNORE( CalculateL( Rect() ) );
+    // DrawDeferred();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::Draw()
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::Draw( const TRect& aRect ) const
+    {
+	// DebugPrintF(_L("CEdtaScreenTextBuffer::Draw, rect: %d, %d - %d, %d"), aRect.iTl.iX, aRect.iTl.iY, aRect.iBr.iX, aRect.iBr.iY );
+
+    __ASSERT_DEBUG( iText, Panic(EEdtaFieldNotInitialized,_L("CEdtaScreenTextBuffer::Draw: iText == NULL") ));
+    __ASSERT_DEBUG( iScreenStarts, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::Draw: iScreenStarts == NULL") ));
+    __ASSERT_DEBUG( iScreenStarts->Count() > 0, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::Draw: iScreenStarts has zero elements") ));
+
+    CWindowGc& gc = SystemGc();
+
+    gc.SetBrushColor( KRgbWhite );
+    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+    gc.Clear( aRect );
+    
+    if ( IsFocused() )
+        {
+        TRect frame( aRect );
+        frame.Shrink(3,3);
+        frame.iBr.iX -= 10;
+        gc.SetPenColor(KRgbBlack);
+        gc.SetPenSize( TSize(2,2) );
+        TSize cornerRounding(8,8);
+        gc.DrawRoundRect( frame, cornerRounding );
+        }
+    
+    gc.UseFont( iFont );
+
+    // index of the first line on the screen in the text array
+    TInt firstLine = 0 ;
+    if((iScreenStarts ) && (iScreenStarts->Count() > iCurrentScreen))
+        {
+        firstLine = ( (*iScreenStarts)[ iCurrentScreen ] );
+        }
+    else
+        {
+        firstLine = (*iScreenStarts)[ iScreenStarts->Count() - 1 ];
+        }
+
+    // index of the last line on the screen in the text array
+    TInt lastLine( firstLine + iLinesPerScreen - 1 );
+
+    gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+
+    TPoint position( iTopBaseLineX, iTopBaseLineY );
+    TPoint topLeft;
+    TSize rectSize( iLineWidth, iBaseLineDelta +iFont->DescentInPixels() );
+
+    for ( TInt index = firstLine; index < iText->Count() && index <= lastLine; index++, position.iY += iBaseLineDelta )
+        {
+        HBufC* text = (*iText)[ index ];
+
+        if ( text )
+            {
+            topLeft = TPoint( position.iX, position.iY-iBaseLineDelta );
+            gc.SetPenColor(KRgbBlack);
+            gc.DrawText( *text, TRect( topLeft, rectSize ), iBaseLineDelta, iTextAlign );
+            }
+        }
+
+    gc.DiscardFont();
+
+    // DebugPrintF(_L("CEdtaScreenTextBuffer::Draw exit"));
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::ActivateL()
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::ActivateL()
+    {
+    CCoeControl::ActivateL();
+    UpdateScrollIndicatorL();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::SetTextL()
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::WriteLineL(TRefByValue<const TDesC> aText,... )
+    {
+    TBuf<KEdtaMaxLineWidth> bufLine;
+    VA_LIST list;
+    VA_START(list,aText);
+    bufLine.FormatList(aText,list);
+
+    if(!bufLine.Length())
+        {
+        iText->AppendL( NULL );
+        }
+    else
+        {
+        HBufC* line = HBufC::NewLC(bufLine.Length());
+        *line = bufLine;
+        iText->AppendL( line );
+        CleanupStack::Pop(line);
+        }
+
+    // Updating scrollbars and screen starts etc are moved to UpdateScrollIndicatorL()
+
+    // if text, last line is shown again in next screen
+    iDoNotShowLastLineAgain = EFalse;
+
+    DrawDeferred(); //New
+    UpdateScrollIndicatorL();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::DeleteLastLine()
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::DeleteLastLine(TInt aCount)
+    {
+    __ASSERT_DEBUG( iText, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::DeleteLastLine: iText == NULL") ));
+    __ASSERT_DEBUG( iText->Count() > 0, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::DeleteLastLine: iText has zero elements") ));
+
+    while (aCount > 0)
+        {
+        // Avoiding memory leaks
+        TInt lastIndex = iText->Count() - 1;
+
+        // The first item in iText cannot be deleted, since UpdateScrollIndicatorL
+        // relies on there being at least one item.
+        if (lastIndex > 0)
+            {
+            HBufC* text = (*iText)[ lastIndex ];
+            delete text;
+            iText->Delete(lastIndex);
+            }
+        --aCount;
+        }
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::OfferKeyEventL()
+// -----------------------------------------------------------------------------
+TKeyResponse CEdtaScreenTextBuffer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                              TEventCode aType )
+    {
+    __ASSERT_DEBUG(iScreenStarts, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::OfferKeyEventL: iScreenStarts == NULL") ));
+    __ASSERT_DEBUG(iScreenStarts->Count() > 0, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::OfferKeyEventL: iScreenStarts has zero elements") ));
+
+    if ( aType == EEventKey && iScreenStarts->Count() > 1 )
+        {
+        switch ( aKeyEvent.iCode )
+            {
+            case EKeyUpArrow:
+                if ( iCurrentScreen > 0 )
+                    {
+                    iCurrentScreen--;
+                    DrawNow();
+                    UpdateScrollIndicatorL();
+                    }
+                break;
+
+            case EKeyDownArrow:
+                if ( iCurrentScreen < iScreenStarts->Count() - 1 )
+                    {
+                    iCurrentScreen++;
+                    DrawNow();
+                    UpdateScrollIndicatorL();
+                    }
+                break;
+
+            default:
+                return EKeyWasNotConsumed;
+            }
+        }
+
+    return EKeyWasConsumed;
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::FocusChanged()
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::FocusChanged(TDrawNow aDrawNow)
+    {
+    if ( aDrawNow == EDrawNow )
+        {
+        DrawNow();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::HandleScrollEventL()
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::HandleScrollEventL ( CEikScrollBar* aScrollBar, TEikScrollEvent aEventType)
+    {
+    //Only on page up/down,scroll up/down and drag events
+    switch (aEventType)
+        {
+        case EEikScrollPageDown:
+        case EEikScrollPageUp:
+        case EEikScrollThumbDragVert:
+        case EEikScrollUp:
+        case EEikScrollDown:
+
+            iCurrentScreen = aScrollBar->ThumbPosition();
+
+            //Refresh now
+            DrawNow();
+            UpdateScrollIndicatorL();
+            break;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::UpdateScrollIndicatorL()
+//
+// This function assumes that
+// - iText exists and has at least one element.
+// - iScreenStarts exist and has at least one element.
+// These conditions are met if CalculateL / ConstructL has been called.
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::UpdateScrollIndicatorL()
+    {
+    __ASSERT_DEBUG( iText, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::UpdateScrollIndicatorL: iText == NULL") ));
+    __ASSERT_DEBUG( iText->Count() > 0, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::UpdateScrollIndicatorL: iText has zero elements") ));
+    __ASSERT_DEBUG( iScreenStarts, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::UpdateScrollIndicatorL: iScreenStarts == NULL") ));
+    __ASSERT_DEBUG( iScreenStarts->Count() > 0, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::UpdateScrollIndicatorL: iScreenStarts has zero elements") ));
+
+    TInt lastLine( iText->Count() - 1 );
+    TInt screenStart( (*iScreenStarts)[ iScreenStarts->Count() - 1 ] );
+
+    TBool firstNewScreenHandled( EFalse );
+
+    while ( lastLine >= screenStart + iLinesPerScreen )
+        {
+        if ( !firstNewScreenHandled && iDoNotShowLastLineAgain )
+            {
+            screenStart++;
+            firstNewScreenHandled = ETrue;
+            }
+
+        // If the shows screen is the last on, scroll the view along with new lines.
+        if (iCurrentScreen == iScreenStarts->Count() - 1)
+            {
+            iCurrentScreen++;
+            }
+
+        screenStart += iLinesPerScreen - 1;
+        iScreenStarts->AppendL( screenStart );
+        }
+
+    if ( !iSBFrame )
+        {
+        iSBFrame = new( ELeave ) CEikScrollBarFrame( this, NULL, ETrue );
+
+        iSBFrame->CreateDoubleSpanScrollBarsL(ETrue, EFalse); // non-window owning scrollbar
+        iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EDoubleSpan);
+
+        iSBFrame->SetScrollBarFrameObserver(this);
+        iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+        }
+
+    TEikScrollBarModel vSbarModel;
+    vSbarModel.iThumbPosition = iCurrentScreen;
+    vSbarModel.iScrollSpan = iScreenStarts->Count();
+    vSbarModel.iThumbSpan = 1;
+
+    TRect rect(Rect());
+    TEikScrollBarFrameLayout layout;
+    layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant;
+
+    // For EDoubleSpan type scrollbar
+    if (vSbarModel.iThumbPosition + vSbarModel.iThumbSpan > vSbarModel.iScrollSpan)
+        {
+        // Not let scrollbar values overflow
+        vSbarModel.iThumbPosition = vSbarModel.iScrollSpan - vSbarModel.iThumbSpan;
+        }
+
+    TAknDoubleSpanScrollBarModel vDsSbarModel(vSbarModel);
+    iSBFrame->TileL(NULL, &vDsSbarModel, rect, rect, layout);
+    iSBFrame->SetVFocusPosToThumbPos(vDsSbarModel.FocusPosition());
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::CalculateL()
+// Needs to be called in construction, and whenever layout changes.
+// Screen orientation change, etc.
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::CalculateL(const TRect& aRect)
+    {
+    // DebugPrintF(_L("CEdtaScreenTextBuffer::CalculateL, rect: %d, %d - %d, %d"), aRect.iTl.iX, aRect.iTl.iY, aRect.iBr.iX, aRect.iBr.iY  );
+
+    TRect rect(0,0,0,0);
+
+    iCurrentScreen = 0;
+
+    iFont = AknLayoutUtils::FontFromId(EAknLogicalFontSecondaryFont);
+
+    // Calculate various text positioning parameters
+    iBaseLineDelta = iFont->HeightInPixels() * KLineHeightCent / KCent;
+
+    TInt mainPaneWidth( aRect.iBr.iX - aRect.iTl.iX );
+    TInt mainPaneHeight( aRect.iBr.iY - aRect.iTl.iY );
+    // Line width is 90% (by default) of client rect, and horizontal margins 10%
+    iLineWidth = mainPaneWidth * KLineWidthCent / KCent;
+
+    iTopBaseLineX = ( mainPaneWidth - iLineWidth ) / 2;
+
+    // top margin is 7% (by default) of the client rect
+    TInt topMargin = mainPaneHeight * KHeightMarginCent / KCent;
+    iTopBaseLineY = topMargin + iFont->AscentInPixels();
+
+    // minimum bottom margin is 3% (by default) of the client rect
+    TInt bottomMargin = mainPaneHeight * KBottomMarginCent / KCent;
+    iLinesPerScreen =
+        ( mainPaneHeight - topMargin - bottomMargin ) / iBaseLineDelta;
+
+    iTextAlign = CGraphicsContext::ELeft;
+
+    // Text must not be deleted, otherwise all accumulated data will be lost.
+    if ( !iText )
+        {
+        // Every text line on screen is one entry in this array
+        iText = new( ELeave ) CArrayPtrFlat<HBufC>( KInitialScreenBufferSize );
+        iText->AppendL(NULL); // Extra newline for visual reasons
+        }
+
+     if ( iScreenStarts )
+        {
+        delete iScreenStarts;
+        iScreenStarts = NULL;
+        }
+
+
+    // This array contains indices for lines that start the subsequent
+    // screens, for custom scrolling
+    iScreenStarts = new( ELeave ) CArrayFixFlat<TInt>( KInitialScreenStartAmount );
+    // Initialisation: first screen starts at line 0.
+    iScreenStarts->AppendL( 0 );
+
+    if ( iSBFrame )
+        {
+        delete iSBFrame;
+        iSBFrame = NULL;
+        }
+
+    UpdateScrollIndicatorL();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CEdtaScreenTextBuffer::HandleResourceChange()
+// -----------------------------------------------------------------------------
+void CEdtaScreenTextBuffer::HandleResourceChange(TInt aType)
+    {
+    switch ( aType )
+        {
+        case KEikDynamicLayoutVariantSwitch :
+            {
+            TRAPD( error, CalculateL( iAvkonAppUi->ClientRect() ));
+
+            if( error != KErrNone )
+                {
+                DebugPrintF(_L("CEdtaScreenTextBuffer::HandleResourceChange: CalculateL -method failed: %d"), error );
+                }
+            else
+                {
+                DrawNow();
+                }
+            }
+            break;
+
+        case KAknsMessageSkinChange :
+            {
+            __ASSERT_DEBUG(iSBFrame, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::HandleResourceChange: iSBFrame == NULL") ));
+
+            TRAPD( error,
+                {
+                iSBFrame->CreateDoubleSpanScrollBarsL(ETrue, EFalse); // window owning scrollbar
+                iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EDoubleSpan);
+                iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EOn);
+                UpdateScrollIndicatorL();
+                }
+            );
+
+            if( error != KErrNone )
+                {
+                DebugPrintF(_L("CEdtaScreenTextBuffer::HandleResourceChange: Create ScrollBars failed: %d"), error );
+                __ASSERT_DEBUG( error == KErrNone, Panic(EEdtaFieldNotInitialized, _L("CEdtaScreenTextBuffer::HandleResourceChange => Skin change caused panic") ));
+                }
+            }
+
+        default:
+            {
+            CCoeControl::HandleResourceChange(aType);
+            }
+            break;
+        }
+    }
+
+
+// ---------------------------------------------------------
+// CEdtaScreenTextBuffer::MopSupplyObject()
+// Pass skin information if need.
+// ---------------------------------------------------------
+TTypeUid::Ptr CEdtaScreenTextBuffer::MopSupplyObject(TTypeUid aId)
+    {
+    return CCoeControl::MopSupplyObject(aId);
+    }
+
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/t_easydialingplugin/group/UT_easydialingplugin.mmp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,153 @@
+/*
+* 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 file
+*
+*/
+
+
+#include <platform_paths.hrh>
+#include "data_caging_paths.hrh"
+#include "../../../inc/easydialingconstants.hrh"
+
+// DEFINES
+#define         KMyUniqueUid3 0x200212A2
+#define         KEUnitTestDllUid2 0x1000af5a
+
+// Build target
+TARGET          UT_easydialingplugin.dll
+TARGETTYPE      dll
+UID             KEUnitTestDllUid2 KMyUniqueUid3
+
+CAPABILITY      ALL -TCB
+VENDORID        0x101FB657
+
+// Source files
+SOURCEPATH      ../src
+SOURCE          DllMain.cpp           // Test code
+SOURCE			CEasyDialingPlugin_Test.cpp
+SOURCE			createtestcontactbase.cpp
+SOURCE 			dummyparentcontrol.cpp
+
+SOURCEPATH      ../../../src
+SOURCE			easydialingplugin.cpp
+SOURCE          easydialinglistbox.cpp
+SOURCE          easydialinglistboxdata.cpp
+SOURCE          easydialinglistboxitemdrawer.cpp
+SOURCE          easydialinglistboxview.cpp
+SOURCE          easydialingcenreplistener.cpp
+SOURCE          easydialingcontactdata.cpp
+SOURCE          easydialingcontactdatamanager.cpp
+SOURCE          easydialingutils.cpp
+
+// Code under test
+
+// Include paths
+USERINCLUDE     ../inc
+USERINCLUDE     ../../../inc
+USERINCLUDE     ../../../traces
+USERINCLUDE     ../../../edcontactor/inc
+
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE  /epoc32/include/Digia/EUnit
+SYSTEMINCLUDE    /epoc32/include/internal
+SYSTEMINCLUDE    /epoc32/include/ecom
+
+SOURCEPATH      ../../../data
+
+START RESOURCE 200212A0.rss
+    LANG    SC
+    TARGET  easydialingplugin.rsc
+END
+
+START RESOURCE easydialingpluginresources.rss
+    HEADER
+    TARGETPATH  \resource
+    TARGET      easydialingpluginresources.rsc
+	LANGUAGE_IDS
+END
+
+
+// Symbian framework libraries
+
+LIBRARY euser.lib
+LIBRARY ECom.lib
+LIBRARY cone.lib  
+LIBRARY ws32.lib
+LIBRARY eikctl.lib
+LIBRARY eikcore.lib
+LIBRARY eikcoctl.lib
+LIBRARY bafl.lib 
+LIBRARY gdi.lib 
+LIBRARY egul.lib
+LIBRARY apgrfx.lib
+LIBRARY fbscli.lib
+LIBRARY efsrv.lib
+LIBRARY cntmodel.lib
+LIBRARY bitgdi.lib
+LIBRARY etext.lib
+
+// Avkon, Avkon skin and Avkon layout libraries.
+LIBRARY avkon.lib
+LIBRARY aknicon.lib
+LIBRARY aknlistloadertfx.lib
+LIBRARY aknskins.lib 
+LIBRARY aknskinsrv.lib 
+LIBRARY aknswallpaperutils.lib
+LIBRARY aknlayout2scalable.lib
+LIBRARY cdlengine.lib
+LIBRARY aknlayout2.lib
+
+// AIW library
+LIBRARY servicehandler.lib
+
+// Predictive search libraries
+LIBRARY PcsUtils.lib
+LIBRARY PsServerClientAPI.lib
+
+// Virtual phonebook library
+LIBRARY VPbkEng.lib
+
+// Phonebook engine
+LIBRARY	pbkeng.lib
+
+// ECE Communication launcher library
+LIBRARY ccaclient.lib
+
+// Central repository
+LIBRARY centralrepository.lib   
+LIBRARY commonengine.lib
+LIBRARY cenrepnotifhandler.lib 
+
+// CPbk2ImageManager
+LIBRARY pbk2presentation.lib
+
+// bitmap handling
+LIBRARY bitmaptransforms.lib
+
+// Easy dialing own contactor module.
+LIBRARY edcontactor.lib
+
+// CMS library used for getting information about contacts.
+//LIBRARY 		  cmsclient.lib
+
+// Service provider settings api
+LIBRARY serviceprovidersettings.lib
+
+// Libraries used for R&D purposes only
+DEBUGLIBRARY flogger.lib
+
+// EasyDialing Eunit Test libarary 
+LIBRARY eunit.lib
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/t_easydialingplugin/group/bld.inf	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,29 @@
+/*
+* 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:  Bld.inf
+*
+*/
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_TESTMMPFILES
+UT_easydialingplugin.mmp
+
+//PRJ_MMPFILES
+
+//UT_easydialingplugin.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/t_easydialingplugin/inc/CEasyDialingPlugin_Test.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 has been generated with EUnit Pro
+http://www.digia.com/eunit
+-----------------------------------------------------------------------------
+*/
+#ifndef __CEASYDIALINGPLUGIN_TEST_H__
+#define __CEASYDIALINGPLUGIN_TEST_H__
+
+// INCLUDES
+#include <CEUnitTestSuiteClass.h>
+#include <EUnitDecorators.h>
+#include "easydialingplugin.h"
+
+// FORWARD DECLARATIONS
+
+class CDummyParentControl;
+
+/**
+ * Generated EUnit test suite class.
+ */
+NONSHARABLE_CLASS( CEasyDialingPlugin_Test ) : public CEUnitTestSuiteClass, public MDialingExtensionObserver
+    {
+    public:  // Constructors and destructor
+
+        static CEasyDialingPlugin_Test* NewL();
+        static CEasyDialingPlugin_Test* NewLC();
+        ~CEasyDialingPlugin_Test();
+        
+        void HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent );
+
+    private: // Constructors
+
+        CEasyDialingPlugin_Test();
+        void ConstructL();
+
+    private: // New methods
+
+         void SetupL();
+        
+         void Teardown();
+        
+         void T_Global_OfferKeyEventLL();
+        
+         void T_Global_Search1();
+         void T_Global_Search2();
+         void T_Global_Search3();
+         void T_Global_Search4(); 
+         void T_Global_Search5(); 
+         void T_Global_Search6(); 
+         void T_Global_Search7(); 
+         void T_Global_Search8();
+         
+         void T_Global__CEasyDialingPluginL();
+
+    private: // Data
+
+        CEasyDialingPlugin* iCEasyDialingPlugin;
+        
+        CActiveSchedulerWait* iWait;
+        
+        CDummyParentControl* iDummyParentControl;
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __CEASYDIALINGPLUGIN_TEST_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/t_easydialingplugin/inc/dummyparentcontrol.h	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,39 @@
+/*
+* 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:  EUnit test file.
+*
+*/
+
+#ifndef DUMMYPARENTCONTROL_H_
+#define DUMMYPARENTCONTROL_H_
+
+#include <coecntrl.h>
+
+class CDummyParentControl : public CCoeControl
+    {
+public:
+    
+    static CDummyParentControl* NewL();
+    
+    ~CDummyParentControl();
+    
+private:
+    
+    CDummyParentControl();
+    
+    void ConstructL();
+    
+    };
+
+#endif /* DUMMYPARENTCONTROL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/t_easydialingplugin/src/CEasyDialingPlugin_Test.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,314 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 has been generated with EUnit Pro
+http://www.digia.com/eunit
+-----------------------------------------------------------------------------
+*/
+#include "CEasyDialingPlugin_Test.h"
+#include <EUnitMacros.h>
+#include <EUnitDecorators.h>
+#include <f32file.h> 
+#include <bautils.h> 
+
+#include "easydialingplugin.h"
+#include "dummyparentcontrol.h"
+
+#include <cntdb.h> 
+#include <cntitem.h> 
+#include <cntfldst.h> 
+#include <bautils.h> 
+
+
+// - Construction -----------------------------------------------------------
+
+CEasyDialingPlugin_Test* CEasyDialingPlugin_Test::NewL()
+    {
+    CEasyDialingPlugin_Test* self = CEasyDialingPlugin_Test::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+CEasyDialingPlugin_Test* CEasyDialingPlugin_Test::NewLC()
+    {
+    CEasyDialingPlugin_Test* self = new( ELeave ) CEasyDialingPlugin_Test();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+CEasyDialingPlugin_Test::~CEasyDialingPlugin_Test()
+    {
+    RDebug::Print(_L("EDTest: enter desctructor"));
+    
+    if (iCEasyDialingPlugin)
+        {
+        iCEasyDialingPlugin->RemoveObserver( this );
+        }
+    delete iWait;
+    delete iCEasyDialingPlugin;
+    delete iDummyParentControl;
+    RDebug::Print(_L("EDTest: exit desctructor"));
+    }
+
+CEasyDialingPlugin_Test::CEasyDialingPlugin_Test()
+    {
+    }
+
+
+TInt CreateTestContactDatabaseL();
+
+void CEasyDialingPlugin_Test::ConstructL()
+    {
+    CEUnitTestSuiteClass::ConstructL();
+    CreateTestContactDatabaseL();
+    iWait = new( ELeave )CActiveSchedulerWait();
+    iDummyParentControl = CDummyParentControl::NewL();
+    
+    iCEasyDialingPlugin = CEasyDialingPlugin::NewL();
+    iCEasyDialingPlugin->InitializeL( *iDummyParentControl );
+    iCEasyDialingPlugin->AddObserverL( this );
+    
+    
+    RDebug::Print(_L("EDTest:Construct plugin exit"));
+    }
+
+
+void CEasyDialingPlugin_Test::HandleDialingExtensionEvent( MDialingExtensionObserver::TEvent aEvent )
+    {
+    if ( aEvent == MDialingExtensionObserver::ESearchComplete )
+        {
+        iWait->AsyncStop();
+        }
+    }
+
+// - Test methods -----------------------------------------------------------
+
+
+
+void CEasyDialingPlugin_Test::SetupL(  )
+    {
+    }
+    
+
+void CEasyDialingPlugin_Test::Teardown(  )
+    {
+    }
+
+
+void CEasyDialingPlugin_Test::T_Global_OfferKeyEventLL(  )
+    {
+    
+    TKeyEvent ke;
+    ke.iCode = 32;
+    ke.iModifiers = 0;
+    ke.iRepeats = 0;
+    ke.iScanCode = 32;
+    
+    iCEasyDialingPlugin->OfferKeyEventL( ke, EEventKey );
+    EUNIT_ASSERT_DESC( iCEasyDialingPlugin, "OfferKeyEventL general assert");
+    
+    }
+    
+
+// -----------------------------------------------------------------------------
+// T_Global_Search*
+// These functions do all kind of searches with easy dialing and check that
+// the count of matching contacts is right. These tests require that a specific
+// test contact data base has been created with CreateTestContactDatabaseL().
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin_Test::T_Global_Search1(  )
+    {
+    TRAP_IGNORE( iCEasyDialingPlugin->SetInputL( _L("A") ));
+    iWait->Start();
+    // Now execution stops here until HandleDialingExtensionEvent has been called. 
+    
+    TInt count = iCEasyDialingPlugin->MatchingContactCount();
+    EUNIT_ASSERT_EQUALS( count, 1 );
+    }
+   
+void CEasyDialingPlugin_Test::T_Global_Search2()
+	{
+	TRAP_IGNORE( iCEasyDialingPlugin->SetInputL( _L("b") ));
+    iWait->Start();
+    // Now execution stops here until HandleDialingExtensionEvent has been called.
+    
+	TInt count = iCEasyDialingPlugin->MatchingContactCount();
+    EUNIT_ASSERT_EQUALS( count, 1 );
+	}
+
+void CEasyDialingPlugin_Test::T_Global_Search3()
+    {
+    TRAP_IGNORE( iCEasyDialingPlugin->SetInputL( _L("C") ));
+    iWait->Start();
+    // Now execution stops here until HandleDialingExtensionEvent has been called.
+    
+    TInt count = iCEasyDialingPlugin->MatchingContactCount();
+    EUNIT_ASSERT_EQUALS( count, 2 );
+    }
+
+void CEasyDialingPlugin_Test::T_Global_Search4()
+    {
+    TRAP_IGNORE( iCEasyDialingPlugin->SetInputL( _L("2") ));
+    iWait->Start();
+    // Now execution stops here until HandleDialingExtensionEvent has been called.
+    
+    TInt count = iCEasyDialingPlugin->MatchingContactCount();
+    EUNIT_ASSERT_EQUALS( count, 4 );
+    }
+
+void CEasyDialingPlugin_Test::T_Global_Search5()
+    {
+    TRAP_IGNORE( iCEasyDialingPlugin->SetInputL( _L("3") ));
+    iWait->Start();
+    // Now execution stops here until HandleDialingExtensionEvent has been called.
+    
+    TInt count = iCEasyDialingPlugin->MatchingContactCount();
+    EUNIT_ASSERT_EQUALS( count, 4 );
+    }
+
+void CEasyDialingPlugin_Test::T_Global_Search6()
+    {
+    TRAP_IGNORE( iCEasyDialingPlugin->SetInputL( _L("8286607") )); // should match to <Tauno P>alo
+    iWait->Start();
+    // Now execution stops here until HandleDialingExtensionEvent has been called.
+    
+    TInt count = iCEasyDialingPlugin->MatchingContactCount();
+    EUNIT_ASSERT_EQUALS( count, 1 );
+    }
+
+void CEasyDialingPlugin_Test::T_Global_Search7()
+    {
+    TRAP_IGNORE( iCEasyDialingPlugin->SetInputL( _L("5569304") )); // should match to <Lloyd H>arold
+    iWait->Start();
+    // Now execution stops here until HandleDialingExtensionEvent has been called.
+    
+    TInt count = iCEasyDialingPlugin->MatchingContactCount();
+    EUNIT_ASSERT_EQUALS( count, 1 );
+    }
+
+void CEasyDialingPlugin_Test::T_Global_Search8()
+    {
+    TRAP_IGNORE( iCEasyDialingPlugin->SetInputL( _L("3456407") )); // should match to <Filmi S>uomi
+    iWait->Start();
+    // Now execution stops here until HandleDialingExtensionEvent has been called.
+    
+    TInt count = iCEasyDialingPlugin->MatchingContactCount();
+    EUNIT_ASSERT_EQUALS( count, 2 );
+    }
+
+
+    
+// -----------------------------------------------------------------------------
+// T_Global__CEasyDialingPluginL
+// Destructor test 
+// -----------------------------------------------------------------------------
+//
+void CEasyDialingPlugin_Test::T_Global__CEasyDialingPluginL(  )
+    {
+    iCEasyDialingPlugin->~CEasyDialingPlugin();
+    iCEasyDialingPlugin = NULL;
+    iCEasyDialingPlugin = CEasyDialingPlugin::NewL();
+    EUNIT_ASSERT_DESC( ETrue, "Generated assert, replace with real");
+    }
+
+
+
+
+
+
+
+// - EUnit test table -------------------------------------------------------
+
+EUNIT_BEGIN_TEST_TABLE(
+    CEasyDialingPlugin_Test,
+    "Easy dialing plugin test",
+    "UNIT" )
+
+EUNIT_TEST(
+    "OfferKeyEventL",
+    "CEasyDialingPlugin",
+    "OfferKeyEventL",
+    "FUNCTIONALITY",
+    SetupL, T_Global_OfferKeyEventLL, Teardown)
+    
+EUNIT_TEST(
+    "SetInputLL",
+    "CEasyDialingPlugin",
+    "SetInputLL",
+    "FUNCTIONALITY",
+    SetupL, T_Global_Search1, Teardown)
+    
+EUNIT_TEST(
+	"Tests matching contact count function.",
+	"CEasyDialingPlugin_Test",
+	"MatchingContactCount",
+	"FUNCTIONALITY",
+	SetupL, T_Global_Search2, Teardown )
+
+EUNIT_TEST(
+    "PCS search test function",
+    "CEasyDialingPlugin_Test",
+    "",
+    "FUNCTIONALITY",
+    SetupL, T_Global_Search3, Teardown )
+    
+EUNIT_TEST(
+    "PCS search test function",
+    "CEasyDialingPlugin_Test",
+    "",
+    "FUNCTIONALITY",
+    SetupL, T_Global_Search4, Teardown )
+    
+EUNIT_TEST(
+    "PCS search test function",
+    "CEasyDialingPlugin_Test",
+    "",
+    "FUNCTIONALITY",
+    SetupL, T_Global_Search5, Teardown )
+    
+EUNIT_TEST(
+    "PCS search test function",
+    "CEasyDialingPlugin_Test",
+    "",
+    "FUNCTIONALITY",
+    SetupL, T_Global_Search6, Teardown )
+    
+EUNIT_TEST(
+    "PCS search test function",
+    "CEasyDialingPlugin_Test",
+    "",
+    "FUNCTIONALITY",
+    SetupL, T_Global_Search7, Teardown )
+    
+EUNIT_TEST(
+    "PCS search test function",
+    "CEasyDialingPlugin_Test",
+    "",
+    "FUNCTIONALITY",
+    SetupL, T_Global_Search8, Teardown )
+    
+EUNIT_TEST(
+    "~CEasyDialingPlugin",
+    "CEasyDialingPlugin",
+    "~CEasyDialingPlugin",
+    "FUNCTIONALITY",
+    SetupL, T_Global__CEasyDialingPluginL, Teardown)
+    
+EUNIT_END_TEST_TABLE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/t_easydialingplugin/src/DllMain.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,34 @@
+/*
+* 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:  EUnit test file.
+*
+*/
+//  EXTERNAL INCLUDES
+#include <CEUnitTestSuite.h>
+#include "CEasyDialingPlugin_Test.h"
+
+/**
+* T_HelloWorld.dll test suite factory function.
+*/
+EXPORT_C MEUnitTest* CreateTestSuiteL()
+    {
+    CEasyDialingPlugin_Test* rootSuite = CEasyDialingPlugin_Test::NewL();
+    
+    if (rootSuite == NULL)
+        {
+        User::Panic(_L("Koe"), 3);
+        }
+
+    return rootSuite;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/t_easydialingplugin/src/createtestcontactbase.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,260 @@
+/*
+* 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:  EUnit test file.
+*
+*/
+
+
+
+#include <cntdb.h> 
+#include <cntitem.h> 
+#include <cntfldst.h> 
+#include <cpbkcontactitem.h>
+#include <cpbkcontactengine.h>
+
+
+HBufC* CreateFieldStringL(char* contactdata[], TInt aIx)
+    {
+    char* str = contactdata[aIx];
+    TInt len = 0;
+    
+    while (str[len] != '\0')
+        {
+        len++;
+        }
+    
+    if ( len == 0 )
+        {
+        return NULL;
+        }
+    
+    HBufC *field = HBufC::NewL( len );
+    TPtr des = field->Des();
+    des.SetLength( len );
+    
+    for (TInt i = 0; i < len; i++)
+        {
+        des[i] = (TChar) str[i];
+        }
+    
+    return field;
+    }
+
+
+void AddFieldStringL( char* contactdata[], CPbkContactItem* aContact, TInt aIx, TInt aFieldId )
+    {
+    HBufC* fieldName = CreateFieldStringL( contactdata, aIx );
+    
+    if ( fieldName ) 
+        {
+        CleanupStack::PushL( fieldName );
+        aContact->FindField( aFieldId )->TextStorage()->SetTextL( *fieldName );
+        CleanupStack::PopAndDestroy(fieldName); 
+        }
+    }
+
+
+void AddContactL( char* contactdata[], CPbkContactEngine* engine, TInt aIx)
+    {
+    CPbkContactItem* contact = engine->CreateEmptyContactL();
+    CleanupStack::PushL( contact );
+    
+    AddFieldStringL( contactdata, contact, aIx * 6 + 0, EPbkFieldIdFirstName );
+    AddFieldStringL( contactdata, contact, aIx * 6 + 1, EPbkFieldIdLastName );
+    AddFieldStringL( contactdata, contact, aIx * 6 + 2, EPbkFieldIdPhoneNumberMobile );
+    AddFieldStringL( contactdata, contact, aIx * 6 + 3, EPbkFieldIdPhoneNumberGeneral );
+    AddFieldStringL( contactdata, contact, aIx * 6 + 4, EPbkFieldIdCompanyName );
+    AddFieldStringL( contactdata, contact, aIx * 6 + 5, EPbkFieldIdEmailAddress );
+        
+    engine->AddNewContactL( *contact );
+    
+    CleanupStack::PopAndDestroy( contact );
+    }
+
+
+
+// ---------------------------------------------------------
+// CreateTestContactDatabaseL
+//
+// Creates a test contact database if it hasn't been created yet.
+// The existence of test base is done through testing if there
+// is a contact matching with word "Dummy". Test data base has
+// a contact for Mr Dummy Contact.
+// This is the primary function of this file. 
+// ---------------------------------------------------------
+//
+TInt CreateTestContactDatabaseL()
+    {
+    
+    TInt nbr_of_contacts = 15;
+    
+    /*
+     * Contact data contains contact data as text strings.
+     * Each contact takes six lines:
+     * - first name
+     * - last name
+     * - cell number
+     * - home number
+     * - company name
+     * - e-mail address
+     * Empty string means that field is not set.
+     */
+
+    char* contactdata[] = 
+    {
+            "Dummy",
+            "Contact",
+            "+1056439939",
+            "035558756",
+            "Ericsson",
+            "dummy.contact@ericsson.sw",
+            
+            "Jaakko",
+            "Helanti",
+            "+358405557631",
+            "034447611",
+            "Nokia",
+            "jaakko.helanti@helanti.com",
+            
+            "Stan",
+            "Laurel",
+            "+0104438839992",
+            "+0104438839000",
+            "MGM",
+            "stan.laurel@heaven.com",
+            
+            "Oliver",
+            "Hardy",
+            "+01078398927",
+            "+10364537882",
+            "MGM",
+            "oliver.hardy@heaven.com",
+            
+            "Harold",
+            "Lloyd",
+            "+102843947",
+            "+10290503958",
+            "Universal",
+            "harold.lloyd@universal.com",
+            
+            "Tauno",
+            "Palo",
+            "+358405557631",
+            "014445466",
+            "Suomi Filmi",
+            "tauno.palo@gmail.com",
+            
+            "Tea",
+            "Ista",
+            "+358475554590",
+            "018723195",
+            "Helsingin Kaupungin Teatteri",
+            "tea.ista@cultureclub.com",
+
+            "Ansa",
+            "Ikonen",
+            "+358471134099",
+            "012388192",
+            "Suomi Filmi",
+            "ansa.ikonen@gmail.com",
+
+            "Bertil",
+            "Nystrom",
+            "+35866377334",
+            "074500998",
+            "Rovaniemen Viuluveistämö",
+            "bertil.nystrom@rvv.com",
+                
+            "",
+            "Onlylastname",
+            "+3585556743",
+            "+35835552727",
+            "",
+            "",
+            
+            "Onlyfirstname",
+            "",
+            "+358405559874",
+            "035553747",
+            "",
+            "",
+               
+            "",
+            "Two-Part Lastname",
+            "+358405557432",
+            "",
+            "",
+            "",
+            
+            "",
+            "",
+            "+35866377334",
+            "074500998",
+            "Just Companyname",
+            "john.doe@justcompanyname.com",
+                
+            "One",
+            "Number",
+            "",
+            "075553266",
+            "Idaho",
+            "",
+            
+            "No",
+            "Number",
+            "",
+            "",
+            "Ericsson",
+            "no.number@ericsson.com",    
+    };
+
+    
+    CPbkContactEngine* engine = CPbkContactEngine::NewL();
+    CleanupStack::PushL( engine );
+    
+    _LIT(KDummyContact, "Dummy");
+        
+    CContactIdArray* findings = engine->FindLC( KDummyContact );
+    
+    // If dummy contact is found, the test database has already been created. 
+    if (findings->Count() > 0)
+        {
+        CleanupStack::PopAndDestroy( findings );
+        CleanupStack::PopAndDestroy( engine );
+        return 0;
+        }
+    
+    CleanupStack::PopAndDestroy( findings );
+
+    for (TInt i = 0; i < nbr_of_contacts; i++ )
+        {
+        AddContactL( contactdata, engine, i );
+        }
+    
+    CleanupStack::PopAndDestroy(engine);
+
+    return nbr_of_contacts;
+    }
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneuis/easydialing/tsrc/t_easydialingplugin/src/dummyparentcontrol.cpp	Fri Feb 19 22:50:26 2010 +0200
@@ -0,0 +1,61 @@
+/*
+* 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:  EUnit test file.
+*
+*/
+
+// INCLUDE FILES
+#include "dummyparentcontrol.h"
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES
+
+// CONSTANTS
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+CDummyParentControl* CDummyParentControl::NewL()
+    {
+    
+    CDummyParentControl* self = new (ELeave) CDummyParentControl();
+    
+    self->ConstructL();
+    
+    return self;
+    }
+    
+
+CDummyParentControl::CDummyParentControl() : CCoeControl()
+    {
+    
+    }
+    
+CDummyParentControl::~CDummyParentControl()
+    {
+    }
+    
+void CDummyParentControl::ConstructL()
+    {
+    CreateWindowL();
+    }
+
--- a/phoneuis/group/bld.inf	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/group/bld.inf	Fri Feb 19 22:50:26 2010 +0200
@@ -15,6 +15,7 @@
 *              
 */ 
 
+#include "../easydialing/group/bld.inf"
 #include "../dialer/group/bld.inf"
 #include "../BubbleManager/Group/bld.inf"
 #include "../ConnectUtil/group/bld.inf"
Binary file phoneuis/vmbx/help/data/xhtml.zip has changed
--- a/phoneuis/vmbx/help/inc/smsvo.hlp.hrh	Tue Feb 02 00:10:04 2010 +0200
+++ b/phoneuis/vmbx/help/inc/smsvo.hlp.hrh	Fri Feb 19 22:50:26 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"